@nova-design-system/nova-react 3.25.0 → 3.26.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/generated/components.server.js +2 -1
- package/dist/cjs/{index-DUlunl9a.js → index-BeFrXZol.js} +258 -255
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{nv-accordion-item.entry-CqnjIt4R.js → nv-accordion-item.entry-DtzjLTCo.js} +1 -1
- package/dist/cjs/{nv-accordion.entry-Dx7FmGg_.js → nv-accordion.entry-DRcTfezT.js} +1 -1
- package/dist/cjs/{nv-alert.entry-BL3Pdcxd.js → nv-alert.entry-86bfoXVx.js} +1 -1
- package/dist/cjs/{nv-avatar.entry-2dFR4I9_.js → nv-avatar.entry-mp2LJ6RA.js} +1 -1
- package/dist/cjs/{nv-badge_2.entry-5FShR2Ax.js → nv-badge_2.entry-BrDaHeqh.js} +6 -4
- package/dist/cjs/{nv-breadcrumb.entry-Cfi32bBT.js → nv-breadcrumb.entry-B2q7jJy2.js} +2 -2
- package/dist/cjs/{nv-breadcrumbs.entry-BSgn3KUO.js → nv-breadcrumbs.entry-DKzST1uS.js} +2 -2
- package/dist/cjs/{nv-button.entry-BdQQ_LE7.js → nv-button.entry-CVgcU-bi.js} +2 -2
- package/dist/cjs/{nv-buttongroup.entry-BM8CwXFK.js → nv-buttongroup.entry-CvuBGaGK.js} +3 -3
- package/dist/cjs/{nv-calendar.entry-CeKsMGOa.js → nv-calendar.entry-BCcGhxzJ.js} +3 -12
- package/dist/cjs/{nv-col.entry-D-h2PGcz.js → nv-col.entry-CzTahRVr.js} +2 -2
- package/dist/cjs/{nv-datagrid.entry-nOBIfqOS.js → nv-datagrid.entry-DWZxNqTE.js} +3 -3
- package/dist/cjs/{nv-datagridcolumn.entry-BAzTU_KM.js → nv-datagridcolumn.entry-CzCzmdQl.js} +2 -2
- package/dist/cjs/{nv-dialog.entry-Bi2ZVSe2.js → nv-dialog.entry-ByVD02QB.js} +2 -2
- package/dist/cjs/{nv-dialogfooter_2.entry-D6lzC-3S.js → nv-dialogfooter_2.entry-BmQcYJsD.js} +3 -3
- package/dist/cjs/{nv-drawer.entry-Dp4AfBiF.js → nv-drawer.entry-C15JRJ3N.js} +2 -2
- package/dist/cjs/{nv-drawerfooter_2.entry-DpWSsq6d.js → nv-drawerfooter_2.entry-DuDac_Os.js} +3 -3
- package/dist/cjs/{nv-fieldcheckbox.entry-COA3LXnX.js → nv-fieldcheckbox.entry-CwDOQzSW.js} +6 -6
- package/dist/cjs/{nv-fielddate.entry-B8r5RFXd.js → nv-fielddate.entry-DKICGwc0.js} +7 -7
- package/dist/cjs/{nv-fielddaterange.entry-C6_Kq93P.js → nv-fielddaterange.entry-DGEK8F9p.js} +7 -8
- package/dist/cjs/{nv-fielddropdown.entry-B2Dr5zHd.js → nv-fielddropdown.entry-BLS7lRzD.js} +21 -21
- package/dist/cjs/{nv-fielddropdownitem.entry-DapivVnR.js → nv-fielddropdownitem.entry-Bbfi3A8C.js} +2 -2
- package/dist/cjs/{nv-fieldmultiselect.entry-DSpQeiPx.js → nv-fieldmultiselect.entry-Cpy7HzlZ.js} +17 -17
- package/dist/cjs/{nv-fieldnumber.entry-BwxR9sRr.js → nv-fieldnumber.entry-SbNb4hKr.js} +5 -5
- package/dist/cjs/{nv-fieldpassword.entry-BOSU-Skh.js → nv-fieldpassword.entry-CPsgagjY.js} +5 -5
- package/dist/cjs/nv-fieldradio.entry-DLP-rmKU.js +105 -0
- package/dist/cjs/{nv-fieldselect.entry-CfWjQAd9.js → nv-fieldselect.entry-DOOO03kM.js} +6 -6
- package/dist/cjs/{nv-fieldslider.entry-dDPcWUxs.js → nv-fieldslider.entry-CpVbxkpo.js} +4 -4
- package/dist/cjs/{nv-fieldtext.entry-Yaa-mkjJ.js → nv-fieldtext.entry-BpbG4WHv.js} +5 -5
- package/dist/cjs/{nv-fieldtextarea.entry-Dp_l2pKZ.js → nv-fieldtextarea.entry-BA_RApYN.js} +31 -29
- package/dist/cjs/{nv-fieldtime.entry-CWxi4Uel.js → nv-fieldtime.entry-DaJfwQtC.js} +4 -4
- package/dist/cjs/{nv-icon.entry-Dci11W9S.js → nv-icon.entry-DIi792yJ.js} +2 -2
- package/dist/cjs/{nv-iconbutton_2.entry-A6FKFJT_.js → nv-iconbutton_2.entry-B4xB5WtE.js} +3 -3
- package/dist/cjs/{nv-menu.entry-BHaYP-9M.js → nv-menu.entry-DHWhkWeB.js} +2 -2
- package/dist/cjs/{nv-menuitem.entry-Cm1vvN25.js → nv-menuitem.entry-CQApuT2D.js} +2 -2
- package/dist/cjs/{nv-notification-bullet.entry-DRlS3Ybc.js → nv-notification-bullet.entry-CnYVWE_Z.js} +1 -1
- package/dist/cjs/{nv-notification.entry-BeDmR-XC.js → nv-notification.entry-DraOvzsu.js} +2 -2
- package/dist/cjs/{nv-notificationcontainer.entry-C3p_87Dg.js → nv-notificationcontainer.entry-BDo-rQLL.js} +2 -2
- package/dist/cjs/{nv-paginationtable.entry-BzEqQOBa.js → nv-paginationtable.entry-CS7BhAVe.js} +2 -2
- package/dist/cjs/{nv-popover.entry-D2oFn9vL.js → nv-popover.entry-DSyKCLtF.js} +2 -2
- package/dist/cjs/{nv-row.entry-hV1kxmrr.js → nv-row.entry-D21zN2Vr.js} +2 -2
- package/dist/cjs/{nv-sidebar.entry-BJrqJ8K7.js → nv-sidebar.entry-DpKgnjsJ.js} +2 -2
- package/dist/cjs/{nv-sidebarcontent.entry-CPfGF7nx.js → nv-sidebarcontent.entry-BWFDcui8.js} +2 -2
- package/dist/cjs/{nv-sidebardivider.entry-D2wmzHCO.js → nv-sidebardivider.entry-BSzLq-h3.js} +2 -2
- package/dist/cjs/{nv-sidebarfooter.entry-C7fqCzjH.js → nv-sidebarfooter.entry-C3DLHPSQ.js} +2 -2
- package/dist/cjs/{nv-sidebargroup.entry-qkXnxhs_.js → nv-sidebargroup.entry-BMYLbCql.js} +2 -2
- package/dist/cjs/{nv-sidebarheader.entry-DBsOmyQ0.js → nv-sidebarheader.entry-CkUGD-Tw.js} +2 -2
- package/dist/cjs/{nv-sidebarlogo.entry-902Ht3UR.js → nv-sidebarlogo.entry-BX1-1S1v.js} +2 -2
- package/dist/cjs/{nv-sidebarnavitem.entry-CICrllp8.js → nv-sidebarnavitem.entry-CPwt0Njh.js} +3 -3
- package/dist/cjs/{nv-sidebarnavsubitem.entry-Q9jjU_7D.js → nv-sidebarnavsubitem.entry-HZOTB6Tl.js} +2 -2
- package/dist/cjs/{nv-split.entry-BYIsE2wp.js → nv-split.entry-DdtzktvN.js} +2 -2
- package/dist/cjs/{nv-stack.entry-DgE5ASGH.js → nv-stack.entry-BMLt30Nt.js} +2 -2
- package/dist/cjs/{nv-table.entry-DHXBu2n1.js → nv-table.entry-RTiqKRKM.js} +4 -2
- package/dist/cjs/{nv-tableheader.entry-BijgOxcO.js → nv-tableheader.entry-Ci4qo8eY.js} +2 -2
- package/dist/cjs/nv-toggle.entry-s8B7-8P7.js +82 -0
- package/dist/cjs/{nv-togglebutton.entry-DAPETEmF.js → nv-togglebutton.entry-CyHgU4Wl.js} +2 -2
- package/dist/cjs/{nv-togglebuttongroup.entry-CzDI1XCr.js → nv-togglebuttongroup.entry-Bn_9DsdP.js} +2 -2
- package/dist/cjs/{nv-tooltip.entry-DPoUP9iL.js → nv-tooltip.entry-D6kxXLO-.js} +3 -3
- package/dist/generated/components.server.js +2 -1
- package/dist/providers/NotificationProvider.js +9 -8
- package/dist/types/components/NvDatatable/types.d.ts +1 -0
- package/package.json +7 -4
- package/dist/cjs/nv-fieldradio.entry-ZFafNY5_.js +0 -105
- package/dist/cjs/nv-toggle.entry-CMI1WdvV.js +0 -82
- /package/dist/cjs/{i18n.utils-IlwlcG9l-ku0bScip.js → i18n.utils-CR9MpYzU-ku0bScip.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BeFrXZol.js');
|
|
4
4
|
var inputmaskCSo292ul = require('./inputmask-CSo292ul-DlvupPk6.js');
|
|
5
5
|
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
6
6
|
require('@stencil/react-output-target/runtime');
|
|
@@ -404,15 +404,15 @@ const NvFielddate = class {
|
|
|
404
404
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
405
405
|
: undefined;
|
|
406
406
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
407
|
-
return (index.h(index.Host, { key: '
|
|
408
|
-
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '
|
|
407
|
+
return (index.h(index.Host, { key: '3c13437365ba5c194e382050d83a01c2610f901d' }, ((this.label && this.label.length > 0) ||
|
|
408
|
+
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '82bccae1ff2044e8b099789e4403857772f8449c', htmlFor: this.inputId }, index.h("slot", { key: '3a2065e072ba6acb2ca5a162b877d05d30f93815', name: "label" }, this.label))), index.h("nv-popover", { key: 'afd5fc8f78a46562b318f2f2d48306efa2275fac', ref: this.setPopoverRef, id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: '748395cd864e8ee8f224460a420379b9f8ea362e', slot: "trigger", class: "input-wrapper" }, index.h("slot", { key: '8c1f2baa6a33861d83c9497ee39a6a2a08b27d2e', name: "before-input" }), index.h("div", { key: '91dfd2e870fc59e0949ff1ae2b66e0a3c89ec203', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '7e7a11aacf727512ccbf4c5fd149f9ccbf161c0d', name: "leading-input" }), index.h("input", { key: '47b9d83bb4942604c3e8244995d032743ad84e78', id: this.inputId, ref: this.setInputRef, placeholder: this.placeholder ||
|
|
409
409
|
this.convertToInputmaskFormat(this.dateFormat), name: this.name, disabled: this.disabled, readOnly: this.readonly, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
410
410
|
'aria-required': String(ariaRequiredValue),
|
|
411
|
-
}), autofocus: this.autofocus, onInput: this.handleInput, onFocus: this.handleFocus, "data-scope": "date" }), this.error && (index.h("nv-icon", { key: '
|
|
411
|
+
}), autofocus: this.autofocus, onInput: this.handleInput, onFocus: this.handleFocus, "data-scope": "date" }), this.error && (index.h("nv-icon", { key: '0c8badb4887475f3ce278db7dd1bb9d4f4db1948', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '908c9595d2858b5915ea9625b365d98c9076175d', name: "circle-check", class: "validation", size: "md" })), index.h("nv-iconbutton", { key: '2acbfe40a0db4b070491e91fa69b9a21fee5111d', class: "toggle-calendar-icon", name: "calendar" //{this.open ? 'chevron-top' : 'chevron-down'}
|
|
412
412
|
,
|
|
413
|
-
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: '
|
|
414
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
415
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
413
|
+
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: 'fb9ae11ed575835053e11a28136c545fefa1f185', name: "after-input" })), index.h("div", { key: '4ed455b92288d64e1d243e0d2268251f183523c9', slot: "content" }, index.h("nv-calendar", { key: '1af9d63edd9c95414ddcba5e3988a1bf42fae4bb', 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) ||
|
|
414
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '3a124e7dd1d5216ac586893eb2d7ae8383051cdc', class: "description" }, index.h("slot", { key: '13f0b8e29875e369734799370fbd54c27becebfb', name: "description" }, this.description))), (this.errorDescription ||
|
|
415
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '78dbbd76ada0c99907c9725fc82f2edfea41830c', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (index.h("slot", { name: "error-description" })) : (this.errorDescription))), index.h("slot", { key: '2c7f702581d6645cb9e6e0e94effa2ea067f049a' })));
|
|
416
416
|
}
|
|
417
417
|
get el() { return index.getElement(this); }
|
|
418
418
|
static get watchers() { return {
|
package/dist/cjs/{nv-fielddaterange.entry-C6_Kq93P.js → nv-fielddaterange.entry-DGEK8F9p.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BeFrXZol.js');
|
|
4
4
|
var inputmaskCSo292ul = require('./inputmask-CSo292ul-DlvupPk6.js');
|
|
5
5
|
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
6
6
|
require('@stencil/react-output-target/runtime');
|
|
@@ -65,7 +65,6 @@ const NvFielddaterange = class {
|
|
|
65
65
|
/**
|
|
66
66
|
* The initial value of the date range (in string format).
|
|
67
67
|
*/
|
|
68
|
-
// eslint-disable-next-line @stencil-community/strict-mutable
|
|
69
68
|
this.value = '';
|
|
70
69
|
/**
|
|
71
70
|
* The current value of the start date in string format.
|
|
@@ -562,16 +561,16 @@ const NvFielddaterange = class {
|
|
|
562
561
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
563
562
|
: undefined;
|
|
564
563
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
565
|
-
return (index.h(index.Host, { key: '
|
|
566
|
-
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '
|
|
564
|
+
return (index.h(index.Host, { key: 'ff398fcfbbe95e5665b774fe43350acbbc348fe9' }, ((this.label && this.label.length > 0) ||
|
|
565
|
+
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '2b1909b93047611192bb66f574bdda3b206e2385', htmlFor: this.startInputId }, index.h("slot", { key: '8195acf71bec4897fca7c4617eb0de096e88b191', name: "label" }, this.label))), index.h("nv-popover", { key: 'ba36048cf5a34974f4f4deb66fb0d735988e5b53', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: '14b6d78ac81001bd174bad38172a8a1a1f347731', slot: "trigger", class: "input-wrapper" }, index.h("slot", { key: 'fb016c89c6f8f99ae3c67917fc623bd5ebfd55fc', name: "before-input" }), index.h("div", { key: 'ba782a5e283e468467ccdb9b571046cd2f4852e9', class: "input-container" }, index.h("slot", { key: '2adfa150e03b07b3fc68dcf58e8033b7945161a0', name: "leading-input" }), index.h("div", { key: '0276764deeb85f4211ac741f3eb5fef2f9fbcb43', class: "range-inputs" }, index.h("input", { key: 'b752bb09fefcd173403cb11db40d0aabd25e1388', id: this.startInputId, type: "text", placeholder: this.startPlaceholder ||
|
|
567
566
|
this.convertToInputmaskFormat(this.dateFormat), name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
568
567
|
'aria-required': String(ariaRequiredValue),
|
|
569
|
-
}), autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), index.h("div", { key: '
|
|
568
|
+
}), autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), index.h("div", { key: 'd5be46903d09c3b189dc4e7ee8ddad170c0f6286', class: "range-separator" }), index.h("input", { key: '11b9a3838149854e68ae7c9d96aedbaaba84a90d', id: this.endInputId, type: "text", placeholder: this.endPlaceholder ||
|
|
570
569
|
this.convertToInputmaskFormat(this.dateFormat), name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
571
570
|
'aria-required': String(ariaRequiredValue),
|
|
572
|
-
}), value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (index.h("nv-icon", { key: '
|
|
573
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
574
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
571
|
+
}), value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (index.h("nv-icon", { key: '26b42abdeafd75930a5ca607d24337b6b3c10ac2', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '1af99ccf21b9f8089204e9e97c2453b2bdeffd29', name: "circle-check", class: "validation", size: "md" })), index.h("nv-iconbutton", { key: '38b70d2b9f4ec16ff1707dc2b05ceae806646541', class: "toggle-calendar-icon", name: "calendar", size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: '2ab6a03f44f04595763f4a6cbb8bc142578e1b3a', name: "after-input" })), index.h("div", { key: '1fc0213d712a8560dee995c4d26c7d9944af650b', slot: "content" }, index.h("nv-calendar", { key: 'd883272405391bec569516321fd2eae93dac817a', ref: el => (this.calendarElement = el), onRangeDateChange: this.handleRangeDateChange.bind(this), onValueChanged: this.handleCalendarValueChanged.bind(this), onSingleDateChange: this.handleCancelDateChange.bind(this), dateFormat: this.dateFormat, value: this.value, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, selectionType: "range", "data-prevent-navigation": "true" }))), ((this.description && this.description.length > 0) ||
|
|
572
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'd0f9852ccd37202db9653b338cf850ba44365ddf', class: "description" }, index.h("slot", { key: 'cff092ce15f1f90f246de859fea30d3714fd4520', name: "description" }, this.description))), (this.errorDescription ||
|
|
573
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'c9dfd25d6784cca037337e7ffe28fc4ac1d33fd5', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (index.h("slot", { name: "error-description" })) : (this.errorDescription))), index.h("slot", { key: '8123f07bf03ae219917f2e9f8146142bd8781bd4' })));
|
|
575
574
|
}
|
|
576
575
|
get el() { return index.getElement(this); }
|
|
577
576
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-BeFrXZol.js');
|
|
4
|
+
var i18n_utilsCR9MpYzU = require('./i18n.utils-CR9MpYzU-ku0bScip.js');
|
|
5
5
|
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
6
6
|
require('@stencil/react-output-target/runtime');
|
|
7
7
|
require('react');
|
|
@@ -186,7 +186,7 @@ const NvFielddropdown = class {
|
|
|
186
186
|
// Use longer debounce for fuzzy mode (Fuse.js needs more time)
|
|
187
187
|
// For fuzzy mode, use FUZZY_DEBOUNCE_DELAY (300ms), otherwise use this.debounceDelay
|
|
188
188
|
const debounce = this.effectiveFilterMode === 'fuzzy'
|
|
189
|
-
?
|
|
189
|
+
? i18n_utilsCR9MpYzU.FUZZY_DEBOUNCE_DELAY
|
|
190
190
|
: this.debounceDelay;
|
|
191
191
|
this.debounceTimer = window.setTimeout(() => {
|
|
192
192
|
this.filterItems();
|
|
@@ -392,13 +392,13 @@ const NvFielddropdown = class {
|
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
// Build local index for main-thread search
|
|
395
|
-
this.indexedItems =
|
|
395
|
+
this.indexedItems = i18n_utilsCR9MpYzU.buildIndex(this.rawItems);
|
|
396
396
|
// Determine effective filter mode
|
|
397
|
-
this.effectiveFilterMode =
|
|
397
|
+
this.effectiveFilterMode = i18n_utilsCR9MpYzU.getEffectiveFilterMode(this.filterMode);
|
|
398
398
|
// Initialize worker if needed
|
|
399
399
|
const itemCount = this.rawItems.length;
|
|
400
|
-
const threshold =
|
|
401
|
-
if (
|
|
400
|
+
const threshold = i18n_utilsCR9MpYzU.clampWorkerThreshold(this.workerThreshold);
|
|
401
|
+
if (i18n_utilsCR9MpYzU.shouldUseWorker(itemCount, this.effectiveFilterMode, threshold)) {
|
|
402
402
|
await this.initWorker();
|
|
403
403
|
}
|
|
404
404
|
else {
|
|
@@ -412,12 +412,12 @@ const NvFielddropdown = class {
|
|
|
412
412
|
* Note: Fuzzy search now works on main thread with Fuse.js, so no mode change needed.
|
|
413
413
|
*/
|
|
414
414
|
async initWorker() {
|
|
415
|
-
if (!
|
|
415
|
+
if (!i18n_utilsCR9MpYzU.isWorkerSupported()) {
|
|
416
416
|
// Workers not supported - will use main thread (fuzzy still works with Fuse.js)
|
|
417
417
|
return;
|
|
418
418
|
}
|
|
419
419
|
if (!this.workerClient) {
|
|
420
|
-
this.workerClient = new
|
|
420
|
+
this.workerClient = new i18n_utilsCR9MpYzU.SearchWorkerClient();
|
|
421
421
|
// No fallback mode change needed - fuzzy works on main thread now
|
|
422
422
|
}
|
|
423
423
|
// Init will silently handle fallback if worker can't be created
|
|
@@ -452,7 +452,7 @@ const NvFielddropdown = class {
|
|
|
452
452
|
// Check if we should start filtering
|
|
453
453
|
if (this.filterText.length < this.startFilterAt) {
|
|
454
454
|
// Show all items up to maxResults
|
|
455
|
-
const effectiveMaxResults =
|
|
455
|
+
const effectiveMaxResults = i18n_utilsCR9MpYzU.clampMaxResults(this.maxResults);
|
|
456
456
|
let visibleCount = 0;
|
|
457
457
|
items.forEach(item => {
|
|
458
458
|
if (visibleCount < effectiveMaxResults) {
|
|
@@ -472,8 +472,8 @@ const NvFielddropdown = class {
|
|
|
472
472
|
}
|
|
473
473
|
// Determine if we should use worker
|
|
474
474
|
const itemCount = this.rawItems.length;
|
|
475
|
-
const threshold =
|
|
476
|
-
const useWorker =
|
|
475
|
+
const threshold = i18n_utilsCR9MpYzU.clampWorkerThreshold(this.workerThreshold);
|
|
476
|
+
const useWorker = i18n_utilsCR9MpYzU.shouldUseWorker(itemCount, this.effectiveFilterMode, threshold);
|
|
477
477
|
let result;
|
|
478
478
|
if (useWorker && this.workerClient?.isReady) {
|
|
479
479
|
// Use worker for search
|
|
@@ -484,7 +484,7 @@ const NvFielddropdown = class {
|
|
|
484
484
|
catch (error) {
|
|
485
485
|
console.error('Worker search failed, falling back to main thread:', error);
|
|
486
486
|
// Fall back to main thread search (now supports fuzzy with Fuse.js)
|
|
487
|
-
result =
|
|
487
|
+
result = i18n_utilsCR9MpYzU.search(this.indexedItems, {
|
|
488
488
|
query: this.filterText,
|
|
489
489
|
filterMode: this.effectiveFilterMode,
|
|
490
490
|
maxResults: this.maxResults,
|
|
@@ -498,7 +498,7 @@ const NvFielddropdown = class {
|
|
|
498
498
|
}
|
|
499
499
|
else {
|
|
500
500
|
// Use main thread search (now supports fuzzy mode with Fuse.js)
|
|
501
|
-
result =
|
|
501
|
+
result = i18n_utilsCR9MpYzU.search(this.indexedItems, {
|
|
502
502
|
query: this.filterText,
|
|
503
503
|
filterMode: this.effectiveFilterMode,
|
|
504
504
|
maxResults: this.maxResults,
|
|
@@ -533,7 +533,7 @@ const NvFielddropdown = class {
|
|
|
533
533
|
const matchingIds = new Set(result.ids);
|
|
534
534
|
let hasVisibleItems = false;
|
|
535
535
|
let visibleCount = 0;
|
|
536
|
-
const effectiveMaxResults =
|
|
536
|
+
const effectiveMaxResults = i18n_utilsCR9MpYzU.clampMaxResults(this.maxResults);
|
|
537
537
|
items.forEach(item => {
|
|
538
538
|
const itemId = item.value || '';
|
|
539
539
|
const itemLabel = item.label || item.textContent?.trim() || '';
|
|
@@ -575,13 +575,13 @@ const NvFielddropdown = class {
|
|
|
575
575
|
*/
|
|
576
576
|
addTruncatedMessage(shown, total) {
|
|
577
577
|
// Get the text template: use provided text or auto-detect from locale
|
|
578
|
-
const textTemplate = this.truncatedResultsText ||
|
|
578
|
+
const textTemplate = this.truncatedResultsText || i18n_utilsCR9MpYzU.getTruncatedResultsText(this.locale);
|
|
579
579
|
const truncatedItem = document.createElement('nv-fielddropdownitem');
|
|
580
580
|
truncatedItem.setAttribute('data-truncated', 'true');
|
|
581
581
|
truncatedItem.setAttribute('disabled', 'true');
|
|
582
582
|
truncatedItem.setAttribute('detached', 'true');
|
|
583
583
|
truncatedItem.className = 'truncated-message';
|
|
584
|
-
truncatedItem.textContent =
|
|
584
|
+
truncatedItem.textContent = i18n_utilsCR9MpYzU.formatTruncatedResults(textTemplate, shown, total);
|
|
585
585
|
const ul = this.el.querySelector('div[slot="content"] ul');
|
|
586
586
|
if (ul) {
|
|
587
587
|
ul.appendChild(truncatedItem);
|
|
@@ -655,11 +655,11 @@ const NvFielddropdown = class {
|
|
|
655
655
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
656
656
|
: undefined;
|
|
657
657
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
658
|
-
return (index.h(index.Host, { key: '
|
|
658
|
+
return (index.h(index.Host, { key: 'fc83e8834e38142ad102d17495b5978283699576', role: "combobox", "aria-expanded": this.open.toString(), "aria-haspopup": "listbox", "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '5a1eb965296909556869a025a6e4da609f2cbf90', htmlFor: this.inputId, onClick: this.syncToggleDropdown.bind(this) }, index.h("slot", { key: 'd5d4f3607e07e248c4083c3ea934a3bd1d7a7467', name: "label" }, this.label))), index.h("nv-popover", { key: '17e42a4d729dbc735db49f398ec14e0c296ff8ee', triggerMode: "controlled", placement: "bottom-start", open: this.open, onOpenChanged: e => this.openChanged.emit(e.detail) }, index.h("div", { key: 'a665ff2d2142acf5335d52e9a304ea2995750e5f', class: "input-wrapper", slot: "trigger" }, index.h("slot", { key: 'bddb24c6404ea0ea7da33485f8d497d0a635f3e2', name: "before-input" }), index.h("div", { key: '7275a9a99c9b4476b405f3966f128ce9ce92801a', class: "input-container" }, index.h("slot", { key: 'ede3c4442f365377eb83524f5d70d2922cd2a38b', name: "leading-input" }), this.filterable || this.disabled || this.readonly ? (index.h("input", { "data-scope": "focusable", id: this.inputId, type: "search", ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
659
659
|
'aria-required': String(ariaRequiredValue),
|
|
660
|
-
}), disabled: this.disabled, readOnly: this.readonly, onInput: this.handleFilterInput })) : (index.h("p", { "data-scope": "focusable", id: this.inputId, ref: el => (this.selectElement = el), class: "non-filterable-text", tabIndex: this.disabled ? -1 : 0 }, this.getSelectedLabel() || this.value || this.placeholder)), this.filterable && this.filterText && (index.h("nv-iconbutton", { key: '
|
|
661
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
662
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
660
|
+
}), disabled: this.disabled, readOnly: this.readonly, onInput: this.handleFilterInput })) : (index.h("p", { "data-scope": "focusable", id: this.inputId, ref: el => (this.selectElement = el), class: "non-filterable-text", tabIndex: this.disabled ? -1 : 0 }, this.getSelectedLabel() || this.value || this.placeholder)), this.filterable && this.filterText && (index.h("nv-iconbutton", { key: 'd1aa81c5d14601ea85cec133a94f2b071ca98358', name: "x", size: "md", emphasis: "lower", class: "clear-button", onClick: this.clearFilter.bind(this), "aria-label": "Clear input" })), this.error && (index.h("nv-icon", { key: 'd49e30222d63ffdcc4d952d959a98946b943685f', name: "alert-circle", class: "validation", size: "md" })), index.h("nv-iconbutton", { key: '6e157ce63f3f6faa08df5b7b9b7e6fd3ae9d0c31', "data-scope": "toggle-dropdown", ref: el => (this.toggleElement = el), name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', onClick: this.syncToggleDropdown.bind(this), tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: '665519b43abbd562ea1c3e36355b15ffb3e6fea2', name: "after-input" })), index.h("div", { key: 'da97b6498e93d5f6c427bec6963db697c41c2d9a', slot: "content", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, this.options?.length > 0 && (index.h("ul", { key: '0db57a711680aad61c32993b5f3afe304ec9066f' }, this.options.map(option => (index.h("nv-fielddropdownitem", { label: option.label, value: option.value, disabled: option.disabled, selected: option.value === this.value }))))), index.h("slot", { key: '5c7643c6436c42efa63bab75f416b684b662812b', name: "content" }))), (this.description ||
|
|
661
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '0ade462a96a16bb0cf6fb9d49d4ead0d98a6234b', class: "description" }, index.h("slot", { key: 'bb2d0c3340bdc0d0b3ac77feab8bc70a73b89a00', name: "description" }, this.description))), (this.errorDescription ||
|
|
662
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'c04c2329d71e088b262a46441bb3bd9592d304e8', hidden: !this.error, class: "error-description" }, index.h("slot", { key: 'b85d769f12c4bf2a2ba5aba69c20566d17801f0a', name: "error-description" }, this.errorDescription)))));
|
|
663
663
|
}
|
|
664
664
|
static get formAssociated() { return true; }
|
|
665
665
|
get el() { return index.getElement(this); }
|
package/dist/cjs/{nv-fielddropdownitem.entry-DapivVnR.js → nv-fielddropdownitem.entry-Bbfi3A8C.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BeFrXZol.js');
|
|
4
4
|
require('@stencil/react-output-target/runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -60,7 +60,7 @@ const NvFielddropdownitem = class {
|
|
|
60
60
|
/****************************************************************************/
|
|
61
61
|
//#region RENDER
|
|
62
62
|
render() {
|
|
63
|
-
return (index.h(index.Host, { key: '
|
|
63
|
+
return (index.h(index.Host, { key: '6d50463d72a8e2dde08ba3d7bc6f3ba21021163e', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, index.h("slot", { key: 'b38c59fc95f124c3395ff1ab0b7dfc4ecc27823b' }, index.h("div", { key: 'a5ba5d4b636847e5ce6c1bab6cbbce418b70a1af', class: "text-wrapper" }, index.h("span", { key: 'f01a0aa5ee475a9640c7abefe321f605ea5e7cdf', "data-scope": "text" }, this.label))), this.selected && (index.h("nv-icon", { key: '9cd1b5532a4d2f5c2546e9432262f483bd5c8d69', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
|
|
64
64
|
}
|
|
65
65
|
get el() { return index.getElement(this); }
|
|
66
66
|
};
|
package/dist/cjs/{nv-fieldmultiselect.entry-DSpQeiPx.js → nv-fieldmultiselect.entry-Cpy7HzlZ.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-BeFrXZol.js');
|
|
4
|
+
var i18n_utilsCR9MpYzU = require('./i18n.utils-CR9MpYzU-ku0bScip.js');
|
|
5
5
|
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
6
6
|
require('@stencil/react-output-target/runtime');
|
|
7
7
|
require('react');
|
|
@@ -964,7 +964,7 @@ const NvFieldmultiselect = class {
|
|
|
964
964
|
const ul = this.el.querySelector('ul');
|
|
965
965
|
if (!ul)
|
|
966
966
|
return;
|
|
967
|
-
this.effectiveFilterMode =
|
|
967
|
+
this.effectiveFilterMode = i18n_utilsCR9MpYzU.getEffectiveFilterMode(this.filterMode);
|
|
968
968
|
// Remove existing empty message and truncation message if any
|
|
969
969
|
ul.querySelector('[data-empty]')?.remove();
|
|
970
970
|
ul.querySelector('[data-truncated]')?.remove();
|
|
@@ -975,7 +975,7 @@ const NvFieldmultiselect = class {
|
|
|
975
975
|
this.filterText.length < this.startFilterAt) {
|
|
976
976
|
// Reset display and apply maxResults limit
|
|
977
977
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
978
|
-
const effectiveMaxResults =
|
|
978
|
+
const effectiveMaxResults = i18n_utilsCR9MpYzU.clampMaxResults(this.maxResults);
|
|
979
979
|
let visibleCount = 0;
|
|
980
980
|
items.forEach(item => {
|
|
981
981
|
if (visibleCount < effectiveMaxResults) {
|
|
@@ -1008,7 +1008,7 @@ const NvFieldmultiselect = class {
|
|
|
1008
1008
|
const matchingIds = new Set(result.ids);
|
|
1009
1009
|
let hasVisibleItems = false;
|
|
1010
1010
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
1011
|
-
const effectiveMaxResults =
|
|
1011
|
+
const effectiveMaxResults = i18n_utilsCR9MpYzU.clampMaxResults(this.maxResults);
|
|
1012
1012
|
let visibleCount = 0;
|
|
1013
1013
|
items.forEach(item => {
|
|
1014
1014
|
const itemValue = item.getAttribute('value') || '';
|
|
@@ -1074,13 +1074,13 @@ const NvFieldmultiselect = class {
|
|
|
1074
1074
|
});
|
|
1075
1075
|
}
|
|
1076
1076
|
// Build local index for main-thread search
|
|
1077
|
-
this.indexedItems =
|
|
1077
|
+
this.indexedItems = i18n_utilsCR9MpYzU.buildIndex(this.rawItems);
|
|
1078
1078
|
// Determine effective filter mode
|
|
1079
|
-
this.effectiveFilterMode =
|
|
1079
|
+
this.effectiveFilterMode = i18n_utilsCR9MpYzU.getEffectiveFilterMode(this.filterMode);
|
|
1080
1080
|
// Initialize worker if needed
|
|
1081
1081
|
const itemCount = this.rawItems.length;
|
|
1082
|
-
const threshold =
|
|
1083
|
-
if (
|
|
1082
|
+
const threshold = i18n_utilsCR9MpYzU.clampWorkerThreshold(this.workerThreshold);
|
|
1083
|
+
if (i18n_utilsCR9MpYzU.shouldUseWorker(itemCount, this.effectiveFilterMode, threshold)) {
|
|
1084
1084
|
await this.initSearchWorker();
|
|
1085
1085
|
}
|
|
1086
1086
|
else {
|
|
@@ -1093,12 +1093,12 @@ const NvFieldmultiselect = class {
|
|
|
1093
1093
|
* Note: Fuzzy search now works on main thread with Fuse.js, so no mode change needed.
|
|
1094
1094
|
*/
|
|
1095
1095
|
async initSearchWorker() {
|
|
1096
|
-
if (!
|
|
1096
|
+
if (!i18n_utilsCR9MpYzU.isWorkerSupported()) {
|
|
1097
1097
|
// Workers not supported - will use main thread (fuzzy still works with Fuse.js)
|
|
1098
1098
|
return;
|
|
1099
1099
|
}
|
|
1100
1100
|
if (!this.workerClient) {
|
|
1101
|
-
this.workerClient = new
|
|
1101
|
+
this.workerClient = new i18n_utilsCR9MpYzU.SearchWorkerClient();
|
|
1102
1102
|
// No fallback mode change needed - fuzzy works on main thread now
|
|
1103
1103
|
}
|
|
1104
1104
|
// Init will silently handle fallback if worker can't be created
|
|
@@ -1124,8 +1124,8 @@ const NvFieldmultiselect = class {
|
|
|
1124
1124
|
await this.rebuildSearchIndex();
|
|
1125
1125
|
}
|
|
1126
1126
|
const itemCount = this.rawItems.length;
|
|
1127
|
-
const threshold =
|
|
1128
|
-
const useWorker =
|
|
1127
|
+
const threshold = i18n_utilsCR9MpYzU.clampWorkerThreshold(this.workerThreshold);
|
|
1128
|
+
const useWorker = i18n_utilsCR9MpYzU.shouldUseWorker(itemCount, this.effectiveFilterMode, threshold);
|
|
1129
1129
|
if (useWorker && this.workerClient?.isReady) {
|
|
1130
1130
|
this.isSearching = true;
|
|
1131
1131
|
try {
|
|
@@ -1134,7 +1134,7 @@ const NvFieldmultiselect = class {
|
|
|
1134
1134
|
catch (error) {
|
|
1135
1135
|
console.error('Worker search failed:', error);
|
|
1136
1136
|
// Fall back to main thread (fuzzy now works with Fuse.js)
|
|
1137
|
-
return
|
|
1137
|
+
return i18n_utilsCR9MpYzU.search(this.indexedItems, {
|
|
1138
1138
|
query: this.filterText,
|
|
1139
1139
|
filterMode: this.effectiveFilterMode,
|
|
1140
1140
|
maxResults: this.maxResults,
|
|
@@ -1147,7 +1147,7 @@ const NvFieldmultiselect = class {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
}
|
|
1149
1149
|
// Use main thread search (fuzzy now works with Fuse.js)
|
|
1150
|
-
return
|
|
1150
|
+
return i18n_utilsCR9MpYzU.search(this.indexedItems, {
|
|
1151
1151
|
query: this.filterText,
|
|
1152
1152
|
filterMode: this.effectiveFilterMode,
|
|
1153
1153
|
maxResults: this.maxResults,
|
|
@@ -1165,11 +1165,11 @@ const NvFieldmultiselect = class {
|
|
|
1165
1165
|
// Remove existing truncation message
|
|
1166
1166
|
ul.querySelector('[data-truncated]')?.remove();
|
|
1167
1167
|
// Get the text template: use provided text or auto-detect from locale
|
|
1168
|
-
const textTemplate = this.truncatedResultsText ||
|
|
1168
|
+
const textTemplate = this.truncatedResultsText || i18n_utilsCR9MpYzU.getTruncatedResultsText(this.locale);
|
|
1169
1169
|
const truncatedItem = document.createElement('li');
|
|
1170
1170
|
truncatedItem.setAttribute('data-truncated', 'true');
|
|
1171
1171
|
truncatedItem.className = 'truncated-message no-results-message';
|
|
1172
|
-
truncatedItem.textContent =
|
|
1172
|
+
truncatedItem.textContent = i18n_utilsCR9MpYzU.formatTruncatedResults(textTemplate, shown, total);
|
|
1173
1173
|
ul.appendChild(truncatedItem);
|
|
1174
1174
|
}
|
|
1175
1175
|
handleClickOutside(event) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BeFrXZol.js');
|
|
4
4
|
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
5
5
|
require('@stencil/react-output-target/runtime');
|
|
6
6
|
require('react');
|
|
@@ -170,11 +170,11 @@ const NvFieldnumber = class {
|
|
|
170
170
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
171
171
|
: undefined;
|
|
172
172
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
173
|
-
return (index.h(index.Host, { key: '
|
|
173
|
+
return (index.h(index.Host, { key: '1e36baa7bada38760fc9363329cb133d92aad28b' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '7c47d4417b1a26dd35e0e566451c3e8386803611', htmlFor: this.inputId }, index.h("slot", { key: '6aeedee63b8d2fbe2d7df6f567cb6d81020efe98', name: "label" }, this.label))), index.h("div", { key: '4507a0ec037b3822a396ad89d86b62d1adcf0011', class: "input-wrapper" }, index.h("slot", { key: '7f469b67aa088cea2967e430d1e257097f84ae84', name: "before-input" }), index.h("div", { key: 'c3c5a0e713e5cd94ab6d9c6414cf33a1bd91daee', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '8c6b3952d186bf4873470fc7fa67768e4d76d561', name: "leading-input" }), index.h("input", { key: 'f413f4c3cd77a0a872b0038bbf8e61ce780c3f78', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", autofocus: this.autofocus, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
174
174
|
'aria-required': String(ariaRequiredValue),
|
|
175
|
-
}), 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: '
|
|
176
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
177
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
175
|
+
}), 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: 'af60594f2c536e5527478a66b72ad96bedcdcbd7', name: "trailing-input" }), this.error && (index.h("nv-icon", { key: 'd1ac93ad90cf44304581e4c1516e50a9ccdfa13a', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '13e5220090b3841c6dcc688e89ad99df8df1fc65', name: "circle-check", class: "validation", size: "md" })), index.h("div", { key: '4823aa102f38909d488cde22f3c8e5607a6dad36', class: "stepper" }, index.h("nv-iconbutton", { key: 'beb7246372406a126f5eeb10f36532e6727e29db', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), index.h("nv-iconbutton", { key: 'f17eef8a17252962ee0f282ece0e402cc71a231d', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), index.h("slot", { key: '54e427210db1972f194a7e60a5523038615e2889', name: "after-input" })), (this.description ||
|
|
176
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'b74c0ecd5d63a072a47b841294614d9f7cfb1371', class: "description" }, index.h("slot", { key: '3feddef8e3658097a3137dbdbd872e72c527f5f8', name: "description" }, this.description))), (this.errorDescription ||
|
|
177
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '4b6956f6ae94393d37b94703401dc6ab62657fdf', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '37c04247cf7842d623ee36b1144f9656af651768', name: "error-description" }, this.errorDescription)))));
|
|
178
178
|
}
|
|
179
179
|
static get formAssociated() { return true; }
|
|
180
180
|
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-BeFrXZol.js');
|
|
4
4
|
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
5
5
|
require('@stencil/react-output-target/runtime');
|
|
6
6
|
require('react');
|
|
@@ -148,11 +148,11 @@ const NvFieldpassword = class {
|
|
|
148
148
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
149
149
|
: undefined;
|
|
150
150
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
151
|
-
return (index.h(index.Host, { key: '
|
|
151
|
+
return (index.h(index.Host, { key: '0022e7c0b9529f4cd6840732a12bdfd7af178c4d' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'ac8eebc87258b3ff220809e1304c69c657d91a6e', htmlFor: this.inputId }, index.h("slot", { key: '0385f62cef83b64170ffbe796163407e7f5a5ab5', name: "label" }, this.label))), index.h("div", { key: 'a4b02b838c72a5f5c263919bb56ec2f601f9b2af', class: "input-wrapper" }, index.h("slot", { key: 'fbcfea7b266fc54c29583ada4f0007984a2c4e05', name: "before-input" }), index.h("div", { key: '83ca16802319a42e59718c1836b9692da0f34fc9', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '996aceac450cf9ab7e0c0a96061b06212ed95ca0', name: "leading-input" }), index.h("input", { key: '2d23175d6a47ee52e2a3dbae88a989e13fe5ea02', 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: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
152
152
|
'aria-required': String(ariaRequiredValue),
|
|
153
|
-
}), 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: '
|
|
154
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
155
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
153
|
+
}), 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: '388170ed995039b69b2b3db523b2c7ba33e8fd87', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (index.h("nv-iconbutton", { key: '92567a64f653423e351bb558456233318461a0e0', 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: '929d2faa36c128bd5d163beb8a06f40c008981e9', name: "after-input" })), (this.description ||
|
|
154
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'ddd0ed40de645fae289d3e1b60db0067e219fd78', class: "description" }, index.h("slot", { key: '17122748a9a401a50d43d3fd556c20809dfb9bc2', name: "description" }, this.description))), (this.errorDescription ||
|
|
155
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '1ef139333591257d3a13e9506be0721cee1fd4f1', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '631bf31a710d0ace20cd7d631d6218101ac896b0', name: "error-description" }, this.errorDescription)))));
|
|
156
156
|
}
|
|
157
157
|
static get formAssociated() { return true; }
|
|
158
158
|
get el() { return index.getElement(this); }
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BeFrXZol.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 nvFieldradioCss = () => `@charset "UTF-8";nv-fieldradio{--nv-fieldradio-border-default:var(--components-form-field-border-default);--nv-fieldradio-border-hover:var(--components-form-field-border-hover);--nv-fieldradio-border-focus:var(--components-form-field-border-default);--nv-fieldradio-background-default:var(--components-form-field-background-default);--nv-fieldradio-background-checked:var(--components-form-field-background-checked);--nv-fieldradio-background-disabled:var(--components-form-field-background-disabled);--nv-fieldradio-focus-box-shadow:var(--color-focus-brand);--nv-fieldradio-dot-color-checked:var(--components-form-shape-foreground-default);--nv-fieldradio-dot-color-disabled:var(--components-form-shape-foreground-disabled);--nv-fieldradio-outline-color:var(--color-focus-brand);display:inline-flex;align-items:flex-start;gap:var(--form-gap-x)}nv-fieldradio:not([disabled]) input,nv-fieldradio:not([disabled]) label,nv-fieldradio[disabled=false] input,nv-fieldradio[disabled=false] label{cursor:pointer}nv-fieldradio.error{--nv-fieldradio-border-default:var(--components-form-field-border-error);--nv-fieldradio-border-hover:var(--nv-fieldradio-border-default);--nv-fieldradio-border-focus:var(--components-form-field-border-error);--nv-fieldradio-background-checked:var(--components-form-field-background-error);--nv-fieldradio-focus-box-shadow:var(--color-focus-destructive);--nv-fieldradio-dot-color-checked:var(--components-form-shape-foreground-default);--nv-fieldradio-dot-color-disabled:var(--components-form-field-border-error);--nv-fieldradio-outline-color:var(--color-focus-destructive)}nv-fieldradio.label-placement-before{flex-direction:row-reverse}nv-fieldradio[disabled]{opacity:0.5}nv-fieldradio label{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(--form-label-font-weight);line-height:var(--form-label-line-height)}nv-fieldradio input[type=radio]{appearance:none;position:relative;display:flex;width:var(--form-radio-size);height:var(--form-radio-size);padding:var(--form-radio-inner-circle-padding);flex-direction:column;align-items:flex-start;border-radius:var(--radius-rounded-full);border-width:var(--form-radio-border-width);border-style:solid;border-color:var(--nv-fieldradio-border-default);background:var(--nv-fieldradio-background-default)}nv-fieldradio input[type=radio]:hover{border-color:var(--nv-fieldradio-border-hover)}nv-fieldradio input[type=radio]:focus{border-color:var(--nv-fieldradio-border-focus)}nv-fieldradio input[type=radio]:focus,nv-fieldradio input[type=radio]:focus-within{outline:none}nv-fieldradio input[type=radio]:focus-visible,nv-fieldradio input[type=radio]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-fieldradio-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-fieldradio input[type=radio]:checked{background:var(--nv-fieldradio-background-checked);border-color:var(--nv-fieldradio-background-checked)}nv-fieldradio input[type=radio]:checked:hover,nv-fieldradio input[type=radio]:checked:focus{border-color:var(--nv-fieldradio-background-checked);background:var(--nv-fieldradio-background-checked)}nv-fieldradio input[type=radio]:checked::before{content:"";position:absolute;top:50%;right:50%;transform:translate(50%, -50%);left:0;width:var(--form-radio-inner-circle-size);height:var(--form-radio-inner-circle-size);flex-shrink:0;border-radius:var(--radius-rounded-full);background:var(--nv-fieldradio-dot-color-checked)}nv-fieldradio input[type=radio]:disabled{border-radius:var(--radius-rounded-full);border-width:var(--form-radio-border-width);border-style:solid;border-color:var(--nv-fieldradio-border-default);background:var(--nv-fieldradio-background-disabled)}nv-fieldradio input[type=radio]:disabled:checked::before{background:var(--nv-fieldradio-dot-color-disabled)}nv-fieldradio input[type=radio]:disabled:hover{border-color:var(--nv-fieldradio-border-default);background:var(--nv-fieldradio-background-disabled)}@media print{nv-fieldradio input[type=radio]:checked{background:transparent;border-color:var(--nv-fieldradio-background-checked)}nv-fieldradio input[type=radio]:checked::before{content:"●";position:absolute;top:calc(50% - 2px);left:calc(50% - 4.5px);transform:translate(-50%, -50%);width:auto;height:auto;background:none;color:var(--nv-fieldradio-background-checked);font-size:calc(var(--form-radio-inner-circle-size) * 3);line-height:1}}nv-fieldradio .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-fieldradio .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)}nv-fieldradio .text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}`;
|
|
11
|
+
|
|
12
|
+
const NvFieldradio = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.checkedChanged = index.createEvent(this, "checkedChanged", 3);
|
|
16
|
+
/**
|
|
17
|
+
* Set the label placement to before the input
|
|
18
|
+
* @deprecated use labelPlacement 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
|
+
* Highlight the radio button with error styling. It helps users quickly
|
|
33
|
+
* identify which option needs attention, improving their form-filling
|
|
34
|
+
* experience by making issues more visible.
|
|
35
|
+
* @validator error
|
|
36
|
+
*/
|
|
37
|
+
this.error = false;
|
|
38
|
+
/**
|
|
39
|
+
* Controls whether the radio button is selected.
|
|
40
|
+
*/
|
|
41
|
+
this.checked = false;
|
|
42
|
+
/**
|
|
43
|
+
* Disables the radio button, making it un-selectable.
|
|
44
|
+
*/
|
|
45
|
+
this.disabled = false;
|
|
46
|
+
/**
|
|
47
|
+
* Applies focus to the input field as soon as the component is mounted. This
|
|
48
|
+
* is equivalent to setting the native autofocus attribute on an <input>
|
|
49
|
+
* element.
|
|
50
|
+
*/
|
|
51
|
+
this.autofocus = false;
|
|
52
|
+
}
|
|
53
|
+
componentWillRender() {
|
|
54
|
+
if (this.message) {
|
|
55
|
+
this.description = this.message;
|
|
56
|
+
}
|
|
57
|
+
if (this.labelBefore) {
|
|
58
|
+
this.labelPlacement = 'before';
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//#endregion EVENTS
|
|
62
|
+
/****************************************************************************/
|
|
63
|
+
//#region WATCHERS
|
|
64
|
+
/**
|
|
65
|
+
* Watches for changes to the checked state and emits the new value.
|
|
66
|
+
* @param {boolean} checked - The new value of the checked state.
|
|
67
|
+
*/
|
|
68
|
+
handleCheckedChange(checked) {
|
|
69
|
+
this.checkedChanged.emit(checked);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Listens for the change event on the radio button input element and controls
|
|
73
|
+
* the checked state of the host elements.
|
|
74
|
+
* @param {Event} event - The change event.
|
|
75
|
+
*/
|
|
76
|
+
handleChange(event) {
|
|
77
|
+
const target = event.target;
|
|
78
|
+
if (target?.type === 'radio') {
|
|
79
|
+
Array.from(document.getElementsByTagName('nv-fieldradio')).forEach(element => {
|
|
80
|
+
if (element.name === this.name) {
|
|
81
|
+
element.checked = false;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
this.checked = target.checked;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//#endregion WATCHERS
|
|
88
|
+
/****************************************************************************/
|
|
89
|
+
//#region RENDER
|
|
90
|
+
render() {
|
|
91
|
+
return (index.h(index.Host, { key: '07d9225a6a3af28efa5885b5bb02a3f512708a97', class: clsxChV9xqsO.clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, index.h("input", { key: '2b5afcf255bc442914f9225537987d331000883d', 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: '8fc76a826e8a8ef51a80173b950ab460cf0ff8f3', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '4578fccf241e9470a7f514761b3141d3fad77a88', htmlFor: this.inputId }, index.h("slot", { key: 'f6d9f4961d07525175bd51fa4a4b546d62e74d4e', name: "label" }, this.label))), (this.description ||
|
|
92
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '17d029eb709c443e8a68a5d6bdd1265400ae35d2', class: "description" }, index.h("slot", { key: 'e4485b5ed253c6fc45508947387fa43f0492f654', name: "description" }, this.description))), (this.errorDescription ||
|
|
93
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'cde01e850752c1a2b4a3b2559f2052167409a605', hidden: !this.error, class: "error-description" }, index.h("slot", { key: 'f9d9f08be6506a495a5b42bcc9ebd2db49e749d5', name: "error-description" }, this.errorDescription))))));
|
|
94
|
+
}
|
|
95
|
+
static get formAssociated() { return true; }
|
|
96
|
+
get el() { return index.getElement(this); }
|
|
97
|
+
static get watchers() { return {
|
|
98
|
+
"checked": [{
|
|
99
|
+
"handleCheckedChange": 0
|
|
100
|
+
}]
|
|
101
|
+
}; }
|
|
102
|
+
};
|
|
103
|
+
NvFieldradio.style = nvFieldradioCss();
|
|
104
|
+
|
|
105
|
+
exports.nv_fieldradio = NvFieldradio;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BeFrXZol.js');
|
|
4
4
|
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
5
5
|
require('@stencil/react-output-target/runtime');
|
|
6
6
|
require('react');
|
|
@@ -373,15 +373,15 @@ const NvFieldselect = class {
|
|
|
373
373
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
374
374
|
: undefined;
|
|
375
375
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
376
|
-
return (index.h(index.Host, { key: '
|
|
376
|
+
return (index.h(index.Host, { key: '14b1a2aa45b0c68539234e57dfcce39422d6d23b' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'a9c3a454574d65358d28f8e72049d82b5667b0cb', htmlFor: this.inputId }, index.h("slot", { key: 'ead692187041569b918d65afd775e1f4050d54e7', name: "label" }, this.label))), index.h("div", { key: '1707389d32a34a16a141990a9ab133c0e39fdd11', class: "select-wrapper" }, index.h("slot", { key: 'd8ac565ec1a564f1e451f8d0f80ad12c4b25a70d', name: "before-input" }), index.h("div", { key: '4c0edadba8462c36ea4f315971842796fb59852f', class: "select-container", onClick: this.handleSelectContainerClick }, index.h("slot", { key: '68442a898f7321d584d7fff62452af2b37ee3467', name: "leading-input" }), this.internalReadonly && (index.h("input", { key: '997d8e04f32826d65f4a1a138b008f69910fa6d2', 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
|
|
377
377
|
? `${this.inputId}-error`
|
|
378
|
-
: `${this.inputId}-description` })), index.h("select", { key: '
|
|
378
|
+
: `${this.inputId}-description` })), index.h("select", { key: '732a7a11d9547ea4f6b3322781bc34be18b6b77e', id: this.inputId, ref: el => (this.selectElement = el), name: this.name, autofocus: this.autofocus, disabled: this.disabled, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
379
379
|
'aria-required': String(ariaRequiredValue),
|
|
380
380
|
}), multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
|
|
381
381
|
? `${this.inputId}-error`
|
|
382
|
-
: `${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: '
|
|
383
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
384
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
382
|
+
: `${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: 'f4675290f5ee76afb1020f40e70c19e2f33b9292', class: "select-icons" }, this.error && (index.h("nv-icon", { key: '246f1fd624270c5f2cfdfc5fc31ff1e63c0aa99f', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: 'ff06df43b44ceb423c2dd3be999e553a62953d84', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (index.h("nv-iconbutton", { key: 'fee5dd8d3268d6ad00389b2ace10eaffa81fb0c0', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), index.h("slot", { key: 'debcb059b6fc7a3667009af11539a98778812064', name: "after-input" })), (this.description ||
|
|
383
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'c64ad4587fe24de32391e730a02d34138e9dd55d', class: "description", id: `${this.inputId}-description` }, index.h("slot", { key: '7bee964467a46ea037d3be6733a04a08979fbebb', name: "description" }, this.description))), (this.errorDescription ||
|
|
384
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'd759750f8a90a8a41d2b42ac1cc4a297ae14e571', class: "error-description", id: `${this.inputId}-error` }, index.h("slot", { key: 'df17b5135b5f8bbf991895f11cc1bb74c7e665a6', name: "error-description" }, this.errorDescription)))));
|
|
385
385
|
}
|
|
386
386
|
static get formAssociated() { return true; }
|
|
387
387
|
get el() { return index.getElement(this); }
|