@nova-design-system/nova-webcomponents 3.31.2-beta.4 → 3.33.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/THIRD_PARTY_NOTICES.txt +89925 -90780
- package/dist/cjs/events.utils-CIlm7hGM.js +47 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{index.esm-CG1TVKfu.js → index.esm-D5HbQDBa.js} +48 -30
- package/dist/cjs/nv-calendar.cjs.entry.js +2 -2
- package/dist/cjs/nv-dialog.cjs.entry.js +35 -14
- package/dist/cjs/nv-drawer.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +21 -6
- package/dist/cjs/nv-fieldselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +182 -136
- package/dist/cjs/nv-toggle.cjs.entry.js +1 -1
- package/dist/cjs/v4-_2BfiRUa.js +52 -0
- package/dist/collection/components/nv-dialog/nv-dialog.css +8 -7
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +7 -0
- package/dist/collection/components/nv-dialog/nv-dialog.js +30 -9
- package/dist/collection/components/nv-drawer/nv-drawer.js +2 -2
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js +10 -0
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +20 -5
- package/dist/collection/components/nv-popover/nv-popover.js +13 -7
- package/dist/collection/utils/events.utils.js +28 -10
- package/dist/components/index.js +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +1 -1
- package/dist/components/nv-dialog.js +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-drawer.js +1 -1
- package/dist/components/nv-drawerfooter.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +1 -1
- package/dist/components/nv-fielddaterange.js +1 -1
- package/dist/components/nv-fielddropdown.js +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +1 -1
- package/dist/components/nv-fieldradio.js +1 -1
- package/dist/components/nv-fieldselect.js +1 -1
- package/dist/components/nv-fieldslider.js +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +1 -1
- package/dist/components/nv-fieldtime.js +1 -1
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-menu.js +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-notification.js +1 -1
- package/dist/components/nv-pagination-nav.js +1 -1
- package/dist/components/nv-paginationtable.js +1 -1
- package/dist/components/nv-pill.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-sidebar.js +1 -1
- package/dist/components/nv-sidebarnavitem.js +1 -1
- package/dist/components/nv-statusindicator.js +1 -1
- package/dist/components/nv-tableheader.js +1 -1
- package/dist/components/nv-tag.js +1 -1
- package/dist/components/nv-toggle.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-m37Anefm.js → p-8N4lU0iY.js} +1 -1
- package/dist/components/p-B0u4Ixsb.js +1 -0
- package/dist/components/{p-BWRw4xPL.js → p-B4Bj7woW.js} +1 -1
- package/dist/components/{p-DiZ4PH5U.js → p-BO1b1Va8.js} +1 -1
- package/dist/components/{p-p6cOkAo9.js → p-BRGkbQcZ.js} +1 -1
- package/dist/components/{p-DCP9DeqM.js → p-Bb6b1l7X.js} +1 -1
- package/dist/components/p-BysSxG1C.js +1 -0
- package/dist/components/p-C4Gisby9.js +1 -0
- package/dist/components/{p-CHBitkH2.js → p-C5hX9g5W.js} +1 -1
- package/dist/components/p-CK3_k8jD.js +1 -0
- package/dist/components/p-DBTxpXCn.js +5 -0
- package/dist/components/{p-CM4DYhll.js → p-DNND0rYo.js} +1 -1
- package/dist/components/{p-C0sYXnfw.js → p-DnFgexAD.js} +1 -1
- package/dist/components/{p-151La_Re.js → p-DtrETIc3.js} +1 -1
- package/dist/components/{p-BLVk95gn.js → p-DyrYhAHY.js} +1 -1
- package/dist/components/p-S0RrRAAC.js +1 -0
- package/dist/components/{p-N_OyEprf.js → p-XZ5yyea3.js} +1 -1
- package/dist/components/{p-MJEiA0Bq.js → p-Z4Q7ZQYs.js} +1 -1
- package/dist/components/{p-6T2ybMzE.js → p-iZAJ4_uI.js} +1 -1
- package/dist/components/{p-DQwzzl-e.js → p-vcF-XOKu.js} +1 -1
- package/dist/esm/events.utils-BysSxG1C.js +43 -0
- package/dist/esm/{index.esm-D3eWMME9.js → index.esm-DBTxpXCn.js} +48 -30
- package/dist/esm/index.js +1 -1
- package/dist/esm/nv-calendar.entry.js +2 -2
- package/dist/esm/nv-dialog.entry.js +35 -14
- package/dist/esm/nv-drawer.entry.js +6 -6
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +1 -1
- package/dist/esm/nv-fieldradio.entry.js +21 -6
- package/dist/esm/nv-fieldselect.entry.js +1 -1
- package/dist/esm/nv-fieldslider.entry.js +1 -1
- package/dist/esm/nv-fieldtext.entry.js +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +1 -1
- package/dist/esm/nv-fieldtime.entry.js +1 -1
- package/dist/esm/nv-icon.entry.js +1 -1
- package/dist/esm/nv-notification.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +182 -136
- package/dist/esm/nv-toggle.entry.js +1 -1
- package/dist/esm/v4-CK3_k8jD.js +50 -0
- package/dist/native/index.esm.js +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/p-003aae89.entry.js +1 -0
- package/dist/native/p-0a067f5d.entry.js +1 -0
- package/dist/native/{p-7a2189fd.entry.js → p-0cfa2a12.entry.js} +1 -1
- package/dist/native/{p-29283b5d.entry.js → p-0e1f410b.entry.js} +1 -1
- package/dist/native/{p-f49dac2e.entry.js → p-1a77f957.entry.js} +1 -1
- package/dist/native/{p-fde8def2.entry.js → p-25e0f795.entry.js} +1 -1
- package/dist/native/p-2808c51d.entry.js +1 -0
- package/dist/native/{p-a14356a2.entry.js → p-3ad4b348.entry.js} +1 -1
- package/dist/native/{p-84069455.entry.js → p-5084e62a.entry.js} +1 -1
- package/dist/native/{p-f551703a.entry.js → p-59bab8ca.entry.js} +1 -1
- package/dist/native/p-67c4583d.entry.js +1 -0
- package/dist/native/{p-9ae86283.entry.js → p-6c200454.entry.js} +1 -1
- package/dist/native/{p-282f27a8.entry.js → p-96debbf0.entry.js} +1 -1
- package/dist/native/p-9d4f3fa8.entry.js +1 -0
- package/dist/native/p-BysSxG1C.js +1 -0
- package/dist/native/p-CK3_k8jD.js +1 -0
- package/dist/native/p-DBTxpXCn.js +5 -0
- package/dist/native/p-ab22c992.entry.js +1 -0
- package/dist/native/{p-f35cfcf7.entry.js → p-ade6d065.entry.js} +1 -1
- package/dist/native/{p-006b0662.entry.js → p-c0cb8fbd.entry.js} +1 -1
- package/dist/native/{p-35cca4d2.entry.js → p-c59cbcf7.entry.js} +1 -1
- package/dist/native/{p-0be43863.entry.js → p-dd636420.entry.js} +1 -1
- package/dist/native/{p-9cb72554.entry.js → p-fe8e022f.entry.js} +1 -1
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +10 -0
- package/dist/types/components/nv-fieldradio/nv-fieldradio.d.ts +2 -0
- package/dist/types/utils/events.utils.d.ts +29 -8
- package/hydrate/index.js +358 -245
- package/hydrate/index.mjs +358 -245
- package/package.json +2 -2
- package/dist/cjs/events.utils-BE6R5q9C.js +0 -30
- package/dist/cjs/v4-C1vaJ4yP.js +0 -56
- package/dist/components/p-B4EbX_RC.js +0 -1
- package/dist/components/p-B6GgGra-.js +0 -1
- package/dist/components/p-BdYh22OP.js +0 -1
- package/dist/components/p-CtKp5aji.js +0 -1
- package/dist/components/p-D3eWMME9.js +0 -5
- package/dist/components/p-hklkrJsV.js +0 -1
- package/dist/esm/events.utils-B6GgGra-.js +0 -26
- package/dist/esm/v4-BdYh22OP.js +0 -54
- package/dist/native/p-11ae498c.entry.js +0 -1
- package/dist/native/p-193d5813.entry.js +0 -1
- package/dist/native/p-38b731e1.entry.js +0 -1
- package/dist/native/p-45191d81.entry.js +0 -1
- package/dist/native/p-520e5d0d.entry.js +0 -1
- package/dist/native/p-B6GgGra-.js +0 -1
- package/dist/native/p-BdYh22OP.js +0 -1
- package/dist/native/p-D3eWMME9.js +0 -5
- package/dist/native/p-ba32c793.entry.js +0 -1
|
@@ -8,6 +8,7 @@ const NvDialogDocs = {
|
|
|
8
8
|
'nv-dialogfooter',
|
|
9
9
|
'nv-button',
|
|
10
10
|
'nv-icon',
|
|
11
|
+
'nv-alert',
|
|
11
12
|
'nv-fielddate',
|
|
12
13
|
'nv-fielddaterange',
|
|
13
14
|
],
|
|
@@ -119,6 +120,12 @@ const NvDialogDocs = {
|
|
|
119
120
|
descriptionSource: 'nv-dialogfooter',
|
|
120
121
|
template: (h("nv-dialog", { "data-storybook-args": true }, h("nv-button", { slot: "trigger" }, "Open Dialog"), h("form", { id: "test-form" }), h("nv-dialogfooter", { slot: "footer", form: "test-form" }))),
|
|
121
122
|
},
|
|
123
|
+
// WithAlert
|
|
124
|
+
{
|
|
125
|
+
name: 'WithAlert',
|
|
126
|
+
description: 'An nv-alert inside the dialog body must keep its own background color.',
|
|
127
|
+
template: (h("nv-dialog", { "data-storybook-args": true }, h("nv-button", { slot: "trigger" }, "Open Dialog"), h("nv-dialogheader", { slot: "header", heading: "Dialog Title" }), h("nv-alert", { feedback: "information", message: "Lorem Ipsum" }), h("nv-dialogfooter", { slot: "footer", "cancel-label": "Cancel", "submit-label": "Primary" }))),
|
|
128
|
+
},
|
|
122
129
|
// WithPopoverElements
|
|
123
130
|
{
|
|
124
131
|
name: 'WithPopoverElements',
|
|
@@ -82,6 +82,7 @@ export class NvDialog {
|
|
|
82
82
|
*/
|
|
83
83
|
this.handleDialogPointerDown = (event) => {
|
|
84
84
|
this.pointerDownTarget = event.target;
|
|
85
|
+
this.stopEventPropagation(event);
|
|
85
86
|
};
|
|
86
87
|
/**
|
|
87
88
|
* Handles the click event to close the dialog when clickOutside is true.
|
|
@@ -90,18 +91,33 @@ export class NvDialog {
|
|
|
90
91
|
* @param {MouseEvent} event - The click event.
|
|
91
92
|
*/
|
|
92
93
|
this.handleDialogClick = (event) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
this.stopEventPropagation(event);
|
|
95
|
+
const shouldHandleOutsideClick = this.clickOutside &&
|
|
96
|
+
!this.undismissable &&
|
|
97
|
+
event.target === this.backdropElement &&
|
|
98
|
+
this.pointerDownTarget === this.backdropElement;
|
|
99
|
+
if (shouldHandleOutsideClick && this.checkForOpenPopovers()) {
|
|
100
|
+
// first backdrop click closes nested popovers,
|
|
101
|
+
// second backdrop click closes the dialog itself.
|
|
102
|
+
this.closeOpenPopovers();
|
|
103
|
+
}
|
|
104
|
+
else if (shouldHandleOutsideClick) {
|
|
99
105
|
this.close();
|
|
100
106
|
event.preventDefault();
|
|
101
|
-
event.stopPropagation();
|
|
102
107
|
}
|
|
103
108
|
this.pointerDownTarget = null;
|
|
104
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* Stops events from bubbling past the `<dialog>` element so they don't
|
|
112
|
+
* trigger handlers on ancestors of `nv-dialog` (e.g. a clickable row
|
|
113
|
+
* containing the dialog). The `<dialog>` is promoted to the top layer
|
|
114
|
+
* visually via `showModal()` but its DOM position is unchanged, so bubbling
|
|
115
|
+
* otherwise proceeds normally.
|
|
116
|
+
* @param {Event} event - The event whose propagation should be stopped.
|
|
117
|
+
*/
|
|
118
|
+
this.stopEventPropagation = (event) => {
|
|
119
|
+
event.stopPropagation();
|
|
120
|
+
};
|
|
105
121
|
this.checkForOpenPopovers = () => {
|
|
106
122
|
let hasOpenPopover = false;
|
|
107
123
|
this.el.querySelectorAll('nv-popover').forEach(popover => {
|
|
@@ -111,6 +127,11 @@ export class NvDialog {
|
|
|
111
127
|
});
|
|
112
128
|
return hasOpenPopover;
|
|
113
129
|
};
|
|
130
|
+
this.closeOpenPopovers = () => {
|
|
131
|
+
this.el.querySelectorAll('nv-popover[open]').forEach(popover => {
|
|
132
|
+
popover.open = false;
|
|
133
|
+
});
|
|
134
|
+
};
|
|
114
135
|
}
|
|
115
136
|
//#endregion PROPERTIES
|
|
116
137
|
/****************************************************************************/
|
|
@@ -281,7 +302,7 @@ export class NvDialog {
|
|
|
281
302
|
// this.setupContentBodyListeners();
|
|
282
303
|
}
|
|
283
304
|
disconnectedCallback() {
|
|
284
|
-
if (this.triggerElement &&
|
|
305
|
+
if (this.triggerElement && this.eventsAttached && !this.controlled) {
|
|
285
306
|
removeEventListeners(this.triggerClickEvents, this.triggerElement, this);
|
|
286
307
|
this.eventsAttached = false;
|
|
287
308
|
}
|
|
@@ -292,7 +313,7 @@ export class NvDialog {
|
|
|
292
313
|
//#region RENDER
|
|
293
314
|
render() {
|
|
294
315
|
const hasForm = this.form || this.el.querySelector('form');
|
|
295
|
-
return (h(Host, { key: '
|
|
316
|
+
return (h(Host, { key: 'ddce4af5ea620a9c199f1c3613ff74150f2c0fd7' }, h("slot", { key: 'b5d44222a35e1234ecb6ae9ce7559d167ccdaf2b', name: "trigger" }), h("dialog", { key: '65247cd73bf26a0451692553675bc85d4f5b02a5', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, onPointerDown: this.handleDialogPointerDown, onPointerUp: this.stopEventPropagation, onMouseDown: this.stopEventPropagation, onMouseUp: this.stopEventPropagation, onClick: this.handleDialogClick, onDblClick: this.stopEventPropagation, onContextMenu: this.stopEventPropagation, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx({ full: this.full }) }, h("div", { key: 'e0099c3f416e264f37137ae66957df9393632b13', class: "backdrop", ref: el => (this.backdropElement = el) }, h("div", { key: '5b30f2748e0808d1c529cdcd675cd0c702bc425e', class: "content", ref: el => (this.contentElement = el) }, !this.undismissable && (h("nv-button", { key: '504bb233c7ad0d050bcc11abec2d49b65b9b9299', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDialogClose, "aria-label": "Close dialog" }, h("nv-icon", { key: '6b54a135ffb6dd599323c127b5666b9eef9e513f', name: "x", size: "sm" }))), this.headerElement ? (h("slot", { name: "header" })) : (h("nv-dialogheader", { id: "dialog-header" })), h("div", { key: '67918f89af9d65b1d077786a0af6459dd6cd6cd6', class: "content-body", id: "dialog-content" }, h("slot", { key: '792be8c0785a21af0046aaaaa64844655b57e865' })), this.footerElement ? (h("slot", { name: "footer" })) : (h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onDialogCanceled: this.handleDialogClose, undismissable: this.undismissable })))))));
|
|
296
317
|
}
|
|
297
318
|
static get is() { return "nv-dialog"; }
|
|
298
319
|
static get originalStyleUrls() {
|
|
@@ -413,7 +413,7 @@ export class NvDrawer {
|
|
|
413
413
|
// this.setupContentBodyListeners();
|
|
414
414
|
}
|
|
415
415
|
disconnectedCallback() {
|
|
416
|
-
if (this.triggerElement &&
|
|
416
|
+
if (this.triggerElement && this.eventsAttached && !this.controlled) {
|
|
417
417
|
removeEventListeners(this.triggerClickEvents, this.triggerElement, this);
|
|
418
418
|
this.eventsAttached = false;
|
|
419
419
|
}
|
|
@@ -425,7 +425,7 @@ export class NvDrawer {
|
|
|
425
425
|
render() {
|
|
426
426
|
const hasForm = this.form || this.el.querySelector('form');
|
|
427
427
|
const state = this.open ? 'open' : 'closed';
|
|
428
|
-
return (h(Host, { key: '
|
|
428
|
+
return (h(Host, { key: 'cb7aea38a630886f177e8bf2a7975bbe94715306' }, h("slot", { key: '893e531fbdd14d0a730e816fa3366e8fc8bd3182', name: "trigger" }), h("dialog", { key: 'f8b883b7a645ddfa3f2e1e5a076703254121dde4', ref: el => (this.dialogElement = el), onClose: this.handleDrawerClose, onClick: this.handleDrawerClick, role: "dialog", "aria-modal": "true", "aria-labelledby": "drawer-header", "aria-describedby": "drawer-content", class: clsx({ [`side-${this.side}`]: true }), "data-state": state }, h("div", { key: '25def4d3f8849db90d7ba0c041ea833a36f5bd9f', class: "backdrop", ref: el => (this.backdropElement = el) }, h("div", { key: 'c6214a6686167885a1e1ada2d3fbb121d92afd4d', class: clsx('content', `size-${this.size}`), ref: el => (this.contentElement = el), "data-state": state, "data-side": this.side, style: this.width ? { width: this.width } : {} }, !this.undismissable && (h("nv-button", { key: '3452665b313b546a85f7f7f3215a42097032e9bd', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDrawerClose, "aria-label": "Close drawer" }, h("nv-icon", { key: 'c1112811d3d6c5762a19e6cea4dfaaa522ef6155', name: "x", size: "sm" }))), this.headerElement ? (h("slot", { name: "header" })) : (h("nv-drawerheader", { id: "drawer-header" })), h("div", { key: '3aeb9923ce1045ab84a2fcd7e6be1b283bbdef12', class: "content-body", id: "drawer-content" }, h("slot", { key: 'f616fb61d824b5f5b875fcbe5c9c2bb4f9b4732b' })), this.footerElement ? (h("slot", { name: "footer" })) : (h("nv-drawerfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onDrawerCanceled: this.handleDrawerClose, undismissable: this.undismissable })))))));
|
|
429
429
|
}
|
|
430
430
|
static get is() { return "nv-drawer"; }
|
|
431
431
|
static get originalStyleUrls() {
|
|
@@ -140,6 +140,16 @@ const NvFieldradioDocs = {
|
|
|
140
140
|
},
|
|
141
141
|
template: h("nv-fieldradio", { "data-storybook-args": true }),
|
|
142
142
|
},
|
|
143
|
+
// TwoWayBinding
|
|
144
|
+
{
|
|
145
|
+
name: 'TwoWayBinding',
|
|
146
|
+
description: 'Interactive radio group demonstrating mutual exclusion and two-way binding. ' +
|
|
147
|
+
'Click a radio button to select it — only one option in the group can be active at a time. ' +
|
|
148
|
+
'The checkedChanged event fires exclusively for the newly selected radio; siblings being ' +
|
|
149
|
+
'deselected by the group logic emit nothing. This prevents infinite render loops in ' +
|
|
150
|
+
'frameworks that use two-way data binding (e.g. Blazor @bind-Checked).',
|
|
151
|
+
template: (h("div", { "data-class": "flex flex-col gap-6" }, h("fieldset", { "data-class": "flex flex-col gap-3" }, h("legend", { "data-class": "text-sm font-medium mb-2" }, "Choose your plan"), h("nv-fieldradio", { name: "plan-group", value: "starter", label: "Starter", description: "For individuals", checked: true }), h("nv-fieldradio", { name: "plan-group", value: "pro", label: "Pro", description: "For small teams" }), h("nv-fieldradio", { name: "plan-group", value: "enterprise", label: "Enterprise", description: "For large organizations" })), h("p", { "data-class": "text-sm text-low" }, "Click a radio button \u2014 the selection switches cleanly, and the", ' ', h("strong", null, "Actions"), " panel shows that only the selected radio emits a ", h("code", null, "checkedChanged(true)"), " event."))),
|
|
152
|
+
},
|
|
143
153
|
// RadioGroup
|
|
144
154
|
{
|
|
145
155
|
name: 'RadioGroup',
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Host, h, } from "@stencil/core";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { v4 as uuidv4 } from "uuid";
|
|
4
|
+
// Tracks nv-fieldradio elements being silently reset by the radio-group
|
|
5
|
+
// mutual-exclusion logic in handleChange. Stencil's @Watch fires synchronously
|
|
6
|
+
// inside the prop setter, so adding/deleting around element.checked = false
|
|
7
|
+
// guarantees the guard is in place when handleCheckedChange runs.
|
|
8
|
+
const groupResettingElements = new WeakSet();
|
|
4
9
|
/**
|
|
5
10
|
* @slot label - Content to be placed as the label, will override the label prop.
|
|
6
11
|
* @slot description - Content to be placed as the description, will override the description prop.
|
|
@@ -58,10 +63,14 @@ export class NvFieldradio {
|
|
|
58
63
|
//#region WATCHERS
|
|
59
64
|
/**
|
|
60
65
|
* Watches for changes to the checked state and emits the new value.
|
|
66
|
+
* Does not emit while the radio is being silently deselected by the group
|
|
67
|
+
* mutual-exclusion logic — only the newly selected radio emits.
|
|
61
68
|
* @param {boolean} checked - The new value of the checked state.
|
|
62
69
|
*/
|
|
63
70
|
handleCheckedChange(checked) {
|
|
64
|
-
this.
|
|
71
|
+
if (!groupResettingElements.has(this.el)) {
|
|
72
|
+
this.checkedChanged.emit(checked);
|
|
73
|
+
}
|
|
65
74
|
}
|
|
66
75
|
/**
|
|
67
76
|
* Listens for the change event on the radio button input element and controls
|
|
@@ -73,7 +82,13 @@ export class NvFieldradio {
|
|
|
73
82
|
if (target?.type === 'radio') {
|
|
74
83
|
Array.from(document.getElementsByTagName('nv-fieldradio')).forEach(element => {
|
|
75
84
|
if (element.name === this.name) {
|
|
76
|
-
element
|
|
85
|
+
groupResettingElements.add(element);
|
|
86
|
+
try {
|
|
87
|
+
element.checked = false;
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
groupResettingElements.delete(element);
|
|
91
|
+
}
|
|
77
92
|
}
|
|
78
93
|
});
|
|
79
94
|
this.checked = target.checked;
|
|
@@ -83,9 +98,9 @@ export class NvFieldradio {
|
|
|
83
98
|
/****************************************************************************/
|
|
84
99
|
//#region RENDER
|
|
85
100
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
87
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
88
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
101
|
+
return (h(Host, { key: '71284693af48768a022f15fa58839e20226784a4', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, h("input", { key: 'bacbbf69898047a1633bb31f9fc747f19071ff1c', type: "radio", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), h("div", { key: 'bf0f69da94d51972ad572ed9bd89679a07a7906c', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '75bf4940868bf2399c21f7a9b318111211c43c32', htmlFor: this.inputId }, h("slot", { key: '308b8bfdfd2f63c520254215f92b2a505e3099b9', name: "label" }, this.label))), (this.description ||
|
|
102
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'f728e68d34714670f5feaa4eb2a48114ba821e37', class: "description" }, h("slot", { key: '3afb170caedf839df227a28ca2d5590e5ce941ad', name: "description" }, this.description))), (this.errorDescription ||
|
|
103
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '7bd6f468689252b84f342771b30bf62d44e1512d', hidden: !this.error, class: "error-description" }, h("slot", { key: 'd60e070ec898621a3a56494b086ebea171b21c8a', name: "error-description" }, this.errorDescription))))));
|
|
89
104
|
}
|
|
90
105
|
static get is() { return "nv-fieldradio"; }
|
|
91
106
|
static get formAssociated() { return true; }
|
|
@@ -292,13 +292,19 @@ export class NvPopover {
|
|
|
292
292
|
}
|
|
293
293
|
disconnectedCallback() {
|
|
294
294
|
removeEventListeners(this.closeEvents, document, this);
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
295
|
+
switch (this.triggerMode) {
|
|
296
|
+
case 'click':
|
|
297
|
+
if (this.triggerElement) {
|
|
298
|
+
removeEventListeners(this.clickEvents, this.triggerElement, this);
|
|
299
|
+
}
|
|
300
|
+
removeEventListeners(this.outsideClickEvents, document, this);
|
|
301
|
+
break;
|
|
302
|
+
case 'hover':
|
|
303
|
+
if (this.triggerElement) {
|
|
304
|
+
removeEventListeners(this.hoverEvents, this.triggerElement, this);
|
|
305
|
+
}
|
|
306
|
+
break;
|
|
299
307
|
}
|
|
300
|
-
if (this.triggerMode === 'hover')
|
|
301
|
-
removeEventListeners(this.hoverEvents, this.triggerElement, this);
|
|
302
308
|
// Reset flag so events can be reattached if component is reconnected
|
|
303
309
|
this.eventsAttached = false;
|
|
304
310
|
// Clean up any pending timeouts
|
|
@@ -311,7 +317,7 @@ export class NvPopover {
|
|
|
311
317
|
/****************************************************************************/
|
|
312
318
|
//#region RENDER
|
|
313
319
|
render() {
|
|
314
|
-
return (h(Host, { key: '
|
|
320
|
+
return (h(Host, { key: '1ed63615950c6e634f62130a0b44968b33a672fb' }, h("slot", { key: '46f7ca5bd0f86e79f847d1120d4bb37f6392fd58', name: "trigger" }), h("div", { key: 'b7324fde30b5dccb51a206ac334636bb8161760a', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (h("div", { key: 'ce765381a3d2708afa5cef63d8f8c156555eb903', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), h("slot", { key: '7412a6e56a216bb7ea06b69d1c349f68d6bb1aa1', name: "content" }))));
|
|
315
321
|
}
|
|
316
322
|
static get is() { return "nv-popover"; }
|
|
317
323
|
static get originalStyleUrls() {
|
|
@@ -1,18 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Adds a set of event listeners to the given target
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Adds a set of event listeners to the given target and binds each listener to
|
|
3
|
+
* the provided `context`.
|
|
4
|
+
*
|
|
5
|
+
* Side effect: each `events[i][1]` is overwritten with the bound listener so
|
|
6
|
+
* that a later call to {@link removeEventListeners} with the same array
|
|
7
|
+
* removes the exact reference that was registered. Without this, every
|
|
8
|
+
* `listener.bind(context)` would produce a new function and
|
|
9
|
+
* `removeEventListener` would silently no-op, leaking listeners on `document`,
|
|
10
|
+
* `window`, or trigger elements when the component is destroyed.
|
|
11
|
+
* @param {EventsAndListeners} events - The events and listeners to add. Mutated in place.
|
|
12
|
+
* @param {Element | Window | Document | ChildNode} target - The target to attach the listeners to.
|
|
13
|
+
* @param {T} context - The class context to bind the listeners to.
|
|
6
14
|
*/
|
|
7
15
|
export function addEventListeners(events, target, context) {
|
|
8
|
-
events.forEach(
|
|
16
|
+
events.forEach(entry => {
|
|
17
|
+
const [event, listener] = entry;
|
|
18
|
+
const bound = listener.bind(context);
|
|
19
|
+
entry[1] = bound;
|
|
20
|
+
target.addEventListener(event, bound);
|
|
21
|
+
});
|
|
9
22
|
}
|
|
10
23
|
/**
|
|
11
|
-
* Removes
|
|
24
|
+
* Removes the listeners previously registered with {@link addEventListeners}.
|
|
25
|
+
*
|
|
26
|
+
* Relies on the bound references stored back into `events[i][1]` by
|
|
27
|
+
* {@link addEventListeners}; if the listener references don't match what was
|
|
28
|
+
* registered, `removeEventListener` will silently no-op.
|
|
12
29
|
* @param {EventsAndListeners} events - The events and listeners to remove.
|
|
13
|
-
* @param {Element | Window | Document} target
|
|
14
|
-
* @param {T}
|
|
30
|
+
* @param {Element | Window | Document | ChildNode} target - The target to detach the listeners from.
|
|
31
|
+
* @param {T} _context - Unused; kept for symmetry with {@link addEventListeners}.
|
|
15
32
|
*/
|
|
16
|
-
export function removeEventListeners(events, target,
|
|
17
|
-
|
|
33
|
+
export function removeEventListeners(events, target, _context) {
|
|
34
|
+
void _context;
|
|
35
|
+
events.forEach(([event, listener]) => target.removeEventListener(event, listener));
|
|
18
36
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-DMtFowUl.js";export{a as ButtonEmphasis,B as ButtonSize,b as ButtonType,C as CUSTOM_DAY_NAMES,j as CUSTOM_MONTH_NAMES,D as DeprecatedSemanticColors,F as FeedbackColors,G as GlobalFilterPosition,I as IconButtonShape,f as LabelPlacement,L as LoaderColors,c as NotificationEmphasis,N as NotificationPosition,S as SemanticSizes,i as SortingPossibility,d as StatusIndicatorEmphasis,g as TextInputAutocomplete,h as TimeType,T as ToggleButtonEmphasis,e as ToggleButtonSize,W as WEEK_ABBREVIATIONS}from"./p-gOKBmbgZ.js";export{e as eventUtils}from"./p-
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-DMtFowUl.js";export{a as ButtonEmphasis,B as ButtonSize,b as ButtonType,C as CUSTOM_DAY_NAMES,j as CUSTOM_MONTH_NAMES,D as DeprecatedSemanticColors,F as FeedbackColors,G as GlobalFilterPosition,I as IconButtonShape,f as LabelPlacement,L as LoaderColors,c as NotificationEmphasis,N as NotificationPosition,S as SemanticSizes,i as SortingPossibility,d as StatusIndicatorEmphasis,g as TextInputAutocomplete,h as TimeType,T as ToggleButtonEmphasis,e as ToggleButtonSize,W as WEEK_ABBREVIATIONS}from"./p-gOKBmbgZ.js";export{e as eventUtils}from"./p-BysSxG1C.js";export{u as uriUtils}from"./p-CnI0auJM.js";export{n as dateTimeUtils}from"./p-CyL2J6O4.js";import{u as o}from"./p-D1C_pu0E.js";import{u as t}from"./p-9xYwU7ku.js";import{u as l}from"./p-D02w_Ru6.js";import{u as p}from"./p-D2otK4Ce.js";import{p as m,t as k}from"./p-CgHCo_Ho.js";import{D as w,a as y,b as v,c as x,F as _,H as E,M as z,d as U,e as A,S as O,f as R,g as M,h as H,i as q,j as P,k as K,l as Y,n as Z,r as X,s as J,m as V,o as Q,p as $,q as ee,t as re}from"./p-BaF3Tuua.js";var ae=Object.freeze({__proto__:null,nameof:function(e){return e(new Proxy({},{get:(e,r)=>r}))}}),oe=Object.freeze({__proto__:null,startsWithIgnoreCase:function(e,r){return!(!e||!r)&&e.toLowerCase().startsWith(r.toLowerCase())}}),te=Object.freeze({__proto__:null,parallel:m,timeline:k,useCollapse:o,useFade:t,useGrow:l,useSlide:p}),se=Object.freeze({__proto__:null,DEFAULT_DEBOUNCE_DELAY:w,DEFAULT_FUZZY_THRESHOLD:y,DEFAULT_MAX_RESULTS:v,DEFAULT_WORKER_THRESHOLD:x,FUZZY_DEBOUNCE_DELAY:_,HARD_CAP_MAX_RESULTS:E,MAX_WORKER_THRESHOLD:z,MIN_MAX_RESULTS:U,MIN_WORKER_THRESHOLD:A,SearchWorkerClient:O,buildIndex:R,clampFuzzyThreshold:M,clampMaxResults:H,clampWorkerThreshold:q,clearFuzzyCache:P,getEffectiveFilterMode:K,isWorkerSupported:Y,normalize:Z,rebuildIndex:X,search:J,searchFuzzy:V,searchSmart:Q,searchStrict:$,shouldUseWorker:ee,tokenize:re});const ie=["access-point-off","access-point","accessible","activity","address-book","adjustments-horizontal","adjustments-up","adjustments","affiliate","air-conditioning","alert-circle","alert-square-rounded","alert-triangle","align-center","align-left","align-right","app-window","apps","archive","areas","arrow-back-up","arrow-back","arrow-down-left","arrow-down-right","arrow-down","arrow-forward-up","arrow-forward","arrow-left","arrow-right","arrow-up-left","arrow-up-right","arrow-up","arrows-diagonal","arrows-exchange","arrows-maximize","arrows-minimize","arrows-move","aspect-ratio","atom","ban","basket","battery-1","battery-2","battery-3","battery-4","battery-automotive","battery-charging","battery-eco","battery-off","battery","bell-bolt","bell-off","bell-ringing","bell","bike","bluetooth-connected","bluetooth-off","bluetooth","bolt-off","bolt","book","bookmark-off","bookmark","bookmarks","box-align-top","box-multiple","brand-facebook","brand-instagram","brand-linkedin","brand-x","brand-youtube","briefcase","brightness-down","brightness-up","browser-check","browser-plus","browser-x","browser","brush","building-bank","building-factory","building-lighthouse","building-store","building","bulb-off","bulb","cake","calendar-time","calendar-week","calendar","camera-off","camera","car-crane","car","caravan","cash-banknote","cash","cast","cell","charging-pile","chart-arcs","chart-area-line","chart-area","chart-arrows-vertical","chart-arrows","chart-bar","chart-bubble","chart-circles","chart-donut","chart-dots","chart-line","chart-pie","chart-radar","check","checkbox","checklist","checks","chevron-down","chevron-left","chevron-right","chevron-top","chevrons-left","chevrons-right","circle-caret-right","circle-check","circle-minus","circle-x","circuit-alternate","circuit-ground-digital","clipboard-check","clipboard-list","clipboard-plus","clipboard-text","clipboard-x","clipboard","clock-edit","clock","cloud-data-connection","cloud-download","cloud-rain","cloud-snow","cloud-upload","cloud","color-picker","color-swatch","columns-1","columns-2","columns-3","compass","contract","cookie","copy","cpu","crane","credit-card","crop","cross","crown","currency-bitcoin","currency-dollar","currency-ethereum","currency-euro","cut","dashboard","database","device-desktop","device-floppy","device-gamepad","device-laptop","device-mobile-rotated","device-mobile","device-tablet","device-watch","devices","dialpad","direction-horizontal","direction-sign","direction","discount","door-enter","door-exit","door-off","dots-vertical","dots","download","drone","droplet-filled","droplet-half","droplet","droplets","edit","empty","engine","equal-not","eraser-off","eraser","exclamation-mark","external-link","eye-check","eye-off","eye","eyeglass2","face-id","feather","file-alert","file-analytics","file-check","file-code","file-download","file-export","file-horizontal","file-import","file-plus","file-search","file-text-bookmark","file-text","file-type-bmp","file-type-css","file-type-csv","file-type-doc","file-type-html","file-type-jpg","file-type-js","file-type-pdf","file-type-png","file-type-ppt","file-type-xls","file-type-xml","file-type-zip","file-upload","file-x","file-zip","file","files-off","files","filter-off","filter-sort","filter","fingerprint","fire-extinguisher","flag","flame","flip-horizontal","flip-vertical","folder-minus","folder-off","folder-plus","folder-x","folder","folders","frame","gas-station","gauge-off","gauge","gift","git-branch-delete","git-branch","git-cherry-pick","git-commit","git-compare","git-fork","git-merge","git-pull-request-closed","git-pull-request-draft","git-pull-request","gps","grid-dots","grip-horizontal","grip-vertical","hand-stop","hand-waving","hash","haze","headphones-off","headphones","headset","heart-off","heart","heartbeat","helicopter","helmet-swopp","helmet","help","history","home","hourglass-empty","hourglass-high","hourglass-low","hourglass-off","hourglass","inbox","info-circle","info-small","keyboard-hide","keyboard-show","keyboard","layers-intersect","layers-off","layout-board-split","layout-dashboard","layout-grid","layout-sidebar-left-collapse","layout-sidebar-left-expand","layout-sidebar-right-collapse","layout-sidebar-right-expand","layout","leaf","lifebuoy","link","list-search","list","loader","location","lock-off","lock-open","lock","login","logout","mail-forward","mail-opened","mail","map-pin-2","map-pin-off","map-pin","map","master-data","menu","message-dots","message-off","message","messages","microphone-off","microphone","minus","mist","moon","motorbike","mouse","movie","network","news","note","notebook","notes","offshore-station","package","palette","paperclip","pencil","phone-call","phone-calling","phone-check","phone-incoming","phone-off","phone-outgoing","phone","photo-off","photo","pig","pin","pinned-off","pinned","plane-off","plane","plant","player-pause","player-play","player-skip-back","player-skip-forward","player-stop","player-track-next","player-track-prev","plug-connected","plug","plus","power-ac","power-dc","power","presentation-analytics","presentation","printer","propeller","published","puzzle-2","puzzle","pylon","qrcode","question-mark","quotes-open","quotes","radar","radio","radioactive","receipt-dollar","receipt-euro","receipt","recharging","recycle","refresh-alert","refresh-off","refresh","repeat-once","repeat","replace","report-analytics","report-medical","report-search","report","ripple-off","ripple","rocket","rotate-2","rotate-clockwise-2","rotate-clockwise","rotate-dot","rotate","router","ruler-measure","sailboat","satellite","scale","school","scissors","scooter-electric","screenshot","search","seeding","select","selector","send","server","settings","shape","share-2","share","shield-check","shield-lock","shield-off","shield-x","shield","ship-off","ship","shopping-cart","sitemap","slash","smart-home","snowflake","solar-panel","sort-ascending-letters","sort-ascending-numbers","sort-descending-letters","sort-descending-numbers","spacing-horizontal","spacing-vertical","sparkles","speakerphone","stack","stairs","star","sun","sunrise","sunset","switch-horizontal","switch-vertical","table","tag","tank-empty-fill","tank-full-fill","tank-medium-fill","temperature-off","temperature","template","terminal","text-size","text","thumb-down","thumb-up","ticket","timeline","tir","tool","tools","train","trash-off","trash","tree","trees","trending-down-2","trending-down-3","trending-down","trending-up-2","trending-up-3","trending-up","truck-delivery","truck","umbrella","unlink","upload","user-circle","user-exclamation","user-minus","user-off","user-plus","user-worker","user","users-group","users","versions","video-minus","video-off","video-plus","video","volume-2","volume-3","volume","wallet","wand","wave","waves","wifi-off","wifi","wind-direction","wind","windmill","wood","world-code","world","writing","x","zoom-reset"];export{te as animations,ae as classUtils,ie as iconNames,se as searchEngine,oe as stringUtils}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as o,d as
|
|
1
|
+
import{N as o,d as s}from"./p-BRGkbQcZ.js";const p=o,r=s;export{p as NvAccordionItem,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as e,H as t,c as n,f as s,h as i,d as a}from"./p-DMtFowUl.js";import{d as r}from"./p-
|
|
1
|
+
import{t as o,p as e,H as t,c as n,f as s,h as i,d as a}from"./p-DMtFowUl.js";import{d as r}from"./p-BRGkbQcZ.js";import{d as c}from"./p-C4Gisby9.js";import{d}from"./p-8N4lU0iY.js";import{d as l}from"./p-BnO_M5Vy.js";const h=e(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.openIndexesChanged=n(this,"openIndexesChanged",3),this.data=[],this.mode="accordion",this.openIndexes=[],this.updatingFromInternal=!1}async open(o){this.toggleItem(o,!0)}async close(o){this.toggleItem(o,!1)}toggleItem(o,e){const t=Array.from(this.el.querySelectorAll("nv-accordion-item"))[o];if(!t||t.disabled)return console.warn("[toggleItem] Item not found or disabled:",o),void this.openIndexesChanged.emit([...this.openIndexes||[]]);let n=[...this.openIndexes||[]];const s=n.includes(o);"accordion"===this.mode?n=!1===e||void 0===e&&s?[]:[o]:!1===e?n=n.filter((e=>e!==o)):!0!==e||s?void 0===e&&(n=s?n.filter((e=>e!==o)):[...n,o]):n.push(o),this.updatingFromInternal=!0,this.openIndexes=[...n],this.updateChildrenState(),this.updatingFromInternal=!1,this.openIndexesChanged.emit([...n])}async updateChildrenState(){Array.from(this.el.querySelectorAll("nv-accordion-item")).forEach(((o,e)=>{const t=(this.openIndexes||[]).includes(e);o.open=t,o.mode=this.mode,o.setAttribute("aria-expanded",t?"true":"false"),s(o)}))}onItemToggle(o){if(o.stopPropagation(),this.updatingFromInternal)return;const e=Array.from(this.el.querySelectorAll("nv-accordion-item")).indexOf(o.target);-1!==e?this.toggleItem(e,o.detail):console.warn("[onItemToggle] Target item not found in items list")}onOpenIndexesChange(o,e){this.updatingFromInternal||void 0===o||o===e||this.updateChildrenState()}onModeChange(){this.updateChildrenState()}componentWillLoad(){void 0===this.openIndexes&&(this.openIndexes=[])}async componentDidLoad(){const o=Array.from(this.el.querySelectorAll("nv-accordion-item"));if(!(this.data?.length||this.openIndexes&&0!==this.openIndexes.length)){const e=o.map(((o,e)=>o.hasAttribute("open")||o.open?e:-1)).filter((o=>-1!==o));e.length>0&&(this.updatingFromInternal=!0,this.openIndexes=[...e],this.updatingFromInternal=!1,this.openIndexesChanged.emit([...this.openIndexes]))}await this.updateChildrenState()}render(){return i(a,{key:"60fa93fd799665c25cae9e7d52f80a8dcd4123cf",role:"list",class:"nv-accordion"},this.data?.length?this.data.map(((o,e)=>i("nv-accordion-item",{key:o.id??e,itemTitle:o.title,disabled:o.disabled,open:(this.openIndexes||[]).includes(e),mode:this.mode},o.subtitle?i("div",{slot:"header"},i("div",{class:"nv-accordion-item__header-content"},i("span",{class:"nv-accordion-item__title"},o.title),i("span",{class:"nv-accordion-item__subtitle"},o.subtitle))):null,i("div",{slot:"content"},o.content),o.footer&&i("div",{slot:"footer"},o.footer)))):i("slot",null))}get el(){return this}static get watchers(){return{openIndexes:[{onOpenIndexesChange:0}],mode:[{onModeChange:0}]}}static get style(){return"nv-accordion{display:block;border:var(--spacing-px) solid var(--color-content-low-border);border-radius:var(--radius-rounded-lg)}nv-accordion .nv-accordion__footer{padding:var(--spacing-3);background:var(--color-level-05-background);border-radius:0 0 var(--radius-rounded-lg) var(--radius-rounded-lg);margin-top:calc(var(--spacing-px) * -1);border-top:var(--spacing-px) solid var(--color-content-low-border)}nv-accordion .nv-accordion__footer:empty{display:none}"}},[260,"nv-accordion",{data:[16],mode:[513],openIndexes:[1040],updatingFromInternal:[32],open:[64],close:[64]},[[0,"itemToggle","onItemToggle"]],{openIndexes:[{onOpenIndexesChange:0}],mode:[{onModeChange:0}]}]);function m(){"undefined"!=typeof customElements&&["nv-accordion","nv-accordion-item","nv-icon","nv-iconbutton","nv-loader"].forEach((e=>{switch(e){case"nv-accordion":customElements.get(o(e))||customElements.define(o(e),h);break;case"nv-accordion-item":customElements.get(o(e))||r();break;case"nv-icon":customElements.get(o(e))||c();break;case"nv-iconbutton":customElements.get(o(e))||d();break;case"nv-loader":customElements.get(o(e))||l()}}))}m();const p=h,v=m;export{p as NvAccordion,v as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as o,H as n,c as t,h as a,d as r}from"./p-DMtFowUl.js";import{c as s}from"./p-ChV9xqsO.js";import{F as i}from"./p-gOKBmbgZ.js";import{u as c}from"./p-D1C_pu0E.js";import{u as l}from"./p-9xYwU7ku.js";import"./p-Dz1GUhVy.js";import{t as d}from"./p-CgHCo_Ho.js";import{d as f}from"./p-
|
|
1
|
+
import{t as e,p as o,H as n,c as t,h as a,d as r}from"./p-DMtFowUl.js";import{c as s}from"./p-ChV9xqsO.js";import{F as i}from"./p-gOKBmbgZ.js";import{u as c}from"./p-D1C_pu0E.js";import{u as l}from"./p-9xYwU7ku.js";import"./p-Dz1GUhVy.js";import{t as d}from"./p-CgHCo_Ho.js";import{d as f}from"./p-C4Gisby9.js";const u=o(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.hiddenChanged=t(this,"hiddenChanged",3),this.hiddenChangedComplete=t(this,"hiddenChangedComplete",3),this.closeClicked=t(this,"closeClicked",3),this.feedback="information",this.dismissible=!1,this.preventAutoClose=!1,this.hidden=!1,this.hasNoAnimations=!1,this.handleDismiss=()=>{this.preventAutoClose||(this.hidden=!0),this.closeClicked.emit()},this.getDefaultIcon=()=>{switch(this.feedback){case i.Warning:return"alert-circle";case i.Information:return"info-circle";case i.Success:return"circle-check";case i.Error:return"alert-circle";case i.Neutral:return"help";default:return"info-circle"}}}componentWillRender(){if(this.color)switch(this.color){case"primary":this.feedback="warning";break;case"secondary":case"neutral":this.feedback="information";break;default:this.feedback=this.color}}async handleHiddenChange(e){this.hiddenChanged.emit(e),await this.updateVisibility(e),this.hiddenChangedComplete.emit(e)}async updateVisibility(e){if(this.hasNoAnimations)return void this.toggleHiddenClass(e);const{fadeIn:o,fadeOut:n}=l(this.el,{duration:150}),{collapse:t,expand:a}=c(this.el,{duration:250});e?(await d(n,t).start(),this.toggleHiddenClass(!0)):(this.toggleHiddenClass(!1),await d(a,o).start())}toggleHiddenClass(e){this.el.classList.toggle("hidden",e)}componentWillLoad(){if(this.color)switch(this.color){case"primary":this.feedback="warning";break;case"secondary":case"neutral":this.feedback="information";break;default:this.feedback=this.color}this.hidden&&this.el.classList.add("hidden")}render(){return a(r,{key:"4dc8704f790d4753a364be3727f14dfe033e8f75",role:"alert",class:s("root","feedback-"+this.feedback)},a("nv-icon",{key:"b7e4a1b213c29001d2aa16d4276777fa3fa77039",name:this.icon??this.getDefaultIcon(),class:"icon-"+this.feedback,size:"md"}),a("div",{key:"4ae0406ed796ee2c8cf8e5ed1e40c96dd1bfa7b5",class:"content"},this.heading&&a("p",{key:"02bff20045603c5e5bd3790140ce52cc66857225",class:"heading"},this.heading),this.message&&a("p",{key:"e1436fe5bcffc5226747abd612266c2925d0680d",class:"message"},this.message),a("slot",{key:"deda05a3494ffd1c86ea4670c7ef793773d8c893"})),this.dismissible&&a("button",{key:"0c92c297f4df2ee1dd3eb781df782c983b5b61d5",class:"close",type:"button",onClick:this.handleDismiss},a("nv-icon",{key:"2bf2c72e4dedc932549af6e15cf221678640ea26",name:"x",size:"sm"})))}get el(){return this}static get watchers(){return{hidden:[{handleHiddenChange:0}]}}static get style(){return"nv-alert{display:flex !important;align-items:flex-start;position:relative;gap:var(--alert-gap-x);border-radius:var(--alert-radius);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif}nv-alert>nv-icon{margin-left:var(--alert-icon-position-x);margin-top:var(--alert-icon-position-y)}nv-alert.hidden{display:none !important}nv-alert.feedback-information{background-color:var(--components-alert-information-background);border:1px solid var(--components-alert-information-border) !important}nv-alert.feedback-information>.close:focus,nv-alert.feedback-information>.close:focus-within{outline:none}nv-alert.feedback-information>.close:focus-visible,nv-alert.feedback-information>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-information-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-warning{background-color:var(--components-alert-warning-background);border:1px solid var(--components-alert-warning-border) !important}nv-alert.feedback-warning>.close:focus,nv-alert.feedback-warning>.close:focus-within{outline:none}nv-alert.feedback-warning>.close:focus-visible,nv-alert.feedback-warning>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-warning-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-error{background-color:var(--components-alert-error-background);border:1px solid var(--components-alert-error-border) !important}nv-alert.feedback-error>.close:focus,nv-alert.feedback-error>.close:focus-within{outline:none}nv-alert.feedback-error>.close:focus-visible,nv-alert.feedback-error>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-error-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-success{background-color:var(--components-alert-success-background);border:1px solid var(--components-alert-success-border) !important}nv-alert.feedback-success>.close:focus,nv-alert.feedback-success>.close:focus-within{outline:none}nv-alert.feedback-success>.close:focus-visible,nv-alert.feedback-success>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-success-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-neutral{background-color:var(--components-alert-neutral-background);border:1px solid var(--components-alert-neutral-border) !important}nv-alert.feedback-neutral>.close:focus,nv-alert.feedback-neutral>.close:focus-within{outline:none}nv-alert.feedback-neutral>.close:focus-visible,nv-alert.feedback-neutral>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-neutral-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert>nv-icon.icon-information{color:var(--components-alert-information-icon)}nv-alert>nv-icon.icon-warning{color:var(--components-alert-warning-icon)}nv-alert>nv-icon.icon-error{color:var(--components-alert-error-icon)}nv-alert>nv-icon.icon-success{color:var(--components-alert-success-icon)}nv-alert>nv-icon.icon-neutral{color:var(--components-alert-neutral-icon)}nv-alert>.content{display:flex;padding:var(--alert-padding);padding-right:calc(var(--alert-padding) + var(--spacing-5) + var(--spacing-1));padding-left:0;flex-direction:column;gap:var(--alert-gap-y)}nv-alert>.content>.heading{color:var(--components-alert-content-title);font-size:var(--alert-heading-font-size);line-height:var(--alert-heading-line-height);font-weight:var(--alert-heading-font-weight)}nv-alert>.content>.message{color:var(--components-alert-content-description);font-size:var(--alert-message-font-size);line-height:var(--alert-message-line-height)}nv-alert>.close{border-radius:var(--alert-radius);position:absolute;display:flex;top:var(--alert-icon-position-y);right:var(--alert-icon-position-x);padding:0;border:none;background:none;cursor:pointer}"}},[260,"nv-alert",{color:[513],feedback:[1537],message:[513],heading:[513],icon:[513],dismissible:[516],preventAutoClose:[516,"prevent-auto-close"],hidden:[1540],hasNoAnimations:[516,"has-no-animations"]},void 0,{hidden:[{handleHiddenChange:0}]}]);function v(){"undefined"!=typeof customElements&&["nv-alert","nv-icon"].forEach((o=>{switch(o){case"nv-alert":customElements.get(e(o))||customElements.define(e(o),u);break;case"nv-icon":customElements.get(e(o))||f()}}))}v();const h=u,p=v;export{h as NvAlert,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as a,p as t,H as r,h as o,d as n}from"./p-DMtFowUl.js";import{c as v}from"./p-ChV9xqsO.js";import{S as s}from"./p-gOKBmbgZ.js";import{d as i}from"./p-
|
|
1
|
+
import{t as a,p as t,H as r,h as o,d as n}from"./p-DMtFowUl.js";import{c as v}from"./p-ChV9xqsO.js";import{S as s}from"./p-gOKBmbgZ.js";import{d as i}from"./p-C4Gisby9.js";const e=t(class extends r{constructor(a){super(),!1!==a&&this.__registerHost(),this.size="md",this.color="1"}componentWillRender(){this.xsmall&&(this.size=s.ExtraSmall),this.small&&(this.size=s.Small),this.medium&&(this.size=s.Medium),this.large&&(this.size=s.Large),this.xlarge&&(this.size=s.ExtraLarge),this.text&&(this.initials=this.text),this.url&&(this.src=this.url)}trimInitials(a){return a.trim().substring(0,2)}render(){return o(n,{key:"04faba5849d8626fd926d353d85e866d812a8398",class:v("avatar-"+this.size,"avatar-color-"+this.color),"aria-label":this.alt},this.src?o("img",{src:this.src,alt:this.alt}):this.initials?this.trimInitials(this.initials):o("slot",{name:"icon"},o("nv-icon",{name:"user"})))}static get style(){return"nv-avatar{align-items:center !important;background-color:var(--components-avatar-background-1);border-radius:var(--radius-rounded-full) !important;display:flex !important;flex-shrink:0 !important;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-style:normal;font-weight:var(--font-weight-medium-emphasis);justify-content:center !important;leading-trim:both;line-height:1 !important;text-align:center;text-edge:cap;text-transform:uppercase}nv-avatar.avatar-color-1{background-color:var(--components-avatar-background-1);color:var(--components-avatar-content-1)}nv-avatar.avatar-color-2{background-color:var(--components-avatar-background-2);color:var(--components-avatar-content-2)}nv-avatar.avatar-color-3{background-color:var(--components-avatar-background-3);color:var(--components-avatar-content-3)}nv-avatar.avatar-color-4{background-color:var(--components-avatar-background-4);color:var(--components-avatar-content-4)}nv-avatar.avatar-color-5{background-color:var(--components-avatar-background-5);color:var(--components-avatar-content-5)}nv-avatar.avatar-color-6{background-color:var(--components-avatar-background-6);color:var(--components-avatar-content-6)}nv-avatar.avatar-color-7{background-color:var(--components-avatar-background-7);color:var(--components-avatar-content-7)}nv-avatar.avatar-color-8{background-color:var(--components-avatar-background-8);color:var(--components-avatar-content-8)}nv-avatar.avatar-color-9{background-color:var(--components-avatar-background-9);color:var(--components-avatar-content-9)}nv-avatar.avatar-color-10{background-color:var(--components-avatar-background-10);color:var(--components-avatar-content-10)}nv-avatar img{height:100%;width:100%;object-fit:cover;object-position:center;border-radius:50%}nv-avatar.avatar-xs{width:var(--avatar-xs-size);height:var(--avatar-xs-size);font-size:var(--avatar-xs-font-size);line-height:var(--avatar-xs-font-size)}nv-avatar.avatar-xs nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-avatar.avatar-sm{width:var(--avatar-sm-size);height:var(--avatar-sm-size);font-size:var(--avatar-sm-font-size);line-height:var(--avatar-sm-font-size)}nv-avatar.avatar-sm nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-avatar.avatar-md{width:var(--avatar-md-size);height:var(--avatar-md-size);font-size:var(--avatar-md-font-size);line-height:var(--avatar-md-font-size)}nv-avatar.avatar-md nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-avatar.avatar-lg{width:var(--avatar-lg-size);height:var(--avatar-lg-size);font-size:var(--avatar-lg-font-size);line-height:var(--avatar-lg-font-size)}nv-avatar.avatar-lg nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-avatar.avatar-xl{width:var(--avatar-xl-size);height:var(--avatar-xl-size);font-size:var(--avatar-xl-font-size);line-height:var(--avatar-xl-font-size)}nv-avatar.avatar-xl nv-icon>svg{width:var(--spacing-7);height:var(--spacing-7);stroke-width:1.9px}"}},[260,"nv-avatar",{xsmall:[516],small:[516],medium:[516],large:[516],xlarge:[516],text:[513],url:[513],alt:[513],src:[1537],initials:[1537],size:[1537],color:[513]}]);function c(){"undefined"!=typeof customElements&&["nv-avatar","nv-icon"].forEach((t=>{switch(t){case"nv-avatar":customElements.get(a(t))||customElements.define(a(t),e);break;case"nv-icon":customElements.get(a(t))||i()}}))}c();const l=e,h=c;export{l as NvAvatar,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as o,d as s}from"./p-
|
|
1
|
+
import{N as o,d as s}from"./p-B4Bj7woW.js";const p=o,r=s;export{p as NvBadge,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as r,h as n,d as o}from"./p-DMtFowUl.js";import{c as i}from"./p-ChV9xqsO.js";import{d as a}from"./p-
|
|
1
|
+
import{t as e,p as t,H as r,h as n,d as o}from"./p-DMtFowUl.js";import{c as i}from"./p-ChV9xqsO.js";import{d as a}from"./p-S0RrRAAC.js";import{d as s}from"./p-iZAJ4_uI.js";const c=t(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.type="default"}componentDidRender(){if("default"===this.type&&this.tooltip){const e=this.defaultSlot?.nextSibling;e&&e!==this.toolTipRef&&(this.toolTipRef.triggerElement=e)}"collapsed"===this.type&&this.popoverRef&&(this.popoverRef.triggerElement=this.popoverTrigger)}render(){return n(o,{key:"cefd123208aa50ad05ac912780393aaf8b76a7eb",role:"listitem","aria-current":this.current?"location":void 0,class:i({"visually-hidden":this.current})},"collapsed"===this.type?n("button",{ref:e=>this.popoverTrigger=e},"..."):n("slot",{ref:e=>this.defaultSlot=e}),this.tooltip&&n("nv-tooltip",{key:"13665470c79f6c7637c524b74b767b9a5747a77f",ref:e=>this.toolTipRef=e,message:this.tooltip,triggerElement:this.popoverTrigger,placement:"top"}),"collapsed"===this.type&&n("nv-popover",{key:"c71b3bbf12531d9cb7b3abb920f8bc932ed0beb1",ref:e=>this.popoverRef=e,triggerMode:"click",groupName:"breadcrumbs",triggerElement:this.popoverTrigger},n("ul",{key:"5c11484aaf9026f7a3e0f5562488f28ce7a97fcd",slot:"content"},n("slot",{key:"2058072469703e46e3697a83e40e2b4ce9ead834"}))),n("span",{key:"209284d8788b24b0513f38d1aa3a03a23f6f12db","data-scope":"separator"},"/"))}get el(){return this}static get style(){return"nv-breadcrumb{display:flex;align-items:center;color:var(--components-breadcrumb-text);font-size:var(--font-size-sm);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--line-height-sm)}nv-breadcrumb.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-breadcrumb ul{display:flex;flex-direction:column;gap:var(--spacing-1-5);padding:var(--spacing-1)}nv-breadcrumb ul a,nv-breadcrumb ul button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb ul a:focus,nv-breadcrumb ul a:focus-within,nv-breadcrumb ul button:focus,nv-breadcrumb ul button:focus-within{outline:none}nv-breadcrumb ul a:focus-visible,nv-breadcrumb ul a:has(:focus-visible),nv-breadcrumb ul button:focus-visible,nv-breadcrumb ul button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb ul a:hover,nv-breadcrumb ul button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb>a,nv-breadcrumb>button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb>a:focus,nv-breadcrumb>a:focus-within,nv-breadcrumb>button:focus,nv-breadcrumb>button:focus-within{outline:none}nv-breadcrumb>a:focus-visible,nv-breadcrumb>a:has(:focus-visible),nv-breadcrumb>button:focus-visible,nv-breadcrumb>button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb>a:hover,nv-breadcrumb>button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb span[data-scope=separator]{display:inline-flex;padding-left:var(--breadcrumb-padding-y)}"}},[260,"nv-breadcrumb",{type:[513],tooltip:[513],current:[516]}]);function b(){"undefined"!=typeof customElements&&["nv-breadcrumb","nv-popover","nv-tooltip"].forEach((t=>{switch(t){case"nv-breadcrumb":customElements.get(e(t))||customElements.define(e(t),c);break;case"nv-popover":customElements.get(e(t))||a();break;case"nv-tooltip":customElements.get(e(t))||s()}}))}b();const u=c,l=b;export{u as NvBreadcrumb,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as
|
|
1
|
+
import{N as s,d as o}from"./p-B0u4Ixsb.js";const p=s,r=o;export{p as NvCalendar,r as defineCustomElement}
|