@nova-design-system/nova-react 3.21.0 → 3.22.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.
- package/dist/cjs/grow.animation-24ad5cf8-LUp_ITEx.js +111 -0
- package/dist/cjs/{index-yxDlFA78.js → index-WPRkQD3O.js} +475 -178
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{nv-accordion-item.entry-5DF2ffDE.js → nv-accordion-item.entry-BuTvA6w9.js} +1 -1
- package/dist/cjs/{nv-accordion.entry-CPB1HBT1.js → nv-accordion.entry-Dtsfw6He.js} +1 -1
- package/dist/cjs/{nv-alert.entry-jPxt1obA.js → nv-alert.entry-TIdfdU7Y.js} +1 -1
- package/dist/cjs/{nv-avatar.entry-zmnREEN-.js → nv-avatar.entry-CaxrhPuw.js} +1 -1
- package/dist/cjs/{nv-badge_2.entry-DtkQx_M9.js → nv-badge_2.entry-CfYvTZxX.js} +2 -2
- package/dist/cjs/{nv-breadcrumb.entry-DHAe5FxQ.js → nv-breadcrumb.entry-BCZ4MmfD.js} +1 -1
- package/dist/cjs/{nv-breadcrumbs.entry-C7XepUqF.js → nv-breadcrumbs.entry-DwzCE7F6.js} +1 -1
- package/dist/cjs/{nv-button.entry-Dg1knj3Y.js → nv-button.entry-Cr_86bcZ.js} +1 -1
- package/dist/cjs/{nv-buttongroup.entry-Dlim9p8N.js → nv-buttongroup.entry-CWjRoHY1.js} +1 -1
- package/dist/cjs/{nv-calendar.entry-rL5_GdQg.js → nv-calendar.entry-CXfwNt6G.js} +1 -1
- package/dist/cjs/{nv-col.entry-CnbFx7h1.js → nv-col.entry-CJLDS3LY.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-CjUfR4ha.js → nv-datagrid.entry-Cns8XSud.js} +1 -1
- package/dist/cjs/{nv-datagridcolumn.entry-BiuYIp4q.js → nv-datagridcolumn.entry-CFFAipHF.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-fDywe5i2.js → nv-dialog.entry-CDSK9pUH.js} +54 -20
- package/dist/cjs/{nv-dialogfooter_2.entry-CckfZ_QW.js → nv-dialogfooter_2.entry-To_dGUn4.js} +3 -3
- package/dist/cjs/{nv-fieldcheckbox.entry-WmfLxGad.js → nv-fieldcheckbox.entry-fdonR07Z.js} +5 -5
- package/dist/cjs/{nv-fielddate.entry-GLGb7tzu.js → nv-fielddate.entry-C3pXtMHL.js} +15 -18
- package/dist/cjs/{nv-fielddaterange.entry-C8gXNY2P.js → nv-fielddaterange.entry-CjVVPEK_.js} +8 -10
- package/dist/cjs/{nv-fielddropdown.entry-BX1V8Uef.js → nv-fielddropdown.entry-C9mXuNNj.js} +15 -6
- package/dist/cjs/{nv-fielddropdownitem.entry-BMVFbA1v.js → nv-fielddropdownitem.entry-Dah-PaE8.js} +3 -3
- package/dist/cjs/{nv-fieldmultiselect.entry-BuV-qWbu.js → nv-fieldmultiselect.entry-BMLjhqoJ.js} +2 -2
- package/dist/cjs/{nv-fieldnumber.entry-qM1ct5SM.js → nv-fieldnumber.entry-DBdJviXu.js} +4 -4
- package/dist/cjs/{nv-fieldpassword.entry-BnGWErFQ.js → nv-fieldpassword.entry-Cim_usSM.js} +4 -4
- package/dist/cjs/{nv-fieldradio.entry-EliQYldW.js → nv-fieldradio.entry-X_2VT1Dj.js} +4 -4
- package/dist/cjs/{nv-fieldselect.entry-BfPVPmaZ.js → nv-fieldselect.entry-pSp-2rNn.js} +6 -6
- package/dist/cjs/{nv-fieldslider.entry-DBPpL94x.js → nv-fieldslider.entry-pZf7zzLU.js} +4 -4
- package/dist/cjs/{nv-fieldtext.entry-BnabKYgq.js → nv-fieldtext.entry-DlI_ExaV.js} +4 -4
- package/dist/cjs/{nv-fieldtextarea.entry-HaELAnJb.js → nv-fieldtextarea.entry-t3Ixxi23.js} +4 -4
- package/dist/cjs/{nv-fieldtime.entry-CWQM7fza.js → nv-fieldtime.entry-DY7D5_6K.js} +4 -4
- package/dist/cjs/{nv-icon.entry-B5cWNyvf.js → nv-icon.entry-6oYPSf4c.js} +2 -2
- package/dist/cjs/{nv-iconbutton_2.entry-CP1o9IVZ.js → nv-iconbutton_2.entry-ChULGovr.js} +3 -3
- package/dist/cjs/{nv-menu.entry-wMwI_sZ3.js → nv-menu.entry-sd0tatWq.js} +2 -2
- package/dist/cjs/{nv-menuitem.entry-C53TrB0_.js → nv-menuitem.entry-CCOqR7UF.js} +2 -2
- package/dist/cjs/{nv-notification.entry-BPyEusqt.js → nv-notification.entry-Cc3zE3yY.js} +2 -2
- package/dist/cjs/{nv-notificationcontainer.entry-MRIJURIS.js → nv-notificationcontainer.entry-DV4D6oOH.js} +2 -2
- package/dist/cjs/{nv-popover.entry-fj50OLMu.js → nv-popover.entry-DQSwI2jT.js} +14 -98
- package/dist/cjs/{nv-row.entry-T0OlcSij.js → nv-row.entry-UUuMSAY5.js} +2 -2
- package/dist/cjs/{nv-split.entry-DlI7I6Tb.js → nv-split.entry-CYP2bTTM.js} +2 -2
- package/dist/cjs/{nv-stack.entry-991A3rOk.js → nv-stack.entry-D35-75Vw.js} +2 -2
- package/dist/cjs/{nv-table.entry-ClSU3-cR.js → nv-table.entry-DevWJBnL.js} +2 -2
- package/dist/cjs/{nv-tableheader.entry-DzvbPDBN.js → nv-tableheader.entry-Hs7nUSOC.js} +2 -2
- package/dist/cjs/{nv-toggle.entry-Dq5hAoVB.js → nv-toggle.entry-Eje9d--6.js} +3 -3
- package/dist/cjs/{nv-togglebutton.entry-DI8HQ5Ou.js → nv-togglebutton.entry-LGI7pIeK.js} +2 -2
- package/dist/cjs/{nv-togglebuttongroup.entry-DzGOSBF7.js → nv-togglebuttongroup.entry-CWN_Ucry.js} +2 -2
- package/dist/cjs/{nv-tooltip.entry-CF0-gdZL.js → nv-tooltip.entry-BGkKDEFg.js} +2 -2
- package/dist/components/NvDatatable/NvDatatable.js +77 -4
- package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
- package/dist/types/components/NvDatatable/types.d.ts +17 -1
- package/package.json +1 -1
- package/dist/cjs/events.utils-fe1d907f-01N__3wY.js +0 -23
package/dist/cjs/index.js
CHANGED
package/dist/cjs/{nv-accordion-item.entry-5DF2ffDE.js → nv-accordion-item.entry-BuTvA6w9.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-WPRkQD3O.js');
|
|
4
4
|
var collapse_animation6e0b08df = require('./collapse.animation-6e0b08df-AHWzNGm_.js');
|
|
5
5
|
require('./style-value-types.es-f5d10b79-D0QCM8OB.js');
|
|
6
6
|
require('react');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-WPRkQD3O.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
6
6
|
var collapse_animation6e0b08df = require('./collapse.animation-6e0b08df-AHWzNGm_.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-WPRkQD3O.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var collapse_animation6e0b08df = require('./collapse.animation-6e0b08df-AHWzNGm_.js');
|
|
6
6
|
var fade_animation9b939939 = require('./fade.animation-9b939939-DV--bM4S.js');
|
|
@@ -203,7 +203,7 @@ const NvFielddropdownitemcheck = class {
|
|
|
203
203
|
/****************************************************************************/
|
|
204
204
|
//#region RENDER
|
|
205
205
|
render() {
|
|
206
|
-
return (index.h(index.Host, { key: '
|
|
206
|
+
return (index.h(index.Host, { key: '1687dc92f82edea9c1da273c0bd3c45f788a1d82', onClick: this.handleClick }, index.h("nv-fieldcheckbox", { key: '78c36b53395398068513256f044a10cd44fc8d98', 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: 'af95c41a46d57060b62098cc4735a8aef0326223' }), index.h("slot", { key: '0bf00132a35df36f3a4e8dc40610a107c1786eab', name: "main" }), index.h("slot", { key: '3ce40d59700f4e8b764aeac25e39976329422b67', name: "label" }), index.h("slot", { key: 'edf7025cebd62843b55f92014d12905574166dd7', 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-
|
|
3
|
+
var index = require('./index-WPRkQD3O.js');
|
|
4
4
|
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
5
5
|
var _commonjsHelpers1789f0cf = require('./_commonjsHelpers-1789f0cf-BJu3ubxk.js');
|
|
6
6
|
require('react');
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-WPRkQD3O.js');
|
|
4
|
+
var grow_animation24ad5cf8 = require('./grow.animation-24ad5cf8-LUp_ITEx.js');
|
|
5
|
+
var fade_animation9b939939 = require('./fade.animation-9b939939-DV--bM4S.js');
|
|
6
|
+
require('./style-value-types.es-f5d10b79-D0QCM8OB.js');
|
|
7
|
+
var timeline_animation79215cd4 = require('./timeline.animation-79215cd4-KteJaZPb.js');
|
|
5
8
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
6
9
|
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
7
10
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
@@ -542,7 +545,7 @@ var tabbable = function tabbable(container, options) {
|
|
|
542
545
|
return sortByOrder(candidates);
|
|
543
546
|
};
|
|
544
547
|
|
|
545
|
-
const nvDialogCss = "dialog{
|
|
548
|
+
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{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%}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}";
|
|
546
549
|
const NvDialogStyle0 = nvDialogCss;
|
|
547
550
|
|
|
548
551
|
const NvDialog = class {
|
|
@@ -609,13 +612,30 @@ const NvDialog = class {
|
|
|
609
612
|
this.close();
|
|
610
613
|
}
|
|
611
614
|
};
|
|
612
|
-
|
|
613
|
-
|
|
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) {
|
|
614
625
|
this.close();
|
|
615
626
|
event.preventDefault();
|
|
616
627
|
event.stopPropagation();
|
|
617
628
|
}
|
|
618
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
|
+
};
|
|
619
639
|
}
|
|
620
640
|
//#endregion PROPERTIES
|
|
621
641
|
/****************************************************************************/
|
|
@@ -629,7 +649,18 @@ const NvDialog = class {
|
|
|
629
649
|
/** It is recommended to use the .show() or .showModal() method to render
|
|
630
650
|
* dialogs, rather than the open attribute. If a <dialog> is opened using
|
|
631
651
|
* the open attribute, it is non-modal. */
|
|
652
|
+
const { setFadeOut } = fade_animation9b939939.useFade(this.dialogElement);
|
|
653
|
+
setFadeOut();
|
|
632
654
|
this.dialogElement.showModal();
|
|
655
|
+
const { setGrowIn, growIn } = grow_animation24ad5cf8.useGrow(this.contentElement, {
|
|
656
|
+
duration: 100,
|
|
657
|
+
amount: 0.9,
|
|
658
|
+
});
|
|
659
|
+
const { fadeIn } = fade_animation9b939939.useFade(this.dialogElement, {
|
|
660
|
+
duration: 100,
|
|
661
|
+
});
|
|
662
|
+
setGrowIn();
|
|
663
|
+
await timeline_animation79215cd4.parallel(fadeIn, growIn).start();
|
|
633
664
|
}
|
|
634
665
|
/**
|
|
635
666
|
* Call this method to hide the dialog, making it disappear from view.
|
|
@@ -637,6 +668,14 @@ const NvDialog = class {
|
|
|
637
668
|
async close() {
|
|
638
669
|
this.open = false;
|
|
639
670
|
this.allowScroll();
|
|
671
|
+
const { growOut } = grow_animation24ad5cf8.useGrow(this.contentElement, {
|
|
672
|
+
duration: 150,
|
|
673
|
+
amount: 0.85,
|
|
674
|
+
});
|
|
675
|
+
const { fadeOut } = fade_animation9b939939.useFade(this.dialogElement, {
|
|
676
|
+
duration: 150,
|
|
677
|
+
});
|
|
678
|
+
await timeline_animation79215cd4.parallel(growOut, fadeOut).start();
|
|
640
679
|
this.dialogElement.close();
|
|
641
680
|
}
|
|
642
681
|
/**
|
|
@@ -666,7 +705,7 @@ const NvDialog = class {
|
|
|
666
705
|
*/
|
|
667
706
|
attachEventListeners() {
|
|
668
707
|
if (this.triggerElement && !this.eventsAttached && !this.controlled) {
|
|
669
|
-
|
|
708
|
+
grow_animation24ad5cf8.addEventListeners(this.triggerClickEvents, this.triggerElement, this);
|
|
670
709
|
this.eventsAttached = true;
|
|
671
710
|
}
|
|
672
711
|
}
|
|
@@ -719,23 +758,17 @@ const NvDialog = class {
|
|
|
719
758
|
handleKeyDown(event) {
|
|
720
759
|
if (event.key !== 'Escape')
|
|
721
760
|
return;
|
|
722
|
-
if (this.
|
|
761
|
+
if (!this.open)
|
|
762
|
+
return;
|
|
763
|
+
event.preventDefault();
|
|
764
|
+
event.stopPropagation();
|
|
765
|
+
const hasOpenPopover = this.checkForOpenPopovers();
|
|
766
|
+
if (!this.undismissable && !hasOpenPopover) {
|
|
723
767
|
event.preventDefault();
|
|
724
768
|
event.stopPropagation();
|
|
725
|
-
}
|
|
726
|
-
else {
|
|
727
769
|
this.close();
|
|
728
770
|
}
|
|
729
771
|
}
|
|
730
|
-
/**
|
|
731
|
-
* Handles the click event to close the dialog when clickOutside is true.
|
|
732
|
-
* @param {MouseEvent} event - The click event.
|
|
733
|
-
*/
|
|
734
|
-
handleDocumentClick(event) {
|
|
735
|
-
if (!this.clickOutside || this.undismissable)
|
|
736
|
-
return;
|
|
737
|
-
this.handleClickOutside(event);
|
|
738
|
-
}
|
|
739
772
|
//#endregion LISTENERS
|
|
740
773
|
/****************************************************************************/
|
|
741
774
|
//#region LIFECYCLE
|
|
@@ -773,10 +806,11 @@ const NvDialog = class {
|
|
|
773
806
|
this.attachEventListeners();
|
|
774
807
|
// Additional form check in case form was added after initial load
|
|
775
808
|
this.checkForForm();
|
|
809
|
+
// this.setupContentBodyListeners();
|
|
776
810
|
}
|
|
777
811
|
disconnectedCallback() {
|
|
778
812
|
if (this.triggerElement && !this.eventsAttached && !this.controlled) {
|
|
779
|
-
|
|
813
|
+
grow_animation24ad5cf8.removeEventListeners(this.triggerClickEvents, this.triggerElement, this);
|
|
780
814
|
this.eventsAttached = false;
|
|
781
815
|
}
|
|
782
816
|
this.allowScroll();
|
|
@@ -786,7 +820,7 @@ const NvDialog = class {
|
|
|
786
820
|
//#region RENDER
|
|
787
821
|
render() {
|
|
788
822
|
const hasForm = this.form || this.el.querySelector('form');
|
|
789
|
-
return (index.h(index.Host, { key: '
|
|
823
|
+
return (index.h(index.Host, { key: '91b36e5daac0251997c7a6794166794f1e89087f' }, index.h("slot", { key: 'abeef317af74093c9b09fa6f2d300c23bbde54a6', name: "trigger" }), index.h("dialog", { key: '1eb417dc921bca7837aa05aad9c252fba7d9d920', 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: clsx297c1ffe.clsx({ full: this.full }) }, index.h("div", { key: '8ec55c461a747ebb4556fbf791ee1d66d3bcc51a', class: "backdrop", ref: el => (this.backdropElement = el) }, index.h("div", { key: '373beedad09464f3473935e0464b3f51133e0372', class: "content", ref: el => (this.contentElement = el) }, !this.undismissable && (index.h("nv-button", { key: '5e94d056687837b017991f54df6cf350159addcc', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDialogClose, "aria-label": "Close dialog" }, index.h("nv-icon", { key: '98db7848b9796589b9e7670c62a26417228a15d6', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-dialogheader", { id: "dialog-header" })), index.h("div", { key: '611eb7914b65d5a27513f91eb458a578dbc63734', class: "content-body", id: "dialog-content" }, index.h("slot", { key: 'caf21876e6a33e997eccdc577fb43d6e63fcfc90' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? constants69bafca2.ButtonType.Submit : constants69bafca2.ButtonType.Button, onDialogCanceled: this.handleDialogClose, undismissable: this.undismissable })))))));
|
|
790
824
|
}
|
|
791
825
|
get el() { return index.getElement(this); }
|
|
792
826
|
static get watchers() { return {
|
package/dist/cjs/{nv-dialogfooter_2.entry-CckfZ_QW.js → nv-dialogfooter_2.entry-To_dGUn4.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-WPRkQD3O.js');
|
|
4
4
|
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -93,7 +93,7 @@ const NvDialogfooter = class {
|
|
|
93
93
|
/****************************************************************************/
|
|
94
94
|
//#region RENDER
|
|
95
95
|
render() {
|
|
96
|
-
return (index.h(index.Host, { key: '
|
|
96
|
+
return (index.h(index.Host, { key: '908abbe8e2e9aa215641dd056c70dc16f36c3ac3' }, !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))));
|
|
97
97
|
}
|
|
98
98
|
static get formAssociated() { return true; }
|
|
99
99
|
get el() { return index.getElement(this); }
|
|
@@ -128,7 +128,7 @@ const NvDialogheader = class {
|
|
|
128
128
|
/****************************************************************************/
|
|
129
129
|
//#region RENDER
|
|
130
130
|
render() {
|
|
131
|
-
return (index.h(index.Host, { key: '
|
|
131
|
+
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))));
|
|
132
132
|
}
|
|
133
133
|
get el() { return index.getElement(this); }
|
|
134
134
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-WPRkQD3O.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -119,13 +119,13 @@ const NvFieldcheckbox = class {
|
|
|
119
119
|
/****************************************************************************/
|
|
120
120
|
//#region RENDER
|
|
121
121
|
render() {
|
|
122
|
-
return (index.h(index.Host, { key: '
|
|
122
|
+
return (index.h(index.Host, { key: '4db161f34d188b5370f28a39ec9637d269719b04', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, index.h("div", { key: '7608f50840faf35c4da8dbfcc8240becece6f609', class: "input-container" }, index.h("input", { key: '733ad01f2cadd1e17d6bfc40022ef9ab1db93f0a', type: "checkbox", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly && !this.required, required: this.required, indeterminate: this.indeterminate, ref: el => {
|
|
123
123
|
if (el) {
|
|
124
124
|
el.indeterminate = this.indeterminate;
|
|
125
125
|
}
|
|
126
|
-
} }), index.h("span", { key: '
|
|
127
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
128
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
126
|
+
} }), index.h("span", { key: '81da5960abee0aa2c74f10612d05388e427b3a1a', class: "icon" }, this.checked && !this.indeterminate && (index.h("slot", { key: 'e257ebad9a1c23bc77961645dabe6e0fc8c51440', name: "checked-icon" }, index.h("svg", { key: 'd4005dfd634169aa14140c7eba1e0ac63e28342d', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: '1817c25edf09f09d4317d9e41b52484883c7a943', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (index.h("slot", { key: '043148db3518e99f2850ffa4b3622f7ae3c654a7', name: "indeterminate-icon" }, index.h("svg", { key: 'b8a67cfa8d0f880657b62b89ddae7a238b22bc26', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: 'd63f610ff5cca552d295de18dffeda84cbd370ac', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), index.h("slot", { key: 'e4befe30753cd2f76da4af10e648704068f7ce55' }), index.h("div", { key: '281b4046dbeb8b8dcb05fc154b65ed822fa45960', class: "text-container" }, index.h("slot", { key: '8e40b1e52c55fa45b38bec26e6b20da90c8553ed', name: "main" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'ad2e4a47d1d5a218835b410579e7e93febd08d15', htmlFor: this.inputId, class: clsx297c1ffe.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '815d03f2c69465e430178c29a885ad770e2c561f', name: "label" }, this.label))), (this.description ||
|
|
127
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '22159e2cb8c4897507da91ebee09502922093ead', class: "description" }, index.h("slot", { key: '61b277015ecb4e0e3b813e45dbb6cd7ebe89506b', name: "description" }, this.description)))), (this.errorDescription ||
|
|
128
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '924d333e443c943b5fe37f31e3191d231b9d87e1', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '2469d3f6cf2121b489b637138642417d27556740', name: "error-description" }, this.errorDescription))))));
|
|
129
129
|
}
|
|
130
130
|
static get formAssociated() { return true; }
|
|
131
131
|
get el() { return index.getElement(this); }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-WPRkQD3O.js');
|
|
4
4
|
var inputmaskEdcad3c1 = require('./inputmask-edcad3c1-B9Omti4z.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -106,17 +106,17 @@ const NvFielddate = class {
|
|
|
106
106
|
* @param {MouseEvent} event - The click event.
|
|
107
107
|
*/
|
|
108
108
|
this.handleClickOutside = (event) => {
|
|
109
|
-
|
|
109
|
+
var _a;
|
|
110
|
+
if (!(event.target instanceof Node))
|
|
111
|
+
return;
|
|
112
|
+
if (!((_a = this.el) === null || _a === void 0 ? void 0 : _a.contains(event.target)))
|
|
110
113
|
this.open = false;
|
|
111
|
-
}
|
|
112
114
|
};
|
|
113
115
|
/**
|
|
114
116
|
* Focuses the input when the input container is clicked.
|
|
115
117
|
* @param {MouseEvent} event - The click event.
|
|
116
118
|
*/
|
|
117
119
|
this.handleInputContainerClick = (event) => {
|
|
118
|
-
// Stop propagation to prevent closing parent dialogs
|
|
119
|
-
event.stopPropagation();
|
|
120
120
|
if (this.readonly || this.disabled) {
|
|
121
121
|
event.preventDefault();
|
|
122
122
|
return;
|
|
@@ -179,12 +179,10 @@ const NvFielddate = class {
|
|
|
179
179
|
* Toggles the opening/closing of the popover.
|
|
180
180
|
* @param {MouseEvent} event - The click event.
|
|
181
181
|
*/
|
|
182
|
-
this.toggleCalendar = (
|
|
182
|
+
this.toggleCalendar = () => {
|
|
183
183
|
if (this.readonly || this.disabled) {
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
// Stop propagation to prevent closing parent dialogs
|
|
187
|
-
event.stopPropagation();
|
|
188
186
|
this.open = !this.open;
|
|
189
187
|
};
|
|
190
188
|
}
|
|
@@ -261,9 +259,6 @@ const NvFielddate = class {
|
|
|
261
259
|
//#endregion METHODS
|
|
262
260
|
/****************************************************************************/
|
|
263
261
|
//#region LIFECYCLE
|
|
264
|
-
connectedCallback() {
|
|
265
|
-
document.addEventListener('click', this.handleClickOutside);
|
|
266
|
-
}
|
|
267
262
|
componentWillLoad() {
|
|
268
263
|
if (this.value) {
|
|
269
264
|
this.singleValue = this.value;
|
|
@@ -290,7 +285,6 @@ const NvFielddate = class {
|
|
|
290
285
|
}
|
|
291
286
|
}
|
|
292
287
|
disconnectedCallback() {
|
|
293
|
-
document.removeEventListener('click', this.handleClickOutside);
|
|
294
288
|
if (this.inputElement &&
|
|
295
289
|
this.inputElement.inputmask) {
|
|
296
290
|
this.inputElement.inputmask.remove();
|
|
@@ -345,6 +339,9 @@ const NvFielddate = class {
|
|
|
345
339
|
handleClosePopover() {
|
|
346
340
|
this.open = false;
|
|
347
341
|
}
|
|
342
|
+
handleDocumentClick(event) {
|
|
343
|
+
this.handleClickOutside(event);
|
|
344
|
+
}
|
|
348
345
|
handleKeyDown(event) {
|
|
349
346
|
if (event.key === 'Escape') {
|
|
350
347
|
this.open = false;
|
|
@@ -368,13 +365,13 @@ const NvFielddate = class {
|
|
|
368
365
|
/****************************************************************************/
|
|
369
366
|
//#region RENDER
|
|
370
367
|
render() {
|
|
371
|
-
return (index.h(index.Host, { key: '
|
|
372
|
-
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '
|
|
373
|
-
this.convertToInputmaskFormat(this.dateFormat), name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, onInput: this.handleInput, onFocus: this.handleFocus, "data-scope": "date" }), this.error && (index.h("nv-icon", { key: '
|
|
368
|
+
return (index.h(index.Host, { key: 'c8b62c90ddfde96e12cb63aafba29d5b507286c6' }, ((this.label && this.label.length > 0) ||
|
|
369
|
+
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '761e06fd5d55b23946a87b86403105be049bbb4b', htmlFor: this.inputId }, index.h("slot", { key: '73676bbc15ddc90172e0d1a6da0c84bb21e433a1', name: "label" }, this.label))), index.h("nv-popover", { key: 'dddd5f5619c6696b1a7b9991c94fba01e3710199', ref: this.setPopoverRef, id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: '28bcfe3c9a50b81b1c2565b1dbab0479cf0927c0', slot: "trigger", class: "input-wrapper" }, index.h("slot", { key: '9ff4bfecd08b05c3425baa16f56da95584a33977', name: "before-input" }), index.h("div", { key: '8cfb31352d12b45d4450fabeb84328bfb9644ee4', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: 'ac99e0f250644eef55a24979f92890b04c03179e', name: "leading-input" }), index.h("input", { key: 'dd490963055df6295d6a04eda58d44857d827255', id: this.inputId, ref: this.setInputRef, placeholder: this.placeholder ||
|
|
370
|
+
this.convertToInputmaskFormat(this.dateFormat), name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, onInput: this.handleInput, onFocus: this.handleFocus, "data-scope": "date" }), this.error && (index.h("nv-icon", { key: '16b6825561152e5157aca753082c7229d15e2c46', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '4780677cf8da9866d2fa4d40557b564b8920b065', name: "circle-check", class: "validation", size: "md" })), index.h("nv-iconbutton", { key: 'c6bd82b770b28f35b6716abc8cba5a28aa13dd56', class: "toggle-calendar-icon", name: "calendar" //{this.open ? 'chevron-top' : 'chevron-down'}
|
|
374
371
|
,
|
|
375
|
-
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: '
|
|
376
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
377
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
372
|
+
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: '85ed704fa118dc5087af5ce8e791e91a3c210093', name: "after-input" })), index.h("div", { key: 'ad9eaa9cedb72c56d8d5b201904259798a790aa4', slot: "content" }, index.h("nv-calendar", { key: '79abc83113d0a14bdfcb19e693b6f5d94adaa071', dateFormat: this.dateFormat, singleValue: this.singleValue, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, onValueChanged: this.handleCalendarValueChanged }))), ((this.description && this.description.length > 0) ||
|
|
373
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '8d3620b3ddb001c5ed1ba0557310a7bf4af4c5e0', class: "description" }, index.h("slot", { key: 'b80b706332d733476feec054737f35a4f008a078', name: "description" }, this.description))), (this.errorDescription ||
|
|
374
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '976a1e236e6391ef7e8aeac0b56c1fd815bb9640', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (index.h("slot", { name: "error-description" })) : (this.errorDescription))), index.h("slot", { key: 'eb645c44cde2c175892ed31326d71897e3a5062c' })));
|
|
378
375
|
}
|
|
379
376
|
get el() { return index.getElement(this); }
|
|
380
377
|
static get watchers() { return {
|
package/dist/cjs/{nv-fielddaterange.entry-C8gXNY2P.js → nv-fielddaterange.entry-CjVVPEK_.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-WPRkQD3O.js');
|
|
4
4
|
var inputmaskEdcad3c1 = require('./inputmask-edcad3c1-B9Omti4z.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -227,12 +227,10 @@ const NvFielddaterange = class {
|
|
|
227
227
|
* Toggles the opening/closing of the popover.
|
|
228
228
|
* @param {MouseEvent} event - The click event.
|
|
229
229
|
*/
|
|
230
|
-
this.toggleCalendar = (
|
|
230
|
+
this.toggleCalendar = () => {
|
|
231
231
|
if (this.readonly || this.disabled) {
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
|
-
// Stop propagation to prevent closing parent dialogs
|
|
235
|
-
event.stopPropagation();
|
|
236
234
|
this.open = !this.open;
|
|
237
235
|
};
|
|
238
236
|
}
|
|
@@ -522,12 +520,12 @@ const NvFielddaterange = class {
|
|
|
522
520
|
/****************************************************************************/
|
|
523
521
|
//#region RENDER
|
|
524
522
|
render() {
|
|
525
|
-
return (index.h(index.Host, { key: '
|
|
526
|
-
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '
|
|
527
|
-
this.convertToInputmaskFormat(this.dateFormat), name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), index.h("div", { key: '
|
|
528
|
-
this.convertToInputmaskFormat(this.dateFormat), name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: this.required, value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (index.h("nv-icon", { key: '
|
|
529
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
530
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
523
|
+
return (index.h(index.Host, { key: '9f0ce8b2e6579ea6225dfbac7cb75cf78ea0c5f5' }, ((this.label && this.label.length > 0) ||
|
|
524
|
+
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '9adfefaeda1116c4b3dfa297529aa77a48b66cfe', htmlFor: this.startInputId }, index.h("slot", { key: '819fcfcf8ee7b649e3271d9c8ae24a4b70a60c81', name: "label" }, this.label))), index.h("nv-popover", { key: 'f689f4796b739ca1651cb812c428663e5935fa64', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: 'c5f3174c497a74205a4ab5e289ededbc2ab6ca3f', slot: "trigger", class: "input-wrapper" }, index.h("slot", { key: '08e0703992304fe911a2ff4eef74023c8832629b', name: "before-input" }), index.h("div", { key: '9bc9c65f34a2de1c9f8054ccc038258982033e1b', class: "input-container" }, index.h("slot", { key: '47dbf93940e9c452d20b67b81fb7abd9b807af0d', name: "leading-input" }), index.h("div", { key: 'ea4587f7c5013cbd8d7e093aa85532438c18b5ab', class: "range-inputs" }, index.h("input", { key: '544297b36fb3646178c663d6aaa22c2cd3e0616b', id: this.startInputId, type: "text", placeholder: this.startPlaceholder ||
|
|
525
|
+
this.convertToInputmaskFormat(this.dateFormat), name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), index.h("div", { key: '15862aa6acde78f9da8433ded18b5a9ca8508ff5', class: "range-separator" }), index.h("input", { key: 'f481feb34af3f5581f2d97bafaa126f306aae12b', id: this.endInputId, type: "text", placeholder: this.endPlaceholder ||
|
|
526
|
+
this.convertToInputmaskFormat(this.dateFormat), name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: this.required, value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (index.h("nv-icon", { key: '9a4a155d4e6ab389406ad14cc29e8fa25e578ce9', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '19969e5286a666fceb583de8901191595329f380', name: "circle-check", class: "validation", size: "md" })), index.h("nv-iconbutton", { key: '76a17a3d44ce189128467997434e34e82d607363', class: "toggle-calendar-icon", name: "calendar", size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: '53c374d1628c396015f7006ad63c294932d5e78e', name: "after-input" })), index.h("div", { key: 'f5d53344987a39a54ac933cc94c802212b98c651', slot: "content" }, index.h("nv-calendar", { key: '4992731905d118e806a9a22df0413bdfb350f61e', ref: el => (this.calendarElement = el), dateFormat: this.dateFormat, value: this.value, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, selectionType: "range", "data-prevent-navigation": "true" }))), ((this.description && this.description.length > 0) ||
|
|
527
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '396e2f1e53b4e7cd6233993c10aac1b1001d6a3c', class: "description" }, index.h("slot", { key: 'fccf3a987ed03560d8eb8a3657ca3ce9f291493c', name: "description" }, this.description))), (this.errorDescription ||
|
|
528
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'e76e336e460ed64a05fd1748859f159ce3b74120', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (index.h("slot", { name: "error-description" })) : (this.errorDescription))), index.h("slot", { key: 'be76d31f0eeaf50e589f0ab317e04bd3be3d9ba4' })));
|
|
531
529
|
}
|
|
532
530
|
get el() { return index.getElement(this); }
|
|
533
531
|
static get watchers() { return {
|