@nova-design-system/nova-react 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cjs/{constants-98e2dcc2-C0SBCapP.js → constants-b97e736d-BzFAKCkR.js} +11 -0
  2. package/dist/cjs/{index-Byv3Vmev.js → index-Cn-oNJnW.js} +1839 -1420
  3. package/dist/cjs/index.js +1 -1
  4. package/dist/cjs/{nv-alert.entry-BXY4KXbF.js → nv-alert.entry-BFwufSUQ.js} +11 -11
  5. package/dist/cjs/{nv-avatar.entry-BnPSKkJJ.js → nv-avatar.entry-Do1K4s3s.js} +7 -7
  6. package/dist/cjs/nv-badge_2.entry-NTGHyFdg.js +204 -0
  7. package/dist/cjs/{nv-breadcrumb.entry-D5vGHLOG.js → nv-breadcrumb.entry-oPVGJYlk.js} +1 -1
  8. package/dist/cjs/{nv-breadcrumbs.entry-CsaqAsnb.js → nv-breadcrumbs.entry-BsOw153b.js} +1 -1
  9. package/dist/cjs/{nv-button.entry-DzZfGZGy.js → nv-button.entry-13tdBiRr.js} +7 -7
  10. package/dist/cjs/nv-calendar.entry-u9MgGb83.js +1064 -0
  11. package/dist/cjs/{nv-col.entry-Cng8NaTW.js → nv-col.entry-DFhv-GI7.js} +1 -1
  12. package/dist/cjs/{nv-datagrid.entry-BbAOzpiO.js → nv-datagrid.entry-BoB17gvI.js} +377 -40
  13. package/dist/cjs/{nv-datagridcolumn.entry-CRogHbVM.js → nv-datagridcolumn.entry-C3MYBmfS.js} +1 -1
  14. package/dist/cjs/{nv-dialog.entry-BSIZGYGF.js → nv-dialog.entry-OA3qL3Tx.js} +19 -13
  15. package/dist/cjs/{nv-dialogfooter_2.entry-Q4_li_QU.js → nv-dialogfooter_2.entry-LAQYSiGV.js} +3 -3
  16. package/dist/cjs/{nv-fieldcheckbox.entry-DmgzfmRd.js → nv-fieldcheckbox.entry-CP7SDzVO.js} +1 -1
  17. package/dist/cjs/{nv-fielddate.entry-qAvLX_Ru.js → nv-fielddate.entry-CD7PX6yA.js} +9 -18
  18. package/dist/cjs/{nv-fielddaterange.entry-DVB8Rwxk.js → nv-fielddaterange.entry-BVBVGmly.js} +27 -29
  19. package/dist/cjs/{nv-fielddropdown.entry-DKXmoXeW.js → nv-fielddropdown.entry-Nwric1vT.js} +13 -6
  20. package/dist/cjs/{nv-fielddropdownitem.entry-BVLVXi0e.js → nv-fielddropdownitem.entry-CiqSw5VL.js} +2 -2
  21. package/dist/cjs/{nv-fieldmultiselect.entry-DrTbd3Dj.js → nv-fieldmultiselect.entry-QKNIBcW1.js} +11 -5
  22. package/dist/cjs/nv-fieldnumber.entry-DfHcI-sO.js +130 -0
  23. package/dist/cjs/nv-fieldpassword.entry-b2pUmS8F.js +121 -0
  24. package/dist/cjs/{nv-fieldradio.entry-CVEY4v6F.js → nv-fieldradio.entry-Dxc6ZCyb.js} +4 -4
  25. package/dist/cjs/{nv-fieldselect.entry-BrCUuRWa.js → nv-fieldselect.entry-Cys0KRyG.js} +11 -7
  26. package/dist/cjs/nv-fieldtext.entry-DCZWLFFp.js +123 -0
  27. package/dist/cjs/{nv-fieldtextarea.entry-B4qiLmX1.js → nv-fieldtextarea.entry-DEeRdtZ7.js} +9 -5
  28. package/dist/cjs/{nv-fieldtime.entry-Bp2IWjhN.js → nv-fieldtime.entry-BqxiFlLI.js} +71 -68
  29. package/dist/cjs/nv-icon.entry-CzEdUDdA.js +79 -0
  30. package/dist/cjs/{nv-iconbutton_2.entry-BRPAGl2S.js → nv-iconbutton_2.entry-BLNrQz9Q.js} +3 -3
  31. package/dist/cjs/{nv-menu.entry-BiWiIZAm.js → nv-menu.entry-7IDfPmZ8.js} +4 -2
  32. package/dist/cjs/{nv-menuitem.entry-CFkXoZ_r.js → nv-menuitem.entry-B9cjy7O8.js} +2 -2
  33. package/dist/cjs/{nv-popover.entry-KT1iQUJk.js → nv-popover.entry-ChLYZ3zY.js} +2 -2
  34. package/dist/cjs/{nv-row.entry-Cs2GDrcu.js → nv-row.entry-DiLY8Vbc.js} +2 -2
  35. package/dist/cjs/{nv-stack.entry-Ci7pxGSo.js → nv-stack.entry-MpPzmg5_.js} +2 -2
  36. package/dist/cjs/{nv-table.entry-N4MV8Y6E.js → nv-table.entry-cME3Zuq2.js} +3 -3
  37. package/dist/cjs/{nv-tablecolumn.entry-CTz4jsZl.js → nv-tablecolumn.entry-DSctDxCS.js} +1 -1
  38. package/dist/cjs/{nv-toggle.entry-m10-ncYR.js → nv-toggle.entry-EBWm3Xy5.js} +3 -3
  39. package/dist/cjs/{nv-tooltip.entry-B6aRDto3.js → nv-tooltip.entry-q6rJLq1C.js} +2 -2
  40. package/dist/generated/components.js +4 -1
  41. package/dist/types/generated/components.d.ts +14 -7
  42. package/package.json +1 -1
  43. package/dist/cjs/nv-badge_2.entry-BsI3B8Rr.js +0 -195
  44. package/dist/cjs/nv-calendar.entry-CGKv_-gO.js +0 -1065
  45. package/dist/cjs/nv-fieldnumber.entry-DegbEHRL.js +0 -126
  46. package/dist/cjs/nv-fieldpassword.entry-gqjlEl7a.js +0 -117
  47. package/dist/cjs/nv-fieldtext.entry-q9NnqL5c.js +0 -119
  48. package/dist/cjs/nv-icon.entry-B1ax9cJS.js +0 -79
@@ -1,126 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-Byv3Vmev.js');
4
- var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
5
- require('react');
6
-
7
- const nvFieldnumberCss = "nv-fieldnumber {\n --nv-field-border-default: var(--components-form-field-border-default);\n --nv-field-border-hover: var(--components-form-field-border-hover);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--components-form-field-border-default);\n --nv-field-border-readonly: var(--components-form-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-brand);\n --nv-field-background: var(--components-form-field-background-default);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--form-gap-y);\n box-sizing: border-box;\n}\nnv-fieldnumber[readonly]:not([readonly=false]) {\n --nv-field-border-default: var(--components-form-field-border-readonly);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-background: var(--components-form-field-background-readonly);\n}\nnv-fieldnumber[error]:not([error=false]) {\n --nv-field-border-default: var(--components-form-field-border-error);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-destructive);\n}\nnv-fieldnumber[success]:not([success=false]) {\n --nv-field-border-default: var(--components-form-field-border-success);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-success);\n}\nnv-fieldnumber[required]:not([required=false]) label::after {\n content: \"*\";\n color: var(--components-form-text-required);\n font-weight: 700;\n}\nnv-fieldnumber label {\n display: flex;\n align-items: center;\n gap: var(--form-label-gap);\n align-self: stretch;\n color: var(--components-form-text-label-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-label-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-label-line-height);\n}\nnv-fieldnumber .input-wrapper {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\nnv-fieldnumber .input-wrapper .input-container {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default, 1);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n}\nnv-fieldnumber .input-wrapper .input-container:hover {\n border-color: var(--nv-field-border-hover);\n}\nnv-fieldnumber .input-wrapper .input-container:focus-within, nv-fieldnumber .input-wrapper .input-container:focus-within:hover, nv-fieldnumber .input-wrapper .input-container:focus, nv-fieldnumber .input-wrapper .input-container:focus:hover {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:read-only) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-readonly);\n border-color: var(--nv-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:disabled) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n}\nnv-fieldnumber .input-wrapper .input-container input {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n padding: var(--form-field-padding-y) var(--form-field-padding-x);\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height);\n width: 100%;\n appearance: textfield;\n}\nnv-fieldnumber .input-wrapper .input-container input:focus {\n outline: none;\n}\nnv-fieldnumber .input-wrapper .input-container input::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n}\nnv-fieldnumber .input-wrapper .input-container input::-webkit-inner-spin-button, nv-fieldnumber .input-wrapper .input-container input::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n}\nnv-fieldnumber .input-wrapper .input-container nv-icon.validation {\n color: var(--nv-field-border-default);\n margin-right: var(--form-field-gap);\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\n@container field-number-input-container (width < 150px) {\n nv-fieldnumber .input-wrapper .input-container .stepper-spacer {\n display: none;\n }\n nv-fieldnumber .input-wrapper .input-container .stepper {\n display: none;\n }\n}\nnv-fieldnumber .description {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n}\nnv-fieldnumber .error-description {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n color: var(--components-form-text-description-error);\n}";
8
- const NvFieldnumberStyle0 = nvFieldnumberCss;
9
-
10
- const NvFieldnumber = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.valueChanged = index.createEvent(this, "valueChanged");
14
- //#endregion DEPRECATED
15
- /****************************************************************************/
16
- //#region PROPERTIES
17
- /**
18
- * Sets the ID for the input element and the for attribute of the associated
19
- * label. If no ID is provided, a random one will be automatically generated
20
- * to ensure unique identification, facilitating proper label association and
21
- * accessibility.
22
- */
23
- this.inputId = v4A79185f4.v4();
24
- /**
25
- * The disabled prop lets you turn off the input field so that users can’t
26
- * type in it. When disabled, the field is grayed out and won’t respond to#
27
- * clicks or touches.
28
- */
29
- this.disabled = false;
30
- /**
31
- * Display the input field’s content without allowing users to change it.
32
- * Users can still click on it, select, and copy the text, but they won’t be
33
- * able to type or delete anything.
34
- */
35
- this.readonly = false;
36
- /**
37
- * Marks the input field as required, ensuring that the user must fill it out
38
- * before submitting the form.
39
- */
40
- this.required = false;
41
- /**
42
- * Alters the input field’s appearance to indicate an error, helping users
43
- * identify fields that need correction.
44
- * @validator error
45
- */
46
- this.error = false;
47
- /**
48
- * Changes the input field’s appearance to indicate successful input or
49
- * validation.
50
- */
51
- this.success = false;
52
- /**
53
- * Define the increment value for the input field. It determines how much the
54
- * value will increase or decrease when the user clicks the stepper buttons.
55
- */
56
- this.step = 1;
57
- /**
58
- * Applies focus to the input field as soon as the component is mounted. This
59
- * is equivalent to setting the native autofocus attribute on an <input>
60
- * element.
61
- */
62
- this.autofocus = false;
63
- //#endregion WATCHERS
64
- /****************************************************************************/
65
- //#region METHODS
66
- this.handleInput = (event) => {
67
- const input = event.target;
68
- this.value = Number(input.value);
69
- };
70
- this.handleInputContainerClick = () => {
71
- this.inputElement.focus();
72
- };
73
- this.handlePlus = () => {
74
- this.inputElement.stepUp();
75
- this.value = Number(this.inputElement.value);
76
- };
77
- this.handleMinus = () => {
78
- this.inputElement.stepDown();
79
- this.value = Number(this.inputElement.value);
80
- };
81
- // prevents text selection when clicking the buttons multiple times
82
- this.preventSelection = (event) => {
83
- event.preventDefault();
84
- };
85
- this.isMinValueReached = () => {
86
- return this.min !== undefined && this.value <= this.min;
87
- };
88
- this.isMaxValueReached = () => {
89
- return this.max !== undefined && this.value >= this.max;
90
- };
91
- }
92
- //#endregion EVENTS
93
- /****************************************************************************/
94
- //#region WATCHERS
95
- watchValueHandler(newValue) {
96
- this.valueChanged.emit(newValue);
97
- }
98
- //#endregion METHODS
99
- /****************************************************************************/
100
- //#region LIFECYCLE
101
- componentWillRender() {
102
- if (this.message) {
103
- this.description = this.message;
104
- }
105
- if (this.validation) {
106
- this.errorDescription = this.validation;
107
- this.error = true;
108
- }
109
- }
110
- //#endregion LIFECYCLE
111
- /****************************************************************************/
112
- //#region RENDER
113
- render() {
114
- return (index.h(index.Host, { key: 'e054d1e05c0623bf3d5d78c2bafb6d096dbcbd08' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '0743432faff56e8256b2a30fab68ced0592bbf6a', htmlFor: this.inputId }, index.h("slot", { key: '709f68c3f4bf6ade475cd6afbee5c9912c782c43', name: "label" }, this.label))), index.h("div", { key: '5798b0faf23bc671aeda3273dcfff7c1d1ca4109', class: "input-wrapper" }, index.h("slot", { key: '47b9f0ef000d2d98e2e3ad1c1f4191ce91c69266', name: "before-input" }), index.h("div", { key: '082d2ab64b892cc994955b723d1ab342414061fb', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '34511207a7ebc1cc5fe8cc91d05f4fa549fda316', name: "leading-input" }), index.h("input", { key: '20f96b319b6e7528d738bdc31152649575409dd1', 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: this.value, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), this.error && (index.h("nv-icon", { key: '2b05afbbc94bd39dd82a270511e4372536ee80ba', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '95d74e6298e49d422b19bf080d3e2de25c2ad8e2', name: "circle-check", class: "validation", size: "md" })), index.h("div", { key: '5c665de10e9650003b127997cd6010e35d7d0b7a', class: "stepper" }, index.h("nv-iconbutton", { key: '9702ee4778623862e67d29a56f7790af364786bf', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), index.h("nv-iconbutton", { key: '20fc509c42230f6768d98e4144db12afae3649ef', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), index.h("slot", { key: 'd432d4e6fb8c4fd67c6c972b5c967e093cadfe68', name: "after-input" })), (this.description ||
115
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'e1d585c32f4cff50d84f5d1b6696856c8c875ef7', class: "description" }, index.h("slot", { key: '860b5fb8ba3e24fc728021b238b371178ae54ead', name: "description" }, this.description))), (this.errorDescription ||
116
- this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'aaa707753b98415ca4e329fab9b45bfc3b42525a', hidden: !this.error, class: "error-description" }, index.h("slot", { key: 'f8c0910451550baa82663500a7c0339064720428', name: "error-description" }, this.errorDescription)))));
117
- }
118
- static get formAssociated() { return true; }
119
- get el() { return index.getElement(this); }
120
- static get watchers() { return {
121
- "value": ["watchValueHandler"]
122
- }; }
123
- };
124
- NvFieldnumber.style = NvFieldnumberStyle0;
125
-
126
- exports.nv_fieldnumber = NvFieldnumber;
@@ -1,117 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-Byv3Vmev.js');
4
- var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
5
- require('react');
6
-
7
- const nvFieldpasswordCss = "nv-fieldpassword{--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}nv-fieldpassword[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-fieldpassword[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)}nv-fieldpassword[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-fieldpassword[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldpassword label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldpassword .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldpassword .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;position:relative}nv-fieldpassword .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldpassword .input-wrapper .input-container:focus-within,nv-fieldpassword .input-wrapper .input-container:focus-within:hover,nv-fieldpassword .input-wrapper .input-container:focus,nv-fieldpassword .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-fieldpassword .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldpassword .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-fieldpassword .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:500;line-height:var(--form-field-line-height)}nv-fieldpassword .input-wrapper .input-container input:focus{outline:none}nv-fieldpassword .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldpassword .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldpassword .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldpassword .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", 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)}";
8
- const NvFieldpasswordStyle0 = nvFieldpasswordCss;
9
-
10
- const NvFieldpassword = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.valueChanged = index.createEvent(this, "valueChanged");
14
- /****************************************************************************/
15
- //#region PROPERTIES
16
- /**
17
- * Sets the ID for the input element and the for attribute of the associated
18
- * label. If no ID is provided, a random one will be automatically generated
19
- * to ensure unique identification, facilitating proper label association and
20
- * accessibility.
21
- */
22
- this.inputId = v4A79185f4.v4();
23
- /**
24
- * The disabled prop lets you turn off the input field so that users can’t
25
- * type in it. When disabled, the field is grayed out and won’t respond to#
26
- * clicks or touches.
27
- */
28
- this.disabled = false;
29
- /**
30
- * Display the input field’s content without allowing users to change it.
31
- * Users can still click on it, select, and copy the text, but they won’t be
32
- * able to type or delete anything.
33
- */
34
- this.readonly = false;
35
- /**
36
- * Marks the input field as required, ensuring that the user must fill it out
37
- * before submitting the form.
38
- */
39
- this.required = false;
40
- /**
41
- * Alters the input field’s appearance to indicate an error, helping users
42
- * identify fields that need correction.
43
- * @validator error
44
- */
45
- this.error = false;
46
- /**
47
- * Changes the input field’s appearance to indicate successful input or
48
- * validation.
49
- */
50
- this.success = false;
51
- /**
52
- * Defines the type of the input.
53
- * @default 'text'
54
- */
55
- this.mode = 'text';
56
- /**
57
- * The autocomplete prop helps users fill out the input field faster by
58
- * suggesting entries they’ve used before, like their email or address.
59
- * You can turn it on to make forms more convenient or off to ensure users
60
- * always type in fresh data.
61
- */
62
- this.autocomplete = 'off';
63
- /**
64
- * Hide the button to show/hide the password.
65
- */
66
- this.hidePasswordIcon = false;
67
- /**
68
- * Show/hide the password programmatically.
69
- */
70
- this.showPassword = false;
71
- /**
72
- * Applies focus to the input field as soon as the component is mounted. This
73
- * is equivalent to setting the native autofocus attribute on an <input>
74
- * element.
75
- */
76
- this.autofocus = false;
77
- //#endregion EVENTS
78
- /****************************************************************************/
79
- //#region METHODS
80
- this.handleInputContainerClick = () => {
81
- this.inputElement.focus();
82
- };
83
- this.togglePasswordVisibility = () => {
84
- this.showPasswordState = !this.showPasswordState;
85
- };
86
- this.handleInput = (event) => {
87
- const input = event.target;
88
- this.value = input.value; // Update the input value without worrying about the space
89
- this.valueChanged.emit(input.value);
90
- };
91
- }
92
- handleShowPasswordChange(newValue) {
93
- this.showPasswordState = newValue;
94
- }
95
- //#endregion METHODS
96
- /****************************************************************************/
97
- //#region LIFECYCLE
98
- componentWillLoad() {
99
- this.showPasswordState = this.showPassword;
100
- }
101
- //#endregion LIFECYCLE
102
- /****************************************************************************/
103
- //#region RENDER
104
- render() {
105
- return (index.h(index.Host, { key: '4a6de90f24bd6607293d616d60f6d742c46b04a9' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '715f5935de3aa0f0f7b6aa9aa72c409a3875a849', htmlFor: this.inputId }, index.h("slot", { key: 'da11187833b12acfae578024bb67d717efbafaa1', name: "label" }, this.label))), index.h("div", { key: 'a669823e6c5aea5b4e0aacf0bfc1c8f7dbe67bab', class: "input-wrapper" }, index.h("slot", { key: '98b2b6eaaa867228a667bec2920c640ff0b829c7', name: "before-input" }), index.h("div", { key: 'fc896f9018563e80ea0f2aa1e2eb7992fd4a854c', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '715814e77d1ba40463253d12751129f2c0d05407', name: "leading-input" }), index.h("input", { key: '8101af836f80da56ac9e2b859ab9fd5b6d254b91', 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: 'fdf5caa936a43961bd3f00f5d50635124b57ff0b', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (index.h("nv-iconbutton", { key: '9b9e70d855fca2ea1ff2769609af05fc7d3fd1c2', 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: '4458e83104562509b53b05faf3a316a5502b76b7', name: "after-input" })), (this.description ||
106
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '91dcddd8a80abccaaffda9cd583759bebf376456', class: "description" }, index.h("slot", { key: 'fe6da6eb725b3866faf138e848f89152f0f24a00', name: "description" }, this.description))), (this.errorDescription ||
107
- this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'bfe57a6b0f199c3b371a2036a7b8787f40f639a4', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '529e34f2197c64ac768df11251bb285fec1f2cd5', name: "error-description" }, this.errorDescription)))));
108
- }
109
- static get formAssociated() { return true; }
110
- get el() { return index.getElement(this); }
111
- static get watchers() { return {
112
- "showPassword": ["handleShowPasswordChange"]
113
- }; }
114
- };
115
- NvFieldpassword.style = NvFieldpasswordStyle0;
116
-
117
- exports.nv_fieldpassword = NvFieldpassword;
@@ -1,119 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-Byv3Vmev.js');
4
- var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
5
- require('react');
6
-
7
- const nvFieldtextCss = "nv-fieldtext{--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}nv-fieldtext[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-fieldtext[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)}nv-fieldtext[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-fieldtext[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldtext>label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldtext>.input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldtext>.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-fieldtext>.input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtext>.input-wrapper .input-container:focus-within,nv-fieldtext>.input-wrapper .input-container:focus-within:hover,nv-fieldtext>.input-wrapper .input-container:focus,nv-fieldtext>.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-fieldtext>.input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtext>.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-fieldtext>.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:500;line-height:var(--form-field-line-height)}nv-fieldtext>.input-wrapper .input-container input:focus{outline:none}nv-fieldtext>.input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldtext>.input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default);margin-right:var(--form-gap-x)}nv-fieldtext>.description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtext>.error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", 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)}";
8
- const NvFieldtextStyle0 = nvFieldtextCss;
9
-
10
- const NvFieldtext = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.valueChanged = index.createEvent(this, "valueChanged");
14
- //#endregion DEPRECATED
15
- /****************************************************************************/
16
- //#region PROPERTIES
17
- /**
18
- * Sets the ID for the input element and the for attribute of the associated
19
- * label. If no ID is provided, a random one will be automatically generated
20
- * to ensure unique identification, facilitating proper label association and
21
- * accessibility.
22
- */
23
- this.inputId = v4A79185f4.v4();
24
- /**
25
- * The type prop lets you specify what kind of information the input field
26
- * should accept. Choose 'text' for general words or sentences, 'tel' for
27
- * phone numbers, or 'email' for email addresses. This makes sure users get
28
- * the right keyboard and validation for what they need to enter.
29
- */
30
- this.type = 'text';
31
- /**
32
- * The disabled prop lets you turn off the input field so that users can’t
33
- * type in it. When disabled, the field is grayed out and won’t respond to
34
- * clicks or touches.
35
- */
36
- this.disabled = false;
37
- /**
38
- * Display the input field’s content without allowing users to change it.
39
- * Users can still click on it, select, and copy the text, but they won’t be
40
- * able to type or delete anything.
41
- */
42
- this.readonly = false;
43
- /**
44
- * Marks the input field as required, ensuring that the user must fill it out
45
- * before submitting the form.
46
- */
47
- this.required = false;
48
- /**
49
- * Alters the input field’s appearance to indicate an error, helping users
50
- * identify fields that need correction.
51
- * @validator error
52
- */
53
- this.error = false;
54
- /**
55
- * Changes the input field’s appearance to indicate successful input or
56
- * validation.
57
- */
58
- this.success = false;
59
- /**
60
- * When used with the email input type, this prop enables the field to accept
61
- * multiple email addresses. Users can enter several addresses, separating
62
- * each one with a comma, allowing the form to handle multiple recipients.
63
- */
64
- this.multiple = false;
65
- /**
66
- * Applies focus to the input field as soon as the component is mounted. This
67
- * is equivalent to setting the native autofocus attribute on an <input>
68
- * element.
69
- */
70
- this.autofocus = false;
71
- //#endregion EVENTS
72
- /****************************************************************************/
73
- //#region METHODS
74
- /**
75
- * Handles the input event on the input element.
76
- * Emits the inputChanged event with the new value.
77
- * @param {Event} event - Event object of the input event.
78
- */
79
- this.handleInput = (event) => {
80
- const input = event.target;
81
- this.value = input.value;
82
- this.valueChanged.emit(input.value);
83
- };
84
- /**
85
- * Handles focus when the input container is clicked.
86
- */
87
- this.handleInputContainerClick = () => {
88
- this.inputElement.focus();
89
- };
90
- }
91
- //#endregion METHODS
92
- /****************************************************************************/
93
- //#region LIFECYCLE
94
- componentWillRender() {
95
- if (this.textInputType) {
96
- this.type = this.textInputType;
97
- }
98
- if (this.message) {
99
- this.description = this.message;
100
- }
101
- if (this.validation) {
102
- this.errorDescription = this.validation;
103
- this.error = true;
104
- }
105
- }
106
- //#endregion LIFECYCLE
107
- /****************************************************************************/
108
- //#region RENDER
109
- render() {
110
- return (index.h(index.Host, { key: 'e4891525becd4b0757ec380d45d9694ebc6c3318' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '1157e609be8150d014e9190dcf53f74bcee20119', htmlFor: this.inputId }, index.h("slot", { key: '888fb12e994f6f4f47bc2be496cd74aeedb628c0', name: "label" }, this.label))), index.h("div", { key: '0555b12dbbe5fa81f5af464d3b48c35b243aec32', class: "input-wrapper" }, index.h("slot", { key: '5210a9b903c560775453741d8815286dbe8bbb53', name: "before-input" }), index.h("div", { key: '7bc11232dfa46706982bf3645054a7a1f67832f9', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '87abc6976b432a3dc51246c97564108f9baccff8', name: "leading-input" }), index.h("input", { key: 'b0c3e30bc5363f6b49ea1361005e125826184016', 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 }), this.error && (index.h("nv-icon", { key: '5e359bc40906bbf2c63eb7d196dd8294b15dd672', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '4812b31e512bf388fa84f9d35a949de5f9b86d59', name: "circle-check", class: "validation", size: "md" }))), index.h("slot", { key: '06922c63f02470be6c74ee6ba4bf93baabd03e57', name: "after-input" })), (this.description ||
111
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '960bcb53a55aed3e1b8cd1b193ad26f5c6b151fd', class: "description" }, index.h("slot", { key: '07c09b8543e9b91928821a100869943de94a65a7', name: "description" }, this.description))), (this.errorDescription ||
112
- this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '456d00a47f01f70938d99faa774da1a9e51b036d', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '590aef8c37efd2fa472c9b7b92fd82d29c4e6d39', name: "error-description" }, this.errorDescription)))));
113
- }
114
- static get formAssociated() { return true; }
115
- get el() { return index.getElement(this); }
116
- };
117
- NvFieldtext.style = NvFieldtextStyle0;
118
-
119
- exports.nv_fieldtext = NvFieldtext;