@govtechsg/sgds-web-component 3.13.2-rc.0 → 3.14.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Masthead/index.js +1 -1
- package/README.md +0 -6
- package/components/Breadcrumb/index.umd.min.js +5 -5
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Dropdown/dropdown-item.js +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +18 -18
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/Mainnav/mainnav-dropdown.js +1 -1
- package/components/Mainnav/mainnav-item.js +1 -1
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Mainnav/sgds-mainnav-dropdown.js +2 -2
- package/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/components/Masthead/index.umd.min.js +1 -1
- package/components/Masthead/index.umd.min.js.map +1 -1
- package/components/Masthead/masthead.js +1 -1
- package/components/OverflowMenu/index.umd.min.js +1 -1
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/Sidebar/index.umd.min.js +163 -89
- package/components/Sidebar/index.umd.min.js.map +1 -1
- package/components/Sidebar/sgds-sidebar-group.js.map +1 -1
- package/components/Sidebar/sgds-sidebar-section.d.ts +8 -7
- package/components/Sidebar/sgds-sidebar-section.js +28 -25
- package/components/Sidebar/sgds-sidebar-section.js.map +1 -1
- package/components/Sidebar/sgds-sidebar.d.ts +71 -3
- package/components/Sidebar/sgds-sidebar.js +104 -30
- package/components/Sidebar/sgds-sidebar.js.map +1 -1
- package/components/Sidebar/sidebar-item.js +1 -1
- package/components/Sidebar/sidebar-section.js +1 -1
- package/components/Sidebar/sidebar.js +1 -1
- package/components/index.umd.min.js +48 -30
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +1 -1
- package/css/utility.css +41 -0
- package/index.umd.min.js +64 -44
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/Dropdown/dropdown-item.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-item.js +1 -1
- package/react/components/Mainnav/mainnav-dropdown.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-dropdown.js +1 -1
- package/react/components/Mainnav/mainnav-item.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-item.js +1 -1
- package/react/components/Mainnav/mainnav.cjs.js +1 -1
- package/react/components/Mainnav/mainnav.js +1 -1
- package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js +2 -2
- package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-dropdown.js +2 -2
- package/react/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/react/components/Masthead/masthead.cjs.js +1 -1
- package/react/components/Masthead/masthead.js +1 -1
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-group.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js +27 -24
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-section.js +28 -25
- package/react/components/Sidebar/sgds-sidebar-section.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar.cjs.js +104 -30
- package/react/components/Sidebar/sgds-sidebar.cjs.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar.js +104 -30
- package/react/components/Sidebar/sgds-sidebar.js.map +1 -1
- package/react/components/Sidebar/sidebar-item.cjs.js +1 -1
- package/react/components/Sidebar/sidebar-item.js +1 -1
- package/react/components/Sidebar/sidebar-section.cjs.js +1 -1
- package/react/components/Sidebar/sidebar-section.js +1 -1
- package/react/components/Sidebar/sidebar.cjs.js +1 -1
- package/react/components/Sidebar/sidebar.js +1 -1
- package/react/index.cjs.js +8 -8
- package/react/index.d.ts +1 -1
- package/react/index.js +1 -1
- package/react/sidebar/index.cjs.js +3 -1
- package/react/sidebar/index.cjs.js.map +1 -1
- package/react/sidebar/index.js +3 -1
- package/react/sidebar/index.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-sidebar-group.js","sources":["../../../src/components/Sidebar/sgds-sidebar-group.ts"],"sourcesContent":["import { html } from \"lit\";\nimport {
|
|
1
|
+
{"version":3,"file":"sgds-sidebar-group.js","sources":["../../../src/components/Sidebar/sgds-sidebar-group.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport sidebarOptionStyle from \"./sidebar-item.css\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\n\nimport { SidebarElement } from \"../../base/sidebar-element\";\n\n/**\n * @summary Sidebar group represents a navigable parent item within the sidebar that can have nested children.\n * Groups support multiple levels of nesting and show nested items in a drawer overlay or submenu.\n * Groups can be used to organize related sidebar items into expanding/collapsing sections.\n *\n * Behavior varies by nesting level:\n * - Level 0 (root): Clicking opens drawer overlay showing all nested children. Keyboard: ArrowRight opens drawer.\n * - Level 1+ (nested): Clicking toggles submenu visibility. Keyboard: ArrowRight toggles submenu.\n *\n * @slot default - Insert sgds-sidebar-group or sgds-sidebar-item elements as nested children\n * @slot trailingIcon - Icon to display after the label text. A chevron is auto-appended.\n *\n */\nexport class SgdsSidebarGroup extends SidebarElement {\n static styles = [...SgdsElement.styles, sidebarOptionStyle];\n\n /** @internal */\n static dependencies = {\n \"sgds-icon\": SgdsIcon\n };\n\n /**\n * Manages submenu visibility state for nested groups.\n * When true, the submenu is displayed showing nested children.\n * When false, the submenu is hidden.\n * Only used for nested groups (level 1+). Root-level groups use drawer overlay instead.\n * @internal\n */\n @state() _showMenu = false;\n\n /**\n * Reports the visibility state of the submenu for nested groups.\n * Returns true when the submenu is displayed showing child items, false when hidden.\n * Only applicable for nested groups (level 1+). Root-level groups use drawer overlay instead.\n * @readonly\n * @type {boolean}\n */\n get showMenu(): boolean {\n return this._showMenu;\n }\n\n /** @internal */\n _handleClick(): void {\n if (this._childLevel !== 0) {\n this._showMenu = !this._showMenu;\n this._childElements.forEach(v => {\n v._hidden = !this._showMenu;\n });\n } else {\n super._handleClick();\n }\n }\n /**\n * Determines the appropriate chevron icon based on nesting level and menu visibility.\n * Icon changes provide visual feedback on expandable/collapsible state:\n * - Level 0: chevron-right (closed drawer) or chevron-right (no change - drawer controlled by parent)\n * - Level 1+: chevron-down (submenu open) or chevron-up (submenu closed)\n * @private\n * @returns {string} The icon name to display (e.g., 'chevron-right', 'chevron-down')\n */\n private getIcon() {\n if (this._childLevel === 0) {\n return \"chevron-right\";\n } else {\n return this._showMenu ? \"chevron-down\" : \"chevron-up\";\n }\n }\n\n render() {\n return html`\n <div\n class=${classMap({\n \"sidebar-item\": true,\n \"sidebar-item--collapsed\": this._sidebarCollapsed && this._childLevel === 0,\n active: this._selected\n })}\n @click=${() => this._handleClick()}\n aria-level=${this._childLevel}\n .aria-expanded=${this._showMenu}\n aria-label=${this.title || this.name}\n tabindex=${this._childLevel > 1 && !this._showMenu ? -1 : 0}\n >\n <div class=\"sidebar-item-label-wrapper\">\n <div>\n <slot name=\"leadingIcon\"></slot>\n <span class=\"sidebar-item-label\">${this.title}</span>\n </div>\n\n <span class=\"sidebar-item-trailingIcon\">\n <slot name=\"trailingIcon\"></slot>\n <sgds-icon name=${this.getIcon()} size=\"sm\"></sgds-icon>\n </span>\n </div>\n </div>\n\n <div\n class=${classMap({\n \"sidebar-submenu\": true,\n \"sidebar-submenu--collapsed\": this._sidebarCollapsed && this._childLevel == 0,\n show: this._showMenu\n })}\n >\n <div>\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsSidebarGroup;\n"],"names":["sidebarOptionStyle"],"mappings":";;;;;;;;;AASA;;;;;;;;;;;;AAYG;AACG,MAAO,gBAAiB,SAAQ,cAAc,CAAA;AAApD,IAAA,WAAA,GAAA;;AAQE;;;;;;AAMG;QACM,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;KAgF5B;AA9EC;;;;;;AAMG;AACH,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;;IAGD,YAAY,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,WAAW,KAAK,CAAC,EAAE;AAC1B,YAAA,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;AACjC,YAAA,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,IAAG;AAC9B,gBAAA,CAAC,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;AAC9B,aAAC,CAAC,CAAC;SACJ;aAAM;YACL,KAAK,CAAC,YAAY,EAAE,CAAC;SACtB;KACF;AACD;;;;;;;AAOG;IACK,OAAO,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,WAAW,KAAK,CAAC,EAAE;AAC1B,YAAA,OAAO,eAAe,CAAC;SACxB;aAAM;YACL,OAAO,IAAI,CAAC,SAAS,GAAG,cAAc,GAAG,YAAY,CAAC;SACvD;KACF;IAED,MAAM,GAAA;AACJ,QAAA,OAAO,IAAI,CAAA,CAAA;;AAEC,cAAA,EAAA,QAAQ,CAAC;AACf,YAAA,cAAc,EAAE,IAAI;YACpB,yBAAyB,EAAE,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,WAAW,KAAK,CAAC;YAC3E,MAAM,EAAE,IAAI,CAAC,SAAS;SACvB,CAAC,CAAA;AACO,eAAA,EAAA,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;AACrB,mBAAA,EAAA,IAAI,CAAC,WAAW,CAAA;AACZ,uBAAA,EAAA,IAAI,CAAC,SAAS,CAAA;AAClB,mBAAA,EAAA,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAA;AACzB,iBAAA,EAAA,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;;;;;AAKpB,6CAAA,EAAA,IAAI,CAAC,KAAK,CAAA;;;;;8BAK3B,IAAI,CAAC,OAAO,EAAE,CAAA;;;;;;AAM5B,cAAA,EAAA,QAAQ,CAAC;AACf,YAAA,iBAAiB,EAAE,IAAI;YACvB,4BAA4B,EAAE,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC;YAC7E,IAAI,EAAE,IAAI,CAAC,SAAS;SACrB,CAAC,CAAA;;;AAGoB,4BAAA,EAAA,IAAI,CAAC,iBAAiB,CAAA;;;KAG/C,CAAC;KACH;;AA7FM,gBAAM,CAAA,MAAA,GAAG,CAAC,GAAG,WAAW,CAAC,MAAM,EAAEA,QAAkB,CAA7C,CAA+C;AAE5D;AACO,gBAAA,CAAA,YAAY,GAAG;AACpB,IAAA,WAAW,EAAE,QAAQ;AACtB,CAFkB,CAEjB;AASO,UAAA,CAAA;AAAR,IAAA,KAAK,EAAE;AAAmB,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { SidebarElement } from "../../base/sidebar-element";
|
|
2
|
+
import SgdsIcon from "../Icon/sgds-icon";
|
|
3
|
+
import SgdsDivider from "../Divider/sgds-divider";
|
|
2
4
|
/**
|
|
3
5
|
* @summary Sidebar section is a container component that groups related sidebar items into organized sections.
|
|
4
6
|
* It displays a section header/title and can optionally be collapsible. Sections help organize navigation
|
|
@@ -8,6 +10,11 @@ import { SidebarElement } from "../../base/sidebar-element";
|
|
|
8
10
|
*/
|
|
9
11
|
export declare class SgdsSidebarSection extends SidebarElement {
|
|
10
12
|
static styles: import("lit").CSSResult[];
|
|
13
|
+
/** @internal */
|
|
14
|
+
static dependencies: {
|
|
15
|
+
"sgds-icon": typeof SgdsIcon;
|
|
16
|
+
"sgds-divider": typeof SgdsDivider;
|
|
17
|
+
};
|
|
11
18
|
/**
|
|
12
19
|
* The display title/label for the sidebar section header.
|
|
13
20
|
* Always visible in the sidebar, used to group related items.
|
|
@@ -34,13 +41,7 @@ export declare class SgdsSidebarSection extends SidebarElement {
|
|
|
34
41
|
* @default false
|
|
35
42
|
*/
|
|
36
43
|
collapsible: boolean;
|
|
37
|
-
|
|
38
|
-
* Tracks whether this section is the last child of its parent.
|
|
39
|
-
* Used to remove bottom border from the last section.
|
|
40
|
-
* @type {boolean}
|
|
41
|
-
* @internal
|
|
42
|
-
*/
|
|
43
|
-
private _isLastChild;
|
|
44
|
+
seperator: boolean;
|
|
44
45
|
connectedCallback(): void;
|
|
45
46
|
/**
|
|
46
47
|
* Handles click events on the section label.
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import { html, nothing } from 'lit';
|
|
3
|
-
import { property
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import SgdsElement from '../../base/sgds-element.js';
|
|
6
6
|
import css_248z from './sidebar-section.js';
|
|
7
7
|
import { SidebarElement } from '../../base/sidebar-element.js';
|
|
8
|
+
import { SgdsIcon } from '../Icon/sgds-icon.js';
|
|
9
|
+
import { SgdsDivider } from '../Divider/sgds-divider.js';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* @summary Sidebar section is a container component that groups related sidebar items into organized sections.
|
|
@@ -42,19 +44,11 @@ class SgdsSidebarSection extends SidebarElement {
|
|
|
42
44
|
* @default false
|
|
43
45
|
*/
|
|
44
46
|
this.collapsible = false;
|
|
45
|
-
|
|
46
|
-
* Tracks whether this section is the last child of its parent.
|
|
47
|
-
* Used to remove bottom border from the last section.
|
|
48
|
-
* @type {boolean}
|
|
49
|
-
* @internal
|
|
50
|
-
*/
|
|
51
|
-
this._isLastChild = false;
|
|
47
|
+
this.seperator = false;
|
|
52
48
|
}
|
|
53
49
|
connectedCallback() {
|
|
54
|
-
var _a;
|
|
55
50
|
super.connectedCallback();
|
|
56
51
|
this.setAttribute("role", "region");
|
|
57
|
-
this._isLastChild = ((_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.lastElementChild) === this;
|
|
58
52
|
this._childLevel = null;
|
|
59
53
|
}
|
|
60
54
|
/**
|
|
@@ -73,38 +67,47 @@ class SgdsSidebarSection extends SidebarElement {
|
|
|
73
67
|
<div
|
|
74
68
|
class=${classMap({
|
|
75
69
|
"sidebar-section": true,
|
|
76
|
-
"no-border": this._isLastChild,
|
|
77
70
|
"sidebar-section--collapsed": this._sidebarCollapsed
|
|
78
71
|
})}
|
|
79
72
|
>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
73
|
+
${this.title !== ""
|
|
74
|
+
? html `<div
|
|
75
|
+
class="sidebar-section-label"
|
|
76
|
+
@click=${this._handleClick}
|
|
77
|
+
aria-expanded=${!this.collapsed}
|
|
78
|
+
aria-disabled=${!this.collapsible}
|
|
79
|
+
tabindex="0"
|
|
80
|
+
>
|
|
81
|
+
<span>${this.title}</span>
|
|
82
|
+
${this.collapsible
|
|
83
|
+
? html `<sgds-icon name=${this.collapsed ? "chevron-down" : "chevron-up"} size="sm"></sgds-icon>`
|
|
84
|
+
: nothing}
|
|
85
|
+
</div>`
|
|
90
86
|
: nothing}
|
|
91
|
-
</div>
|
|
92
87
|
|
|
93
88
|
<div
|
|
94
89
|
class=${classMap({
|
|
95
90
|
"sidebar-section-content": true,
|
|
96
|
-
"sidebar-section-content--collapsed": this.collapsed && this.collapsible
|
|
91
|
+
"sidebar-section-content--collapsed": this.collapsed && this.collapsible,
|
|
92
|
+
"sidebar-section-seperator": this.seperator
|
|
97
93
|
})}
|
|
98
94
|
>
|
|
99
95
|
<div>
|
|
100
96
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
101
97
|
</div>
|
|
102
98
|
</div>
|
|
99
|
+
|
|
100
|
+
${this.seperator ? html `<sgds-divider></sgds-divider>` : nothing}
|
|
103
101
|
</div>
|
|
104
102
|
`;
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
105
|
SgdsSidebarSection.styles = [...SgdsElement.styles, css_248z];
|
|
106
|
+
/** @internal */
|
|
107
|
+
SgdsSidebarSection.dependencies = {
|
|
108
|
+
"sgds-icon": SgdsIcon,
|
|
109
|
+
"sgds-divider": SgdsDivider
|
|
110
|
+
};
|
|
108
111
|
__decorate([
|
|
109
112
|
property({ type: String, reflect: true })
|
|
110
113
|
], SgdsSidebarSection.prototype, "title", void 0);
|
|
@@ -115,8 +118,8 @@ __decorate([
|
|
|
115
118
|
property({ type: Boolean, reflect: true })
|
|
116
119
|
], SgdsSidebarSection.prototype, "collapsible", void 0);
|
|
117
120
|
__decorate([
|
|
118
|
-
|
|
119
|
-
], SgdsSidebarSection.prototype, "
|
|
121
|
+
property({ type: Boolean, reflect: true })
|
|
122
|
+
], SgdsSidebarSection.prototype, "seperator", void 0);
|
|
120
123
|
|
|
121
124
|
export { SgdsSidebarSection, SgdsSidebarSection as default };
|
|
122
125
|
//# sourceMappingURL=sgds-sidebar-section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-sidebar-section.js","sources":["../../../src/components/Sidebar/sgds-sidebar-section.ts"],"sourcesContent":["import { html, nothing } from \"lit\";\nimport { property
|
|
1
|
+
{"version":3,"file":"sgds-sidebar-section.js","sources":["../../../src/components/Sidebar/sgds-sidebar-section.ts"],"sourcesContent":["import { html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport sidebarSectionStyle from \"./sidebar-section.css\";\n\nimport { SidebarElement } from \"../../base/sidebar-element\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport SgdsDivider from \"../Divider/sgds-divider\";\n\n/**\n * @summary Sidebar section is a container component that groups related sidebar items into organized sections.\n * It displays a section header/title and can optionally be collapsible. Sections help organize navigation\n * items hierarchically within the sidebar, providing visual separation between different areas of functionality.\n *\n * @slot - Insert sgds-sidebar-item and sgds-sidebar-group elements to be grouped within this section\n */\nexport class SgdsSidebarSection extends SidebarElement {\n static styles = [...SgdsElement.styles, sidebarSectionStyle];\n\n /** @internal */\n static dependencies = {\n \"sgds-icon\": SgdsIcon,\n \"sgds-divider\": SgdsDivider\n };\n\n /**\n * The display title/label for the sidebar section header.\n * Always visible in the sidebar, used to group related items.\n * @attribute title\n * @type {string}\n * @default \"\"\n */\n @property({ type: String, reflect: true }) title = \"\";\n\n /**\n * Controls whether the section content is expanded or collapsed.\n * When true, the section content is hidden but the section header remains visible.\n * Only applicable when the section is collapsible.\n * @attribute collapsed\n * @type {boolean}\n * @default false\n */\n @property({ type: Boolean, reflect: true }) collapsed = false;\n\n /**\n * Enables a collapsible section header with expand/collapse toggle functionality.\n * When true, users can click the header to toggle section visibility.\n * When false, the section header is display-only and not interactive.\n * @attribute collapsible\n * @type {boolean}\n * @default false\n */\n @property({ type: Boolean, reflect: true }) collapsible = false;\n @property({ type: Boolean, reflect: true }) seperator = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute(\"role\", \"region\");\n this._childLevel = null;\n }\n\n /**\n * Handles click events on the section label.\n * Toggles the collapsed state to show/hide section content.\n * Only called if the section is collapsible (collapsible prop is true).\n * @private\n * @returns {void}\n */\n override _handleClick() {\n if (this.collapsible) this.collapsed = !this.collapsed;\n }\n\n render() {\n return html`\n <div\n class=${classMap({\n \"sidebar-section\": true,\n \"sidebar-section--collapsed\": this._sidebarCollapsed\n })}\n >\n ${this.title !== \"\"\n ? html`<div\n class=\"sidebar-section-label\"\n @click=${this._handleClick}\n aria-expanded=${!this.collapsed}\n aria-disabled=${!this.collapsible}\n tabindex=\"0\"\n >\n <span>${this.title}</span>\n ${this.collapsible\n ? html`<sgds-icon name=${this.collapsed ? \"chevron-down\" : \"chevron-up\"} size=\"sm\"></sgds-icon>`\n : nothing}\n </div>`\n : nothing}\n\n <div\n class=${classMap({\n \"sidebar-section-content\": true,\n \"sidebar-section-content--collapsed\": this.collapsed && this.collapsible,\n \"sidebar-section-seperator\": this.seperator\n })}\n >\n <div>\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n </div>\n\n ${this.seperator ? html`<sgds-divider></sgds-divider>` : nothing}\n </div>\n `;\n }\n}\n\nexport default SgdsSidebarSection;\n"],"names":["sidebarSectionStyle"],"mappings":"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"}
|
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
import SgdsElement from "../../base/sgds-element";
|
|
2
2
|
import SgdsSidebarGroup from "./sgds-sidebar-group";
|
|
3
|
+
import SgdsIconButton from "../IconButton/sgds-icon-button";
|
|
4
|
+
/**
|
|
5
|
+
* @summary Sidebar is a collapsible navigation component that displays menu items and groups.
|
|
6
|
+
* Users can expand and collapse the sidebar to save screen space while navigating through organized menu items.
|
|
7
|
+
* The sidebar coordinates selection and navigation across nested items using context providers and custom events.
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Collapsible state for space-saving layouts with icon-only mode
|
|
11
|
+
* - Multi-level nesting (up to 3 levels) with drawer overlay for root-level groups
|
|
12
|
+
* - Keyboard navigation with full ARIA support for accessibility
|
|
13
|
+
* - Programmatic link navigation support with anchor elements
|
|
14
|
+
* - Active item tracking and synchronized state management
|
|
15
|
+
*
|
|
16
|
+
* Keyboard Navigation:
|
|
17
|
+
* - Arrow Up/Down: Navigate between sidebar items and groups
|
|
18
|
+
* - Arrow Left/Right: Collapse/expand groups or navigate drawer overlays
|
|
19
|
+
* - Enter/Space: Activate focused item or toggle group
|
|
20
|
+
* - Tab: Standard focus management to interactive elements
|
|
21
|
+
*
|
|
22
|
+
* @slot default - Insert sgds-sidebar-item, sgds-sidebar-group, and sgds-sidebar-section elements
|
|
23
|
+
* @slot top - Insert brand/logo content in sidebar header
|
|
24
|
+
* @slot bottom - Insert content in sidebar footer
|
|
25
|
+
*
|
|
26
|
+
* @fires sgds-select - Emitted when a sidebar item or group is selected.
|
|
27
|
+
* Event detail: { activeItem: string } - name of the selected item
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
3
30
|
export declare class SgdsSidebar extends SgdsElement {
|
|
4
31
|
static styles: import("lit").CSSResult[];
|
|
32
|
+
static dependencies: {
|
|
33
|
+
"sgds-icon-button": typeof SgdsIconButton;
|
|
34
|
+
};
|
|
5
35
|
/**
|
|
6
36
|
* Controls whether the sidebar is collapsed or expanded.
|
|
7
37
|
* When true, the sidebar is in collapsed state showing only icons.
|
|
@@ -34,8 +64,17 @@ export declare class SgdsSidebar extends SgdsElement {
|
|
|
34
64
|
private _showDrawer;
|
|
35
65
|
/** @internal */
|
|
36
66
|
private _defaultNodes;
|
|
67
|
+
/** @internal */
|
|
68
|
+
private _isMobile;
|
|
37
69
|
connectedCallback(): void;
|
|
38
70
|
disconnectedCallback(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Watch handler for the collapsed property.
|
|
73
|
+
* Syncs the internal collapsed state with the property value.
|
|
74
|
+
* Triggers re-render and updates all child items' collapsed styling.
|
|
75
|
+
* @private
|
|
76
|
+
* @returns {void}
|
|
77
|
+
*/
|
|
39
78
|
_handleCollapsed(): void;
|
|
40
79
|
/**
|
|
41
80
|
* Handles changes to the active item selection.
|
|
@@ -46,8 +85,29 @@ export declare class SgdsSidebar extends SgdsElement {
|
|
|
46
85
|
* @returns {void}
|
|
47
86
|
*/
|
|
48
87
|
_handleActiveItem(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Watch handler for the active property.
|
|
90
|
+
* Finds and sets the active item by name from the sidebar hierarchy.
|
|
91
|
+
* Clears active state when active property is empty.
|
|
92
|
+
* @private
|
|
93
|
+
* @returns {void}
|
|
94
|
+
*/
|
|
49
95
|
_handleActive(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Recursively searches the sidebar hierarchy for an item matching the active name.
|
|
98
|
+
* Traverses through all nested levels to find the target element.
|
|
99
|
+
* Used to support programmatic selection of deeply nested items.
|
|
100
|
+
* @private
|
|
101
|
+
* @returns {SidebarElement | null} The matching sidebar element or null if not found
|
|
102
|
+
*/
|
|
50
103
|
private _getActiveChild;
|
|
104
|
+
/**
|
|
105
|
+
* Handles window resize events to manage responsive behavior.
|
|
106
|
+
* Automatically collapses sidebar on mobile devices (width <= SM_BREAKPOINT).
|
|
107
|
+
* Expands sidebar on larger screens.
|
|
108
|
+
* @private
|
|
109
|
+
* @returns {void}
|
|
110
|
+
*/ private _handleResize;
|
|
51
111
|
/**
|
|
52
112
|
* Manages the drawer overlay content based on the selected parent item.
|
|
53
113
|
* If element is provided: Opens drawer for that element's children.
|
|
@@ -76,12 +136,20 @@ export declare class SgdsSidebar extends SgdsElement {
|
|
|
76
136
|
private addItemListeners;
|
|
77
137
|
/**
|
|
78
138
|
* Toggles the sidebar between collapsed and expanded states.
|
|
79
|
-
* Updates the collapsed property and
|
|
80
|
-
*
|
|
81
|
-
* @
|
|
139
|
+
* Updates the collapsed property to show/hide labels and adjust item spacing.
|
|
140
|
+
* Called when user clicks the collapse/expand button in the sidebar header.
|
|
141
|
+
* @private
|
|
82
142
|
* @returns {void}
|
|
83
143
|
*/
|
|
84
144
|
private toggleCollapsed;
|
|
145
|
+
/**
|
|
146
|
+
* Handles clicks outside the sidebar to close the drawer overlay.
|
|
147
|
+
* Closes the nested items drawer when user clicks outside the sidebar.
|
|
148
|
+
* Maintains drawer visibility when clicking within sidebar boundaries.
|
|
149
|
+
* @private
|
|
150
|
+
* @param {MouseEvent} e - The click event from the document
|
|
151
|
+
* @returns {void}
|
|
152
|
+
*/
|
|
85
153
|
private _handleClickOutOfElement;
|
|
86
154
|
render(): import("lit").TemplateResult<1>;
|
|
87
155
|
}
|
|
@@ -7,7 +7,10 @@ import css_248z from './sidebar.js';
|
|
|
7
7
|
import { provide } from '@lit/context';
|
|
8
8
|
import { SidebarActiveGroup, SidebarCollapsed, SidebarActiveItem, SidebarDrawerItems, SidebarDrawerOpen } from './sidebar-context.js';
|
|
9
9
|
import { watch } from '../../utils/watch.js';
|
|
10
|
+
import { SgdsIconButton } from '../IconButton/sgds-icon-button.js';
|
|
11
|
+
import { SM_BREAKPOINT } from '../../utils/breakpoints.js';
|
|
10
12
|
|
|
13
|
+
const SGDS_SIDEBAR_GROUP = "sgds-sidebar-group";
|
|
11
14
|
/**
|
|
12
15
|
* @summary Sidebar is a collapsible navigation component that displays menu items and groups.
|
|
13
16
|
* Users can expand and collapse the sidebar to save screen space while navigating through organized menu items.
|
|
@@ -26,14 +29,14 @@ import { watch } from '../../utils/watch.js';
|
|
|
26
29
|
* - Enter/Space: Activate focused item or toggle group
|
|
27
30
|
* - Tab: Standard focus management to interactive elements
|
|
28
31
|
*
|
|
29
|
-
* @slot - Insert sgds-sidebar-item, sgds-sidebar-group, and sgds-sidebar-section elements
|
|
30
|
-
* @slot
|
|
32
|
+
* @slot default - Insert sgds-sidebar-item, sgds-sidebar-group, and sgds-sidebar-section elements
|
|
33
|
+
* @slot top - Insert brand/logo content in sidebar header
|
|
34
|
+
* @slot bottom - Insert content in sidebar footer
|
|
31
35
|
*
|
|
32
36
|
* @fires sgds-select - Emitted when a sidebar item or group is selected.
|
|
33
37
|
* Event detail: { activeItem: string } - name of the selected item
|
|
34
38
|
*
|
|
35
39
|
*/
|
|
36
|
-
const SGDS_SIDEBAR_GROUP = "sgds-sidebar-group";
|
|
37
40
|
class SgdsSidebar extends SgdsElement {
|
|
38
41
|
constructor() {
|
|
39
42
|
super(...arguments);
|
|
@@ -65,6 +68,16 @@ class SgdsSidebar extends SgdsElement {
|
|
|
65
68
|
this._drawerItems = [];
|
|
66
69
|
/** @internal Indicates whether a drawer overlay is currently open */
|
|
67
70
|
this._showDrawer = false;
|
|
71
|
+
/** @internal */
|
|
72
|
+
this._isMobile = false;
|
|
73
|
+
/**
|
|
74
|
+
* Handles clicks outside the sidebar to close the drawer overlay.
|
|
75
|
+
* Closes the nested items drawer when user clicks outside the sidebar.
|
|
76
|
+
* Maintains drawer visibility when clicking within sidebar boundaries.
|
|
77
|
+
* @private
|
|
78
|
+
* @param {MouseEvent} e - The click event from the document
|
|
79
|
+
* @returns {void}
|
|
80
|
+
*/
|
|
68
81
|
this._handleClickOutOfElement = (e) => {
|
|
69
82
|
if (!this._sidebarActiveGroup)
|
|
70
83
|
return;
|
|
@@ -82,11 +95,21 @@ class SgdsSidebar extends SgdsElement {
|
|
|
82
95
|
this._handleActive();
|
|
83
96
|
document.addEventListener("click", this._handleClickOutOfElement);
|
|
84
97
|
});
|
|
98
|
+
window.addEventListener("resize", this._handleResize.bind(this));
|
|
99
|
+
this._handleResize();
|
|
85
100
|
}
|
|
86
101
|
disconnectedCallback() {
|
|
87
102
|
super.disconnectedCallback();
|
|
88
103
|
document.removeEventListener("click", this._handleClickOutOfElement);
|
|
104
|
+
window.removeEventListener("resize", this._handleResize.bind(this));
|
|
89
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Watch handler for the collapsed property.
|
|
108
|
+
* Syncs the internal collapsed state with the property value.
|
|
109
|
+
* Triggers re-render and updates all child items' collapsed styling.
|
|
110
|
+
* @private
|
|
111
|
+
* @returns {void}
|
|
112
|
+
*/
|
|
90
113
|
_handleCollapsed() {
|
|
91
114
|
this._sidebarCollapsed = this.collapsed;
|
|
92
115
|
}
|
|
@@ -133,6 +156,13 @@ class SgdsSidebar extends SgdsElement {
|
|
|
133
156
|
}
|
|
134
157
|
}
|
|
135
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Watch handler for the active property.
|
|
161
|
+
* Finds and sets the active item by name from the sidebar hierarchy.
|
|
162
|
+
* Clears active state when active property is empty.
|
|
163
|
+
* @private
|
|
164
|
+
* @returns {void}
|
|
165
|
+
*/
|
|
136
166
|
_handleActive() {
|
|
137
167
|
// Return early if active is empty
|
|
138
168
|
if (!this.active) {
|
|
@@ -141,6 +171,13 @@ class SgdsSidebar extends SgdsElement {
|
|
|
141
171
|
}
|
|
142
172
|
this._sidebarActiveItem = this._getActiveChild();
|
|
143
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Recursively searches the sidebar hierarchy for an item matching the active name.
|
|
176
|
+
* Traverses through all nested levels to find the target element.
|
|
177
|
+
* Used to support programmatic selection of deeply nested items.
|
|
178
|
+
* @private
|
|
179
|
+
* @returns {SidebarElement | null} The matching sidebar element or null if not found
|
|
180
|
+
*/
|
|
144
181
|
_getActiveChild() {
|
|
145
182
|
const findByName = (elements) => {
|
|
146
183
|
var _a;
|
|
@@ -158,6 +195,19 @@ class SgdsSidebar extends SgdsElement {
|
|
|
158
195
|
};
|
|
159
196
|
return findByName(this._defaultNodes);
|
|
160
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* Handles window resize events to manage responsive behavior.
|
|
200
|
+
* Automatically collapses sidebar on mobile devices (width <= SM_BREAKPOINT).
|
|
201
|
+
* Expands sidebar on larger screens.
|
|
202
|
+
* @private
|
|
203
|
+
* @returns {void}
|
|
204
|
+
*/ _handleResize() {
|
|
205
|
+
const isMobile = window.innerWidth <= SM_BREAKPOINT;
|
|
206
|
+
if (isMobile !== this._isMobile) {
|
|
207
|
+
this._isMobile = isMobile;
|
|
208
|
+
this.collapsed = this._isMobile;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
161
211
|
/**
|
|
162
212
|
* Manages the drawer overlay content based on the selected parent item.
|
|
163
213
|
* If element is provided: Opens drawer for that element's children.
|
|
@@ -239,9 +289,9 @@ class SgdsSidebar extends SgdsElement {
|
|
|
239
289
|
}
|
|
240
290
|
/**
|
|
241
291
|
* Toggles the sidebar between collapsed and expanded states.
|
|
242
|
-
* Updates the collapsed property and
|
|
243
|
-
*
|
|
244
|
-
* @
|
|
292
|
+
* Updates the collapsed property to show/hide labels and adjust item spacing.
|
|
293
|
+
* Called when user clicks the collapse/expand button in the sidebar header.
|
|
294
|
+
* @private
|
|
245
295
|
* @returns {void}
|
|
246
296
|
*/
|
|
247
297
|
toggleCollapsed() {
|
|
@@ -257,44 +307,65 @@ class SgdsSidebar extends SgdsElement {
|
|
|
257
307
|
"sidebar--collapsed": this._sidebarCollapsed
|
|
258
308
|
})}
|
|
259
309
|
>
|
|
260
|
-
<div class="sidebar-
|
|
261
|
-
<div class="sidebar-
|
|
262
|
-
<div class="sidebar-
|
|
263
|
-
<
|
|
310
|
+
<div class="sidebar-main">
|
|
311
|
+
<div class="sidebar-wrapper">
|
|
312
|
+
<div class="sidebar-top">
|
|
313
|
+
<div class="sidebar-brand-name">
|
|
314
|
+
<slot name="top"></slot>
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<sgds-icon-button
|
|
318
|
+
name=${this._sidebarCollapsed ? "sidebar-expand" : "sidebar-collapse"}
|
|
319
|
+
variant="ghost"
|
|
320
|
+
tone="neutral"
|
|
321
|
+
size="sm"
|
|
322
|
+
@click=${this.toggleCollapsed}
|
|
323
|
+
aria-label=${this._sidebarCollapsed ? "Expand sidebar" : "Collapse sidebar"}
|
|
324
|
+
aria-expanded=${!this._sidebarCollapsed}
|
|
325
|
+
></sgds-icon-button>
|
|
264
326
|
</div>
|
|
265
327
|
|
|
266
|
-
<
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
></sgds-icon-button>
|
|
275
|
-
</div>
|
|
328
|
+
<nav
|
|
329
|
+
class="sidebar-content"
|
|
330
|
+
role="navigation"
|
|
331
|
+
aria-label="Main navigation"
|
|
332
|
+
aria-activedescendant=${((_a = this._sidebarActiveItem) === null || _a === void 0 ? void 0 : _a.name) || ""}
|
|
333
|
+
>
|
|
334
|
+
<slot></slot>
|
|
335
|
+
</nav>
|
|
276
336
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
</nav>
|
|
337
|
+
<slot name="bottom"></slot>
|
|
338
|
+
</div>
|
|
280
339
|
</div>
|
|
281
340
|
|
|
282
|
-
|
|
283
|
-
|
|
341
|
+
<div
|
|
342
|
+
class=${classMap({
|
|
284
343
|
"sidebar-nested-overlay": true,
|
|
285
344
|
show: this._showDrawer
|
|
286
345
|
})}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
346
|
+
role="dialog"
|
|
347
|
+
aria-label=${((_b = this._sidebarActiveGroup) === null || _b === void 0 ? void 0 : _b.title) ? `Nested items for ${this._sidebarActiveGroup.title}` : ""}
|
|
348
|
+
>
|
|
349
|
+
<sgds-icon-button
|
|
350
|
+
name="chevron-left"
|
|
351
|
+
variant="ghost"
|
|
352
|
+
tone="neutral"
|
|
353
|
+
size="sm"
|
|
354
|
+
@click=${() => (this._showDrawer = false)}
|
|
355
|
+
aria-label=${"Close drawer"}
|
|
356
|
+
aria-expanded=${this._showDrawer}
|
|
357
|
+
></sgds-icon-button>
|
|
358
|
+
|
|
359
|
+
${this._drawerItems}
|
|
292
360
|
</div>
|
|
293
361
|
</div>
|
|
294
362
|
`;
|
|
295
363
|
}
|
|
296
364
|
}
|
|
297
365
|
SgdsSidebar.styles = [...SgdsElement.styles, css_248z];
|
|
366
|
+
SgdsSidebar.dependencies = {
|
|
367
|
+
"sgds-icon-button": SgdsIconButton
|
|
368
|
+
};
|
|
298
369
|
__decorate([
|
|
299
370
|
property({ type: Boolean, reflect: true })
|
|
300
371
|
], SgdsSidebar.prototype, "collapsed", void 0);
|
|
@@ -324,6 +395,9 @@ __decorate([
|
|
|
324
395
|
__decorate([
|
|
325
396
|
queryAssignedElements()
|
|
326
397
|
], SgdsSidebar.prototype, "_defaultNodes", void 0);
|
|
398
|
+
__decorate([
|
|
399
|
+
state()
|
|
400
|
+
], SgdsSidebar.prototype, "_isMobile", void 0);
|
|
327
401
|
__decorate([
|
|
328
402
|
watch("collapsed")
|
|
329
403
|
], SgdsSidebar.prototype, "_handleCollapsed", null);
|