@nova-design-system/nova-react 3.20.0 → 3.21.1-beta.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 (78) hide show
  1. package/dist/cjs/generated/components.server.js +106 -2
  2. package/dist/cjs/grow.animation-24ad5cf8-LUp_ITEx.js +111 -0
  3. package/dist/cjs/{index-BObVnP12.js → index-CEKdYnmK.js} +1794 -463
  4. package/dist/cjs/index.js +12 -1
  5. package/dist/cjs/{nv-accordion-item.entry-BBAGkmLI.js → nv-accordion-item.entry-zvp8yDql.js} +1 -1
  6. package/dist/cjs/{nv-accordion.entry-CvvtdLIz.js → nv-accordion.entry-D6gckOF4.js} +1 -1
  7. package/dist/cjs/{nv-alert.entry-w5XeFsrC.js → nv-alert.entry-Df8-nQ-R.js} +1 -1
  8. package/dist/cjs/{nv-avatar.entry-BxUZg-8h.js → nv-avatar.entry-ZOnVWP9L.js} +1 -1
  9. package/dist/cjs/{nv-badge_2.entry-DdSIFlJf.js → nv-badge_2.entry-DgiVv_Yf.js} +2 -2
  10. package/dist/cjs/{nv-breadcrumb.entry-CmbqGw3C.js → nv-breadcrumb.entry-IqtE1JL0.js} +1 -1
  11. package/dist/cjs/{nv-breadcrumbs.entry-DFHxtPKv.js → nv-breadcrumbs.entry-Be6dz7zI.js} +1 -1
  12. package/dist/cjs/nv-button.entry-CmswF3Si.js +164 -0
  13. package/dist/cjs/{nv-buttongroup.entry-wn9zFd_M.js → nv-buttongroup.entry-Cfe6rFSs.js} +1 -1
  14. package/dist/cjs/{nv-calendar.entry-Dldsa6dz.js → nv-calendar.entry-q83sS_dN.js} +1 -1
  15. package/dist/cjs/{nv-col.entry-DnG79KM1.js → nv-col.entry-Cu-Qi1bi.js} +1 -1
  16. package/dist/cjs/{nv-datagrid.entry-C2ML-e47.js → nv-datagrid.entry-Cx7SvD5S.js} +3 -3
  17. package/dist/cjs/{nv-datagridcolumn.entry-DcMPUtQS.js → nv-datagridcolumn.entry-B_uXKFLg.js} +1 -1
  18. package/dist/cjs/{nv-dialog.entry-C0Vx7dQc.js → nv-dialog.entry-J6Xwi6z1.js} +54 -20
  19. package/dist/cjs/{nv-dialogfooter_2.entry-BGq8Jiib.js → nv-dialogfooter_2.entry-DOlhqDTh.js} +3 -3
  20. package/dist/cjs/{nv-fieldcheckbox.entry-CAPwYnSU.js → nv-fieldcheckbox.entry-C23dGGX7.js} +5 -5
  21. package/dist/cjs/{nv-fielddate.entry-Byt5cmQi.js → nv-fielddate.entry-xWi3GpLl.js} +15 -18
  22. package/dist/cjs/{nv-fielddaterange.entry-CCFeFP2q.js → nv-fielddaterange.entry-BwFtpw9X.js} +8 -10
  23. package/dist/cjs/{nv-fielddropdown.entry-BFp_2vBC.js → nv-fielddropdown.entry-mnl7mSaK.js} +15 -6
  24. package/dist/cjs/{nv-fielddropdownitem.entry-D_4KdBY1.js → nv-fielddropdownitem.entry-DjyFlVXw.js} +3 -3
  25. package/dist/cjs/{nv-fieldmultiselect.entry-BaUD7Dcr.js → nv-fieldmultiselect.entry-BtLTG7nM.js} +2 -2
  26. package/dist/cjs/{nv-fieldnumber.entry-DOmhBrDv.js → nv-fieldnumber.entry-C00Hg70B.js} +4 -4
  27. package/dist/cjs/{nv-fieldpassword.entry-hogiPC5z.js → nv-fieldpassword.entry-BLg8tCN0.js} +4 -4
  28. package/dist/cjs/{nv-fieldradio.entry-CKbyWpIK.js → nv-fieldradio.entry-2hb1Ur40.js} +4 -4
  29. package/dist/cjs/{nv-fieldselect.entry-tpURNUEP.js → nv-fieldselect.entry-D-eYQpAv.js} +6 -6
  30. package/dist/cjs/{nv-fieldslider.entry-v0d92XEY.js → nv-fieldslider.entry-BGle1RZR.js} +4 -4
  31. package/dist/cjs/{nv-fieldtext.entry-DNYrOAhj.js → nv-fieldtext.entry-Djg8cqOa.js} +4 -4
  32. package/dist/cjs/{nv-fieldtextarea.entry-cRsjPwwR.js → nv-fieldtextarea.entry-Z32-s901.js} +4 -4
  33. package/dist/cjs/{nv-fieldtime.entry-BpGBUfKr.js → nv-fieldtime.entry-CDFGdfFL.js} +4 -4
  34. package/dist/cjs/nv-icon.entry-BDq7DKRt.js +80 -0
  35. package/dist/cjs/{nv-iconbutton_2.entry-DOv1RrkS.js → nv-iconbutton_2.entry-DdgEkFLK.js} +8 -3
  36. package/dist/cjs/{nv-menu.entry-C2L8F-nG.js → nv-menu.entry-iob0Kve8.js} +2 -2
  37. package/dist/cjs/{nv-menuitem.entry-DuDZTlJ1.js → nv-menuitem.entry-C989Ui60.js} +2 -2
  38. package/dist/cjs/nv-notification-bullet.entry-J8OkAZtU.js +77 -0
  39. package/dist/cjs/{nv-notification.entry-DxAj-mc7.js → nv-notification.entry-BxvJMKxH.js} +2 -2
  40. package/dist/cjs/{nv-notificationcontainer.entry-CUnTicXF.js → nv-notificationcontainer.entry-CxGCIb96.js} +2 -2
  41. package/dist/cjs/{nv-popover.entry-DVwa4DvW.js → nv-popover.entry-1KsO_KQm.js} +14 -98
  42. package/dist/cjs/{nv-row.entry-iLk2UglX.js → nv-row.entry-PBLq_BzJ.js} +2 -2
  43. package/dist/cjs/nv-sidebar.entry-CjLbvLqw.js +177 -0
  44. package/dist/cjs/nv-sidebarcontent.entry-Cv76IH4W.js +22 -0
  45. package/dist/cjs/nv-sidebardivider.entry-DYPJ_k73.js +22 -0
  46. package/dist/cjs/nv-sidebarfooter.entry-mGcMBRmv.js +22 -0
  47. package/dist/cjs/nv-sidebargroup.entry-DtwFliHZ.js +23 -0
  48. package/dist/cjs/nv-sidebarheader.entry-BdOYIXCA.js +22 -0
  49. package/dist/cjs/nv-sidebarlogo.entry-Da0kGsfw.js +32 -0
  50. package/dist/cjs/nv-sidebarnavitem.entry-D5xLfpwn.js +297 -0
  51. package/dist/cjs/nv-sidebarnavsubitem.entry-CkeJfHH4.js +35 -0
  52. package/dist/cjs/{nv-split.entry-BrMHK6TS.js → nv-split.entry-y66NBf88.js} +2 -2
  53. package/dist/cjs/{nv-stack.entry-C8jLJ5Ki.js → nv-stack.entry-CXjpkpbW.js} +2 -2
  54. package/dist/cjs/{nv-table.entry-D6o4g9Vo.js → nv-table.entry-quaVnLru.js} +2 -2
  55. package/dist/cjs/nv-tableheader.entry-DTBE2XQO.js +75 -0
  56. package/dist/cjs/{nv-toggle.entry-9iwmu7qi.js → nv-toggle.entry-CxUwF0pb.js} +3 -3
  57. package/dist/cjs/nv-togglebutton.entry-w-WEAmE6.js +56 -0
  58. package/dist/cjs/{nv-togglebuttongroup.entry-DWCytOhV.js → nv-togglebuttongroup.entry-UbrE8y7a.js} +2 -2
  59. package/dist/cjs/{nv-tooltip.entry-BMxnZVYA.js → nv-tooltip.entry-Dq2bkV33.js} +2 -2
  60. package/dist/components/{NvDatatable.js → NvDatatable/NvDatatable.js} +88 -46
  61. package/dist/components/NvDatatable/index.js +3 -0
  62. package/dist/components/NvDatatable/types.js +1 -0
  63. package/dist/components/NvDatatable/utils.js +5 -0
  64. package/dist/generated/components.js +88 -0
  65. package/dist/generated/components.server.js +95 -2
  66. package/dist/providers/NotificationProvider.js +27 -0
  67. package/dist/types/components/NvDatatable/NvDatatable.d.ts +7 -0
  68. package/dist/types/components/NvDatatable/index.d.ts +3 -0
  69. package/dist/types/components/{NvDatatable.d.ts → NvDatatable/types.d.ts} +18 -8
  70. package/dist/types/components/NvDatatable/utils.d.ts +2 -0
  71. package/dist/types/generated/components.d.ts +37 -0
  72. package/dist/types/generated/components.server.d.ts +37 -0
  73. package/dist/types/providers/NotificationProvider.d.ts +1 -0
  74. package/package.json +1 -1
  75. package/dist/cjs/events.utils-fe1d907f-01N__3wY.js +0 -23
  76. package/dist/cjs/nv-button.entry-Dyks6_mF.js +0 -159
  77. package/dist/cjs/nv-icon.entry-BfmyacWA.js +0 -80
  78. package/dist/cjs/nv-togglebutton.entry-N7_CSvzS.js +0 -56
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CEKdYnmK.js');
4
+ require('react');
5
+ require('react-dom');
6
+
7
+ const nvSidebargroupCss = "nv-sidebargroup{display:flex;flex-direction:column;gap:var(--spacing-1)}nv-sidebargroup .nv-sidebargroup-label{display:block;font-size:var(--font-size-sm);line-height:var(--line-height-sm);font-weight:var(--font-weight-medium-emphasis);color:var(--color-content-lower-text);letter-spacing:0;padding:var(--sidebar-primary-title-padding-y) var(--sidebar-primary-title-padding-x)}nv-sidebar[collapsed] nv-sidebargroup .nv-sidebargroup-label{display:none}";
8
+ const NvSidebargroupStyle0 = nvSidebargroupCss;
9
+
10
+ const NvSidebargroup = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ }
14
+ //#endregion PROPERTIES
15
+ /****************************************************************************/
16
+ //#region RENDER
17
+ render() {
18
+ return (index.h(index.Host, { key: 'c7b4e34d8237dc93adaa33f12d7cfda36a8ac269', role: "group", "aria-label": this.label }, this.label && index.h("div", { key: '7cafdf840b12c89604efda7895b764331c8054b7', class: "nv-sidebargroup-label" }, this.label), index.h("slot", { key: 'b6567a223f7cc05ce2874a632d38d6665c255659' })));
19
+ }
20
+ };
21
+ NvSidebargroup.style = NvSidebargroupStyle0;
22
+
23
+ exports.nv_sidebargroup = NvSidebargroup;
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CEKdYnmK.js');
4
+ require('react');
5
+ require('react-dom');
6
+
7
+ const nvSidebarheaderCss = "nv-sidebarheader{display:block}";
8
+ const NvSidebarheaderStyle0 = nvSidebarheaderCss;
9
+
10
+ const NvSidebarheader = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ }
14
+ /****************************************************************************/
15
+ //#region RENDER
16
+ render() {
17
+ return (index.h(index.Host, { key: '42d91f8325df19e8208ab045a057657c97bf3ff4' }, index.h("slot", { key: '42b4e5952fd55b95fe2934297929cef3bd1b226c' })));
18
+ }
19
+ };
20
+ NvSidebarheader.style = NvSidebarheaderStyle0;
21
+
22
+ exports.nv_sidebarheader = NvSidebarheader;
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CEKdYnmK.js');
4
+ require('react');
5
+ require('react-dom');
6
+
7
+ const nvSidebarlogoCss = "nv-sidebarlogo{display:block}nv-sidebarlogo .nv-sidebarlogo-container{display:flex;align-items:center;gap:var(--spacing-3)}nv-sidebarlogo .nv-sidebarlogo-full,nv-sidebarlogo .nv-sidebarlogo-collapsed{height:var(--spacing-8);width:auto;object-fit:contain}nv-sidebarlogo .nv-sidebarlogo-collapsed{display:none}nv-sidebarlogo .nv-sidebarlogo-title{font-size:var(--nv-sidebarlogo-font-size, var(--font-size-md));font-weight:var(--nv-sidebarlogo-font-weight, var(--font-weight-high-emphasis));font-family:var(--nv-sidebarlogo-font-family, inherit);color:var(--color-content-high-text);white-space:nowrap;overflow:hidden;transition:opacity 0.2s ease, max-width 0.3s ease, margin-left 0.3s ease;max-width:200px;opacity:1}nv-sidebar[collapsed] nv-sidebarlogo .nv-sidebarlogo-full{display:none}nv-sidebar[collapsed] nv-sidebarlogo .nv-sidebarlogo-collapsed{display:block}nv-sidebar[collapsed] nv-sidebarlogo .nv-sidebarlogo-title{max-width:0;opacity:0;margin-left:0}nv-sidebar[collapsed] nv-sidebarlogo .nv-sidebarlogo-container{justify-content:center;align-items:center;gap:0;width:100%;min-height:var(--spacing-12);padding:0}";
8
+ const NvSidebarlogoStyle0 = nvSidebarlogoCss;
9
+
10
+ const NvSidebarlogo = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ //#endregion PROPERTIES
14
+ /****************************************************************************/
15
+ //#region CONSTANTS
16
+ // Default Nova logo SVG (expanded - icon only, text comes from label prop)
17
+ this.defaultLogo = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"%3E%3Cstyle%3E.cls-1{fill:%23f0801a;}%3C/style%3E%3Cpath class="cls-1" d="M25.71,2.13l-5.08,11.39c-.39.88-.38,1.92.13,2.73.74,1.17,2.19,1.59,3.42,1.07l14.26-6-3.14-2.27-10.89,4.66c-.15.06-.3-.09-.23-.24l4.34-9.31-2.81-2.03Z"/%3E%3Cpath class="cls-1" d="M4.29,10l9.22,8.4c.71.65,1.7.97,2.63.73,1.34-.34,2.2-1.58,2.09-2.91l-1.22-15.43-3.14,2.27,1.01,11.8c.01.16-.18.26-.3.15l-7.48-7.04-2.81,2.03Z"/%3E%3Cpath class="cls-1" d="M26.95,39.15l-2.59-12.2c-.2-.94-.82-1.78-1.71-2.13-1.29-.51-2.71,0-3.4,1.14l-8.01,13.24h3.87s6.07-10.18,6.07-10.18c.08-.14.3-.1.33.06l1.97,10.08h3.47Z"/%3E%3Cpath class="cls-1" d="M4.85,32.76l10.82-6.19c.83-.48,1.44-1.32,1.5-2.28.09-1.38-.83-2.58-2.13-2.89L0,17.82l1.2,3.68,11.54,2.67c.16.04.19.25.05.33l-9,4.96,1.07,3.3Z"/%3E%3Cpath class="cls-1" d="M40,20.11l-12.4-1.35c-.95-.1-1.94.22-2.56.96-.89,1.07-.84,2.58.03,3.58l10.08,11.74,1.2-3.69-7.77-8.94c-.11-.12,0-.32.16-.3l10.19,1.28,1.07-3.3Z"/%3E%3C/svg%3E';
18
+ // Default Nova icon (collapsed - same logo but will be displayed smaller)
19
+ this.defaultCollapsedLogo = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"%3E%3Cstyle%3E.cls-1{fill:%23f0801a;}%3C/style%3E%3Cpath class="cls-1" d="M25.71,2.13l-5.08,11.39c-.39.88-.38,1.92.13,2.73.74,1.17,2.19,1.59,3.42,1.07l14.26-6-3.14-2.27-10.89,4.66c-.15.06-.3-.09-.23-.24l4.34-9.31-2.81-2.03Z"/%3E%3Cpath class="cls-1" d="M4.29,10l9.22,8.4c.71.65,1.7.97,2.63.73,1.34-.34,2.2-1.58,2.09-2.91l-1.22-15.43-3.14,2.27,1.01,11.8c.01.16-.18.26-.3.15l-7.48-7.04-2.81,2.03Z"/%3E%3Cpath class="cls-1" d="M26.95,39.15l-2.59-12.2c-.2-.94-.82-1.78-1.71-2.13-1.29-.51-2.71,0-3.4,1.14l-8.01,13.24h3.87s6.07-10.18,6.07-10.18c.08-.14.3-.1.33.06l1.97,10.08h3.47Z"/%3E%3Cpath class="cls-1" d="M4.85,32.76l10.82-6.19c.83-.48,1.44-1.32,1.5-2.28.09-1.38-.83-2.58-2.13-2.89L0,17.82l1.2,3.68,11.54,2.67c.16.04.19.25.05.33l-9,4.96,1.07,3.3Z"/%3E%3Cpath class="cls-1" d="M40,20.11l-12.4-1.35c-.95-.1-1.94.22-2.56.96-.89,1.07-.84,2.58.03,3.58l10.08,11.74,1.2-3.69-7.77-8.94c-.11-.12,0-.32.16-.3l10.19,1.28,1.07-3.3Z"/%3E%3C/svg%3E';
20
+ }
21
+ //#endregion CONSTANTS
22
+ /****************************************************************************/
23
+ //#region RENDER
24
+ render() {
25
+ const logoSrc = this.logo || this.defaultLogo;
26
+ const collapsedLogoSrc = this.collapsedLogo || this.defaultCollapsedLogo;
27
+ return (index.h(index.Host, { key: 'ec2aba08293e4def2fe083c311b69cafe005cf5e' }, index.h("div", { key: '3a24d832a0bb5aa44264fe1fc3091878556649bd', class: "nv-sidebarlogo-container" }, index.h("img", { key: 'a9a08e7c5dd51902d9ffbda0d9216a4ffb186756', src: logoSrc, alt: this.label || 'Logo', class: "nv-sidebarlogo-full" }), index.h("img", { key: 'daef311e11c8d5ee6b823a4896be36ea5bd696cc', src: collapsedLogoSrc, alt: this.label || 'Logo', class: "nv-sidebarlogo-collapsed" }), this.label && index.h("span", { key: '9685e4c110e7bb7356f5d49b615105033a32a736', class: "nv-sidebarlogo-title" }, this.label))));
28
+ }
29
+ };
30
+ NvSidebarlogo.style = NvSidebarlogoStyle0;
31
+
32
+ exports.nv_sidebarlogo = NvSidebarlogo;
@@ -0,0 +1,297 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CEKdYnmK.js');
4
+ require('react');
5
+ require('react-dom');
6
+
7
+ const nvSidebarnavitemCss = "nv-sidebarnavitem{display:flex;flex-direction:column;gap:0}nv-sidebarnavitem .nv-sidebarnavitem-trigger{display:flex;align-items:center;gap:var(--sidebar-primary-item-gap-x);padding:var(--sidebar-primary-item-padding-y) var(--sidebar-primary-item-padding-x);border-radius:var(--sidebar-primary-item-radius);cursor:pointer;transition:all 0.15s ease;font-size:var(--sidebar-primary-item-font-size);font-weight:var(--font-weight-medium-emphasis);color:var(--color-content-low-text);background:var(--color-interaction-container-neutral-background);text-decoration:none;--nv-component-background:var(--color-interaction-container-neutral-background);--nv-sidebarnavitem-background:var(--color-interaction-container-neutral-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-primary-item-icon-size);height:var(--sidebar-primary-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-primary-notification-bullet-size-reduced:calc(\n var(--sidebar-primary-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;width:100%}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}";
8
+ const NvSidebarnavitemStyle0 = nvSidebarnavitemCss;
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 = NvSidebarnavitemStyle0;
296
+
297
+ exports.nv_sidebarnavitem = NvSidebarnavitem;
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CEKdYnmK.js');
4
+ require('react');
5
+ require('react-dom');
6
+
7
+ const nvSidebarnavsubitemCss = "nv-sidebarnavsubitem{display:flex;align-items:center;gap:var(--spacing-2);padding:var(--spacing-2) var(--spacing-3) var(--spacing-2) var(--list-dropdown-sub-item-padding-left);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-primary-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-orange-600);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}";
8
+ const NvSidebarnavsubitemStyle0 = nvSidebarnavsubitemCss;
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 = NvSidebarnavsubitemStyle0;
34
+
35
+ exports.nv_sidebarnavsubitem = NvSidebarnavsubitem;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BObVnP12.js');
3
+ var index = require('./index-CEKdYnmK.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -324,7 +324,7 @@ const NvSplit = class {
324
324
  /****************************************************************************/
325
325
  //#region RENDER
326
326
  render() {
327
- return (index.h(index.Host, { key: 'd0bcb4330d157fa239289fa7176c502bfe01d0b8', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: '490799f805f0833e5a33b480e205c8deb65f215b', name: "pane" }), index.h("slot", { key: '69d05ed6f6bbeac1f123ac100c753cf78ced3f08', name: "gutter" })));
327
+ return (index.h(index.Host, { key: 'df6a2141e14d1f691af162d1eae2e2763ffad014', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: 'ce9d941bc73fa6e12161f334d4cd86e9045f6271', name: "pane" }), index.h("slot", { key: 'a70c14b0989a758ad35dc3c611563f7d03be0d02', name: "gutter" })));
328
328
  }
329
329
  get el() { return index.getElement(this); }
330
330
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BObVnP12.js');
3
+ var index = require('./index-CEKdYnmK.js');
4
4
  var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
5
  require('react');
6
6
  require('react-dom');
@@ -23,7 +23,7 @@ const NvStack = class {
23
23
  /****************************************************************************/
24
24
  //#region RENDER
25
25
  render() {
26
- return (index.h(index.Host, { key: '8f771805224c769b5a87f5c550ddbcb8f888d002', 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: '6fcd46cfd74415d2f07c762b065e3aa0f0194764' })));
26
+ return (index.h(index.Host, { key: 'fbdaf5b2fb134b050883a512b4aeb96b070017c1', 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: '6c7c231b8ff2575a1b509539d227468629fae6ab' })));
27
27
  }
28
28
  };
29
29
  NvStack.style = NvStackStyle0;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BObVnP12.js');
3
+ var index = require('./index-CEKdYnmK.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -236,7 +236,7 @@ const NvTable = class {
236
236
  /****************************************************************************/
237
237
  //#region RENDER
238
238
  render() {
239
- return (index.h(index.Host, { key: 'b63510e2da93a1b98eb3813ba7ac9bed97b81c1f' }, index.h("slot", { key: '14fb76c397db4da5dfba94bce599d1e4d8992a6b' })));
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
  };
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CEKdYnmK.js');
4
+ require('react');
5
+ require('react-dom');
6
+
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;
9
+
10
+ const NvTableheader = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.sortDirectionChanged = index.createEvent(this, "sortDirectionChanged");
14
+ /****************************************************************************/
15
+ //#region PROPERTIES
16
+ /**
17
+ * Will render the header as sortable with the corresponding icon button.
18
+ * Allows the header to be tabbed, and trigger sorting via click or keyboard
19
+ * navigation
20
+ */
21
+ this.sortable = false;
22
+ /**
23
+ * The current sort direction of the header. Will be 'none' if the header is
24
+ * not sortable or if the sort direction is not set.
25
+ */
26
+ this.sortDirection = 'none';
27
+ }
28
+ //#endregion PROPERTIES
29
+ /****************************************************************************/
30
+ //#region METHODS
31
+ cycleSortDirection(e) {
32
+ if (!this.sortable)
33
+ return;
34
+ e === null || e === void 0 ? void 0 : e.preventDefault();
35
+ const next = {
36
+ none: 'asc',
37
+ asc: 'desc',
38
+ desc: 'none',
39
+ };
40
+ this.sortDirection = next[this.sortDirection];
41
+ this.sortDirectionChanged.emit(this.sortDirection);
42
+ }
43
+ handleKeyDown(event) {
44
+ if (!this.sortable)
45
+ return;
46
+ if (event.key === 'Enter' || event.key === ' ') {
47
+ event.preventDefault();
48
+ this.cycleSortDirection();
49
+ }
50
+ }
51
+ get ariaSort() {
52
+ const sortMap = {
53
+ none: 'none',
54
+ asc: 'ascending',
55
+ desc: 'descending',
56
+ };
57
+ if (!this.sortable)
58
+ return sortMap.none;
59
+ return sortMap[this.sortDirection];
60
+ }
61
+ //#endregion EVENTS
62
+ /****************************************************************************/
63
+ //#region RENDER
64
+ render() {
65
+ return (index.h(index.Host, { key: '6719336a9812b1d1abd161b955b841c1459fb584', 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: 'd559e3b7c74f6dcf8197e2d082310660a23291d6' }), this.sortable && (index.h("span", { key: '540c8c8cf3cccac47a3ece7d9be4e97c4e283690', class: "sort-icon-wrap", "aria-hidden": "true" }, index.h("nv-iconbutton", { key: 'ac713c7af3b5b2e452f02d0d77cb64398b0febd4', disableTabindex: true, name: "arrow-up", size: "xs", emphasis: this.sortDirection === 'none' ? 'lower' : 'low',
66
+ // prevent mousedown from selecting text
67
+ onMouseDown: (e) => e.preventDefault(), class: {
68
+ 'is-none': this.sortDirection === 'none',
69
+ 'is-desc': this.sortDirection === 'desc',
70
+ } })))));
71
+ }
72
+ };
73
+ NvTableheader.style = NvTableheaderStyle0;
74
+
75
+ exports.nv_tableheader = NvTableheader;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BObVnP12.js');
3
+ var index = require('./index-CEKdYnmK.js');
4
4
  var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
5
  var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
6
6
  require('react');
@@ -66,8 +66,8 @@ const NvToggle = class {
66
66
  /****************************************************************************/
67
67
  //#region RENDER
68
68
  render() {
69
- return (index.h(index.Host, { key: '65222149af4edb9f8fd2da7efe9a01e15dec4722', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '7edd5587281b5610269f1ac09826ce379abfae24', class: "input-container" }, index.h("input", { key: '30d3db3cbdc263259a5ba1bf8e637225c4db3b4a', 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: 'a8a6d3c2774560b7d43cda75882d90cc564f4c54', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'fe980a07df4901081fda42df758236da0b8a11d0', htmlFor: this.inputId, class: clsx297c1ffe.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '723cec5914c6c0bed7e14e61e2f64e83c8e8b7b8', name: "label" }, this.label))), (this.description ||
70
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'f811065ed06f0816d8f0f1f65d4c659cbde3f683', class: "description" }, index.h("slot", { key: '541946e3f33a315bf667999c30a44fd93fc5f07f', name: "description" }, this.description))))));
69
+ return (index.h(index.Host, { key: '1a217a31999750cb1c8f26af5407ef2d7277600c', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '35e39e8df6475ffa41cd8b811948454ba956e814', class: "input-container" }, index.h("input", { key: '359a584d868d37affcb7b5fe5c24fef71eae209e', 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: '3bc4c7d7ef8bca23391ede4b08eb596bab68289a', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '61be38f883222b69807c0e8b8540f6ad20ed0cf4', htmlFor: this.inputId, class: clsx297c1ffe.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: 'e5ad1f81fc6e98794931b5e6dc811d9cc6aa9c73', name: "label" }, this.label))), (this.description ||
70
+ this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'f1f0d41c28be40b24e17d9f6f29224fbb2f9f05e', class: "description" }, index.h("slot", { key: '5418c3c3195045200e9ad0eb4bc6438eee453fd9', name: "description" }, this.description))))));
71
71
  }
72
72
  static get formAssociated() { return true; }
73
73
  get el() { return index.getElement(this); }