@nova-design-system/nova-react 3.22.0 → 3.23.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 (83) hide show
  1. package/dist/cjs/_commonjsHelpers-B85MJLTf-CFO10eej.js +7 -0
  2. package/dist/cjs/{collapse.animation-6e0b08df-AHWzNGm_.js → collapse.animation-DZDm0vSK-C2TOIhIK.js} +3 -3
  3. package/dist/cjs/{fade.animation-9b939939-DV--bM4S.js → fade.animation-DcRL9lcm-DAZeHoKN.js} +75 -75
  4. package/dist/cjs/generated/components.server.js +245 -50
  5. package/dist/cjs/{grow.animation-24ad5cf8-LUp_ITEx.js → grow.animation-CvHGHBL4-DDIEYBK-.js} +5 -5
  6. package/dist/cjs/i18n.utils-DOZbXX2L-BizoXo6c.js +2498 -0
  7. package/dist/cjs/{index-WPRkQD3O.js → index-CtjeeUI-.js} +12063 -7049
  8. package/dist/cjs/index.js +12 -1
  9. package/dist/cjs/inputmask-CSo292ul-DlvupPk6.js +3758 -0
  10. package/dist/cjs/{nv-accordion-item.entry-BuTvA6w9.js → nv-accordion-item.entry-B_l0-ux0.js} +11 -10
  11. package/dist/cjs/{nv-accordion.entry-Dtsfw6He.js → nv-accordion.entry-BX8_YuZF.js} +8 -5
  12. package/dist/cjs/{nv-alert.entry-TIdfdU7Y.js → nv-alert.entry-DCWYR0OK.js} +22 -22
  13. package/dist/cjs/{nv-avatar.entry-CaxrhPuw.js → nv-avatar.entry-C_xZD3Lp.js} +11 -11
  14. package/dist/cjs/{nv-badge_2.entry-CfYvTZxX.js → nv-badge_2.entry-JjqANStV.js} +24 -24
  15. package/dist/cjs/{nv-breadcrumb.entry-BCZ4MmfD.js → nv-breadcrumb.entry-DQZDn6cm.js} +5 -5
  16. package/dist/cjs/{nv-breadcrumbs.entry-DwzCE7F6.js → nv-breadcrumbs.entry-Bz0GjhY_.js} +3 -3
  17. package/dist/cjs/{nv-button.entry-Cr_86bcZ.js → nv-button.entry-Br1DH9Vj.js} +9 -9
  18. package/dist/cjs/{nv-buttongroup.entry-CWjRoHY1.js → nv-buttongroup.entry-BZaTKN_n.js} +3 -3
  19. package/dist/cjs/{nv-calendar.entry-CXfwNt6G.js → nv-calendar.entry-D9ESuu7C.js} +105 -79
  20. package/dist/cjs/{nv-col.entry-CJLDS3LY.js → nv-col.entry-CfgPMMxS.js} +5 -5
  21. package/dist/cjs/{nv-datagrid.entry-Cns8XSud.js → nv-datagrid.entry-DcB5q2oC.js} +14 -14
  22. package/dist/cjs/{nv-datagridcolumn.entry-CFFAipHF.js → nv-datagridcolumn.entry-BhKOzXA6.js} +2 -1
  23. package/dist/cjs/{nv-dialog.entry-CDSK9pUH.js → nv-dialog.entry-O47Eol_7.js} +23 -23
  24. package/dist/cjs/{nv-dialogfooter_2.entry-To_dGUn4.js → nv-dialogfooter_2.entry-Dn16bI8a.js} +10 -11
  25. package/dist/cjs/nv-fieldcheckbox.entry-Bx6ArV_b.js +177 -0
  26. package/dist/cjs/{nv-fielddate.entry-C3pXtMHL.js → nv-fielddate.entry-B4P0U8QG.js} +86 -40
  27. package/dist/cjs/{nv-fielddaterange.entry-CjVVPEK_.js → nv-fielddaterange.entry-BORwYJ-k.js} +150 -101
  28. package/dist/cjs/nv-fielddropdown.entry-DzBAIynY.js +687 -0
  29. package/dist/cjs/{nv-fielddropdownitem.entry-Dah-PaE8.js → nv-fielddropdownitem.entry-C_17isWd.js} +6 -5
  30. package/dist/cjs/{nv-fieldmultiselect.entry-BMLjhqoJ.js → nv-fieldmultiselect.entry-DiqRreWh.js} +347 -232
  31. package/dist/cjs/nv-fieldnumber.entry-C9O4UPp3.js +187 -0
  32. package/dist/cjs/nv-fieldpassword.entry-BfVJNT0A.js +165 -0
  33. package/dist/cjs/{nv-fieldradio.entry-X_2VT1Dj.js → nv-fieldradio.entry-CG22oETM.js} +10 -10
  34. package/dist/cjs/{nv-fieldselect.entry-pSp-2rNn.js → nv-fieldselect.entry-BPQEtrv2.js} +52 -13
  35. package/dist/cjs/{nv-fieldslider.entry-pZf7zzLU.js → nv-fieldslider.entry-CozmnUfN.js} +16 -31
  36. package/dist/cjs/nv-fieldtext.entry-BD-z01ru.js +163 -0
  37. package/dist/cjs/{nv-fieldtextarea.entry-t3Ixxi23.js → nv-fieldtextarea.entry-7UrKWDHg.js} +51 -12
  38. package/dist/cjs/{nv-fieldtime.entry-DY7D5_6K.js → nv-fieldtime.entry-DakOlLiO.js} +109 -57
  39. package/dist/cjs/{nv-icon.entry-6oYPSf4c.js → nv-icon.entry-Db00kB2u.js} +11 -11
  40. package/dist/cjs/{nv-iconbutton_2.entry-ChULGovr.js → nv-iconbutton_2.entry-CaKCa8NT.js} +7 -8
  41. package/dist/cjs/{nv-menu.entry-sd0tatWq.js → nv-menu.entry-CK2HdmBt.js} +16 -29
  42. package/dist/cjs/{nv-menuitem.entry-CCOqR7UF.js → nv-menuitem.entry-mKMqCAdz.js} +6 -5
  43. package/dist/cjs/nv-notification-bullet.entry-DtbjtFxs.js +77 -0
  44. package/dist/cjs/{nv-notification.entry-Cc3zE3yY.js → nv-notification.entry-CLb0gNu3.js} +39 -39
  45. package/dist/cjs/{nv-notificationcontainer.entry-DV4D6oOH.js → nv-notificationcontainer.entry-Cijivlm6.js} +3 -3
  46. package/dist/cjs/{nv-popover.entry-DQSwI2jT.js → nv-popover.entry-mLdLSp6n.js} +49 -45
  47. package/dist/cjs/{nv-row.entry-UUuMSAY5.js → nv-row.entry-C2C94fcv.js} +3 -3
  48. package/dist/cjs/nv-sidebar.entry-inDVNJ4s.js +177 -0
  49. package/dist/cjs/nv-sidebarcontent.entry-DxoljE15.js +22 -0
  50. package/dist/cjs/nv-sidebardivider.entry-D_yern0R.js +22 -0
  51. package/dist/cjs/nv-sidebarfooter.entry-Rkkn9TB_.js +22 -0
  52. package/dist/cjs/nv-sidebargroup.entry-C1p9qqxr.js +23 -0
  53. package/dist/cjs/nv-sidebarheader.entry-CYpD_4pI.js +22 -0
  54. package/dist/cjs/nv-sidebarlogo.entry-BgK03M1v.js +32 -0
  55. package/dist/cjs/nv-sidebarnavitem.entry-DglvcCOD.js +297 -0
  56. package/dist/cjs/nv-sidebarnavsubitem.entry-Dt1jKmC-.js +35 -0
  57. package/dist/cjs/{nv-split.entry-CYP2bTTM.js → nv-split.entry-mzg2F66T.js} +6 -6
  58. package/dist/cjs/{nv-stack.entry-D35-75Vw.js → nv-stack.entry-nnvjTrBy.js} +5 -5
  59. package/dist/cjs/{nv-table.entry-DevWJBnL.js → nv-table.entry-DkbNgxtI.js} +4 -4
  60. package/dist/cjs/{nv-tableheader.entry-Hs7nUSOC.js → nv-tableheader.entry-CRVFTQA-.js} +6 -6
  61. package/dist/cjs/{nv-toggle.entry-Eje9d--6.js → nv-toggle.entry-oC9TVkr1.js} +9 -9
  62. package/dist/cjs/nv-togglebutton.entry-BTWCzbS9.js +67 -0
  63. package/dist/cjs/{nv-togglebuttongroup.entry-CWN_Ucry.js → nv-togglebuttongroup.entry-BYXX5ejg.js} +8 -5
  64. package/dist/cjs/{nv-tooltip.entry-BGkKDEFg.js → nv-tooltip.entry-OJGxfJEh.js} +5 -5
  65. package/dist/cjs/{style-value-types.es-f5d10b79-D0QCM8OB.js → style-value-types.es-xlgmw4x8-B1vLqX9m.js} +6 -3
  66. package/dist/cjs/{v4-a79185f4-2n0dOd_Y.js → v4-BdYh22OP-C1vaJ4yP.js} +1 -1
  67. package/dist/generated/components.js +80 -0
  68. package/dist/generated/components.server.js +216 -50
  69. package/dist/providers/NotificationProvider.js +3 -4
  70. package/dist/types/generated/components.d.ts +32 -0
  71. package/dist/types/generated/components.server.d.ts +32 -0
  72. package/package.json +2 -2
  73. package/dist/cjs/_commonjsHelpers-1789f0cf-BJu3ubxk.js +0 -10
  74. package/dist/cjs/inputmask-edcad3c1-B9Omti4z.js +0 -3749
  75. package/dist/cjs/nv-fieldcheckbox.entry-fdonR07Z.js +0 -138
  76. package/dist/cjs/nv-fielddropdown.entry-C9mXuNNj.js +0 -392
  77. package/dist/cjs/nv-fieldnumber.entry-DBdJviXu.js +0 -148
  78. package/dist/cjs/nv-fieldpassword.entry-Cim_usSM.js +0 -122
  79. package/dist/cjs/nv-fieldtext.entry-DlI_ExaV.js +0 -124
  80. package/dist/cjs/nv-togglebutton.entry-LGI7pIeK.js +0 -56
  81. /package/dist/cjs/{clsx-297c1ffe-BtxeOLZW.js → clsx-ChV9xqsO-BtxeOLZW.js} +0 -0
  82. /package/dist/cjs/{constants-69bafca2-DpB_ghPF.js → constants-BReL3Lsa-DpB_ghPF.js} +0 -0
  83. /package/dist/cjs/{timeline.animation-79215cd4-KteJaZPb.js → timeline.animation-CgHCo_Ho-KteJaZPb.js} +0 -0
@@ -0,0 +1,297 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CtjeeUI-.js');
4
+ require('@stencil/react-output-target/runtime');
5
+ require('react');
6
+ require('react-dom');
7
+
8
+ const nvSidebarnavitemCss = "nv-sidebarnavitem{display:flex;flex-direction:column;gap:0}nv-sidebarnavitem .nv-sidebarnavitem-trigger{display:flex;align-items:center;gap:var(--sidebar-item-gap-x);padding:var(--sidebar-item-padding-y) var(--sidebar-item-padding-x);border-radius:var(--sidebar-item-radius);cursor:pointer;transition:all 0.15s ease;font-size:var(--sidebar-item-font-size);font-weight:var(--font-weight-medium-emphasis);color:var(--color-content-low-text);background:var(--components-sidebar-background);text-decoration:none;--nv-component-background:var(--components-sidebar-background);--nv-sidebarnavitem-background:var(--components-sidebar-background)}nv-sidebarnavitem .nv-sidebarnavitem-trigger:hover{background-color:var(--color-interaction-container-neutral-background-hover);color:var(--color-content-medium-text);--nv-component-background:var(--color-interaction-container-neutral-background-hover);--nv-sidebarnavitem-background:var(--color-interaction-container-neutral-background-hover)}nv-sidebarnavitem .nv-sidebarnavitem-trigger:focus,nv-sidebarnavitem .nv-sidebarnavitem-trigger:focus-within{outline:none}nv-sidebarnavitem .nv-sidebarnavitem-trigger:focus-visible,nv-sidebarnavitem .nv-sidebarnavitem-trigger:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-sidebarnavitem[active] .nv-sidebarnavitem-trigger{background-color:var(--color-interaction-container-neutral-background-active);color:var(--color-interaction-container-neutral-text-active);font-weight:var(--font-weight-medium-emphasis);--nv-component-background:var(--color-interaction-container-neutral-background-active);--nv-sidebarnavitem-background:var(--color-interaction-container-neutral-background-active)}nv-sidebarnavitem .nv-sidebarnavitem-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;color:inherit;width:var(--sidebar-item-icon-size);height:var(--sidebar-item-icon-size);position:relative}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-icon{overflow:visible;margin:0;justify-content:center}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-icon nv-notification-bullet{position:absolute;transform:translate(50%, -50%);z-index:1;--sidebar-notification-bullet-size-reduced:calc(\n var(--sidebar-item-icon-size) * 0.4\n )}nv-sidebarnavitem .nv-sidebarnavitem-content{flex:1;display:flex;align-items:center}nv-sidebarnavitem .nv-sidebarnavitem-content a{color:inherit !important;text-decoration:none !important;font-weight:var(--font-weight-medium-emphasis) !important;flex:1}nv-sidebarnavitem .nv-sidebarnavitem-trailing{display:flex;align-items:center;gap:var(--spacing-2);margin-left:auto}nv-sidebarnavitem .nv-sidebarnavitem-chevron{transition:transform 0.2s ease;color:inherit}nv-sidebarnavitem[open] .nv-sidebarnavitem-chevron{transform:rotate(180deg)}nv-sidebarnavitem .nv-sidebarnavitem-subitems{display:flex;flex-direction:column;gap:0;max-height:0;overflow:hidden;opacity:0;transition:max-height 0.3s ease, opacity 0.2s ease;padding-left:0}nv-sidebarnavitem[open] .nv-sidebarnavitem-subitems{opacity:1;margin-top:var(--spacing-1)}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-trigger{justify-content:center;gap:0;padding:var(--sidebar-item-padding-y-collapsed) var(--sidebar-item-padding-x-collapsed)}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-content{display:none}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-trailing,nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-chevron{display:none}";
9
+
10
+ const NvSidebarnavitem = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ /**
14
+ * Whether this item represents the active/current page.
15
+ * Can be set automatically when a sub-item becomes active.
16
+ */
17
+ this.active = false;
18
+ /**
19
+ * Whether this item can be collapsed/expanded (has sub-items).
20
+ */
21
+ this.collapsible = false;
22
+ /**
23
+ * Whether the collapsible item is currently open (showing sub-items).
24
+ */
25
+ this.open = false;
26
+ //#endregion PROPERTIES
27
+ /****************************************************************************/
28
+ //#region STATE
29
+ this.hasSubitems = false;
30
+ this.isSidebarCollapsed = false;
31
+ this.wasActiveFromSubitem = false; // Track if active was set by subitem logic
32
+ //#endregion STATE
33
+ /****************************************************************************/
34
+ //#region METHODS
35
+ this.handleToggle = (event) => {
36
+ // Ignore clicks that originated from subitems (they bubble up but shouldn't toggle)
37
+ const target = event.target;
38
+ if (target.closest('nv-sidebarnavsubitem')) {
39
+ return; // Let the subitem's link handle navigation normally
40
+ }
41
+ // In collapsed sidebar mode, navigate to the main link instead of toggling
42
+ if (this.isSidebarCollapsed) {
43
+ // Find the first link that is NOT inside subitems
44
+ const link = this.el.querySelector('.nv-sidebarnavitem-content a, :scope > a');
45
+ if (link === null || link === void 0 ? void 0 : link.href) {
46
+ // Check if click was directly on the link - if so, let it handle naturally
47
+ if (target.closest('a')) {
48
+ return;
49
+ }
50
+ // Trigger navigation by clicking the link programmatically
51
+ link.click();
52
+ }
53
+ return;
54
+ }
55
+ // Only handle toggle for collapsible items when sidebar is expanded
56
+ if (this.collapsible) {
57
+ event.preventDefault();
58
+ event.stopPropagation();
59
+ this.open = !this.open;
60
+ }
61
+ // For non-collapsible items in expanded mode, let the link handle the navigation
62
+ // Don't prevent default or stop propagation - allow the link to work normally
63
+ };
64
+ this.isAnimating = false;
65
+ this.hasInitializedHeight = false;
66
+ /** Tracks the last open state that was animated to, to prevent redundant animations */
67
+ this.lastAnimatedOpenState = null;
68
+ this.updateSubitemsHeight = (force = false) => {
69
+ if (!this.subitemsRef)
70
+ return;
71
+ // Skip animation if we're already in the target state (prevents animation on active change)
72
+ // Only animate if:
73
+ // 1. forced (explicit toggle by user via @Watch)
74
+ // 2. OR this is the first animation (lastAnimatedOpenState is null)
75
+ // 3. OR the open state has actually changed since last animation
76
+ if (!force &&
77
+ this.lastAnimatedOpenState !== null &&
78
+ this.lastAnimatedOpenState === this.open) {
79
+ return;
80
+ }
81
+ // Don't re-animate if already animating and not forced
82
+ if (this.isAnimating && !force) {
83
+ return;
84
+ }
85
+ this.isAnimating = true;
86
+ this.lastAnimatedOpenState = this.open;
87
+ if (this.open) {
88
+ // Calculate real height and animate to it
89
+ this.subitemsRef.style.transition = 'none';
90
+ this.subitemsRef.style.maxHeight = '0px';
91
+ requestAnimationFrame(() => {
92
+ if (this.subitemsRef) {
93
+ this.subitemsRef.style.transition =
94
+ 'max-height 0.3s ease, opacity 0.2s ease';
95
+ this.subitemsRef.style.maxHeight =
96
+ this.subitemsRef.scrollHeight + 'px';
97
+ // Reset animation flag after animation completes
98
+ setTimeout(() => {
99
+ this.isAnimating = false;
100
+ }, 300); // Match animation duration
101
+ }
102
+ });
103
+ }
104
+ else {
105
+ // Animate to 0
106
+ this.subitemsRef.style.transition = 'none';
107
+ this.subitemsRef.style.maxHeight = this.subitemsRef.scrollHeight + 'px';
108
+ requestAnimationFrame(() => {
109
+ if (this.subitemsRef) {
110
+ this.subitemsRef.style.transition =
111
+ 'max-height 0.3s ease, opacity 0.2s ease';
112
+ this.subitemsRef.style.maxHeight = '0px';
113
+ // Reset animation flag after animation completes
114
+ setTimeout(() => {
115
+ this.isAnimating = false;
116
+ }, 300); // Match animation duration
117
+ }
118
+ });
119
+ }
120
+ };
121
+ this.checkSidebarCollapsed = () => {
122
+ var _a;
123
+ const sidebar = this.el.closest('nv-sidebar');
124
+ const wasCollapsed = this.isSidebarCollapsed;
125
+ this.isSidebarCollapsed = (_a = sidebar === null || sidebar === void 0 ? void 0 : sidebar.hasAttribute('collapsed')) !== null && _a !== void 0 ? _a : false;
126
+ // When sidebar collapse state changes, update active state based on subitems
127
+ if (wasCollapsed !== this.isSidebarCollapsed) {
128
+ this.updateActiveFromSubitems();
129
+ }
130
+ };
131
+ /**
132
+ * Checks if any sub-item is active and updates parent active state.
133
+ * - When sidebar is collapsed: if a sub-item is active, parent should be active
134
+ * - When sidebar is expanded: if a sub-item is active AND parent is not open, parent should be active
135
+ * (because sub-items are hidden, we need to indicate the parent contains an active child)
136
+ */
137
+ this.updateActiveFromSubitems = () => {
138
+ if (!this.hasSubitems)
139
+ return;
140
+ // Find all sub-items
141
+ const subItems = Array.from(this.el.querySelectorAll('nv-sidebarnavsubitem'));
142
+ // Check if any sub-item is active
143
+ const hasActiveSubitem = subItems.some(subItem => subItem.active);
144
+ if (this.isSidebarCollapsed) {
145
+ // When sidebar is collapsed AND a sub-item is active, make parent active
146
+ if (hasActiveSubitem) {
147
+ this.active = true;
148
+ this.wasActiveFromSubitem = true;
149
+ }
150
+ else {
151
+ // When collapsed and no sub-item is active, remove active state only if we set it
152
+ if (this.wasActiveFromSubitem) {
153
+ this.active = false;
154
+ this.wasActiveFromSubitem = false;
155
+ }
156
+ }
157
+ }
158
+ else {
159
+ // When sidebar is expanded
160
+ if (hasActiveSubitem && !this.open) {
161
+ // If a sub-item is active AND parent is not open (sub-items hidden),
162
+ // make parent active to indicate it contains an active child
163
+ this.active = true;
164
+ this.wasActiveFromSubitem = true;
165
+ }
166
+ else if (hasActiveSubitem && this.open) {
167
+ // If a sub-item is active BUT parent is open (sub-items visible),
168
+ // remove active state from parent (only sub-item should be active)
169
+ if (this.wasActiveFromSubitem) {
170
+ this.active = false;
171
+ this.wasActiveFromSubitem = false;
172
+ }
173
+ }
174
+ else {
175
+ // No active sub-item, remove active state if we set it
176
+ if (this.wasActiveFromSubitem) {
177
+ this.active = false;
178
+ this.wasActiveFromSubitem = false;
179
+ }
180
+ }
181
+ // Note: activePath logic in nv-sidebar can also manage parent active state
182
+ // (when parent href matches activePath exactly)
183
+ }
184
+ };
185
+ }
186
+ //#endregion METHODS
187
+ /****************************************************************************/
188
+ //#region LIFECYCLE
189
+ componentWillLoad() {
190
+ // Check if there are sub-items in any slot
191
+ const subItems = Array.from(this.el.children).filter(child => child.tagName.toLowerCase() === 'nv-sidebarnavsubitem');
192
+ this.hasSubitems = subItems.length > 0;
193
+ // Move sub-items to the subitems slot
194
+ if (this.hasSubitems) {
195
+ subItems.forEach(item => {
196
+ item.setAttribute('slot', 'subitems');
197
+ });
198
+ }
199
+ // Check sidebar collapsed state
200
+ this.checkSidebarCollapsed();
201
+ // Watch for sidebar state changes
202
+ const sidebar = this.el.closest('nv-sidebar');
203
+ if (sidebar) {
204
+ this.mutationObserver = new MutationObserver(() => {
205
+ this.checkSidebarCollapsed();
206
+ });
207
+ this.mutationObserver.observe(sidebar, {
208
+ attributes: true,
209
+ attributeFilter: ['collapsed'],
210
+ });
211
+ }
212
+ // Watch for sub-items active state changes
213
+ if (this.hasSubitems) {
214
+ // Observe the subitems container for changes (including new sub-items being added)
215
+ // Using subtree: true to catch all attribute changes in descendants
216
+ const subitemsContainer = this.el.querySelector('.nv-sidebarnavitem-subitems');
217
+ if (subitemsContainer) {
218
+ this.subitemsMutationObserver = new MutationObserver(() => {
219
+ this.updateActiveFromSubitems();
220
+ });
221
+ // Observe the container for child list changes and attribute changes in descendants
222
+ this.subitemsMutationObserver.observe(subitemsContainer, {
223
+ childList: true,
224
+ subtree: true,
225
+ attributes: true,
226
+ attributeFilter: ['active'],
227
+ });
228
+ }
229
+ else {
230
+ // If container doesn't exist yet (not collapsible or not rendered), observe the element itself
231
+ // This handles cases where sub-items are direct children
232
+ this.subitemsMutationObserver = new MutationObserver(() => {
233
+ this.updateActiveFromSubitems();
234
+ });
235
+ this.subitemsMutationObserver.observe(this.el, {
236
+ childList: true,
237
+ subtree: true,
238
+ attributes: true,
239
+ attributeFilter: ['active'],
240
+ });
241
+ }
242
+ }
243
+ // Initial check for active subitems
244
+ this.updateActiveFromSubitems();
245
+ }
246
+ disconnectedCallback() {
247
+ if (this.mutationObserver) {
248
+ this.mutationObserver.disconnect();
249
+ }
250
+ if (this.subitemsMutationObserver) {
251
+ this.subitemsMutationObserver.disconnect();
252
+ }
253
+ }
254
+ //#endregion LIFECYCLE
255
+ /****************************************************************************/
256
+ //#region WATCHERS
257
+ onOpenChanged(newValue, oldValue) {
258
+ // Only animate if the value actually changed (prevents false triggers from React re-renders)
259
+ if (newValue === oldValue) {
260
+ return;
261
+ }
262
+ // Force update when open state changes (user clicked toggle)
263
+ this.updateSubitemsHeight(true);
264
+ // Update active state based on subitems when open state changes
265
+ this.updateActiveFromSubitems();
266
+ }
267
+ //#endregion WATCHERS
268
+ /****************************************************************************/
269
+ //#region RENDER
270
+ render() {
271
+ const showNotificationBullet = this.notificationCount !== undefined && this.notificationCount > 0;
272
+ const notificationSize = this.isSidebarCollapsed ? 'reduced' : 'default';
273
+ return (index.h(index.Host, { key: 'c0c9c63cb295441389b5ced9a4b0a0d5a1af99cd', role: "listitem" }, index.h("div", { key: '6673c3f4c14762bff8512ecc430febddfa74b307', class: "nv-sidebarnavitem-trigger", onClick: this.handleToggle, "aria-expanded": this.collapsible ? String(this.open) : undefined, "aria-current": this.active && !this.collapsible ? 'page' : undefined }, this.icon && (index.h("div", { key: '25f703e9fb7375b8b562be54f080120ae037dd9f', class: "nv-sidebarnavitem-icon" }, index.h("nv-icon", { key: '1a4e345c90afcec159890db6c6b0e22d53dd673d', name: this.icon, size: "md" }), showNotificationBullet && this.isSidebarCollapsed && (index.h("nv-notification-bullet", { key: '15b69d1a2325daed7d6583ed10906fe4e91809e5', count: this.notificationCount, size: notificationSize, contrastingBorder: true })))), index.h("div", { key: 'c717c09f39eab07616de419a35b11a5b7dfce5d1', class: "nv-sidebarnavitem-content" }, index.h("slot", { key: '9f8687f151fd082a6737e7fbe6036cc3ebff3cc2' })), index.h("div", { key: 'b2c3d7a4c30ce96273731a05a1d361f5654582de', class: "nv-sidebarnavitem-trailing" }, index.h("slot", { key: 'acf2dddbbbc7d2e83703c731a244237e0dc81153', name: "trailing" }), showNotificationBullet && !this.isSidebarCollapsed && (index.h("nv-notification-bullet", { key: 'adca5c7418a3b58afa5ef21ddd3fa9b2d880a56c', count: this.notificationCount, size: notificationSize })), this.collapsible && (index.h("nv-icon", { key: 'a4a4369d4ba76f567cca439d1b4c7e95ad5ba98c', name: "chevron-down", size: "sm", class: "nv-sidebarnavitem-chevron" })))), this.collapsible && this.hasSubitems && (index.h("div", { key: '2d4fadb0b547eb369a702bb8210b3312dde505b2', class: "nv-sidebarnavitem-subitems", ref: el => {
274
+ // Only update ref and initialize if element changed or not yet initialized
275
+ if (el !== this.subitemsRef) {
276
+ this.subitemsRef = el;
277
+ if (el && !this.hasInitializedHeight) {
278
+ // Initialize height only on first mount, not on re-renders
279
+ this.hasInitializedHeight = true;
280
+ requestAnimationFrame(() => {
281
+ // Only animate if item is open, otherwise it will animate when opened
282
+ if (this.open) {
283
+ this.updateSubitemsHeight();
284
+ }
285
+ });
286
+ }
287
+ }
288
+ } }, index.h("slot", { key: 'f0ffb970aa2d84580205ba110858d3f1c27875a3', name: "subitems" })))));
289
+ }
290
+ get el() { return index.getElement(this); }
291
+ static get watchers() { return {
292
+ "open": ["onOpenChanged"]
293
+ }; }
294
+ };
295
+ NvSidebarnavitem.style = nvSidebarnavitemCss;
296
+
297
+ exports.nv_sidebarnavitem = NvSidebarnavitem;
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CtjeeUI-.js');
4
+ require('@stencil/react-output-target/runtime');
5
+ require('react');
6
+ require('react-dom');
7
+
8
+ const nvSidebarnavsubitemCss = "nv-sidebarnavsubitem{display:flex;align-items:center;gap:var(--spacing-2);padding:var(--sidebar-item-padding-y) var(--sidebar-item-padding-x) var(--sidebar-item-padding-y) calc(var(--sidebar-sub-item-padding-left) + var(--sidebar-item-padding-x));cursor:pointer;transition:all 0.15s ease;position:relative;min-height:var(--spacing-10);background-color:var(--color-interaction-container-neutral-background);border-radius:var(--sidebar-item-radius);--nv-component-background:var(--color-interaction-container-neutral-background)}nv-sidebarnavsubitem:hover{background-color:var(--color-interaction-container-neutral-background-hover);--nv-component-background:var(--color-interaction-container-neutral-background-hover)}nv-sidebarnavsubitem:focus,nv-sidebarnavsubitem:focus-within{outline:none}nv-sidebarnavsubitem:focus-visible,nv-sidebarnavsubitem:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-sidebarnavsubitem .nv-sidebarnavsubitem-indicator{display:none}nv-sidebarnavsubitem .nv-sidebarnavsubitem-content{flex:1;display:flex;align-items:center;gap:var(--spacing-2);font-size:var(--font-size-sm);color:var(--color-content-medium-text);text-decoration:none;font-weight:var(--font-weight-medium-emphasis)}nv-sidebarnavsubitem .nv-sidebarnavsubitem-content a{color:inherit !important;text-decoration:none !important;font-weight:var(--font-weight-medium-emphasis) !important;flex:1}nv-sidebarnavsubitem:hover .nv-sidebarnavsubitem-content{color:var(--color-content-medium-text)}nv-sidebarnavsubitem[active]{background-color:var(--color-interaction-container-neutral-background-active);--nv-component-background:var(--color-interaction-container-neutral-background-active)}nv-sidebarnavsubitem[active] .nv-sidebarnavsubitem-content{color:var(--color-interaction-container-neutral-text-active);font-weight:var(--font-weight-high-emphasis)}nv-sidebarnavsubitem .nv-sidebarnavsubitem-trailing{display:flex;align-items:center}nv-sidebar[collapsed] nv-sidebarnavsubitem .nv-sidebarnavsubitem-content{max-width:0;opacity:0;margin:0;overflow:hidden;transition:opacity 0.2s ease, max-width 0.2s ease}nv-sidebar[collapsed] nv-sidebarnavsubitem .nv-sidebarnavsubitem-indicator{margin-right:0;width:var(--spacing-6);justify-content:center}nv-sidebar[collapsed] nv-sidebarnavsubitem .nv-sidebarnavsubitem-trailing{display:none}";
9
+
10
+ const NvSidebarnavsubitem = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ /****************************************************************************/
14
+ //#region PROPERTIES
15
+ /**
16
+ * Whether this sub-item represents the active/current page.
17
+ */
18
+ this.active = false;
19
+ }
20
+ //#endregion PROPERTIES
21
+ /****************************************************************************/
22
+ //#region METHODS
23
+ // Note: We no longer use stopPropagation() here because it prevents React Router
24
+ // (and other SPA routers) from receiving the click event due to event delegation.
25
+ // Instead, the parent nv-sidebarnavitem checks if clicks originate from subitems.
26
+ //#endregion METHODS
27
+ /****************************************************************************/
28
+ //#region RENDER
29
+ render() {
30
+ return (index.h(index.Host, { key: '8ae8c5e2038145bd458a35d237495a06fde97294', role: "listitem", "aria-current": this.active ? 'page' : undefined }, index.h("div", { key: '559a99d72973f7af43091c5c920e77d8cad3944c', class: "nv-sidebarnavsubitem-indicator" }), index.h("div", { key: '204c7ad681d51310f43b618ef14a12d0ccc93ddc', class: "nv-sidebarnavsubitem-content" }, index.h("slot", { key: 'f4717aee216fbeac4dbfe0d98b34fe7e83476701' })), index.h("div", { key: 'b5db84c75ae4e51d8a048000a49697eaf4b20f1d', class: "nv-sidebarnavsubitem-trailing" }, index.h("slot", { key: 'b6d0afcd6b4ace60b32f531f414b70aba513a274', name: "trailing" }))));
31
+ }
32
+ };
33
+ NvSidebarnavsubitem.style = nvSidebarnavsubitemCss;
34
+
35
+ exports.nv_sidebarnavsubitem = NvSidebarnavsubitem;
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-WPRkQD3O.js');
3
+ var index = require('./index-CtjeeUI-.js');
4
+ require('@stencil/react-output-target/runtime');
4
5
  require('react');
5
6
  require('react-dom');
6
7
 
7
- const nvSplitCss = "nv-split{display:flex;width:100%;height:100%;position:relative}nv-split[direction=horizontal]{flex-direction:row}nv-split[direction=vertical]{flex-direction:column}nv-split .nv-split-gutter{position:absolute;z-index:10;background:transparent;display:flex;align-items:center;justify-content:center;flex:0 0 auto;transition:background-color 0.2s ease}nv-split .nv-split-gutter::after{content:\"\";position:absolute;background:var(--nv-color-neutral-400, #ccc);border-radius:2px;transition:background-color 0.2s ease}nv-split .nv-split-gutter:hover::after{background:var(--nv-color-brand-primary, #0066cc)}nv-split .nv-split-gutter::before{content:\"\";position:absolute;background-repeat:no-repeat;background-position:center;opacity:0.4;transition:opacity 0.2s ease;pointer-events:none}nv-split .nv-split-gutter:hover::before{opacity:0.7}nv-split[direction=horizontal]>.nv-split-gutter{width:var(--nv-split-gutter-size, 24px);top:0;bottom:0;transform:translateX(-50%);cursor:col-resize}nv-split[direction=horizontal]>.nv-split-gutter::after{width:2px;height:60%;left:50%;top:20%;transform:translateX(-50%)}nv-split[direction=horizontal]>.nv-split-gutter::before{width:16px;height:16px}nv-split[direction=vertical]>.nv-split-gutter{height:var(--nv-split-gutter-size, 24px);left:0;right:0;transform:translateY(-50%);cursor:row-resize}nv-split[direction=vertical]>.nv-split-gutter::after{height:2px;width:60%;top:50%;left:20%;transform:translateY(-50%)}nv-split[direction=vertical]>.nv-split-gutter::before{width:16px;height:16px}nv-split[data-dragging=true]>.nv-split-gutter::after{background:var(--nv-color-neutral-500, #9ca3af)}nv-split>[slot=pane]{flex:1 1 auto;overflow:hidden;min-width:0;min-height:0;display:flex;flex-direction:column}nv-split>[slot=pane]>nv-split{flex:1 1 auto;width:100%;height:100%}";
8
- const NvSplitStyle0 = nvSplitCss;
8
+ const nvSplitCss = "nv-split{display:flex;width:100%;height:100%;position:relative}nv-split[direction=horizontal]{flex-direction:row}nv-split[direction=vertical]{flex-direction:column}nv-split .nv-split-gutter{position:absolute;z-index:10;background:transparent;display:flex;align-items:center;justify-content:center;flex:0 0 auto;transition:background-color 0.2s ease}nv-split .nv-split-gutter::after{content:\"\";position:absolute;background:var(--components-splitter-line-background);transition:background-color 0.2s ease}nv-split .nv-split-gutter:hover::after{background:var(--components-splitter-line-background-hover)}nv-split .nv-split-gutter::before{content:\"\";background:var(--components-splitter-handle-background);position:absolute;background-repeat:no-repeat;background-position:center;transition:all 0.2s ease;pointer-events:none}nv-split[direction=horizontal]>.nv-split-gutter{width:var(--splitter-gutter);top:0;bottom:0;transform:translateX(-50%);cursor:col-resize}nv-split[direction=horizontal]>.nv-split-gutter::after{width:var(--splitter-line-width);background-color:var(--components-splitter-line-background);height:100%;left:50%;top:0%;transform:translateX(-50%)}nv-split[direction=horizontal]>.nv-split-gutter:hover::after{background-color:var(--components-splitter-line-background-hover)}nv-split[direction=horizontal]>.nv-split-gutter:active::after{background-color:var(--components-splitter-line-background-active)}nv-split[direction=horizontal]>.nv-split-gutter::before{background-color:var(--components-splitter-handle-background);width:var(--splitter-handle-wide);height:var(--splitter-handle-long);border-radius:var(--splitter-handle-radius);z-index:11;transition:all 0.2s ease}nv-split[direction=horizontal]>.nv-split-gutter:hover::before{background-color:var(--components-splitter-handle-background-hover)}nv-split[direction=horizontal]>.nv-split-gutter:active::before{background-color:var(--components-splitter-handle-background-active)}nv-split[direction=vertical]>.nv-split-gutter{height:var(--splitter-gutter);left:0;right:0;transform:translateY(-50%);cursor:row-resize}nv-split[direction=vertical]>.nv-split-gutter::after{height:var(--splitter-line-width);background-color:var(--components-splitter-line-background);width:100%;top:50%;left:0%;transform:translateY(-50%)}nv-split[direction=vertical]>.nv-split-gutter:hover::after{background-color:var(--components-splitter-line-background-hover)}nv-split[direction=vertical]>.nv-split-gutter:active::after{background-color:var(--components-splitter-line-background-active)}nv-split[direction=vertical]>.nv-split-gutter::before{background-color:var(--components-splitter-handle-background);width:var(--splitter-handle-long);height:var(--splitter-handle-wide);border-radius:var(--splitter-handle-radius);z-index:11;transition:all 0.2s ease}nv-split[direction=vertical]>.nv-split-gutter:hover::before{background-color:var(--components-splitter-handle-background-hover)}nv-split[direction=vertical]>.nv-split-gutter:active::before{background-color:var(--components-splitter-handle-background-active)}nv-split[data-dragging=true]>.nv-split-gutter::after{background:var(--components-splitter-line-background-active)}nv-split>[slot=pane]{flex:1 1 auto;overflow:hidden;min-width:0;min-height:0;display:flex;flex-direction:column}nv-split>[slot=pane]>nv-split{flex:1 1 auto;width:100%;height:100%}";
9
9
 
10
10
  const NvSplit = class {
11
11
  constructor(hostRef) {
12
12
  index.registerInstance(this, hostRef);
13
- this.sizesChanged = index.createEvent(this, "sizesChanged");
13
+ this.sizesChanged = index.createEvent(this, "sizesChanged", 3);
14
14
  /****************************************************************************/
15
15
  //#region PROPERTIES
16
16
  /**
@@ -324,7 +324,7 @@ const NvSplit = class {
324
324
  /****************************************************************************/
325
325
  //#region RENDER
326
326
  render() {
327
- return (index.h(index.Host, { key: '6b1fd4447295f209a9b0ea95b7d2a07200204504', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: '67089b66457c4ad64abb80749d64ca67c881a1c0', name: "pane" }), index.h("slot", { key: '2fe9da5dd2aa2ff5b14bdd9ea99e9f0fa027931d', name: "gutter" })));
327
+ return (index.h(index.Host, { key: '2266f982349909b08637721e0bf5d8792fa2f3aa', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: '0b0845ae2f93bb137692fd570beaa2e26816c1c9', name: "pane" }), index.h("slot", { key: 'ac322712eb7024dde9efc41dac946196fd15a786', name: "gutter" })));
328
328
  }
329
329
  get el() { return index.getElement(this); }
330
330
  static get watchers() { return {
@@ -332,6 +332,6 @@ const NvSplit = class {
332
332
  "direction": ["onDirectionChanged"]
333
333
  }; }
334
334
  };
335
- NvSplit.style = NvSplitStyle0;
335
+ NvSplit.style = nvSplitCss;
336
336
 
337
337
  exports.nv_split = NvSplit;
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-WPRkQD3O.js');
4
- var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
3
+ var index = require('./index-CtjeeUI-.js');
4
+ var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
+ require('@stencil/react-output-target/runtime');
5
6
  require('react');
6
7
  require('react-dom');
7
8
 
8
9
  const nvStackCss = "nv-stack{display:flex;align-items:center;justify-content:flex-start;flex-direction:row}nv-stack nv-col{display:flex}nv-stack:not(nv-row){flex-wrap:nowrap}nv-stack>.nv-stack-item-flex{flex-shrink:1;flex-grow:1}nv-stack>.nv-stack-item-lead{margin-right:auto}nv-stack>.nv-stack-item-lead+*{margin-left:0}nv-stack>.nv-stack-item-center{margin-right:auto;margin-left:auto}nv-stack>.nv-stack-item-tail{margin-left:auto}nv-stack>.nv-stack-nowrap{white-space:nowrap}nv-stack.nv-stack-vertical{align-items:stretch;flex-direction:column}nv-stack.nv-stack-vertical>.nv-stack-item-lead{margin-right:0;margin-bottom:auto}nv-stack.nv-stack-vertical>.nv-stack-item-lead+*{margin-top:0}nv-stack.nv-stack-vertical>.nv-stack-item-tail{margin-left:0;margin-top:auto}nv-stack.nv-stack-vertical>.nv-stack-item-center{margin:auto 0}nv-stack.nv-stack-flex>*{flex-shrink:1;flex-grow:1}nv-stack.nv-stack-fill>*{height:100%}nv-stack.nv-stack-fill.nv-stack-vertical>*{height:auto;width:100%}";
9
- const NvStackStyle0 = nvStackCss;
10
10
 
11
11
  const NvStack = class {
12
12
  constructor(hostRef) {
@@ -23,9 +23,9 @@ const NvStack = class {
23
23
  /****************************************************************************/
24
24
  //#region RENDER
25
25
  render() {
26
- return (index.h(index.Host, { key: '65adeb492f9eb9b709c809d65b52f4447d1c938d', class: clsx297c1ffe.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: '09773d6affbc9bf3c18e75162d9c096dd31a48e7' })));
26
+ return (index.h(index.Host, { key: 'fbdaf5b2fb134b050883a512b4aeb96b070017c1', class: clsxChV9xqsO.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: '6c7c231b8ff2575a1b509539d227468629fae6ab' })));
27
27
  }
28
28
  };
29
- NvStack.style = NvStackStyle0;
29
+ NvStack.style = nvStackCss;
30
30
 
31
31
  exports.nv_stack = NvStack;
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-WPRkQD3O.js');
3
+ var index = require('./index-CtjeeUI-.js');
4
+ require('@stencil/react-output-target/runtime');
4
5
  require('react');
5
6
  require('react-dom');
6
7
 
@@ -180,7 +181,6 @@ function updateCellWidthFromResize(state, event, minWidth = TABLE_CONSTANTS.MIN_
180
181
  }
181
182
 
182
183
  const nvTableCss = "nv-table table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:max-content;min-width:100%;background:var(--color-level-00-background)}nv-table table thead{background:var(--components-datagrid-header-background)}nv-table table tbody tr:hover td{background:var(--components-datagrid-body-background-hover)}nv-table table tbody tr[data-selected]{background:var(--components-datagrid-body-background-active)}nv-table table td{height:var(--spacing-16);padding:var(--datagrid-cell-body-padding-y) var(--datagrid-cell-body-padding-x) var(--spacing-2) var(--datagrid-cell-body-padding-x);font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);background:var(--components-datagrid-body-background-default);border-bottom:1px solid var(--components-datagrid-body-border)}nv-table table th{position:relative;text-align:left;padding:var(--datagrid-cell-header-padding-y) var(--datagrid-cell-header-padding-right) var(--datagrid-cell-header-padding-y) var(--datagrid-cell-header-padding-x);padding-right:calc(var(--datagrid-cell-header-padding-right) + 12px);color:var(--color-content-low-text);font-variant-numeric:lining-nums tabular-nums slashed-zero;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-high-emphasis);line-height:var(--line-height-base);min-width:40px;border-bottom:1px solid var(--components-datagrid-header-border);background:var(--components-datagrid-header-background)}nv-table table th::after{content:\"\";position:absolute;top:0;right:0;width:12px;height:50%;transform:translateY(50%);cursor:col-resize;background:linear-gradient(90deg, transparent 0%, transparent calc(50% - 1px), var(--components-datagrid-header-border), calc(50% - 1px), var(--components-datagrid-header-border) calc(50% + 1px), transparent calc(50% + 1px), transparent 100%);opacity:0;transition:opacity 0.05s ease-in-out}nv-table table th[data-grow]{width:unset}nv-table table th:hover::after{opacity:1}nv-table table th[data-no-resize]::after{display:none}nv-table [data-sticky-left]{position:sticky;z-index:1;background:var(--color-level-00-background);left:0;top:0}nv-table [data-sticky-right]{position:sticky;z-index:1;background:var(--color-level-00-background);right:0;top:0}nv-table [data-sticky-top] th{position:sticky;z-index:1;background:var(--color-level-00-background);top:0}";
183
- const NvTableStyle0 = nvTableCss;
184
184
 
185
185
  const NvTable = class {
186
186
  constructor(hostRef) {
@@ -236,10 +236,10 @@ const NvTable = class {
236
236
  /****************************************************************************/
237
237
  //#region RENDER
238
238
  render() {
239
- return (index.h(index.Host, { key: '684a51e016d83eeb0ab76f07fe6d26a06bf00457' }, index.h("slot", { key: '420b9cbcb641692ed95d54ec2e0af1c0b09776c3' })));
239
+ return (index.h(index.Host, { key: 'ec194bed7ec58642be9f6b52a737e2f9375a152e' }, index.h("slot", { key: '009ce0f20491156ca93141c85683f0be499a9938' })));
240
240
  }
241
241
  get host() { return index.getElement(this); }
242
242
  };
243
- NvTable.style = NvTableStyle0;
243
+ NvTable.style = nvTableCss;
244
244
 
245
245
  exports.nv_table = NvTable;
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-WPRkQD3O.js');
3
+ var index = require('./index-CtjeeUI-.js');
4
+ require('@stencil/react-output-target/runtime');
4
5
  require('react');
5
6
  require('react-dom');
6
7
 
7
- const nvTableheaderCss = "nv-tableheader{display:inline-flex;width:100%;align-items:center;gap:var(--spacing-2)}nv-tableheader:focus-visible{border-radius:var(--radius-rounded-sm)}nv-tableheader:focus-visible:focus,nv-tableheader:focus-visible:focus-within{outline:none}nv-tableheader:focus-visible:focus-visible,nv-tableheader:focus-visible:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-tableheader nv-iconbutton{transition:transform 120ms ease, opacity 120ms ease}nv-tableheader nv-iconbutton svg{transition:transform 240ms ease}nv-tableheader nv-iconbutton.is-none{opacity:0.5}nv-tableheader nv-iconbutton.is-desc svg{transform:rotate(180deg)}";
8
- const NvTableheaderStyle0 = nvTableheaderCss;
8
+ const nvTableheaderCss = "nv-tableheader{display:inline-flex;width:100%;align-items:center;gap:var(--spacing-2)}nv-tableheader:focus-visible:focus,nv-tableheader:focus-visible:focus-within{outline:none}nv-tableheader:focus-visible:focus-visible,nv-tableheader:focus-visible:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-tableheader:focus-visible{border-radius:var(--radius-rounded-sm)}nv-tableheader nv-iconbutton{transition:transform 120ms ease, opacity 120ms ease}nv-tableheader nv-iconbutton svg{transition:transform 240ms ease}nv-tableheader nv-iconbutton.is-none{opacity:0.5}nv-tableheader nv-iconbutton.is-desc svg{transform:rotate(180deg)}";
9
9
 
10
10
  const NvTableheader = class {
11
11
  constructor(hostRef) {
12
12
  index.registerInstance(this, hostRef);
13
- this.sortDirectionChanged = index.createEvent(this, "sortDirectionChanged");
13
+ this.sortDirectionChanged = index.createEvent(this, "sortDirectionChanged", 3);
14
14
  /****************************************************************************/
15
15
  //#region PROPERTIES
16
16
  /**
@@ -62,7 +62,7 @@ const NvTableheader = class {
62
62
  /****************************************************************************/
63
63
  //#region RENDER
64
64
  render() {
65
- return (index.h(index.Host, { key: '03d7e74c19c0c1ef54f4d6f53eab0964af821f57', role: "columnheader", "aria-sort": this.ariaSort, tabindex: this.sortable ? 0 : undefined, onKeyDown: this.handleKeyDown.bind(this), onClick: this.cycleSortDirection.bind(this) }, index.h("slot", { key: '7408d11ba38b59f05bcdcffcb55d11ae36f93a34' }), this.sortable && (index.h("span", { key: 'c76ddbf61861d9cd45eb7b0d8c59095947677135', class: "sort-icon-wrap", "aria-hidden": "true" }, index.h("nv-iconbutton", { key: '6d59b4b14dfe588142ccba2e1dc452754ea5a2f7', disableTabindex: true, name: "arrow-up", size: "xs", emphasis: this.sortDirection === 'none' ? 'lower' : 'low',
65
+ return (index.h(index.Host, { key: '89ea12419a6f07d3b945a2dec3ca40a169d1bf85', role: "columnheader", "aria-sort": this.ariaSort, tabindex: this.sortable ? 0 : undefined, onKeyDown: this.handleKeyDown.bind(this), onClick: this.cycleSortDirection.bind(this) }, index.h("slot", { key: '447c9f44b779cb7003209c3965127433e33f1ea9' }), this.sortable && (index.h("span", { key: 'bb4d1545d83b5fd2ce0b6860cdabbe22fe0f8ed0', class: "sort-icon-wrap", "aria-hidden": "true" }, index.h("nv-iconbutton", { key: '03b14162d5a1f2e8cccc5fa2e49af9cdd247d4e7', disableTabindex: true, name: "arrow-up", size: "xs", emphasis: this.sortDirection === 'none' ? 'lower' : 'low',
66
66
  // prevent mousedown from selecting text
67
67
  onMouseDown: (e) => e.preventDefault(), class: {
68
68
  'is-none': this.sortDirection === 'none',
@@ -70,6 +70,6 @@ const NvTableheader = class {
70
70
  } })))));
71
71
  }
72
72
  };
73
- NvTableheader.style = NvTableheaderStyle0;
73
+ NvTableheader.style = nvTableheaderCss;
74
74
 
75
75
  exports.nv_tableheader = NvTableheader;
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-WPRkQD3O.js');
4
- var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
- var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
3
+ var index = require('./index-CtjeeUI-.js');
4
+ var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
+ var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
6
+ require('@stencil/react-output-target/runtime');
6
7
  require('react');
7
8
  require('react-dom');
8
9
 
9
10
  const nvToggleCss = "nv-toggle{display:inline-flex;align-items:flex-start;gap:var(--form-gap-x);position:relative}nv-toggle:not([disabled],[readonly]) input,nv-toggle:not([disabled],[readonly]) label{cursor:pointer}nv-toggle.label-placement-before{flex-direction:row-reverse}nv-toggle[disabled]{opacity:0.5}nv-toggle label{align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-toggle label.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-toggle .input-container{position:relative;color:var(--components-form-shape-foreground-default)}nv-toggle .input-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--components-form-shape-foreground-disabled)}nv-toggle .input-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-toggle-width);height:var(--form-toggle-height);flex-direction:column;align-items:flex-start;border-radius:var(--form-toggle-radius);border-width:var(--form-toggle-border-width);border-style:solid;border-color:var(--components-toggle-border-default);background:var(--components-toggle-background-default)}nv-toggle .input-container input[type=checkbox]::after{content:\"\";display:block;width:var(--form-toggle-switch-dot-default);height:var(--form-toggle-switch-dot-default);background-color:var(--components-toggle-shape-default);border-radius:var(--radius-rounded-full);position:absolute;top:50%;left:25%;transform:translate(-50%, -50%)}nv-toggle .input-container input[type=checkbox]:hover{border-color:var(--components-toggle-border-hover)}nv-toggle .input-container input[type=checkbox]:hover::after{background-color:var(--components-toggle-shape-hover)}nv-toggle .input-container input[type=checkbox]:focus{border-color:var(--components-toggle-border-default)}nv-toggle .input-container input[type=checkbox]:focus::after{background-color:var(--components-toggle-shape-default)}nv-toggle .input-container input[type=checkbox]:focus,nv-toggle .input-container input[type=checkbox]:focus-within{outline:none}nv-toggle .input-container input[type=checkbox]:focus-visible,nv-toggle .input-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-toggle .input-container input[type=checkbox]:checked{background:var(--components-toggle-background-default-checked);border-color:var(--components-toggle-border-default-checked)}nv-toggle .input-container input[type=checkbox]:checked::after{content:\"\";display:block;width:var(--form-toggle-switch-dot-default);height:var(--form-toggle-switch-dot-default);background-color:var(--components-toggle-shape-default-checked);border-radius:var(--radius-rounded-full);position:absolute;top:50%;left:75%;transform:translate(-50%, -50%)}nv-toggle .input-container input[type=checkbox]:checked:focus{background:var(--components-toggle-background-default-checked);border-color:var(--components-toggle-border-default-checked)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]){box-shadow:unset;background:var(--components-toggle-background-disabled);border-color:var(--components-toggle-border-default)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]):checked{background:var(--components-toggle-background-disabled-checked);border-color:var(--components-toggle-border-disabled-checked)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]):checked::after{background-color:var(--components-toggle-shape-disabled-checked)}nv-toggle .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:450;line-height:var(--form-description-line-height)}nv-toggle .text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}";
10
- const NvToggleStyle0 = nvToggleCss;
11
11
 
12
12
  const NvToggle = class {
13
13
  constructor(hostRef) {
14
14
  index.registerInstance(this, hostRef);
15
- this.checkedChanged = index.createEvent(this, "checkedChanged");
15
+ this.checkedChanged = index.createEvent(this, "checkedChanged", 3);
16
16
  /****************************************************************************/
17
17
  //#region PROPERTIES
18
18
  /**
@@ -21,7 +21,7 @@ const NvToggle = class {
21
21
  * automatically generated to ensure unique identification, facilitating
22
22
  * proper label association and accessibility.
23
23
  */
24
- this.inputId = v4A79185f4.v4();
24
+ this.inputId = v4BdYh22OP.v4();
25
25
  /**
26
26
  * Hides the label visually while still keeping it available for screen
27
27
  * readers.
@@ -66,8 +66,8 @@ const NvToggle = class {
66
66
  /****************************************************************************/
67
67
  //#region RENDER
68
68
  render() {
69
- return (index.h(index.Host, { key: 'c4307e84431894271a4fbe3ccd236f8b26d8d499', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: 'edb8c0ba8d92aa3864ff778a037bfb148601663a', class: "input-container" }, index.h("input", { key: 'f8be6f1936b390acdfaab0a87acea69d479e7a5a', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: 'c9dae62cda7d33fcd3dc4e1a2fd8173295a32ed3', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '365ed61ccd3ca72372998b4a3fc58d36de944f3a', htmlFor: this.inputId, class: clsx297c1ffe.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '77ee33f84756787e0f34507da294abb9514b703d', name: "label" }, this.label))), (this.description ||
70
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '5076c7b3cbf9f820592bb339df3251e280a9be9c', class: "description" }, index.h("slot", { key: '75f461109ac021aa51e6717ab56b1319a2b7f6ca', name: "description" }, this.description))))));
69
+ return (index.h(index.Host, { key: 'afeeed468bea015c59cdab86f85ee3b0145f8b11', class: clsxChV9xqsO.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: 'fd56a2b878f063549315f5b48fe1eb7b249a3503', class: "input-container" }, index.h("input", { key: '8e0a260d2c80bb303ff9b1f1921290060ef5c92c', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: '906d8bd545bffcc8f2e4deee3f760ae1366aa8b2', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'fa2e7120d3f8f0dedd7ef953a7648aa1dca80ec4', htmlFor: this.inputId, class: clsxChV9xqsO.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '598eb4b920bbc37c6dba5862e65221b586714728', name: "label" }, this.label))), (this.description ||
70
+ this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'fb4769f30a05fe2e953759990ff8922ebc906452', class: "description" }, index.h("slot", { key: '1e847c839e147d3a9aff41296e5d1d84266be9f5', name: "description" }, this.description))))));
71
71
  }
72
72
  static get formAssociated() { return true; }
73
73
  get el() { return index.getElement(this); }
@@ -75,6 +75,6 @@ const NvToggle = class {
75
75
  "checked": ["onCheckedChanged"]
76
76
  }; }
77
77
  };
78
- NvToggle.style = NvToggleStyle0;
78
+ NvToggle.style = nvToggleCss;
79
79
 
80
80
  exports.nv_toggle = NvToggle;
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CtjeeUI-.js');
4
+ require('@stencil/react-output-target/runtime');
5
+ require('react');
6
+ require('react-dom');
7
+
8
+ const nvTogglebuttonCss = "nv-togglebutton{display:inline-flex;justify-content:center;align-items:center}nv-togglebutton:focus-visible,nv-togglebutton:has(:focus-visible){z-index:1}nv-togglebutton[size=xs]{padding:var(--button-xs-padding-y) var(--button-xs-padding-x);gap:var(--button-xs-gap);border-radius:var(--button-xs-border-radius);line-height:var(--button-xs-line-height);height:var(--button-xs-height);font-size:var(--button-xs-font-size)}nv-togglebutton[size=xs] nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-togglebutton[size=xs]{padding-top:calc(var(--togglegroup-xs-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-xs-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-xs-button-radius));border-width:0}nv-togglebutton[size=sm]{padding:var(--button-sm-padding-y) var(--button-sm-padding-x);gap:var(--button-sm-gap);border-radius:var(--button-sm-border-radius);line-height:var(--button-sm-line-height);height:var(--button-sm-height);font-size:var(--button-sm-font-size)}nv-togglebutton[size=sm] nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-togglebutton[size=sm]{padding-top:calc(var(--togglegroup-sm-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-sm-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-sm-button-radius));border-width:0}nv-togglebutton[size=md]{padding:var(--button-md-padding-y) var(--button-md-padding-x);gap:var(--button-md-gap);border-radius:var(--button-md-border-radius);line-height:var(--button-md-line-height);height:var(--button-md-height);font-size:var(--button-md-font-size)}nv-togglebutton[size=md] nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-togglebutton[size=md]{padding-top:calc(var(--togglegroup-md-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-md-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-md-button-radius));border-width:0}nv-togglebutton[size=lg]{padding:var(--button-lg-padding-y) var(--button-lg-padding-x);gap:var(--button-lg-gap);border-radius:var(--button-lg-border-radius);line-height:var(--button-lg-line-height);height:var(--button-lg-height);font-size:var(--button-lg-font-size)}nv-togglebutton[size=lg] nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-togglebutton[size=lg]{padding-top:calc(var(--togglegroup-lg-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-lg-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-lg-button-radius));border-width:0}nv-togglebutton[emphasis=high]{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-togglebutton[emphasis=high]:hover{background:var(--components-button-low-background-hover);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text-hover)}nv-togglebutton[emphasis=high]:active{background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-togglebutton[emphasis=high]:focus,nv-togglebutton[emphasis=high]:focus-within{outline:none}nv-togglebutton[emphasis=high]:focus-visible,nv-togglebutton[emphasis=high]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-togglebutton[emphasis=high]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-togglebutton[emphasis=high][active]:not([active=false]){background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-togglebutton[emphasis=low]{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-togglebutton[emphasis=low]:hover{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}nv-togglebutton[emphasis=low]:active{background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-togglebutton[emphasis=low]:focus,nv-togglebutton[emphasis=low]:focus-within{outline:none}nv-togglebutton[emphasis=low]:focus-visible,nv-togglebutton[emphasis=low]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-togglebutton[emphasis=low]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-togglebutton[emphasis=low][active]:not([active=false]),nv-togglebutton[emphasis=low]:active{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}";
9
+
10
+ const NvTogglebutton = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.toggled = index.createEvent(this, "toggled", 7);
14
+ /****************************************************************************/
15
+ //#region PROPERTIES
16
+ /**
17
+ * Determines how large or small the togglebutton appears, allowing for
18
+ * customization of the togglebutton's dimensions to fit different design
19
+ * specifications and user needs.
20
+ */
21
+ this.size = 'md';
22
+ /**
23
+ * Prevents all interaction, rendering the toggle in a non-interactive state.
24
+ */
25
+ this.disabled = false;
26
+ /**
27
+ * Whether the button is active or not. Will not toggle automatically but
28
+ * needs to be controlled externally.
29
+ */
30
+ this.active = false;
31
+ /**
32
+ * Make it more or less visually prominent to users.
33
+ */
34
+ this.emphasis = 'high';
35
+ //#endregion PROPERTIES
36
+ /****************************************************************************/
37
+ //#region METHODS
38
+ this.handleClick = () => {
39
+ if (this.disabled)
40
+ return;
41
+ this.toggled.emit({
42
+ value: this.value,
43
+ active: this.active,
44
+ });
45
+ };
46
+ }
47
+ //#endregion METHODS
48
+ /****************************************************************************/
49
+ //#region LISTENERS
50
+ handleKeyDown(event) {
51
+ if (event.key === 'Enter' || event.key === ' ') {
52
+ event.preventDefault();
53
+ this.el.click();
54
+ }
55
+ }
56
+ /* eslint-enable nova/event-bubbling */
57
+ //#endregion EVENTS
58
+ /****************************************************************************/
59
+ //#region RENDER
60
+ render() {
61
+ return (index.h(index.Host, { key: '0285637cb14c292c67d767dc83b72f52c5368269', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: 'a84f303e76070b99ff2c01e5ec400f2e78503b19' })));
62
+ }
63
+ get el() { return index.getElement(this); }
64
+ };
65
+ NvTogglebutton.style = nvTogglebuttonCss;
66
+
67
+ exports.nv_togglebutton = NvTogglebutton;