@nova-design-system/nova-react 3.24.0 → 3.26.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 (97) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/dom.utils-CuXVGECR-8VY5SfMZ.js +177 -0
  3. package/dist/cjs/generated/components.server.js +82 -62
  4. package/dist/cjs/index-BeFrXZol.js +9699 -0
  5. package/dist/cjs/index.js +2 -1
  6. package/dist/cjs/{nv-accordion-item.entry-Bu1tAcCq.js → nv-accordion-item.entry-DtzjLTCo.js} +8 -7
  7. package/dist/cjs/{nv-accordion.entry-jWjLdX8w.js → nv-accordion.entry-DRcTfezT.js} +10 -8
  8. package/dist/cjs/{nv-alert.entry-E9ZJay_K.js → nv-alert.entry-86bfoXVx.js} +6 -4
  9. package/dist/cjs/nv-avatar.entry-mp2LJ6RA.js +68 -0
  10. package/dist/cjs/nv-badge_2.entry-BrDaHeqh.js +220 -0
  11. package/dist/cjs/nv-breadcrumb.entry-B2q7jJy2.js +49 -0
  12. package/dist/cjs/nv-breadcrumbs.entry-DKzST1uS.js +21 -0
  13. package/dist/cjs/nv-button.entry-CVgcU-bi.js +166 -0
  14. package/dist/cjs/{nv-buttongroup.entry-CuZCRsnV.js → nv-buttongroup.entry-CvuBGaGK.js} +12 -6
  15. package/dist/cjs/{nv-calendar.entry-CT3mASW6.js → nv-calendar.entry-BCcGhxzJ.js} +27 -19
  16. package/dist/cjs/{nv-col.entry--pCxkaTh.js → nv-col.entry-CzTahRVr.js} +3 -3
  17. package/dist/cjs/{nv-datagrid.entry-CGCEhO8C.js → nv-datagrid.entry-DWZxNqTE.js} +47 -184
  18. package/dist/cjs/{nv-datagridcolumn.entry-Fsqc7CT_.js → nv-datagridcolumn.entry-CzCzmdQl.js} +1 -1
  19. package/dist/cjs/{nv-dialog.entry-B6OYcZxQ.js → nv-dialog.entry-ByVD02QB.js} +19 -20
  20. package/dist/cjs/{nv-dialogfooter_2.entry-C4fP_n2-.js → nv-dialogfooter_2.entry-BmQcYJsD.js} +11 -29
  21. package/dist/cjs/{nv-drawer.entry-C5O4KvHU.js → nv-drawer.entry-C15JRJ3N.js} +19 -19
  22. package/dist/cjs/{nv-drawerfooter_2.entry-C-reYJXG.js → nv-drawerfooter_2.entry-DuDac_Os.js} +11 -29
  23. package/dist/cjs/nv-fieldcheckbox.entry-CwDOQzSW.js +179 -0
  24. package/dist/cjs/{nv-fielddate.entry-dqZDBVmm.js → nv-fielddate.entry-DKICGwc0.js} +15 -13
  25. package/dist/cjs/{nv-fielddaterange.entry-wNRasXky.js → nv-fielddaterange.entry-DGEK8F9p.js} +15 -14
  26. package/dist/cjs/{nv-fielddropdown.entry-BA15piWa.js → nv-fielddropdown.entry-BLS7lRzD.js} +33 -31
  27. package/dist/cjs/nv-fielddropdownitem.entry-Bbfi3A8C.js +69 -0
  28. package/dist/cjs/{nv-fieldmultiselect.entry-BWY5xOAd.js → nv-fieldmultiselect.entry-Cpy7HzlZ.js} +28 -24
  29. package/dist/cjs/nv-fieldnumber.entry-SbNb4hKr.js +189 -0
  30. package/dist/cjs/nv-fieldpassword.entry-CPsgagjY.js +167 -0
  31. package/dist/cjs/nv-fieldradio.entry-DLP-rmKU.js +105 -0
  32. package/dist/cjs/{nv-fieldselect.entry-uUIZ6hmN.js → nv-fieldselect.entry-DOOO03kM.js} +20 -12
  33. package/dist/cjs/{nv-fieldslider.entry-DnvmxxYY.js → nv-fieldslider.entry-CpVbxkpo.js} +33 -15
  34. package/dist/cjs/nv-fieldtext.entry-BpbG4WHv.js +163 -0
  35. package/dist/cjs/nv-fieldtextarea.entry-BA_RApYN.js +245 -0
  36. package/dist/cjs/{nv-fieldtime.entry-DlMNDTht.js → nv-fieldtime.entry-DaJfwQtC.js} +15 -9
  37. package/dist/cjs/{nv-icon.entry-CnUkRzaA.js → nv-icon.entry-DIi792yJ.js} +4 -4
  38. package/dist/cjs/nv-iconbutton_2.entry-B4xB5WtE.js +171 -0
  39. package/dist/cjs/{nv-menu.entry-Dc_FvIx7.js → nv-menu.entry-DHWhkWeB.js} +9 -13
  40. package/dist/cjs/nv-menuitem.entry-CQApuT2D.js +59 -0
  41. package/dist/cjs/nv-notification-bullet.entry-CnYVWE_Z.js +76 -0
  42. package/dist/cjs/{nv-notification.entry-C3m5p5BL.js → nv-notification.entry-DraOvzsu.js} +4 -4
  43. package/dist/cjs/nv-notificationcontainer.entry-BDo-rQLL.js +41 -0
  44. package/dist/cjs/nv-paginationtable.entry-CS7BhAVe.js +231 -0
  45. package/dist/cjs/{nv-popover.entry-B0c-2rO4.js → nv-popover.entry-DSyKCLtF.js} +105 -33
  46. package/dist/cjs/nv-row.entry-D21zN2Vr.js +22 -0
  47. package/dist/cjs/{nv-sidebar.entry-CiN813gQ.js → nv-sidebar.entry-DpKgnjsJ.js} +10 -6
  48. package/dist/cjs/nv-sidebarcontent.entry-BWFDcui8.js +22 -0
  49. package/dist/cjs/{nv-sidebardivider.entry-B4EMyca5.js → nv-sidebardivider.entry-BSzLq-h3.js} +4 -4
  50. package/dist/cjs/{nv-sidebarfooter.entry-CHi4qOFe.js → nv-sidebarfooter.entry-C3DLHPSQ.js} +4 -4
  51. package/dist/cjs/nv-sidebargroup.entry-BMYLbCql.js +23 -0
  52. package/dist/cjs/{nv-sidebarheader.entry-_7ch0O3G.js → nv-sidebarheader.entry-CkUGD-Tw.js} +4 -4
  53. package/dist/cjs/{nv-sidebarlogo.entry-Ch9F-JnT.js → nv-sidebarlogo.entry-BX1-1S1v.js} +4 -4
  54. package/dist/cjs/{nv-sidebarnavitem.entry-DVrafSMr.js → nv-sidebarnavitem.entry-CPwt0Njh.js} +9 -7
  55. package/dist/cjs/nv-sidebarnavsubitem.entry-HZOTB6Tl.js +35 -0
  56. package/dist/cjs/{nv-split.entry-0HTslRAX.js → nv-split.entry-DdtzktvN.js} +10 -6
  57. package/dist/cjs/nv-stack.entry-BMLt30Nt.js +31 -0
  58. package/dist/cjs/{nv-table.entry-DH85n8Mc.js → nv-table.entry-RTiqKRKM.js} +6 -4
  59. package/dist/cjs/{nv-tableheader.entry-CKfocdxD.js → nv-tableheader.entry-Ci4qo8eY.js} +4 -4
  60. package/dist/cjs/nv-toggle.entry-s8B7-8P7.js +82 -0
  61. package/dist/cjs/nv-togglebutton.entry-CyHgU4Wl.js +66 -0
  62. package/dist/cjs/{nv-togglebuttongroup.entry-C0NLbsq7.js → nv-togglebuttongroup.entry-Bn_9DsdP.js} +13 -9
  63. package/dist/cjs/nv-tooltip.entry-D6kxXLO-.js +56 -0
  64. package/dist/components/NvDatatable/NvDatatable.js +29 -8
  65. package/dist/generated/components.js +11 -0
  66. package/dist/generated/components.server.js +81 -62
  67. package/dist/providers/NotificationProvider.js +9 -8
  68. package/dist/types/components/NvDatatable/types.d.ts +6 -0
  69. package/dist/types/generated/components.d.ts +52 -46
  70. package/dist/types/generated/components.server.d.ts +52 -46
  71. package/package.json +7 -4
  72. package/dist/cjs/index-kU2nW5aN.js +0 -40286
  73. package/dist/cjs/nv-avatar.entry-CUX7u0kR.js +0 -68
  74. package/dist/cjs/nv-badge_2.entry-bxpV5gxE.js +0 -213
  75. package/dist/cjs/nv-breadcrumb.entry-Cbbb9Qeh.js +0 -46
  76. package/dist/cjs/nv-breadcrumbs.entry-BTqnp9zO.js +0 -21
  77. package/dist/cjs/nv-button.entry-upWH19y6.js +0 -162
  78. package/dist/cjs/nv-fieldcheckbox.entry-bk7UNQny.js +0 -177
  79. package/dist/cjs/nv-fielddropdownitem.entry-DEWaf9dC.js +0 -72
  80. package/dist/cjs/nv-fieldnumber.entry-DoYORd0d.js +0 -187
  81. package/dist/cjs/nv-fieldpassword.entry-CPaLj9aD.js +0 -165
  82. package/dist/cjs/nv-fieldradio.entry-CvUmEaCa.js +0 -103
  83. package/dist/cjs/nv-fieldtext.entry-BYAJp3n_.js +0 -163
  84. package/dist/cjs/nv-fieldtextarea.entry-DU2bWYeg.js +0 -237
  85. package/dist/cjs/nv-iconbutton_2.entry-hqp4AcRq.js +0 -167
  86. package/dist/cjs/nv-menuitem.entry-DzMhx6c_.js +0 -60
  87. package/dist/cjs/nv-notification-bullet.entry-BwhHCMQF.js +0 -76
  88. package/dist/cjs/nv-notificationcontainer.entry-DTRNn7VE.js +0 -41
  89. package/dist/cjs/nv-row.entry-CdcjVGZv.js +0 -22
  90. package/dist/cjs/nv-sidebarcontent.entry-D9hpAhK8.js +0 -22
  91. package/dist/cjs/nv-sidebargroup.entry-RVqrsyIU.js +0 -23
  92. package/dist/cjs/nv-sidebarnavsubitem.entry-C0XDAzma.js +0 -35
  93. package/dist/cjs/nv-stack.entry-CqO7uTQf.js +0 -31
  94. package/dist/cjs/nv-toggle.entry-BHUl76Im.js +0 -80
  95. package/dist/cjs/nv-togglebutton.entry-D_9COjY-.js +0 -67
  96. package/dist/cjs/nv-tooltip.entry-BfViGE_U.js +0 -55
  97. /package/dist/cjs/{i18n.utils-IlwlcG9l-ku0bScip.js → i18n.utils-CR9MpYzU-ku0bScip.js} +0 -0
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-kU2nW5aN.js');
3
+ var index = require('./index-BeFrXZol.js');
4
+ var dom_utilsCuXVGECR = require('./dom.utils-CuXVGECR-8VY5SfMZ.js');
4
5
  var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
5
6
  require('@stencil/react-output-target/runtime');
6
7
  require('react');
@@ -3294,170 +3295,6 @@ function getSortedRowModel() {
3294
3295
  }, getMemoOptions(table.options, 'debugTable', 'getSortedRowModel', () => table._autoResetPageIndex()));
3295
3296
  }
3296
3297
 
3297
- /* eslint-disable @typescript-eslint/no-explicit-any */
3298
- /**
3299
- * All properties that should be excluded from the deep copy of an HTML element.
3300
- */
3301
- const excludedProps = new Set([
3302
- // Text and content-related properties
3303
- 'textContent',
3304
- 'innerText',
3305
- 'outerText',
3306
- 'innerHTML',
3307
- 'outerHTML',
3308
- 'text',
3309
- // Form element properties
3310
- 'value',
3311
- 'defaultValue',
3312
- 'checked',
3313
- 'defaultChecked',
3314
- 'selectionStart',
3315
- 'selectionEnd',
3316
- 'selectionDirection',
3317
- 'form',
3318
- 'willValidate',
3319
- 'validity',
3320
- 'validationMessage',
3321
- 'labels',
3322
- 'list',
3323
- 'maxLength',
3324
- 'minLength',
3325
- 'valueAsDate',
3326
- 'valueAsNumber',
3327
- // Editability and namespaces
3328
- 'contentEditable',
3329
- 'isContentEditable',
3330
- 'namespaceURI',
3331
- // Child-related properties (handled recursively)
3332
- 'attributes',
3333
- 'children',
3334
- 'childNodes',
3335
- 'firstChild',
3336
- 'lastChild',
3337
- // Blazor-related properties
3338
- 'origin',
3339
- 'dataset',
3340
- 'attributeStyleMap',
3341
- 'prefix',
3342
- 'localName',
3343
- 'tagName',
3344
- 'shadowRoot',
3345
- 'assignedSlot',
3346
- 'scrollWidth',
3347
- 'scrollHeight',
3348
- 'clientTop',
3349
- 'clientLeft',
3350
- 'clientWidth',
3351
- 'clientHeight',
3352
- 'firstElementChild',
3353
- 'lastElementChild',
3354
- 'childElementCount',
3355
- 'previousElementSibling',
3356
- 'nextElementSibling',
3357
- 'currentCSSZoom',
3358
- 'nodeType',
3359
- 'nodeName',
3360
- 'baseURI',
3361
- 'isConnected',
3362
- 'ownerDocument',
3363
- 'parentNode',
3364
- 'parentElement',
3365
- 'previousSibling',
3366
- 'nextSibling',
3367
- 'ELEMENT_NODE',
3368
- 'ATTRIBUTE_NODE',
3369
- 'TEXT_NODE',
3370
- 'CDATA_SECTION_NODE',
3371
- 'ENTITY_REFERENCE_NODE',
3372
- 'ENTITY_NODE',
3373
- 'PROCESSING_INSTRUCTION_NODE',
3374
- 'COMMENT_NODE',
3375
- 'DOCUMENT_NODE',
3376
- 'DOCUMENT_TYPE_NODE',
3377
- 'DOCUMENT_FRAGMENT_NODE',
3378
- 'NOTATION_NODE',
3379
- 'DOCUMENT_POSITION_DISCONNECTED',
3380
- 'DOCUMENT_POSITION_PRECEDING',
3381
- 'DOCUMENT_POSITION_FOLLOWING',
3382
- 'DOCUMENT_POSITION_CONTAINS',
3383
- 'DOCUMENT_POSITION_CONTAINED_BY',
3384
- 'DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC',
3385
- ]);
3386
- /**
3387
- * Deep copy an HTML element with all its attributes, properties, and child nodes.
3388
- * This method is useful for creating a clone of an element that can be safely modified without affecting the original.
3389
- * @param {HTMLElement} element - The HTML element to copy.
3390
- * @returns {HTMLElement} - A deep copy of the HTML element.
3391
- * @example const copy = deepCopyElement(document.getElementById('myElement'));
3392
- */
3393
- function deepCopyElement(element) {
3394
- const copy = document.createElement(element.tagName);
3395
- // ✅ Copy attributes
3396
- Array.from(element.attributes).forEach(attr => {
3397
- copy.setAttribute(attr.name, attr.value);
3398
- });
3399
- // ✅ Dynamically extract relevant properties
3400
- const properties = new Set();
3401
- // Collect only own enumerable properties
3402
- Object.keys(element).forEach(key => properties.add(key));
3403
- // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
3404
- let proto = Object.getPrototypeOf(element);
3405
- while (proto && proto !== HTMLElement.prototype) {
3406
- Object.keys(proto).forEach(key => properties.add(key));
3407
- proto = Object.getPrototypeOf(proto);
3408
- }
3409
- // ✅ Filter and copy only non-function properties (methods are excluded) and non-event listeners
3410
- properties.forEach(prop => {
3411
- if (typeof element[prop] !== 'function' && // Ignore methods
3412
- !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
3413
- !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
3414
- ) {
3415
- try {
3416
- copy[prop] = element[prop];
3417
- }
3418
- catch (error) {
3419
- console.warn(`Could not copy property ${prop}:`, error.message);
3420
- }
3421
- }
3422
- });
3423
- // ✅ Copy dataset separately
3424
- Object.assign(copy.dataset, element.dataset);
3425
- // ✅ Handle form elements specifically
3426
- if (element instanceof HTMLInputElement) {
3427
- copy.value = element.value;
3428
- copy.checked = element.checked;
3429
- copy.defaultValue = element.defaultValue;
3430
- copy.defaultChecked = element.defaultChecked;
3431
- copy.selectionStart = element.selectionStart;
3432
- copy.selectionEnd = element.selectionEnd;
3433
- copy.selectionDirection = element.selectionDirection;
3434
- }
3435
- else if (element instanceof HTMLTextAreaElement) {
3436
- copy.value = element.value;
3437
- copy.defaultValue = element.defaultValue;
3438
- copy.selectionStart = element.selectionStart;
3439
- copy.selectionEnd = element.selectionEnd;
3440
- copy.selectionDirection =
3441
- element.selectionDirection;
3442
- }
3443
- else if (element instanceof HTMLSelectElement) {
3444
- copy.value = element.value;
3445
- copy.selectedIndex = element.selectedIndex;
3446
- }
3447
- // ✅ Recursively copy child nodes (prevent duplicates)
3448
- element.childNodes.forEach(child => {
3449
- let childCopy;
3450
- if (child.nodeType === Node.ELEMENT_NODE) {
3451
- childCopy = deepCopyElement(child);
3452
- }
3453
- else {
3454
- childCopy = child.cloneNode(true);
3455
- }
3456
- copy.appendChild(childCopy);
3457
- });
3458
- return copy;
3459
- }
3460
-
3461
3298
  /* eslint-disable @typescript-eslint/no-explicit-any */
3462
3299
  /**
3463
3300
  * Debounce function to prevent multiple calls in a short
@@ -3478,7 +3315,7 @@ function debounce(func, wait) {
3478
3315
  };
3479
3316
  }
3480
3317
 
3481
- const nvDatagridCss = "nv-datagrid{--nv-datagrid-border-default:var(\n --components-form-field-border-default\n );--nv-datagrid-border-hover:var(--components-form-field-border-hover);--nv-datagrid-border-focus:var(--components-form-field-border-default);--nv-datagrid-background-default:var(\n --components-form-field-background-default\n );--nv-datagrid-background-checked:var(\n --components-form-field-background-checked\n );--nv-datagrid-background-disabled:var(\n --components-form-field-background-disabled\n );--nv-datagrid-color-checked:var(\n --components-form-shape-foreground-default\n );--nv-datagrid-color-disabled:var(\n --components-form-shape-foreground-disabled\n );--nv-datagrid-outline-color:var(--color-focus-brand);display:block}nv-datagrid .hidden{display:none}nv-datagrid table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-datagrid th{text-align:left;border-bottom:1px solid var(--components-datagrid-header-border);min-height:var(--spacing-12);padding:var(--datagrid-cell-header-padding-y) var(--datagrid-cell-header-padding-x);font-size:var(--font-size-md);font-weight:var(--font-weight-high-emphasis);color:var(--components-datagrid-header-text)}nv-datagrid td{border-bottom:1px solid var(--components-datagrid-body-border);min-height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--datagrid-cell-body-padding-y) var(--datagrid-cell-body-padding-x);font-size:var(--font-size-md);font-weight:var(--font-weight-low-emphasis);color:var(--components-datagrid-body-text);white-space:nowrap;text-overflow:ellipsis}nv-datagrid tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}nv-datagrid .cursor-pointer{cursor:pointer}nv-datagrid .select-none{-webkit-user-select:none;user-select:none}nv-datagrid .search-container{display:flex}nv-datagrid .checkbox-container{position:relative;color:var(--nv-datagrid-color-checked)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-datagrid-color-disabled)}nv-datagrid .checkbox-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-checkbox-size);height:var(--form-checkbox-size);flex-direction:column;align-items:flex-start;border-radius:var(--form-checkbox-radius);border-width:var(--form-checkbox-border-width);border-style:solid;border-color:var(--nv-datagrid-border-default);background:var(--nv-datagrid-background-default)}nv-datagrid .checkbox-container input[type=checkbox]:hover{border-color:var(--nv-datagrid-border-hover)}nv-datagrid .checkbox-container input[type=checkbox]:focus{border-color:var(--nv-datagrid-border-focus)}nv-datagrid .checkbox-container input[type=checkbox]:focus,nv-datagrid .checkbox-container input[type=checkbox]:focus-within{outline:none}nv-datagrid .checkbox-container input[type=checkbox]:focus-visible,nv-datagrid .checkbox-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-datagrid-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-datagrid .checkbox-container input[type=checkbox]:checked,nv-datagrid .checkbox-container input[type=checkbox]:indeterminate{background:var(--nv-datagrid-background-checked);border-color:var(--nv-datagrid-background-checked)}nv-datagrid .checkbox-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-datagrid-background-disabled);border-color:var(--nv-datagrid-border-default)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-datagrid .checkbox-container .icon svg{width:var(--form-checkbox-icon-size);height:var(--form-checkbox-icon-size);fill:none;stroke:currentcolor;stroke-width:var(--form-checkbox-icon-stroke);flex-shrink:0}";
3318
+ const nvDatagridCss = () => `nv-datagrid{--nv-datagrid-border-default:var( --components-form-field-border-default );--nv-datagrid-border-hover:var(--components-form-field-border-hover);--nv-datagrid-border-focus:var(--components-form-field-border-default);--nv-datagrid-background-default:var( --components-form-field-background-default );--nv-datagrid-background-checked:var( --components-form-field-background-checked );--nv-datagrid-background-disabled:var( --components-form-field-background-disabled );--nv-datagrid-color-checked:var( --components-form-shape-foreground-default );--nv-datagrid-color-disabled:var( --components-form-shape-foreground-disabled );--nv-datagrid-outline-color:var(--color-focus-brand);display:block}nv-datagrid .hidden{display:none}nv-datagrid table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-datagrid th{text-align:left;border-bottom:1px solid var(--components-datagrid-header-border);min-height:var(--spacing-12);padding:var(--datagrid-cell-header-padding-y) var(--datagrid-cell-header-padding-x);font-size:var(--font-size-md);font-weight:var(--font-weight-high-emphasis);color:var(--components-datagrid-header-text)}nv-datagrid td{border-bottom:1px solid var(--components-datagrid-body-border);min-height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--datagrid-cell-body-padding-y) var(--datagrid-cell-body-padding-x);font-size:var(--font-size-md);font-weight:var(--font-weight-low-emphasis);color:var(--components-datagrid-body-text);white-space:nowrap;text-overflow:ellipsis}nv-datagrid tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}nv-datagrid .cursor-pointer{cursor:pointer}nv-datagrid .select-none{-webkit-user-select:none;user-select:none}nv-datagrid .search-container{display:flex}nv-datagrid .checkbox-container{position:relative;color:var(--nv-datagrid-color-checked)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-datagrid-color-disabled)}nv-datagrid .checkbox-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-checkbox-size);height:var(--form-checkbox-size);flex-direction:column;align-items:flex-start;border-radius:var(--form-checkbox-radius);border-width:var(--form-checkbox-border-width);border-style:solid;border-color:var(--nv-datagrid-border-default);background:var(--nv-datagrid-background-default)}nv-datagrid .checkbox-container input[type=checkbox]:hover{border-color:var(--nv-datagrid-border-hover)}nv-datagrid .checkbox-container input[type=checkbox]:focus{border-color:var(--nv-datagrid-border-focus)}nv-datagrid .checkbox-container input[type=checkbox]:focus,nv-datagrid .checkbox-container input[type=checkbox]:focus-within{outline:none}nv-datagrid .checkbox-container input[type=checkbox]:focus-visible,nv-datagrid .checkbox-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-datagrid-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-datagrid .checkbox-container input[type=checkbox]:checked,nv-datagrid .checkbox-container input[type=checkbox]:indeterminate{background:var(--nv-datagrid-background-checked);border-color:var(--nv-datagrid-background-checked)}nv-datagrid .checkbox-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-datagrid-background-disabled);border-color:var(--nv-datagrid-border-default)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-datagrid .checkbox-container .icon svg{width:var(--form-checkbox-icon-size);height:var(--form-checkbox-icon-size);fill:none;stroke:currentcolor;stroke-width:var(--form-checkbox-icon-stroke);flex-shrink:0}`;
3482
3319
 
3483
3320
  const NvDatagrid = class {
3484
3321
  constructor(hostRef) {
@@ -3655,12 +3492,12 @@ const NvDatagrid = class {
3655
3492
  const key = col.accessor;
3656
3493
  const cellSlot = col.querySelector('[slot="cell"]');
3657
3494
  if (cellSlot) {
3658
- const element = deepCopyElement(cellSlot);
3495
+ const element = dom_utilsCuXVGECR.deepCopyElement(cellSlot);
3659
3496
  this.templateCache.set(key, element);
3660
3497
  }
3661
3498
  const headerSlot = col.querySelector('[slot="header"]');
3662
3499
  if (headerSlot) {
3663
- const element = deepCopyElement(headerSlot);
3500
+ const element = dom_utilsCuXVGECR.deepCopyElement(headerSlot);
3664
3501
  this.headerTemplateCache.set(key, element);
3665
3502
  }
3666
3503
  else {
@@ -4088,7 +3925,7 @@ const NvDatagrid = class {
4088
3925
  }
4089
3926
  // Handle <template> elements correctly
4090
3927
  const templateContent = template instanceof HTMLTemplateElement ? template.content : template;
4091
- const element = deepCopyElement(templateContent);
3928
+ const element = dom_utilsCuXVGECR.deepCopyElement(templateContent);
4092
3929
  // Replace placeholders in text content, attributes, and properties
4093
3930
  element.querySelectorAll('*').forEach(el => {
4094
3931
  // Replace placeholders in text content
@@ -4267,7 +4104,7 @@ const NvDatagrid = class {
4267
4104
  properties.forEach(prop => {
4268
4105
  if (typeof element[prop] !== 'function' && // Ignore methods
4269
4106
  !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
4270
- !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
4107
+ !dom_utilsCuXVGECR.excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
4271
4108
  ) {
4272
4109
  const propValue = element[prop];
4273
4110
  if (typeof propValue === 'string' && propValue.includes('__')) {
@@ -4299,7 +4136,7 @@ const NvDatagrid = class {
4299
4136
  properties.forEach(prop => {
4300
4137
  if (typeof element[prop] !== 'function' && // Ignore methods
4301
4138
  !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
4302
- !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
4139
+ !dom_utilsCuXVGECR.excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
4303
4140
  ) {
4304
4141
  try {
4305
4142
  const propValue = element[prop];
@@ -4483,7 +4320,7 @@ const NvDatagrid = class {
4483
4320
  const rows = !this.table || this.table === undefined || this.parsedData.length === 0
4484
4321
  ? []
4485
4322
  : this.table?.getRowModel()?.rows;
4486
- return (index.h(index.Host, { key: 'd1ca320f75940993840349a4f33afb0a8dc10788' }, index.h("div", { key: 'd07f038bfa0d4c0092f0ad9e6f13c95a47331f75', class: "hidden" }, index.h("slot", { key: 'be8e292240da78d055cce83fb5700111d371d0db' })), index.h("slot", { key: 'af921e34986bf67afa14190e2d01e866af7ab7ae', name: "before" }), this.enableGlobalFilter && this.table && (index.h("div", { key: 'f3ffe4bdfee63e86ad470923e4faf62be821b5fa', class: `search-container justify-${this.globalFilterPosition}` }, index.h("nv-fieldtext", { key: 'a5ab10f4e088b106368bd5d98d99e3cef2b59955', value: this.globalFilterSearchTerm, onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns..." }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("div", null, index.h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", null, this.parsedColumns.length > 0 && headerGroups
4323
+ return (index.h(index.Host, { key: 'a3d3d96758c77096d2690c8ff10e8439e7e76e96' }, index.h("div", { key: '3a2551318093150d824bd0e1f2c07da234522ac0', class: "hidden" }, index.h("slot", { key: 'dd6e9158456ee68044e8bd19ef9ad76c73fbefb9' })), index.h("slot", { key: 'de4e21a7926841526bf2e7cfd36ba1d747d0c08d', name: "before" }), this.enableGlobalFilter && this.table && (index.h("div", { key: '93d37d83811224847c16363f497c7cf65e2fc107', class: `search-container justify-${this.globalFilterPosition}` }, index.h("nv-fieldtext", { key: '9ed1b8cfedebd2ed37551b3fe428a5cd7ba7214a', value: this.globalFilterSearchTerm, onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns..." }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("div", null, index.h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", null, this.parsedColumns.length > 0 && headerGroups
4487
4324
  ? headerGroups?.map(headerGroup => (index.h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
4488
4325
  return this.getHeaderCell(header);
4489
4326
  }))))
@@ -4495,22 +4332,48 @@ const NvDatagrid = class {
4495
4332
  })));
4496
4333
  }))), this.table && this.enableRowSelection ? (index.h("tfoot", null, index.h("tr", null, index.h("td", { colSpan: 20 }, this.enableRowSelection && this.table ? (index.h("div", null, this.rowSelectionState &&
4497
4334
  Object.keys(this.rowSelectionState).length > 0 ? (index.h("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', this.table.getPreFilteredRowModel()?.rows
4498
- ?.length || 0, ' ', "Total Rows Selected")) : (index.h("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), index.h("slot", { key: '8941adaa686dec6b3f09e0434bdf9df3d273e930', name: "after" })));
4335
+ ?.length || 0, ' ', "Total Rows Selected")) : (index.h("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), index.h("slot", { key: '46b1e3b6ec5ca09140437e82ca3fc90fdc34e4eb', name: "after" })));
4499
4336
  }
4500
4337
  get el() { return index.getElement(this); }
4501
4338
  static get watchers() { return {
4502
- "columns": ["parseColumns"],
4503
- "data": ["parseData"],
4504
- "parsedColumns": ["handleParsedChange"],
4505
- "parsedData": ["handleParsedChange"],
4506
- "globalFilterSearchTerm": ["handleGlobalFilterSearchTerm", "handleInternalStateChange"],
4507
- "paginationState": ["handlePaginationState", "handleInternalStateChange"],
4508
- "sortingState": ["handleSortingState", "handleInternalStateChange"],
4509
- "pageSize": ["handlePageSize"],
4510
- "rowSelectionState": ["handleRowSelectionState"],
4511
- "state": ["handleStateChange"]
4339
+ "columns": [{
4340
+ "parseColumns": 0
4341
+ }],
4342
+ "data": [{
4343
+ "parseData": 0
4344
+ }],
4345
+ "parsedColumns": [{
4346
+ "handleParsedChange": 0
4347
+ }],
4348
+ "parsedData": [{
4349
+ "handleParsedChange": 0
4350
+ }],
4351
+ "globalFilterSearchTerm": [{
4352
+ "handleGlobalFilterSearchTerm": 0
4353
+ }, {
4354
+ "handleInternalStateChange": 0
4355
+ }],
4356
+ "paginationState": [{
4357
+ "handlePaginationState": 0
4358
+ }, {
4359
+ "handleInternalStateChange": 0
4360
+ }],
4361
+ "sortingState": [{
4362
+ "handleSortingState": 0
4363
+ }, {
4364
+ "handleInternalStateChange": 0
4365
+ }],
4366
+ "pageSize": [{
4367
+ "handlePageSize": 0
4368
+ }],
4369
+ "rowSelectionState": [{
4370
+ "handleRowSelectionState": 0
4371
+ }],
4372
+ "state": [{
4373
+ "handleStateChange": 0
4374
+ }]
4512
4375
  }; }
4513
4376
  };
4514
- NvDatagrid.style = nvDatagridCss;
4377
+ NvDatagrid.style = nvDatagridCss();
4515
4378
 
4516
4379
  exports.nv_datagrid = NvDatagrid;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-kU2nW5aN.js');
3
+ var index = require('./index-BeFrXZol.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-kU2nW5aN.js');
3
+ var index = require('./index-BeFrXZol.js');
4
4
  var index_esmD3eWMME9 = require('./index.esm-D3eWMME9-CG1TVKfu.js');
5
5
  var events_utilsB6GgGra_ = require('./events.utils-B6GgGra--01N__3wY.js');
6
6
  var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
@@ -14,7 +14,7 @@ require('@stencil/react-output-target/runtime');
14
14
  require('react');
15
15
  require('react-dom');
16
16
 
17
- const nvDialogCss = "nv-dialog dialog{width:100vw;height:100svh;margin:0;max-height:unset;max-width:unset;padding:0;background:color-mix(in srgb, var(--components-overlay-background) 70%, transparent);backdrop-filter:blur(4px)}nv-dialog dialog.full .content{min-width:90vw;width:90vw;max-width:90vw}nv-dialog .backdrop{display:flex;min-height:100%;padding:var(--spacing-3);box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}nv-dialog .backdrop .content{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:min(90vw, 400px);width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;display:flex;flex-direction:column;align-items:flex-start;height:fit-content;position:relative}nv-dialog .backdrop .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar{width:6px;height:6px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-dialog .backdrop .content .content-body{box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);color:var(--color-content-medium-text);width:100%}";
17
+ const nvDialogCss = () => `nv-dialog dialog{width:100vw;height:100svh;margin:0;max-height:unset;max-width:unset;padding:0;background:color-mix(in srgb, var(--components-overlay-background) 70%, transparent);backdrop-filter:blur(4px)}nv-dialog dialog.full .content{min-width:90vw;width:90vw;max-width:90vw}nv-dialog .backdrop{display:flex;min-height:100%;padding:var(--spacing-3);box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}nv-dialog .backdrop .content{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:min(90vw, 400px);width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;display:flex;flex-direction:column;align-items:flex-start;height:fit-content;position:relative}nv-dialog .backdrop .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar{width:6px;height:6px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-dialog .backdrop .content .content-body{box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);color:var(--color-content-medium-text);width:100%}`;
18
18
 
19
19
  const NvDialog = class {
20
20
  constructor(hostRef) {
@@ -242,25 +242,23 @@ const NvDialog = class {
242
242
  //#region LIFECYCLE
243
243
  /**
244
244
  * Lifecycle method that runs before the component loads.
245
- * Initializes the trigger, header, and footer elements by finding them in the component's children.
246
- * Elements are found either by their slot attribute or by their tag name (for dialog header/footer)
245
+ * Looks for passed header, and footer elements, either by their slot
246
+ * attribute or by their tag name (for dialog header/footer)
247
247
  */
248
248
  componentWillLoad() {
249
- this.triggerElement = Array.from(this.el.children).find(child => {
250
- return child.getAttribute('slot') === 'trigger';
251
- });
252
- this.headerElement = Array.from(this.el.children).find(child => {
253
- return (child.getAttribute('slot') === 'header' ||
254
- child.tagName.toLowerCase() === 'nv-dialogheader');
255
- });
256
- this.footerElement = Array.from(this.el.children).find(child => {
257
- return (child.getAttribute('slot') === 'footer' ||
258
- child.tagName.toLowerCase() === 'nv-dialogfooter');
259
- });
249
+ if (!this.headerElement)
250
+ this.headerElement =
251
+ this.el.querySelector('[slot="header"]') ??
252
+ this.el.querySelector('nv-dialogheader');
253
+ if (!this.footerElement)
254
+ this.footerElement =
255
+ this.el.querySelector('[slot="footer"]') ??
256
+ this.el.querySelector('nv-dialogfooter');
260
257
  // Initial form check
261
258
  this.checkForForm();
262
259
  }
263
- componentWillUpdate() {
260
+ componentDidRender() {
261
+ this.triggerElement = this.el.querySelector('[slot="trigger"]');
264
262
  this.attachEventListeners();
265
263
  }
266
264
  componentDidLoad() {
@@ -271,7 +269,6 @@ const NvDialog = class {
271
269
  if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {
272
270
  this.setAutofocus();
273
271
  }
274
- this.attachEventListeners();
275
272
  // Additional form check in case form was added after initial load
276
273
  this.checkForForm();
277
274
  // this.setupContentBodyListeners();
@@ -288,13 +285,15 @@ const NvDialog = class {
288
285
  //#region RENDER
289
286
  render() {
290
287
  const hasForm = this.form || this.el.querySelector('form');
291
- return (index.h(index.Host, { key: 'e1837ebe65fcf0e56880438b59a5e8c4b5873926' }, index.h("slot", { key: '543e69780f3dad15a91b4bcb1f4199153bbce1b3', name: "trigger" }), index.h("dialog", { key: 'ef1600f73c8d25744b3b69356e1c4a98e605be1e', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, onClick: this.handleDialogClick, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsxChV9xqsO.clsx({ full: this.full }) }, index.h("div", { key: '894e91291a5ee2a1c26a658e1ca7aaf237d71069', class: "backdrop", ref: el => (this.backdropElement = el) }, index.h("div", { key: '78700c26d1ec553d67a8e62f3f3628fab8deb49a', class: "content", ref: el => (this.contentElement = el) }, !this.undismissable && (index.h("nv-button", { key: 'd042c828bc6886091128425ea3e5c73035a0cea1', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDialogClose, "aria-label": "Close dialog" }, index.h("nv-icon", { key: '035273dd23255883a7a5feb354d230242683e00e', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-dialogheader", { id: "dialog-header" })), index.h("div", { key: 'd86417aae675f8611312495d31ca8d0b58c2caaf', class: "content-body", id: "dialog-content" }, index.h("slot", { key: 'cb48b94b846097d04ffd98c6689cd4116e8cd9f9' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? constantsBReL3Lsa.ButtonType.Submit : constantsBReL3Lsa.ButtonType.Button, onDialogCanceled: this.handleDialogClose, undismissable: this.undismissable })))))));
288
+ return (index.h(index.Host, { key: 'd8d44a128d01fd7a9b62d42f08f7eb5b85e4e5b2' }, index.h("slot", { key: '7157a6121fea5e8828dd2c0c3db4998c0cb5d0d2', name: "trigger" }), index.h("dialog", { key: '22674ade1de7b50439ffe77ad2a20e6473929c34', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, onClick: this.handleDialogClick, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsxChV9xqsO.clsx({ full: this.full }) }, index.h("div", { key: '4f851e286f94be5972ebb417bef891e29714cb44', class: "backdrop", ref: el => (this.backdropElement = el) }, index.h("div", { key: '881171acec6e40b627a544b716302d576b836487', class: "content", ref: el => (this.contentElement = el) }, !this.undismissable && (index.h("nv-button", { key: '9691520158952a35da536f94073e8ff5fd6041f0', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDialogClose, "aria-label": "Close dialog" }, index.h("nv-icon", { key: '8392a7d6ec89d08391904c94f10296223c4d6012', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-dialogheader", { id: "dialog-header" })), index.h("div", { key: '7fa62a9d5e8f1fe3f42872af3fc753e2fb175a9a', class: "content-body", id: "dialog-content" }, index.h("slot", { key: '5ec44365b70f6ec2762896ce242a264fb4ffb05a' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? constantsBReL3Lsa.ButtonType.Submit : constantsBReL3Lsa.ButtonType.Button, onDialogCanceled: this.handleDialogClose, undismissable: this.undismissable })))))));
292
289
  }
293
290
  get el() { return index.getElement(this); }
294
291
  static get watchers() { return {
295
- "open": ["handleDialogOpenChange"]
292
+ "open": [{
293
+ "handleDialogOpenChange": 0
294
+ }]
296
295
  }; }
297
296
  };
298
- NvDialog.style = nvDialogCss;
297
+ NvDialog.style = nvDialogCss();
299
298
 
300
299
  exports.nv_dialog = NvDialog;
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-kU2nW5aN.js');
3
+ var index = require('./index-BeFrXZol.js');
4
4
  var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
5
5
  require('@stencil/react-output-target/runtime');
6
6
  require('react');
7
7
  require('react-dom');
8
8
 
9
- const nvDialogfooterCss = "nv-dialogfooter{display:flex;padding:var(--dialog-footer-padding-top) var(--dialog-footer-padding-x) var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);justify-content:flex-end;align-items:flex-end;gap:var(--dialog-footer-gap-y);align-self:stretch}";
9
+ const nvDialogfooterCss = () => `nv-dialogfooter{display:flex;padding:var(--dialog-footer-padding-top) var(--dialog-footer-padding-x) var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);justify-content:flex-end;align-items:flex-end;gap:var(--dialog-footer-gap-y);align-self:stretch}`;
10
10
 
11
11
  const NvDialogfooter = class {
12
12
  constructor(hostRef) {
@@ -20,7 +20,6 @@ const NvDialogfooter = class {
20
20
  this.internals = hostRef.$hostElement$.attachInternals();
21
21
  hostRef.$hostElement$["s-ei"] = this.internals;
22
22
  }
23
- this.hasSlot = false;
24
23
  /****************************************************************************/
25
24
  //#region PROPERTIES
26
25
  /**
@@ -75,37 +74,30 @@ const NvDialogfooter = class {
75
74
  //#endregion METHODS
76
75
  /****************************************************************************/
77
76
  //#region LIFECYCLE
78
- componentWillLoad() {
79
- // Check if there are any child elements that don't have a slot attribute
80
- this.hasSlot = Array.from(this.el.childNodes).some(node => {
81
- return (node.nodeType === Node.ELEMENT_NODE &&
82
- !node.hasAttribute('slot'));
83
- });
84
- }
85
- componentDidLoad() {
77
+ componentDidRender() {
86
78
  // Set the default button type based on the form property
87
- this.primaryButtonType =
88
- this.primaryButtonType || this.form
79
+ if (!this.primaryButtonType) {
80
+ this.primaryButtonRef.type = this.form
89
81
  ? constantsBReL3Lsa.ButtonType.Submit
90
82
  : constantsBReL3Lsa.ButtonType.Button;
83
+ }
91
84
  }
92
85
  //#endregion LIFECYCLE
93
86
  /****************************************************************************/
94
87
  //#region RENDER
95
88
  render() {
96
- return (index.h(index.Host, { key: '0048aeb5ba7d8919e94f3dff06dddd1bdff813bb' }, !this.hasSlot ? (index.h(index.Fragment, null, !this.undismissable && (index.h("nv-button", { onClick: this.handleCancel, emphasis: "low", size: "sm" }, this.cancelLabel)), index.h("nv-button", { onClick: this.handlePrimary, disabled: this.disabled, danger: this.danger, size: "sm", emphasis: "high", form: this.form, type: this.primaryButtonType }, this.leadingIcon && (index.h("nv-icon", { slot: "leading-icon", name: this.leadingIcon, size: "sm" })), this.primaryLabel, this.trailingIcon && (index.h("nv-icon", { slot: "trailing-icon", name: this.trailingIcon, size: "sm" }))))) : (index.h("slot", null))));
89
+ return (index.h(index.Host, { key: 'a5148c3e41ad6d7c5e54e2b29b8452707d5c2b2b' }, index.h("slot", { key: 'e5fcf66789eac1c6b0118403c33e7e80fb974c71' }, index.h(index.Fragment, { key: '9255d264f559322bebbcc874d91802bbaaeac2d6' }, !this.undismissable && (index.h("nv-button", { key: 'e8d6085fbbcf5bbdbad7b23d65660debb296a332', onClick: this.handleCancel, emphasis: "low", size: "sm" }, this.cancelLabel)), index.h("nv-button", { key: '8a6963f12e89860c3bb1e17eeed60cf9b6d81bc3', ref: el => (this.primaryButtonRef = el), onClick: this.handlePrimary, disabled: this.disabled, danger: this.danger, size: "sm", emphasis: "high", form: this.form, type: this.primaryButtonType }, this.leadingIcon && (index.h("nv-icon", { key: '59dc3f909f7366a0d0e05ab089d34b9d222f43ed', slot: "leading-icon", name: this.leadingIcon, size: "sm" })), this.primaryLabel, this.trailingIcon && (index.h("nv-icon", { key: 'e2be736da129cf7720dad6e1a443eb55a182b2dd', slot: "trailing-icon", name: this.trailingIcon, size: "sm" })))))));
97
90
  }
98
91
  static get formAssociated() { return true; }
99
92
  get el() { return index.getElement(this); }
100
93
  };
101
- NvDialogfooter.style = nvDialogfooterCss;
94
+ NvDialogfooter.style = nvDialogfooterCss();
102
95
 
103
- const nvDialogheaderCss = "nv-dialogheader{padding:var(--dialog-header-padding-top) var(--dialog-header-padding-x) var(--dialog-header-padding-bottom) var(--dialog-header-padding-x);justify-content:space-between;align-items:flex-start;align-self:stretch}nv-dialogheader .heading{color:var(--color-content-high-text);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-lg);font-style:normal;font-weight:var(--font-weight-medium-emphasis);padding-right:var(--spacing-7);line-height:var(--leading-px-6);letter-spacing:var(--letter-spacing-heading-xs)}nv-dialogheader .subheading{color:var(--color-content-low-text);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-sm);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-sm);}";
96
+ const nvDialogheaderCss = () => `nv-dialogheader{padding:var(--dialog-header-padding-top) var(--dialog-header-padding-x) var(--dialog-header-padding-bottom) var(--dialog-header-padding-x);justify-content:space-between;align-items:flex-start;align-self:stretch}nv-dialogheader .heading{color:var(--color-content-high-text);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-lg);font-style:normal;font-weight:var(--font-weight-medium-emphasis);padding-right:var(--spacing-7);line-height:var(--leading-px-6);letter-spacing:var(--letter-spacing-heading-xs)}nv-dialogheader .subheading{color:var(--color-content-low-text);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-sm);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-sm);}`;
104
97
 
105
98
  const NvDialogheader = class {
106
99
  constructor(hostRef) {
107
100
  index.registerInstance(this, hostRef);
108
- this.hasSlot = false;
109
101
  /****************************************************************************/
110
102
  //#region PROPERTIES
111
103
  /**
@@ -115,23 +107,13 @@ const NvDialogheader = class {
115
107
  }
116
108
  //#endregion PROPERTIES
117
109
  /****************************************************************************/
118
- //#region LIFECYCLE
119
- componentWillLoad() {
120
- // Check if there are any child elements that don't have a slot attribute
121
- this.hasSlot = Array.from(this.el.childNodes).some(node => {
122
- return (node.nodeType === Node.ELEMENT_NODE &&
123
- !node.hasAttribute('slot'));
124
- });
125
- }
126
- //#endregion LIFECYCLE
127
- /****************************************************************************/
128
110
  //#region RENDER
129
111
  render() {
130
- return (index.h(index.Host, { key: 'e3390a18cd40f00dd70f71b436d3603fdcb2b337' }, !this.hasSlot ? (index.h(index.Fragment, null, index.h("div", { class: "heading" }, this.heading), index.h("div", { class: "subheading" }, this.subheading))) : (index.h("slot", null))));
112
+ return (index.h(index.Host, { key: '8577fd5a719adf8764d85f667495701cb1514df2' }, index.h("slot", { key: '5858bd8fff71db135f69a76cb298343f0590f853' }, index.h(index.Fragment, { key: '81ac703e205f1b8587144213c7f57c9fd7ba9657' }, index.h("div", { key: '5a12e1facef605d96338b31468c8d8109379e2d1', class: "heading" }, this.heading), index.h("div", { key: '1a559041968e2b2b92a987c014e41380fe6f8616', class: "subheading" }, this.subheading)))));
131
113
  }
132
114
  get el() { return index.getElement(this); }
133
115
  };
134
- NvDialogheader.style = nvDialogheaderCss;
116
+ NvDialogheader.style = nvDialogheaderCss();
135
117
 
136
118
  exports.nv_dialogfooter = NvDialogfooter;
137
119
  exports.nv_dialogheader = NvDialogheader;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-kU2nW5aN.js');
3
+ var index = require('./index-BeFrXZol.js');
4
4
  var index_esmD3eWMME9 = require('./index.esm-D3eWMME9-CG1TVKfu.js');
5
5
  var events_utilsB6GgGra_ = require('./events.utils-B6GgGra--01N__3wY.js');
6
6
  var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
@@ -14,7 +14,7 @@ require('@stencil/react-output-target/runtime');
14
14
  require('react');
15
15
  require('react-dom');
16
16
 
17
- const nvDrawerCss = "nv-drawer dialog{width:100vw;height:100svh;margin:0;max-height:unset;max-width:unset;padding:0;background:color-mix(in srgb, var(--components-overlay-background) 70%, transparent);backdrop-filter:blur(4px);border:none}nv-drawer dialog[data-state=closed]{pointer-events:none}nv-drawer dialog[data-state=open]{pointer-events:auto}nv-drawer dialog.side-right .backdrop{justify-content:flex-end}nv-drawer dialog.side-right .content{box-shadow:-4px 0 24px rgba(0, 0, 0, 0.15)}nv-drawer dialog.side-left .backdrop{justify-content:flex-start}nv-drawer dialog.side-left .content{box-shadow:4px 0 24px rgba(0, 0, 0, 0.15)}nv-drawer .backdrop{display:flex;height:100%;width:100%;padding:0}nv-drawer .backdrop .content{background:var(--color-level-00-background);width:var(--drawer-width, min(90vw, 400px));height:100%;display:flex;flex-direction:column;align-items:flex-start;position:relative}nv-drawer .backdrop .content[data-side=left]{border-top-right-radius:var(--drawer-radius-top-right, 0);border-bottom-right-radius:var(--drawer-radius-bottom-right, 0)}nv-drawer .backdrop .content[data-side=right]{border-top-left-radius:var(--drawer-radius-top-left, 0);border-bottom-left-radius:var(--drawer-radius-bottom-left, 0)}nv-drawer .backdrop .content.size-sm{width:clamp(var(--drawer-size-sm-min-width), var(--drawer-size-sm-width), var(--drawer-size-sm-max-width))}nv-drawer .backdrop .content.size-md{width:clamp(var(--drawer-size-md-min-width), var(--drawer-size-md-width), var(--drawer-size-md-max-width))}nv-drawer .backdrop .content.size-lg{width:clamp(var(--drawer-size-lg-min-width), var(--drawer-size-lg-width), var(--drawer-size-lg-max-width))}nv-drawer .backdrop .content.size-full{width:var(--drawer-size-full-width)}nv-drawer .backdrop .content nv-button.close-button{position:absolute;top:var(--drawer-dismissible-position-top, var(--dialog-dismissible-position-top));right:var(--drawer-dismissible-position-right, var(--dialog-dismissible-position-right));z-index:1;display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:var(--drawer-gap-y, 10px)}nv-drawer .backdrop .content .content-body::-webkit-scrollbar{width:6px;height:6px}nv-drawer .backdrop .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-drawer .backdrop .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-drawer .backdrop .content .content-body{box-sizing:border-box;padding:var(--drawer-padding-y, var(--dialog-body-padding-y)) var(--drawer-padding-x, var(--dialog-body-padding-x));scrollbar-gutter:stable both-edges;flex:1;overflow-y:auto;width:100%;border-bottom:1px solid var(--color-content-low-border);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);color:var(--color-content-medium-text)}nv-drawer .backdrop .content slot[name=footer]::slotted(*),nv-drawer .backdrop .content nv-drawerfooter{padding-top:var(--spacing-4)}";
17
+ const nvDrawerCss = () => `nv-drawer dialog{width:100vw;height:100svh;margin:0;max-height:unset;max-width:unset;padding:0;background:color-mix(in srgb, var(--components-overlay-background) 70%, transparent);backdrop-filter:blur(4px);border:none}nv-drawer dialog[data-state=closed]{pointer-events:none}nv-drawer dialog[data-state=open]{pointer-events:auto}nv-drawer dialog.side-right .backdrop{justify-content:flex-end}nv-drawer dialog.side-right .content{box-shadow:-4px 0 24px rgba(0, 0, 0, 0.15)}nv-drawer dialog.side-left .backdrop{justify-content:flex-start}nv-drawer dialog.side-left .content{box-shadow:4px 0 24px rgba(0, 0, 0, 0.15)}nv-drawer .backdrop{display:flex;height:100%;width:100%;padding:0}nv-drawer .backdrop .content{background:var(--color-level-00-background);width:var(--drawer-width, min(90vw, 400px));height:100%;display:flex;flex-direction:column;align-items:flex-start;position:relative}nv-drawer .backdrop .content[data-side=left]{border-top-right-radius:var(--drawer-radius-top-right, 0);border-bottom-right-radius:var(--drawer-radius-bottom-right, 0)}nv-drawer .backdrop .content[data-side=right]{border-top-left-radius:var(--drawer-radius-top-left, 0);border-bottom-left-radius:var(--drawer-radius-bottom-left, 0)}nv-drawer .backdrop .content.size-sm{width:clamp(var(--drawer-size-sm-min-width), var(--drawer-size-sm-width), var(--drawer-size-sm-max-width))}nv-drawer .backdrop .content.size-md{width:clamp(var(--drawer-size-md-min-width), var(--drawer-size-md-width), var(--drawer-size-md-max-width))}nv-drawer .backdrop .content.size-lg{width:clamp(var(--drawer-size-lg-min-width), var(--drawer-size-lg-width), var(--drawer-size-lg-max-width))}nv-drawer .backdrop .content.size-full{width:var(--drawer-size-full-width)}nv-drawer .backdrop .content nv-button.close-button{position:absolute;top:var(--drawer-dismissible-position-top, var(--dialog-dismissible-position-top));right:var(--drawer-dismissible-position-right, var(--dialog-dismissible-position-right));z-index:1;display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:var(--drawer-gap-y, 10px)}nv-drawer .backdrop .content .content-body::-webkit-scrollbar{width:6px;height:6px}nv-drawer .backdrop .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-drawer .backdrop .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-drawer .backdrop .content .content-body{box-sizing:border-box;padding:var(--drawer-padding-y, var(--dialog-body-padding-y)) var(--drawer-padding-x, var(--dialog-body-padding-x));scrollbar-gutter:stable both-edges;flex:1;overflow-y:auto;width:100%;border-bottom:1px solid var(--color-content-low-border);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);color:var(--color-content-medium-text)}nv-drawer .backdrop .content slot[name=footer]::slotted(*),nv-drawer .backdrop .content nv-drawerfooter{padding-top:var(--spacing-4)}`;
18
18
 
19
19
  const NvDrawer = class {
20
20
  constructor(hostRef) {
@@ -386,25 +386,23 @@ const NvDrawer = class {
386
386
  //#region LIFECYCLE
387
387
  /**
388
388
  * Lifecycle method that runs before the component loads.
389
- * Initializes the trigger, header, and footer elements by finding them in the component's children.
390
- * Elements are found either by their slot attribute or by their tag name (for drawer header/footer)
389
+ * Looks for passed header, and footer elements, either by their slot
390
+ * attribute or by their tag name (for dialog header/footer)
391
391
  */
392
392
  componentWillLoad() {
393
- this.triggerElement = Array.from(this.el.children).find(child => {
394
- return child.getAttribute('slot') === 'trigger';
395
- });
396
- this.headerElement = Array.from(this.el.children).find(child => {
397
- return (child.getAttribute('slot') === 'header' ||
398
- child.tagName.toLowerCase() === 'nv-drawerheader');
399
- });
400
- this.footerElement = Array.from(this.el.children).find(child => {
401
- return (child.getAttribute('slot') === 'footer' ||
402
- child.tagName.toLowerCase() === 'nv-drawerfooter');
403
- });
393
+ if (!this.headerElement)
394
+ this.headerElement =
395
+ this.el.querySelector('[slot="header"]') ??
396
+ this.el.querySelector('nv-drawerheader');
397
+ if (!this.footerElement)
398
+ this.footerElement =
399
+ this.el.querySelector('[slot="footer"]') ??
400
+ this.el.querySelector('nv-drawerfooter');
404
401
  // Initial form check
405
402
  this.checkForForm();
406
403
  }
407
- componentWillUpdate() {
404
+ componentDidRender() {
405
+ this.triggerElement = this.el.querySelector('[slot="trigger"]');
408
406
  this.attachEventListeners();
409
407
  }
410
408
  componentDidLoad() {
@@ -433,13 +431,15 @@ const NvDrawer = class {
433
431
  render() {
434
432
  const hasForm = this.form || this.el.querySelector('form');
435
433
  const state = this.open ? 'open' : 'closed';
436
- return (index.h(index.Host, { key: 'de12ca46afd89b287fc3f2b28e3f6ca79d328338' }, index.h("slot", { key: 'e7568c48a2a676d0f063831c769c1b4dfaee0925', name: "trigger" }), index.h("dialog", { key: '513b404bba6aa0b1d3831d17ef58e1c63fb6f757', ref: el => (this.dialogElement = el), onClose: this.handleDrawerClose, onClick: this.handleDrawerClick, role: "dialog", "aria-modal": "true", "aria-labelledby": "drawer-header", "aria-describedby": "drawer-content", class: clsxChV9xqsO.clsx({ [`side-${this.side}`]: true }), "data-state": state }, index.h("div", { key: '0b9c6fec78844a1e64b33a7bbab62ee44ac0d7bd', class: "backdrop", ref: el => (this.backdropElement = el) }, index.h("div", { key: 'c74cb4b717f232b4622bd9391027c7b048e786e9', class: clsxChV9xqsO.clsx('content', `size-${this.size}`), ref: el => (this.contentElement = el), "data-state": state, "data-side": this.side, style: this.width ? { width: this.width } : {} }, !this.undismissable && (index.h("nv-button", { key: 'f9c03557a3ef3bb1d34e2b764d70a57cfd52dea3', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDrawerClose, "aria-label": "Close drawer" }, index.h("nv-icon", { key: '5c0ea22963bad0bb84eb58e9ad26ebfca6b11b94', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-drawerheader", { id: "drawer-header" })), index.h("div", { key: '813c7b985c6f75faa1fffc56e198957194bda87e', class: "content-body", id: "drawer-content" }, index.h("slot", { key: 'e70eefb8a94ae5e7eff32d5eb0446fba5c56065a' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-drawerfooter", { form: this.form, primaryButtonType: hasForm ? constantsBReL3Lsa.ButtonType.Submit : constantsBReL3Lsa.ButtonType.Button, onDrawerCanceled: this.handleDrawerClose, undismissable: this.undismissable })))))));
434
+ return (index.h(index.Host, { key: 'e8ae3c1b5adcd23622f97d0f405fd8607e51b3e4' }, index.h("slot", { key: 'c94efef46482ef65c9a907d5f23e2306cc88c9af', name: "trigger" }), index.h("dialog", { key: '8b12d8885f4a7f987985b4be49aace1f48b66949', ref: el => (this.dialogElement = el), onClose: this.handleDrawerClose, onClick: this.handleDrawerClick, role: "dialog", "aria-modal": "true", "aria-labelledby": "drawer-header", "aria-describedby": "drawer-content", class: clsxChV9xqsO.clsx({ [`side-${this.side}`]: true }), "data-state": state }, index.h("div", { key: '5fc00bd8e28cf26c92e3c3888941e6209e03fb65', class: "backdrop", ref: el => (this.backdropElement = el) }, index.h("div", { key: '7eb5e3335a15a3821fa4c62160a313bddf34e3b2', class: clsxChV9xqsO.clsx('content', `size-${this.size}`), ref: el => (this.contentElement = el), "data-state": state, "data-side": this.side, style: this.width ? { width: this.width } : {} }, !this.undismissable && (index.h("nv-button", { key: 'c284d6cea03806890603d71d27d642961eab4423', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDrawerClose, "aria-label": "Close drawer" }, index.h("nv-icon", { key: 'daf2c3af54c3eaede4835b100200632e644b7cc6', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-drawerheader", { id: "drawer-header" })), index.h("div", { key: '90ffef76d60a3522ae5daf10554a3f8a487c5f76', class: "content-body", id: "drawer-content" }, index.h("slot", { key: 'd66e675a68c27819f7ca146afc27e63d05ad5603' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-drawerfooter", { form: this.form, primaryButtonType: hasForm ? constantsBReL3Lsa.ButtonType.Submit : constantsBReL3Lsa.ButtonType.Button, onDrawerCanceled: this.handleDrawerClose, undismissable: this.undismissable })))))));
437
435
  }
438
436
  get el() { return index.getElement(this); }
439
437
  static get watchers() { return {
440
- "open": ["handleDrawerOpenChange"]
438
+ "open": [{
439
+ "handleDrawerOpenChange": 0
440
+ }]
441
441
  }; }
442
442
  };
443
- NvDrawer.style = nvDrawerCss;
443
+ NvDrawer.style = nvDrawerCss();
444
444
 
445
445
  exports.nv_drawer = NvDrawer;