@nova-design-system/nova-react 3.22.0 → 3.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_commonjsHelpers-B85MJLTf-CFO10eej.js +7 -0
- package/dist/cjs/{collapse.animation-6e0b08df-AHWzNGm_.js → collapse.animation-DZDm0vSK-C2TOIhIK.js} +3 -3
- package/dist/cjs/events.utils-B6GgGra--01N__3wY.js +23 -0
- package/dist/cjs/{fade.animation-9b939939-DV--bM4S.js → fade.animation-DcRL9lcm-DAZeHoKN.js} +75 -75
- package/dist/cjs/generated/components.server.js +292 -50
- package/dist/cjs/{grow.animation-24ad5cf8-LUp_ITEx.js → grow.animation-D7ep_aVl-BuXEDSK-.js} +5 -26
- package/dist/cjs/i18n.utils-IlwlcG9l-ku0bScip.js +2494 -0
- package/dist/cjs/{index-WPRkQD3O.js → index-kU2nW5aN.js} +12692 -7009
- package/dist/cjs/{nv-dialog.entry-CDSK9pUH.js → index.esm-D3eWMME9-CG1TVKfu.js} +1 -296
- package/dist/cjs/index.js +15 -1
- package/dist/cjs/inputmask-CSo292ul-DlvupPk6.js +3758 -0
- package/dist/cjs/{nv-accordion-item.entry-BuTvA6w9.js → nv-accordion-item.entry-Bu1tAcCq.js} +11 -10
- package/dist/cjs/{nv-accordion.entry-Dtsfw6He.js → nv-accordion.entry-jWjLdX8w.js} +9 -11
- package/dist/cjs/{nv-alert.entry-TIdfdU7Y.js → nv-alert.entry-E9ZJay_K.js} +22 -23
- package/dist/cjs/{nv-avatar.entry-CaxrhPuw.js → nv-avatar.entry-CUX7u0kR.js} +11 -11
- package/dist/cjs/{nv-badge_2.entry-CfYvTZxX.js → nv-badge_2.entry-bxpV5gxE.js} +24 -24
- package/dist/cjs/{nv-breadcrumb.entry-BCZ4MmfD.js → nv-breadcrumb.entry-Cbbb9Qeh.js} +5 -5
- package/dist/cjs/{nv-breadcrumbs.entry-DwzCE7F6.js → nv-breadcrumbs.entry-BTqnp9zO.js} +3 -3
- package/dist/cjs/{nv-button.entry-Cr_86bcZ.js → nv-button.entry-upWH19y6.js} +12 -14
- package/dist/cjs/{nv-buttongroup.entry-CWjRoHY1.js → nv-buttongroup.entry-CuZCRsnV.js} +3 -3
- package/dist/cjs/{nv-calendar.entry-CXfwNt6G.js → nv-calendar.entry-CT3mASW6.js} +113 -97
- package/dist/cjs/{nv-col.entry-CJLDS3LY.js → nv-col.entry--pCxkaTh.js} +5 -5
- package/dist/cjs/{nv-datagrid.entry-Cns8XSud.js → nv-datagrid.entry-CGCEhO8C.js} +80 -85
- package/dist/cjs/{nv-datagridcolumn.entry-CFFAipHF.js → nv-datagridcolumn.entry-Fsqc7CT_.js} +2 -1
- package/dist/cjs/nv-dialog.entry-B6OYcZxQ.js +300 -0
- package/dist/cjs/{nv-dialogfooter_2.entry-To_dGUn4.js → nv-dialogfooter_2.entry-C4fP_n2-.js} +10 -11
- package/dist/cjs/nv-drawer.entry-C5O4KvHU.js +445 -0
- package/dist/cjs/nv-drawerfooter_2.entry-C-reYJXG.js +146 -0
- package/dist/cjs/nv-fieldcheckbox.entry-bk7UNQny.js +177 -0
- package/dist/cjs/{nv-fielddate.entry-C3pXtMHL.js → nv-fielddate.entry-dqZDBVmm.js} +89 -46
- package/dist/cjs/{nv-fielddaterange.entry-CjVVPEK_.js → nv-fielddaterange.entry-wNRasXky.js} +151 -103
- package/dist/cjs/nv-fielddropdown.entry-BA15piWa.js +678 -0
- package/dist/cjs/{nv-fielddropdownitem.entry-Dah-PaE8.js → nv-fielddropdownitem.entry-DEWaf9dC.js} +7 -7
- package/dist/cjs/{nv-fieldmultiselect.entry-BMLjhqoJ.js → nv-fieldmultiselect.entry-BWY5xOAd.js} +343 -236
- package/dist/cjs/nv-fieldnumber.entry-DoYORd0d.js +187 -0
- package/dist/cjs/nv-fieldpassword.entry-CPaLj9aD.js +165 -0
- package/dist/cjs/{nv-fieldradio.entry-X_2VT1Dj.js → nv-fieldradio.entry-CvUmEaCa.js} +11 -11
- package/dist/cjs/{nv-fieldselect.entry-pSp-2rNn.js → nv-fieldselect.entry-uUIZ6hmN.js} +52 -13
- package/dist/cjs/{nv-fieldslider.entry-pZf7zzLU.js → nv-fieldslider.entry-DnvmxxYY.js} +16 -31
- package/dist/cjs/nv-fieldtext.entry-BYAJp3n_.js +163 -0
- package/dist/cjs/{nv-fieldtextarea.entry-t3Ixxi23.js → nv-fieldtextarea.entry-DU2bWYeg.js} +52 -14
- package/dist/cjs/{nv-fieldtime.entry-DY7D5_6K.js → nv-fieldtime.entry-DlMNDTht.js} +128 -84
- package/dist/cjs/{nv-icon.entry-6oYPSf4c.js → nv-icon.entry-CnUkRzaA.js} +12 -12
- package/dist/cjs/{nv-iconbutton_2.entry-ChULGovr.js → nv-iconbutton_2.entry-hqp4AcRq.js} +10 -12
- package/dist/cjs/{nv-menu.entry-sd0tatWq.js → nv-menu.entry-Dc_FvIx7.js} +18 -32
- package/dist/cjs/{nv-menuitem.entry-CCOqR7UF.js → nv-menuitem.entry-DzMhx6c_.js} +6 -5
- package/dist/cjs/nv-notification-bullet.entry-BwhHCMQF.js +76 -0
- package/dist/cjs/{nv-notification.entry-Cc3zE3yY.js → nv-notification.entry-C3m5p5BL.js} +42 -128
- package/dist/cjs/{nv-notificationcontainer.entry-DV4D6oOH.js → nv-notificationcontainer.entry-DTRNn7VE.js} +4 -4
- package/dist/cjs/{nv-popover.entry-DQSwI2jT.js → nv-popover.entry-B0c-2rO4.js} +51 -47
- package/dist/cjs/{nv-row.entry-UUuMSAY5.js → nv-row.entry-CdcjVGZv.js} +4 -4
- package/dist/cjs/nv-sidebar.entry-CiN813gQ.js +177 -0
- package/dist/cjs/nv-sidebarcontent.entry-D9hpAhK8.js +22 -0
- package/dist/cjs/nv-sidebardivider.entry-B4EMyca5.js +22 -0
- package/dist/cjs/nv-sidebarfooter.entry-CHi4qOFe.js +22 -0
- package/dist/cjs/nv-sidebargroup.entry-RVqrsyIU.js +23 -0
- package/dist/cjs/nv-sidebarheader.entry-_7ch0O3G.js +22 -0
- package/dist/cjs/nv-sidebarlogo.entry-Ch9F-JnT.js +32 -0
- package/dist/cjs/nv-sidebarnavitem.entry-DVrafSMr.js +296 -0
- package/dist/cjs/nv-sidebarnavsubitem.entry-C0XDAzma.js +35 -0
- package/dist/cjs/{nv-split.entry-CYP2bTTM.js → nv-split.entry-0HTslRAX.js} +47 -45
- package/dist/cjs/{nv-stack.entry-D35-75Vw.js → nv-stack.entry-CqO7uTQf.js} +5 -5
- package/dist/cjs/{nv-table.entry-DevWJBnL.js → nv-table.entry-DH85n8Mc.js} +9 -11
- package/dist/cjs/{nv-tableheader.entry-Hs7nUSOC.js → nv-tableheader.entry-CKfocdxD.js} +7 -7
- package/dist/cjs/{nv-toggle.entry-Eje9d--6.js → nv-toggle.entry-BHUl76Im.js} +9 -9
- package/dist/cjs/nv-togglebutton.entry-D_9COjY-.js +67 -0
- package/dist/cjs/{nv-togglebuttongroup.entry-CWN_Ucry.js → nv-togglebuttongroup.entry-C0NLbsq7.js} +10 -8
- package/dist/cjs/{nv-tooltip.entry-BGkKDEFg.js → nv-tooltip.entry-BfViGE_U.js} +5 -5
- package/dist/cjs/slide.animation-CmH5d1of-BZuw607U.js +90 -0
- package/dist/cjs/{style-value-types.es-f5d10b79-D0QCM8OB.js → style-value-types.es-xlgmw4x8-B1vLqX9m.js} +6 -3
- package/dist/cjs/{v4-a79185f4-2n0dOd_Y.js → v4-BdYh22OP-C1vaJ4yP.js} +1 -1
- package/dist/components/NvDatatable/NvDatatable.js +40 -24
- package/dist/generated/components.js +107 -0
- package/dist/generated/components.server.js +260 -50
- package/dist/providers/NotificationProvider.js +3 -4
- package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
- package/dist/types/components/NvDatatable/types.d.ts +8 -3
- package/dist/types/generated/components.d.ts +46 -0
- package/dist/types/generated/components.server.d.ts +46 -0
- package/package.json +2 -2
- package/dist/cjs/_commonjsHelpers-1789f0cf-BJu3ubxk.js +0 -10
- package/dist/cjs/inputmask-edcad3c1-B9Omti4z.js +0 -3749
- package/dist/cjs/nv-fieldcheckbox.entry-fdonR07Z.js +0 -138
- package/dist/cjs/nv-fielddropdown.entry-C9mXuNNj.js +0 -392
- package/dist/cjs/nv-fieldnumber.entry-DBdJviXu.js +0 -148
- package/dist/cjs/nv-fieldpassword.entry-Cim_usSM.js +0 -122
- package/dist/cjs/nv-fieldtext.entry-DlI_ExaV.js +0 -124
- package/dist/cjs/nv-togglebutton.entry-LGI7pIeK.js +0 -56
- /package/dist/cjs/{clsx-297c1ffe-BtxeOLZW.js → clsx-ChV9xqsO-BtxeOLZW.js} +0 -0
- /package/dist/cjs/{constants-69bafca2-DpB_ghPF.js → constants-BReL3Lsa-DpB_ghPF.js} +0 -0
- /package/dist/cjs/{timeline.animation-79215cd4-KteJaZPb.js → timeline.animation-CgHCo_Ho-KteJaZPb.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-kU2nW5aN.js');
|
|
4
|
+
var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
|
|
5
|
+
require('@stencil/react-output-target/runtime');
|
|
5
6
|
require('react');
|
|
6
7
|
require('react-dom');
|
|
7
8
|
|
|
8
|
-
const nvIconbuttonCss = "nv-iconbutton.root{display:inline-flex;justify-content:center;align-items:center;font-style:normal;font-weight:var(--font-weight-medium-emphasis);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;transition:background-color 150ms ease-out;height:fit-content;width:fit-content}nv-iconbutton.size-xs{padding:var(--button-xs-icon-button-padding);gap:var(--button-xs-gap);border-radius:var(--button-xs-border-radius);line-height:var(--button-xs-line-height);font-size:var(--button-xs-font-size)}nv-iconbutton.size-sm{padding:var(--button-sm-icon-button-padding);gap:var(--button-sm-gap);border-radius:var(--button-sm-border-radius);line-height:var(--button-sm-line-height);font-size:var(--button-sm-font-size)}nv-iconbutton.size-md{padding:var(--button-md-icon-button-padding);gap:var(--button-md-gap);border-radius:var(--button-md-border-radius);line-height:var(--button-md-line-height);font-size:var(--button-md-font-size)}nv-iconbutton.size-lg{padding:var(--button-lg-icon-button-padding);gap:var(--button-lg-gap);border-radius:var(--button-lg-border-radius);line-height:var(--button-lg-line-height);font-size:var(--button-lg-font-size)}nv-iconbutton.emphasis-high{background:var(--components-button-high-background);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text)}nv-iconbutton.emphasis-high:hover{background:var(--components-button-high-background-hover);color:var(--components-button-high-text-hover)}nv-iconbutton.emphasis-high:focus,nv-iconbutton.emphasis-high:focus-within{outline:none}nv-iconbutton.emphasis-high:focus-visible,nv-iconbutton.emphasis-high:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-high:disabled{background:var(--components-button-high-background);color:var(--components-button-high-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-high nv-icon>svg{color:var(--components-button-high-icon)}nv-iconbutton.emphasis-medium{background:var(--components-button-medium-background);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text)}nv-iconbutton.emphasis-medium:hover{background:var(--components-button-medium-background-hover);color:var(--components-button-medium-text-hover)}nv-iconbutton.emphasis-medium:focus,nv-iconbutton.emphasis-medium:focus-within{outline:none}nv-iconbutton.emphasis-medium:focus-visible,nv-iconbutton.emphasis-medium:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-medium:disabled{background:var(--components-button-medium-background);color:var(--components-button-medium-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-medium nv-icon>svg{color:var(--components-button-medium-icon)}nv-iconbutton.emphasis-low{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-iconbutton.emphasis-low:hover{background:var(--components-button-low-background-hover);color:var(--components-button-low-text-hover)}nv-iconbutton.emphasis-low:focus,nv-iconbutton.emphasis-low:focus-within{outline:none}nv-iconbutton.emphasis-low:focus-visible,nv-iconbutton.emphasis-low:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-low:disabled{background:var(--components-button-low-background);color:var(--components-button-low-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-low nv-icon>svg{color:var(--components-button-low-icon)}nv-iconbutton.emphasis-lower{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-iconbutton.emphasis-lower:hover{background:var(--components-button-lower-background-hover);color:var(--components-button-lower-text-hover)}nv-iconbutton.emphasis-lower:focus,nv-iconbutton.emphasis-lower:focus-within{outline:none}nv-iconbutton.emphasis-lower:focus-visible,nv-iconbutton.emphasis-lower:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-lower:disabled{background:var(--components-button-lower-background);color:var(--components-button-lower-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-lower nv-icon>svg{color:var(--components-button-lower-icon)}nv-iconbutton.loading [slot=leading-icon]{display:none}nv-iconbutton.shape-rounded{border-radius:var(--radius-rounded-full)}";
|
|
9
|
-
const NvIconbuttonStyle0 = nvIconbuttonCss;
|
|
9
|
+
const nvIconbuttonCss = "nv-iconbutton.root{display:inline-flex;justify-content:center;align-items:center;font-style:normal;font-weight:var(--font-weight-medium-emphasis);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;transition:background-color 150ms ease-out;height:fit-content;width:fit-content}nv-iconbutton.size-xs{padding:calc(var(--button-xs-icon-button-padding) - 1px);gap:var(--button-xs-gap);border-radius:var(--button-xs-border-radius);line-height:var(--button-xs-line-height);font-size:var(--button-xs-font-size)}nv-iconbutton.size-sm{padding:calc(var(--button-sm-icon-button-padding) - 1px);gap:var(--button-sm-gap);border-radius:var(--button-sm-border-radius);line-height:var(--button-sm-line-height);font-size:var(--button-sm-font-size)}nv-iconbutton.size-md{padding:calc(var(--button-md-icon-button-padding) - 1px);gap:var(--button-md-gap);border-radius:var(--button-md-border-radius);line-height:var(--button-md-line-height);font-size:var(--button-md-font-size)}nv-iconbutton.size-lg{padding:calc(var(--button-lg-icon-button-padding) - 1px);gap:var(--button-lg-gap);border-radius:var(--button-lg-border-radius);line-height:var(--button-lg-line-height);font-size:var(--button-lg-font-size)}nv-iconbutton.emphasis-high{background:var(--components-button-high-background);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text)}nv-iconbutton.emphasis-high:hover{background:var(--components-button-high-background-hover);color:var(--components-button-high-text-hover)}nv-iconbutton.emphasis-high:focus,nv-iconbutton.emphasis-high:focus-within{outline:none}nv-iconbutton.emphasis-high:focus-visible,nv-iconbutton.emphasis-high:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-high:disabled{background:var(--components-button-high-background);color:var(--components-button-high-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-high nv-icon>svg{color:var(--components-button-high-icon)}nv-iconbutton.emphasis-medium{background:var(--components-button-medium-background);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text)}nv-iconbutton.emphasis-medium:hover{background:var(--components-button-medium-background-hover);color:var(--components-button-medium-text-hover)}nv-iconbutton.emphasis-medium:focus,nv-iconbutton.emphasis-medium:focus-within{outline:none}nv-iconbutton.emphasis-medium:focus-visible,nv-iconbutton.emphasis-medium:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-medium:disabled{background:var(--components-button-medium-background);color:var(--components-button-medium-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-medium nv-icon>svg{color:var(--components-button-medium-icon)}nv-iconbutton.emphasis-low{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-iconbutton.emphasis-low:hover{background:var(--components-button-low-background-hover);color:var(--components-button-low-text-hover)}nv-iconbutton.emphasis-low:focus,nv-iconbutton.emphasis-low:focus-within{outline:none}nv-iconbutton.emphasis-low:focus-visible,nv-iconbutton.emphasis-low:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-low:disabled{background:var(--components-button-low-background);color:var(--components-button-low-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-low nv-icon>svg{color:var(--components-button-low-icon)}nv-iconbutton.emphasis-lower{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-iconbutton.emphasis-lower:hover{background:var(--components-button-lower-background-hover);color:var(--components-button-lower-text-hover)}nv-iconbutton.emphasis-lower:focus,nv-iconbutton.emphasis-lower:focus-within{outline:none}nv-iconbutton.emphasis-lower:focus-visible,nv-iconbutton.emphasis-lower:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-lower:disabled{background:var(--components-button-lower-background);color:var(--components-button-lower-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-lower nv-icon>svg{color:var(--components-button-lower-icon)}nv-iconbutton.loading [slot=leading-icon]{display:none}nv-iconbutton.shape-rounded{border-radius:var(--radius-rounded-full)}";
|
|
10
10
|
|
|
11
11
|
const NvIconbutton = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -74,16 +74,15 @@ const NvIconbutton = class {
|
|
|
74
74
|
* @param {Event} event - The click event.
|
|
75
75
|
*/
|
|
76
76
|
this.handleClick = (event) => {
|
|
77
|
-
var _a, _b, _c, _d;
|
|
78
77
|
if (this.disabled) {
|
|
79
78
|
event.preventDefault();
|
|
80
79
|
return;
|
|
81
80
|
}
|
|
82
81
|
if (this.type === 'submit') {
|
|
83
|
-
|
|
82
|
+
this.internals?.form?.requestSubmit();
|
|
84
83
|
}
|
|
85
84
|
if (this.type === 'reset') {
|
|
86
|
-
|
|
85
|
+
this.internals?.form?.reset();
|
|
87
86
|
}
|
|
88
87
|
};
|
|
89
88
|
}
|
|
@@ -129,7 +128,7 @@ const NvIconbutton = class {
|
|
|
129
128
|
/****************************************************************************/
|
|
130
129
|
//#region RENDER
|
|
131
130
|
render() {
|
|
132
|
-
return (index.h(index.Host, { key: '
|
|
131
|
+
return (index.h(index.Host, { key: '2e0011f5ebb23512aa89756ae7fd5ad81586f8b1', role: "button", type: this.type, tabindex: this.disableTabindex ? -1 : 0, disabled: this.disabled ? true : undefined, class: clsxChV9xqsO.clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && index.h("nv-loader", { key: '435692a00ed0af3548c2ac875e573af00daf5d62', size: this.size }), !this.loading && index.h("nv-icon", { key: '00b08fbd43724ad7ce54c96cd052ba637e111ece', name: this.name, size: this.size }), index.h("slot", { key: 'bb61e7db6115c9017007f15320dd5b2f6ccd9671' })));
|
|
133
132
|
}
|
|
134
133
|
static get formAssociated() { return true; }
|
|
135
134
|
get el() { return index.getElement(this); }
|
|
@@ -138,10 +137,9 @@ const NvIconbutton = class {
|
|
|
138
137
|
"disabled": ["handleDisabledChange"]
|
|
139
138
|
}; }
|
|
140
139
|
};
|
|
141
|
-
NvIconbutton.style =
|
|
140
|
+
NvIconbutton.style = nvIconbuttonCss;
|
|
142
141
|
|
|
143
142
|
const nvLoaderCss = "@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}nv-loader{display:inline-block;position:relative;aspect-ratio:1/1;border-radius:9999px;color:inherit}nv-loader.size-xs{width:var(--loader-size-xs);height:var(--loader-size-xs)}nv-loader.size-xs::before,nv-loader.size-xs::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-xs::before{content:\" \";border:calc(var(--loader-size-xs) / 10) solid;opacity:0.3}nv-loader.size-xs::after{content:\" \";border-top:calc(var(--loader-size-xs) / 10) solid transparent;border-left:calc(var(--loader-size-xs) / 10) solid transparent;border-right:calc(var(--loader-size-xs) / 10) solid transparent;border-bottom:calc(var(--loader-size-xs) / 10) solid;animation:rotation 1s linear infinite}nv-loader.size-sm{width:var(--loader-size-sm);height:var(--loader-size-sm)}nv-loader.size-sm::before,nv-loader.size-sm::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-sm::before{content:\" \";border:calc(var(--loader-size-sm) / 10) solid;opacity:0.3}nv-loader.size-sm::after{content:\" \";border-top:calc(var(--loader-size-sm) / 10) solid transparent;border-left:calc(var(--loader-size-sm) / 10) solid transparent;border-right:calc(var(--loader-size-sm) / 10) solid transparent;border-bottom:calc(var(--loader-size-sm) / 10) solid;animation:rotation 1s linear infinite}nv-loader.size-md{width:var(--loader-size-md);height:var(--loader-size-md)}nv-loader.size-md::before,nv-loader.size-md::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-md::before{content:\" \";border:calc(var(--loader-size-md) / 10) solid;opacity:0.3}nv-loader.size-md::after{content:\" \";border-top:calc(var(--loader-size-md) / 10) solid transparent;border-left:calc(var(--loader-size-md) / 10) solid transparent;border-right:calc(var(--loader-size-md) / 10) solid transparent;border-bottom:calc(var(--loader-size-md) / 10) solid;animation:rotation 1s linear infinite}nv-loader.size-lg{width:var(--loader-size-lg);height:var(--loader-size-lg)}nv-loader.size-lg::before,nv-loader.size-lg::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-lg::before{content:\" \";border:calc(var(--loader-size-lg) / 10) solid;opacity:0.3}nv-loader.size-lg::after{content:\" \";border-top:calc(var(--loader-size-lg) / 10) solid transparent;border-left:calc(var(--loader-size-lg) / 10) solid transparent;border-right:calc(var(--loader-size-lg) / 10) solid transparent;border-bottom:calc(var(--loader-size-lg) / 10) solid;animation:rotation 1s linear infinite}nv-loader.size-xl{width:var(--loader-size-xl);height:var(--loader-size-xl)}nv-loader.size-xl::before,nv-loader.size-xl::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-xl::before{content:\" \";border:calc(var(--loader-size-xl) / 10) solid;opacity:0.3}nv-loader.size-xl::after{content:\" \";border-top:calc(var(--loader-size-xl) / 10) solid transparent;border-left:calc(var(--loader-size-xl) / 10) solid transparent;border-right:calc(var(--loader-size-xl) / 10) solid transparent;border-bottom:calc(var(--loader-size-xl) / 10) solid;animation:rotation 1s linear infinite}nv-loader.color-brand::before{border-color:var(--components-loader-brand-background);opacity:1}nv-loader.color-brand::after{border-bottom-color:var(--components-loader-brand-foreground)}nv-loader.color-white::before{border-color:var(--components-loader-white-background);opacity:1}nv-loader.color-white::after{border-bottom-color:var(--components-loader-white-foreground)}";
|
|
144
|
-
const NvLoaderStyle0 = nvLoaderCss;
|
|
145
143
|
|
|
146
144
|
const NvLoader = class {
|
|
147
145
|
constructor(hostRef) {
|
|
@@ -160,10 +158,10 @@ const NvLoader = class {
|
|
|
160
158
|
//#region RENDER
|
|
161
159
|
/* <slot> empty to force rendering change */
|
|
162
160
|
render() {
|
|
163
|
-
return (index.h(index.Host, { key: '
|
|
161
|
+
return (index.h(index.Host, { key: '4347ec4ee393edb5e23a60e253bae73d0f9db583', class: clsxChV9xqsO.clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
164
162
|
}
|
|
165
163
|
};
|
|
166
|
-
NvLoader.style =
|
|
164
|
+
NvLoader.style = nvLoaderCss;
|
|
167
165
|
|
|
168
166
|
exports.nv_iconbutton = NvIconbutton;
|
|
169
167
|
exports.nv_loader = NvLoader;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-kU2nW5aN.js');
|
|
4
|
+
require('@stencil/react-output-target/runtime');
|
|
4
5
|
require('react');
|
|
5
6
|
require('react-dom');
|
|
6
7
|
|
|
7
8
|
const nvMenuCss = "nv-menuitem{display:flex;align-items:center;max-width:300px;width:100vw;font-size:var(--menu-contextual-item-font-size);font-weight:var(--menu-contextual-item-font-weight);color:var(--components-menu-contextual-item-content);border-radius:var(--menu-contextual-item-radius);gap:var(--menu-contextual-item-gap-x);padding:var(--menu-contextual-item-padding-y) var(--menu-contextual-item-padding-x);transition:background-color 150ms ease-out;cursor:pointer}nv-menuitem:hover,nv-menuitem:focus,nv-menuitem:focus-within{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menuitem *{pointer-events:none}nv-menuitem kbd{color:var(--components-menu-contextual-item-shortcut)}nv-menuitem [data-scope=text]{margin-right:auto}nv-menuitem[disabled]:not([disabled=false]){cursor:unset;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}nv-menu{display:inline-block;position:relative}nv-menu:has([fluid]:not([fluid=false])){display:block}nv-menu nv-popover{display:unset}nv-menu nv-popover [data-scope=popover]{background-color:transparent !important;padding:0 !important}nv-menu [slot=content]{padding:var(--menu-contextual-padding-y) var(--menu-contextual-padding-x);border-radius:var(--menu-contextual-radius);gap:var(--menu-contextual-gap-y);background-color:var(--components-menu-contextual-background);border-color:var(--components-menu-contextual-border);display:flex;flex-direction:column}nv-menu nv-menu[open]:not([open=false])>nv-menuitem{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menu hr{display:block;margin:var(--menu-contextual-divider-padding-top) var(--menu-contextual-divider-padding-x) var(--menu-contextual-divider-padding-bottom) var(--menu-contextual-divider-padding-x)}";
|
|
8
|
-
const NvMenuStyle0 = nvMenuCss;
|
|
9
9
|
|
|
10
10
|
const NvMenu = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
|
-
this.menuitemSelected = index.createEvent(this, "menuitemSelected");
|
|
13
|
+
this.menuitemSelected = index.createEvent(this, "menuitemSelected", 3);
|
|
14
14
|
this.isHandlingKeyDown = false;
|
|
15
15
|
/****************************************************************************/
|
|
16
16
|
//#region PROPERTIES
|
|
@@ -45,11 +45,10 @@ const NvMenu = class {
|
|
|
45
45
|
*/
|
|
46
46
|
this.renderMenuItems = () => {
|
|
47
47
|
return this.items.map(item => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return (index.h("nv-menu", { nested: true, placement: "right-start", items: item.submenuItems }, index.h("nv-menuitem", { slot: "trigger", hasSubmenu: true, disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label })));
|
|
48
|
+
if (item.hasSubmenu && item.submenuItems?.length > 0) {
|
|
49
|
+
return (index.h("nv-menu", { nested: true, placement: "right-start", items: item.submenuItems }, index.h("nv-menuitem", { slot: "trigger", hasSubmenu: true, disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label, onMenuitemSelected: e => this.menuitemSelected.emit(e.detail) })));
|
|
51
50
|
}
|
|
52
|
-
return (index.h("nv-menuitem", { disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label }));
|
|
51
|
+
return (index.h("nv-menuitem", { disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label, onMenuitemSelected: e => this.menuitemSelected.emit(e.detail) }));
|
|
53
52
|
});
|
|
54
53
|
};
|
|
55
54
|
}
|
|
@@ -74,18 +73,17 @@ const NvMenu = class {
|
|
|
74
73
|
requestAnimationFrame(() => firstButton.focus());
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (newOpen) {
|
|
76
|
+
handleOpenChanged(event) {
|
|
77
|
+
this.open = event.detail;
|
|
78
|
+
const triggerHasFocus = this.triggerElement === document.activeElement;
|
|
79
|
+
const triggerHasFocusVisible = this.triggerElement.matches(':focus-visible');
|
|
80
|
+
if (triggerHasFocus && triggerHasFocusVisible)
|
|
83
81
|
this.focusFirstItem();
|
|
84
|
-
}
|
|
85
82
|
}
|
|
86
|
-
//#endregion
|
|
83
|
+
//#endregion EVENTS
|
|
87
84
|
/****************************************************************************/
|
|
88
85
|
//#region LISTENERS
|
|
86
|
+
/* eslint-disable nova/native-event-listener */
|
|
89
87
|
handleMenuItemSelect(event) {
|
|
90
88
|
if (this.disableCloseOnSelect)
|
|
91
89
|
return;
|
|
@@ -93,6 +91,7 @@ const NvMenu = class {
|
|
|
93
91
|
return;
|
|
94
92
|
this.open = false;
|
|
95
93
|
}
|
|
94
|
+
/* eslint-enable nova/native-event-listener */
|
|
96
95
|
handleKeydown(event) {
|
|
97
96
|
// If the menu is not open, check if the trigger is focused
|
|
98
97
|
// and the user presses Enter or ArrowDown, open the menu
|
|
@@ -103,6 +102,7 @@ const NvMenu = class {
|
|
|
103
102
|
document.activeElement === this.triggerElement) {
|
|
104
103
|
event.preventDefault();
|
|
105
104
|
this.show();
|
|
105
|
+
this.focusFirstItem();
|
|
106
106
|
// Then, put the focus on the first menuitem
|
|
107
107
|
const firstMenuItem = this.popoverElement.querySelector('nv-menuitem');
|
|
108
108
|
if (firstMenuItem) {
|
|
@@ -128,7 +128,7 @@ const NvMenu = class {
|
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
const menuContent = this.el.querySelector('[slot="content"]');
|
|
131
|
-
const menuItems = Array.from(menuContent.childNodes).filter(item =>
|
|
131
|
+
const menuItems = Array.from(menuContent.childNodes).filter(item => item.matches?.('nv-menuitem, nv-menu'));
|
|
132
132
|
let currentIndex = menuItems.indexOf(document.activeElement);
|
|
133
133
|
if (currentIndex === -1)
|
|
134
134
|
currentIndex = menuItems.indexOf(document.activeElement.parentElement);
|
|
@@ -187,17 +187,6 @@ const NvMenu = class {
|
|
|
187
187
|
}
|
|
188
188
|
this.isHandlingKeyDown = false;
|
|
189
189
|
}
|
|
190
|
-
handleOpenChanged(event) {
|
|
191
|
-
// Stop propagation to prevent the event from affecting parent components like dialogs
|
|
192
|
-
event.stopPropagation();
|
|
193
|
-
if (event.target === this.el.querySelector('nv-popover')) {
|
|
194
|
-
this.open = event.detail;
|
|
195
|
-
}
|
|
196
|
-
const triggerHasFocus = this.triggerElement === document.activeElement;
|
|
197
|
-
const triggerHasFocusVisible = this.triggerElement.matches(':focus-visible');
|
|
198
|
-
if (triggerHasFocus && triggerHasFocusVisible)
|
|
199
|
-
this.focusFirstItem();
|
|
200
|
-
}
|
|
201
190
|
//#endregion LISTENERS
|
|
202
191
|
/****************************************************************************/
|
|
203
192
|
//#region LIFECYCLE
|
|
@@ -207,13 +196,10 @@ const NvMenu = class {
|
|
|
207
196
|
});
|
|
208
197
|
}
|
|
209
198
|
render() {
|
|
210
|
-
return (index.h(index.Host, { key: '
|
|
199
|
+
return (index.h(index.Host, { key: '1139a5dbbbb52e2f32c5d1410b4bdb87156cfd60' }, index.h("slot", { key: 'f2202b254512643f0a16ebcda3715438a7c7aa2a', name: "trigger" }), index.h("nv-popover", { key: '2f49bd9af8ff253ab662b5054717e0d44690f47d', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open, onOpenChanged: this.handleOpenChanged.bind(this) }, this.items ? (index.h("ul", { slot: "content" }, this.renderMenuItems())) : (index.h("slot", { name: "content" })))));
|
|
211
200
|
}
|
|
212
201
|
get el() { return index.getElement(this); }
|
|
213
|
-
static get watchers() { return {
|
|
214
|
-
"open": ["handleOpenChange"]
|
|
215
|
-
}; }
|
|
216
202
|
};
|
|
217
|
-
NvMenu.style =
|
|
203
|
+
NvMenu.style = nvMenuCss;
|
|
218
204
|
|
|
219
205
|
exports.nv_menu = NvMenu;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-kU2nW5aN.js');
|
|
4
|
+
require('@stencil/react-output-target/runtime');
|
|
4
5
|
require('react');
|
|
5
6
|
require('react-dom');
|
|
6
7
|
|
|
7
8
|
const nvMenuitemCss = "nv-menuitem{display:flex;align-items:center;max-width:300px;width:100vw;font-size:var(--menu-contextual-item-font-size);font-weight:var(--menu-contextual-item-font-weight);color:var(--components-menu-contextual-item-content);border-radius:var(--menu-contextual-item-radius);gap:var(--menu-contextual-item-gap-x);padding:var(--menu-contextual-item-padding-y) var(--menu-contextual-item-padding-x);transition:background-color 150ms ease-out;cursor:pointer}nv-menuitem:hover,nv-menuitem:focus,nv-menuitem:focus-within{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menuitem *{pointer-events:none}nv-menuitem kbd{color:var(--components-menu-contextual-item-shortcut)}nv-menuitem [data-scope=text]{margin-right:auto}nv-menuitem[disabled]:not([disabled=false]){cursor:unset;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}";
|
|
8
|
-
const NvMenuitemStyle0 = nvMenuitemCss;
|
|
9
9
|
|
|
10
10
|
const NvMenuitem = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
|
-
this.menuitemSelected = index.createEvent(this, "menuitemSelected");
|
|
13
|
+
this.menuitemSelected = index.createEvent(this, "menuitemSelected", 7);
|
|
14
14
|
/**
|
|
15
15
|
* Disables the item, preventing user interaction.
|
|
16
16
|
*/
|
|
@@ -20,6 +20,7 @@ const NvMenuitem = class {
|
|
|
20
20
|
*/
|
|
21
21
|
this.hasSubmenu = false;
|
|
22
22
|
}
|
|
23
|
+
/* eslint-enable nova/event-bubbling */
|
|
23
24
|
handleMenuItemSelect(event) {
|
|
24
25
|
// If the element is disabled, stop propagation
|
|
25
26
|
if (this.disabled) {
|
|
@@ -50,10 +51,10 @@ const NvMenuitem = class {
|
|
|
50
51
|
/****************************************************************************/
|
|
51
52
|
//#region RENDER
|
|
52
53
|
render() {
|
|
53
|
-
return (index.h(index.Host, { key: '
|
|
54
|
+
return (index.h(index.Host, { key: 'e21f532b90f018810befe6a03ef4cb75fe05aea2', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && index.h("nv-icon", { key: 'a63bdcae06b1311440ec95ecf002a8b9a130aea8', name: this.icon }), index.h("slot", { key: 'f25c0104369b8d70ce35d4bf74cf92c1bcdf66c6' }), this.label && index.h("span", { key: '5ab5691b53857876c8e13e91f975b41e255999da', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && index.h("kbd", { key: 'c93777342da74e2cba4dfbbdf6657814b3996f41' }, this.shortcut), this.hasSubmenu && index.h("nv-icon", { key: '87a58745651c54efb1c96841846363e377ee6fca', name: "chevron-right" })));
|
|
54
55
|
}
|
|
55
56
|
get el() { return index.getElement(this); }
|
|
56
57
|
};
|
|
57
|
-
NvMenuitem.style =
|
|
58
|
+
NvMenuitem.style = nvMenuitemCss;
|
|
58
59
|
|
|
59
60
|
exports.nv_menuitem = NvMenuitem;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-kU2nW5aN.js');
|
|
4
|
+
require('@stencil/react-output-target/runtime');
|
|
5
|
+
require('react');
|
|
6
|
+
require('react-dom');
|
|
7
|
+
|
|
8
|
+
const nvNotificationBulletCss = "nv-notification-bullet{display:inline-flex;align-items:center;justify-content:center;min-width:var(--sidebar-notification-bullet-size);max-width:var(--sidebar-notification-bullet-size);height:var(--sidebar-notification-bullet-size);padding:0 var(--spacing-1);border-radius:var(--radius-rounded-full);font-size:var(--sidebar-notification-bullet-font-size);font-weight:var(--sidebar-notification-bullet-font-weight);white-space:nowrap;flex-shrink:0;position:relative;}nv-notification-bullet.nv-notification-bullet-brand .nv-notification-bullet{display:inline-flex;align-items:center;justify-content:center;min-width:var(--sidebar-notification-bullet-size);max-width:var(--sidebar-notification-bullet-size);height:var(--sidebar-notification-bullet-size);padding:0 var(--spacing-1);border-radius:var(--radius-rounded-full);font-size:var(--sidebar-notification-bullet-font-size);font-weight:var(--sidebar-notification-bullet-font-weight);white-space:nowrap;flex-shrink:0}nv-notification-bullet.nv-notification-bullet-brand .nv-notification-bullet.nv-notification-bullet-high{background-color:var(--color-brand-500);color:var(--color-feedback-neutral-high-contrast-title)}nv-notification-bullet.nv-notification-bullet-brand .nv-notification-bullet.nv-notification-bullet-low{background-color:var(--color-brand-50);color:var(--color-brand-600);border:1px solid var(--color-brand-600)}nv-notification-bullet{}nv-notification-bullet.nv-notification-bullet-neutral{display:inline-flex;align-items:center;justify-content:center;min-width:var(--sidebar-notification-bullet-size);max-width:var(--sidebar-notification-bullet-size);height:var(--sidebar-notification-bullet-size);padding:0 var(--spacing-1);border-radius:var(--radius-rounded-full);font-size:var(--sidebar-notification-bullet-font-size);font-weight:var(--sidebar-notification-bullet-font-weight);white-space:nowrap;flex-shrink:0}nv-notification-bullet.nv-notification-bullet-neutral .nv-notification-bullet.nv-notification-bullet-high{background-color:var(--color-feedback-neutral-high-contrast-background);color:var(--color-feedback-neutral-high-contrast-title)}nv-notification-bullet.nv-notification-bullet-neutral .nv-notification-bullet.nv-notification-bullet-low{background-color:var(--color-feedback-neutral-low-background);color:var(--color-feedback-neutral-low-text);border-radius:var(--radius-rounded-full)}nv-notification-bullet{}nv-notification-bullet.nv-notification-bullet-with-cross-border::before{content:\"\";position:absolute;top:55%;left:45%;transform:translate(-50%, -50%);width:calc(var(--sidebar-notification-bullet-size) + 1.5px);height:calc(var(--sidebar-notification-bullet-size) * 1.5);border-radius:var(--radius-rounded-full);background-color:var(--nv-component-background, var(--nv-sidebarnavitem-background, var(--color-interaction-container-neutral-background)));z-index:-1;pointer-events:none}nv-notification-bullet{}nv-sidebar[collapsed] nv-notification-bullet.nv-notification-bullet-with-cross-border::before{width:calc(var(--sidebar-notification-bullet-size-reduced) * 1.5);height:calc(var(--sidebar-notification-bullet-size-reduced) * 1.5)}nv-notification-bullet{}nv-notification-bullet .nv-notification-bullet.nv-notification-bullet-reduced,nv-sidebar[collapsed] nv-notification-bullet .nv-notification-bullet{width:var(--sidebar-notification-bullet-size-reduced);height:var(--sidebar-notification-bullet-size-reduced);min-width:var(--sidebar-notification-bullet-size-reduced);max-width:var(--sidebar-notification-bullet-size-reduced);min-height:var(--sidebar-notification-bullet-size-reduced);max-height:var(--sidebar-notification-bullet-size-reduced);padding:0;font-size:0}";
|
|
9
|
+
|
|
10
|
+
const NvNotificationBullet = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
/**
|
|
14
|
+
* Determines the size of the notification bullet.
|
|
15
|
+
* - default: Normal size with text visible
|
|
16
|
+
* - reduced: Smaller size, text hidden (just a dot)
|
|
17
|
+
*/
|
|
18
|
+
this.size = 'default';
|
|
19
|
+
/**
|
|
20
|
+
* Allows to add a border to add contrast on background.
|
|
21
|
+
*/
|
|
22
|
+
this.contrastingBorder = false;
|
|
23
|
+
}
|
|
24
|
+
//#endregion PROPERTIES
|
|
25
|
+
/****************************************************************************/
|
|
26
|
+
//#region METHODS
|
|
27
|
+
getIntention() {
|
|
28
|
+
if (this.intention) {
|
|
29
|
+
return this.intention;
|
|
30
|
+
}
|
|
31
|
+
// Inherit from parent nv-sidebar
|
|
32
|
+
const sidebar = this.el.closest('nv-sidebar');
|
|
33
|
+
if (sidebar) {
|
|
34
|
+
const sidebarIntention = sidebar.getAttribute('notification-intention');
|
|
35
|
+
if (sidebarIntention === 'neutral' || sidebarIntention === 'brand') {
|
|
36
|
+
return sidebarIntention;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return 'brand'; // Default fallback
|
|
40
|
+
}
|
|
41
|
+
getEmphasis() {
|
|
42
|
+
if (this.emphasis) {
|
|
43
|
+
return this.emphasis;
|
|
44
|
+
}
|
|
45
|
+
// Inherit from parent nv-sidebar
|
|
46
|
+
const sidebar = this.el.closest('nv-sidebar');
|
|
47
|
+
if (sidebar) {
|
|
48
|
+
const sidebarEmphasis = sidebar.getAttribute('notification-emphasis');
|
|
49
|
+
if (sidebarEmphasis === 'high' || sidebarEmphasis === 'low') {
|
|
50
|
+
return sidebarEmphasis;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return 'high'; // Default fallback
|
|
54
|
+
}
|
|
55
|
+
//#region RENDER
|
|
56
|
+
render() {
|
|
57
|
+
const displayCount = this.count ?? 0;
|
|
58
|
+
const displayText = displayCount > 99 ? '99+' : String(displayCount);
|
|
59
|
+
if (displayCount <= 0) {
|
|
60
|
+
return index.h(index.Host, { style: { display: 'none' } });
|
|
61
|
+
}
|
|
62
|
+
const sizeClass = this.size === 'reduced' ? 'nv-notification-bullet-reduced' : '';
|
|
63
|
+
const intention = this.getIntention();
|
|
64
|
+
const emphasis = this.getEmphasis();
|
|
65
|
+
const intentionClass = `nv-notification-bullet-${intention}`;
|
|
66
|
+
const emphasisClass = `nv-notification-bullet-${emphasis}`;
|
|
67
|
+
const borderClass = this.contrastingBorder
|
|
68
|
+
? 'nv-notification-bullet-with-border'
|
|
69
|
+
: '';
|
|
70
|
+
return (index.h(index.Host, { class: `${intentionClass} ${borderClass ? 'nv-notification-bullet-with-cross-border' : ''}` }, index.h("span", { class: `nv-notification-bullet ${emphasisClass} ${sizeClass} ${borderClass}`, "aria-label": `${displayCount} notifications` }, displayText)));
|
|
71
|
+
}
|
|
72
|
+
get el() { return index.getElement(this); }
|
|
73
|
+
};
|
|
74
|
+
NvNotificationBullet.style = nvNotificationBulletCss;
|
|
75
|
+
|
|
76
|
+
exports.nv_notification_bullet = NvNotificationBullet;
|
|
@@ -1,113 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
var
|
|
3
|
+
var index = require('./index-kU2nW5aN.js');
|
|
4
|
+
var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
|
|
5
|
+
var collapse_animationDZDm0vSK = require('./collapse.animation-DZDm0vSK-C2TOIhIK.js');
|
|
6
|
+
var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
|
|
7
|
+
require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
|
|
8
|
+
var slide_animationCmH5d1of = require('./slide.animation-CmH5d1of-BZuw607U.js');
|
|
9
|
+
var timeline_animationCgHCo_Ho = require('./timeline.animation-CgHCo_Ho-KteJaZPb.js');
|
|
10
|
+
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
11
|
+
require('@stencil/react-output-target/runtime');
|
|
10
12
|
require('react');
|
|
11
13
|
require('react-dom');
|
|
12
14
|
|
|
13
|
-
const useSlide = (node, { duration } = { duration: 200 }) => {
|
|
14
|
-
const nodeStyler = fade_animation9b939939.index(node);
|
|
15
|
-
/**
|
|
16
|
-
* Will animate the translateX property.
|
|
17
|
-
*
|
|
18
|
-
* @param {object} options - The options for the animation.
|
|
19
|
-
* @param {number} options.from - The starting value for the translateX property.
|
|
20
|
-
* @param {number} options.to - The ending value for the translateX property.
|
|
21
|
-
* @returns {Promise<void>} - A promise that resolves when the animation is
|
|
22
|
-
* complete.
|
|
23
|
-
*/
|
|
24
|
-
const slideX = (options = { from: 0, to: 100 }) => () => {
|
|
25
|
-
return new Promise(resolve => {
|
|
26
|
-
styleValueTypes_esF5d10b79.animate({
|
|
27
|
-
from: { x: options.from },
|
|
28
|
-
to: { x: options.to },
|
|
29
|
-
ease: styleValueTypes_esF5d10b79.easeOut,
|
|
30
|
-
duration,
|
|
31
|
-
onUpdate(latest) {
|
|
32
|
-
nodeStyler.set({ transform: `translateX(${latest.x}%)` });
|
|
33
|
-
},
|
|
34
|
-
onComplete() {
|
|
35
|
-
resolve();
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Will animate the translateY property.
|
|
42
|
-
*
|
|
43
|
-
* @param {object} options - The options for the animation.
|
|
44
|
-
* @param {number} options.from - The starting value for the translateY property.
|
|
45
|
-
* @param {number} options.to - The ending value for the translateY property.
|
|
46
|
-
* @returns {Promise<void>} - A promise that resolves when the animation is
|
|
47
|
-
* complete.
|
|
48
|
-
*/
|
|
49
|
-
const slideY = (options = { from: 0, to: 100 }) => () => {
|
|
50
|
-
return new Promise(resolve => {
|
|
51
|
-
styleValueTypes_esF5d10b79.animate({
|
|
52
|
-
from: { y: options.from },
|
|
53
|
-
to: { y: options.to },
|
|
54
|
-
ease: styleValueTypes_esF5d10b79.easeOut,
|
|
55
|
-
duration,
|
|
56
|
-
onUpdate(latest) {
|
|
57
|
-
nodeStyler.set({ transform: `translateY(${latest.y}%)` });
|
|
58
|
-
},
|
|
59
|
-
onComplete() {
|
|
60
|
-
resolve();
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Applies the slideX styles without animating, useful when initial state
|
|
67
|
-
* is slid out.
|
|
68
|
-
*
|
|
69
|
-
* @param {number} amount - The amount to translate the element by.
|
|
70
|
-
* @returns {function} - A function that applies the slideX styles.
|
|
71
|
-
*/
|
|
72
|
-
const setSlideX = (amount = 100) => nodeStyler.set({ transform: `translateX(${amount}%)` });
|
|
73
|
-
/**
|
|
74
|
-
* Applies the slideY styles without animating, useful when initial state
|
|
75
|
-
* is slid out.
|
|
76
|
-
*
|
|
77
|
-
* @param {number} amount - The amount to translate the element by.
|
|
78
|
-
* @returns {function} - A function that applies the slideY styles.
|
|
79
|
-
*/
|
|
80
|
-
const setSlideY = (amount = 100) => nodeStyler.set({ transform: `translateY(${amount}%)` });
|
|
81
|
-
/**
|
|
82
|
-
* Applies the slideIn styles without animating, useful when initial state
|
|
83
|
-
* is slid in.
|
|
84
|
-
*/
|
|
85
|
-
function setSlideReset() {
|
|
86
|
-
nodeStyler.set({ transform: `translateX(${0}%) translateY(${0}%)` });
|
|
87
|
-
}
|
|
88
|
-
return {
|
|
89
|
-
slideX,
|
|
90
|
-
slideY,
|
|
91
|
-
setSlideX,
|
|
92
|
-
setSlideY,
|
|
93
|
-
setSlideReset,
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
|
|
97
15
|
const nvNotificationCss = "nv-notification{display:block}nv-notification [data-scope=container]{display:flex;position:relative;max-width:512px;width:100%;padding:var(--notification-padding);align-items:flex-start;gap:var(--notification-gap-x);border-radius:var(--notification-radius);border-style:solid;box-shadow:0 var(--shadow-y-axis-lg-1, 4px) var(--shadow-blur-lg-1, 6px) var(--shadow-spread-lg-1, -2px) var(--shadow-color-opacity-1, rgba(14, 14, 14, 0.06)), 0 var(--shadow-y-axis-lg-2, 10px) var(--shadow-blur-lg-2, 15px) var(--shadow-spread-lg-2, -3px) var(--shadow-color-opacity-2, rgba(14, 14, 14, 0.1))}nv-notification [data-scope=container] [data-scope=icon]{flex-shrink:0}nv-notification [data-scope=container] [data-scope=dismiss]{padding:var(--button-sm-icon-button-padding, 8px);justify-content:center;align-items:center;gap:var(--button-sm-gap, 6px);display:flex;position:absolute;right:8px;top:8px;border-radius:var(--button-sm-border-radius, 4px);background:var(--components-button-lower-background, rgba(255, 255, 255, 0));color:var(--components-button-lower-icon)}nv-notification [data-scope=container] [data-scope=content]{display:flex;padding-right:var(--notification-padding-right);flex-direction:column;align-items:flex-start;gap:var(--notification-gap-y);flex:1 0 0}nv-notification [data-scope=container] [data-scope=content] [data-scope=heading]{display:flex;align-items:flex-start;gap:var(--notification-gap-x);align-self:stretch;color:var(--components-notification-content-title);font-size:var(--notification-title-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:20px;}nv-notification [data-scope=container] [data-scope=content] [data-scope=message]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--notification-gap-y);align-self:stretch;color:var(--components-notification-content-description);font-variant-numeric:lining-nums tabular-nums slashed-zero;font-size:var(--font-size-sm, 14px);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-sm, 20px)}nv-notification [data-scope=container] [data-scope=content] [data-scope=actions]{display:flex;padding:var(--spacing-2, 8px) 0;padding-bottom:0px;align-items:flex-start;gap:var(--notification-gap-x);align-self:stretch;margin-left:calc(-1 * var(--button-sm-padding-x))}nv-notification[feedback=information] [data-scope=container]{background-color:var(--components-notification-information-background);border-color:var(--components-notification-information-border)}nv-notification[feedback=information] [data-scope=container] [data-scope=icon]{color:var(--components-notification-information-icon)}nv-notification[feedback=information]>[data-scope=close]:focus,nv-notification[feedback=information]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=information]>[data-scope=close]:focus-visible,nv-notification[feedback=information]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-information-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=warning] [data-scope=container]{background-color:var(--components-notification-warning-background);border-color:var(--components-notification-warning-border)}nv-notification[feedback=warning] [data-scope=container] [data-scope=icon]{color:var(--components-notification-warning-icon)}nv-notification[feedback=warning]>[data-scope=close]:focus,nv-notification[feedback=warning]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=warning]>[data-scope=close]:focus-visible,nv-notification[feedback=warning]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-warning-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=error] [data-scope=container]{background-color:var(--components-notification-error-background);border-color:var(--components-notification-error-border)}nv-notification[feedback=error] [data-scope=container] [data-scope=icon]{color:var(--components-notification-error-icon)}nv-notification[feedback=error]>[data-scope=close]:focus,nv-notification[feedback=error]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=error]>[data-scope=close]:focus-visible,nv-notification[feedback=error]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-error-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=success] [data-scope=container]{background-color:var(--components-notification-success-background);border-color:var(--components-notification-success-border)}nv-notification[feedback=success] [data-scope=container] [data-scope=icon]{color:var(--components-notification-success-icon)}nv-notification[feedback=success]>[data-scope=close]:focus,nv-notification[feedback=success]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=success]>[data-scope=close]:focus-visible,nv-notification[feedback=success]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-success-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=neutral] [data-scope=container]{background-color:var(--components-notification-neutral-background);border-color:var(--components-notification-neutral-border)}nv-notification[feedback=neutral] [data-scope=container] [data-scope=icon]{color:var(--components-notification-neutral-icon)}nv-notification[feedback=neutral]>[data-scope=close]:focus,nv-notification[feedback=neutral]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=neutral]>[data-scope=close]:focus-visible,nv-notification[feedback=neutral]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-neutral-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[emphasis=high] [data-scope=container]{border-width:1px;border-left-width:var(--notification-border-width-high-emphasis);padding-left:calc(var(--notification-padding) - var(--notification-border-width-high-emphasis) + 1px)}nv-notification[emphasis=medium] [data-scope=container]{border-width:var(--notification-border-width-low-emphasis);border-color:var(--color-content-low-border, #E3E3E3)}";
|
|
98
|
-
const NvNotificationStyle0 = nvNotificationCss;
|
|
99
16
|
|
|
100
17
|
const NvNotification = class {
|
|
101
18
|
constructor(hostRef) {
|
|
102
19
|
index.registerInstance(this, hostRef);
|
|
103
|
-
this.hiddenChanged = index.createEvent(this, "hiddenChanged");
|
|
20
|
+
this.hiddenChanged = index.createEvent(this, "hiddenChanged", 3);
|
|
104
21
|
/****************************************************************************/
|
|
105
22
|
//#region PROPERTIES
|
|
106
23
|
/**
|
|
107
24
|
* Set a unique ID for the notification. Used for aria attributes and managing
|
|
108
25
|
* multiple notifications.
|
|
109
26
|
*/
|
|
110
|
-
this.uid =
|
|
27
|
+
this.uid = v4BdYh22OP.v4();
|
|
111
28
|
/**
|
|
112
29
|
* Specifies the notification type which determines the color and default icon.
|
|
113
30
|
*/
|
|
@@ -136,18 +53,18 @@ const NvNotification = class {
|
|
|
136
53
|
/****************************************************************************/
|
|
137
54
|
//#region INTERNAL
|
|
138
55
|
this.iconByFeedback = {
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
56
|
+
[constantsBReL3Lsa.FeedbackColors.Warning]: 'alert-circle',
|
|
57
|
+
[constantsBReL3Lsa.FeedbackColors.Information]: 'info-circle',
|
|
58
|
+
[constantsBReL3Lsa.FeedbackColors.Success]: 'circle-check',
|
|
59
|
+
[constantsBReL3Lsa.FeedbackColors.Error]: 'alert-triangle',
|
|
60
|
+
[constantsBReL3Lsa.FeedbackColors.Neutral]: 'help',
|
|
144
61
|
};
|
|
145
62
|
this.roleByFeedback = {
|
|
146
|
-
[
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
63
|
+
[constantsBReL3Lsa.FeedbackColors.Error]: 'alert',
|
|
64
|
+
[constantsBReL3Lsa.FeedbackColors.Warning]: 'alert',
|
|
65
|
+
[constantsBReL3Lsa.FeedbackColors.Information]: 'status',
|
|
66
|
+
[constantsBReL3Lsa.FeedbackColors.Success]: 'status',
|
|
67
|
+
[constantsBReL3Lsa.FeedbackColors.Neutral]: 'status',
|
|
151
68
|
};
|
|
152
69
|
}
|
|
153
70
|
//#endregion PROPERTIES
|
|
@@ -170,12 +87,10 @@ const NvNotification = class {
|
|
|
170
87
|
await this.showAnimation();
|
|
171
88
|
}
|
|
172
89
|
getDefaultIcon() {
|
|
173
|
-
|
|
174
|
-
return (_a = this.iconByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'info-circle';
|
|
90
|
+
return this.iconByFeedback[this.feedback] ?? 'info-circle';
|
|
175
91
|
}
|
|
176
92
|
getAriaRole() {
|
|
177
|
-
|
|
178
|
-
return (_a = this.roleByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'status';
|
|
93
|
+
return this.roleByFeedback[this.feedback] ?? 'status';
|
|
179
94
|
}
|
|
180
95
|
getAriaLive() {
|
|
181
96
|
return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';
|
|
@@ -188,45 +103,45 @@ const NvNotification = class {
|
|
|
188
103
|
}
|
|
189
104
|
async showAnimation() {
|
|
190
105
|
this.hidden = false;
|
|
191
|
-
const { setFadeIn } =
|
|
192
|
-
const { expand } =
|
|
106
|
+
const { setFadeIn } = fade_animationDcRL9lcm.useFade(this.container);
|
|
107
|
+
const { expand } = collapse_animationDZDm0vSK.useCollapse(this.el, {
|
|
193
108
|
duration: 300,
|
|
194
109
|
overflow: 'visible',
|
|
195
110
|
});
|
|
196
|
-
const { slideY, setSlideY } = useSlide(this.container, {
|
|
111
|
+
const { slideY, setSlideY } = slide_animationCmH5d1of.useSlide(this.container, {
|
|
197
112
|
duration: 300,
|
|
198
113
|
});
|
|
199
114
|
setSlideY(-100);
|
|
200
115
|
setFadeIn();
|
|
201
|
-
await
|
|
116
|
+
await timeline_animationCgHCo_Ho.parallel(slideY({ from: -100, to: 0 }), expand).start();
|
|
202
117
|
this.hiddenChanged.emit(false);
|
|
203
118
|
}
|
|
204
119
|
getSlideDestination(pos) {
|
|
205
120
|
switch (pos) {
|
|
206
|
-
case
|
|
207
|
-
case
|
|
121
|
+
case constantsBReL3Lsa.NotificationPosition.TopRight:
|
|
122
|
+
case constantsBReL3Lsa.NotificationPosition.BottomRight:
|
|
208
123
|
return { axis: 'x', to: 100 }; // right
|
|
209
|
-
case
|
|
210
|
-
case
|
|
124
|
+
case constantsBReL3Lsa.NotificationPosition.TopLeft:
|
|
125
|
+
case constantsBReL3Lsa.NotificationPosition.BottomLeft:
|
|
211
126
|
return { axis: 'x', to: -100 }; // left
|
|
212
|
-
case
|
|
127
|
+
case constantsBReL3Lsa.NotificationPosition.TopCenter:
|
|
213
128
|
return { axis: 'y', to: -100 }; // up
|
|
214
|
-
case
|
|
129
|
+
case constantsBReL3Lsa.NotificationPosition.BottomCenter:
|
|
215
130
|
return { axis: 'y', to: 100 }; // down
|
|
216
131
|
default:
|
|
217
132
|
return { axis: 'x', to: 100 }; // fallback
|
|
218
133
|
}
|
|
219
134
|
}
|
|
220
135
|
async dismissAnimation() {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
136
|
+
const position = this.el
|
|
137
|
+
.closest('nv-notificationcontainer')
|
|
138
|
+
?.getAttribute('position');
|
|
224
139
|
const destination = this.getSlideDestination(position);
|
|
225
|
-
const { fadeOut } =
|
|
226
|
-
const { slideX, slideY, setSlideReset } = useSlide(this.container, {
|
|
140
|
+
const { fadeOut } = fade_animationDcRL9lcm.useFade(this.container, { duration: 300 });
|
|
141
|
+
const { slideX, slideY, setSlideReset } = slide_animationCmH5d1of.useSlide(this.container, {
|
|
227
142
|
duration: 500,
|
|
228
143
|
});
|
|
229
|
-
const { collapse } =
|
|
144
|
+
const { collapse } = collapse_animationDZDm0vSK.useCollapse(this.el, {
|
|
230
145
|
duration: 500,
|
|
231
146
|
overflow: 'visible',
|
|
232
147
|
});
|
|
@@ -234,7 +149,7 @@ const NvNotification = class {
|
|
|
234
149
|
? slideX({ from: 0, to: destination.to })
|
|
235
150
|
: slideY({ from: 0, to: destination.to });
|
|
236
151
|
setSlideReset();
|
|
237
|
-
await
|
|
152
|
+
await timeline_animationCgHCo_Ho.parallel(fadeOut, slide, collapse).start();
|
|
238
153
|
this.hidden = true;
|
|
239
154
|
this.hiddenChanged.emit(true);
|
|
240
155
|
}
|
|
@@ -252,11 +167,10 @@ const NvNotification = class {
|
|
|
252
167
|
/****************************************************************************/
|
|
253
168
|
//#region RENDER
|
|
254
169
|
render() {
|
|
255
|
-
|
|
256
|
-
return (index.h(index.Host, { key: '10e49ace93a23660383f9bbfb45460e610320db3', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": (_a = this.getHeadingId()) !== null && _a !== void 0 ? _a : null, "aria-describedby": (_b = this.getMessageId()) !== null && _b !== void 0 ? _b : null, tabindex: "-1" }, index.h("div", { key: '1cce0d5c025e404ad641eed3c0ff07045db12de6', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '64a9e8f95f51908ed82f5c832d5a9738420b574b', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: 'f4f5a742b862a52ebf7e2edc320e4521ad575a29', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'a85552d6f9d81f67643f4a8c428464ed7af2ff90', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: 'bb7fd2fd626191f53b59507c3d5003369aaa2d70', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: 'ce333015dc488c8371d2dc90b97461888a28174e', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: '32c9d8c3c5a85a60e3993a5963ed019f5900e6c3', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: '08d57bf3058e3efcaf6d95de5754c34405ddddfb', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: 'f930fb38f00addf2911fc5401d906ee7c52b0920', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: '983c60ec7fdf1ed85d2ef9d1a5c327d0aaf78013', "data-scope": "actions" }, index.h("slot", { key: '521bd4d20db65dc6025a9fb285599dbd7643bed0', name: "actions" })))))));
|
|
170
|
+
return (index.h(index.Host, { key: '64c79843ff7bdd1a4ae001a60a8db540947b8412', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": this.getHeadingId() ?? null, "aria-describedby": this.getMessageId() ?? null, tabindex: "-1" }, index.h("div", { key: 'b51c9c3829b122476564726e20a1da112059035b', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '3ee952fb7dc41f54fa35c88d12d4d512b96eece1', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: '4fa53d42ff6ea7b5e90a01cfcffec167368aece6', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'e116c962672fb2237382b7dc2d3c6feae62bfced', name: this.icon ?? this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: '62a1da7ac952aa704965aca61ba6f98eb12341a2', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: '4ddc91bc5568f54c6f8f3114720c0821c103f1c3', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: 'b7b7c678c995d68be52ca6711e55e5a8fa43fe68', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: '5e02782e07e7e2720cef3ec8c7f06321ce53940d', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: '4886e5e490c5f1baf429c48666fd715f43113a71', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: '1d75b6276a8622bc607cf296336abc734e02320a', "data-scope": "actions" }, index.h("slot", { key: '6cab1b879e9b0582a415edd5d096a2b794b82ea4', name: "actions" })))))));
|
|
257
171
|
}
|
|
258
172
|
get el() { return index.getElement(this); }
|
|
259
173
|
};
|
|
260
|
-
NvNotification.style =
|
|
174
|
+
NvNotification.style = nvNotificationCss;
|
|
261
175
|
|
|
262
176
|
exports.nv_notification = NvNotification;
|