@govtechsg/sgds-web-component 3.13.0-rc.0 → 3.13.1

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.
Files changed (174) hide show
  1. package/Masthead/index.js +2 -2
  2. package/base/card.js +1 -1
  3. package/components/Card/index.umd.min.js +1 -1
  4. package/components/Card/index.umd.min.js.map +1 -1
  5. package/components/Drawer/drawer.js +1 -1
  6. package/components/Drawer/index.umd.min.js +17 -11
  7. package/components/Drawer/index.umd.min.js.map +1 -1
  8. package/components/Drawer/sgds-drawer.js +12 -6
  9. package/components/Drawer/sgds-drawer.js.map +1 -1
  10. package/components/IconCard/icon-card.js +1 -1
  11. package/components/IconCard/index.umd.min.js +1 -1
  12. package/components/IconCard/index.umd.min.js.map +1 -1
  13. package/components/ImageCard/image-card.js +1 -1
  14. package/components/ImageCard/index.umd.min.js +1 -1
  15. package/components/ImageCard/index.umd.min.js.map +1 -1
  16. package/components/Mainnav/index.umd.min.js +3 -3
  17. package/components/Mainnav/index.umd.min.js.map +1 -1
  18. package/components/Mainnav/mainnav-dropdown.js +1 -1
  19. package/components/Mainnav/mainnav-item.js +1 -1
  20. package/components/Mainnav/mainnav.js +1 -1
  21. package/components/Masthead/index.umd.min.js +2 -2
  22. package/components/Masthead/index.umd.min.js.map +1 -1
  23. package/components/Masthead/masthead.js +1 -1
  24. package/components/Masthead/sgds-masthead.js +1 -1
  25. package/components/Masthead/sgds-masthead.js.map +1 -1
  26. package/components/SystemBanner/index.umd.min.js +10 -9
  27. package/components/SystemBanner/index.umd.min.js.map +1 -1
  28. package/components/SystemBanner/sgds-system-banner-item.d.ts +2 -1
  29. package/components/SystemBanner/sgds-system-banner-item.js +7 -2
  30. package/components/SystemBanner/sgds-system-banner-item.js.map +1 -1
  31. package/components/SystemBanner/system-banner-item.js +1 -1
  32. package/components/SystemBanner/system-banner.js +1 -1
  33. package/components/ThumbnailCard/index.umd.min.js +1 -1
  34. package/components/ThumbnailCard/index.umd.min.js.map +1 -1
  35. package/components/ThumbnailCard/thumbnail-card.js +1 -1
  36. package/components/index.d.ts +0 -1
  37. package/components/index.js +0 -1
  38. package/components/index.js.map +1 -1
  39. package/components/index.umd.min.js +66 -95
  40. package/components/index.umd.min.js.map +1 -1
  41. package/css/fouc.css +2 -6
  42. package/css/utility.css +16 -2
  43. package/index.d.ts +0 -1
  44. package/index.js +0 -1
  45. package/index.js.map +1 -1
  46. package/index.umd.min.js +68 -172
  47. package/index.umd.min.js.map +1 -1
  48. package/package.json +1 -1
  49. package/react/base/card.cjs.js +1 -1
  50. package/react/base/card.js +1 -1
  51. package/react/components/Drawer/drawer.cjs.js +1 -1
  52. package/react/components/Drawer/drawer.js +1 -1
  53. package/react/components/Drawer/sgds-drawer.cjs.js +12 -6
  54. package/react/components/Drawer/sgds-drawer.cjs.js.map +1 -1
  55. package/react/components/Drawer/sgds-drawer.js +12 -6
  56. package/react/components/Drawer/sgds-drawer.js.map +1 -1
  57. package/react/components/IconCard/icon-card.cjs.js +1 -1
  58. package/react/components/IconCard/icon-card.js +1 -1
  59. package/react/components/ImageCard/image-card.cjs.js +1 -1
  60. package/react/components/ImageCard/image-card.js +1 -1
  61. package/react/components/Mainnav/mainnav-dropdown.cjs.js +1 -1
  62. package/react/components/Mainnav/mainnav-dropdown.js +1 -1
  63. package/react/components/Mainnav/mainnav-item.cjs.js +1 -1
  64. package/react/components/Mainnav/mainnav-item.js +1 -1
  65. package/react/components/Mainnav/mainnav.cjs.js +1 -1
  66. package/react/components/Mainnav/mainnav.js +1 -1
  67. package/react/components/Masthead/masthead.cjs.js +1 -1
  68. package/react/components/Masthead/masthead.js +1 -1
  69. package/react/components/Masthead/sgds-masthead.cjs.js +1 -1
  70. package/react/components/Masthead/sgds-masthead.cjs.js.map +1 -1
  71. package/react/components/Masthead/sgds-masthead.js +1 -1
  72. package/react/components/Masthead/sgds-masthead.js.map +1 -1
  73. package/react/components/SystemBanner/sgds-system-banner-item.cjs.js +7 -2
  74. package/react/components/SystemBanner/sgds-system-banner-item.cjs.js.map +1 -1
  75. package/react/components/SystemBanner/sgds-system-banner-item.js +7 -2
  76. package/react/components/SystemBanner/sgds-system-banner-item.js.map +1 -1
  77. package/react/components/SystemBanner/system-banner-item.cjs.js +1 -1
  78. package/react/components/SystemBanner/system-banner-item.js +1 -1
  79. package/react/components/SystemBanner/system-banner.cjs.js +1 -1
  80. package/react/components/SystemBanner/system-banner.js +1 -1
  81. package/react/components/ThumbnailCard/thumbnail-card.cjs.js +1 -1
  82. package/react/components/ThumbnailCard/thumbnail-card.js +1 -1
  83. package/react/index.cjs.js +60 -68
  84. package/react/index.cjs.js.map +1 -1
  85. package/react/index.d.ts +2 -6
  86. package/react/index.js +2 -6
  87. package/react/index.js.map +1 -1
  88. package/themes/day.css +1 -3
  89. package/themes/night.css +2 -2
  90. package/base/sidebar-element.d.ts +0 -112
  91. package/base/sidebar-element.js +0 -281
  92. package/base/sidebar-element.js.map +0 -1
  93. package/components/Sidebar/index.d.ts +0 -16
  94. package/components/Sidebar/index.js +0 -10
  95. package/components/Sidebar/index.js.map +0 -1
  96. package/components/Sidebar/index.umd.min.js +0 -2427
  97. package/components/Sidebar/index.umd.min.js.map +0 -1
  98. package/components/Sidebar/sgds-sidebar-group.d.ts +0 -51
  99. package/components/Sidebar/sgds-sidebar-group.js +0 -124
  100. package/components/Sidebar/sgds-sidebar-group.js.map +0 -1
  101. package/components/Sidebar/sgds-sidebar-item.d.ts +0 -25
  102. package/components/Sidebar/sgds-sidebar-item.js +0 -73
  103. package/components/Sidebar/sgds-sidebar-item.js.map +0 -1
  104. package/components/Sidebar/sgds-sidebar-section.d.ts +0 -55
  105. package/components/Sidebar/sgds-sidebar-section.js +0 -122
  106. package/components/Sidebar/sgds-sidebar-section.js.map +0 -1
  107. package/components/Sidebar/sgds-sidebar.d.ts +0 -88
  108. package/components/Sidebar/sgds-sidebar.js +0 -338
  109. package/components/Sidebar/sgds-sidebar.js.map +0 -1
  110. package/components/Sidebar/sidebar-context.d.ts +0 -51
  111. package/components/Sidebar/sidebar-context.js +0 -45
  112. package/components/Sidebar/sidebar-context.js.map +0 -1
  113. package/components/Sidebar/sidebar-item.js +0 -6
  114. package/components/Sidebar/sidebar-item.js.map +0 -1
  115. package/components/Sidebar/sidebar-section.js +0 -6
  116. package/components/Sidebar/sidebar-section.js.map +0 -1
  117. package/components/Sidebar/sidebar.js +0 -6
  118. package/components/Sidebar/sidebar.js.map +0 -1
  119. package/react/base/sidebar-element.cjs.js +0 -286
  120. package/react/base/sidebar-element.cjs.js.map +0 -1
  121. package/react/base/sidebar-element.js +0 -282
  122. package/react/base/sidebar-element.js.map +0 -1
  123. package/react/components/Sidebar/sgds-sidebar-group.cjs.js +0 -130
  124. package/react/components/Sidebar/sgds-sidebar-group.cjs.js.map +0 -1
  125. package/react/components/Sidebar/sgds-sidebar-group.js +0 -125
  126. package/react/components/Sidebar/sgds-sidebar-group.js.map +0 -1
  127. package/react/components/Sidebar/sgds-sidebar-item.cjs.js +0 -79
  128. package/react/components/Sidebar/sgds-sidebar-item.cjs.js.map +0 -1
  129. package/react/components/Sidebar/sgds-sidebar-item.js +0 -74
  130. package/react/components/Sidebar/sgds-sidebar-item.js.map +0 -1
  131. package/react/components/Sidebar/sgds-sidebar-section.cjs.js +0 -128
  132. package/react/components/Sidebar/sgds-sidebar-section.cjs.js.map +0 -1
  133. package/react/components/Sidebar/sgds-sidebar-section.js +0 -123
  134. package/react/components/Sidebar/sgds-sidebar-section.js.map +0 -1
  135. package/react/components/Sidebar/sgds-sidebar.cjs.js +0 -344
  136. package/react/components/Sidebar/sgds-sidebar.cjs.js.map +0 -1
  137. package/react/components/Sidebar/sgds-sidebar.js +0 -339
  138. package/react/components/Sidebar/sgds-sidebar.js.map +0 -1
  139. package/react/components/Sidebar/sidebar-context.cjs.js +0 -54
  140. package/react/components/Sidebar/sidebar-context.cjs.js.map +0 -1
  141. package/react/components/Sidebar/sidebar-context.js +0 -46
  142. package/react/components/Sidebar/sidebar-context.js.map +0 -1
  143. package/react/components/Sidebar/sidebar-item.cjs.js +0 -11
  144. package/react/components/Sidebar/sidebar-item.cjs.js.map +0 -1
  145. package/react/components/Sidebar/sidebar-item.js +0 -7
  146. package/react/components/Sidebar/sidebar-item.js.map +0 -1
  147. package/react/components/Sidebar/sidebar-section.cjs.js +0 -11
  148. package/react/components/Sidebar/sidebar-section.cjs.js.map +0 -1
  149. package/react/components/Sidebar/sidebar-section.js +0 -7
  150. package/react/components/Sidebar/sidebar-section.js.map +0 -1
  151. package/react/components/Sidebar/sidebar.cjs.js +0 -11
  152. package/react/components/Sidebar/sidebar.cjs.js.map +0 -1
  153. package/react/components/Sidebar/sidebar.js +0 -7
  154. package/react/components/Sidebar/sidebar.js.map +0 -1
  155. package/react/sidebar/index.cjs.js +0 -40
  156. package/react/sidebar/index.cjs.js.map +0 -1
  157. package/react/sidebar/index.d.ts +0 -2
  158. package/react/sidebar/index.js +0 -16
  159. package/react/sidebar/index.js.map +0 -1
  160. package/react/sidebar-group/index.cjs.js +0 -40
  161. package/react/sidebar-group/index.cjs.js.map +0 -1
  162. package/react/sidebar-group/index.d.ts +0 -2
  163. package/react/sidebar-group/index.js +0 -16
  164. package/react/sidebar-group/index.js.map +0 -1
  165. package/react/sidebar-item/index.cjs.js +0 -40
  166. package/react/sidebar-item/index.cjs.js.map +0 -1
  167. package/react/sidebar-item/index.d.ts +0 -2
  168. package/react/sidebar-item/index.js +0 -16
  169. package/react/sidebar-item/index.js.map +0 -1
  170. package/react/sidebar-section/index.cjs.js +0 -40
  171. package/react/sidebar-section/index.cjs.js.map +0 -1
  172. package/react/sidebar-section/index.d.ts +0 -2
  173. package/react/sidebar-section/index.js +0 -16
  174. package/react/sidebar-section/index.js.map +0 -1
@@ -1,51 +0,0 @@
1
- import SgdsIcon from "../Icon/sgds-icon";
2
- import { SidebarElement } from "../../base/sidebar-element";
3
- /**
4
- * @summary Sidebar group represents a navigable parent item within the sidebar that can have nested children.
5
- * Groups support multiple levels of nesting and show nested items in a drawer overlay or submenu.
6
- * Groups can be used to organize related sidebar items into expanding/collapsing sections.
7
- *
8
- * Behavior varies by nesting level:
9
- * - Level 0 (root): Clicking opens drawer overlay showing all nested children. Keyboard: ArrowRight opens drawer.
10
- * - Level 1+ (nested): Clicking toggles submenu visibility. Keyboard: ArrowRight toggles submenu.
11
- *
12
- * @slot default - Insert sgds-sidebar-group or sgds-sidebar-item elements as nested children
13
- * @slot trailingIcon - Icon to display after the label text. A chevron is auto-appended.
14
- *
15
- */
16
- export declare class SgdsSidebarGroup extends SidebarElement {
17
- static styles: import("lit").CSSResult[];
18
- /** @internal */
19
- static dependencies: {
20
- "sgds-icon": typeof SgdsIcon;
21
- };
22
- /**
23
- * Manages submenu visibility state for nested groups.
24
- * When true, the submenu is displayed showing nested children.
25
- * When false, the submenu is hidden.
26
- * Only used for nested groups (level 1+). Root-level groups use drawer overlay instead.
27
- * @internal
28
- */
29
- _showMenu: boolean;
30
- /**
31
- * Reports the visibility state of the submenu for nested groups.
32
- * Returns true when the submenu is displayed showing child items, false when hidden.
33
- * Only applicable for nested groups (level 1+). Root-level groups use drawer overlay instead.
34
- * @readonly
35
- * @type {boolean}
36
- */
37
- get showMenu(): boolean;
38
- /** @internal */
39
- _handleClick(): void;
40
- /**
41
- * Determines the appropriate chevron icon based on nesting level and menu visibility.
42
- * Icon changes provide visual feedback on expandable/collapsible state:
43
- * - Level 0: chevron-right (closed drawer) or chevron-right (no change - drawer controlled by parent)
44
- * - Level 1+: chevron-down (submenu open) or chevron-up (submenu closed)
45
- * @private
46
- * @returns {string} The icon name to display (e.g., 'chevron-right', 'chevron-down')
47
- */
48
- private getIcon;
49
- render(): import("lit").TemplateResult<1>;
50
- }
51
- export default SgdsSidebarGroup;
@@ -1,124 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { html } from 'lit';
3
- import { state } from 'lit/decorators.js';
4
- import { classMap } from 'lit/directives/class-map.js';
5
- import SgdsElement from '../../base/sgds-element.js';
6
- import css_248z from './sidebar-item.js';
7
- import { SgdsIcon } from '../Icon/sgds-icon.js';
8
- import { SidebarElement } from '../../base/sidebar-element.js';
9
-
10
- /**
11
- * @summary Sidebar group represents a navigable parent item within the sidebar that can have nested children.
12
- * Groups support multiple levels of nesting and show nested items in a drawer overlay or submenu.
13
- * Groups can be used to organize related sidebar items into expanding/collapsing sections.
14
- *
15
- * Behavior varies by nesting level:
16
- * - Level 0 (root): Clicking opens drawer overlay showing all nested children. Keyboard: ArrowRight opens drawer.
17
- * - Level 1+ (nested): Clicking toggles submenu visibility. Keyboard: ArrowRight toggles submenu.
18
- *
19
- * @slot default - Insert sgds-sidebar-group or sgds-sidebar-item elements as nested children
20
- * @slot trailingIcon - Icon to display after the label text. A chevron is auto-appended.
21
- *
22
- */
23
- class SgdsSidebarGroup extends SidebarElement {
24
- constructor() {
25
- super(...arguments);
26
- /**
27
- * Manages submenu visibility state for nested groups.
28
- * When true, the submenu is displayed showing nested children.
29
- * When false, the submenu is hidden.
30
- * Only used for nested groups (level 1+). Root-level groups use drawer overlay instead.
31
- * @internal
32
- */
33
- this._showMenu = false;
34
- }
35
- /**
36
- * Reports the visibility state of the submenu for nested groups.
37
- * Returns true when the submenu is displayed showing child items, false when hidden.
38
- * Only applicable for nested groups (level 1+). Root-level groups use drawer overlay instead.
39
- * @readonly
40
- * @type {boolean}
41
- */
42
- get showMenu() {
43
- return this._showMenu;
44
- }
45
- /** @internal */
46
- _handleClick() {
47
- if (this._childLevel !== 0) {
48
- this._showMenu = !this._showMenu;
49
- this._childElements.forEach(v => {
50
- v._hidden = !this._showMenu;
51
- });
52
- }
53
- else {
54
- super._handleClick();
55
- }
56
- }
57
- /**
58
- * Determines the appropriate chevron icon based on nesting level and menu visibility.
59
- * Icon changes provide visual feedback on expandable/collapsible state:
60
- * - Level 0: chevron-right (closed drawer) or chevron-right (no change - drawer controlled by parent)
61
- * - Level 1+: chevron-down (submenu open) or chevron-up (submenu closed)
62
- * @private
63
- * @returns {string} The icon name to display (e.g., 'chevron-right', 'chevron-down')
64
- */
65
- getIcon() {
66
- if (this._childLevel === 0) {
67
- return "chevron-right";
68
- }
69
- else {
70
- return this._showMenu ? "chevron-down" : "chevron-up";
71
- }
72
- }
73
- render() {
74
- return html `
75
- <div
76
- class=${classMap({
77
- "sidebar-item": true,
78
- "sidebar-item--collapsed": this._sidebarCollapsed && this._childLevel === 0,
79
- active: this._selected
80
- })}
81
- @click=${() => this._handleClick()}
82
- aria-level=${this._childLevel}
83
- .aria-expanded=${this._showMenu}
84
- aria-label=${this.title || this.name}
85
- tabindex=${this._childLevel > 1 && !this._showMenu ? -1 : 0}
86
- >
87
- <div class="sidebar-item-label-wrapper">
88
- <div>
89
- <slot name="leadingIcon"></slot>
90
- <span class="sidebar-item-label">${this.title}</span>
91
- </div>
92
-
93
- <span class="sidebar-item-trailingIcon">
94
- <slot name="trailingIcon"></slot>
95
- <sgds-icon name=${this.getIcon()} size="sm"></sgds-icon>
96
- </span>
97
- </div>
98
- </div>
99
-
100
- <div
101
- class=${classMap({
102
- "sidebar-submenu": true,
103
- "sidebar-submenu--collapsed": this._sidebarCollapsed && this._childLevel == 0,
104
- show: this._showMenu
105
- })}
106
- >
107
- <div>
108
- <slot @slotchange=${this._handleSlotChange}></slot>
109
- </div>
110
- </div>
111
- `;
112
- }
113
- }
114
- SgdsSidebarGroup.styles = [...SgdsElement.styles, css_248z];
115
- /** @internal */
116
- SgdsSidebarGroup.dependencies = {
117
- "sgds-icon": SgdsIcon
118
- };
119
- __decorate([
120
- state()
121
- ], SgdsSidebarGroup.prototype, "_showMenu", void 0);
122
-
123
- export { SgdsSidebarGroup, SgdsSidebarGroup as default };
124
- //# sourceMappingURL=sgds-sidebar-group.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sgds-sidebar-group.js","sources":["../../../src/components/Sidebar/sgds-sidebar-group.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, 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,25 +0,0 @@
1
- import { SidebarElement } from "../../base/sidebar-element";
2
- /**
3
- * @summary Sidebar item is a selectable navigation item within the sidebar component.
4
- * It can be used as a terminal leaf node in the navigation hierarchy (does not support nested children).
5
- * Items can optionally wrap anchor links for programmatic navigation to external URLs or routes.
6
- *
7
- * @slot default - Text content for the item label
8
- * @slot trailingIcon - Icon to display after the label text
9
- *
10
- * See SgdsSidebar for parent component usage and selection events.
11
- */
12
- export declare class SgdsSidebarItem extends SidebarElement {
13
- static styles: import("lit").CSSResult[];
14
- /**
15
- * The name of the icon to display before the item label.
16
- * Icon name corresponds to sgds-icon component icons.
17
- * When empty, no icon is displayed and spacing is adjusted.
18
- * @attribute icon
19
- * @type {string}
20
- * @default ""
21
- */
22
- icon: string;
23
- render(): import("lit").TemplateResult<1>;
24
- }
25
- export default SgdsSidebarItem;
@@ -1,73 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { html, nothing } from 'lit';
3
- import { property } from 'lit/decorators.js';
4
- import { classMap } from 'lit/directives/class-map.js';
5
- import SgdsElement from '../../base/sgds-element.js';
6
- import css_248z from './sidebar-item.js';
7
- import { SidebarElement } from '../../base/sidebar-element.js';
8
-
9
- /**
10
- * @summary Sidebar item is a selectable navigation item within the sidebar component.
11
- * It can be used as a terminal leaf node in the navigation hierarchy (does not support nested children).
12
- * Items can optionally wrap anchor links for programmatic navigation to external URLs or routes.
13
- *
14
- * @slot default - Text content for the item label
15
- * @slot trailingIcon - Icon to display after the label text
16
- *
17
- * See SgdsSidebar for parent component usage and selection events.
18
- */
19
- class SgdsSidebarItem extends SidebarElement {
20
- constructor() {
21
- super(...arguments);
22
- /**
23
- * The name of the icon to display before the item label.
24
- * Icon name corresponds to sgds-icon component icons.
25
- * When empty, no icon is displayed and spacing is adjusted.
26
- * @attribute icon
27
- * @type {string}
28
- * @default ""
29
- */
30
- this.icon = "";
31
- }
32
- render() {
33
- return html `
34
- <div
35
- class=${classMap({
36
- "sidebar-item": true,
37
- "sidebar-item--collapsed": this._sidebarCollapsed && this._childLevel === 0,
38
- active: this._selected
39
- })}
40
- @click=${() => this._handleClick()}
41
- aria-level=${this._childLevel}
42
- aria-label=${this.title || this.name}
43
- name=${this.name}
44
- tabindex=${this._hidden ? -1 : 0}
45
- role="button"
46
- >
47
- <div class="sidebar-item-label-wrapper">
48
- <div>
49
- ${this._childLevel <= 1 ? html `<slot name="leadingIcon"></slot>` : nothing}
50
- <span
51
- class=${classMap({
52
- "sidebar-item-label": true,
53
- offset: this._childLevel > 1
54
- })}
55
- >${this.title}</span
56
- >
57
- </div>
58
-
59
- <span class="sidebar-item-trailingIcon">
60
- <slot name="trailingIcon"></slot>
61
- </span>
62
- </div>
63
- </div>
64
- `;
65
- }
66
- }
67
- SgdsSidebarItem.styles = [...SgdsElement.styles, css_248z];
68
- __decorate([
69
- property({ type: String, reflect: true })
70
- ], SgdsSidebarItem.prototype, "icon", void 0);
71
-
72
- export { SgdsSidebarItem, SgdsSidebarItem as default };
73
- //# sourceMappingURL=sgds-sidebar-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sgds-sidebar-item.js","sources":["../../../src/components/Sidebar/sgds-sidebar-item.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 sidebarOptionStyle from \"./sidebar-item.css\";\n\nimport SgdsIcon from \"../Icon/sgds-icon\";\n\nimport { SidebarElement } from \"../../base/sidebar-element\";\n\n/**\n * @summary Sidebar item is a selectable navigation item within the sidebar component.\n * It can be used as a terminal leaf node in the navigation hierarchy (does not support nested children).\n * Items can optionally wrap anchor links for programmatic navigation to external URLs or routes.\n *\n * @slot default - Text content for the item label\n * @slot trailingIcon - Icon to display after the label text\n *\n * See SgdsSidebar for parent component usage and selection events.\n */\nexport class SgdsSidebarItem extends SidebarElement {\n static styles = [...SgdsElement.styles, sidebarOptionStyle];\n\n /**\n * The name of the icon to display before the item label.\n * Icon name corresponds to sgds-icon component icons.\n * When empty, no icon is displayed and spacing is adjusted.\n * @attribute icon\n * @type {string}\n * @default \"\"\n */\n @property({ type: String, reflect: true }) icon = \"\";\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-label=${this.title || this.name}\n name=${this.name}\n tabindex=${this._hidden ? -1 : 0}\n role=\"button\"\n >\n <div class=\"sidebar-item-label-wrapper\">\n <div>\n ${this._childLevel <= 1 ? html`<slot name=\"leadingIcon\"></slot>` : nothing}\n <span\n class=${classMap({\n \"sidebar-item-label\": true,\n offset: this._childLevel > 1\n })}\n >${this.title}</span\n >\n </div>\n\n <span class=\"sidebar-item-trailingIcon\">\n <slot name=\"trailingIcon\"></slot>\n </span>\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsSidebarItem;\n"],"names":["sidebarOptionStyle"],"mappings":";;;;;;;;AAUA;;;;;;;;;AASG;AACG,MAAO,eAAgB,SAAQ,cAAc,CAAA;AAAnD,IAAA,WAAA,GAAA;;AAGE;;;;;;;AAOG;QACwC,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;KAoCtD;IAlCC,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;AAChB,mBAAA,EAAA,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAA;AAC7B,aAAA,EAAA,IAAI,CAAC,IAAI,CAAA;mBACL,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;;;;;AAK1B,YAAA,EAAA,IAAI,CAAC,WAAW,IAAI,CAAC,GAAG,IAAI,CAAA,CAAA,gCAAA,CAAkC,GAAG,OAAO,CAAA;;AAEhE,oBAAA,EAAA,QAAQ,CAAC;AACf,YAAA,oBAAoB,EAAE,IAAI;AAC1B,YAAA,MAAM,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC;SAC7B,CAAC,CAAA;AACC,eAAA,EAAA,IAAI,CAAC,KAAK,CAAA;;;;;;;;;KAStB,CAAC;KACH;;AA7CM,eAAM,CAAA,MAAA,GAAG,CAAC,GAAG,WAAW,CAAC,MAAM,EAAEA,QAAkB,CAA7C,CAA+C;AAUjB,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAW,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
@@ -1,55 +0,0 @@
1
- import { SidebarElement } from "../../base/sidebar-element";
2
- /**
3
- * @summary Sidebar section is a container component that groups related sidebar items into organized sections.
4
- * It displays a section header/title and can optionally be collapsible. Sections help organize navigation
5
- * items hierarchically within the sidebar, providing visual separation between different areas of functionality.
6
- *
7
- * @slot - Insert sgds-sidebar-item and sgds-sidebar-group elements to be grouped within this section
8
- */
9
- export declare class SgdsSidebarSection extends SidebarElement {
10
- static styles: import("lit").CSSResult[];
11
- /**
12
- * The display title/label for the sidebar section header.
13
- * Always visible in the sidebar, used to group related items.
14
- * @attribute title
15
- * @type {string}
16
- * @default ""
17
- */
18
- title: string;
19
- /**
20
- * Controls whether the section content is expanded or collapsed.
21
- * When true, the section content is hidden but the section header remains visible.
22
- * Only applicable when the section is collapsible.
23
- * @attribute collapsed
24
- * @type {boolean}
25
- * @default false
26
- */
27
- collapsed: boolean;
28
- /**
29
- * Enables a collapsible section header with expand/collapse toggle functionality.
30
- * When true, users can click the header to toggle section visibility.
31
- * When false, the section header is display-only and not interactive.
32
- * @attribute collapsible
33
- * @type {boolean}
34
- * @default false
35
- */
36
- 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
- connectedCallback(): void;
45
- /**
46
- * Handles click events on the section label.
47
- * Toggles the collapsed state to show/hide section content.
48
- * Only called if the section is collapsible (collapsible prop is true).
49
- * @private
50
- * @returns {void}
51
- */
52
- _handleClick(): void;
53
- render(): import("lit").TemplateResult<1>;
54
- }
55
- export default SgdsSidebarSection;
@@ -1,122 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { html, nothing } from 'lit';
3
- import { property, state } from 'lit/decorators.js';
4
- import { classMap } from 'lit/directives/class-map.js';
5
- import SgdsElement from '../../base/sgds-element.js';
6
- import css_248z from './sidebar-section.js';
7
- import { SidebarElement } from '../../base/sidebar-element.js';
8
-
9
- /**
10
- * @summary Sidebar section is a container component that groups related sidebar items into organized sections.
11
- * It displays a section header/title and can optionally be collapsible. Sections help organize navigation
12
- * items hierarchically within the sidebar, providing visual separation between different areas of functionality.
13
- *
14
- * @slot - Insert sgds-sidebar-item and sgds-sidebar-group elements to be grouped within this section
15
- */
16
- class SgdsSidebarSection extends SidebarElement {
17
- constructor() {
18
- super(...arguments);
19
- /**
20
- * The display title/label for the sidebar section header.
21
- * Always visible in the sidebar, used to group related items.
22
- * @attribute title
23
- * @type {string}
24
- * @default ""
25
- */
26
- this.title = "";
27
- /**
28
- * Controls whether the section content is expanded or collapsed.
29
- * When true, the section content is hidden but the section header remains visible.
30
- * Only applicable when the section is collapsible.
31
- * @attribute collapsed
32
- * @type {boolean}
33
- * @default false
34
- */
35
- this.collapsed = false;
36
- /**
37
- * Enables a collapsible section header with expand/collapse toggle functionality.
38
- * When true, users can click the header to toggle section visibility.
39
- * When false, the section header is display-only and not interactive.
40
- * @attribute collapsible
41
- * @type {boolean}
42
- * @default false
43
- */
44
- 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;
52
- }
53
- connectedCallback() {
54
- var _a;
55
- super.connectedCallback();
56
- this.setAttribute("role", "region");
57
- this._isLastChild = ((_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.lastElementChild) === this;
58
- this._childLevel = null;
59
- }
60
- /**
61
- * Handles click events on the section label.
62
- * Toggles the collapsed state to show/hide section content.
63
- * Only called if the section is collapsible (collapsible prop is true).
64
- * @private
65
- * @returns {void}
66
- */
67
- _handleClick() {
68
- if (this.collapsible)
69
- this.collapsed = !this.collapsed;
70
- }
71
- render() {
72
- return html `
73
- <div
74
- class=${classMap({
75
- "sidebar-section": true,
76
- "no-border": this._isLastChild,
77
- "sidebar-section--collapsed": this._sidebarCollapsed
78
- })}
79
- >
80
- <div
81
- class="sidebar-section-label"
82
- @click=${this._handleClick}
83
- aria-expanded=${!this.collapsed}
84
- aria-disabled=${!this.collapsible}
85
- tabindex="0"
86
- >
87
- <span>${this.title}</span>
88
- ${this.collapsible
89
- ? html `<sgds-icon name=${this.collapsed ? "chevron-down" : "chevron-up"} size="sm"></sgds-icon>`
90
- : nothing}
91
- </div>
92
-
93
- <div
94
- class=${classMap({
95
- "sidebar-section-content": true,
96
- "sidebar-section-content--collapsed": this.collapsed && this.collapsible
97
- })}
98
- >
99
- <div>
100
- <slot @slotchange=${this._handleSlotChange}></slot>
101
- </div>
102
- </div>
103
- </div>
104
- `;
105
- }
106
- }
107
- SgdsSidebarSection.styles = [...SgdsElement.styles, css_248z];
108
- __decorate([
109
- property({ type: String, reflect: true })
110
- ], SgdsSidebarSection.prototype, "title", void 0);
111
- __decorate([
112
- property({ type: Boolean, reflect: true })
113
- ], SgdsSidebarSection.prototype, "collapsed", void 0);
114
- __decorate([
115
- property({ type: Boolean, reflect: true })
116
- ], SgdsSidebarSection.prototype, "collapsible", void 0);
117
- __decorate([
118
- state()
119
- ], SgdsSidebarSection.prototype, "_isLastChild", void 0);
120
-
121
- export { SgdsSidebarSection, SgdsSidebarSection as default };
122
- //# sourceMappingURL=sgds-sidebar-section.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sgds-sidebar-section.js","sources":["../../../src/components/Sidebar/sgds-sidebar-section.ts"],"sourcesContent":["import { html, nothing } from \"lit\";\nimport { property, state } 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\";\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 /**\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\n /**\n * Tracks whether this section is the last child of its parent.\n * Used to remove bottom border from the last section.\n * @type {boolean}\n * @internal\n */\n @state() private _isLastChild = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute(\"role\", \"region\");\n this._isLastChild = this.parentElement?.lastElementChild === this;\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 \"no-border\": this._isLastChild,\n \"sidebar-section--collapsed\": this._sidebarCollapsed\n })}\n >\n <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\n <div\n class=${classMap({\n \"sidebar-section-content\": true,\n \"sidebar-section-content--collapsed\": this.collapsed && this.collapsible\n })}\n >\n <div>\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsSidebarSection;\n"],"names":["sidebarSectionStyle"],"mappings":";;;;;;;;AAQA;;;;;;AAMG;AACG,MAAO,kBAAmB,SAAQ,cAAc,CAAA;AAAtD,IAAA,WAAA,GAAA;;AAGE;;;;;;AAMG;QACwC,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;AAEtD;;;;;;;AAOG;QACyC,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAE9D;;;;;;;AAOG;QACyC,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAEhE;;;;;AAKG;QACc,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;KAuDvC;IArDC,iBAAiB,GAAA;;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;AAC1B,QAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACpC,QAAA,IAAI,CAAC,YAAY,GAAG,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,aAAa,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,gBAAgB,MAAK,IAAI,CAAC;AAClE,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;KACzB;AAED;;;;;;AAMG;IACM,YAAY,GAAA;QACnB,IAAI,IAAI,CAAC,WAAW;AAAE,YAAA,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;KACxD;IAED,MAAM,GAAA;AACJ,QAAA,OAAO,IAAI,CAAA,CAAA;;AAEC,cAAA,EAAA,QAAQ,CAAC;AACf,YAAA,iBAAiB,EAAE,IAAI;YACvB,WAAW,EAAE,IAAI,CAAC,YAAY;YAC9B,4BAA4B,EAAE,IAAI,CAAC,iBAAiB;SACrD,CAAC,CAAA;;;;AAIS,iBAAA,EAAA,IAAI,CAAC,YAAY,CAAA;0BACV,CAAC,IAAI,CAAC,SAAS,CAAA;0BACf,CAAC,IAAI,CAAC,WAAW,CAAA;;;AAGzB,gBAAA,EAAA,IAAI,CAAC,KAAK,CAAA;AAChB,UAAA,EAAA,IAAI,CAAC,WAAW;AAChB,cAAE,IAAI,CAAA,CAAA,gBAAA,EAAmB,IAAI,CAAC,SAAS,GAAG,cAAc,GAAG,YAAY,CAAyB,uBAAA,CAAA;AAChG,cAAE,OAAO,CAAA;;;;AAIH,gBAAA,EAAA,QAAQ,CAAC;AACf,YAAA,yBAAyB,EAAE,IAAI;AAC/B,YAAA,oCAAoC,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,WAAW;SACzE,CAAC,CAAA;;;AAGoB,8BAAA,EAAA,IAAI,CAAC,iBAAiB,CAAA;;;;KAIjD,CAAC;KACH;;AA3FM,kBAAM,CAAA,MAAA,GAAG,CAAC,GAAG,WAAW,CAAC,MAAM,EAAEA,QAAmB,CAA9C,CAAgD;AASlB,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAY,CAAA,EAAA,kBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUV,UAAA,CAAA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAmB,CAAA,EAAA,kBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUlB,UAAA,CAAA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAqB,CAAA,EAAA,kBAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAQ/C,UAAA,CAAA;AAAhB,IAAA,KAAK,EAAE;AAA8B,CAAA,EAAA,kBAAA,CAAA,SAAA,EAAA,cAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
@@ -1,88 +0,0 @@
1
- import SgdsElement from "../../base/sgds-element";
2
- import SgdsSidebarGroup from "./sgds-sidebar-group";
3
- export declare class SgdsSidebar extends SgdsElement {
4
- static styles: import("lit").CSSResult[];
5
- /**
6
- * Controls whether the sidebar is collapsed or expanded.
7
- * When true, the sidebar is in collapsed state showing only icons.
8
- * When false, the sidebar is expanded displaying full labels and content.
9
- * Affects all child items by toggling visibility of labels and adjusting spacing.
10
- * @attribute collapsed
11
- * @type {boolean}
12
- * @default false
13
- */
14
- collapsed: boolean;
15
- /**
16
- * The name of the currently active sidebar item or group.
17
- * Reflects the selected item and allows external control of sidebar selection.
18
- * Used to synchronize sidebar state with external navigation state or programmatic selection.
19
- * When set, the corresponding item with matching `name` attribute will be highlighted as active.
20
- * @attribute active
21
- * @type {string}
22
- * @default ""
23
- */
24
- active: string;
25
- /** @internal Tracks the currently active group and provides it via context to all child elements */
26
- _sidebarActiveGroup: SgdsSidebarGroup | null;
27
- /** @internal Tracks the collapsed state and provides it via context to all child elements */
28
- private _sidebarCollapsed;
29
- /** @internal Tracks the currently active item and provides it via context to all child elements */
30
- private _sidebarActiveItem;
31
- /** @internal Provides the list of items shown in the drawer overlay */
32
- private _drawerItems;
33
- /** @internal Indicates whether a drawer overlay is currently open */
34
- private _showDrawer;
35
- /** @internal */
36
- private _defaultNodes;
37
- connectedCallback(): void;
38
- disconnectedCallback(): void;
39
- _handleCollapsed(): void;
40
- /**
41
- * Handles changes to the active item selection.
42
- * Updates selection state and manages drawer overlay visibility based on the active item's nesting level.
43
- * For root-level items with children, opens the drawer overlay.
44
- * For nested items, expands parent groups and opens the appropriate drawer if needed.
45
- * @private
46
- * @returns {void}
47
- */
48
- _handleActiveItem(): void;
49
- _handleActive(): void;
50
- private _getActiveChild;
51
- /**
52
- * Manages the drawer overlay content based on the selected parent item.
53
- * If element is provided: Opens drawer for that element's children.
54
- * If element is undefined: Closes drawer and reverts items to their parent.
55
- * @private
56
- * @param {SgdsSidebarGroup} [element] - The parent item to display in drawer. Undefined closes drawer.
57
- * @returns {void}
58
- */
59
- private _setNodesToDrawer;
60
- /**
61
- * Reverts nested items back to their original parent element.
62
- * Clears the drawer overlay content and updates selected attributes.
63
- * Called when closing the drawer or switching to a different parent item.
64
- * @private
65
- * @param {SgdsSidebarItem} element - The parent item to return nodes to
66
- * @returns {void}
67
- */
68
- private _revertNodesToParent;
69
- /**
70
- * Attaches event listeners to all direct child sidebar items.
71
- * Handles item selection events and drawer overlay state management.
72
- * Manages emitting sgds-select custom events for external components.
73
- * @private
74
- * @returns {void}
75
- */
76
- private addItemListeners;
77
- /**
78
- * Toggles the sidebar between collapsed and expanded states.
79
- * Updates the collapsed property and emits sgds-sidebar-toggle event.
80
- *
81
- * @emits sgds-sidebar-toggle Emitted with detail.collapsed indicating new state
82
- * @returns {void}
83
- */
84
- private toggleCollapsed;
85
- private _handleClickOutOfElement;
86
- render(): import("lit").TemplateResult<1>;
87
- }
88
- export default SgdsSidebar;