@govtechsg/sgds-web-component 3.13.0 → 3.13.2-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.
Files changed (129) hide show
  1. package/base/sidebar-element.d.ts +112 -0
  2. package/base/sidebar-element.js +281 -0
  3. package/base/sidebar-element.js.map +1 -0
  4. package/components/Footer/footer.js +1 -1
  5. package/components/Footer/index.umd.min.js +1 -1
  6. package/components/Footer/index.umd.min.js.map +1 -1
  7. package/components/Mainnav/index.umd.min.js +3 -3
  8. package/components/Mainnav/index.umd.min.js.map +1 -1
  9. package/components/Mainnav/mainnav-dropdown.js +1 -1
  10. package/components/Mainnav/mainnav-item.js +1 -1
  11. package/components/Mainnav/mainnav.js +1 -1
  12. package/components/Pagination/index.umd.min.js +3 -1
  13. package/components/Pagination/index.umd.min.js.map +1 -1
  14. package/components/Pagination/pagination.js +1 -1
  15. package/components/Pagination/sgds-pagination.js +2 -0
  16. package/components/Pagination/sgds-pagination.js.map +1 -1
  17. package/components/Sidebar/index.d.ts +16 -0
  18. package/components/Sidebar/index.js +10 -0
  19. package/components/Sidebar/index.js.map +1 -0
  20. package/components/Sidebar/index.umd.min.js +2427 -0
  21. package/components/Sidebar/index.umd.min.js.map +1 -0
  22. package/components/Sidebar/sgds-sidebar-group.d.ts +51 -0
  23. package/components/Sidebar/sgds-sidebar-group.js +124 -0
  24. package/components/Sidebar/sgds-sidebar-group.js.map +1 -0
  25. package/components/Sidebar/sgds-sidebar-item.d.ts +25 -0
  26. package/components/Sidebar/sgds-sidebar-item.js +73 -0
  27. package/components/Sidebar/sgds-sidebar-item.js.map +1 -0
  28. package/components/Sidebar/sgds-sidebar-section.d.ts +55 -0
  29. package/components/Sidebar/sgds-sidebar-section.js +122 -0
  30. package/components/Sidebar/sgds-sidebar-section.js.map +1 -0
  31. package/components/Sidebar/sgds-sidebar.d.ts +88 -0
  32. package/components/Sidebar/sgds-sidebar.js +338 -0
  33. package/components/Sidebar/sgds-sidebar.js.map +1 -0
  34. package/components/Sidebar/sidebar-context.d.ts +51 -0
  35. package/components/Sidebar/sidebar-context.js +45 -0
  36. package/components/Sidebar/sidebar-context.js.map +1 -0
  37. package/components/Sidebar/sidebar-item.js +6 -0
  38. package/components/Sidebar/sidebar-item.js.map +1 -0
  39. package/components/Sidebar/sidebar-section.js +6 -0
  40. package/components/Sidebar/sidebar-section.js.map +1 -0
  41. package/components/Sidebar/sidebar.js +6 -0
  42. package/components/Sidebar/sidebar.js.map +1 -0
  43. package/components/index.d.ts +1 -0
  44. package/components/index.js +1 -0
  45. package/components/index.js.map +1 -1
  46. package/components/index.umd.min.js +87 -50
  47. package/components/index.umd.min.js.map +1 -1
  48. package/css/fouc.css +5 -1
  49. package/index.d.ts +1 -0
  50. package/index.js +1 -0
  51. package/index.js.map +1 -1
  52. package/index.umd.min.js +164 -51
  53. package/index.umd.min.js.map +1 -1
  54. package/package.json +1 -1
  55. package/react/base/sidebar-element.cjs.js +286 -0
  56. package/react/base/sidebar-element.cjs.js.map +1 -0
  57. package/react/base/sidebar-element.js +282 -0
  58. package/react/base/sidebar-element.js.map +1 -0
  59. package/react/components/Footer/footer.cjs.js +1 -1
  60. package/react/components/Footer/footer.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/Pagination/pagination.cjs.js +1 -1
  68. package/react/components/Pagination/pagination.js +1 -1
  69. package/react/components/Pagination/sgds-pagination.cjs.js +2 -0
  70. package/react/components/Pagination/sgds-pagination.cjs.js.map +1 -1
  71. package/react/components/Pagination/sgds-pagination.js +2 -0
  72. package/react/components/Pagination/sgds-pagination.js.map +1 -1
  73. package/react/components/Sidebar/sgds-sidebar-group.cjs.js +130 -0
  74. package/react/components/Sidebar/sgds-sidebar-group.cjs.js.map +1 -0
  75. package/react/components/Sidebar/sgds-sidebar-group.js +125 -0
  76. package/react/components/Sidebar/sgds-sidebar-group.js.map +1 -0
  77. package/react/components/Sidebar/sgds-sidebar-item.cjs.js +79 -0
  78. package/react/components/Sidebar/sgds-sidebar-item.cjs.js.map +1 -0
  79. package/react/components/Sidebar/sgds-sidebar-item.js +74 -0
  80. package/react/components/Sidebar/sgds-sidebar-item.js.map +1 -0
  81. package/react/components/Sidebar/sgds-sidebar-section.cjs.js +128 -0
  82. package/react/components/Sidebar/sgds-sidebar-section.cjs.js.map +1 -0
  83. package/react/components/Sidebar/sgds-sidebar-section.js +123 -0
  84. package/react/components/Sidebar/sgds-sidebar-section.js.map +1 -0
  85. package/react/components/Sidebar/sgds-sidebar.cjs.js +344 -0
  86. package/react/components/Sidebar/sgds-sidebar.cjs.js.map +1 -0
  87. package/react/components/Sidebar/sgds-sidebar.js +339 -0
  88. package/react/components/Sidebar/sgds-sidebar.js.map +1 -0
  89. package/react/components/Sidebar/sidebar-context.cjs.js +54 -0
  90. package/react/components/Sidebar/sidebar-context.cjs.js.map +1 -0
  91. package/react/components/Sidebar/sidebar-context.js +46 -0
  92. package/react/components/Sidebar/sidebar-context.js.map +1 -0
  93. package/react/components/Sidebar/sidebar-item.cjs.js +11 -0
  94. package/react/components/Sidebar/sidebar-item.cjs.js.map +1 -0
  95. package/react/components/Sidebar/sidebar-item.js +7 -0
  96. package/react/components/Sidebar/sidebar-item.js.map +1 -0
  97. package/react/components/Sidebar/sidebar-section.cjs.js +11 -0
  98. package/react/components/Sidebar/sidebar-section.cjs.js.map +1 -0
  99. package/react/components/Sidebar/sidebar-section.js +7 -0
  100. package/react/components/Sidebar/sidebar-section.js.map +1 -0
  101. package/react/components/Sidebar/sidebar.cjs.js +11 -0
  102. package/react/components/Sidebar/sidebar.cjs.js.map +1 -0
  103. package/react/components/Sidebar/sidebar.js +7 -0
  104. package/react/components/Sidebar/sidebar.js.map +1 -0
  105. package/react/index.cjs.js +62 -54
  106. package/react/index.cjs.js.map +1 -1
  107. package/react/index.d.ts +5 -1
  108. package/react/index.js +5 -1
  109. package/react/index.js.map +1 -1
  110. package/react/sidebar/index.cjs.js +40 -0
  111. package/react/sidebar/index.cjs.js.map +1 -0
  112. package/react/sidebar/index.d.ts +2 -0
  113. package/react/sidebar/index.js +16 -0
  114. package/react/sidebar/index.js.map +1 -0
  115. package/react/sidebar-group/index.cjs.js +40 -0
  116. package/react/sidebar-group/index.cjs.js.map +1 -0
  117. package/react/sidebar-group/index.d.ts +2 -0
  118. package/react/sidebar-group/index.js +16 -0
  119. package/react/sidebar-group/index.js.map +1 -0
  120. package/react/sidebar-item/index.cjs.js +40 -0
  121. package/react/sidebar-item/index.cjs.js.map +1 -0
  122. package/react/sidebar-item/index.d.ts +2 -0
  123. package/react/sidebar-item/index.js +16 -0
  124. package/react/sidebar-item/index.js.map +1 -0
  125. package/react/sidebar-section/index.cjs.js +40 -0
  126. package/react/sidebar-section/index.cjs.js.map +1 -0
  127. package/react/sidebar-section/index.d.ts +2 -0
  128. package/react/sidebar-section/index.js +16 -0
  129. package/react/sidebar-section/index.js.map +1 -0
@@ -0,0 +1,339 @@
1
+ 'use client';
2
+ import { __decorate } from 'tslib';
3
+ import { html } from 'lit';
4
+ import { property, state, queryAssignedElements } from 'lit/decorators.js';
5
+ import { classMap } from 'lit/directives/class-map.js';
6
+ import SgdsElement from '../../base/sgds-element.js';
7
+ import css_248z from './sidebar.js';
8
+ import { provide } from '@lit/context';
9
+ import { SidebarActiveGroup, SidebarCollapsed, SidebarActiveItem, SidebarDrawerItems, SidebarDrawerOpen } from './sidebar-context.js';
10
+ import { watch } from '../../utils/watch.js';
11
+
12
+ /**
13
+ * @summary Sidebar is a collapsible navigation component that displays menu items and groups.
14
+ * Users can expand and collapse the sidebar to save screen space while navigating through organized menu items.
15
+ * The sidebar coordinates selection and navigation across nested items using context providers and custom events.
16
+ *
17
+ * Features:
18
+ * - Collapsible state for space-saving layouts with icon-only mode
19
+ * - Multi-level nesting (up to 3 levels) with drawer overlay for root-level groups
20
+ * - Keyboard navigation with full ARIA support for accessibility
21
+ * - Programmatic link navigation support with anchor elements
22
+ * - Active item tracking and synchronized state management
23
+ *
24
+ * Keyboard Navigation:
25
+ * - Arrow Up/Down: Navigate between sidebar items and groups
26
+ * - Arrow Left/Right: Collapse/expand groups or navigate drawer overlays
27
+ * - Enter/Space: Activate focused item or toggle group
28
+ * - Tab: Standard focus management to interactive elements
29
+ *
30
+ * @slot - Insert sgds-sidebar-item, sgds-sidebar-group, and sgds-sidebar-section elements
31
+ * @slot brandName - Insert brand/logo content in sidebar header
32
+ *
33
+ * @fires sgds-select - Emitted when a sidebar item or group is selected.
34
+ * Event detail: { activeItem: string } - name of the selected item
35
+ *
36
+ */
37
+ const SGDS_SIDEBAR_GROUP = "sgds-sidebar-group";
38
+ class SgdsSidebar extends SgdsElement {
39
+ constructor() {
40
+ super(...arguments);
41
+ /**
42
+ * Controls whether the sidebar is collapsed or expanded.
43
+ * When true, the sidebar is in collapsed state showing only icons.
44
+ * When false, the sidebar is expanded displaying full labels and content.
45
+ * Affects all child items by toggling visibility of labels and adjusting spacing.
46
+ * @attribute collapsed
47
+ * @type {boolean}
48
+ * @default false
49
+ */
50
+ this.collapsed = false;
51
+ /**
52
+ * The name of the currently active sidebar item or group.
53
+ * Reflects the selected item and allows external control of sidebar selection.
54
+ * Used to synchronize sidebar state with external navigation state or programmatic selection.
55
+ * When set, the corresponding item with matching `name` attribute will be highlighted as active.
56
+ * @attribute active
57
+ * @type {string}
58
+ * @default ""
59
+ */
60
+ this.active = "";
61
+ /** @internal Tracks the currently active group and provides it via context to all child elements */
62
+ this._sidebarActiveGroup = null;
63
+ /** @internal Tracks the currently active item and provides it via context to all child elements */
64
+ this._sidebarActiveItem = null;
65
+ /** @internal Provides the list of items shown in the drawer overlay */
66
+ this._drawerItems = [];
67
+ /** @internal Indicates whether a drawer overlay is currently open */
68
+ this._showDrawer = false;
69
+ this._handleClickOutOfElement = (e) => {
70
+ if (!this._sidebarActiveGroup)
71
+ return;
72
+ if (!e.composedPath().includes(this)) {
73
+ this._showDrawer = false;
74
+ }
75
+ };
76
+ }
77
+ connectedCallback() {
78
+ super.connectedCallback();
79
+ this.setAttribute("role", "navigation");
80
+ this.setAttribute("aria-label", "Main navigation");
81
+ this.updateComplete.then(() => {
82
+ this.addItemListeners();
83
+ this._handleActive();
84
+ document.addEventListener("click", this._handleClickOutOfElement);
85
+ });
86
+ }
87
+ disconnectedCallback() {
88
+ super.disconnectedCallback();
89
+ document.removeEventListener("click", this._handleClickOutOfElement);
90
+ }
91
+ _handleCollapsed() {
92
+ this._sidebarCollapsed = this.collapsed;
93
+ }
94
+ /**
95
+ * Handles changes to the active item selection.
96
+ * Updates selection state and manages drawer overlay visibility based on the active item's nesting level.
97
+ * For root-level items with children, opens the drawer overlay.
98
+ * For nested items, expands parent groups and opens the appropriate drawer if needed.
99
+ * @private
100
+ * @returns {void}
101
+ */
102
+ _handleActiveItem() {
103
+ if (!this._sidebarActiveItem)
104
+ return;
105
+ const childLevel = this._sidebarActiveItem._childLevel;
106
+ this._sidebarActiveItem._selected = true;
107
+ if (childLevel === 0) {
108
+ // First level of navigation, check if need to open drawer or not.
109
+ if (this._sidebarActiveItem._childElements.length > 0) {
110
+ this._setNodesToDrawer(this._sidebarActiveItem);
111
+ }
112
+ else {
113
+ this._revertNodesToParent();
114
+ }
115
+ }
116
+ else {
117
+ // when nested, we will find the top level of parent
118
+ let parentEle = this._sidebarActiveItem.parentElement;
119
+ while (parentEle._childLevel >= 0 && parentEle.tagName.toLowerCase() === SGDS_SIDEBAR_GROUP) {
120
+ if (parentEle.tagName.toLowerCase() === SGDS_SIDEBAR_GROUP) {
121
+ if (parentEle._childLevel === 0) {
122
+ // when active item not in drawer, set nodes into drawer.
123
+ if (!parentEle.classList.contains("sidebar-nested-overlay")) {
124
+ this._setNodesToDrawer(parentEle);
125
+ }
126
+ }
127
+ parentEle._selected = true;
128
+ parentEle._showMenu = parentEle._childLevel > 0; //setting this to true as the child is active
129
+ parentEle = parentEle.parentElement;
130
+ }
131
+ }
132
+ if (this._sidebarActiveGroup) {
133
+ this._sidebarActiveGroup._selected = true;
134
+ }
135
+ }
136
+ }
137
+ _handleActive() {
138
+ // Return early if active is empty
139
+ if (!this.active) {
140
+ this._sidebarActiveItem = null;
141
+ return;
142
+ }
143
+ this._sidebarActiveItem = this._getActiveChild();
144
+ }
145
+ _getActiveChild() {
146
+ const findByName = (elements) => {
147
+ var _a;
148
+ for (const element of elements) {
149
+ if (element.name === this.active) {
150
+ return element;
151
+ }
152
+ if ((_a = element._childElements) === null || _a === void 0 ? void 0 : _a.length) {
153
+ const found = findByName(element._childElements);
154
+ if (found)
155
+ return found;
156
+ }
157
+ }
158
+ return null;
159
+ };
160
+ return findByName(this._defaultNodes);
161
+ }
162
+ /**
163
+ * Manages the drawer overlay content based on the selected parent item.
164
+ * If element is provided: Opens drawer for that element's children.
165
+ * If element is undefined: Closes drawer and reverts items to their parent.
166
+ * @private
167
+ * @param {SgdsSidebarGroup} [element] - The parent item to display in drawer. Undefined closes drawer.
168
+ * @returns {void}
169
+ */
170
+ _setNodesToDrawer(element) {
171
+ if (!element)
172
+ return;
173
+ // when there is element, we will revert the nodes of the previous active group before setting new value into the active group
174
+ if (this._sidebarActiveGroup && element !== this._sidebarActiveGroup) {
175
+ this._revertNodesToParent();
176
+ }
177
+ this._sidebarActiveGroup = element;
178
+ // when there is an active group set, always set new menu items
179
+ this._drawerItems = []; // always set to empty to prevent duplicate
180
+ const menuItems = this._sidebarActiveGroup.querySelectorAll(":scope > sgds-sidebar-group, :scope > sgds-sidebar-item");
181
+ menuItems.forEach(e => {
182
+ this._drawerItems.push(e);
183
+ });
184
+ }
185
+ /**
186
+ * Reverts nested items back to their original parent element.
187
+ * Clears the drawer overlay content and updates selected attributes.
188
+ * Called when closing the drawer or switching to a different parent item.
189
+ * @private
190
+ * @param {SgdsSidebarItem} element - The parent item to return nodes to
191
+ * @returns {void}
192
+ */
193
+ _revertNodesToParent() {
194
+ if (this._sidebarActiveGroup) {
195
+ this._drawerItems.forEach(e => {
196
+ this._sidebarActiveGroup.append(e);
197
+ });
198
+ this._drawerItems = [];
199
+ }
200
+ this._sidebarActiveGroup = null;
201
+ }
202
+ /**
203
+ * Attaches event listeners to all direct child sidebar items.
204
+ * Handles item selection events and drawer overlay state management.
205
+ * Manages emitting sgds-select custom events for external components.
206
+ * @private
207
+ * @returns {void}
208
+ */
209
+ addItemListeners() {
210
+ const items = this.querySelectorAll("sgds-sidebar-item");
211
+ const groups = this.querySelectorAll(SGDS_SIDEBAR_GROUP);
212
+ const allItems = [...items, ...groups];
213
+ allItems.forEach(item => {
214
+ item.addEventListener("i-sgds-click", (e) => {
215
+ const element = e.detail.element;
216
+ if (element === this._sidebarActiveGroup) {
217
+ // just toggle drawer
218
+ this._showDrawer = !this._showDrawer;
219
+ }
220
+ else {
221
+ if (this.active !== element.name) {
222
+ this.active = element.name;
223
+ allItems.forEach(item => (item._selected = false));
224
+ }
225
+ if (element._childElements.length > 0) {
226
+ this._showDrawer = true;
227
+ }
228
+ else {
229
+ this._showDrawer = false;
230
+ // when there is anchorLink we will trigger click to redirect and allow user to handle the navigation themselves
231
+ const anchorLink = item.querySelector(":scope > a");
232
+ if (anchorLink)
233
+ anchorLink.click();
234
+ }
235
+ // Emit sgds-select event when an item is selected
236
+ this.emit("sgds-select", { detail: { activeItem: element.name } });
237
+ }
238
+ });
239
+ });
240
+ }
241
+ /**
242
+ * Toggles the sidebar between collapsed and expanded states.
243
+ * Updates the collapsed property and emits sgds-sidebar-toggle event.
244
+ *
245
+ * @emits sgds-sidebar-toggle Emitted with detail.collapsed indicating new state
246
+ * @returns {void}
247
+ */
248
+ toggleCollapsed() {
249
+ this.collapsed = !this.collapsed;
250
+ }
251
+ render() {
252
+ var _a, _b;
253
+ return html `
254
+ <div
255
+ class=${classMap({
256
+ sidebar: true,
257
+ "sidebar--expanded": !this._sidebarCollapsed,
258
+ "sidebar--collapsed": this._sidebarCollapsed
259
+ })}
260
+ >
261
+ <div class="sidebar-wrapper">
262
+ <div class="sidebar-header">
263
+ <div class="sidebar-brand-name">
264
+ <slot name="brandName"></slot>
265
+ </div>
266
+
267
+ <sgds-icon-button
268
+ name=${this._sidebarCollapsed ? "sidebar-expand" : "sidebar-collapse"}
269
+ variant="ghost"
270
+ tone="neutral"
271
+ size="sm"
272
+ @click=${this.toggleCollapsed}
273
+ aria-label=${this._sidebarCollapsed ? "Expand sidebar" : "Collapse sidebar"}
274
+ aria-expanded=${!this._sidebarCollapsed}
275
+ ></sgds-icon-button>
276
+ </div>
277
+
278
+ <nav class="sidebar-content" role="navigation" aria-label="Main navigation" aria-activedescendant=${((_a = this._sidebarActiveItem) === null || _a === void 0 ? void 0 : _a.name) || ""}>
279
+ <slot></slot>
280
+ </nav>
281
+ </div>
282
+
283
+ <div
284
+ class=${classMap({
285
+ "sidebar-nested-overlay": true,
286
+ show: this._showDrawer
287
+ })}
288
+ role="dialog"
289
+ aria-label=${((_b = this._sidebarActiveGroup) === null || _b === void 0 ? void 0 : _b.title) ? `Nested items for ${this._sidebarActiveGroup.title}` : ""}
290
+ >
291
+ ${this._drawerItems}
292
+ </div>
293
+ </div>
294
+ </div>
295
+ `;
296
+ }
297
+ }
298
+ SgdsSidebar.styles = [...SgdsElement.styles, css_248z];
299
+ __decorate([
300
+ property({ type: Boolean, reflect: true })
301
+ ], SgdsSidebar.prototype, "collapsed", void 0);
302
+ __decorate([
303
+ property({ type: String, reflect: true })
304
+ ], SgdsSidebar.prototype, "active", void 0);
305
+ __decorate([
306
+ provide({ context: SidebarActiveGroup }),
307
+ state()
308
+ ], SgdsSidebar.prototype, "_sidebarActiveGroup", void 0);
309
+ __decorate([
310
+ provide({ context: SidebarCollapsed }),
311
+ state()
312
+ ], SgdsSidebar.prototype, "_sidebarCollapsed", void 0);
313
+ __decorate([
314
+ provide({ context: SidebarActiveItem }),
315
+ state()
316
+ ], SgdsSidebar.prototype, "_sidebarActiveItem", void 0);
317
+ __decorate([
318
+ provide({ context: SidebarDrawerItems }),
319
+ state()
320
+ ], SgdsSidebar.prototype, "_drawerItems", void 0);
321
+ __decorate([
322
+ provide({ context: SidebarDrawerOpen }),
323
+ state()
324
+ ], SgdsSidebar.prototype, "_showDrawer", void 0);
325
+ __decorate([
326
+ queryAssignedElements()
327
+ ], SgdsSidebar.prototype, "_defaultNodes", void 0);
328
+ __decorate([
329
+ watch("collapsed")
330
+ ], SgdsSidebar.prototype, "_handleCollapsed", null);
331
+ __decorate([
332
+ watch("_sidebarActiveItem")
333
+ ], SgdsSidebar.prototype, "_handleActiveItem", null);
334
+ __decorate([
335
+ watch("active")
336
+ ], SgdsSidebar.prototype, "_handleActive", null);
337
+
338
+ export { SgdsSidebar, SgdsSidebar as default };
339
+ //# sourceMappingURL=sgds-sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sgds-sidebar.js","sources":["../../../../src/components/Sidebar/sgds-sidebar.ts"],"sourcesContent":["import { html, PropertyValues } from \"lit\";\nimport { property, queryAssignedElements, state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport sidebarStyle from \"./sidebar.css\";\n\nimport { provide } from \"@lit/context\";\nimport {\n SidebarCollapsed,\n SidebarActiveItem,\n SidebarActiveGroup,\n SidebarDrawerItems,\n SidebarDrawerOpen\n} from \"./sidebar-context\";\nimport { watch } from \"../../utils/watch\";\nimport { SidebarElement } from \"../../base/sidebar-element\";\nimport SgdsSidebarGroup from \"./sgds-sidebar-group\";\n\n/**\n * @summary Sidebar is a collapsible navigation component that displays menu items and groups.\n * Users can expand and collapse the sidebar to save screen space while navigating through organized menu items.\n * The sidebar coordinates selection and navigation across nested items using context providers and custom events.\n *\n * Features:\n * - Collapsible state for space-saving layouts with icon-only mode\n * - Multi-level nesting (up to 3 levels) with drawer overlay for root-level groups\n * - Keyboard navigation with full ARIA support for accessibility\n * - Programmatic link navigation support with anchor elements\n * - Active item tracking and synchronized state management\n *\n * Keyboard Navigation:\n * - Arrow Up/Down: Navigate between sidebar items and groups\n * - Arrow Left/Right: Collapse/expand groups or navigate drawer overlays\n * - Enter/Space: Activate focused item or toggle group\n * - Tab: Standard focus management to interactive elements\n *\n * @slot - Insert sgds-sidebar-item, sgds-sidebar-group, and sgds-sidebar-section elements\n * @slot brandName - Insert brand/logo content in sidebar header\n *\n * @fires sgds-select - Emitted when a sidebar item or group is selected.\n * Event detail: { activeItem: string } - name of the selected item\n *\n */\n\nconst SGDS_SIDEBAR_GROUP = \"sgds-sidebar-group\";\nexport class SgdsSidebar extends SgdsElement {\n static styles = [...SgdsElement.styles, sidebarStyle];\n\n /**\n * Controls whether the sidebar is collapsed or expanded.\n * When true, the sidebar is in collapsed state showing only icons.\n * When false, the sidebar is expanded displaying full labels and content.\n * Affects all child items by toggling visibility of labels and adjusting spacing.\n * @attribute collapsed\n * @type {boolean}\n * @default false\n */\n @property({ type: Boolean, reflect: true }) collapsed = false;\n\n /**\n * The name of the currently active sidebar item or group.\n * Reflects the selected item and allows external control of sidebar selection.\n * Used to synchronize sidebar state with external navigation state or programmatic selection.\n * When set, the corresponding item with matching `name` attribute will be highlighted as active.\n * @attribute active\n * @type {string}\n * @default \"\"\n */\n @property({ type: String, reflect: true }) active = \"\";\n\n /** @internal Tracks the currently active group and provides it via context to all child elements */\n @provide({ context: SidebarActiveGroup })\n @state()\n _sidebarActiveGroup: SgdsSidebarGroup | null = null;\n\n /** @internal Tracks the collapsed state and provides it via context to all child elements */\n @provide({ context: SidebarCollapsed })\n @state()\n private _sidebarCollapsed: boolean;\n\n /** @internal Tracks the currently active item and provides it via context to all child elements */\n @provide({ context: SidebarActiveItem })\n @state()\n private _sidebarActiveItem: SidebarElement | null = null;\n\n /** @internal Provides the list of items shown in the drawer overlay */\n @provide({ context: SidebarDrawerItems })\n @state()\n private _drawerItems = [];\n\n /** @internal Indicates whether a drawer overlay is currently open */\n @provide({ context: SidebarDrawerOpen })\n @state()\n private _showDrawer = false;\n\n /** @internal */\n @queryAssignedElements()\n private _defaultNodes!: SidebarElement[];\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute(\"role\", \"navigation\");\n this.setAttribute(\"aria-label\", \"Main navigation\");\n\n this.updateComplete.then(() => {\n this.addItemListeners();\n this._handleActive();\n document.addEventListener(\"click\", this._handleClickOutOfElement);\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener(\"click\", this._handleClickOutOfElement);\n }\n\n @watch(\"collapsed\")\n _handleCollapsed() {\n this._sidebarCollapsed = this.collapsed;\n }\n\n /**\n * Handles changes to the active item selection.\n * Updates selection state and manages drawer overlay visibility based on the active item's nesting level.\n * For root-level items with children, opens the drawer overlay.\n * For nested items, expands parent groups and opens the appropriate drawer if needed.\n * @private\n * @returns {void}\n */\n @watch(\"_sidebarActiveItem\")\n _handleActiveItem() {\n if (!this._sidebarActiveItem) return;\n\n const childLevel = this._sidebarActiveItem._childLevel;\n this._sidebarActiveItem._selected = true;\n\n if (childLevel === 0) {\n // First level of navigation, check if need to open drawer or not.\n if (this._sidebarActiveItem._childElements.length > 0) {\n this._setNodesToDrawer(this._sidebarActiveItem as SgdsSidebarGroup);\n } else {\n this._revertNodesToParent();\n }\n } else {\n // when nested, we will find the top level of parent\n let parentEle = this._sidebarActiveItem.parentElement as SgdsSidebarGroup;\n\n while (parentEle._childLevel >= 0 && parentEle.tagName.toLowerCase() === SGDS_SIDEBAR_GROUP) {\n if (parentEle.tagName.toLowerCase() === SGDS_SIDEBAR_GROUP) {\n if (parentEle._childLevel === 0) {\n // when active item not in drawer, set nodes into drawer.\n if (!parentEle.classList.contains(\"sidebar-nested-overlay\")) {\n this._setNodesToDrawer(parentEle);\n }\n }\n\n parentEle._selected = true;\n\n parentEle._showMenu = parentEle._childLevel > 0; //setting this to true as the child is active\n parentEle = parentEle.parentElement as SgdsSidebarGroup;\n }\n }\n\n if (this._sidebarActiveGroup) {\n this._sidebarActiveGroup._selected = true;\n }\n }\n }\n\n @watch(\"active\")\n _handleActive() {\n // Return early if active is empty\n if (!this.active) {\n this._sidebarActiveItem = null;\n return;\n }\n\n this._sidebarActiveItem = this._getActiveChild();\n }\n\n private _getActiveChild() {\n const findByName = (elements: SidebarElement[]): SidebarElement | null => {\n for (const element of elements) {\n if (element.name === this.active) {\n return element;\n }\n if (element._childElements?.length) {\n const found = findByName(element._childElements);\n if (found) return found;\n }\n }\n return null;\n };\n\n return findByName(this._defaultNodes);\n }\n\n /**\n * Manages the drawer overlay content based on the selected parent item.\n * If element is provided: Opens drawer for that element's children.\n * If element is undefined: Closes drawer and reverts items to their parent.\n * @private\n * @param {SgdsSidebarGroup} [element] - The parent item to display in drawer. Undefined closes drawer.\n * @returns {void}\n */\n private _setNodesToDrawer(element: SgdsSidebarGroup) {\n if (!element) return;\n\n // when there is element, we will revert the nodes of the previous active group before setting new value into the active group\n if (this._sidebarActiveGroup && element !== this._sidebarActiveGroup) {\n this._revertNodesToParent();\n }\n\n this._sidebarActiveGroup = element;\n\n // when there is an active group set, always set new menu items\n this._drawerItems = []; // always set to empty to prevent duplicate\n const menuItems = this._sidebarActiveGroup.querySelectorAll(\n \":scope > sgds-sidebar-group, :scope > sgds-sidebar-item\"\n );\n menuItems.forEach(e => {\n this._drawerItems.push(e);\n });\n }\n\n /**\n * Reverts nested items back to their original parent element.\n * Clears the drawer overlay content and updates selected attributes.\n * Called when closing the drawer or switching to a different parent item.\n * @private\n * @param {SgdsSidebarItem} element - The parent item to return nodes to\n * @returns {void}\n */\n private _revertNodesToParent() {\n if (this._sidebarActiveGroup) {\n this._drawerItems.forEach(e => {\n this._sidebarActiveGroup.append(e);\n });\n\n this._drawerItems = [];\n }\n\n this._sidebarActiveGroup = null;\n }\n\n /**\n * Attaches event listeners to all direct child sidebar items.\n * Handles item selection events and drawer overlay state management.\n * Manages emitting sgds-select custom events for external components.\n * @private\n * @returns {void}\n */\n private addItemListeners() {\n const items = this.querySelectorAll(\"sgds-sidebar-item\");\n const groups = this.querySelectorAll(SGDS_SIDEBAR_GROUP);\n const allItems = [...items, ...groups] as SidebarElement[];\n\n allItems.forEach(item => {\n item.addEventListener(\"i-sgds-click\", (e: CustomEvent) => {\n const element = e.detail.element as SidebarElement;\n\n if (element === this._sidebarActiveGroup) {\n // just toggle drawer\n this._showDrawer = !this._showDrawer;\n } else {\n if (this.active !== element.name) {\n this.active = element.name;\n allItems.forEach(item => (item._selected = false));\n }\n\n if (element._childElements.length > 0) {\n this._showDrawer = true;\n } else {\n this._showDrawer = false;\n\n // when there is anchorLink we will trigger click to redirect and allow user to handle the navigation themselves\n const anchorLink = item.querySelector(\":scope > a\") as HTMLAnchorElement;\n if (anchorLink) anchorLink.click();\n }\n\n // Emit sgds-select event when an item is selected\n this.emit(\"sgds-select\", { detail: { activeItem: element.name } });\n }\n });\n });\n }\n\n /**\n * Toggles the sidebar between collapsed and expanded states.\n * Updates the collapsed property and emits sgds-sidebar-toggle event.\n *\n * @emits sgds-sidebar-toggle Emitted with detail.collapsed indicating new state\n * @returns {void}\n */\n private toggleCollapsed() {\n this.collapsed = !this.collapsed;\n }\n\n private _handleClickOutOfElement = (e: MouseEvent) => {\n if (!this._sidebarActiveGroup) return;\n\n if (!e.composedPath().includes(this)) {\n this._showDrawer = false;\n }\n };\n\n render() {\n return html`\n <div\n class=${classMap({\n sidebar: true,\n \"sidebar--expanded\": !this._sidebarCollapsed,\n \"sidebar--collapsed\": this._sidebarCollapsed\n })}\n >\n <div class=\"sidebar-wrapper\">\n <div class=\"sidebar-header\">\n <div class=\"sidebar-brand-name\">\n <slot name=\"brandName\"></slot>\n </div>\n\n <sgds-icon-button\n name=${this._sidebarCollapsed ? \"sidebar-expand\" : \"sidebar-collapse\"}\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n @click=${this.toggleCollapsed}\n aria-label=${this._sidebarCollapsed ? \"Expand sidebar\" : \"Collapse sidebar\"}\n aria-expanded=${!this._sidebarCollapsed}\n ></sgds-icon-button>\n </div>\n\n <nav class=\"sidebar-content\" role=\"navigation\" aria-label=\"Main navigation\" aria-activedescendant=${\n this._sidebarActiveItem?.name || \"\"\n }>\n <slot></slot>\n </nav>\n </div>\n\n <div\n class=${classMap({\n \"sidebar-nested-overlay\": true,\n show: this._showDrawer\n })}\n role=\"dialog\"\n aria-label=${this._sidebarActiveGroup?.title ? `Nested items for ${this._sidebarActiveGroup.title}` : \"\"}\n >\n ${this._drawerItems}\n </div>\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsSidebar;\n"],"names":["sidebarStyle"],"mappings":";;;;;;;;;;;AAkBA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAEH,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,MAAO,WAAY,SAAQ,WAAW,CAAA;AAA5C,IAAA,WAAA,GAAA;;AAGE;;;;;;;;AAQG;QACyC,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAE9D;;;;;;;;AAQG;QACwC,IAAM,CAAA,MAAA,GAAG,EAAE,CAAC;;QAKvD,IAAmB,CAAA,mBAAA,GAA4B,IAAI,CAAC;;QAU5C,IAAkB,CAAA,kBAAA,GAA0B,IAAI,CAAC;;QAKjD,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;;QAKlB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AA6MpB,QAAA,IAAA,CAAA,wBAAwB,GAAG,CAAC,CAAa,KAAI;YACnD,IAAI,CAAC,IAAI,CAAC,mBAAmB;gBAAE,OAAO;YAEtC,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;AACpC,gBAAA,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;aAC1B;AACH,SAAC,CAAC;KAiDH;IA9PC,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE,C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AAA,qBAAqB,EAAE;AACiB,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,eAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAoBzC,UAAA,CAAA;IADC,KAAK,CAAC,WAAW,CAAC;AAGlB,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,IAAA,CAAA,CAAA;AAWD,UAAA,CAAA;IADC,KAAK,CAAC,oBAAoB,CAAC;AAsC3B,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,IAAA,CAAA,CAAA;AAGD,UAAA,CAAA;IADC,KAAK,CAAC,QAAQ,CAAC;AASf,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,eAAA,EAAA,IAAA,CAAA;;;;"}
@@ -0,0 +1,54 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var context = require('@lit/context');
7
+
8
+ /**
9
+ * Context providing the currently active sidebar group (parent with nested children).
10
+ * Stores the SidebarElement instance of the group whose drawer overlay is currently open.
11
+ * Used to manage drawer visibility and determine which nested items to display.
12
+ * Value is null when no group drawer is open.
13
+ * @type {SidebarElement | null}
14
+ */
15
+ const SidebarActiveGroup = context.createContext("sidebar-active-group");
16
+ /**
17
+ * Context providing the currently selected/active sidebar item element.
18
+ * Stores the SidebarElement instance that is currently marked as active/selected.
19
+ * Used to highlight and visually emphasize the selected navigation item.
20
+ * Value is null when no item is selected.
21
+ * @type {SidebarElement | null}
22
+ */
23
+ const SidebarActiveItem = context.createContext("sidebar-active");
24
+ /**
25
+ * Context indicating whether the sidebar is in collapsed (icon-only) state.
26
+ * When true, sidebar displays only icons and uses tooltips for labels.
27
+ * When false, sidebar displays full labels alongside icons.
28
+ * Consumed by all sidebar child elements to adjust their layout and styling accordingly.
29
+ * @type {boolean}
30
+ */
31
+ const SidebarCollapsed = context.createContext("sidebar-collapsed");
32
+ /**
33
+ * Context providing the array of drawer items currently displayed in the sidebar overlay.
34
+ * Contains the child elements of the active group that are rendered in the drawer.
35
+ * Updated when group drawers open/close to show/hide nested children.
36
+ * Empty array when no drawer is open.
37
+ * @type {SidebarElement[]}
38
+ */
39
+ const SidebarDrawerItems = context.createContext("sidebar-drawer-items");
40
+ /**
41
+ * Context indicating whether a drawer overlay is currently open for displaying nested items.
42
+ * When true, a group drawer is open showing child elements.
43
+ * When false, no drawer is currently displayed.
44
+ * Used to manage the visibility state of the overlay across the component hierarchy.
45
+ * @type {boolean}
46
+ */
47
+ const SidebarDrawerOpen = context.createContext("sidebar-drawer-open");
48
+
49
+ exports.SidebarActiveGroup = SidebarActiveGroup;
50
+ exports.SidebarActiveItem = SidebarActiveItem;
51
+ exports.SidebarCollapsed = SidebarCollapsed;
52
+ exports.SidebarDrawerItems = SidebarDrawerItems;
53
+ exports.SidebarDrawerOpen = SidebarDrawerOpen;
54
+ //# sourceMappingURL=sidebar-context.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-context.cjs.js","sources":["../../../../src/components/Sidebar/sidebar-context.ts"],"sourcesContent":["import { createContext } from \"@lit/context\";\nimport { SidebarElement } from \"../../base/sidebar-element\";\n\n/**\n * Context providing the currently active sidebar group (parent with nested children).\n * Stores the SidebarElement instance of the group whose drawer overlay is currently open.\n * Used to manage drawer visibility and determine which nested items to display.\n * Value is null when no group drawer is open.\n * @type {SidebarElement | null}\n */\nexport const SidebarActiveGroup = createContext<SidebarElement | null>(\"sidebar-active-group\");\n\n/**\n * Context providing the currently selected/active sidebar item element.\n * Stores the SidebarElement instance that is currently marked as active/selected.\n * Used to highlight and visually emphasize the selected navigation item.\n * Value is null when no item is selected.\n * @type {SidebarElement | null}\n */\nexport const SidebarActiveItem = createContext<SidebarElement | null>(\"sidebar-active\");\n\n/**\n * Context indicating whether the sidebar is in collapsed (icon-only) state.\n * When true, sidebar displays only icons and uses tooltips for labels.\n * When false, sidebar displays full labels alongside icons.\n * Consumed by all sidebar child elements to adjust their layout and styling accordingly.\n * @type {boolean}\n */\nexport const SidebarCollapsed = createContext<boolean>(\"sidebar-collapsed\");\n\n/**\n * Context providing the array of drawer items currently displayed in the sidebar overlay.\n * Contains the child elements of the active group that are rendered in the drawer.\n * Updated when group drawers open/close to show/hide nested children.\n * Empty array when no drawer is open.\n * @type {SidebarElement[]}\n */\nexport const SidebarDrawerItems = createContext<SidebarElement[]>(\"sidebar-drawer-items\");\n\n/**\n * Context indicating whether a drawer overlay is currently open for displaying nested items.\n * When true, a group drawer is open showing child elements.\n * When false, no drawer is currently displayed.\n * Used to manage the visibility state of the overlay across the component hierarchy.\n * @type {boolean}\n */\nexport const SidebarDrawerOpen = createContext<boolean>(\"sidebar-drawer-open\");\n"],"names":["createContext"],"mappings":";;;;;;;AAGA;;;;;;AAMG;MACU,kBAAkB,GAAGA,qBAAa,CAAwB,sBAAsB,EAAE;AAE/F;;;;;;AAMG;MACU,iBAAiB,GAAGA,qBAAa,CAAwB,gBAAgB,EAAE;AAExF;;;;;;AAMG;MACU,gBAAgB,GAAGA,qBAAa,CAAU,mBAAmB,EAAE;AAE5E;;;;;;AAMG;MACU,kBAAkB,GAAGA,qBAAa,CAAmB,sBAAsB,EAAE;AAE1F;;;;;;AAMG;MACU,iBAAiB,GAAGA,qBAAa,CAAU,qBAAqB;;;;;;;;"}
@@ -0,0 +1,46 @@
1
+ 'use client';
2
+ import { createContext } from '@lit/context';
3
+
4
+ /**
5
+ * Context providing the currently active sidebar group (parent with nested children).
6
+ * Stores the SidebarElement instance of the group whose drawer overlay is currently open.
7
+ * Used to manage drawer visibility and determine which nested items to display.
8
+ * Value is null when no group drawer is open.
9
+ * @type {SidebarElement | null}
10
+ */
11
+ const SidebarActiveGroup = createContext("sidebar-active-group");
12
+ /**
13
+ * Context providing the currently selected/active sidebar item element.
14
+ * Stores the SidebarElement instance that is currently marked as active/selected.
15
+ * Used to highlight and visually emphasize the selected navigation item.
16
+ * Value is null when no item is selected.
17
+ * @type {SidebarElement | null}
18
+ */
19
+ const SidebarActiveItem = createContext("sidebar-active");
20
+ /**
21
+ * Context indicating whether the sidebar is in collapsed (icon-only) state.
22
+ * When true, sidebar displays only icons and uses tooltips for labels.
23
+ * When false, sidebar displays full labels alongside icons.
24
+ * Consumed by all sidebar child elements to adjust their layout and styling accordingly.
25
+ * @type {boolean}
26
+ */
27
+ const SidebarCollapsed = createContext("sidebar-collapsed");
28
+ /**
29
+ * Context providing the array of drawer items currently displayed in the sidebar overlay.
30
+ * Contains the child elements of the active group that are rendered in the drawer.
31
+ * Updated when group drawers open/close to show/hide nested children.
32
+ * Empty array when no drawer is open.
33
+ * @type {SidebarElement[]}
34
+ */
35
+ const SidebarDrawerItems = createContext("sidebar-drawer-items");
36
+ /**
37
+ * Context indicating whether a drawer overlay is currently open for displaying nested items.
38
+ * When true, a group drawer is open showing child elements.
39
+ * When false, no drawer is currently displayed.
40
+ * Used to manage the visibility state of the overlay across the component hierarchy.
41
+ * @type {boolean}
42
+ */
43
+ const SidebarDrawerOpen = createContext("sidebar-drawer-open");
44
+
45
+ export { SidebarActiveGroup, SidebarActiveItem, SidebarCollapsed, SidebarDrawerItems, SidebarDrawerOpen };
46
+ //# sourceMappingURL=sidebar-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-context.js","sources":["../../../../src/components/Sidebar/sidebar-context.ts"],"sourcesContent":["import { createContext } from \"@lit/context\";\nimport { SidebarElement } from \"../../base/sidebar-element\";\n\n/**\n * Context providing the currently active sidebar group (parent with nested children).\n * Stores the SidebarElement instance of the group whose drawer overlay is currently open.\n * Used to manage drawer visibility and determine which nested items to display.\n * Value is null when no group drawer is open.\n * @type {SidebarElement | null}\n */\nexport const SidebarActiveGroup = createContext<SidebarElement | null>(\"sidebar-active-group\");\n\n/**\n * Context providing the currently selected/active sidebar item element.\n * Stores the SidebarElement instance that is currently marked as active/selected.\n * Used to highlight and visually emphasize the selected navigation item.\n * Value is null when no item is selected.\n * @type {SidebarElement | null}\n */\nexport const SidebarActiveItem = createContext<SidebarElement | null>(\"sidebar-active\");\n\n/**\n * Context indicating whether the sidebar is in collapsed (icon-only) state.\n * When true, sidebar displays only icons and uses tooltips for labels.\n * When false, sidebar displays full labels alongside icons.\n * Consumed by all sidebar child elements to adjust their layout and styling accordingly.\n * @type {boolean}\n */\nexport const SidebarCollapsed = createContext<boolean>(\"sidebar-collapsed\");\n\n/**\n * Context providing the array of drawer items currently displayed in the sidebar overlay.\n * Contains the child elements of the active group that are rendered in the drawer.\n * Updated when group drawers open/close to show/hide nested children.\n * Empty array when no drawer is open.\n * @type {SidebarElement[]}\n */\nexport const SidebarDrawerItems = createContext<SidebarElement[]>(\"sidebar-drawer-items\");\n\n/**\n * Context indicating whether a drawer overlay is currently open for displaying nested items.\n * When true, a group drawer is open showing child elements.\n * When false, no drawer is currently displayed.\n * Used to manage the visibility state of the overlay across the component hierarchy.\n * @type {boolean}\n */\nexport const SidebarDrawerOpen = createContext<boolean>(\"sidebar-drawer-open\");\n"],"names":[],"mappings":";;;AAGA;;;;;;AAMG;MACU,kBAAkB,GAAG,aAAa,CAAwB,sBAAsB,EAAE;AAE/F;;;;;;AAMG;MACU,iBAAiB,GAAG,aAAa,CAAwB,gBAAgB,EAAE;AAExF;;;;;;AAMG;MACU,gBAAgB,GAAG,aAAa,CAAU,mBAAmB,EAAE;AAE5E;;;;;;AAMG;MACU,kBAAkB,GAAG,aAAa,CAAmB,sBAAsB,EAAE;AAE1F;;;;;;AAMG;MACU,iBAAiB,GAAG,aAAa,CAAU,qBAAqB;;;;"}
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var lit = require('lit');
7
+
8
+ var css_248z = lit.css`.sidebar-item{border-radius:var(--sgds-border-radius-md);cursor:pointer;padding:var(--sgds-padding-xs);transition:background-color .15s ease-in-out,color .15s ease-in-out}.sidebar-item.active,.sidebar-item:hover{background-color:var(--sgds-surface-raised)}.sidebar-item:focus,.sidebar-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-item-label-wrapper,.sidebar-item-label-wrapper>div{align-items:center;display:flex;gap:var(--sgds-gap-xs)}.sidebar-item-label-wrapper{justify-content:space-between}.sidebar-item-label{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;display:-webkit-box;font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20);max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden}.sidebar-item-label.offset{margin-left:var(--sgds-margin-2-xl)}.sidebar-item-label-wrapper .sidebar-item.active{background-color:var(--sgds-surface-raised);color:var(--sgds-primary-color-default)}.sidebar-item-label-wrapper .sidebar-item-trailingIcon{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}.sidebar-item--collapsed .sidebar-item-label,.sidebar-item--collapsed .sidebar-item-trailingIcon{display:none}.sidebar-item--collapsed .sidebar-item-label-wrapper{justify-content:center}.sidebar-submenu{overflow:hidden}.sidebar-submenu>div{margin-top:-100%;opacity:0;pointer-events:none;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.sidebar-submenu.show>div{margin-top:0;opacity:1;pointer-events:auto}.sidebar-submenu--collapsed{display:none}`;
9
+
10
+ exports["default"] = css_248z;
11
+ //# sourceMappingURL=sidebar-item.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-item.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { css } from 'lit';
3
+
4
+ var css_248z = css`.sidebar-item{border-radius:var(--sgds-border-radius-md);cursor:pointer;padding:var(--sgds-padding-xs);transition:background-color .15s ease-in-out,color .15s ease-in-out}.sidebar-item.active,.sidebar-item:hover{background-color:var(--sgds-surface-raised)}.sidebar-item:focus,.sidebar-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-item-label-wrapper,.sidebar-item-label-wrapper>div{align-items:center;display:flex;gap:var(--sgds-gap-xs)}.sidebar-item-label-wrapper{justify-content:space-between}.sidebar-item-label{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;display:-webkit-box;font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20);max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden}.sidebar-item-label.offset{margin-left:var(--sgds-margin-2-xl)}.sidebar-item-label-wrapper .sidebar-item.active{background-color:var(--sgds-surface-raised);color:var(--sgds-primary-color-default)}.sidebar-item-label-wrapper .sidebar-item-trailingIcon{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}.sidebar-item--collapsed .sidebar-item-label,.sidebar-item--collapsed .sidebar-item-trailingIcon{display:none}.sidebar-item--collapsed .sidebar-item-label-wrapper{justify-content:center}.sidebar-submenu{overflow:hidden}.sidebar-submenu>div{margin-top:-100%;opacity:0;pointer-events:none;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.sidebar-submenu.show>div{margin-top:0;opacity:1;pointer-events:auto}.sidebar-submenu--collapsed{display:none}`;
5
+
6
+ export { css_248z as default };
7
+ //# sourceMappingURL=sidebar-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-item.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var lit = require('lit');
7
+
8
+ var css_248z = lit.css`.sidebar-section{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:flex;flex-direction:column;padding:var(--sgds-padding-sm) 0}.sidebar-section.no-border{border-bottom:none}.sidebar-section-label{align-items:center;border-radius:var(--sgds-border-radius-md);color:var(--sgds-label-color-subtle);cursor:pointer;display:flex;font-size:var(--sgds-font-size-0);gap:var(--sgds-gap-2-xs);line-height:var(--sgds-line-height-20);padding:var(--sgds-padding-xs)}.sidebar-section-label:hover{color:var(--sgds-label-color-default)}.sidebar-section-label:focus,.sidebar-section-label:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-section--collapsed .sidebar-section-label{height:0;margin:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;width:0}.sidebar-section-content{overflow:hidden}.sidebar-section-content>div{margin-top:0;pointer-events:auto;transition:all var(--sgds-motion-duration-slow) var(--sgds-motion-easing-standard)}.sidebar-section-content.sidebar-section-content--collapsed>div{margin-top:-100%;pointer-events:none}.sidebar-section--collapsed .sidebar-section-content--collapsed>div{margin-top:0}`;
9
+
10
+ exports["default"] = css_248z;
11
+ //# sourceMappingURL=sidebar-section.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-section.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { css } from 'lit';
3
+
4
+ var css_248z = css`.sidebar-section{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:flex;flex-direction:column;padding:var(--sgds-padding-sm) 0}.sidebar-section.no-border{border-bottom:none}.sidebar-section-label{align-items:center;border-radius:var(--sgds-border-radius-md);color:var(--sgds-label-color-subtle);cursor:pointer;display:flex;font-size:var(--sgds-font-size-0);gap:var(--sgds-gap-2-xs);line-height:var(--sgds-line-height-20);padding:var(--sgds-padding-xs)}.sidebar-section-label:hover{color:var(--sgds-label-color-default)}.sidebar-section-label:focus,.sidebar-section-label:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-section--collapsed .sidebar-section-label{height:0;margin:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;width:0}.sidebar-section-content{overflow:hidden}.sidebar-section-content>div{margin-top:0;pointer-events:auto;transition:all var(--sgds-motion-duration-slow) var(--sgds-motion-easing-standard)}.sidebar-section-content.sidebar-section-content--collapsed>div{margin-top:-100%;pointer-events:none}.sidebar-section--collapsed .sidebar-section-content--collapsed>div{margin-top:0}`;
5
+
6
+ export { css_248z as default };
7
+ //# sourceMappingURL=sidebar-section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-section.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var lit = require('lit');
7
+
8
+ var css_248z = lit.css`.sidebar{display:flex;flex-direction:column;height:100%;position:relative;transition:width var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);z-index:1100}.sidebar--expanded{width:var(--sgds-dimension-288)}.sidebar--collapsed{width:var(--sgds-dimension-72)}.sidebar-header{align-items:center;display:flex;justify-content:space-between;padding:var(--sgds-padding-xs)}.sidebar .sidebar-brand-name{padding-left:var(--sgds-padding-xs)}.sidebar--collapsed .sidebar-brand-name{display:none}.sidebar--collapsed .sidebar-header{justify-content:center}.sidebar-wrapper{background-color:var(--sgds-bg-default);border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);height:100%;overflow-x:hidden;overflow-y:auto;position:relative;z-index:2}.sidebar-content{flex:1;overflow-y:auto;padding:0 var(--sgds-padding-xs)}.sidebar-nested-overlay{background-color:var(--sgds-bg-default);bottom:0;left:0;opacity:0;overflow-y:scroll;padding:var(--sgds-padding-md) var(--sgds-padding-xs);pointer-events:none;position:absolute;top:0;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);transition-property:opacity left;width:var(--sgds-dimension-288);z-index:0}.sidebar-nested-overlay.show{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:var(--sgds-dimension-288);opacity:1;pointer-events:auto}.sidebar--collapsed .sidebar-nested-overlay.show{left:var(--sgds-dimension-72)}.sidebar::-webkit-scrollbar{width:var(--sgds-dimension-2)}.sidebar::-webkit-scrollbar-track{background:transparent}.sidebar::-webkit-scrollbar-thumb{background:var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-xs)}.sidebar::-webkit-scrollbar-thumb:hover{background:var(--sgds-color-subtle)}`;
9
+
10
+ exports["default"] = css_248z;
11
+ //# sourceMappingURL=sidebar.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { css } from 'lit';
3
+
4
+ var css_248z = css`.sidebar{display:flex;flex-direction:column;height:100%;position:relative;transition:width var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);z-index:1100}.sidebar--expanded{width:var(--sgds-dimension-288)}.sidebar--collapsed{width:var(--sgds-dimension-72)}.sidebar-header{align-items:center;display:flex;justify-content:space-between;padding:var(--sgds-padding-xs)}.sidebar .sidebar-brand-name{padding-left:var(--sgds-padding-xs)}.sidebar--collapsed .sidebar-brand-name{display:none}.sidebar--collapsed .sidebar-header{justify-content:center}.sidebar-wrapper{background-color:var(--sgds-bg-default);border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);height:100%;overflow-x:hidden;overflow-y:auto;position:relative;z-index:2}.sidebar-content{flex:1;overflow-y:auto;padding:0 var(--sgds-padding-xs)}.sidebar-nested-overlay{background-color:var(--sgds-bg-default);bottom:0;left:0;opacity:0;overflow-y:scroll;padding:var(--sgds-padding-md) var(--sgds-padding-xs);pointer-events:none;position:absolute;top:0;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);transition-property:opacity left;width:var(--sgds-dimension-288);z-index:0}.sidebar-nested-overlay.show{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:var(--sgds-dimension-288);opacity:1;pointer-events:auto}.sidebar--collapsed .sidebar-nested-overlay.show{left:var(--sgds-dimension-72)}.sidebar::-webkit-scrollbar{width:var(--sgds-dimension-2)}.sidebar::-webkit-scrollbar-track{background:transparent}.sidebar::-webkit-scrollbar-thumb{background:var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-xs)}.sidebar::-webkit-scrollbar-thumb:hover{background:var(--sgds-color-subtle)}`;
5
+
6
+ export { css_248z as default };
7
+ //# sourceMappingURL=sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}