From c7713d3dd1283f158004b50df961042dfecdb64a Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 20 Nov 2023 10:41:12 +0300 Subject: [PATCH] Fixed #4845 - Sidebar: header templating updates --- components/lib/sidebar/BaseSidebar.vue | 4 ++++ components/lib/sidebar/Sidebar.d.ts | 14 ++++++++++++-- components/lib/sidebar/Sidebar.vue | 6 +++--- components/lib/sidebar/style/SidebarStyle.js | 4 ++-- public/themes/arya-blue/theme.css | 4 ++++ public/themes/arya-green/theme.css | 4 ++++ public/themes/arya-orange/theme.css | 4 ++++ public/themes/arya-purple/theme.css | 4 ++++ public/themes/bootstrap4-dark-blue/theme.css | 4 ++++ public/themes/bootstrap4-dark-purple/theme.css | 4 ++++ public/themes/bootstrap4-light-blue/theme.css | 4 ++++ public/themes/bootstrap4-light-purple/theme.css | 4 ++++ public/themes/fluent-light/theme.css | 4 ++++ public/themes/lara-dark-amber/theme.css | 4 ++++ public/themes/lara-dark-blue/theme.css | 4 ++++ public/themes/lara-dark-cyan/theme.css | 4 ++++ public/themes/lara-dark-indigo/theme.css | 4 ++++ public/themes/lara-dark-pink/theme.css | 4 ++++ public/themes/lara-dark-purple/theme.css | 4 ++++ public/themes/lara-dark-teal/theme.css | 4 ++++ public/themes/lara-dark-turquoise/theme.css | 4 ++++ public/themes/lara-light-amber/theme.css | 4 ++++ public/themes/lara-light-blue/theme.css | 4 ++++ public/themes/lara-light-cyan/theme.css | 4 ++++ public/themes/lara-light-indigo/theme.css | 4 ++++ public/themes/lara-light-pink/theme.css | 4 ++++ public/themes/lara-light-purple/theme.css | 4 ++++ public/themes/lara-light-teal/theme.css | 4 ++++ public/themes/lara-light-turquoise/theme.css | 4 ++++ public/themes/luna-amber/theme.css | 4 ++++ public/themes/luna-blue/theme.css | 4 ++++ public/themes/luna-green/theme.css | 4 ++++ public/themes/luna-pink/theme.css | 4 ++++ public/themes/md-dark-deeppurple/theme.css | 4 ++++ public/themes/md-dark-indigo/theme.css | 4 ++++ public/themes/md-light-deeppurple/theme.css | 4 ++++ public/themes/md-light-indigo/theme.css | 4 ++++ public/themes/mdc-dark-deeppurple/theme.css | 4 ++++ public/themes/mdc-dark-indigo/theme.css | 4 ++++ public/themes/mdc-light-deeppurple/theme.css | 4 ++++ public/themes/mdc-light-indigo/theme.css | 4 ++++ public/themes/mira/theme.css | 4 ++++ public/themes/nano/theme.css | 4 ++++ public/themes/nova-accent/theme.css | 4 ++++ public/themes/nova-alt/theme.css | 4 ++++ public/themes/nova-vue/theme.css | 4 ++++ public/themes/nova/theme.css | 4 ++++ public/themes/rhea/theme.css | 4 ++++ public/themes/saga-blue/theme.css | 4 ++++ public/themes/saga-green/theme.css | 4 ++++ public/themes/saga-orange/theme.css | 4 ++++ public/themes/saga-purple/theme.css | 4 ++++ public/themes/soho-dark/theme.css | 4 ++++ public/themes/soho-light/theme.css | 4 ++++ public/themes/tailwind-light/theme.css | 4 ++++ public/themes/vela-blue/theme.css | 4 ++++ public/themes/vela-green/theme.css | 4 ++++ public/themes/vela-orange/theme.css | 4 ++++ public/themes/vela-purple/theme.css | 4 ++++ public/themes/viva-dark/theme.css | 4 ++++ public/themes/viva-light/theme.css | 4 ++++ 61 files changed, 249 insertions(+), 7 deletions(-) diff --git a/components/lib/sidebar/BaseSidebar.vue b/components/lib/sidebar/BaseSidebar.vue index 46dcd8805..f8acee993 100644 --- a/components/lib/sidebar/BaseSidebar.vue +++ b/components/lib/sidebar/BaseSidebar.vue @@ -14,6 +14,10 @@ export default { type: String, default: 'left' }, + header: { + type: null, + default: null + }, baseZIndex: { type: Number, default: 0 diff --git a/components/lib/sidebar/Sidebar.d.ts b/components/lib/sidebar/Sidebar.d.ts index 98205d6de..03ff072de 100755 --- a/components/lib/sidebar/Sidebar.d.ts +++ b/components/lib/sidebar/Sidebar.d.ts @@ -54,7 +54,7 @@ export interface SidebarPassThroughOptions { /** * Used to pass attributes to the header content's DOM element. */ - headerContent?: SidebarPassThroughOptionType; + title?: SidebarPassThroughOptionType; /** * Used to pass attributes to the close button's DOM element. */ @@ -114,6 +114,10 @@ export interface SidebarProps { * @defaultValue left */ position?: 'left' | 'right' | 'top' | 'bottom' | 'full' | undefined; + /** + * Title content of the dialog. + */ + header?: string | undefined; /** * Base zIndex value to use in layering. * @defaultValue 0 @@ -176,8 +180,14 @@ export interface SidebarSlots { default(): VNode[]; /** * Custom header template. + * @param {Object} scope - header slot's params. */ - header(): VNode[]; + header(scope: { + /** + * Style class of the header title + */ + class: any; + }): VNode[]; /** * Custom close icon template. * @param {Object} scope - close icon slot's params. diff --git a/components/lib/sidebar/Sidebar.vue b/components/lib/sidebar/Sidebar.vue index 7d0a27e9d..6653a5e18 100755 --- a/components/lib/sidebar/Sidebar.vue +++ b/components/lib/sidebar/Sidebar.vue @@ -6,9 +6,9 @@