diff --git a/components/lib/fieldset/Fieldset.d.ts b/components/lib/fieldset/Fieldset.d.ts index a61d5bfc4..2c065f47f 100755 --- a/components/lib/fieldset/Fieldset.d.ts +++ b/components/lib/fieldset/Fieldset.d.ts @@ -79,17 +79,17 @@ export interface FieldsetPassThroughOptions { */ toggler?: FieldsetPassThroughOptionType; /** - * Used to pass attributes to the toggler icon's DOM element. + * Used to pass attributes to the toggle icon's DOM element. */ - togglerIcon?: FieldsetPassThroughOptionType; + toggleIcon?: FieldsetPassThroughOptionType; /** - * Used to pass attributes to the legend title's DOM element. + * Used to pass attributes to the legend label's DOM element. */ - legendTitle?: FieldsetPassThroughOptionType; + legendLabel?: FieldsetPassThroughOptionType; /** - * Used to pass attributes to the toggleable content's DOM element. + * Used to pass attributes to the content container's DOM element. */ - toggleableContent?: FieldsetPassThroughOptionType; + contentContainer?: FieldsetPassThroughOptionType; /** * Used to pass attributes to the content's DOM element. */ @@ -180,9 +180,26 @@ export interface FieldsetSlots { */ legend: () => VNode[]; /** + * @deprecated since v4.0. Use the 'toggleicon' slot instead. * Custom toggler icon template. + * @param {Object} scope - toggler icon slot's params. */ - togglericon: () => VNode[]; + togglericon(scope: { + /** + * Collapsed state as a boolean + */ + collapsed: boolean; + }): VNode[]; + /** + * Custom toggler icon template. + * @param {Object} scope - toggler icon slot's params. + */ + toggleicon(scope: { + /** + * Collapsed state as a boolean + */ + collapsed: boolean; + }): VNode[]; } /** diff --git a/components/lib/fieldset/Fieldset.vue b/components/lib/fieldset/Fieldset.vue index 95fb7c7ec..3db820fc7 100755 --- a/components/lib/fieldset/Fieldset.vue +++ b/components/lib/fieldset/Fieldset.vue @@ -2,7 +2,7 @@
- {{ legend }} + {{ legend }} - - + + + - {{ legend }} + {{ legend }} -
+
diff --git a/components/lib/fieldset/style/FieldsetStyle.js b/components/lib/fieldset/style/FieldsetStyle.js index b2f7ac33b..52ddb84a5 100644 --- a/components/lib/fieldset/style/FieldsetStyle.js +++ b/components/lib/fieldset/style/FieldsetStyle.js @@ -8,9 +8,9 @@ const classes = { } ], legend: 'p-fieldset-legend', - legendtitle: 'p-fieldset-legend-label', - togglericon: 'p-fieldset-toggle-icon', - toggleablecontent: 'p-fieldset-content-container', + legendLabel: 'p-fieldset-legend-label', + toggleIcon: 'p-fieldset-toggle-icon', + contentContainer: 'p-fieldset-content-container', content: 'p-fieldset-content' }; diff --git a/components/lib/panel/Panel.d.ts b/components/lib/panel/Panel.d.ts index 0382d7464..ba4614dd6 100755 --- a/components/lib/panel/Panel.d.ts +++ b/components/lib/panel/Panel.d.ts @@ -94,18 +94,18 @@ export interface PanelPassThroughOptions { */ title?: PanelPassThroughOptionType; /** - * Used to pass attributes to the icons' DOM element. + * Used to pass attributes to the header actions' DOM element. */ - icons?: PanelPassThroughOptionType; + headerActions?: PanelPassThroughOptionType; /** - * Used to pass attributes to the toggler button's DOM element. + * Used to pass attributes to the toggle button button's DOM element. * @see {@link ButtonPassThroughOptions} */ - toggler?: ButtonPassThroughOptions; + toggleButton?: ButtonPassThroughOptions; /** - * Used to pass attributes to the toggleablecontent's DOM element. + * Used to pass attributes to the content container's DOM element. */ - toggleableContent?: PanelPassThroughOptionType; + contentContainer?: PanelPassThroughOptionType; /** * Used to pass attributes to the content's DOM element. */ @@ -214,6 +214,7 @@ export interface PanelSlots { */ icons(): VNode[]; /** + * @deprecated since v4.0. Use the 'toggleicon' slot instead. * Custom toggler icon template of panel. * @param {Object} scope - toggler icon slot's params. */ @@ -223,6 +224,16 @@ export interface PanelSlots { */ collapsed: boolean; }): VNode[]; + /** + * Custom toggler icon template of panel. + * @param {Object} scope - toggler icon slot's params. + */ + toggleicon(scope: { + /** + * Collapsed state as a boolean + */ + collapsed: boolean; + }): VNode[]; /** * Custom footer template. */ diff --git a/components/lib/panel/Panel.vue b/components/lib/panel/Panel.vue index d8a69b8ed..e6d6613ee 100755 --- a/components/lib/panel/Panel.vue +++ b/components/lib/panel/Panel.vue @@ -4,12 +4,12 @@ {{ header }} -
+
-
+
diff --git a/components/lib/panel/style/PanelStyle.js b/components/lib/panel/style/PanelStyle.js index 06c847d9a..430c4b82a 100644 --- a/components/lib/panel/style/PanelStyle.js +++ b/components/lib/panel/style/PanelStyle.js @@ -9,9 +9,9 @@ const classes = { ], header: 'p-panel-header', title: 'p-panel-title', - icons: 'p-panel-header-actions', - toggler: 'p-panel-toggle-button', - toggleablecontent: 'p-panel-content-container', + headerActions: 'p-panel-header-actions', + toggleButton: 'p-panel-toggle-button', + contentContainer: 'p-panel-content-container', content: 'p-panel-content', footer: 'p-panel-footer' };