@nova-design-system/nova-webcomponents 3.0.0-beta.17 → 3.0.0-beta.20
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/{app-globals-2ceecab2.js → app-globals-8dbc03be.js} +2 -2
- package/dist/cjs/{app-globals-2ceecab2.js.map → app-globals-8dbc03be.js.map} +1 -1
- package/dist/cjs/{index-5d1f2412.js → index-b925c7f5.js} +20 -6
- package/dist/cjs/index-b925c7f5.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/native.cjs.js +3 -3
- package/dist/cjs/nv-alert.cjs.entry.js +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge.cjs.entry.js +1 -1
- package/dist/cjs/nv-base.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdownitemcheck.cjs.entry.js +48 -0
- package/dist/cjs/nv-fielddropdownitemcheck.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +368 -0
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldselect.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldtext.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldtoggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton.cjs.entry.js +2 -2
- package/dist/cjs/nv-loader.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +2 -2
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +2 -2
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +12 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js +6 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js.map +1 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +190 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +195 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +169 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +822 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.js +2 -2
- package/dist/collection/components/nv-icon/nv-icon.js +2 -2
- package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/nv-alert.js +2 -2
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +2 -2
- package/dist/components/nv-base.js +1 -1
- package/dist/components/nv-button.js +2 -2
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -121
- package/dist/components/nv-fieldcheckbox.js.map +1 -1
- package/dist/components/nv-fielddropdownitemcheck.d.ts +11 -0
- package/dist/components/nv-fielddropdownitemcheck.js +8 -0
- package/dist/components/nv-fielddropdownitemcheck.js.map +1 -0
- package/dist/components/nv-fieldmultiselect.d.ts +11 -0
- package/dist/components/nv-fieldmultiselect.js +445 -0
- package/dist/components/nv-fieldmultiselect.js.map +1 -0
- package/dist/components/nv-fieldnumber.js +5 -5
- package/dist/components/nv-fieldpassword.js +7 -7
- package/dist/components/nv-fieldradio.js +4 -4
- package/dist/components/nv-fieldselect.js +7 -7
- package/dist/components/nv-fieldtext.js +5 -5
- package/dist/components/nv-fieldtextarea.js +4 -4
- package/dist/components/nv-fieldtoggle.js +3 -3
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +3 -3
- package/dist/components/nv-menuitem.js +2 -2
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +2 -2
- package/dist/components/nv-stack.js +2 -2
- package/dist/components/nv-tooltip.js +3 -3
- package/dist/components/p-1079b972.js +125 -0
- package/dist/components/p-1079b972.js.map +1 -0
- package/dist/components/{p-50bd2808.js → p-45ffa910.js} +2 -2
- package/dist/components/{p-50bd2808.js.map → p-45ffa910.js.map} +1 -1
- package/dist/components/{p-be79e7bc.js → p-813b38b1.js} +5 -5
- package/dist/components/{p-be79e7bc.js.map → p-813b38b1.js.map} +1 -1
- package/dist/components/{p-6146d4b0.js → p-9cbeeff9.js} +3 -3
- package/dist/components/{p-6146d4b0.js.map → p-9cbeeff9.js.map} +1 -1
- package/dist/components/{p-632bedb8.js → p-c434f2e5.js} +6 -2
- package/dist/components/p-c434f2e5.js.map +1 -0
- package/dist/components/{p-8da6d9a3.js → p-d8a41fbe.js} +3 -3
- package/dist/components/{p-8da6d9a3.js.map → p-d8a41fbe.js.map} +1 -1
- package/dist/components/{p-c711fe67.js → p-d9d56e06.js} +4 -4
- package/dist/components/{p-c711fe67.js.map → p-d9d56e06.js.map} +1 -1
- package/dist/components/p-dbbda3ac.js +72 -0
- package/dist/components/p-dbbda3ac.js.map +1 -0
- package/dist/docs.json +1049 -3
- package/dist/esm/{app-globals-df0a3c8d.js → app-globals-ec286266.js} +2 -2
- package/dist/esm/{app-globals-df0a3c8d.js.map → app-globals-ec286266.js.map} +1 -1
- package/dist/esm/{index-179dfba2.js → index-3762ddc4.js} +20 -6
- package/dist/esm/index-3762ddc4.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/native.js +4 -4
- package/dist/esm/nv-alert.entry.js +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge.entry.js +1 -1
- package/dist/esm/nv-base.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fielddropdownitemcheck.entry.js +44 -0
- package/dist/esm/nv-fielddropdownitemcheck.entry.js.map +1 -0
- package/dist/esm/nv-fieldmultiselect.entry.js +364 -0
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -0
- package/dist/esm/nv-fieldnumber.entry.js +4 -4
- package/dist/esm/nv-fieldpassword.entry.js +4 -4
- package/dist/esm/nv-fieldradio.entry.js +4 -4
- package/dist/esm/nv-fieldselect.entry.js +6 -6
- package/dist/esm/nv-fieldtext.entry.js +4 -4
- package/dist/esm/nv-fieldtextarea.entry.js +4 -4
- package/dist/esm/nv-fieldtoggle.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton.entry.js +2 -2
- package/dist/esm/nv-loader.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +2 -2
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +2 -2
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +2 -2
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-db2a68f3.js → p-006006b6.js} +3 -3
- package/dist/native/p-006006b6.js.map +1 -0
- package/dist/native/p-056455a2.entry.js +2 -0
- package/dist/native/p-068965e9.entry.js +2 -0
- package/dist/native/{p-6f762ec2.entry.js.map → p-068965e9.entry.js.map} +1 -1
- package/dist/native/{p-89accab1.entry.js → p-09d57171.entry.js} +2 -2
- package/dist/native/p-1392b30f.entry.js +2 -0
- package/dist/native/p-1392b30f.entry.js.map +1 -0
- package/dist/native/{p-8b65b16f.entry.js → p-1adc83f5.entry.js} +2 -2
- package/dist/native/{p-71d6aad8.entry.js → p-1e575590.entry.js} +2 -2
- package/dist/native/{p-b5e4a9e7.entry.js → p-21bc1cf9.entry.js} +2 -2
- package/dist/native/p-21cdc57d.entry.js +2 -0
- package/dist/native/p-21cdc57d.entry.js.map +1 -0
- package/dist/native/{p-43cd42ca.entry.js → p-3935c952.entry.js} +2 -2
- package/dist/native/{p-14c08510.entry.js → p-3bb76528.entry.js} +2 -2
- package/dist/native/{p-830ec54a.entry.js → p-5c0e7fda.entry.js} +2 -2
- package/dist/native/{p-f5acea50.entry.js → p-60679799.entry.js} +2 -2
- package/dist/native/{p-06f64d05.entry.js → p-60f027d4.entry.js} +2 -2
- package/dist/native/p-70c73c72.entry.js +2 -0
- package/dist/native/{p-29d482cd.entry.js.map → p-70c73c72.entry.js.map} +1 -1
- package/dist/native/{p-519e0f59.entry.js → p-8d472724.entry.js} +2 -2
- package/dist/native/{p-124a7067.entry.js → p-95a054ed.entry.js} +2 -2
- package/dist/native/{p-fb6f42b7.entry.js → p-99e17032.entry.js} +2 -2
- package/dist/native/{p-0aa0193b.entry.js → p-a8fe9493.entry.js} +2 -2
- package/dist/native/p-b0955577.js +2 -0
- package/dist/native/{p-b8eb4c31.entry.js → p-c3c9444e.entry.js} +2 -2
- package/dist/native/{p-617d6a09.entry.js → p-c749aafd.entry.js} +2 -2
- package/dist/native/{p-1ceee367.entry.js → p-ce6ff56c.entry.js} +2 -2
- package/dist/native/{p-d5a8b6c4.entry.js → p-e4d12abd.entry.js} +2 -2
- package/dist/native/{p-13d0ab5b.entry.js → p-ee23e820.entry.js} +2 -2
- package/dist/native/{p-13d0ab5b.entry.js.map → p-ee23e820.entry.js.map} +1 -1
- package/dist/native/{p-f9aac71a.entry.js → p-f215822a.entry.js} +2 -2
- package/dist/native/{p-7ce1b712.entry.js → p-fd8ee23e.entry.js} +2 -2
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +43 -0
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.d.ts +4 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +215 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.d.ts +4 -0
- package/dist/types/components.d.ts +287 -0
- package/hydrate/index.js +495 -33
- package/hydrate/index.mjs +495 -33
- package/hydrate/package.json +1 -1
- package/package.json +1 -1
- package/dist/blazor-docs.json +0 -9342
- package/dist/cjs/index-5d1f2412.js.map +0 -1
- package/dist/components/p-632bedb8.js.map +0 -1
- package/dist/esm/index-179dfba2.js.map +0 -1
- package/dist/native/p-29d482cd.entry.js +0 -2
- package/dist/native/p-6f762ec2.entry.js +0 -2
- package/dist/native/p-80788ddf.js +0 -2
- package/dist/native/p-b99aa075.entry.js +0 -2
- package/dist/native/p-db2a68f3.js.map +0 -1
- package/dist/vscode-data.json +0 -3179
- /package/dist/native/{p-b99aa075.entry.js.map → p-056455a2.entry.js.map} +0 -0
- /package/dist/native/{p-89accab1.entry.js.map → p-09d57171.entry.js.map} +0 -0
- /package/dist/native/{p-8b65b16f.entry.js.map → p-1adc83f5.entry.js.map} +0 -0
- /package/dist/native/{p-71d6aad8.entry.js.map → p-1e575590.entry.js.map} +0 -0
- /package/dist/native/{p-b5e4a9e7.entry.js.map → p-21bc1cf9.entry.js.map} +0 -0
- /package/dist/native/{p-43cd42ca.entry.js.map → p-3935c952.entry.js.map} +0 -0
- /package/dist/native/{p-14c08510.entry.js.map → p-3bb76528.entry.js.map} +0 -0
- /package/dist/native/{p-830ec54a.entry.js.map → p-5c0e7fda.entry.js.map} +0 -0
- /package/dist/native/{p-f5acea50.entry.js.map → p-60679799.entry.js.map} +0 -0
- /package/dist/native/{p-06f64d05.entry.js.map → p-60f027d4.entry.js.map} +0 -0
- /package/dist/native/{p-519e0f59.entry.js.map → p-8d472724.entry.js.map} +0 -0
- /package/dist/native/{p-124a7067.entry.js.map → p-95a054ed.entry.js.map} +0 -0
- /package/dist/native/{p-fb6f42b7.entry.js.map → p-99e17032.entry.js.map} +0 -0
- /package/dist/native/{p-0aa0193b.entry.js.map → p-a8fe9493.entry.js.map} +0 -0
- /package/dist/native/{p-80788ddf.js.map → p-b0955577.js.map} +0 -0
- /package/dist/native/{p-b8eb4c31.entry.js.map → p-c3c9444e.entry.js.map} +0 -0
- /package/dist/native/{p-617d6a09.entry.js.map → p-c749aafd.entry.js.map} +0 -0
- /package/dist/native/{p-1ceee367.entry.js.map → p-ce6ff56c.entry.js.map} +0 -0
- /package/dist/native/{p-d5a8b6c4.entry.js.map → p-e4d12abd.entry.js.map} +0 -0
- /package/dist/native/{p-f9aac71a.entry.js.map → p-f215822a.entry.js.map} +0 -0
- /package/dist/native/{p-7ce1b712.entry.js.map → p-fd8ee23e.entry.js.map} +0 -0
package/hydrate/index.mjs
CHANGED
|
@@ -124,7 +124,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
const NAMESPACE = 'native';
|
|
127
|
-
const BUILD = /* native */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback:
|
|
127
|
+
const BUILD = /* native */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: true, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
128
128
|
|
|
129
129
|
// Prevents the dev components from being bundled in production as a component
|
|
130
130
|
if (Build.isDev) {
|
|
@@ -1592,6 +1592,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1592
1592
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1593
1593
|
}
|
|
1594
1594
|
endNewInstance();
|
|
1595
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1595
1596
|
} else {
|
|
1596
1597
|
Cstr = elm.constructor;
|
|
1597
1598
|
const cmpTag = elm.localName;
|
|
@@ -1619,6 +1620,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1619
1620
|
}
|
|
1620
1621
|
};
|
|
1621
1622
|
var fireConnectedCallback = (instance) => {
|
|
1623
|
+
{
|
|
1624
|
+
safeCall(instance, "connectedCallback");
|
|
1625
|
+
}
|
|
1622
1626
|
};
|
|
1623
1627
|
|
|
1624
1628
|
// src/runtime/connected-callback.ts
|
|
@@ -1655,8 +1659,10 @@ var connectedCallback = (elm) => {
|
|
|
1655
1659
|
}
|
|
1656
1660
|
} else {
|
|
1657
1661
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1658
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1659
|
-
hostRef.$
|
|
1662
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1663
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1664
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1665
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1660
1666
|
}
|
|
1661
1667
|
}
|
|
1662
1668
|
endConnected();
|
|
@@ -5189,6 +5195,460 @@ class NvFieldcheckbox {
|
|
|
5189
5195
|
}; }
|
|
5190
5196
|
}
|
|
5191
5197
|
|
|
5198
|
+
const nvFielddropdownitemcheckCss = "@charset \"UTF-8\";nv-fielddropdownitemcheck slot-fb{all:unset;}nv-fielddropdownitemcheck nv-fieldcheckbox input[type=checkbox]{all:unset;display:inline-block;margin:0;padding:0;width:20px;height:20px}";
|
|
5199
|
+
var NvFielddropdownitemcheckStyle0 = nvFielddropdownitemcheckCss;
|
|
5200
|
+
|
|
5201
|
+
class NvFielddropdownitemcheck {
|
|
5202
|
+
constructor(hostRef) {
|
|
5203
|
+
registerInstance(this, hostRef);
|
|
5204
|
+
this.itemChecked = createEvent(this, "itemChecked", 7);
|
|
5205
|
+
this.handleCheckboxToggle = () => {
|
|
5206
|
+
if (this.disabled)
|
|
5207
|
+
return; // Ignore interactions si désactivé
|
|
5208
|
+
this.checked = !this.checked;
|
|
5209
|
+
this.itemChecked.emit({
|
|
5210
|
+
value: this.value,
|
|
5211
|
+
checked: this.checked,
|
|
5212
|
+
group: this.group,
|
|
5213
|
+
});
|
|
5214
|
+
console.log('itemChecked emitted:', {
|
|
5215
|
+
value: this.value,
|
|
5216
|
+
checked: this.checked,
|
|
5217
|
+
group: this.group,
|
|
5218
|
+
});
|
|
5219
|
+
};
|
|
5220
|
+
this.checked = false;
|
|
5221
|
+
this.value = undefined;
|
|
5222
|
+
this.label = undefined;
|
|
5223
|
+
this.description = undefined;
|
|
5224
|
+
this.group = undefined;
|
|
5225
|
+
this.disabled = false;
|
|
5226
|
+
}
|
|
5227
|
+
//#endregion EVENTS
|
|
5228
|
+
/****************************************************************************/
|
|
5229
|
+
//#region RENDER
|
|
5230
|
+
render() {
|
|
5231
|
+
return (hAsync(Host, { key: 'a12664b18cb98c654b7e13b1883775baf96f174d', onClick: this.handleCheckboxToggle }, hAsync("div", { key: '279a9e736c4e12c214bff691494b1bbc8efea808' }, hAsync("nv-fieldcheckbox", { key: 'b278a88b87f8d5137cd9bdf28b332a28938ef1e2', checked: this.checked, name: this.label || this.value, label: this.label || this.value, "label-placement": "after", description: this.description, disabled: this.disabled, tabindex: "-1", role: "option" }))));
|
|
5232
|
+
}
|
|
5233
|
+
get el() { return getElement(this); }
|
|
5234
|
+
static get style() { return NvFielddropdownitemcheckStyle0; }
|
|
5235
|
+
static get cmpMeta() { return {
|
|
5236
|
+
"$flags$": 0,
|
|
5237
|
+
"$tagName$": "nv-fielddropdownitemcheck",
|
|
5238
|
+
"$members$": {
|
|
5239
|
+
"checked": [1540],
|
|
5240
|
+
"value": [513],
|
|
5241
|
+
"label": [513],
|
|
5242
|
+
"description": [513],
|
|
5243
|
+
"group": [513],
|
|
5244
|
+
"disabled": [516]
|
|
5245
|
+
},
|
|
5246
|
+
"$listeners$": undefined,
|
|
5247
|
+
"$lazyBundleId$": "-",
|
|
5248
|
+
"$attrsToReflect$": [["checked", "checked"], ["value", "value"], ["label", "label"], ["description", "description"], ["group", "group"], ["disabled", "disabled"]]
|
|
5249
|
+
}; }
|
|
5250
|
+
}
|
|
5251
|
+
|
|
5252
|
+
const nvFieldmultiselectCss = "nv-fieldmultiselect{--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-fieldmultiselect[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-fieldmultiselect[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-fieldmultiselect[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldmultiselect 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-fieldmultiselect nv-popover{width:100%;display:block}nv-fieldmultiselect .input-wrapper-multiselect{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldmultiselect .input-container-multiselect{display:flex;flex-grow:1;padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);justify-content:center;align-items:center;gap:var(--form-field-gap);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);background:var(--nv-field-background);transition:all 150ms ease-out;display:flex;align-items:center;position:relative;width:100%;min-height:40px}nv-fieldmultiselect .input-container-multiselect:hover{border-color:var(--nv-field-border-hover)}nv-fieldmultiselect .input-container-multiselect:focus-within{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldmultiselect .input-container-multiselect:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldmultiselect .input-container-multiselect:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldmultiselect .input-container-multiselect input,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;padding-right:2rem;flex-grow:1;margin:0;min-height:100%;box-sizing:border-box}nv-fieldmultiselect .input-container-multiselect input:focus,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text:focus{outline:none}nv-fieldmultiselect .input-container-multiselect input::placeholder,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text::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-fieldmultiselect .input-container-multiselect .toggle-dropdown-icon{position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:2}nv-fieldmultiselect .input-container-multiselect nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px}nv-fieldmultiselect .input-container-multiselect.focus-within,nv-fieldmultiselect .input-container-multiselect:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldmultiselect .non-filterable-text{display:block;border-radius:var(--form-field-radius);background-color:var(--nv-field-background);color:var(--components-form-field-content-text);font-size:var(--form-field-font-size);font-weight:500;line-height:var(--form-field-line-height);box-sizing:border-box;cursor:pointer;height:100%;min-height:40px}nv-fieldmultiselect .non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fieldmultiselect .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-fieldmultiselect .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)}nv-fieldmultiselect hr{border:none;border-top:1px solid var(--dropdown-divider-color, #ccc);margin:0.5rem 0}.input-container-multiselect.focus-within,.input-container-multiselect:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}";
|
|
5253
|
+
var NvFieldmultiselectStyle0 = nvFieldmultiselectCss;
|
|
5254
|
+
|
|
5255
|
+
// import { DropdownItemSelectedEventDetail } from '../nv-fielddropdownitemcheck/DropdownItemSelectedEventDetail';
|
|
5256
|
+
/**
|
|
5257
|
+
* @slot content - The content of the list.
|
|
5258
|
+
* @slot leading-input - Content to be placed before the input text, within the input container.
|
|
5259
|
+
* @slot before-input - Content to be placed before the input text, outside the input container.
|
|
5260
|
+
* @slot after-input - Content to be placed after the input text, outside the input container.
|
|
5261
|
+
* @slot label - Content to be placed as the label, will override the label prop.
|
|
5262
|
+
* @slot description - Content to be placed as the description, will override the description prop.
|
|
5263
|
+
* @slot error-description - Content to be placed as the error description, will override the errorDescription prop.
|
|
5264
|
+
*/
|
|
5265
|
+
class NvFieldmultiselect {
|
|
5266
|
+
constructor(hostRef) {
|
|
5267
|
+
registerInstance(this, hostRef);
|
|
5268
|
+
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
5269
|
+
this.multiselectChange = createEvent(this, "multiselectChange", 7);
|
|
5270
|
+
/**
|
|
5271
|
+
* Handle click on the input container.
|
|
5272
|
+
* @param {MouseEvent} event - The click event.
|
|
5273
|
+
*/
|
|
5274
|
+
this.handleInputContainerClick = (event) => {
|
|
5275
|
+
if (this.disabled || this.readonly) {
|
|
5276
|
+
return; // Do nothing if the dropdown is disabled or read-only
|
|
5277
|
+
}
|
|
5278
|
+
const target = event.target;
|
|
5279
|
+
// Check if it is the paragraph or another part of the container
|
|
5280
|
+
if (target.tagName === 'P' || target.tagName === 'SPAN') {
|
|
5281
|
+
this.open = true;
|
|
5282
|
+
this.popoverElement.show();
|
|
5283
|
+
// Simulate focus to trigger "focus-within" style
|
|
5284
|
+
const inputContainer = this.el.querySelector('.input-container');
|
|
5285
|
+
if (inputContainer) {
|
|
5286
|
+
inputContainer.classList.add('focus-within');
|
|
5287
|
+
// Remove the "focus-within" class after a delay or when the popover is closed
|
|
5288
|
+
const removeFocusWithin = () => {
|
|
5289
|
+
inputContainer.classList.remove('focus-within');
|
|
5290
|
+
};
|
|
5291
|
+
// Or remove the class when the popover is closed
|
|
5292
|
+
this.popoverElement.addEventListener('hide', removeFocusWithin);
|
|
5293
|
+
}
|
|
5294
|
+
}
|
|
5295
|
+
};
|
|
5296
|
+
/**
|
|
5297
|
+
* Handle input change.
|
|
5298
|
+
* @param {Event} event - The input event.
|
|
5299
|
+
*/
|
|
5300
|
+
this.handleInput = (event) => {
|
|
5301
|
+
if (!this.filterable)
|
|
5302
|
+
return; // Do not filter if `filterable` is false
|
|
5303
|
+
if (this.disabled || this.readonly) {
|
|
5304
|
+
return; // Do not toggle the state if the dropdown is disabled or read-only
|
|
5305
|
+
}
|
|
5306
|
+
const input = event.target;
|
|
5307
|
+
this.filterText = input.value.toLowerCase();
|
|
5308
|
+
this.value = input.value; // Update the value
|
|
5309
|
+
this.valueChanged.emit(input.value); // Emit an event if needed
|
|
5310
|
+
this.filterItems(); // Update the visibility of items
|
|
5311
|
+
};
|
|
5312
|
+
/**
|
|
5313
|
+
* Handle input focus.
|
|
5314
|
+
*/
|
|
5315
|
+
this.handleInputFocus = () => {
|
|
5316
|
+
if (this.disabled || this.readonly) {
|
|
5317
|
+
return; // Do not toggle the state if the dropdown is disabled or read-only
|
|
5318
|
+
}
|
|
5319
|
+
this.open = true; // Force the popover to open
|
|
5320
|
+
};
|
|
5321
|
+
/**
|
|
5322
|
+
* Handle input blur.
|
|
5323
|
+
*/
|
|
5324
|
+
this.handleInputBlur = () => {
|
|
5325
|
+
// Use a delay to check if the focus is still within the popover
|
|
5326
|
+
setTimeout(() => {
|
|
5327
|
+
if (!this.el.contains(document.activeElement)) {
|
|
5328
|
+
this.open = false;
|
|
5329
|
+
this.popoverElement.hide(); // Close the popover if the focus is outside the component
|
|
5330
|
+
}
|
|
5331
|
+
}, 150);
|
|
5332
|
+
};
|
|
5333
|
+
/**
|
|
5334
|
+
* Toggle the dropdown popover.
|
|
5335
|
+
* @returns {void}
|
|
5336
|
+
*/
|
|
5337
|
+
this.togglePopover = () => {
|
|
5338
|
+
if (this.disabled || this.readonly) {
|
|
5339
|
+
return; // Do not toggle if disabled or read-only
|
|
5340
|
+
}
|
|
5341
|
+
this.open = !this.open;
|
|
5342
|
+
if (this.open) {
|
|
5343
|
+
this.popoverElement.show();
|
|
5344
|
+
// Si le dropdown n'est pas filtrable, focus sur le premier élément
|
|
5345
|
+
if (!this.filterable) {
|
|
5346
|
+
this.focusFirstItem();
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5349
|
+
else {
|
|
5350
|
+
this.popoverElement.hide();
|
|
5351
|
+
}
|
|
5352
|
+
};
|
|
5353
|
+
this.maxHeight = '200px';
|
|
5354
|
+
this.selectedValues = [];
|
|
5355
|
+
this.badgeLabel = 'selected';
|
|
5356
|
+
this.options = [];
|
|
5357
|
+
this.clearable = false;
|
|
5358
|
+
this.inputId = v4();
|
|
5359
|
+
this.label = undefined;
|
|
5360
|
+
this.description = undefined;
|
|
5361
|
+
this.placeholder = undefined;
|
|
5362
|
+
this.name = undefined;
|
|
5363
|
+
this.open = false;
|
|
5364
|
+
this.autocomplete = 'off';
|
|
5365
|
+
this.value = undefined;
|
|
5366
|
+
this.required = false;
|
|
5367
|
+
this.error = false;
|
|
5368
|
+
this.errorDescription = undefined;
|
|
5369
|
+
this.readonly = false;
|
|
5370
|
+
this.disabled = false;
|
|
5371
|
+
this.emptyresult = 'No results found';
|
|
5372
|
+
this.filterText = '';
|
|
5373
|
+
this.filterable = false;
|
|
5374
|
+
this.isFilterable = this.filterable;
|
|
5375
|
+
}
|
|
5376
|
+
handleOpenChanged(event) {
|
|
5377
|
+
this.open = event.detail; // Update `open` based on the popover state
|
|
5378
|
+
}
|
|
5379
|
+
watchFilterableHandler(newValue) {
|
|
5380
|
+
this.isFilterable = newValue;
|
|
5381
|
+
this.filterable = newValue;
|
|
5382
|
+
}
|
|
5383
|
+
watchValueHandler() {
|
|
5384
|
+
// Handle value change and update the corresponding dropdown item if it exists
|
|
5385
|
+
this.setInitialSelection();
|
|
5386
|
+
}
|
|
5387
|
+
/**
|
|
5388
|
+
* Listen for the `itemChecked` event emitted by child items.
|
|
5389
|
+
* Updates the selected values accordingly.
|
|
5390
|
+
* @param {CustomEvent<{ value: string; checked: boolean }>} event - The event object containing the selected value and its checked state.
|
|
5391
|
+
*/
|
|
5392
|
+
handleItemChecked(event) {
|
|
5393
|
+
if (this.disabled || this.readonly)
|
|
5394
|
+
return;
|
|
5395
|
+
const { value, checked } = event.detail;
|
|
5396
|
+
// Si une valeur est définie, met à jour `selectedValues`.
|
|
5397
|
+
if (value) {
|
|
5398
|
+
if (checked) {
|
|
5399
|
+
// Ajoute la valeur si elle est cochée
|
|
5400
|
+
this.selectedValues = [...this.selectedValues, value];
|
|
5401
|
+
}
|
|
5402
|
+
else {
|
|
5403
|
+
// Retire la valeur si elle est décochée
|
|
5404
|
+
this.selectedValues = this.selectedValues.filter(val => val !== value);
|
|
5405
|
+
}
|
|
5406
|
+
}
|
|
5407
|
+
// Émet l'événement `multiselectChange` avec la nouvelle liste des valeurs sélectionnées
|
|
5408
|
+
this.multiselectChange.emit(this.selectedValues);
|
|
5409
|
+
}
|
|
5410
|
+
//#endregion EVENTS
|
|
5411
|
+
/****************************************************************************/
|
|
5412
|
+
//#region METHODS
|
|
5413
|
+
/**
|
|
5414
|
+
* Subscribe to click outside event.
|
|
5415
|
+
*/
|
|
5416
|
+
connectedCallback() {
|
|
5417
|
+
document.addEventListener('click', this.handleClickOutside.bind(this));
|
|
5418
|
+
// Handle pre-selection during component initialization
|
|
5419
|
+
this.setInitialSelection();
|
|
5420
|
+
// Apply filtering if the dropdown is filterable and there is a value
|
|
5421
|
+
if (this.filterable && this.value) {
|
|
5422
|
+
this.filterText = this.value.toLowerCase();
|
|
5423
|
+
this.filterItems(); // Update the visibility of items
|
|
5424
|
+
}
|
|
5425
|
+
else {
|
|
5426
|
+
// Ensure all items are visible if no filtering is applied
|
|
5427
|
+
this.resetFilter();
|
|
5428
|
+
}
|
|
5429
|
+
}
|
|
5430
|
+
/**
|
|
5431
|
+
* Set the initial selection based on the current value and update the inputElement value.
|
|
5432
|
+
*/
|
|
5433
|
+
setInitialSelection() {
|
|
5434
|
+
var _a;
|
|
5435
|
+
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
5436
|
+
const selectedItem = items.find(item => {
|
|
5437
|
+
var _a;
|
|
5438
|
+
return item.getAttribute('label') === this.value ||
|
|
5439
|
+
item.getAttribute('value') === this.value ||
|
|
5440
|
+
((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === this.value;
|
|
5441
|
+
});
|
|
5442
|
+
// Remove 'selected' from all items first to reset the state
|
|
5443
|
+
items.forEach(item => {
|
|
5444
|
+
item.removeAttribute('selected');
|
|
5445
|
+
item.classList.remove('selected');
|
|
5446
|
+
});
|
|
5447
|
+
if (selectedItem) {
|
|
5448
|
+
// Add the `selected` attribute and `selected` class for visual styling
|
|
5449
|
+
selectedItem.setAttribute('selected', 'true');
|
|
5450
|
+
selectedItem.classList.add('selected');
|
|
5451
|
+
// Update the value and inputElement value to reflect the pre-selected item
|
|
5452
|
+
this.value =
|
|
5453
|
+
selectedItem.getAttribute('label') ||
|
|
5454
|
+
selectedItem.getAttribute('value') ||
|
|
5455
|
+
((_a = selectedItem.textContent) === null || _a === void 0 ? void 0 : _a.trim()) ||
|
|
5456
|
+
'';
|
|
5457
|
+
if (this.inputElement) {
|
|
5458
|
+
this.inputElement.value = this.value;
|
|
5459
|
+
}
|
|
5460
|
+
}
|
|
5461
|
+
}
|
|
5462
|
+
/**
|
|
5463
|
+
* Unsubscribe from click outside event.
|
|
5464
|
+
*/
|
|
5465
|
+
disconnectedCallback() {
|
|
5466
|
+
document.removeEventListener('click', this.handleClickOutside.bind(this));
|
|
5467
|
+
}
|
|
5468
|
+
/**
|
|
5469
|
+
* Filter dropdown items based on the text entered by the user.
|
|
5470
|
+
* If no items are found, display a message indicating no results.
|
|
5471
|
+
*/
|
|
5472
|
+
filterItems() {
|
|
5473
|
+
var _a;
|
|
5474
|
+
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
5475
|
+
// Remove the "no results found" item if it exists
|
|
5476
|
+
const existingEmptyItem = this.el.querySelector('nv-fielddropdownitemcheck[data-empty]');
|
|
5477
|
+
if (existingEmptyItem) {
|
|
5478
|
+
existingEmptyItem.remove();
|
|
5479
|
+
}
|
|
5480
|
+
let hasVisibleItems = false;
|
|
5481
|
+
// Iterate over all items and adjust their visibility
|
|
5482
|
+
items.forEach(item => {
|
|
5483
|
+
var _a, _b;
|
|
5484
|
+
const textContent = ((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || ''; // Get the textual content of the slot
|
|
5485
|
+
const value = ((_b = item.value) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || ''; // Get the value of the `value` attribute
|
|
5486
|
+
// Check if the filtered text is present either in the value or in the textual content
|
|
5487
|
+
const shouldShow = value.includes(this.filterText) ||
|
|
5488
|
+
textContent.includes(this.filterText);
|
|
5489
|
+
item.style.display = shouldShow ? '' : 'none'; // Hide or show the item
|
|
5490
|
+
if (shouldShow) {
|
|
5491
|
+
hasVisibleItems = true;
|
|
5492
|
+
}
|
|
5493
|
+
});
|
|
5494
|
+
// If no items are visible, add the "no results found" item
|
|
5495
|
+
if (!hasVisibleItems) {
|
|
5496
|
+
const emptyItem = document.createElement('nv-fielddropdownitemcheck');
|
|
5497
|
+
emptyItem.setAttribute('data-empty', 'true');
|
|
5498
|
+
emptyItem.setAttribute('disabled', 'true');
|
|
5499
|
+
emptyItem.textContent = this.emptyresult;
|
|
5500
|
+
(_a = this.el.querySelector('ul[slot="content"]')) === null || _a === void 0 ? void 0 : _a.appendChild(emptyItem);
|
|
5501
|
+
}
|
|
5502
|
+
}
|
|
5503
|
+
/**
|
|
5504
|
+
* Reset the filter and make all items visible.
|
|
5505
|
+
*/
|
|
5506
|
+
resetFilter() {
|
|
5507
|
+
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
5508
|
+
items.forEach(item => {
|
|
5509
|
+
item.style.display = '';
|
|
5510
|
+
});
|
|
5511
|
+
}
|
|
5512
|
+
/**
|
|
5513
|
+
* Retrieves the current filter text entered by the user.
|
|
5514
|
+
* @returns {string} The filter text.
|
|
5515
|
+
*/
|
|
5516
|
+
async getFilterText() {
|
|
5517
|
+
return this.filterText;
|
|
5518
|
+
}
|
|
5519
|
+
/**
|
|
5520
|
+
* Handle click outside the component.
|
|
5521
|
+
* @param {MouseEvent} event - The click event.
|
|
5522
|
+
*/
|
|
5523
|
+
handleClickOutside(event) {
|
|
5524
|
+
if (this.el.contains(event.target) ||
|
|
5525
|
+
(this.inputElement && this.inputElement.contains(event.target))) {
|
|
5526
|
+
// If the click is inside the component or on the input, do not close the popover
|
|
5527
|
+
return;
|
|
5528
|
+
}
|
|
5529
|
+
this.popoverElement.hide(); // Close the popover if the click is outside the component
|
|
5530
|
+
}
|
|
5531
|
+
handleKeyDown(event) {
|
|
5532
|
+
if (!this.open) {
|
|
5533
|
+
if (event.key === 'ArrowDown') {
|
|
5534
|
+
this.open = true;
|
|
5535
|
+
this.popoverElement.show();
|
|
5536
|
+
// Focus sur le premier élément si la liste n'est pas filtrable
|
|
5537
|
+
if (!this.filterable) {
|
|
5538
|
+
this.focusFirstItem();
|
|
5539
|
+
}
|
|
5540
|
+
event.preventDefault();
|
|
5541
|
+
return;
|
|
5542
|
+
}
|
|
5543
|
+
return;
|
|
5544
|
+
}
|
|
5545
|
+
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
5546
|
+
if (items.length === 0) {
|
|
5547
|
+
console.warn('No dropdown items found to navigate');
|
|
5548
|
+
return;
|
|
5549
|
+
}
|
|
5550
|
+
let currentIndex = items.findIndex(item => item.classList.contains('highlighted'));
|
|
5551
|
+
if (event.key === 'ArrowDown') {
|
|
5552
|
+
event.preventDefault();
|
|
5553
|
+
currentIndex = (currentIndex + 1) % items.length;
|
|
5554
|
+
this.updateHighlightedItem(items, currentIndex);
|
|
5555
|
+
}
|
|
5556
|
+
else if (event.key === 'ArrowUp') {
|
|
5557
|
+
event.preventDefault();
|
|
5558
|
+
currentIndex = (currentIndex - 1 + items.length) % items.length;
|
|
5559
|
+
this.updateHighlightedItem(items, currentIndex);
|
|
5560
|
+
}
|
|
5561
|
+
else if (event.key === 'Enter' && currentIndex >= 0) {
|
|
5562
|
+
event.preventDefault();
|
|
5563
|
+
items[currentIndex].click();
|
|
5564
|
+
}
|
|
5565
|
+
else if (event.key === 'Escape') {
|
|
5566
|
+
event.preventDefault();
|
|
5567
|
+
this.open = false;
|
|
5568
|
+
this.popoverElement.hide();
|
|
5569
|
+
if (this.inputElement) {
|
|
5570
|
+
this.inputElement.blur();
|
|
5571
|
+
}
|
|
5572
|
+
}
|
|
5573
|
+
}
|
|
5574
|
+
updateHighlightedItem(items, index) {
|
|
5575
|
+
items.forEach((item, i) => {
|
|
5576
|
+
if (i === index) {
|
|
5577
|
+
item.classList.add('highlighted');
|
|
5578
|
+
item.setAttribute('tabindex', '0');
|
|
5579
|
+
item.focus();
|
|
5580
|
+
}
|
|
5581
|
+
else {
|
|
5582
|
+
item.classList.remove('highlighted');
|
|
5583
|
+
item.setAttribute('tabindex', '-1');
|
|
5584
|
+
}
|
|
5585
|
+
});
|
|
5586
|
+
}
|
|
5587
|
+
focusFirstItem() {
|
|
5588
|
+
const firstItem = this.el.querySelector('nv-fielddropdownitemcheck');
|
|
5589
|
+
if (firstItem) {
|
|
5590
|
+
firstItem.setAttribute('tabindex', '0');
|
|
5591
|
+
firstItem.classList.add('highlighted');
|
|
5592
|
+
firstItem.focus();
|
|
5593
|
+
}
|
|
5594
|
+
else {
|
|
5595
|
+
console.warn('No first item found to focus');
|
|
5596
|
+
}
|
|
5597
|
+
}
|
|
5598
|
+
//#endregion METHODS
|
|
5599
|
+
/****************************************************************************/
|
|
5600
|
+
//#region RENDER
|
|
5601
|
+
render() {
|
|
5602
|
+
return (hAsync(Host, { key: '8491eef8fe6d3df7b6cc1992c2894e8dd2513a6c' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '79c49fdbcdf7ca404880d318c59afe5096bf4b9e', htmlFor: this.inputId }, hAsync("slot", { key: 'f4eba554fc97e2ae1a24f01a20d3e37ab84acae4', name: "label" }, this.label))), hAsync("nv-popover", { key: '46b5a94caa12e50b592de484b158ba67715cec14', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '473a98f6c7636d65b1d9d35beb6f3c5ba012179f', class: "input-wrapper-multiselect", slot: "trigger" }, hAsync("slot", { key: '4038e51342c18e735ea2c164a1658f0928f3f7e1', name: "before-input" }), hAsync("div", { key: 'cb53b835fb716e20f79593cdf7874f64987a8cc5', class: "input-container-multiselect", onClick: this.handleInputContainerClick }, hAsync("slot", { key: 'c5879628d28b7901bca1da93499ed83f661e1fe3', name: "leading-input" }), this.isFilterable || this.disabled || this.readonly ? (hAsync("input", { id: this.inputId, type: "search", ref: e => (this.inputElement = e), autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.value, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onKeyDown: this.handleKeyDown })) : (hAsync("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClick, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocus }, hAsync("span", null, this.value || this.placeholder))), hAsync("nv-iconbutton", { key: '8459a377fbee5cebc457bcc53385a6e8832e4781', class: "toggle-dropdown-icon", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', "aria-pressed": this.open.toString(), onClick: this.togglePopover })), hAsync("slot", { key: 'f338a93f4eaac472817ce32f72695e8ea026b3d7', name: "after-input" })), hAsync("slot", { key: 'e9c871135bbed4f64113ab6a7ff5342a3374860e', name: "content" }, hAsync("ul", { key: 'd129ae2fcf0d84d7337b886fbd7a0b64dc6e0c3e' }, this.options.map(option => (hAsync("li", { class: {
|
|
5603
|
+
'dropdown-item': true,
|
|
5604
|
+
'is-selected': this.selectedValues.includes(option.value),
|
|
5605
|
+
}, "aria-selected": this.selectedValues
|
|
5606
|
+
.includes(option.value)
|
|
5607
|
+
.toString(), role: "option" }, hAsync("nv-fielddropdownitemcheck", { value: option.value, label: option.label, checked: this.selectedValues.includes(option.value) }))))))), (this.description ||
|
|
5608
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '66ce27f7c0ee316381c12664130518e84e080fd4', class: "description" }, hAsync("slot", { key: '9a7bd32d04f2b451fff8d6546273097c7bf8b0cc', name: "description" }, this.description))), (this.errorDescription ||
|
|
5609
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'ffcc1911fb6485e2b34dbb1dfb775d2800bfd940', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'd77fe0f486d0d0e9a905463f85fb91edbf7c0854', name: "error-description" }, this.errorDescription)))));
|
|
5610
|
+
}
|
|
5611
|
+
static get formAssociated() { return true; }
|
|
5612
|
+
get el() { return getElement(this); }
|
|
5613
|
+
static get watchers() { return {
|
|
5614
|
+
"filterable": ["watchFilterableHandler"],
|
|
5615
|
+
"value": ["watchValueHandler"]
|
|
5616
|
+
}; }
|
|
5617
|
+
static get style() { return NvFieldmultiselectStyle0; }
|
|
5618
|
+
static get cmpMeta() { return {
|
|
5619
|
+
"$flags$": 68,
|
|
5620
|
+
"$tagName$": "nv-fieldmultiselect",
|
|
5621
|
+
"$members$": {
|
|
5622
|
+
"maxHeight": [513, "max-height"],
|
|
5623
|
+
"badgeLabel": [513, "badge-label"],
|
|
5624
|
+
"options": [16],
|
|
5625
|
+
"clearable": [516],
|
|
5626
|
+
"inputId": [513, "input-id"],
|
|
5627
|
+
"label": [513],
|
|
5628
|
+
"description": [513],
|
|
5629
|
+
"placeholder": [513],
|
|
5630
|
+
"name": [513],
|
|
5631
|
+
"open": [1540],
|
|
5632
|
+
"autocomplete": [513],
|
|
5633
|
+
"value": [1537],
|
|
5634
|
+
"required": [516],
|
|
5635
|
+
"error": [516],
|
|
5636
|
+
"errorDescription": [513, "error-description"],
|
|
5637
|
+
"readonly": [516],
|
|
5638
|
+
"disabled": [516],
|
|
5639
|
+
"emptyresult": [513],
|
|
5640
|
+
"filterable": [1540],
|
|
5641
|
+
"selectedValues": [32],
|
|
5642
|
+
"filterText": [32],
|
|
5643
|
+
"isFilterable": [32],
|
|
5644
|
+
"getFilterText": [64]
|
|
5645
|
+
},
|
|
5646
|
+
"$listeners$": [[0, "openChanged", "handleOpenChanged"], [0, "itemChecked", "handleItemChecked"], [0, "keydown", "handleKeyDown"]],
|
|
5647
|
+
"$lazyBundleId$": "-",
|
|
5648
|
+
"$attrsToReflect$": [["maxHeight", "max-height"], ["badgeLabel", "badge-label"], ["clearable", "clearable"], ["inputId", "input-id"], ["label", "label"], ["description", "description"], ["placeholder", "placeholder"], ["name", "name"], ["open", "open"], ["autocomplete", "autocomplete"], ["value", "value"], ["required", "required"], ["error", "error"], ["errorDescription", "error-description"], ["readonly", "readonly"], ["disabled", "disabled"], ["emptyresult", "emptyresult"], ["filterable", "filterable"]]
|
|
5649
|
+
}; }
|
|
5650
|
+
}
|
|
5651
|
+
|
|
5192
5652
|
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 padding: calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);\n justify-content: center;\n align-items: center;\n gap: var(--form-field-gap);\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);\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 {\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 text-overflow: ellipsis;\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}\nnv-fieldnumber .input-wrapper .input-container .stepper {\n position: absolute;\n right: 0;\n height: 100%;\n display: flex;\n align-items: center;\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-icon {\n color: var(--components-form-field-icon-default);\n height: 100%;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper nv-icon:first-child {\n padding: var(--form-field-inner-button-padding-y) var(--form-field-inner-button-padding-x-int) var(--form-field-inner-button-padding-y) var(--form-field-inner-button-padding-x-ext);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper nv-icon:last-child {\n padding: var(--form-field-inner-button-padding-y) var(--form-field-inner-button-padding-x-ext) var(--form-field-inner-button-padding-y) var(--form-field-inner-button-padding-x-int);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper nv-icon:hover {\n background: var(--color-interaction-neutral-background-hover);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper-spacer {\n width: calc(2 * (var(--form-field-icon-size) + var(--form-field-inner-button-padding-x-ext) + var(--form-field-inner-button-padding-x-int)) + var(--form-field-padding-x) + var(--notification-border-width-low-emphasis));\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}";
|
|
5193
5653
|
var NvFieldnumberStyle0 = nvFieldnumberCss;
|
|
5194
5654
|
|
|
@@ -5268,9 +5728,9 @@ class NvFieldnumber {
|
|
|
5268
5728
|
/****************************************************************************/
|
|
5269
5729
|
//#region RENDER
|
|
5270
5730
|
render() {
|
|
5271
|
-
return (hAsync(Host, { key: '
|
|
5272
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
5273
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
5731
|
+
return (hAsync(Host, { key: 'a3b8d64f764fd236278e67c626327b211a2bc30a' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'bb5d9824708bf35f1b73dbfb4ab30e6fede19f44', htmlFor: this.inputId }, hAsync("slot", { key: 'eda2d2f07714a1095334ba2706ccbb87d815bd33', name: "label" }, this.label))), hAsync("div", { key: '428c24da018c0f4f05343534fea2a37799172fc2', class: "input-wrapper" }, hAsync("slot", { key: '9a58edf56e297b0ebcd184baca8e146b303b6f8e', name: "before-input" }), hAsync("div", { key: '49114d52c107caea529a16f7732b760d988f9afb', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: 'b3c22781468a05404188d71975803ec11b0fad62', name: "leading-input" }), hAsync("input", { key: '597370e1fa23eb83a1a5f2580870ad462c7cbae1', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", 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 && (hAsync("nv-icon", { key: '6a875290196c12c777566cf27ec9dcfca6d0c798', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '678953d63353f9c245f2908c82ec24d3b599306a', name: "circle-check", class: "validation", size: "md" })), hAsync("div", { key: '0e9b75ef761a5b82190ba2ad1f5a5fc5b63301fc', class: "stepper-spacer" }), hAsync("div", { key: 'a100967e0c8f985808ee6f221521e85580a22e4b', class: "stepper" }, hAsync("nv-icon", { key: 'd90e5e4f4de5a4f0cdceb5384bf643a42757a84b', name: "minus", size: "md", onClick: this.handleMinus, class: clsx({ disabled: this.isMinValueReached() }) }), hAsync("nv-icon", { key: '09023dc13c43dbe9a75382105bd9bdff1c7aa97c', name: "plus", size: "md", onClick: this.handlePlus, class: clsx({ disabled: this.isMaxValueReached() }) }))), hAsync("slot", { key: '3a558b9d20cc2b28bb8ac08ee1305b8026c5c5b8', name: "after-input" })), (this.description ||
|
|
5732
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'c4ab45b3528fd0e21439f8966faf725d6cbbd054', class: "description" }, hAsync("slot", { key: 'f0e4fbf1c6c04476d97034fedea2e9bc4bbc4463', name: "description" }, this.description))), (this.errorDescription ||
|
|
5733
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'a639b3720d2cf584d22896676e90ff82ab08e2d6', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '4e6c53cec245b254207fb57452568306fa7777b7', name: "error-description" }, this.errorDescription)))));
|
|
5274
5734
|
}
|
|
5275
5735
|
static get formAssociated() { return true; }
|
|
5276
5736
|
get el() { return getElement(this); }
|
|
@@ -5371,9 +5831,9 @@ class NvFieldpassword {
|
|
|
5371
5831
|
/****************************************************************************/
|
|
5372
5832
|
//#region RENDER
|
|
5373
5833
|
render() {
|
|
5374
|
-
return (hAsync(Host, { key: '
|
|
5375
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
5376
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
5834
|
+
return (hAsync(Host, { key: '3b83c474000bd8a34aeb5f7363d49de26b2c2680' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '59f247422c68fa70680cd556ff5cbe7d7dd929b2', htmlFor: this.inputId }, hAsync("slot", { key: 'c9bb7201668cf2457f59a55c976a816e5c77252c', name: "label" }, this.label))), hAsync("div", { key: 'd947f2a1b906b101714875ec08a24c7c0d1f4909', class: "input-wrapper" }, hAsync("slot", { key: 'f023af3d9ed156a27eb3623a17670cc8813c5bb8', name: "before-input" }), hAsync("div", { key: '9581ad75398638ebd54d3c7e54510dfbbf8497db', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: 'c946a46456e237a0f9a40659c453eceb3147f129', name: "leading-input" }), hAsync("input", { key: '47b731bf7a8bd5a9ad37855971fbd8f1efda1677', id: this.inputId, ref: e => (this.inputElement = e), 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.hidePasswordIcon && (hAsync("nv-iconbutton", { key: '3076ce72bead47d1e903bcbbac0e857020126d58', class: "toggle-password-icon", name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, onKeyDown: this.handleKeyDown, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() })), (this.success || this.error) && (hAsync("nv-icon", { key: '168a6245ce8bd32685c9a628117876987a0d7347', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" }))), hAsync("slot", { key: 'ac33fe20e562dff96ae1554455900b59798be874', name: "after-input" })), (this.description ||
|
|
5835
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '2983712f72ee3d5188e5a29893b38010dcea7b6b', class: "description" }, hAsync("slot", { key: 'c6523453b9fb2da50413f5ce643f4d89ab352dcb', name: "description" }, this.description))), (this.errorDescription ||
|
|
5836
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '7461dd7d908c3f972776cd22ebd157a32f5b8f3c', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'ea012f1732fc455e797aef90f10ea86a6ce947da', name: "error-description" }, this.errorDescription)))));
|
|
5377
5837
|
}
|
|
5378
5838
|
static get formAssociated() { return true; }
|
|
5379
5839
|
get el() { return getElement(this); }
|
|
@@ -5475,9 +5935,9 @@ class NvFieldradio {
|
|
|
5475
5935
|
/****************************************************************************/
|
|
5476
5936
|
//#region RENDER
|
|
5477
5937
|
render() {
|
|
5478
|
-
return (hAsync(Host, { key: '
|
|
5479
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
5480
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
5938
|
+
return (hAsync(Host, { key: 'a8b1186795a3dad169078bce07f41255d81ee5c7', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, hAsync("input", { key: '6dbd0a12f435706e15ea563f20e09ed07ad7acb5', type: "radio", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), hAsync("div", { key: 'b0dd4b9e94b34746992c999e0670168b9c426fd4', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '3322b627728e3c12e0b964350af8708143029bde', htmlFor: this.inputId }, hAsync("slot", { key: '72e61a533cc32c5cd447d1eaf74f599907b526e8', name: "label" }, this.label))), (this.description ||
|
|
5939
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '4e136ff319c090deba878ca3b64939484c1545c2', class: "description" }, hAsync("slot", { key: '41ab10aeac57c627096f06df69ebd1bb7e8d2341', name: "description" }, this.description))), (this.errorDescription ||
|
|
5940
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '675e61e361a4a0e1863156838f8580d5fd48b14b', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '182947d22634957b571a7d9260bde3a7f6f8d8c1', name: "error-description" }, this.errorDescription))))));
|
|
5481
5941
|
}
|
|
5482
5942
|
static get formAssociated() { return true; }
|
|
5483
5943
|
get el() { return getElement(this); }
|
|
@@ -5779,13 +6239,13 @@ class NvFieldselect {
|
|
|
5779
6239
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
5780
6240
|
*/
|
|
5781
6241
|
render() {
|
|
5782
|
-
return (hAsync(Host, { key: '
|
|
6242
|
+
return (hAsync(Host, { key: '311593e5930fd3ce1f973f351915526783b8a3ec' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '1075e1f17c0ced7dfe2910a26e868d48acb1d42e', htmlFor: this.selectId }, hAsync("slot", { key: '4e302b832bb1024c6a3d7ab5c1eb0a1fcc9c1988', name: "label" }, this.label))), hAsync("div", { key: '5bd2d63555668b337b646ad68cb915391d4c42f3', class: "select-wrapper" }, hAsync("slot", { key: '59f848679390b13a2e6677e5ab80091353a3ce37', name: "before-input" }), hAsync("div", { key: '55621c6e06cc7ce1f47afa70ad94fa1644f10887', class: "select-container", onClick: this.handleSelectContainerClick }, hAsync("slot", { key: '14b265ca1217598ca9738983398fec805ca0bb78', name: "leading-input" }), this.internalReadonly && (hAsync("input", { key: '33338c73698f8a032f40e296e02837db8f85bbd6', id: this.selectId + '-readonly', type: "text", value: this.computedDisplayValue, readOnly: true, class: "readonly-input", "aria-readonly": "true", "aria-label": this.label, "aria-describedby": this.error
|
|
5783
6243
|
? `${this.selectId}-error`
|
|
5784
|
-
: `${this.selectId}-description` })), hAsync("select", { key: '
|
|
6244
|
+
: `${this.selectId}-description` })), hAsync("select", { key: '6e8e427b566615f893a08e434a4c3f85c06ac2a2', id: this.selectId, ref: el => (this.selectElement = el), name: this.name, disabled: this.disabled, required: this.required, multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
|
|
5785
6245
|
? `${this.selectId}-error`
|
|
5786
|
-
: `${this.selectId}-description` }, hAsync("slot", { key: '
|
|
5787
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
5788
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
6246
|
+
: `${this.selectId}-description` }, hAsync("slot", { key: '32217461d75c0bc91b2fe73e39fd6a493746f0a9' })), this.internalReadonly && (hAsync("nv-icon", { key: 'ec175d87b3367620f20b60155cf4b8be224ab449', name: "chevron-down", class: "readonly-icon", size: "sm" })), this.error && (hAsync("nv-icon", { key: '4fdb2c10f5ed1151431628873b8bf7722e2b68d0', name: "alert-circle", class: "validation", size: "sm" })), this.success && (hAsync("nv-icon", { key: '0c20543304333b87724f630bf4790ba3d7d16b16', name: "circle-check", class: "validation", size: "sm" }))), hAsync("slot", { key: '2cd7c2734e2c52233a0d782c76f967af884764e1', name: "after-input" })), (this.description ||
|
|
6247
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'd7c4b5632f678d092a5ff95a00d4df3acf8afefc', class: "description", id: `${this.selectId}-description` }, hAsync("slot", { key: 'f0a51369f018fef3b69811726d34634a4274ebab', name: "description" }, this.description))), (this.errorDescription ||
|
|
6248
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'c72d98d88fa763042ca6a97a53320d4cfec3ce00', class: "error-description", id: `${this.selectId}-error` }, hAsync("slot", { key: '50de0d322e4a8a0d57231c114186a646529f0276', name: "error-description" }, this.errorDescription)))));
|
|
5789
6249
|
}
|
|
5790
6250
|
static get formAssociated() { return true; }
|
|
5791
6251
|
get el() { return getElement(this); }
|
|
@@ -5895,9 +6355,9 @@ class NvFieldtext {
|
|
|
5895
6355
|
/****************************************************************************/
|
|
5896
6356
|
//#region RENDER
|
|
5897
6357
|
render() {
|
|
5898
|
-
return (hAsync(Host, { key: '
|
|
5899
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
5900
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
6358
|
+
return (hAsync(Host, { key: '30cccf8007d80765860eb1344d9d280d3b49ea42' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'a2c1726e3102b4d14dd92d02083f7ec6c0cd411e', htmlFor: this.inputId }, hAsync("slot", { key: 'dde6902e511d4436302b1d82bae7799a66120394', name: "label" }, this.label))), hAsync("div", { key: '72ae532cf928fa102e1b22225feffc351f1bc457', class: "input-wrapper" }, hAsync("slot", { key: '52b5464d5de9cbfe95bdd35c4619ed1fc9fe6f78', name: "before-input" }), hAsync("div", { key: '206542310bccb142eeeaf4abda370a308ae254a9', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '41b1c75e25e18212cd730bff7daee7502c847be7', name: "leading-input" }), hAsync("input", { key: '57e219bb9680e134f741b031958c9463e5d6d24c', 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, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), this.error && (hAsync("nv-icon", { key: '6fbcacfe2acd35748cff049a011c3c957ee0c909', name: "alert-circle", class: "validation", size: "sm" })), this.success && (hAsync("nv-icon", { key: '46da7a1c2805c6ad1f7c5ae201d4de3e1adf2e17', name: "circle-check", class: "validation", size: "sm" }))), hAsync("slot", { key: 'f2a341dcb2d7bf6cd094812b000023b183cc9c9e', name: "after-input" })), (this.description ||
|
|
6359
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'd75de043cf06e26e688fdd799ee3c78bffed7e82', class: "description" }, hAsync("slot", { key: '6f2ca8884fad345357651b798aab559ced31d12c', name: "description" }, this.description))), (this.errorDescription ||
|
|
6360
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'ec4ddeeb8677b7483eaef7ddd7c51446d4c8d5aa', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '077d8437bcb354900cd9d87ec721cb0f627c3877', name: "error-description" }, this.errorDescription)))));
|
|
5901
6361
|
}
|
|
5902
6362
|
static get formAssociated() { return true; }
|
|
5903
6363
|
get el() { return getElement(this); }
|
|
@@ -6066,9 +6526,9 @@ class NvFieldtextarea {
|
|
|
6066
6526
|
/****************************************************************************/
|
|
6067
6527
|
//#region RENDER
|
|
6068
6528
|
render() {
|
|
6069
|
-
return (hAsync(Host, { key: '
|
|
6070
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
6071
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
6529
|
+
return (hAsync(Host, { key: '0598ad37f0c12f0fda513fd7ffe67225d2a44a4d' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '1cd2b826969fea01765369aedd6f4d5bce7c6a70', htmlFor: this.textareaId }, hAsync("slot", { key: 'dc05b50149123674953a9005d6db8f87eafe78ca', name: "label" }, this.label))), hAsync("div", { key: 'd74e98654af707b2fd374f6c7e0f0416a240514d', class: "textarea-wrapper" }, hAsync("div", { key: '8a2314259104f40c7deb4b28bca88e0926803895', class: "textarea-container", onClick: this.handleTextareaContainerClick }, hAsync("textarea", { key: '7b477d27aa4abdacab00443e45564fd1202bbf9b', id: this.textareaId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, autocomplete: "off", value: this.value, onInput: this.handleTextarea, rows: this.rows, class: clsx(this.getResize()) }))), (this.description ||
|
|
6530
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '17b2890bacaae204b5e8f1b9da48038317a16a9c', class: "description" }, hAsync("slot", { key: 'f32d1b730ec843a3c8c19f00983f2c9f041c8fcd', name: "description" }, this.description))), (this.errorDescription ||
|
|
6531
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '7ecb127dc057e5d2fb9e330d9c79c0f12ed14b8e', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '621fd3cb88771242aeb87646e41711f79bfaae17', name: "error-description" }, this.errorDescription)))));
|
|
6072
6532
|
}
|
|
6073
6533
|
static get formAssociated() { return true; }
|
|
6074
6534
|
get el() { return getElement(this); }
|
|
@@ -6154,8 +6614,8 @@ class NvFieldtoggle {
|
|
|
6154
6614
|
}
|
|
6155
6615
|
/********************************* RENDER ***********************************/
|
|
6156
6616
|
render() {
|
|
6157
|
-
return (hAsync(Host, { key: '
|
|
6158
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
6617
|
+
return (hAsync(Host, { key: '367c438a430481a14f0b9b772c898f97c8d6da4d', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, hAsync("div", { key: 'b1a29fbcab71e95d9ef87088316c600b5467f533', class: "input-container" }, hAsync("input", { key: '7fe8a8c9c2e9e05ba6fb4511606cc90306cf0de4', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), hAsync("div", { key: '0ffb1fd89f31b7710a20340144d52feb93ca4360', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '0086b54008008dadb6d3501d2632fe96e223af03', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: 'cd83067ab5172bd90ddbbd3c925a78576aa6e139', name: "label" }, this.label))), (this.description ||
|
|
6618
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'aec1639e7f157d372ec095cda64813b15a9c9c39', class: "description" }, hAsync("slot", { key: '9416422ec7f93b40c199b3202c4546e609313486', name: "description" }, this.description))))));
|
|
6159
6619
|
}
|
|
6160
6620
|
get el() { return getElement(this); }
|
|
6161
6621
|
static get watchers() { return {
|
|
@@ -6233,7 +6693,7 @@ class NvIcon {
|
|
|
6233
6693
|
//#region RENDER
|
|
6234
6694
|
render() {
|
|
6235
6695
|
//const iconSprite = getAssetPath('assets/icon-sprite.svg');
|
|
6236
|
-
return (hAsync(Host, { key: '
|
|
6696
|
+
return (hAsync(Host, { key: '6831debeaf9f3b8fb3ade7132fa985b01104e423', class: clsx(this.color && `${this.color}`), role: "img", "aria-label": `${this.name}-icon` }, hAsync("svg", { key: '6319922bd5537f4098b226aa9945719ece686fb2', stroke: "currentColor", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: `nv-icon-${this.size}` }, hAsync("use", { key: '47e3a338e2e1e40ccccd70973f55939829b9cde5', href: `${this.spriteUrl}#${this.name}` }))));
|
|
6237
6697
|
}
|
|
6238
6698
|
static get style() { return NvIconStyle0; }
|
|
6239
6699
|
static get cmpMeta() { return {
|
|
@@ -6330,7 +6790,7 @@ class NvIconbutton {
|
|
|
6330
6790
|
/****************************************************************************/
|
|
6331
6791
|
//#region RENDER
|
|
6332
6792
|
render() {
|
|
6333
|
-
return (hAsync(Host, { key: '
|
|
6793
|
+
return (hAsync(Host, { key: 'dc918224a0fcbea4bc0d299fcd86a066c9fb2a6e', role: "button", type: this.type, tabindex: "0", disabled: this.disabled ? true : undefined, class: clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && hAsync("nv-loader", { key: '7f2484c41aa8b8dc2d6e40f4174c486e95efe65b', size: this.size }), !this.loading && hAsync("nv-icon", { key: '772c5d352e9eb65911ee68fcbeeb6f1b1ad3606a', name: this.name, size: this.size }), hAsync("slot", { key: 'e4bdc61098a178a8c12a898410b5131105a1b6f4' })));
|
|
6334
6794
|
}
|
|
6335
6795
|
static get formAssociated() { return true; }
|
|
6336
6796
|
get el() { return getElement(this); }
|
|
@@ -6372,7 +6832,7 @@ class NvLoader {
|
|
|
6372
6832
|
//#region RENDER
|
|
6373
6833
|
/* <slot> empty to force rendering change */
|
|
6374
6834
|
render() {
|
|
6375
|
-
return (hAsync(Host, { key: '
|
|
6835
|
+
return (hAsync(Host, { key: 'd6bc07fa876b14f8332275b0013eb0957463448d', class: clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
6376
6836
|
}
|
|
6377
6837
|
static get style() { return NvLoaderStyle0; }
|
|
6378
6838
|
static get cmpMeta() { return {
|
|
@@ -6566,7 +7026,7 @@ class NvMenu {
|
|
|
6566
7026
|
/****************************************************************************/
|
|
6567
7027
|
//#region RENDER
|
|
6568
7028
|
render() {
|
|
6569
|
-
return (hAsync(Host, { key: '
|
|
7029
|
+
return (hAsync(Host, { key: '080871f790f3725ee0c627ff6f2c23b0b9c67ed9' }, hAsync("slot", { key: '8b2b2392d606f14b61c7c3ea799273948b045d0d', name: "trigger" }), hAsync("nv-popover", { key: '33bae39e185e26a23aa0d7d9d2ac7b0f35658fd9', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open }, hAsync("slot", { key: 'f50743c2ed89866882266413e595a03185bd329e', name: "content" }))));
|
|
6570
7030
|
}
|
|
6571
7031
|
get el() { return getElement(this); }
|
|
6572
7032
|
static get style() { return NvMenuStyle0; }
|
|
@@ -8954,7 +9414,7 @@ class NvPopover {
|
|
|
8954
9414
|
/****************************************************************************/
|
|
8955
9415
|
//#region RENDER
|
|
8956
9416
|
render() {
|
|
8957
|
-
return (hAsync(Host, { key: '
|
|
9417
|
+
return (hAsync(Host, { key: '305452892fe5a5889aa81ad8a794f91407965a82' }, hAsync("slot", { key: 'c82770ebfafb46c8e5ceb55b71199873ac7ca039', name: "trigger" }), hAsync("div", { key: '02646f26b908fa4103ebb0a44233a833713c57bc', "data-scope": "popover", hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (hAsync("div", { key: 'dc654f5595b1e9b2fae2b8eab2d8716ad8c1fcee', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), hAsync("slot", { key: '0d2dd2e1fca7f73815add0cd4ff85b41932f01fb', name: "content" }))));
|
|
8958
9418
|
}
|
|
8959
9419
|
get el() { return getElement(this); }
|
|
8960
9420
|
static get watchers() { return {
|
|
@@ -8999,7 +9459,7 @@ class NvRow {
|
|
|
8999
9459
|
/****************************************************************************/
|
|
9000
9460
|
//#region RENDER
|
|
9001
9461
|
render() {
|
|
9002
|
-
return (hAsync(Host, { key: '
|
|
9462
|
+
return (hAsync(Host, { key: 'bccdd262d6d7bcec9a25422886173b75e84e8681' }, hAsync("slot", { key: '5e16847683228465a72ec2f5b03de429cb881d41' })));
|
|
9003
9463
|
}
|
|
9004
9464
|
static get style() { return NvRowStyle0; }
|
|
9005
9465
|
static get cmpMeta() { return {
|
|
@@ -9032,7 +9492,7 @@ class NvStack {
|
|
|
9032
9492
|
/****************************************************************************/
|
|
9033
9493
|
//#region RENDER
|
|
9034
9494
|
render() {
|
|
9035
|
-
return (hAsync(Host, { key: '
|
|
9495
|
+
return (hAsync(Host, { key: 'a06b3c85ea07e19125e1b8b23561869de8c8edcc', class: clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gutter-x-${this.gutter}`, this.gutter && this.vertical && `gutter-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, hAsync("slot", { key: '8d902ed2b636bb6d1d8930c6d89117c7a1081707' })));
|
|
9036
9496
|
}
|
|
9037
9497
|
static get style() { return NvStackStyle0; }
|
|
9038
9498
|
static get cmpMeta() { return {
|
|
@@ -9077,7 +9537,7 @@ class NvTooltip {
|
|
|
9077
9537
|
/****************************************************************************/
|
|
9078
9538
|
//#region RENDER
|
|
9079
9539
|
render() {
|
|
9080
|
-
return (hAsync(Host, { key: '
|
|
9540
|
+
return (hAsync(Host, { key: 'adb606648ce4c11bb1293007a640f90603c66317' }, hAsync("slot", { key: 'eef7d009694b5cd1010c3bf2ef40f46e726f1306' }), hAsync("nv-popover", { key: '5ab73b344c52709cae8e27b519e27b9297f9e048', triggerMode: "hover", hasArrow: true, placement: this.placement, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, hAsync("p", { key: '999764402770b8a19402d2c87c2994aead46ba87', slot: "content" }, this.message), hAsync("slot", { key: '8c4f29a7acb4469ad8a4bced0defc2f8021f125a', name: "content" }))));
|
|
9081
9541
|
}
|
|
9082
9542
|
get el() { return getElement(this); }
|
|
9083
9543
|
static get style() { return NvTooltipStyle0; }
|
|
@@ -9103,6 +9563,8 @@ registerComponents([
|
|
|
9103
9563
|
NvButton,
|
|
9104
9564
|
NvCol,
|
|
9105
9565
|
NvFieldcheckbox,
|
|
9566
|
+
NvFielddropdownitemcheck,
|
|
9567
|
+
NvFieldmultiselect,
|
|
9106
9568
|
NvFieldnumber,
|
|
9107
9569
|
NvFieldpassword,
|
|
9108
9570
|
NvFieldradio,
|