@nova-design-system/nova-react 3.18.0 → 3.20.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/README.md +3 -20
- package/dist/cjs/generated/components.server.js +4 -2
- package/dist/cjs/{index-_oq_uffl.js → index-BObVnP12.js} +373 -332
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/{nv-accordion-item.entry-DBO7ztqb.js → nv-accordion-item.entry-BBAGkmLI.js} +1 -1
- package/dist/cjs/{nv-accordion.entry-Ma9HqnfE.js → nv-accordion.entry-CvvtdLIz.js} +1 -1
- package/dist/cjs/{nv-alert.entry--bKp-lux.js → nv-alert.entry-w5XeFsrC.js} +1 -1
- package/dist/cjs/{nv-avatar.entry-DN_-lrBo.js → nv-avatar.entry-BxUZg-8h.js} +1 -1
- package/dist/cjs/{nv-badge_2.entry-Dl4iJgMU.js → nv-badge_2.entry-DdSIFlJf.js} +2 -2
- package/dist/cjs/{nv-breadcrumb.entry-BBvgQ-p_.js → nv-breadcrumb.entry-CmbqGw3C.js} +1 -1
- package/dist/cjs/{nv-breadcrumbs.entry-1SoAvjZG.js → nv-breadcrumbs.entry-DFHxtPKv.js} +1 -1
- package/dist/cjs/{nv-button.entry-B4k5GJIo.js → nv-button.entry-Dyks6_mF.js} +1 -1
- package/dist/cjs/{nv-buttongroup.entry-B5LQavYS.js → nv-buttongroup.entry-wn9zFd_M.js} +1 -1
- package/dist/cjs/{nv-calendar.entry-mOSPsfm-.js → nv-calendar.entry-Dldsa6dz.js} +1 -1
- package/dist/cjs/{nv-col.entry-Dzg7C_6U.js → nv-col.entry-DnG79KM1.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-CfZeMjYO.js → nv-datagrid.entry-C2ML-e47.js} +1 -1
- package/dist/cjs/{nv-datagridcolumn.entry-DEqq7_M9.js → nv-datagridcolumn.entry-DcMPUtQS.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-DSX9jRuv.js → nv-dialog.entry-C0Vx7dQc.js} +1 -1
- package/dist/cjs/{nv-dialogfooter_2.entry-t9MuuUDn.js → nv-dialogfooter_2.entry-BGq8Jiib.js} +1 -1
- package/dist/cjs/{nv-fieldcheckbox.entry-KDMtAaLt.js → nv-fieldcheckbox.entry-CAPwYnSU.js} +1 -1
- package/dist/cjs/{nv-fielddate.entry-SjEKszkJ.js → nv-fielddate.entry-Byt5cmQi.js} +11 -7
- package/dist/cjs/{nv-fielddaterange.entry-B6pLWuF3.js → nv-fielddaterange.entry-CCFeFP2q.js} +12 -8
- package/dist/cjs/{nv-fielddropdown.entry-DIYVOvRw.js → nv-fielddropdown.entry-BFp_2vBC.js} +194 -210
- package/dist/cjs/{nv-fielddropdownitem.entry-CUMPmEzj.js → nv-fielddropdownitem.entry-D_4KdBY1.js} +8 -5
- package/dist/cjs/{nv-fieldmultiselect.entry-BFt11EM5.js → nv-fieldmultiselect.entry-BaUD7Dcr.js} +5 -1
- package/dist/cjs/{nv-fieldnumber.entry-V2AYjG7j.js → nv-fieldnumber.entry-DOmhBrDv.js} +25 -8
- package/dist/cjs/{nv-fieldpassword.entry-BoQAgzW2.js → nv-fieldpassword.entry-hogiPC5z.js} +4 -4
- package/dist/cjs/{nv-fieldradio.entry-CKDZ6g8q.js → nv-fieldradio.entry-CKbyWpIK.js} +4 -4
- package/dist/cjs/{nv-fieldselect.entry-Daa3JB5t.js → nv-fieldselect.entry-tpURNUEP.js} +6 -6
- package/dist/cjs/{nv-fieldslider.entry-BhT0C9hG.js → nv-fieldslider.entry-v0d92XEY.js} +7 -5
- package/dist/cjs/{nv-fieldtext.entry-a1x9CfYv.js → nv-fieldtext.entry-DNYrOAhj.js} +4 -4
- package/dist/cjs/{nv-fieldtextarea.entry-nn5SqAJD.js → nv-fieldtextarea.entry-cRsjPwwR.js} +4 -4
- package/dist/cjs/{nv-fieldtime.entry-DQb9u4eg.js → nv-fieldtime.entry-BpGBUfKr.js} +5 -4
- package/dist/cjs/nv-icon.entry-BfmyacWA.js +80 -0
- package/dist/cjs/{nv-iconbutton_2.entry-WTj2sSR7.js → nv-iconbutton_2.entry-DOv1RrkS.js} +3 -3
- package/dist/cjs/{nv-menu.entry-DnHSkRkc.js → nv-menu.entry-C2L8F-nG.js} +3 -3
- package/dist/cjs/{nv-menuitem.entry-BMThBD-z.js → nv-menuitem.entry-DuDZTlJ1.js} +2 -2
- package/dist/cjs/{nv-notification.entry-BgORwEc6.js → nv-notification.entry-DxAj-mc7.js} +2 -2
- package/dist/cjs/{nv-notificationcontainer.entry-C3D52xHp.js → nv-notificationcontainer.entry-CUnTicXF.js} +2 -2
- package/dist/cjs/{nv-popover.entry-Bc5Hs_ZA.js → nv-popover.entry-DVwa4DvW.js} +3 -3
- package/dist/cjs/{nv-row.entry-rTFsRQhn.js → nv-row.entry-iLk2UglX.js} +2 -2
- package/dist/cjs/{nv-split.entry-CEkdVB0d.js → nv-split.entry-BrMHK6TS.js} +2 -2
- package/dist/cjs/{nv-stack.entry-DFWmiZRf.js → nv-stack.entry-C8jLJ5Ki.js} +2 -2
- package/dist/cjs/{nv-table.entry-Drf8wXN5.js → nv-table.entry-D6o4g9Vo.js} +2 -2
- package/dist/cjs/{nv-toggle.entry-D3jHT0co.js → nv-toggle.entry-9iwmu7qi.js} +3 -3
- package/dist/cjs/{nv-togglebutton.entry-zN93TaA9.js → nv-togglebutton.entry-N7_CSvzS.js} +2 -2
- package/dist/cjs/{nv-togglebuttongroup.entry-D4dUkodA.js → nv-togglebuttongroup.entry-DWCytOhV.js} +2 -2
- package/dist/cjs/{nv-tooltip.entry-DqFRA9_B.js → nv-tooltip.entry-BMxnZVYA.js} +2 -2
- package/dist/components/NvDatatable.js +17 -2
- package/dist/generated/components.js +2 -0
- package/dist/generated/components.server.js +4 -2
- package/dist/types/components/NvDatatable.d.ts +26 -19
- package/dist/types/generated/components.d.ts +4 -1
- package/dist/types/generated/components.server.d.ts +4 -1
- package/package.json +1 -1
- package/dist/cjs/nv-icon.entry-17nX7627.js +0 -80
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BObVnP12.js');
|
|
4
4
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -70,7 +70,15 @@ const NvFieldnumber = class {
|
|
|
70
70
|
//#region METHODS
|
|
71
71
|
this.handleInput = (event) => {
|
|
72
72
|
const input = event.target;
|
|
73
|
-
|
|
73
|
+
if (input.value === '') {
|
|
74
|
+
this.value = null;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const nextValue = input.valueAsNumber;
|
|
78
|
+
if (Number.isNaN(nextValue)) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.value = nextValue;
|
|
74
82
|
};
|
|
75
83
|
this.handleInputContainerClick = () => {
|
|
76
84
|
this.inputElement.focus();
|
|
@@ -88,17 +96,26 @@ const NvFieldnumber = class {
|
|
|
88
96
|
event.preventDefault();
|
|
89
97
|
};
|
|
90
98
|
this.isMinValueReached = () => {
|
|
91
|
-
return this.min !== undefined &&
|
|
99
|
+
return (this.min !== undefined &&
|
|
100
|
+
typeof this.value === 'number' &&
|
|
101
|
+
this.value <= this.min);
|
|
92
102
|
};
|
|
93
103
|
this.isMaxValueReached = () => {
|
|
94
|
-
return this.max !== undefined &&
|
|
104
|
+
return (this.max !== undefined &&
|
|
105
|
+
typeof this.value === 'number' &&
|
|
106
|
+
this.value >= this.max);
|
|
95
107
|
};
|
|
96
108
|
}
|
|
97
109
|
//#endregion EVENTS
|
|
98
110
|
/****************************************************************************/
|
|
99
111
|
//#region WATCHERS
|
|
100
112
|
watchValueHandler(newValue) {
|
|
101
|
-
|
|
113
|
+
const normalized = typeof newValue === 'number' && !Number.isNaN(newValue) ? newValue : null;
|
|
114
|
+
if (this.lastEmittedValue === normalized) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
this.lastEmittedValue = normalized;
|
|
118
|
+
this.valueChanged.emit(normalized);
|
|
102
119
|
}
|
|
103
120
|
//#endregion METHODS
|
|
104
121
|
/****************************************************************************/
|
|
@@ -116,9 +133,9 @@ const NvFieldnumber = class {
|
|
|
116
133
|
/****************************************************************************/
|
|
117
134
|
//#region RENDER
|
|
118
135
|
render() {
|
|
119
|
-
return (index.h(index.Host, { key: '
|
|
120
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
121
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
136
|
+
return (index.h(index.Host, { key: '9b3239f09e6aace03f79f07399723fdbf557f070' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '322478abbaf477a33debcd828387402299ce6762', htmlFor: this.inputId }, index.h("slot", { key: '75b791ca0fb7eec55faaf966a32733e37b87fb90', name: "label" }, this.label))), index.h("div", { key: '5ce6c27db2b6b0ba8618ed2eac1f61abf8177793', class: "input-wrapper" }, index.h("slot", { key: '3a4a86e358d575fc312d27ee5ffba68474904bd4', name: "before-input" }), index.h("div", { key: '8e07c3c37ea4869aa309fba913663e1d225e21fd', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '91e7c82e46d3268493669e6dd121f643be86a6be', name: "leading-input" }), index.h("input", { key: '3dcbd9d10e4425ebb29b16b1157845ea4ee7bdef', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", autofocus: this.autofocus, required: this.required, max: this.max, min: this.min, step: this.step, value: typeof this.value === 'number' ? this.value : undefined, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), index.h("slot", { key: '7d0d4a77d121433f4feb8aa2139be8e94f8e57a5', name: "trailing-input" }), this.error && (index.h("nv-icon", { key: '2a3969e56de0fc3911901c9540e300caf2b6d681', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '8964d7ffaa2cc2a70caf781a37e66383234c6895', name: "circle-check", class: "validation", size: "md" })), index.h("div", { key: '1ca2fd7095afbc12a1a54c8b09551f28fe5a3579', class: "stepper" }, index.h("nv-iconbutton", { key: '1c3f9200c5409bc05fab9061dff3847a92298d45', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), index.h("nv-iconbutton", { key: 'eb65687b3c31d2ac8bdb534f5ca300a1ada9cd64', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), index.h("slot", { key: '01006c0c2487bce4f908104d263acb0231cdb701', name: "after-input" })), (this.description ||
|
|
137
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '9db93a8aa6bb002a3286763909118e9c7a1661c0', class: "description" }, index.h("slot", { key: '13b0f797bace74e641cdd658bb798bccbfec70dc', name: "description" }, this.description))), (this.errorDescription ||
|
|
138
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '4ca240bc22fb83a283637e60384e59d687d67e9e', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '145b68572a38e91559431ff51ec38a64027d4978', name: "error-description" }, this.errorDescription)))));
|
|
122
139
|
}
|
|
123
140
|
static get formAssociated() { return true; }
|
|
124
141
|
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-BObVnP12.js');
|
|
4
4
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -107,9 +107,9 @@ const NvFieldpassword = class {
|
|
|
107
107
|
/****************************************************************************/
|
|
108
108
|
//#region RENDER
|
|
109
109
|
render() {
|
|
110
|
-
return (index.h(index.Host, { key: '
|
|
111
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
112
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
110
|
+
return (index.h(index.Host, { key: '3fd88ed71cb3c34fbd4a35cb861617687add3c76' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'b08c3c1d7ca6f196c547fdb42c2289f4fbacd461', htmlFor: this.inputId }, index.h("slot", { key: '2469c277ea25d8c9ea521cc05da068cf63465637', name: "label" }, this.label))), index.h("div", { key: '606a09205e3caa2490c3db48411eebc5bddbb786', class: "input-wrapper" }, index.h("slot", { key: '843cf4814cf84c9d6ca5fec7a13c30820dd0075a', name: "before-input" }), index.h("div", { key: '4b06bdf556442e8ccb4f28a450bcb5f432740b8a', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: 'c07a3575a5b831e5f803558607fbf677e5b2ffac', name: "leading-input" }), index.h("input", { key: 'c9536d50ff4ed09cffd13ba06d4599492f77feac', id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, type: this.showPasswordState ? 'text' : 'password', inputMode: this.mode, value: this.value, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), (this.success || this.error) && (index.h("nv-icon", { key: 'df7f3b45b0dec7dabfdea7496ff6576413101cf5', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (index.h("nv-iconbutton", { key: 'ef3bc855fe5f70ed537d9b564b7f8b990998da48', name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() }))), index.h("slot", { key: 'd7e892c362bcab7724c0250a8e097bdd3a7f28a2', name: "after-input" })), (this.description ||
|
|
111
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '5933be1bda9a32ceabcae5144e6a6a131203f9d6', class: "description" }, index.h("slot", { key: '31671c862c3e5988ef4939d21a75f721b47eacf6', name: "description" }, this.description))), (this.errorDescription ||
|
|
112
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'a38ff2519ae8da933b5884c0e576d91b8825dec7', hidden: !this.error, class: "error-description" }, index.h("slot", { key: 'ec242e6f6cf28b7e34bfcec658874067019ba540', name: "error-description" }, this.errorDescription)))));
|
|
113
113
|
}
|
|
114
114
|
static get formAssociated() { return true; }
|
|
115
115
|
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-BObVnP12.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -88,9 +88,9 @@ const NvFieldradio = class {
|
|
|
88
88
|
/****************************************************************************/
|
|
89
89
|
//#region RENDER
|
|
90
90
|
render() {
|
|
91
|
-
return (index.h(index.Host, { key: '
|
|
92
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
93
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
91
|
+
return (index.h(index.Host, { key: '18cad87f89d7532fab554e1ad74fcc615ddd8026', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, index.h("input", { key: '347c33c2ff2b6377d009c108739e4016f97da16b', type: "radio", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), index.h("div", { key: '067cebdaf42e94c0b447a91b852a44fa7d5f58cf', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '9c90d0c9e27125576e8194113412795243492c9d', htmlFor: this.inputId }, index.h("slot", { key: 'c5da5d8f8715635ec0adfd46ee704b7c0d940bdd', name: "label" }, this.label))), (this.description ||
|
|
92
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'f5e00078f008ab49bbac08c3d3614cae05b783a7', class: "description" }, index.h("slot", { key: 'b70921bbe8acda5c9b7c8e7d81e2d696bc2e4613', name: "description" }, this.description))), (this.errorDescription ||
|
|
93
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'a6ccddfb948ba5db46f355bb3afd73873fcfe8e6', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '896448579ceee1ba50672e58e8a70e21d5d9fc64', name: "error-description" }, this.errorDescription))))));
|
|
94
94
|
}
|
|
95
95
|
static get formAssociated() { return true; }
|
|
96
96
|
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-BObVnP12.js');
|
|
4
4
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -336,13 +336,13 @@ const NvFieldselect = class {
|
|
|
336
336
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
337
337
|
*/
|
|
338
338
|
render() {
|
|
339
|
-
return (index.h(index.Host, { key: '
|
|
339
|
+
return (index.h(index.Host, { key: 'a1a4eb304e38fb1b058b66af5d3c86edcb05610f' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '8aa279dba4e264b17ebd3b33dcff4480ce6c5d57', htmlFor: this.inputId }, index.h("slot", { key: 'a7cd14d0efc0f22739ee5496d64aad0930000a6e', name: "label" }, this.label))), index.h("div", { key: '3929ad8d896250574d437d94ab35c72e55884e04', class: "select-wrapper" }, index.h("slot", { key: 'c92b18f7639b33ebfcf2f3a4b1c24ab4b5a54fa5', name: "before-input" }), index.h("div", { key: '8554dc402e570dd48ca5031f5e6e4d48f84e9a7d', class: "select-container", onClick: this.handleSelectContainerClick }, index.h("slot", { key: 'b76cd121460e53f5f0a1e4e7ca0e96f5e733f6f3', name: "leading-input" }), this.internalReadonly && (index.h("input", { key: 'f0600651b33c5768bab22f27109de445bdb70fff', id: this.inputId + '-readonly', type: "text", value: this.computedDisplayValue, readonly: true, class: "readonly-input", "aria-readonly": "true", "aria-label": this.label, "aria-describedby": this.error
|
|
340
340
|
? `${this.inputId}-error`
|
|
341
|
-
: `${this.inputId}-description` })), index.h("select", { key: '
|
|
341
|
+
: `${this.inputId}-description` })), index.h("select", { key: 'e1f9211919f9eef80c50c21536ee98e6dba71cb6', id: this.inputId, ref: el => (this.selectElement = el), name: this.name, autofocus: this.autofocus, disabled: this.disabled, required: this.required, multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
|
|
342
342
|
? `${this.inputId}-error`
|
|
343
|
-
: `${this.inputId}-description` }, this.options && this.options.length > 0 ? (this.options.map(option => (index.h("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (index.h("slot", null))), index.h("div", { key: '
|
|
344
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
345
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
343
|
+
: `${this.inputId}-description` }, this.options && this.options.length > 0 ? (this.options.map(option => (index.h("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (index.h("slot", null))), index.h("div", { key: '4e17199de9ac55f30ab27f37ad0f69526a96a53b', class: "select-icons" }, this.error && (index.h("nv-icon", { key: '6e02a15e6a72cd54910b44dcc3445bc0a875d301', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '2c936e0fe3070fdb1540e50196850531c1a186f3', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (index.h("nv-iconbutton", { key: '55ff8a3ad2908c9380041b684274ebb275197605', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), index.h("slot", { key: 'd32c4fa7b22a705dcb89224de06c1f5f0a965f34', name: "after-input" })), (this.description ||
|
|
344
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '1a8ba7867fa31618ae6d9149ce03ee63b0c958a1', class: "description", id: `${this.inputId}-description` }, index.h("slot", { key: '527ee48037f1d76e6478b90de86b5e4f0b819677', name: "description" }, this.description))), (this.errorDescription ||
|
|
345
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '5279561b8a6a20101447a05b4f99d4aea4e6994b', class: "error-description", id: `${this.inputId}-error` }, index.h("slot", { key: '101f92f3d2bba8c4c9502542fada0a1363ab5ad1', name: "error-description" }, this.errorDescription)))));
|
|
346
346
|
}
|
|
347
347
|
static get formAssociated() { return true; }
|
|
348
348
|
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-BObVnP12.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -231,7 +231,9 @@ const FieldInput = props => {
|
|
|
231
231
|
const handleValueChanged = (event) => {
|
|
232
232
|
event.stopPropagation();
|
|
233
233
|
const newValue = event.detail;
|
|
234
|
-
|
|
234
|
+
// Accept null as a valid value (when field is cleared)
|
|
235
|
+
// Only reject NaN numbers
|
|
236
|
+
if (typeof newValue === 'number' && Number.isNaN(newValue)) {
|
|
235
237
|
return;
|
|
236
238
|
}
|
|
237
239
|
onInput({
|
|
@@ -704,11 +706,11 @@ const NvFieldslider = class {
|
|
|
704
706
|
/****************************************************************************/
|
|
705
707
|
//#region RENDER
|
|
706
708
|
render() {
|
|
707
|
-
return (index.h(index.Host, { key: '
|
|
709
|
+
return (index.h(index.Host, { key: 'e4d4719682957f858468c3df97c82d5be29e87b8' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'a6d84550e4b91a4f23252e31ebbd3680b5a81aad', htmlFor: this.startInputId }, index.h("slot", { key: '44ce936f4b50ae5be5c3b8769b990fda82ff9b27', name: "label" }, this.label))), index.h("div", { key: '578a9673356506f87d906ff34254f93c0f724ebb', class: "slider-container" }, this.range ? (index.h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 0, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : null, index.h("div", { key: '1dd30a5e703309993e8d61dc44bf1ad0adbc11e0', class: "track-container" }, index.h("div", { key: '870f688ec85678ac490cfc1542cc8d1802a43ec7', class: "track", onPointerDown: this.onTrackInteraction }, this.range ? (index.h(RangeThumb, { rangeValue: this.rangeValueInternal, rawRangePosition: this.rawRangePosition, activeDragThumb: this.activeDragThumb, isDragging: this.isDragging, snap: this.snap, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue })) : (index.h(SingleThumb, { value: this.valueInternal, min: this.min, max: this.max, step: this.step, rawPosition: this.rawPosition, isDragging: this.isDragging, snap: this.snap, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue }))), index.h(TickMarks, { key: '75fb4d22e84ea569928e475e35d0031130f6c6ed', ticks: this.internalTicks, min: this.min, max: this.max })), this.range ? (index.h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 1, inputId: this.endInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : (index.h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name }))), (this.success ||
|
|
708
710
|
this.description ||
|
|
709
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
711
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'b88410b4d04254b66c146b39dc4215f92c42b9b8', class: "description" }, this.success && (index.h("nv-icon", { key: '4b3886cd627e8243d899399c60b85c47ce823170', name: "circle-check", class: "validation", size: "md" })), index.h("slot", { key: 'b262880c747c3f6d1e51b1d4214761d7aecc9f9c', name: "description" }, this.description))), (this.error ||
|
|
710
712
|
this.errorDescription ||
|
|
711
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
713
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'ad5d61a003680c4ff53217bf594dcb4e5fa1b053', class: "error-description", hidden: !this.error }, this.error && (index.h("nv-icon", { key: '3898c1781b38497b3bd797587980ed9fd32c8afc', name: "alert-circle", class: "validation", size: "md" })), index.h("slot", { key: '7fa0cf391cdb113eba7dbcd76a66044fc4d60281', name: "error-description" }, this.errorDescription)))));
|
|
712
714
|
}
|
|
713
715
|
static get formAssociated() { return true; }
|
|
714
716
|
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-BObVnP12.js');
|
|
4
4
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -112,9 +112,9 @@ const NvFieldtext = class {
|
|
|
112
112
|
/****************************************************************************/
|
|
113
113
|
//#region RENDER
|
|
114
114
|
render() {
|
|
115
|
-
return (index.h(index.Host, { key: '
|
|
116
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
117
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
115
|
+
return (index.h(index.Host, { key: '59c03a594971eab5cb8ae4bf7b5342899bba4336' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'a36f03b76cee03be0fe2608fd40a88455818a83b', htmlFor: this.inputId }, index.h("slot", { key: '284a3f6f9efaed1ee7a40675fd377bdbe3d08d9e', name: "label" }, this.label))), index.h("div", { key: '963b853f5de42058d1cdced00c7bdc38f4583000', class: "input-wrapper" }, index.h("slot", { key: 'dce7ea85a9ae76c923ea3dc732d93614b94ba391', name: "before-input" }), index.h("div", { key: 'eac7b8e1d85f9623287f839cdc7ef3133c9c75d8', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: 'db3ab29c4a0767ffc8f8c1368085052769bdc4cc', name: "leading-input" }), index.h("input", { key: 'd4759f1dd7bab6da0a4486cf326cb55c61fcb750', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: this.type, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, autofocus: this.autofocus, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), index.h("slot", { key: 'e8950b2b41ce5e350e39084c3d6936a1a11960e4', name: "trailing-input" }), this.error && (index.h("nv-icon", { key: '83eb974690dfd69858877ba434e4dd30802208c8', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '2b8e37bd41e2b98ae17a249379528dd6e1773e6e', name: "circle-check", class: "validation", size: "md" }))), index.h("slot", { key: '72e5ae030d15c61409095f4067436ee890d21a1e', name: "after-input" })), (this.description ||
|
|
116
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '54a353743334cf7d96597a543d0e2a7c52833a31', class: "description" }, index.h("slot", { key: '70dd9595b638f0dc56db6ecb24a93fcca629a2d3', name: "description" }, this.description))), (this.errorDescription ||
|
|
117
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '47a26240ae8875cedb50b95d0ad41dab762af6d3', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '0c84a7c46128a5c0960b5e2ecfda94f76ef9d7d7', name: "error-description" }, this.errorDescription)))));
|
|
118
118
|
}
|
|
119
119
|
static get formAssociated() { return true; }
|
|
120
120
|
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-BObVnP12.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -182,9 +182,9 @@ const NvFieldtextarea = class {
|
|
|
182
182
|
/****************************************************************************/
|
|
183
183
|
//#region RENDER
|
|
184
184
|
render() {
|
|
185
|
-
return (index.h(index.Host, { key: '
|
|
186
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
187
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
185
|
+
return (index.h(index.Host, { key: '3011ab5796ff80bef57fa31f8c0c3862ea8b2ec9' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '5ce143e110d23ae0812d8e3282c7cfd7013dbf8c', htmlFor: this.inputId }, index.h("slot", { key: 'd2aec99e424f7acef8b6831ce88a094e7b97d5a2', name: "label" }, this.label))), index.h("div", { key: 'd7ca0f0a7002649b62c90a0f414ce951a45fb36f', class: "textarea-wrapper" }, index.h("div", { key: '7052a545876c11736cc851099aeca3d827e23e94', class: "textarea-container", onClick: this.handleTextareaContainerClick }, index.h("textarea", { key: 'efd08cdc7604f7394beb6040c4a4e85fffdd01a5', id: this.inputId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, autofocus: this.autofocus, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, autocomplete: "off", value: this.value, onInput: this.handleTextarea, rows: this.rows, class: clsx297c1ffe.clsx(this.resize === 'none' && 'resize-none', this.resize === 'vertical' && 'resize-y', this.resize === 'horizontal' && 'resize-x', this.resize === 'both' && 'resize') }))), (this.description ||
|
|
186
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '03c0ac2d2a63ac5836ec45b64fa368d7e6462e41', class: "description" }, index.h("slot", { key: 'afe544101550988895f12598adbc13e25d5f221f', name: "description" }, this.description))), (this.errorDescription ||
|
|
187
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '45f08a76bf8abfc53a231d4e8977bbe6ed80b64d', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '4f37c2099badf5ccf9b58bb5ce71292c3b2baae5', name: "error-description" }, this.errorDescription)))));
|
|
188
188
|
}
|
|
189
189
|
static get formAssociated() { return true; }
|
|
190
190
|
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-BObVnP12.js');
|
|
4
4
|
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -385,6 +385,7 @@ const NvFieldtime = class {
|
|
|
385
385
|
if (firstVisibleType && this.inputElements[firstVisibleType]) {
|
|
386
386
|
this.inputElements[firstVisibleType].blur();
|
|
387
387
|
}
|
|
388
|
+
this.open = false;
|
|
388
389
|
}
|
|
389
390
|
}
|
|
390
391
|
//#endregion LISTENERS
|
|
@@ -1059,9 +1060,9 @@ const NvFieldtime = class {
|
|
|
1059
1060
|
}, key: `${option}-${index$1}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
1060
1061
|
}
|
|
1061
1062
|
render() {
|
|
1062
|
-
return (index.h(index.Host, { key: '
|
|
1063
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
1064
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
1063
|
+
return (index.h(index.Host, { key: 'f66fe2a29f23a0bc967821a0c9bca4347b622286', onclick: (e) => this.handleHostClick(e), "aria-expanded": this.open ? 'true' : 'false' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'f01ce1b034b1b547cbdde5814db9357ee1913e04', htmlFor: this.inputId }, index.h("slot", { key: 'd81dcb20883b93280db6e76e0299f679f1f9ed84', name: "label" }, this.label))), index.h("nv-popover", { key: '8c9e83002edcfba89ca4ca282fc82db714ed2f43', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: '3a5b26e4be67f277ead2a9fe2f04e5d12a4bd596', class: "input-wrapper", slot: "trigger" }, index.h("slot", { key: '2ea5f8269c6f0892c53a002a298ca3ceed8f8a00', name: "before-input" }), index.h("div", { key: 'ab97bbbf183118d7b510f82c800b4a3fa1fefda3', class: "input-container" }, index.h("slot", { key: 'a80d2f68b24d4226c18bf0df18ebf13ac6e0873e', name: "leading-input" }), this.renderTimeInputFields(), index.h("nv-iconbutton", { key: '1f7aacf1ab073c0c6ef10b50e948a7ecbca4dd75', name: 'clock', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', onClick: () => this.HandleDropdownIconClick() }), this.error && (index.h("nv-icon", { key: '8f414a3b3daae6f0625b3c62b920621bf8698db3', name: "alert-circle", class: "validation", size: "sm" })), this.success && (index.h("nv-icon", { key: '13b5671664466b6bb50f2561b5cffb96517a1068', name: "circle-check", class: "validation", size: "sm" }))), index.h("slot", { key: 'b5d6085a9864ef84d4113062a0b1cb8a807ab241', name: "after-input" })), index.h("div", { key: '2950c5fac3a0f219e5db2e3a7e9f605d86e50aa2', class: "time-dropdown", slot: "content" }, index.h("div", { key: 'c5b7ff3818a05e1f6d7ca76657f57b85bb595345', class: "time-columns" }, this.renderTimeDropdownColumns()))), (this.description ||
|
|
1064
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'c8cb90fad74721a9b5eb0ab50980f3fd7c587e62', class: "description" }, index.h("slot", { key: '641d1a6a9dbf580267664831d5b371a601afb039', name: "description" }, this.description))), (this.errorDescription ||
|
|
1065
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '5721b81d7a16b626bfa7c3af20897f33b7c37080', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '84cef1043666ab6dd86f70d4ba0054d7f33ca589', name: "error-description" }, this.errorDescription)))));
|
|
1065
1066
|
}
|
|
1066
1067
|
static get formAssociated() { return true; }
|
|
1067
1068
|
get el() { return index.getElement(this); }
|