@nova-design-system/nova-react 3.21.1-beta.0 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_commonjsHelpers-B85MJLTf-CFO10eej.js +7 -0
- package/dist/cjs/{collapse.animation-6e0b08df-AHWzNGm_.js → collapse.animation-DZDm0vSK-C2TOIhIK.js} +3 -3
- package/dist/cjs/{fade.animation-9b939939-DV--bM4S.js → fade.animation-DcRL9lcm-DAZeHoKN.js} +75 -75
- package/dist/cjs/generated/components.server.js +163 -60
- package/dist/cjs/{grow.animation-24ad5cf8-LUp_ITEx.js → grow.animation-CvHGHBL4-DDIEYBK-.js} +5 -5
- package/dist/cjs/i18n.utils-DOZbXX2L-BizoXo6c.js +2498 -0
- package/dist/cjs/{index-CEKdYnmK.js → index-CtjeeUI-.js} +10298 -6029
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/inputmask-CSo292ul-DlvupPk6.js +3758 -0
- package/dist/cjs/{nv-accordion-item.entry-zvp8yDql.js → nv-accordion-item.entry-B_l0-ux0.js} +11 -10
- package/dist/cjs/{nv-accordion.entry-D6gckOF4.js → nv-accordion.entry-BX8_YuZF.js} +8 -5
- package/dist/cjs/{nv-alert.entry-Df8-nQ-R.js → nv-alert.entry-DCWYR0OK.js} +22 -22
- package/dist/cjs/{nv-avatar.entry-ZOnVWP9L.js → nv-avatar.entry-C_xZD3Lp.js} +11 -11
- package/dist/cjs/{nv-badge_2.entry-DgiVv_Yf.js → nv-badge_2.entry-JjqANStV.js} +24 -24
- package/dist/cjs/{nv-breadcrumb.entry-IqtE1JL0.js → nv-breadcrumb.entry-DQZDn6cm.js} +5 -5
- package/dist/cjs/{nv-breadcrumbs.entry-Be6dz7zI.js → nv-breadcrumbs.entry-Bz0GjhY_.js} +3 -3
- package/dist/cjs/{nv-button.entry-CmswF3Si.js → nv-button.entry-Br1DH9Vj.js} +9 -9
- package/dist/cjs/{nv-buttongroup.entry-Cfe6rFSs.js → nv-buttongroup.entry-BZaTKN_n.js} +3 -3
- package/dist/cjs/{nv-calendar.entry-q83sS_dN.js → nv-calendar.entry-D9ESuu7C.js} +105 -79
- package/dist/cjs/{nv-col.entry-Cu-Qi1bi.js → nv-col.entry-CfgPMMxS.js} +5 -5
- package/dist/cjs/{nv-datagrid.entry-Cx7SvD5S.js → nv-datagrid.entry-DcB5q2oC.js} +14 -14
- package/dist/cjs/{nv-datagridcolumn.entry-B_uXKFLg.js → nv-datagridcolumn.entry-BhKOzXA6.js} +2 -1
- package/dist/cjs/{nv-dialog.entry-J6Xwi6z1.js → nv-dialog.entry-O47Eol_7.js} +23 -23
- package/dist/cjs/{nv-dialogfooter_2.entry-DOlhqDTh.js → nv-dialogfooter_2.entry-Dn16bI8a.js} +10 -11
- package/dist/cjs/nv-fieldcheckbox.entry-Bx6ArV_b.js +177 -0
- package/dist/cjs/{nv-fielddate.entry-xWi3GpLl.js → nv-fielddate.entry-B4P0U8QG.js} +86 -40
- package/dist/cjs/{nv-fielddaterange.entry-BwFtpw9X.js → nv-fielddaterange.entry-BORwYJ-k.js} +150 -101
- package/dist/cjs/nv-fielddropdown.entry-DzBAIynY.js +687 -0
- package/dist/cjs/{nv-fielddropdownitem.entry-DjyFlVXw.js → nv-fielddropdownitem.entry-C_17isWd.js} +6 -5
- package/dist/cjs/{nv-fieldmultiselect.entry-BtLTG7nM.js → nv-fieldmultiselect.entry-DiqRreWh.js} +347 -232
- package/dist/cjs/nv-fieldnumber.entry-C9O4UPp3.js +187 -0
- package/dist/cjs/nv-fieldpassword.entry-BfVJNT0A.js +165 -0
- package/dist/cjs/{nv-fieldradio.entry-2hb1Ur40.js → nv-fieldradio.entry-CG22oETM.js} +10 -10
- package/dist/cjs/{nv-fieldselect.entry-D-eYQpAv.js → nv-fieldselect.entry-BPQEtrv2.js} +52 -13
- package/dist/cjs/{nv-fieldslider.entry-BGle1RZR.js → nv-fieldslider.entry-CozmnUfN.js} +16 -31
- package/dist/cjs/nv-fieldtext.entry-BD-z01ru.js +163 -0
- package/dist/cjs/{nv-fieldtextarea.entry-Z32-s901.js → nv-fieldtextarea.entry-7UrKWDHg.js} +51 -12
- package/dist/cjs/{nv-fieldtime.entry-CDFGdfFL.js → nv-fieldtime.entry-DakOlLiO.js} +109 -57
- package/dist/cjs/{nv-icon.entry-BDq7DKRt.js → nv-icon.entry-Db00kB2u.js} +11 -11
- package/dist/cjs/{nv-iconbutton_2.entry-DdgEkFLK.js → nv-iconbutton_2.entry-CaKCa8NT.js} +7 -8
- package/dist/cjs/{nv-menu.entry-iob0Kve8.js → nv-menu.entry-CK2HdmBt.js} +16 -29
- package/dist/cjs/{nv-menuitem.entry-C989Ui60.js → nv-menuitem.entry-mKMqCAdz.js} +6 -5
- package/dist/cjs/nv-notification-bullet.entry-DtbjtFxs.js +77 -0
- package/dist/cjs/{nv-notification.entry-BxvJMKxH.js → nv-notification.entry-CLb0gNu3.js} +39 -39
- package/dist/cjs/{nv-notificationcontainer.entry-CxGCIb96.js → nv-notificationcontainer.entry-Cijivlm6.js} +3 -3
- package/dist/cjs/{nv-popover.entry-1KsO_KQm.js → nv-popover.entry-mLdLSp6n.js} +49 -45
- package/dist/cjs/{nv-row.entry-PBLq_BzJ.js → nv-row.entry-C2C94fcv.js} +3 -3
- package/dist/cjs/{nv-sidebar.entry-CjLbvLqw.js → nv-sidebar.entry-inDVNJ4s.js} +13 -13
- package/dist/cjs/{nv-sidebarcontent.entry-Cv76IH4W.js → nv-sidebarcontent.entry-DxoljE15.js} +3 -3
- package/dist/cjs/{nv-sidebardivider.entry-DYPJ_k73.js → nv-sidebardivider.entry-D_yern0R.js} +4 -4
- package/dist/cjs/{nv-sidebarfooter.entry-mGcMBRmv.js → nv-sidebarfooter.entry-Rkkn9TB_.js} +3 -3
- package/dist/cjs/{nv-sidebargroup.entry-DtwFliHZ.js → nv-sidebargroup.entry-C1p9qqxr.js} +4 -4
- package/dist/cjs/{nv-sidebarheader.entry-BdOYIXCA.js → nv-sidebarheader.entry-CYpD_4pI.js} +3 -3
- package/dist/cjs/{nv-sidebarlogo.entry-Da0kGsfw.js → nv-sidebarlogo.entry-BgK03M1v.js} +3 -3
- package/dist/cjs/{nv-sidebarnavitem.entry-D5xLfpwn.js → nv-sidebarnavitem.entry-DglvcCOD.js} +4 -4
- package/dist/cjs/nv-sidebarnavsubitem.entry-Dt1jKmC-.js +35 -0
- package/dist/cjs/{nv-split.entry-y66NBf88.js → nv-split.entry-mzg2F66T.js} +6 -6
- package/dist/cjs/{nv-stack.entry-CXjpkpbW.js → nv-stack.entry-nnvjTrBy.js} +5 -5
- package/dist/cjs/{nv-table.entry-quaVnLru.js → nv-table.entry-DkbNgxtI.js} +3 -3
- package/dist/cjs/{nv-tableheader.entry-DTBE2XQO.js → nv-tableheader.entry-CRVFTQA-.js} +6 -6
- package/dist/cjs/{nv-toggle.entry-CxUwF0pb.js → nv-toggle.entry-oC9TVkr1.js} +9 -9
- package/dist/cjs/nv-togglebutton.entry-BTWCzbS9.js +67 -0
- package/dist/cjs/{nv-togglebuttongroup.entry-UbrE8y7a.js → nv-togglebuttongroup.entry-BYXX5ejg.js} +8 -5
- package/dist/cjs/{nv-tooltip.entry-Dq2bkV33.js → nv-tooltip.entry-OJGxfJEh.js} +5 -5
- package/dist/cjs/{style-value-types.es-f5d10b79-D0QCM8OB.js → style-value-types.es-xlgmw4x8-B1vLqX9m.js} +6 -3
- package/dist/cjs/{v4-a79185f4-2n0dOd_Y.js → v4-BdYh22OP-C1vaJ4yP.js} +1 -1
- package/dist/components/NvDatatable/NvDatatable.js +77 -4
- package/dist/generated/components.server.js +144 -60
- package/dist/providers/NotificationProvider.js +3 -4
- package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
- package/dist/types/components/NvDatatable/types.d.ts +17 -1
- package/package.json +2 -2
- package/dist/cjs/_commonjsHelpers-1789f0cf-BJu3ubxk.js +0 -10
- package/dist/cjs/inputmask-edcad3c1-B9Omti4z.js +0 -3749
- package/dist/cjs/nv-fieldcheckbox.entry-C23dGGX7.js +0 -138
- package/dist/cjs/nv-fielddropdown.entry-mnl7mSaK.js +0 -392
- package/dist/cjs/nv-fieldnumber.entry-C00Hg70B.js +0 -148
- package/dist/cjs/nv-fieldpassword.entry-BLg8tCN0.js +0 -122
- package/dist/cjs/nv-fieldtext.entry-Djg8cqOa.js +0 -124
- package/dist/cjs/nv-notification-bullet.entry-J8OkAZtU.js +0 -77
- package/dist/cjs/nv-sidebarnavsubitem.entry-CkeJfHH4.js +0 -35
- package/dist/cjs/nv-togglebutton.entry-w-WEAmE6.js +0 -56
- /package/dist/cjs/{clsx-297c1ffe-BtxeOLZW.js → clsx-ChV9xqsO-BtxeOLZW.js} +0 -0
- /package/dist/cjs/{constants-69bafca2-DpB_ghPF.js → constants-BReL3Lsa-DpB_ghPF.js} +0 -0
- /package/dist/cjs/{timeline.animation-79215cd4-KteJaZPb.js → timeline.animation-CgHCo_Ho-KteJaZPb.js} +0 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('./style-value-types.es-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
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');
|
|
11
12
|
require('react');
|
|
12
13
|
require('react-dom');
|
|
13
14
|
|
|
@@ -545,13 +546,12 @@ var tabbable = function tabbable(container, options) {
|
|
|
545
546
|
return sortByOrder(candidates);
|
|
546
547
|
};
|
|
547
548
|
|
|
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%}
|
|
549
|
-
const NvDialogStyle0 = nvDialogCss;
|
|
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
550
|
|
|
551
551
|
const NvDialog = class {
|
|
552
552
|
constructor(hostRef) {
|
|
553
553
|
index.registerInstance(this, hostRef);
|
|
554
|
-
this.openChanged = index.createEvent(this, "openChanged");
|
|
554
|
+
this.openChanged = index.createEvent(this, "openChanged", 3);
|
|
555
555
|
this.eventsAttached = false;
|
|
556
556
|
this.triggerClickEvents = [
|
|
557
557
|
['click', this.show],
|
|
@@ -649,18 +649,18 @@ const NvDialog = class {
|
|
|
649
649
|
/** It is recommended to use the .show() or .showModal() method to render
|
|
650
650
|
* dialogs, rather than the open attribute. If a <dialog> is opened using
|
|
651
651
|
* the open attribute, it is non-modal. */
|
|
652
|
-
const { setFadeOut } =
|
|
652
|
+
const { setFadeOut } = fade_animationDcRL9lcm.useFade(this.dialogElement);
|
|
653
653
|
setFadeOut();
|
|
654
654
|
this.dialogElement.showModal();
|
|
655
|
-
const { setGrowIn, growIn } =
|
|
655
|
+
const { setGrowIn, growIn } = grow_animationCvHGHBL4.useGrow(this.contentElement, {
|
|
656
656
|
duration: 100,
|
|
657
657
|
amount: 0.9,
|
|
658
658
|
});
|
|
659
|
-
const { fadeIn } =
|
|
659
|
+
const { fadeIn } = fade_animationDcRL9lcm.useFade(this.dialogElement, {
|
|
660
660
|
duration: 100,
|
|
661
661
|
});
|
|
662
662
|
setGrowIn();
|
|
663
|
-
await
|
|
663
|
+
await timeline_animationCgHCo_Ho.parallel(fadeIn, growIn).start();
|
|
664
664
|
}
|
|
665
665
|
/**
|
|
666
666
|
* Call this method to hide the dialog, making it disappear from view.
|
|
@@ -668,14 +668,14 @@ const NvDialog = class {
|
|
|
668
668
|
async close() {
|
|
669
669
|
this.open = false;
|
|
670
670
|
this.allowScroll();
|
|
671
|
-
const { growOut } =
|
|
671
|
+
const { growOut } = grow_animationCvHGHBL4.useGrow(this.contentElement, {
|
|
672
672
|
duration: 150,
|
|
673
673
|
amount: 0.85,
|
|
674
674
|
});
|
|
675
|
-
const { fadeOut } =
|
|
675
|
+
const { fadeOut } = fade_animationDcRL9lcm.useFade(this.dialogElement, {
|
|
676
676
|
duration: 150,
|
|
677
677
|
});
|
|
678
|
-
await
|
|
678
|
+
await timeline_animationCgHCo_Ho.parallel(growOut, fadeOut).start();
|
|
679
679
|
this.dialogElement.close();
|
|
680
680
|
}
|
|
681
681
|
/**
|
|
@@ -705,7 +705,7 @@ const NvDialog = class {
|
|
|
705
705
|
*/
|
|
706
706
|
attachEventListeners() {
|
|
707
707
|
if (this.triggerElement && !this.eventsAttached && !this.controlled) {
|
|
708
|
-
|
|
708
|
+
grow_animationCvHGHBL4.addEventListeners(this.triggerClickEvents, this.triggerElement, this);
|
|
709
709
|
this.eventsAttached = true;
|
|
710
710
|
}
|
|
711
711
|
}
|
|
@@ -731,7 +731,7 @@ const NvDialog = class {
|
|
|
731
731
|
}
|
|
732
732
|
ensureFormId(formElement) {
|
|
733
733
|
if (!formElement.id) {
|
|
734
|
-
formElement.id = `dialog-form-${
|
|
734
|
+
formElement.id = `dialog-form-${v4BdYh22OP.v4()}`;
|
|
735
735
|
}
|
|
736
736
|
return formElement.id;
|
|
737
737
|
}
|
|
@@ -810,7 +810,7 @@ const NvDialog = class {
|
|
|
810
810
|
}
|
|
811
811
|
disconnectedCallback() {
|
|
812
812
|
if (this.triggerElement && !this.eventsAttached && !this.controlled) {
|
|
813
|
-
|
|
813
|
+
grow_animationCvHGHBL4.removeEventListeners(this.triggerClickEvents, this.triggerElement, this);
|
|
814
814
|
this.eventsAttached = false;
|
|
815
815
|
}
|
|
816
816
|
this.allowScroll();
|
|
@@ -820,13 +820,13 @@ const NvDialog = class {
|
|
|
820
820
|
//#region RENDER
|
|
821
821
|
render() {
|
|
822
822
|
const hasForm = this.form || this.el.querySelector('form');
|
|
823
|
-
return (index.h(index.Host, { key: '
|
|
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
824
|
}
|
|
825
825
|
get el() { return index.getElement(this); }
|
|
826
826
|
static get watchers() { return {
|
|
827
827
|
"open": ["handleDialogOpenChange"]
|
|
828
828
|
}; }
|
|
829
829
|
};
|
|
830
|
-
NvDialog.style =
|
|
830
|
+
NvDialog.style = nvDialogCss;
|
|
831
831
|
|
|
832
832
|
exports.nv_dialog = NvDialog;
|
package/dist/cjs/{nv-dialogfooter_2.entry-DOlhqDTh.js → nv-dialogfooter_2.entry-Dn16bI8a.js}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-CtjeeUI-.js');
|
|
4
|
+
var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
|
|
5
|
+
require('@stencil/react-output-target/runtime');
|
|
5
6
|
require('react');
|
|
6
7
|
require('react-dom');
|
|
7
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 NvDialogfooterStyle0 = nvDialogfooterCss;
|
|
10
10
|
|
|
11
11
|
const NvDialogfooter = class {
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
|
-
this.dialogCanceled = index.createEvent(this, "dialogCanceled");
|
|
15
|
-
this.dialogPrimaryClicked = index.createEvent(this, "dialogPrimaryClicked");
|
|
14
|
+
this.dialogCanceled = index.createEvent(this, "dialogCanceled", 3);
|
|
15
|
+
this.dialogPrimaryClicked = index.createEvent(this, "dialogPrimaryClicked", 3);
|
|
16
16
|
if (hostRef.$hostElement$["s-ei"]) {
|
|
17
17
|
this.internals = hostRef.$hostElement$["s-ei"];
|
|
18
18
|
}
|
|
@@ -86,22 +86,21 @@ const NvDialogfooter = class {
|
|
|
86
86
|
// Set the default button type based on the form property
|
|
87
87
|
this.primaryButtonType =
|
|
88
88
|
this.primaryButtonType || this.form
|
|
89
|
-
?
|
|
90
|
-
:
|
|
89
|
+
? constantsBReL3Lsa.ButtonType.Submit
|
|
90
|
+
: constantsBReL3Lsa.ButtonType.Button;
|
|
91
91
|
}
|
|
92
92
|
//#endregion LIFECYCLE
|
|
93
93
|
/****************************************************************************/
|
|
94
94
|
//#region RENDER
|
|
95
95
|
render() {
|
|
96
|
-
return (index.h(index.Host, { key: '
|
|
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))));
|
|
97
97
|
}
|
|
98
98
|
static get formAssociated() { return true; }
|
|
99
99
|
get el() { return index.getElement(this); }
|
|
100
100
|
};
|
|
101
|
-
NvDialogfooter.style =
|
|
101
|
+
NvDialogfooter.style = nvDialogfooterCss;
|
|
102
102
|
|
|
103
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);}";
|
|
104
|
-
const NvDialogheaderStyle0 = nvDialogheaderCss;
|
|
105
104
|
|
|
106
105
|
const NvDialogheader = class {
|
|
107
106
|
constructor(hostRef) {
|
|
@@ -132,7 +131,7 @@ const NvDialogheader = class {
|
|
|
132
131
|
}
|
|
133
132
|
get el() { return index.getElement(this); }
|
|
134
133
|
};
|
|
135
|
-
NvDialogheader.style =
|
|
134
|
+
NvDialogheader.style = nvDialogheaderCss;
|
|
136
135
|
|
|
137
136
|
exports.nv_dialogfooter = NvDialogfooter;
|
|
138
137
|
exports.nv_dialogheader = NvDialogheader;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CtjeeUI-.js');
|
|
4
|
+
var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
|
|
5
|
+
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
6
|
+
require('@stencil/react-output-target/runtime');
|
|
7
|
+
require('react');
|
|
8
|
+
require('react-dom');
|
|
9
|
+
|
|
10
|
+
const nvFieldcheckboxCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldcheckbox{--nv-fieldcheckbox-border-default:var(\n --components-form-field-border-default\n );--nv-fieldcheckbox-border-hover:var(--components-form-field-border-hover);--nv-fieldcheckbox-border-focus:var(--components-form-field-border-default);--nv-fieldcheckbox-background-default:var(\n --components-form-field-background-default\n );--nv-fieldcheckbox-background-checked:var(\n --components-form-field-background-checked\n );--nv-fieldcheckbox-background-disabled:var(\n --components-form-field-background-disabled\n );--nv-fieldcheckbox-focus-box-shadow:var(--color-focus-brand);--nv-fieldcheckbox-color-checked:var(\n --components-form-shape-foreground-default\n );--nv-fieldcheckbox-color-disabled:var(\n --components-form-shape-foreground-disabled\n );--nv-fieldcheckbox-outline-color:var(--color-focus-brand);display:inline-flex;align-items:flex-start;gap:var(--form-gap-x);position:relative}nv-fieldcheckbox:not([disabled],[readonly]) input,nv-fieldcheckbox:not([disabled],[readonly]) label{cursor:pointer}nv-fieldcheckbox.error>.input-container{--nv-fieldcheckbox-border-default:var(--components-form-field-border-error);--nv-fieldcheckbox-border-hover:var(--nv-fieldcheckbox-border-default);--nv-fieldcheckbox-border-focus:var(--components-form-field-border-error);--nv-fieldcheckbox-focus-box-shadow:var(--color-focus-destructive);--nv-fieldcheckbox-color-disabled:var(\n --components-form-shape-foreground-disabled-error\n );--nv-fieldcheckbox-background-checked:var(\n --components-form-field-background-error\n );--nv-fieldcheckbox-outline-color:var(--color-focus-destructive)}nv-fieldcheckbox.label-placement-before{flex-direction:row-reverse}nv-fieldcheckbox[disabled]:not([disabled=false]){opacity:0.5}nv-fieldcheckbox>.input-container{position:relative;color:var(--nv-fieldcheckbox-color-checked)}nv-fieldcheckbox>.input-container input[type=checkbox][readonly]{opacity:0.5}nv-fieldcheckbox>.input-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-fieldcheckbox-color-disabled)}nv-fieldcheckbox>.input-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-fieldcheckbox-border-default);background:var(--nv-fieldcheckbox-background-default)}nv-fieldcheckbox>.input-container input[type=checkbox]:hover{border-color:var(--nv-fieldcheckbox-border-hover)}nv-fieldcheckbox>.input-container input[type=checkbox]:focus{border-color:var(--nv-fieldcheckbox-border-focus)}nv-fieldcheckbox>.input-container input[type=checkbox]:focus,nv-fieldcheckbox>.input-container input[type=checkbox]:focus-within{outline:none}nv-fieldcheckbox>.input-container input[type=checkbox]:focus-visible,nv-fieldcheckbox>.input-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-fieldcheckbox-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-fieldcheckbox>.input-container input[type=checkbox]:checked,nv-fieldcheckbox>.input-container input[type=checkbox]:indeterminate{background:var(--nv-fieldcheckbox-background-checked);border-color:var(--nv-fieldcheckbox-background-checked)}nv-fieldcheckbox>.input-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-fieldcheckbox-background-disabled);border-color:var(--nv-fieldcheckbox-border-default)}nv-fieldcheckbox>.input-container input[type=checkbox][readonly]{opacity:0.5}nv-fieldcheckbox>.input-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-fieldcheckbox>.input-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}nv-fieldcheckbox[required]:not([required=false])>.text-container label::after,nv-fieldcheckbox[aria-required=true]>.text-container label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fieldcheckbox>.text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}nv-fieldcheckbox>.text-container label{align-self:stretch;text-align:left;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--form-label-font-weight);line-height:var(--form-label-line-height)}nv-fieldcheckbox>.text-container label.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-fieldcheckbox>.text-container .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height)}nv-fieldcheckbox>.text-container .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
11
|
+
|
|
12
|
+
const NvFieldcheckbox = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.checkedChanged = index.createEvent(this, "checkedChanged", 3);
|
|
16
|
+
/**
|
|
17
|
+
* When true, the label will be placed before the checkbox.
|
|
18
|
+
* @deprecated Use `labelPlacement = end` instead.
|
|
19
|
+
* */
|
|
20
|
+
this.labelBefore = false;
|
|
21
|
+
//#endregion DEPRECATED
|
|
22
|
+
/****************************************************************************/
|
|
23
|
+
//#region PROPERTIES
|
|
24
|
+
/**
|
|
25
|
+
* Sets the ID for the radio button’s input element and the for attribute of
|
|
26
|
+
* the associated label. If no ID is provided, a random one will be
|
|
27
|
+
* automatically generated to ensure unique identification, facilitating
|
|
28
|
+
* proper label association and accessibility.
|
|
29
|
+
*/
|
|
30
|
+
this.inputId = v4BdYh22OP.v4();
|
|
31
|
+
/**
|
|
32
|
+
* Hides the label visually while still keeping it available for screen
|
|
33
|
+
* readers.
|
|
34
|
+
*/
|
|
35
|
+
this.hideLabel = false;
|
|
36
|
+
/**
|
|
37
|
+
* Signals that there is an error associated with the checkbox, which can
|
|
38
|
+
* trigger visual cues.
|
|
39
|
+
* @validator error
|
|
40
|
+
*/
|
|
41
|
+
this.error = false;
|
|
42
|
+
/**
|
|
43
|
+
* Indicates whether the checkbox is checked or not.
|
|
44
|
+
*/
|
|
45
|
+
this.checked = false;
|
|
46
|
+
/**
|
|
47
|
+
* Indicates whether the checkbox is in an indeterminate state, typically used
|
|
48
|
+
* for hierarchical checkboxes.
|
|
49
|
+
*/
|
|
50
|
+
this.indeterminate = false;
|
|
51
|
+
/**
|
|
52
|
+
* Disables the checkbox, preventing user interaction.
|
|
53
|
+
*/
|
|
54
|
+
this.disabled = false;
|
|
55
|
+
/**
|
|
56
|
+
* Sets the checkbox to read-only, preventing user changes but still allowing
|
|
57
|
+
* focus and selection of text.
|
|
58
|
+
*/
|
|
59
|
+
this.readonly = false;
|
|
60
|
+
/**
|
|
61
|
+
* Marks the checkbox as required, indicating that it must be checked for
|
|
62
|
+
* form submission.
|
|
63
|
+
* @note This uses the native HTML `required` attribute, which triggers browser validation.
|
|
64
|
+
*/
|
|
65
|
+
this.required = false;
|
|
66
|
+
/**
|
|
67
|
+
* Marks the checkbox as required for accessibility purposes without triggering
|
|
68
|
+
* native HTML validation. Use this when implementing custom validation logic.
|
|
69
|
+
* @note When set, this uses `aria-required` instead of the native `required` attribute.
|
|
70
|
+
* This allows developers to implement custom validation while maintaining accessibility.
|
|
71
|
+
* @note If this prop is not explicitly set, the component will check for the HTML attribute
|
|
72
|
+
* 'aria-required' directly to determine if it should be applied.
|
|
73
|
+
*/
|
|
74
|
+
this.ariaRequiredAttr = false;
|
|
75
|
+
/**
|
|
76
|
+
* Applies focus to the input field as soon as the component is mounted. This
|
|
77
|
+
* is equivalent to setting the native autofocus attribute on an <input>
|
|
78
|
+
* element.
|
|
79
|
+
*/
|
|
80
|
+
this.autofocus = false;
|
|
81
|
+
}
|
|
82
|
+
//#endregion EVENTS
|
|
83
|
+
/****************************************************************************/
|
|
84
|
+
//#region LISTENERS
|
|
85
|
+
/**
|
|
86
|
+
* Listens for the change event on the checkbox input element and updates the
|
|
87
|
+
* checked state.
|
|
88
|
+
* @param {Event} event - The change event.
|
|
89
|
+
*/
|
|
90
|
+
handleChange(event) {
|
|
91
|
+
const target = event.target;
|
|
92
|
+
if (target.type === 'checkbox' && target.id === this.inputId) {
|
|
93
|
+
if (this.readonly || this.disabled) {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (this.indeterminate) {
|
|
98
|
+
this.indeterminate = false;
|
|
99
|
+
}
|
|
100
|
+
this.checked = target.checked;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//#endregion LISTENERS
|
|
104
|
+
/****************************************************************************/
|
|
105
|
+
//#region WATCHERS
|
|
106
|
+
/**
|
|
107
|
+
* Watches for changes to the checked state and emits the new value.
|
|
108
|
+
* @param {boolean} checked - The new value of the checked state.
|
|
109
|
+
*/
|
|
110
|
+
onCheckedChanged(checked) {
|
|
111
|
+
this.checkedChanged.emit(checked);
|
|
112
|
+
}
|
|
113
|
+
//#endregion WATCHERS
|
|
114
|
+
/****************************************************************************/
|
|
115
|
+
//#region LIFECYCLE
|
|
116
|
+
componentWillRender() {
|
|
117
|
+
if (this.message) {
|
|
118
|
+
this.description = this.message;
|
|
119
|
+
}
|
|
120
|
+
if (this.labelBefore) {
|
|
121
|
+
this.labelPlacement = 'before';
|
|
122
|
+
}
|
|
123
|
+
if (this.validation) {
|
|
124
|
+
this.errorDescription = this.validation;
|
|
125
|
+
this.error = true;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
//#endregion LIFECYCLE
|
|
129
|
+
/****************************************************************************/
|
|
130
|
+
//#region RENDER
|
|
131
|
+
render() {
|
|
132
|
+
// Check aria-required from multiple sources:
|
|
133
|
+
// 1. HTML attribute 'aria-required' (direct HTML) - check if explicitly set
|
|
134
|
+
// 2. JavaScript prop (when prop is explicitly set via JavaScript)
|
|
135
|
+
// We use hasAttribute to determine if the attribute was explicitly set by the user,
|
|
136
|
+
// since the prop now defaults to false (to maintain Blazor compatibility)
|
|
137
|
+
const hasAriaRequiredAttr = this.el.hasAttribute('aria-required') ||
|
|
138
|
+
this.el.hasAttribute('aria-required-attr');
|
|
139
|
+
const ariaRequiredFromAttr = hasAriaRequiredAttr
|
|
140
|
+
? this.el.getAttribute('aria-required') ||
|
|
141
|
+
this.el.getAttribute('aria-required-attr')
|
|
142
|
+
: null;
|
|
143
|
+
// Use aria-required if the attribute was explicitly set
|
|
144
|
+
// With reflect: true, setting the prop will also set the attribute
|
|
145
|
+
const useAriaRequired = hasAriaRequiredAttr;
|
|
146
|
+
// Determine the value: use attribute if it exists (prop reflects to attribute via reflect: true)
|
|
147
|
+
// If attribute doesn't exist, the prop was never set and we don't use aria-required
|
|
148
|
+
const ariaRequiredAttrValue = hasAriaRequiredAttr
|
|
149
|
+
? ariaRequiredFromAttr
|
|
150
|
+
: null;
|
|
151
|
+
// Determine which attributes to use
|
|
152
|
+
// If aria-required HTML attribute is present, use it (convert string to boolean)
|
|
153
|
+
// If required is set and aria-required is not "false", use native required
|
|
154
|
+
// If aria-required is "false", don't use native required even if required is set
|
|
155
|
+
const ariaRequiredValue = useAriaRequired
|
|
156
|
+
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
157
|
+
: undefined;
|
|
158
|
+
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
159
|
+
return (index.h(index.Host, { key: 'f3048e237f3e1b4007ed4b3a885aa3743d97f944', class: clsxChV9xqsO.clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, index.h("div", { key: '294e57442ee4d4529ecd68e515f508c753b2710f', class: "input-container" }, index.h("input", Object.assign({ key: '9c0f7ded57a973da45f12768e5a6e0dcb62ce259', 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 && !useNativeRequired, required: useNativeRequired ? this.required : undefined }, (ariaRequiredValue !== undefined && {
|
|
160
|
+
'aria-required': String(ariaRequiredValue),
|
|
161
|
+
}), { indeterminate: this.indeterminate, ref: el => {
|
|
162
|
+
if (el) {
|
|
163
|
+
el.indeterminate = this.indeterminate;
|
|
164
|
+
}
|
|
165
|
+
} })), index.h("span", { key: '223c55fdf2a6f903983cc3d3864e1e39d4e7ec04', class: "icon" }, this.checked && !this.indeterminate && (index.h("slot", { key: '336e037d31cb2b52745977a54ca997af5e45304b', name: "checked-icon" }, index.h("svg", { key: '08e6e90c23787f057c3bf0aa6cfbc9a45b5122b9', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: 'b14e12fec6247aa3aa8da36bcaa0dab6edabaa96', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (index.h("slot", { key: 'b5c30541e74b920ec41a1fe5c35805cea134d336', name: "indeterminate-icon" }, index.h("svg", { key: '54bcb60835d919f4a7b4897fc567c9adab4e05c1', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: '62ade78b9f33727aba129e6e4d5c219d4bbd03f1', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), index.h("slot", { key: 'cb6cc3dbcf226dcf5ddb1fa871d43ca19726a3a8' }), index.h("div", { key: '44634c846b5d09d71b6c27a8c9934acf12261105', class: "text-container" }, index.h("slot", { key: '2aa6f2e956088f5856f56888def6f728c815293c', name: "main" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'e417e4cb783a1076b35f5566f2f25ab06063d8d5', htmlFor: this.inputId, class: clsxChV9xqsO.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '61eaf3fd5ca61d0cba524786c288d6b3836bb947', name: "label" }, this.label))), (this.description ||
|
|
166
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '43fdb9fb7a6af7c1d2bac659c3195e1b1988d083', class: "description" }, index.h("slot", { key: '7e332245bbefe3686fc71560010ab237217bb8f8', name: "description" }, this.description)))), (this.errorDescription ||
|
|
167
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'a2dc29465f01262b147345fa8897dbcca7b77458', hidden: !this.error, class: "error-description" }, index.h("slot", { key: 'e696d1fe9d833fec7b779bf0b5191dd0eab2908e', name: "error-description" }, this.errorDescription))))));
|
|
168
|
+
}
|
|
169
|
+
static get formAssociated() { return true; }
|
|
170
|
+
get el() { return index.getElement(this); }
|
|
171
|
+
static get watchers() { return {
|
|
172
|
+
"checked": ["onCheckedChanged"]
|
|
173
|
+
}; }
|
|
174
|
+
};
|
|
175
|
+
NvFieldcheckbox.style = nvFieldcheckboxCss;
|
|
176
|
+
|
|
177
|
+
exports.nv_fieldcheckbox = NvFieldcheckbox;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var index = require('./index-CtjeeUI-.js');
|
|
4
|
+
var inputmaskCSo292ul = require('./inputmask-CSo292ul-DlvupPk6.js');
|
|
5
|
+
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
6
|
+
require('@stencil/react-output-target/runtime');
|
|
6
7
|
require('react');
|
|
7
8
|
require('react-dom');
|
|
8
|
-
require('./_commonjsHelpers-
|
|
9
|
+
require('./_commonjsHelpers-B85MJLTf-CFO10eej.js');
|
|
9
10
|
|
|
10
|
-
const nvFielddateCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fielddate{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fielddate[fluid]:not([fluid=false]){max-width:unset}nv-fielddate[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fielddate[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fielddate[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fielddate[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fielddate label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fielddate nv-popover{width:100%;display:block}nv-fielddate nv-popover [data-scope=popover]{padding:0;background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:auto}nv-fielddate nv-popover [slot=content]{display:block;width:100%}nv-fielddate nv-popover .datepicker-container{border:none}nv-fielddate .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;display:flex;align-items:center;gap:8px}nv-fielddate .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fielddate .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddate .input-wrapper .input-container:focus-within,nv-fielddate .input-wrapper .input-container:focus-within:hover,nv-fielddate .input-wrapper .input-container:focus,nv-fielddate .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddate .input-wrapper .input-container:has(input:read-only){
|
|
11
|
-
const NvFielddateStyle0 = nvFielddateCss;
|
|
11
|
+
const nvFielddateCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fielddate{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fielddate[fluid]:not([fluid=false]){max-width:unset}nv-fielddate[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fielddate[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fielddate[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fielddate[required]:not([required=false]) label::after,nv-fielddate[aria-required=true] label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fielddate label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fielddate nv-popover{width:100%;display:block}nv-fielddate nv-popover [data-scope=popover]{padding:0;background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:auto}nv-fielddate nv-popover [slot=content]{display:block;width:100%}nv-fielddate nv-popover .datepicker-container{border:none}nv-fielddate .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;display:flex;align-items:center;gap:8px}nv-fielddate .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fielddate .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddate .input-wrapper .input-container:focus-within,nv-fielddate .input-wrapper .input-container:focus-within:hover,nv-fielddate .input-wrapper .input-container:focus,nv-fielddate .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddate .input-wrapper .input-container:has(input:read-only){background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddate .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddate .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%}nv-fielddate .input-wrapper .input-container input:focus{outline:none}nv-fielddate .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fielddate .input-wrapper .input-container input{}nv-fielddate .input-wrapper .input-container input[type=password]::-ms-clear,nv-fielddate .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddate .input-wrapper .input-container input{font-feature-settings:\"tnum\";font-family:\"TTNorms Pro Mono\", monospace}nv-fielddate .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddate .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddate .input-wrapper .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fielddate .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddate .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fielddate .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
12
12
|
|
|
13
13
|
const NvFielddate = class {
|
|
14
14
|
constructor(hostRef) {
|
|
15
15
|
index.registerInstance(this, hostRef);
|
|
16
|
-
this.valueChanged = index.createEvent(this, "valueChanged");
|
|
17
|
-
this.popoverId =
|
|
16
|
+
this.valueChanged = index.createEvent(this, "valueChanged", 3);
|
|
17
|
+
this.popoverId = v4BdYh22OP.v4();
|
|
18
18
|
/****************************************************************************/
|
|
19
19
|
//#region PROPERTIES
|
|
20
20
|
/**
|
|
21
21
|
* Sets the ID for the input element and the for attribute of the associated
|
|
22
22
|
* label. If no ID is provided, a random one will be automatically generated.
|
|
23
23
|
*/
|
|
24
|
-
this.inputId =
|
|
24
|
+
this.inputId = v4BdYh22OP.v4();
|
|
25
25
|
/**
|
|
26
26
|
* Disables the input field.
|
|
27
27
|
*/
|
|
@@ -32,8 +32,18 @@ const NvFielddate = class {
|
|
|
32
32
|
this.readonly = false;
|
|
33
33
|
/**
|
|
34
34
|
* Marks the input field as required.
|
|
35
|
+
* @note This uses the native HTML `required` attribute, which triggers browser validation.
|
|
35
36
|
*/
|
|
36
37
|
this.required = false;
|
|
38
|
+
/**
|
|
39
|
+
* Marks the input field as required for accessibility purposes without triggering
|
|
40
|
+
* native HTML validation. Use this when implementing custom validation logic.
|
|
41
|
+
* @note When set, this uses `aria-required` instead of the native `required` attribute.
|
|
42
|
+
* This allows developers to implement custom validation while maintaining accessibility.
|
|
43
|
+
* @note If this prop is not explicitly set, the component will check for the HTML attribute
|
|
44
|
+
* 'aria-required' directly to determine if it should be applied.
|
|
45
|
+
*/
|
|
46
|
+
this.ariaRequiredAttr = false;
|
|
37
47
|
/**
|
|
38
48
|
* Indicates an error state.
|
|
39
49
|
*/
|
|
@@ -234,7 +244,7 @@ const NvFielddate = class {
|
|
|
234
244
|
if (!this.inputElement)
|
|
235
245
|
return;
|
|
236
246
|
(_b = (_a = this.inputElement.inputmask) === null || _a === void 0 ? void 0 : _a.remove) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
237
|
-
const inputMask = new
|
|
247
|
+
const inputMask = new inputmaskCSo292ul.Inputmask({
|
|
238
248
|
alias: 'datetime',
|
|
239
249
|
inputFormat: this.convertToInputmaskFormat(this.dateFormat),
|
|
240
250
|
placeholder: this.convertToInputmaskFormat(this.dateFormat),
|
|
@@ -256,6 +266,28 @@ const NvFielddate = class {
|
|
|
256
266
|
});
|
|
257
267
|
inputMask.mask(this.inputElement);
|
|
258
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Handles the single date selection event from nv-calendar.
|
|
271
|
+
* Updates the input value and closes the popover.
|
|
272
|
+
* @param {CustomEvent} event - The event from nv-calendar.
|
|
273
|
+
*/
|
|
274
|
+
handleSingleDateChange(event) {
|
|
275
|
+
const value = event.detail;
|
|
276
|
+
const previousValue = this.value;
|
|
277
|
+
this.singleValue = value;
|
|
278
|
+
this.value = value;
|
|
279
|
+
// Set the input value directly when calendar is used
|
|
280
|
+
if (this.inputElement) {
|
|
281
|
+
this.inputElement.value = value;
|
|
282
|
+
}
|
|
283
|
+
// Only emit valueChanged if the value actually changed
|
|
284
|
+
if (previousValue !== value) {
|
|
285
|
+
this.valueChanged.emit(value);
|
|
286
|
+
}
|
|
287
|
+
if (!this.showActions) {
|
|
288
|
+
this.open = false;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
259
291
|
//#endregion METHODS
|
|
260
292
|
/****************************************************************************/
|
|
261
293
|
//#region LIFECYCLE
|
|
@@ -314,31 +346,12 @@ const NvFielddate = class {
|
|
|
314
346
|
//#endregion WATCHERS
|
|
315
347
|
/****************************************************************************/
|
|
316
348
|
//#region LISTENERS
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
* @param {CustomEvent} event - The event from nv-calendar.
|
|
321
|
-
*/
|
|
322
|
-
handleSingleDateChange(event) {
|
|
323
|
-
const value = event.detail;
|
|
324
|
-
const previousValue = this.value;
|
|
325
|
-
this.singleValue = value;
|
|
326
|
-
this.value = value;
|
|
327
|
-
// Set the input value directly when calendar is used
|
|
328
|
-
if (this.inputElement) {
|
|
329
|
-
this.inputElement.value = value;
|
|
330
|
-
}
|
|
331
|
-
// Only emit valueChanged if the value actually changed
|
|
332
|
-
if (previousValue !== value) {
|
|
333
|
-
this.valueChanged.emit(value);
|
|
334
|
-
}
|
|
335
|
-
if (!this.showActions) {
|
|
336
|
-
this.open = false;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
handleClosePopover() {
|
|
349
|
+
/* eslint-disable nova/native-event-listener */
|
|
350
|
+
handleClosePopover(event) {
|
|
351
|
+
event.stopPropagation();
|
|
340
352
|
this.open = false;
|
|
341
353
|
}
|
|
354
|
+
/* eslint-enable nova/native-event-listener */
|
|
342
355
|
handleDocumentClick(event) {
|
|
343
356
|
this.handleClickOutside(event);
|
|
344
357
|
}
|
|
@@ -365,13 +378,46 @@ const NvFielddate = class {
|
|
|
365
378
|
/****************************************************************************/
|
|
366
379
|
//#region RENDER
|
|
367
380
|
render() {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
381
|
+
// Check aria-required from multiple sources:
|
|
382
|
+
// 1. JavaScript prop (most reliable)
|
|
383
|
+
// 2. HTML attribute 'aria-required' (direct HTML)
|
|
384
|
+
// 3. HTML attribute 'aria-required-attr' (from JSX kebab-case conversion)
|
|
385
|
+
// Check aria-required from multiple sources:
|
|
386
|
+
// 1. HTML attribute 'aria-required' (direct HTML) - check if explicitly set
|
|
387
|
+
// 2. JavaScript prop (when prop is explicitly set via JavaScript)
|
|
388
|
+
// We use hasAttribute to determine if the attribute was explicitly set by the user,
|
|
389
|
+
// since the prop now defaults to false (to maintain Blazor compatibility)
|
|
390
|
+
const hasAriaRequiredAttr = this.el.hasAttribute('aria-required') ||
|
|
391
|
+
this.el.hasAttribute('aria-required-attr');
|
|
392
|
+
const ariaRequiredFromAttr = hasAriaRequiredAttr
|
|
393
|
+
? this.el.getAttribute('aria-required') ||
|
|
394
|
+
this.el.getAttribute('aria-required-attr')
|
|
395
|
+
: null;
|
|
396
|
+
// Use aria-required if the attribute was explicitly set
|
|
397
|
+
// With reflect: true, setting the prop will also set the attribute
|
|
398
|
+
const useAriaRequired = hasAriaRequiredAttr;
|
|
399
|
+
// Determine the value: use attribute if it exists (prop reflects to attribute via reflect: true)
|
|
400
|
+
// If attribute doesn't exist, the prop was never set and we don't use aria-required
|
|
401
|
+
const ariaRequiredAttrValue = hasAriaRequiredAttr
|
|
402
|
+
? ariaRequiredFromAttr
|
|
403
|
+
: null;
|
|
404
|
+
// Determine which attributes to use
|
|
405
|
+
// If aria-required HTML attribute is present, use it (convert string to boolean)
|
|
406
|
+
// If required is set and aria-required is not "false", use native required
|
|
407
|
+
// If aria-required is "false", don't use native required even if required is set
|
|
408
|
+
const ariaRequiredValue = useAriaRequired
|
|
409
|
+
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
410
|
+
: undefined;
|
|
411
|
+
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
412
|
+
return (index.h(index.Host, { key: '0ca84bd29bbaec9ece39453bc92d72bac16f6f57' }, ((this.label && this.label.length > 0) ||
|
|
413
|
+
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'be4ccdc44ea8e0f37b98b09c842f1572ae097d0c', htmlFor: this.inputId }, index.h("slot", { key: '3c3c33c21cca313d0593c738a8b43ea75b5c2682', name: "label" }, this.label))), index.h("nv-popover", { key: 'cbabf1481c6123ea9dedd9de1df46002c2381936', ref: this.setPopoverRef, id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: '618bc8cee26700c9ed030e2145e15b160c7ae1b0', slot: "trigger", class: "input-wrapper" }, index.h("slot", { key: '14d45ea59d20a6ec74d80fb64d5ffc91f2c1c7ea', name: "before-input" }), index.h("div", { key: 'd053f3946c341f9683d58bc198ba102eac5a9bf4', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '1c43710904773492094de03147800888f88f7ccb', name: "leading-input" }), index.h("input", Object.assign({ key: '366f655b2d42dc6d31159772d8a1611491ade8c3', id: this.inputId, ref: this.setInputRef, placeholder: this.placeholder ||
|
|
414
|
+
this.convertToInputmaskFormat(this.dateFormat), name: this.name, disabled: this.disabled, readOnly: this.readonly, required: useNativeRequired ? this.required : undefined }, (ariaRequiredValue !== undefined && {
|
|
415
|
+
'aria-required': String(ariaRequiredValue),
|
|
416
|
+
}), { autofocus: this.autofocus, onInput: this.handleInput, onFocus: this.handleFocus, "data-scope": "date" })), this.error && (index.h("nv-icon", { key: 'fe00afa4281786bcdda78197e569d7502abc88e9', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: 'f23e9bc837970b4599bc93dd240cdb5e7dbb5cd0', name: "circle-check", class: "validation", size: "md" })), index.h("nv-iconbutton", { key: '7790ff4ae3b8bbb54b00ec4051d017d8c3b34024', class: "toggle-calendar-icon", name: "calendar" //{this.open ? 'chevron-top' : 'chevron-down'}
|
|
371
417
|
,
|
|
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: '
|
|
373
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
374
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
418
|
+
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: '86f2a31011329a8b4623e9d231fe71ecd4af3988', name: "after-input" })), index.h("div", { key: 'b64e9f05ddb5d6c7d07712a81bf9e71a7950b3bf', slot: "content" }, index.h("nv-calendar", { key: '1a69d64fda2e7fee2bcb541a931b2f77ecaa5c07', onSingleDateChange: this.handleSingleDateChange.bind(this), 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) ||
|
|
419
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '976bd06dbf7ead369aaa26e82168cff22fdc2bd6', class: "description" }, index.h("slot", { key: 'd3d91937cc4fa7dcd711ceda3f366c80449b2685', name: "description" }, this.description))), (this.errorDescription ||
|
|
420
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'df701c4d66010eec74ebe9c4207e3ead7fe1d5cc', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (index.h("slot", { name: "error-description" })) : (this.errorDescription))), index.h("slot", { key: 'c2822d9f38149922f18fd23cc6e52d9a70a2f217' })));
|
|
375
421
|
}
|
|
376
422
|
get el() { return index.getElement(this); }
|
|
377
423
|
static get watchers() { return {
|
|
@@ -379,6 +425,6 @@ const NvFielddate = class {
|
|
|
379
425
|
"open": ["handleOpenChange"]
|
|
380
426
|
}; }
|
|
381
427
|
};
|
|
382
|
-
NvFielddate.style =
|
|
428
|
+
NvFielddate.style = nvFielddateCss;
|
|
383
429
|
|
|
384
430
|
exports.nv_fielddate = NvFielddate;
|