@nova-design-system/nova-react 3.21.1-beta.0 → 3.23.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/{fade.animation-9b939939-DV--bM4S.js → fade.animation-DcRL9lcm-DAZeHoKN.js} +75 -75
- package/dist/cjs/generated/components.server.js +163 -60
- package/dist/cjs/{grow.animation-24ad5cf8-LUp_ITEx.js → grow.animation-CvHGHBL4-DDIEYBK-.js} +5 -5
- package/dist/cjs/i18n.utils-DOZbXX2L-BizoXo6c.js +2498 -0
- package/dist/cjs/{index-CEKdYnmK.js → index-CtjeeUI-.js} +10298 -6029
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/inputmask-CSo292ul-DlvupPk6.js +3758 -0
- package/dist/cjs/{nv-accordion-item.entry-zvp8yDql.js → nv-accordion-item.entry-B_l0-ux0.js} +11 -10
- package/dist/cjs/{nv-accordion.entry-D6gckOF4.js → nv-accordion.entry-BX8_YuZF.js} +8 -5
- package/dist/cjs/{nv-alert.entry-Df8-nQ-R.js → nv-alert.entry-DCWYR0OK.js} +22 -22
- package/dist/cjs/{nv-avatar.entry-ZOnVWP9L.js → nv-avatar.entry-C_xZD3Lp.js} +11 -11
- package/dist/cjs/{nv-badge_2.entry-DgiVv_Yf.js → nv-badge_2.entry-JjqANStV.js} +24 -24
- package/dist/cjs/{nv-breadcrumb.entry-IqtE1JL0.js → nv-breadcrumb.entry-DQZDn6cm.js} +5 -5
- package/dist/cjs/{nv-breadcrumbs.entry-Be6dz7zI.js → nv-breadcrumbs.entry-Bz0GjhY_.js} +3 -3
- package/dist/cjs/{nv-button.entry-CmswF3Si.js → nv-button.entry-Br1DH9Vj.js} +9 -9
- package/dist/cjs/{nv-buttongroup.entry-Cfe6rFSs.js → nv-buttongroup.entry-BZaTKN_n.js} +3 -3
- package/dist/cjs/{nv-calendar.entry-q83sS_dN.js → nv-calendar.entry-D9ESuu7C.js} +105 -79
- package/dist/cjs/{nv-col.entry-Cu-Qi1bi.js → nv-col.entry-CfgPMMxS.js} +5 -5
- package/dist/cjs/{nv-datagrid.entry-Cx7SvD5S.js → nv-datagrid.entry-DcB5q2oC.js} +14 -14
- package/dist/cjs/{nv-datagridcolumn.entry-B_uXKFLg.js → nv-datagridcolumn.entry-BhKOzXA6.js} +2 -1
- package/dist/cjs/{nv-dialog.entry-J6Xwi6z1.js → nv-dialog.entry-O47Eol_7.js} +23 -23
- package/dist/cjs/{nv-dialogfooter_2.entry-DOlhqDTh.js → nv-dialogfooter_2.entry-Dn16bI8a.js} +10 -11
- package/dist/cjs/nv-fieldcheckbox.entry-Bx6ArV_b.js +177 -0
- package/dist/cjs/{nv-fielddate.entry-xWi3GpLl.js → nv-fielddate.entry-B4P0U8QG.js} +86 -40
- package/dist/cjs/{nv-fielddaterange.entry-BwFtpw9X.js → nv-fielddaterange.entry-BORwYJ-k.js} +150 -101
- package/dist/cjs/nv-fielddropdown.entry-DzBAIynY.js +687 -0
- package/dist/cjs/{nv-fielddropdownitem.entry-DjyFlVXw.js → nv-fielddropdownitem.entry-C_17isWd.js} +6 -5
- package/dist/cjs/{nv-fieldmultiselect.entry-BtLTG7nM.js → nv-fieldmultiselect.entry-DiqRreWh.js} +347 -232
- package/dist/cjs/nv-fieldnumber.entry-C9O4UPp3.js +187 -0
- package/dist/cjs/nv-fieldpassword.entry-BfVJNT0A.js +165 -0
- package/dist/cjs/{nv-fieldradio.entry-2hb1Ur40.js → nv-fieldradio.entry-CG22oETM.js} +10 -10
- package/dist/cjs/{nv-fieldselect.entry-D-eYQpAv.js → nv-fieldselect.entry-BPQEtrv2.js} +52 -13
- package/dist/cjs/{nv-fieldslider.entry-BGle1RZR.js → nv-fieldslider.entry-CozmnUfN.js} +16 -31
- package/dist/cjs/nv-fieldtext.entry-BD-z01ru.js +163 -0
- package/dist/cjs/{nv-fieldtextarea.entry-Z32-s901.js → nv-fieldtextarea.entry-7UrKWDHg.js} +51 -12
- package/dist/cjs/{nv-fieldtime.entry-CDFGdfFL.js → nv-fieldtime.entry-DakOlLiO.js} +109 -57
- package/dist/cjs/{nv-icon.entry-BDq7DKRt.js → nv-icon.entry-Db00kB2u.js} +11 -11
- package/dist/cjs/{nv-iconbutton_2.entry-DdgEkFLK.js → nv-iconbutton_2.entry-CaKCa8NT.js} +7 -8
- package/dist/cjs/{nv-menu.entry-iob0Kve8.js → nv-menu.entry-CK2HdmBt.js} +16 -29
- package/dist/cjs/{nv-menuitem.entry-C989Ui60.js → nv-menuitem.entry-mKMqCAdz.js} +6 -5
- package/dist/cjs/nv-notification-bullet.entry-DtbjtFxs.js +77 -0
- package/dist/cjs/{nv-notification.entry-BxvJMKxH.js → nv-notification.entry-CLb0gNu3.js} +39 -39
- package/dist/cjs/{nv-notificationcontainer.entry-CxGCIb96.js → nv-notificationcontainer.entry-Cijivlm6.js} +3 -3
- package/dist/cjs/{nv-popover.entry-1KsO_KQm.js → nv-popover.entry-mLdLSp6n.js} +49 -45
- package/dist/cjs/{nv-row.entry-PBLq_BzJ.js → nv-row.entry-C2C94fcv.js} +3 -3
- package/dist/cjs/{nv-sidebar.entry-CjLbvLqw.js → nv-sidebar.entry-inDVNJ4s.js} +13 -13
- package/dist/cjs/{nv-sidebarcontent.entry-Cv76IH4W.js → nv-sidebarcontent.entry-DxoljE15.js} +3 -3
- package/dist/cjs/{nv-sidebardivider.entry-DYPJ_k73.js → nv-sidebardivider.entry-D_yern0R.js} +4 -4
- package/dist/cjs/{nv-sidebarfooter.entry-mGcMBRmv.js → nv-sidebarfooter.entry-Rkkn9TB_.js} +3 -3
- package/dist/cjs/{nv-sidebargroup.entry-DtwFliHZ.js → nv-sidebargroup.entry-C1p9qqxr.js} +4 -4
- package/dist/cjs/{nv-sidebarheader.entry-BdOYIXCA.js → nv-sidebarheader.entry-CYpD_4pI.js} +3 -3
- package/dist/cjs/{nv-sidebarlogo.entry-Da0kGsfw.js → nv-sidebarlogo.entry-BgK03M1v.js} +3 -3
- package/dist/cjs/{nv-sidebarnavitem.entry-D5xLfpwn.js → nv-sidebarnavitem.entry-DglvcCOD.js} +4 -4
- package/dist/cjs/nv-sidebarnavsubitem.entry-Dt1jKmC-.js +35 -0
- package/dist/cjs/{nv-split.entry-y66NBf88.js → nv-split.entry-mzg2F66T.js} +6 -6
- package/dist/cjs/{nv-stack.entry-CXjpkpbW.js → nv-stack.entry-nnvjTrBy.js} +5 -5
- package/dist/cjs/{nv-table.entry-quaVnLru.js → nv-table.entry-DkbNgxtI.js} +3 -3
- package/dist/cjs/{nv-tableheader.entry-DTBE2XQO.js → nv-tableheader.entry-CRVFTQA-.js} +6 -6
- package/dist/cjs/{nv-toggle.entry-CxUwF0pb.js → nv-toggle.entry-oC9TVkr1.js} +9 -9
- package/dist/cjs/nv-togglebutton.entry-BTWCzbS9.js +67 -0
- package/dist/cjs/{nv-togglebuttongroup.entry-UbrE8y7a.js → nv-togglebuttongroup.entry-BYXX5ejg.js} +8 -5
- package/dist/cjs/{nv-tooltip.entry-Dq2bkV33.js → nv-tooltip.entry-OJGxfJEh.js} +5 -5
- 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 +77 -4
- package/dist/generated/components.server.js +144 -60
- 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 +17 -1
- 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-C23dGGX7.js +0 -138
- package/dist/cjs/nv-fielddropdown.entry-mnl7mSaK.js +0 -392
- package/dist/cjs/nv-fieldnumber.entry-C00Hg70B.js +0 -148
- package/dist/cjs/nv-fieldpassword.entry-BLg8tCN0.js +0 -122
- package/dist/cjs/nv-fieldtext.entry-Djg8cqOa.js +0 -124
- package/dist/cjs/nv-notification-bullet.entry-J8OkAZtU.js +0 -77
- package/dist/cjs/nv-sidebarnavsubitem.entry-CkeJfHH4.js +0 -35
- package/dist/cjs/nv-togglebutton.entry-w-WEAmE6.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-CtjeeUI-.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
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: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;
|
|
10
10
|
|
|
11
11
|
const NvIconbutton = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -129,7 +129,7 @@ const NvIconbutton = class {
|
|
|
129
129
|
/****************************************************************************/
|
|
130
130
|
//#region RENDER
|
|
131
131
|
render() {
|
|
132
|
-
return (index.h(index.Host, { key: '81d7f0bfd1e64ecbb640c2f02b7e73cd7b2d3aa4', role: "button", type: this.type, tabindex: this.disableTabindex ? -1 : 0, disabled: this.disabled ? true : undefined, class:
|
|
132
|
+
return (index.h(index.Host, { key: '81d7f0bfd1e64ecbb640c2f02b7e73cd7b2d3aa4', 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: 'cec3ee02a7fb0882557c8742c8f9d785835e79d0', size: this.size }), !this.loading && index.h("nv-icon", { key: '4892b3b78b291b159403a63ced6a150dd7def1c0', name: this.name, size: this.size }), index.h("slot", { key: 'b1204bf2dd026c1232b5e8209fd29f21a8aa704f' })));
|
|
133
133
|
}
|
|
134
134
|
static get formAssociated() { return true; }
|
|
135
135
|
get el() { return index.getElement(this); }
|
|
@@ -138,10 +138,9 @@ const NvIconbutton = class {
|
|
|
138
138
|
"disabled": ["handleDisabledChange"]
|
|
139
139
|
}; }
|
|
140
140
|
};
|
|
141
|
-
NvIconbutton.style =
|
|
141
|
+
NvIconbutton.style = nvIconbuttonCss;
|
|
142
142
|
|
|
143
143
|
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
144
|
|
|
146
145
|
const NvLoader = class {
|
|
147
146
|
constructor(hostRef) {
|
|
@@ -160,10 +159,10 @@ const NvLoader = class {
|
|
|
160
159
|
//#region RENDER
|
|
161
160
|
/* <slot> empty to force rendering change */
|
|
162
161
|
render() {
|
|
163
|
-
return (index.h(index.Host, { key: '049afa243c1ce99643408d86afa99e69c5468b8b', class:
|
|
162
|
+
return (index.h(index.Host, { key: '049afa243c1ce99643408d86afa99e69c5468b8b', class: clsxChV9xqsO.clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
164
163
|
}
|
|
165
164
|
};
|
|
166
|
-
NvLoader.style =
|
|
165
|
+
NvLoader.style = nvLoaderCss;
|
|
167
166
|
|
|
168
167
|
exports.nv_iconbutton = NvIconbutton;
|
|
169
168
|
exports.nv_loader = NvLoader;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CtjeeUI-.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
|
|
@@ -47,9 +47,9 @@ const NvMenu = class {
|
|
|
47
47
|
return this.items.map(item => {
|
|
48
48
|
var _a;
|
|
49
49
|
if (item.hasSubmenu && ((_a = item.submenuItems) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
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 })));
|
|
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, onMenuitemSelected: e => this.menuitemSelected.emit(e.detail) })));
|
|
51
51
|
}
|
|
52
|
-
return (index.h("nv-menuitem", { disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label }));
|
|
52
|
+
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
53
|
});
|
|
54
54
|
};
|
|
55
55
|
}
|
|
@@ -74,18 +74,17 @@ const NvMenu = class {
|
|
|
74
74
|
requestAnimationFrame(() => firstButton.focus());
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (newOpen) {
|
|
77
|
+
handleOpenChanged(event) {
|
|
78
|
+
this.open = event.detail;
|
|
79
|
+
const triggerHasFocus = this.triggerElement === document.activeElement;
|
|
80
|
+
const triggerHasFocusVisible = this.triggerElement.matches(':focus-visible');
|
|
81
|
+
if (triggerHasFocus && triggerHasFocusVisible)
|
|
83
82
|
this.focusFirstItem();
|
|
84
|
-
}
|
|
85
83
|
}
|
|
86
|
-
//#endregion
|
|
84
|
+
//#endregion EVENTS
|
|
87
85
|
/****************************************************************************/
|
|
88
86
|
//#region LISTENERS
|
|
87
|
+
/* eslint-disable nova/native-event-listener */
|
|
89
88
|
handleMenuItemSelect(event) {
|
|
90
89
|
if (this.disableCloseOnSelect)
|
|
91
90
|
return;
|
|
@@ -93,6 +92,7 @@ const NvMenu = class {
|
|
|
93
92
|
return;
|
|
94
93
|
this.open = false;
|
|
95
94
|
}
|
|
95
|
+
/* eslint-enable nova/native-event-listener */
|
|
96
96
|
handleKeydown(event) {
|
|
97
97
|
// If the menu is not open, check if the trigger is focused
|
|
98
98
|
// and the user presses Enter or ArrowDown, open the menu
|
|
@@ -103,6 +103,7 @@ const NvMenu = class {
|
|
|
103
103
|
document.activeElement === this.triggerElement) {
|
|
104
104
|
event.preventDefault();
|
|
105
105
|
this.show();
|
|
106
|
+
this.focusFirstItem();
|
|
106
107
|
// Then, put the focus on the first menuitem
|
|
107
108
|
const firstMenuItem = this.popoverElement.querySelector('nv-menuitem');
|
|
108
109
|
if (firstMenuItem) {
|
|
@@ -187,17 +188,6 @@ const NvMenu = class {
|
|
|
187
188
|
}
|
|
188
189
|
this.isHandlingKeyDown = false;
|
|
189
190
|
}
|
|
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
191
|
//#endregion LISTENERS
|
|
202
192
|
/****************************************************************************/
|
|
203
193
|
//#region LIFECYCLE
|
|
@@ -207,13 +197,10 @@ const NvMenu = class {
|
|
|
207
197
|
});
|
|
208
198
|
}
|
|
209
199
|
render() {
|
|
210
|
-
return (index.h(index.Host, { key: '
|
|
200
|
+
return (index.h(index.Host, { key: '1602501e810755ef8a625ea566203eaae32c52e7' }, index.h("slot", { key: '7a2b75f51e33820f5f608a44efc5b9659af54789', name: "trigger" }), index.h("nv-popover", { key: '2ac84fe36a9844dcf58f9f8d87fec16ae25c35b6', 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
201
|
}
|
|
212
202
|
get el() { return index.getElement(this); }
|
|
213
|
-
static get watchers() { return {
|
|
214
|
-
"open": ["handleOpenChange"]
|
|
215
|
-
}; }
|
|
216
203
|
};
|
|
217
|
-
NvMenu.style =
|
|
204
|
+
NvMenu.style = nvMenuCss;
|
|
218
205
|
|
|
219
206
|
exports.nv_menu = NvMenu;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CtjeeUI-.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: '3c9a394f8af5ab7b57061ddfdd3e07b9fce17847', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && index.h("nv-icon", { key: '3f36901afb278a608f8eaeb423e8aca08c055187', name: this.icon }), index.h("slot", { key: 'a54ca41926c4f9374af669125529befc6ab454e2' }), this.label && index.h("span", { key: 'c83199ffd4e5559b22d06392edf5ad6c8e83cf96', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && index.h("kbd", { key: 'c7a052d69c1d8cd33238f9f88405596a46649e3c' }, this.shortcut), this.hasSubmenu && index.h("nv-icon", { key: '57de548ca08d6fb045223f242dee568a29b6270f', 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,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CtjeeUI-.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
|
+
var _a;
|
|
58
|
+
const displayCount = (_a = this.count) !== null && _a !== void 0 ? _a : 0;
|
|
59
|
+
const displayText = displayCount > 99 ? '99+' : String(displayCount);
|
|
60
|
+
if (displayCount <= 0) {
|
|
61
|
+
return index.h(index.Host, { style: { display: 'none' } });
|
|
62
|
+
}
|
|
63
|
+
const sizeClass = this.size === 'reduced' ? 'nv-notification-bullet-reduced' : '';
|
|
64
|
+
const intention = this.getIntention();
|
|
65
|
+
const emphasis = this.getEmphasis();
|
|
66
|
+
const intentionClass = `nv-notification-bullet-${intention}`;
|
|
67
|
+
const emphasisClass = `nv-notification-bullet-${emphasis}`;
|
|
68
|
+
const borderClass = this.contrastingBorder
|
|
69
|
+
? 'nv-notification-bullet-with-border'
|
|
70
|
+
: '';
|
|
71
|
+
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)));
|
|
72
|
+
}
|
|
73
|
+
get el() { return index.getElement(this); }
|
|
74
|
+
};
|
|
75
|
+
NvNotificationBullet.style = nvNotificationBulletCss;
|
|
76
|
+
|
|
77
|
+
exports.nv_notification_bullet = NvNotificationBullet;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
3
|
+
var index = require('./index-CtjeeUI-.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
|
+
var styleValueTypes_esXlgmw4x8 = require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
|
|
8
|
+
var timeline_animationCgHCo_Ho = require('./timeline.animation-CgHCo_Ho-KteJaZPb.js');
|
|
9
|
+
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
10
|
+
require('@stencil/react-output-target/runtime');
|
|
10
11
|
require('react');
|
|
11
12
|
require('react-dom');
|
|
12
13
|
|
|
13
14
|
const useSlide = (node, { duration } = { duration: 200 }) => {
|
|
14
|
-
const nodeStyler =
|
|
15
|
+
const nodeStyler = fade_animationDcRL9lcm.index(node);
|
|
15
16
|
/**
|
|
16
17
|
* Will animate the translateX property.
|
|
17
18
|
*
|
|
@@ -23,10 +24,10 @@ const useSlide = (node, { duration } = { duration: 200 }) => {
|
|
|
23
24
|
*/
|
|
24
25
|
const slideX = (options = { from: 0, to: 100 }) => () => {
|
|
25
26
|
return new Promise(resolve => {
|
|
26
|
-
|
|
27
|
+
styleValueTypes_esXlgmw4x8.animate({
|
|
27
28
|
from: { x: options.from },
|
|
28
29
|
to: { x: options.to },
|
|
29
|
-
ease:
|
|
30
|
+
ease: styleValueTypes_esXlgmw4x8.easeOut,
|
|
30
31
|
duration,
|
|
31
32
|
onUpdate(latest) {
|
|
32
33
|
nodeStyler.set({ transform: `translateX(${latest.x}%)` });
|
|
@@ -48,10 +49,10 @@ const useSlide = (node, { duration } = { duration: 200 }) => {
|
|
|
48
49
|
*/
|
|
49
50
|
const slideY = (options = { from: 0, to: 100 }) => () => {
|
|
50
51
|
return new Promise(resolve => {
|
|
51
|
-
|
|
52
|
+
styleValueTypes_esXlgmw4x8.animate({
|
|
52
53
|
from: { y: options.from },
|
|
53
54
|
to: { y: options.to },
|
|
54
|
-
ease:
|
|
55
|
+
ease: styleValueTypes_esXlgmw4x8.easeOut,
|
|
55
56
|
duration,
|
|
56
57
|
onUpdate(latest) {
|
|
57
58
|
nodeStyler.set({ transform: `translateY(${latest.y}%)` });
|
|
@@ -95,19 +96,18 @@ const useSlide = (node, { duration } = { duration: 200 }) => {
|
|
|
95
96
|
};
|
|
96
97
|
|
|
97
98
|
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
99
|
|
|
100
100
|
const NvNotification = class {
|
|
101
101
|
constructor(hostRef) {
|
|
102
102
|
index.registerInstance(this, hostRef);
|
|
103
|
-
this.hiddenChanged = index.createEvent(this, "hiddenChanged");
|
|
103
|
+
this.hiddenChanged = index.createEvent(this, "hiddenChanged", 3);
|
|
104
104
|
/****************************************************************************/
|
|
105
105
|
//#region PROPERTIES
|
|
106
106
|
/**
|
|
107
107
|
* Set a unique ID for the notification. Used for aria attributes and managing
|
|
108
108
|
* multiple notifications.
|
|
109
109
|
*/
|
|
110
|
-
this.uid =
|
|
110
|
+
this.uid = v4BdYh22OP.v4();
|
|
111
111
|
/**
|
|
112
112
|
* Specifies the notification type which determines the color and default icon.
|
|
113
113
|
*/
|
|
@@ -136,18 +136,18 @@ const NvNotification = class {
|
|
|
136
136
|
/****************************************************************************/
|
|
137
137
|
//#region INTERNAL
|
|
138
138
|
this.iconByFeedback = {
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
139
|
+
[constantsBReL3Lsa.FeedbackColors.Warning]: 'alert-circle',
|
|
140
|
+
[constantsBReL3Lsa.FeedbackColors.Information]: 'info-circle',
|
|
141
|
+
[constantsBReL3Lsa.FeedbackColors.Success]: 'circle-check',
|
|
142
|
+
[constantsBReL3Lsa.FeedbackColors.Error]: 'alert-triangle',
|
|
143
|
+
[constantsBReL3Lsa.FeedbackColors.Neutral]: 'help',
|
|
144
144
|
};
|
|
145
145
|
this.roleByFeedback = {
|
|
146
|
-
[
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
146
|
+
[constantsBReL3Lsa.FeedbackColors.Error]: 'alert',
|
|
147
|
+
[constantsBReL3Lsa.FeedbackColors.Warning]: 'alert',
|
|
148
|
+
[constantsBReL3Lsa.FeedbackColors.Information]: 'status',
|
|
149
|
+
[constantsBReL3Lsa.FeedbackColors.Success]: 'status',
|
|
150
|
+
[constantsBReL3Lsa.FeedbackColors.Neutral]: 'status',
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
//#endregion PROPERTIES
|
|
@@ -188,8 +188,8 @@ const NvNotification = class {
|
|
|
188
188
|
}
|
|
189
189
|
async showAnimation() {
|
|
190
190
|
this.hidden = false;
|
|
191
|
-
const { setFadeIn } =
|
|
192
|
-
const { expand } =
|
|
191
|
+
const { setFadeIn } = fade_animationDcRL9lcm.useFade(this.container);
|
|
192
|
+
const { expand } = collapse_animationDZDm0vSK.useCollapse(this.el, {
|
|
193
193
|
duration: 300,
|
|
194
194
|
overflow: 'visible',
|
|
195
195
|
});
|
|
@@ -198,20 +198,20 @@ const NvNotification = class {
|
|
|
198
198
|
});
|
|
199
199
|
setSlideY(-100);
|
|
200
200
|
setFadeIn();
|
|
201
|
-
await
|
|
201
|
+
await timeline_animationCgHCo_Ho.parallel(slideY({ from: -100, to: 0 }), expand).start();
|
|
202
202
|
this.hiddenChanged.emit(false);
|
|
203
203
|
}
|
|
204
204
|
getSlideDestination(pos) {
|
|
205
205
|
switch (pos) {
|
|
206
|
-
case
|
|
207
|
-
case
|
|
206
|
+
case constantsBReL3Lsa.NotificationPosition.TopRight:
|
|
207
|
+
case constantsBReL3Lsa.NotificationPosition.BottomRight:
|
|
208
208
|
return { axis: 'x', to: 100 }; // right
|
|
209
|
-
case
|
|
210
|
-
case
|
|
209
|
+
case constantsBReL3Lsa.NotificationPosition.TopLeft:
|
|
210
|
+
case constantsBReL3Lsa.NotificationPosition.BottomLeft:
|
|
211
211
|
return { axis: 'x', to: -100 }; // left
|
|
212
|
-
case
|
|
212
|
+
case constantsBReL3Lsa.NotificationPosition.TopCenter:
|
|
213
213
|
return { axis: 'y', to: -100 }; // up
|
|
214
|
-
case
|
|
214
|
+
case constantsBReL3Lsa.NotificationPosition.BottomCenter:
|
|
215
215
|
return { axis: 'y', to: 100 }; // down
|
|
216
216
|
default:
|
|
217
217
|
return { axis: 'x', to: 100 }; // fallback
|
|
@@ -222,11 +222,11 @@ const NvNotification = class {
|
|
|
222
222
|
const position = (_a = this.el
|
|
223
223
|
.closest('nv-notificationcontainer')) === null || _a === void 0 ? void 0 : _a.getAttribute('position');
|
|
224
224
|
const destination = this.getSlideDestination(position);
|
|
225
|
-
const { fadeOut } =
|
|
225
|
+
const { fadeOut } = fade_animationDcRL9lcm.useFade(this.container, { duration: 300 });
|
|
226
226
|
const { slideX, slideY, setSlideReset } = useSlide(this.container, {
|
|
227
227
|
duration: 500,
|
|
228
228
|
});
|
|
229
|
-
const { collapse } =
|
|
229
|
+
const { collapse } = collapse_animationDZDm0vSK.useCollapse(this.el, {
|
|
230
230
|
duration: 500,
|
|
231
231
|
overflow: 'visible',
|
|
232
232
|
});
|
|
@@ -234,7 +234,7 @@ const NvNotification = class {
|
|
|
234
234
|
? slideX({ from: 0, to: destination.to })
|
|
235
235
|
: slideY({ from: 0, to: destination.to });
|
|
236
236
|
setSlideReset();
|
|
237
|
-
await
|
|
237
|
+
await timeline_animationCgHCo_Ho.parallel(fadeOut, slide, collapse).start();
|
|
238
238
|
this.hidden = true;
|
|
239
239
|
this.hiddenChanged.emit(true);
|
|
240
240
|
}
|
|
@@ -253,10 +253,10 @@ const NvNotification = class {
|
|
|
253
253
|
//#region RENDER
|
|
254
254
|
render() {
|
|
255
255
|
var _a, _b, _c;
|
|
256
|
-
return (index.h(index.Host, { key: '
|
|
256
|
+
return (index.h(index.Host, { key: 'cf0f39e0565a264b676e0ca569ec79169771d269', 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: 'ed2a5e50f0a6975c652f658e62a271c0b476f7d2', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '9eccf1b9f29f581bf77255b9e2bebebfdc233302', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: '73890097ad80af4d86646bb83f2ae99878164db4', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'c852478c25ae05d5219453234db95a420b5c5a1e', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: 'b06042bf55e8bedc07a60f23a27b07160776c0e0', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: '7666dfb18169cdfea8eb8c603b20a5ba7075824c', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: 'f6e651737cf630bb89d40b7664329596355a8ea0', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: 'ae5d89db2b36c4c81c7b46aada5f50bd6eb4aa90', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: '24d01abd694f7f9a316345f9d88716d1c0a47234', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: 'a1aa0bcc33a42d7b36bcd364a155d41f527cc96a', "data-scope": "actions" }, index.h("slot", { key: 'b09c21bed0fd559bf2f694f861385444c2ddbbf0', name: "actions" })))))));
|
|
257
257
|
}
|
|
258
258
|
get el() { return index.getElement(this); }
|
|
259
259
|
};
|
|
260
|
-
NvNotification.style =
|
|
260
|
+
NvNotification.style = nvNotificationCss;
|
|
261
261
|
|
|
262
262
|
exports.nv_notification = NvNotification;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CtjeeUI-.js');
|
|
4
|
+
require('@stencil/react-output-target/runtime');
|
|
4
5
|
require('react');
|
|
5
6
|
require('react-dom');
|
|
6
7
|
|
|
7
8
|
const nvNotificationcontainerCss = "nv-notificationcontainer{position:fixed;display:flex;flex-direction:column;padding:var(--spacing-2);padding-top:0;z-index:9999;pointer-events:none;width:100%;max-width:512px}nv-notificationcontainer.position-top-right{top:0;right:0}nv-notificationcontainer.position-top-right nv-notification{margin-top:var(--spacing-2)}nv-notificationcontainer.position-top-left{top:0;left:0}nv-notificationcontainer.position-top-left nv-notification{margin-bottom:var(--spacing-2)}nv-notificationcontainer.position-top-center{top:0;left:50%;transform:translateX(-50%)}nv-notificationcontainer.position-top-center nv-notification{margin-bottom:var(--spacing-2)}nv-notificationcontainer.position-bottom-right{bottom:0;right:0;flex-direction:column-reverse}nv-notificationcontainer.position-bottom-right nv-notification{margin-top:var(--spacing-2)}nv-notificationcontainer.position-bottom-left{bottom:0;left:0;flex-direction:column-reverse}nv-notificationcontainer.position-bottom-left nv-notification{margin-top:var(--spacing-2)}nv-notificationcontainer.position-bottom-center{bottom:0;left:50%;transform:translateX(-50%);flex-direction:column-reverse}nv-notificationcontainer.position-bottom-center nv-notification{margin-top:var(--spacing-2)}nv-notificationcontainer>*{pointer-events:auto}";
|
|
8
|
-
const NvNotificationcontainerStyle0 = nvNotificationcontainerCss;
|
|
9
9
|
|
|
10
10
|
const NvNotificationContainer = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -36,6 +36,6 @@ const NvNotificationContainer = class {
|
|
|
36
36
|
return (index.h(index.Host, { key: 'bf0b7cd02e0d214516f352eb7016d6060d6959c5', class: `position-${this.position}` }, index.h("slot", { key: 'f042e3f11b4d2af4b47aadeba04a332c57889616' })));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
NvNotificationContainer.style =
|
|
39
|
+
NvNotificationContainer.style = nvNotificationcontainerCss;
|
|
40
40
|
|
|
41
41
|
exports.nv_notificationcontainer = NvNotificationContainer;
|