@nova-design-system/nova-react 3.23.0 → 3.24.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 (74) hide show
  1. package/dist/cjs/events.utils-B6GgGra--01N__3wY.js +23 -0
  2. package/dist/cjs/generated/components.server.js +47 -0
  3. package/dist/cjs/{grow.animation-CvHGHBL4-DDIEYBK-.js → grow.animation-D7ep_aVl-BuXEDSK-.js} +0 -21
  4. package/dist/cjs/{i18n.utils-DOZbXX2L-BizoXo6c.js → i18n.utils-IlwlcG9l-ku0bScip.js} +14 -18
  5. package/dist/cjs/{index-CtjeeUI-.js → index-kU2nW5aN.js} +1589 -920
  6. package/dist/cjs/{nv-dialog.entry-O47Eol_7.js → index.esm-D3eWMME9-CG1TVKfu.js} +1 -296
  7. package/dist/cjs/index.js +4 -1
  8. package/dist/cjs/{nv-accordion-item.entry-B_l0-ux0.js → nv-accordion-item.entry-Bu1tAcCq.js} +1 -1
  9. package/dist/cjs/{nv-accordion.entry-BX8_YuZF.js → nv-accordion.entry-jWjLdX8w.js} +3 -8
  10. package/dist/cjs/{nv-alert.entry-DCWYR0OK.js → nv-alert.entry-E9ZJay_K.js} +2 -3
  11. package/dist/cjs/{nv-avatar.entry-C_xZD3Lp.js → nv-avatar.entry-CUX7u0kR.js} +1 -1
  12. package/dist/cjs/{nv-badge_2.entry-JjqANStV.js → nv-badge_2.entry-bxpV5gxE.js} +2 -2
  13. package/dist/cjs/{nv-breadcrumb.entry-DQZDn6cm.js → nv-breadcrumb.entry-Cbbb9Qeh.js} +1 -1
  14. package/dist/cjs/{nv-breadcrumbs.entry-Bz0GjhY_.js → nv-breadcrumbs.entry-BTqnp9zO.js} +1 -1
  15. package/dist/cjs/{nv-button.entry-Br1DH9Vj.js → nv-button.entry-upWH19y6.js} +4 -6
  16. package/dist/cjs/{nv-buttongroup.entry-BZaTKN_n.js → nv-buttongroup.entry-CuZCRsnV.js} +1 -1
  17. package/dist/cjs/{nv-calendar.entry-D9ESuu7C.js → nv-calendar.entry-CT3mASW6.js} +15 -25
  18. package/dist/cjs/{nv-col.entry-CfgPMMxS.js → nv-col.entry--pCxkaTh.js} +1 -1
  19. package/dist/cjs/{nv-datagrid.entry-DcB5q2oC.js → nv-datagrid.entry-CGCEhO8C.js} +68 -73
  20. package/dist/cjs/{nv-datagridcolumn.entry-BhKOzXA6.js → nv-datagridcolumn.entry-Fsqc7CT_.js} +1 -1
  21. package/dist/cjs/nv-dialog.entry-B6OYcZxQ.js +300 -0
  22. package/dist/cjs/{nv-dialogfooter_2.entry-Dn16bI8a.js → nv-dialogfooter_2.entry-C4fP_n2-.js} +1 -1
  23. package/dist/cjs/nv-drawer.entry-C5O4KvHU.js +445 -0
  24. package/dist/cjs/nv-drawerfooter_2.entry-C-reYJXG.js +146 -0
  25. package/dist/cjs/{nv-fieldcheckbox.entry-Bx6ArV_b.js → nv-fieldcheckbox.entry-bk7UNQny.js} +7 -7
  26. package/dist/cjs/{nv-fielddate.entry-B4P0U8QG.js → nv-fielddate.entry-dqZDBVmm.js} +13 -16
  27. package/dist/cjs/{nv-fielddaterange.entry-BORwYJ-k.js → nv-fielddaterange.entry-wNRasXky.js} +13 -14
  28. package/dist/cjs/{nv-fielddropdown.entry-DzBAIynY.js → nv-fielddropdown.entry-BA15piWa.js} +40 -49
  29. package/dist/cjs/{nv-fielddropdownitem.entry-C_17isWd.js → nv-fielddropdownitem.entry-DEWaf9dC.js} +3 -4
  30. package/dist/cjs/{nv-fieldmultiselect.entry-DiqRreWh.js → nv-fieldmultiselect.entry-BWY5xOAd.js} +35 -43
  31. package/dist/cjs/{nv-fieldnumber.entry-C9O4UPp3.js → nv-fieldnumber.entry-DoYORd0d.js} +7 -7
  32. package/dist/cjs/{nv-fieldpassword.entry-BfVJNT0A.js → nv-fieldpassword.entry-CPaLj9aD.js} +7 -7
  33. package/dist/cjs/{nv-fieldradio.entry-CG22oETM.js → nv-fieldradio.entry-CvUmEaCa.js} +5 -5
  34. package/dist/cjs/{nv-fieldselect.entry-BPQEtrv2.js → nv-fieldselect.entry-uUIZ6hmN.js} +9 -9
  35. package/dist/cjs/{nv-fieldslider.entry-CozmnUfN.js → nv-fieldslider.entry-DnvmxxYY.js} +6 -6
  36. package/dist/cjs/{nv-fieldtext.entry-BD-z01ru.js → nv-fieldtext.entry-BYAJp3n_.js} +7 -7
  37. package/dist/cjs/{nv-fieldtextarea.entry-7UrKWDHg.js → nv-fieldtextarea.entry-DU2bWYeg.js} +7 -8
  38. package/dist/cjs/{nv-fieldtime.entry-DakOlLiO.js → nv-fieldtime.entry-DlMNDTht.js} +28 -36
  39. package/dist/cjs/{nv-icon.entry-Db00kB2u.js → nv-icon.entry-CnUkRzaA.js} +3 -3
  40. package/dist/cjs/{nv-iconbutton_2.entry-CaKCa8NT.js → nv-iconbutton_2.entry-hqp4AcRq.js} +6 -7
  41. package/dist/cjs/{nv-menu.entry-CK2HdmBt.js → nv-menu.entry-Dc_FvIx7.js} +4 -5
  42. package/dist/cjs/{nv-menuitem.entry-mKMqCAdz.js → nv-menuitem.entry-DzMhx6c_.js} +2 -2
  43. package/dist/cjs/{nv-notification-bullet.entry-DtbjtFxs.js → nv-notification-bullet.entry-BwhHCMQF.js} +2 -3
  44. package/dist/cjs/{nv-notification.entry-CLb0gNu3.js → nv-notification.entry-C3m5p5BL.js} +11 -97
  45. package/dist/cjs/{nv-notificationcontainer.entry-Cijivlm6.js → nv-notificationcontainer.entry-DTRNn7VE.js} +2 -2
  46. package/dist/cjs/{nv-popover.entry-mLdLSp6n.js → nv-popover.entry-B0c-2rO4.js} +15 -15
  47. package/dist/cjs/{nv-row.entry-C2C94fcv.js → nv-row.entry-CdcjVGZv.js} +2 -2
  48. package/dist/cjs/{nv-sidebar.entry-inDVNJ4s.js → nv-sidebar.entry-CiN813gQ.js} +4 -4
  49. package/dist/cjs/{nv-sidebarcontent.entry-DxoljE15.js → nv-sidebarcontent.entry-D9hpAhK8.js} +2 -2
  50. package/dist/cjs/{nv-sidebardivider.entry-D_yern0R.js → nv-sidebardivider.entry-B4EMyca5.js} +2 -2
  51. package/dist/cjs/{nv-sidebarfooter.entry-Rkkn9TB_.js → nv-sidebarfooter.entry-CHi4qOFe.js} +2 -2
  52. package/dist/cjs/{nv-sidebargroup.entry-C1p9qqxr.js → nv-sidebargroup.entry-RVqrsyIU.js} +2 -2
  53. package/dist/cjs/{nv-sidebarheader.entry-CYpD_4pI.js → nv-sidebarheader.entry-_7ch0O3G.js} +2 -2
  54. package/dist/cjs/{nv-sidebarlogo.entry-BgK03M1v.js → nv-sidebarlogo.entry-Ch9F-JnT.js} +2 -2
  55. package/dist/cjs/{nv-sidebarnavitem.entry-DglvcCOD.js → nv-sidebarnavitem.entry-DVrafSMr.js} +5 -6
  56. package/dist/cjs/{nv-sidebarnavsubitem.entry-Dt1jKmC-.js → nv-sidebarnavsubitem.entry-C0XDAzma.js} +2 -2
  57. package/dist/cjs/{nv-split.entry-mzg2F66T.js → nv-split.entry-0HTslRAX.js} +44 -42
  58. package/dist/cjs/{nv-stack.entry-nnvjTrBy.js → nv-stack.entry-CqO7uTQf.js} +2 -2
  59. package/dist/cjs/{nv-table.entry-DkbNgxtI.js → nv-table.entry-DH85n8Mc.js} +7 -9
  60. package/dist/cjs/{nv-tableheader.entry-CRVFTQA-.js → nv-tableheader.entry-CKfocdxD.js} +3 -3
  61. package/dist/cjs/{nv-toggle.entry-oC9TVkr1.js → nv-toggle.entry-BHUl76Im.js} +3 -3
  62. package/dist/cjs/nv-togglebutton.entry-D_9COjY-.js +67 -0
  63. package/dist/cjs/{nv-togglebuttongroup.entry-BYXX5ejg.js → nv-togglebuttongroup.entry-C0NLbsq7.js} +4 -5
  64. package/dist/cjs/{nv-tooltip.entry-OJGxfJEh.js → nv-tooltip.entry-BfViGE_U.js} +2 -2
  65. package/dist/cjs/slide.animation-CmH5d1of-BZuw607U.js +90 -0
  66. package/dist/components/NvDatatable/NvDatatable.js +40 -24
  67. package/dist/generated/components.js +27 -0
  68. package/dist/generated/components.server.js +44 -0
  69. package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
  70. package/dist/types/components/NvDatatable/types.d.ts +8 -3
  71. package/dist/types/generated/components.d.ts +14 -0
  72. package/dist/types/generated/components.server.d.ts +14 -0
  73. package/package.json +1 -1
  74. package/dist/cjs/nv-togglebutton.entry-BTWCzbS9.js +0 -67
@@ -1,17 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
4
- var grow_animationCvHGHBL4 = require('./grow.animation-CvHGHBL4-DDIEYBK-.js');
5
- var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
6
- require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
7
- var timeline_animationCgHCo_Ho = require('./timeline.animation-CgHCo_Ho-KteJaZPb.js');
8
- var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
9
- var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
10
- var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
11
- require('@stencil/react-output-target/runtime');
12
- require('react');
13
- require('react-dom');
14
-
15
3
  /*!
16
4
  * tabbable 6.2.0
17
5
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
@@ -546,287 +534,4 @@ var tabbable = function tabbable(container, options) {
546
534
  return sortByOrder(candidates);
547
535
  };
548
536
 
549
- 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%}";
550
-
551
- const NvDialog = class {
552
- constructor(hostRef) {
553
- index.registerInstance(this, hostRef);
554
- this.openChanged = index.createEvent(this, "openChanged", 3);
555
- this.eventsAttached = false;
556
- this.triggerClickEvents = [
557
- ['click', this.show],
558
- [
559
- 'keydown',
560
- (e) => {
561
- if (e.key === 'Enter' || e.key === ' ') {
562
- e.preventDefault();
563
- this.show();
564
- }
565
- },
566
- ],
567
- ];
568
- /**
569
- * Use this prop to toggle the visibility of the dialog. Set to true to show
570
- * the dialog and false to hide it.
571
- */
572
- this.open = false;
573
- /**
574
- * If true, the dialog cannot be closed by the user.
575
- */
576
- this.undismissable = false;
577
- /**
578
- * If true, the dialog will be closed when the backdrop is clicked.
579
- */
580
- this.clickOutside = false;
581
- /**
582
- * If true, the dialog visibility is managed manually through methods or the
583
- * open prop.
584
- */
585
- this.controlled = false;
586
- /**
587
- * If true, the dialog takes full width styling.
588
- */
589
- this.full = false;
590
- /**
591
- * Controls whether the dialog should automatically focus the first focusable
592
- * element when opened. When disabled, prevents unwanted tooltip triggers on
593
- * dialog open.
594
- */
595
- this.autofocus = false;
596
- /**
597
- * Checks for and sets up form ID if a form is present
598
- */
599
- this.checkForForm = () => {
600
- if (!this.form) {
601
- const formElement = this.el.querySelector('form');
602
- if (formElement) {
603
- this.form = this.ensureFormId(formElement);
604
- }
605
- }
606
- };
607
- /**
608
- * Handles the native dialog close event.
609
- */
610
- this.handleDialogClose = () => {
611
- if (this.open) {
612
- this.close();
613
- }
614
- };
615
- /**
616
- * Handles the click event to close the dialog when clickOutside is true.
617
- * @param {MouseEvent} event - The click event.
618
- */
619
- this.handleDialogClick = (event) => {
620
- if (!this.clickOutside || this.undismissable)
621
- return;
622
- if (this.checkForOpenPopovers())
623
- return;
624
- if (event.target === this.backdropElement) {
625
- this.close();
626
- event.preventDefault();
627
- event.stopPropagation();
628
- }
629
- };
630
- this.checkForOpenPopovers = () => {
631
- let hasOpenPopover = false;
632
- this.el.querySelectorAll('nv-popover').forEach(popover => {
633
- if (popover.hasAttribute('open')) {
634
- hasOpenPopover = true;
635
- }
636
- });
637
- return hasOpenPopover;
638
- };
639
- }
640
- //#endregion PROPERTIES
641
- /****************************************************************************/
642
- //#region METHODS
643
- /**
644
- * Call this method to show the dialog, making it visible on the screen.
645
- */
646
- async show() {
647
- this.open = true;
648
- this.preventScroll();
649
- /** It is recommended to use the .show() or .showModal() method to render
650
- * dialogs, rather than the open attribute. If a <dialog> is opened using
651
- * the open attribute, it is non-modal. */
652
- const { setFadeOut } = fade_animationDcRL9lcm.useFade(this.dialogElement);
653
- setFadeOut();
654
- this.dialogElement.showModal();
655
- const { setGrowIn, growIn } = grow_animationCvHGHBL4.useGrow(this.contentElement, {
656
- duration: 100,
657
- amount: 0.9,
658
- });
659
- const { fadeIn } = fade_animationDcRL9lcm.useFade(this.dialogElement, {
660
- duration: 100,
661
- });
662
- setGrowIn();
663
- await timeline_animationCgHCo_Ho.parallel(fadeIn, growIn).start();
664
- }
665
- /**
666
- * Call this method to hide the dialog, making it disappear from view.
667
- */
668
- async close() {
669
- this.open = false;
670
- this.allowScroll();
671
- const { growOut } = grow_animationCvHGHBL4.useGrow(this.contentElement, {
672
- duration: 150,
673
- amount: 0.85,
674
- });
675
- const { fadeOut } = fade_animationDcRL9lcm.useFade(this.dialogElement, {
676
- duration: 150,
677
- });
678
- await timeline_animationCgHCo_Ho.parallel(growOut, fadeOut).start();
679
- this.dialogElement.close();
680
- }
681
- /**
682
- * Sets the autofocus on the first focusable element in the dialog.
683
- */
684
- setAutofocus() {
685
- const focusableElements = tabbable(this.dialogElement, {
686
- displayCheck: 'none',
687
- });
688
- if (focusableElements.length > 0) {
689
- // Convert to array and find element with smallest top and left position
690
- let topLeftElement = focusableElements[0];
691
- let topLeftRect = topLeftElement.getBoundingClientRect();
692
- focusableElements.forEach(element => {
693
- const rect = element.getBoundingClientRect();
694
- if (rect.top < topLeftRect.top || rect.left < topLeftRect.left) {
695
- topLeftElement = element;
696
- topLeftRect = rect;
697
- }
698
- });
699
- // Set autofocus attribute on the found element
700
- topLeftElement.setAttribute('autofocus', 'true');
701
- }
702
- }
703
- /**
704
- * Attaches event listeners to the dialog.
705
- */
706
- attachEventListeners() {
707
- if (this.triggerElement && !this.eventsAttached && !this.controlled) {
708
- grow_animationCvHGHBL4.addEventListeners(this.triggerClickEvents, this.triggerElement, this);
709
- this.eventsAttached = true;
710
- }
711
- }
712
- /**
713
- * Prevents the body from scrolling when the dialog is open.
714
- * Compensates for scrollbar width to prevent layout shift.
715
- */
716
- preventScroll() {
717
- // Calculate scrollbar width
718
- const scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
719
- // Apply overflow hidden and padding compensation
720
- document.documentElement.style.overflow = 'hidden';
721
- document.documentElement.style.paddingRight = `${scrollBarWidth}px`;
722
- }
723
- /**
724
- * Allows the body to scroll when the dialog is closed.
725
- * Removes the applied overflow and padding styles.
726
- */
727
- allowScroll() {
728
- // Remove the applied styles
729
- document.documentElement.style.removeProperty('overflow');
730
- document.documentElement.style.removeProperty('padding-right');
731
- }
732
- ensureFormId(formElement) {
733
- if (!formElement.id) {
734
- formElement.id = `dialog-form-${v4BdYh22OP.v4()}`;
735
- }
736
- return formElement.id;
737
- }
738
- //#endregion EVENTS
739
- /****************************************************************************/
740
- //#region WATCHERS
741
- async handleDialogOpenChange(isOpen) {
742
- if (isOpen) {
743
- this.show();
744
- this.openChanged.emit(isOpen);
745
- }
746
- else {
747
- this.close();
748
- this.openChanged.emit(isOpen);
749
- }
750
- }
751
- //#endregion WATCHERS
752
- /****************************************************************************/
753
- //#region LISTENERS
754
- /**
755
- * Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.
756
- * @param {KeyboardEvent} event - The keydown event.
757
- */
758
- handleKeyDown(event) {
759
- if (event.key !== 'Escape')
760
- return;
761
- if (!this.open)
762
- return;
763
- event.preventDefault();
764
- event.stopPropagation();
765
- const hasOpenPopover = this.checkForOpenPopovers();
766
- if (!this.undismissable && !hasOpenPopover) {
767
- event.preventDefault();
768
- event.stopPropagation();
769
- this.close();
770
- }
771
- }
772
- //#endregion LISTENERS
773
- /****************************************************************************/
774
- //#region LIFECYCLE
775
- /**
776
- * Lifecycle method that runs before the component loads.
777
- * Initializes the trigger, header, and footer elements by finding them in the component's children.
778
- * Elements are found either by their slot attribute or by their tag name (for dialog header/footer)
779
- */
780
- componentWillLoad() {
781
- this.triggerElement = Array.from(this.el.children).find(child => {
782
- return child.getAttribute('slot') === 'trigger';
783
- });
784
- this.headerElement = Array.from(this.el.children).find(child => {
785
- return (child.getAttribute('slot') === 'header' ||
786
- child.tagName.toLowerCase() === 'nv-dialogheader');
787
- });
788
- this.footerElement = Array.from(this.el.children).find(child => {
789
- return (child.getAttribute('slot') === 'footer' ||
790
- child.tagName.toLowerCase() === 'nv-dialogfooter');
791
- });
792
- // Initial form check
793
- this.checkForForm();
794
- }
795
- componentWillUpdate() {
796
- this.attachEventListeners();
797
- }
798
- componentDidLoad() {
799
- if (this.open) {
800
- this.show();
801
- }
802
- // Only set autofocus if the prop is true and no element already has autofocus
803
- if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {
804
- this.setAutofocus();
805
- }
806
- this.attachEventListeners();
807
- // Additional form check in case form was added after initial load
808
- this.checkForForm();
809
- // this.setupContentBodyListeners();
810
- }
811
- disconnectedCallback() {
812
- if (this.triggerElement && !this.eventsAttached && !this.controlled) {
813
- grow_animationCvHGHBL4.removeEventListeners(this.triggerClickEvents, this.triggerElement, this);
814
- this.eventsAttached = false;
815
- }
816
- this.allowScroll();
817
- }
818
- //#endregion LIFECYCLE
819
- /****************************************************************************/
820
- //#region RENDER
821
- render() {
822
- const hasForm = this.form || this.el.querySelector('form');
823
- 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 })))))));
824
- }
825
- get el() { return index.getElement(this); }
826
- static get watchers() { return {
827
- "open": ["handleDialogOpenChange"]
828
- }; }
829
- };
830
- NvDialog.style = nvDialogCss;
831
-
832
- exports.nv_dialog = NvDialog;
537
+ exports.tabbable = tabbable;
package/dist/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -71,6 +71,9 @@ exports.NvDatatable = index.NvDatatable;
71
71
  exports.NvDialog = index.NvDialog;
72
72
  exports.NvDialogfooter = index.NvDialogfooter;
73
73
  exports.NvDialogheader = index.NvDialogheader;
74
+ exports.NvDrawer = index.NvDrawer;
75
+ exports.NvDrawerfooter = index.NvDrawerfooter;
76
+ exports.NvDrawerheader = index.NvDrawerheader;
74
77
  exports.NvFieldcheckbox = index.NvFieldcheckbox;
75
78
  exports.NvFielddate = index.NvFielddate;
76
79
  exports.NvFielddaterange = index.NvFielddaterange;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  var collapse_animationDZDm0vSK = require('./collapse.animation-DZDm0vSK-C2TOIhIK.js');
5
5
  require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
6
6
  require('@stencil/react-output-target/runtime');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -143,10 +143,9 @@ const NvAccordion = class {
143
143
  }
144
144
  }
145
145
  async componentDidLoad() {
146
- var _a;
147
146
  const items = Array.from(this.el.querySelectorAll('nv-accordion-item'));
148
147
  // Only initialize openIndexes from child items if no data is provided and openIndexes is not explicitly set
149
- if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) &&
148
+ if (!this.data?.length &&
150
149
  (!this.openIndexes || this.openIndexes.length === 0)) {
151
150
  const childOpenIndexes = items
152
151
  .map((item, i) => (item.hasAttribute('open') || item.open ? i : -1))
@@ -165,11 +164,7 @@ const NvAccordion = class {
165
164
  /****************************************************************************/
166
165
  //#region RENDER
167
166
  render() {
168
- var _a;
169
- return (index.h(index.Host, { key: 'b498df032480f7b961883ad963ea1c7729e964cb', role: "list", class: "nv-accordion" }, ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) ? (this.data.map((item, i) => {
170
- var _a;
171
- return (index.h("nv-accordion-item", { key: (_a = item.id) !== null && _a !== void 0 ? _a : i, itemTitle: item.title, disabled: item.disabled, open: (this.openIndexes || []).includes(i), mode: this.mode }, item.subtitle ? (index.h("div", { slot: "header" }, index.h("div", { class: "nv-accordion-item__header-content" }, index.h("span", { class: "nv-accordion-item__title" }, item.title), index.h("span", { class: "nv-accordion-item__subtitle" }, item.subtitle)))) : null, index.h("div", { slot: "content" }, item.content), item.footer && index.h("div", { slot: "footer" }, item.footer)));
172
- })) : (index.h("slot", null))));
167
+ return (index.h(index.Host, { key: 'b498df032480f7b961883ad963ea1c7729e964cb', role: "list", class: "nv-accordion" }, this.data?.length ? (this.data.map((item, i) => (index.h("nv-accordion-item", { key: item.id ?? i, itemTitle: item.title, disabled: item.disabled, open: (this.openIndexes || []).includes(i), mode: this.mode }, item.subtitle ? (index.h("div", { slot: "header" }, index.h("div", { class: "nv-accordion-item__header-content" }, index.h("span", { class: "nv-accordion-item__title" }, item.title), index.h("span", { class: "nv-accordion-item__subtitle" }, item.subtitle)))) : null, index.h("div", { slot: "content" }, item.content), item.footer && index.h("div", { slot: "footer" }, item.footer))))) : (index.h("slot", null))));
173
168
  }
174
169
  get el() { return index.getElement(this); }
175
170
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
5
  var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
6
6
  var collapse_animationDZDm0vSK = require('./collapse.animation-DZDm0vSK-C2TOIhIK.js');
@@ -163,8 +163,7 @@ const NvAlert = class {
163
163
  /****************************************************************************/
164
164
  //#region RENDER
165
165
  render() {
166
- var _a;
167
- return (index.h(index.Host, { key: '2c89126ecbdca5e8df9c0541a4e312d2dc8a9fb3', role: "alert", class: clsxChV9xqsO.clsx('root', `feedback-${this.feedback}`) }, index.h("nv-icon", { key: '3aa514682ac670d81c7c88fa8b9b6f02e2761c45', name: (_a = this.icon) !== null && _a !== void 0 ? _a : this.getDefaultIcon(), class: `icon-${this.feedback}`, size: "md" }), index.h("div", { key: '5049bdb9d17b9ef07e15554631cc8fbd557e4b22', class: "content" }, this.heading && index.h("p", { key: '3faaa7e738f484f2f7dc543866eadaa861c0709b', class: "heading" }, this.heading), this.message && index.h("p", { key: 'abd16d9cb5bc2f28e63c534e8f9f2169e511df2f', class: "message" }, this.message), index.h("slot", { key: '0b14b616a7e6665f903f0aa6c32f706b0aa8bd27' })), this.dismissible && (index.h("button", { key: '5d35998aac73ea82ef06e1d083597a7677c0cd70', class: "close", type: "button", onClick: this.handleDismiss }, index.h("nv-icon", { key: '3088178c1152525a400d116ac07ce372dadd420b', name: "x", size: "sm" })))));
166
+ return (index.h(index.Host, { key: '2c89126ecbdca5e8df9c0541a4e312d2dc8a9fb3', role: "alert", class: clsxChV9xqsO.clsx('root', `feedback-${this.feedback}`) }, index.h("nv-icon", { key: '3aa514682ac670d81c7c88fa8b9b6f02e2761c45', name: this.icon ?? this.getDefaultIcon(), class: `icon-${this.feedback}`, size: "md" }), index.h("div", { key: '5049bdb9d17b9ef07e15554631cc8fbd557e4b22', class: "content" }, this.heading && index.h("p", { key: '3faaa7e738f484f2f7dc543866eadaa861c0709b', class: "heading" }, this.heading), this.message && index.h("p", { key: 'abd16d9cb5bc2f28e63c534e8f9f2169e511df2f', class: "message" }, this.message), index.h("slot", { key: '0b14b616a7e6665f903f0aa6c32f706b0aa8bd27' })), this.dismissible && (index.h("button", { key: '5d35998aac73ea82ef06e1d083597a7677c0cd70', class: "close", type: "button", onClick: this.handleDismiss }, index.h("nv-icon", { key: '3088178c1152525a400d116ac07ce372dadd420b', name: "x", size: "sm" })))));
168
167
  }
169
168
  get el() { return index.getElement(this); }
170
169
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
5
  var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
6
6
  require('@stencil/react-output-target/runtime');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
5
  var collapse_animationDZDm0vSK = require('./collapse.animation-DZDm0vSK-C2TOIhIK.js');
6
6
  var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
@@ -203,7 +203,7 @@ const NvFielddropdownitemcheck = class {
203
203
  /****************************************************************************/
204
204
  //#region RENDER
205
205
  render() {
206
- return (index.h(index.Host, { key: 'e748d27a6ee1168b069793541de3bf2defd34b85', onClick: this.handleClick }, index.h("nv-fieldcheckbox", { key: '967307de6a757e0cd5cb061d57ce94c04c3e84e4', checked: this.checked, name: this.label || this.value, label: this.label || this.value, labelPlacement: "after", description: this.description, disabled: this.disabled, tabindex: "-1", onCheckedChanged: this.onFieldcheckboxChanged }, index.h("slot", { key: '9e76ecb6c08ef6b9fe3ea07790c469676fdad227' }), index.h("slot", { key: '9a40f79c6685e89d58b661bcd00c00158fe6bce6', name: "main" }), index.h("slot", { key: '8c901183f49fa4f911a8265df45a19202259015a', name: "label" }), index.h("slot", { key: 'd35e5af79bb83482d5e8568b5aaedc6815ec9b4e', name: "description" }))));
206
+ return (index.h(index.Host, { key: '97827418a246f09cfda685f15b661359d0812d8c', onClick: this.handleClick }, index.h("nv-fieldcheckbox", { key: 'e656cf4d9e7f2e7f08ded1a8d42e4d5703f5d184', checked: this.checked, name: this.label || this.value, label: this.label || this.value, labelPlacement: "after", description: this.description, disabled: this.disabled, tabindex: "-1", onCheckedChanged: this.onFieldcheckboxChanged }, index.h("slot", { key: 'cfd59f0f0fc834d3fb29a39637f65c92ffba15b8' }), index.h("slot", { key: 'ae5daefbb1952ebb19d3dd3d8b7c36667dcac79e', name: "main" }), index.h("slot", { key: '30ab019b447024c3feab154a67779de5b8dc16a2', name: "label" }), index.h("slot", { key: '2cf42ee653cc99ab9e925ede1da74694bfa57106', name: "description" }))));
207
207
  }
208
208
  get el() { return index.getElement(this); }
209
209
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
5
  require('@stencil/react-output-target/runtime');
6
6
  require('react');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.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-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
5
5
  require('@stencil/react-output-target/runtime');
6
6
  require('react');
@@ -77,13 +77,12 @@ const NvButton = class {
77
77
  * @param {Event} event - The click event.
78
78
  */
79
79
  this.handleButtonClick = (event) => {
80
- var _a;
81
80
  if (this.loading || this.disabled) {
82
81
  event.preventDefault();
83
82
  return;
84
83
  }
85
84
  if (this.type !== constantsBReL3Lsa.ButtonType.Button &&
86
- (this.form || ((_a = this.internals) === null || _a === void 0 ? void 0 : _a.form))) {
85
+ (this.form || this.internals?.form)) {
87
86
  this.processFormAction();
88
87
  }
89
88
  else if (this.form && this.type === constantsBReL3Lsa.ButtonType.Button) {
@@ -96,12 +95,11 @@ const NvButton = class {
96
95
  * Falls back to ElementInternals form if no explicit form ID is provided.
97
96
  */
98
97
  this.processFormAction = () => {
99
- var _a, _b;
100
98
  const formElement = this.form
101
99
  ? document.getElementById(this.form)
102
- : (_a = this.internals) === null || _a === void 0 ? void 0 : _a.form;
100
+ : this.internals?.form;
103
101
  if (!formElement) {
104
- console.warn('No form element found.', `Form ID: ${this.form || 'Not provided'}`, `Internals form:`, (_b = this.internals) === null || _b === void 0 ? void 0 : _b.form);
102
+ console.warn('No form element found.', `Form ID: ${this.form || 'Not provided'}`, `Internals form:`, this.internals?.form);
105
103
  return;
106
104
  }
107
105
  switch (this.type) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.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-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
5
5
  var _commonjsHelpersB85MJLTf = require('./_commonjsHelpers-B85MJLTf-CFO10eej.js');
6
6
  require('@stencil/react-output-target/runtime');
@@ -411,8 +411,7 @@ const WeekNumbers = props => {
411
411
  return () => handleWeekClick(week);
412
412
  };
413
413
  return (index.h("div", { class: "week-numbers" }, index.h("div", { class: "week-header" }, localizedWeekText), weeks.map((week, weekIndex) => {
414
- var _a;
415
- const firstDayWithDate = ((_a = week.find(d => d.date)) === null || _a === void 0 ? void 0 : _a.date) || new Date();
414
+ const firstDayWithDate = week.find(d => d.date)?.date || new Date();
416
415
  const weekNumber = getWeekNumber(firstDayWithDate);
417
416
  const isClickable = selectionType === 'range';
418
417
  return (index.h("div", { class: `week-number ${isClickable ? 'clickable' : ''}`, onClick: createWeekHandler(week), key: `week-${weekIndex}`, role: isClickable ? 'button' : undefined, tabindex: isClickable ? 0 : undefined }, weekNumber));
@@ -643,7 +642,7 @@ const NvCalendar = class {
643
642
  }
644
643
  else {
645
644
  // Handle malformed dates gracefully - reset state
646
- console.warn(`Invalid date range format: ${values === null || values === void 0 ? void 0 : values[0]}, ${values === null || values === void 0 ? void 0 : values[1]}`);
645
+ console.warn(`Invalid date range format: ${values?.[0]}, ${values?.[1]}`);
647
646
  this.startDate = null;
648
647
  this.endDate = null;
649
648
  if (!this.showActions) {
@@ -921,26 +920,17 @@ const NvCalendar = class {
921
920
  this.handleMonthChange = (event, calendarOffset = 0) => {
922
921
  const select = event.target;
923
922
  const selectedMonth = parseInt(select.value, 10);
924
- const newDate = new Date(this.currentDate);
925
- // Date for the calendar being changed
926
- const targetCalendarDate = new Date(newDate.toUTCString());
923
+ // Calculate the current displayed year for this specific calendar
924
+ const targetCalendarDate = new Date(this.currentDate);
925
+ targetCalendarDate.setUTCDate(1);
927
926
  targetCalendarDate.setUTCMonth(targetCalendarDate.getUTCMonth() + calendarOffset);
928
- const currentMonth = targetCalendarDate.getUTCMonth();
929
- let monthDiff = selectedMonth - currentMonth;
930
- // Smartly adjust for year change
931
- if (monthDiff > 6) {
932
- // e.g. from Jan to Dec, go back 1 month
933
- monthDiff -= 12;
934
- }
935
- if (monthDiff < -6) {
936
- // e.g. from Dec to Jan, go forward 1 month
937
- monthDiff += 12;
938
- }
939
- // Apply the diff to the original `currentDate`
940
- const finalDate = new Date(this.currentDate);
941
- // Avoid day-of-month rollover when moving to shorter months.
942
- finalDate.setUTCDate(1);
943
- finalDate.setUTCMonth(finalDate.getUTCMonth() + monthDiff);
927
+ const currentYear = targetCalendarDate.getUTCFullYear();
928
+ // Create a new date with the selected month, keeping the SAME year
929
+ // This ensures the year never changes when selecting a month
930
+ const newTargetDate = new Date(Date.UTC(currentYear, selectedMonth, 1));
931
+ // Calculate what currentDate should be by subtracting the offset
932
+ const finalDate = new Date(newTargetDate);
933
+ finalDate.setUTCMonth(finalDate.getUTCMonth() - calendarOffset);
944
934
  this.currentDate = finalDate;
945
935
  };
946
936
  /**
@@ -1419,8 +1409,8 @@ const NvCalendar = class {
1419
1409
  * @slot default - Child content of the component.
1420
1410
  */
1421
1411
  render() {
1422
- return (index.h(index.Host, { key: '9a2df275a214bedb084034e2936cd12ba2024300' }, index.h("div", { key: '400094ae82785980d16040b659e9a1b04d8c0de8', class: "datepicker-root" }, index.h("div", { key: '9e38e04428b64b4185555491c970a09326beceb8', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, index.h("div", { key: '29e6968fad93c8d822beabf37bdd7840cd90eb62', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), ((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||
1423
- this.hasActions) && (index.h("div", { key: '4a49e27c472dff679cd8e6ea1db3fcd16e164522', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), index.h("slot", { key: '4482d2bbd341cacd8b1c529d3be054e8a33fd515' })));
1412
+ return (index.h(index.Host, { key: '18793334c6b01685f8c42acb0709bb3b35a1d466' }, index.h("div", { key: '2fa622b5027d4fc94732e0826fac044056e8bca1', class: "datepicker-root" }, index.h("div", { key: '4c88d823b5a720d3529bc199014b5e498ba1a701', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, index.h("div", { key: 'e6be82fb79db589171e4db2beb640fb005dd603f', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), ((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||
1413
+ this.hasActions) && (index.h("div", { key: '5991593c0ae9128c3dfea099db2864a37105c9a4', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), index.h("slot", { key: '5e92296fdc3732ea7f241a5ce381e0234330e7a3' })));
1424
1414
  }
1425
1415
  get el() { return index.getElement(this); }
1426
1416
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
5
  require('@stencil/react-output-target/runtime');
6
6
  require('react');