@nova-design-system/nova-react 3.14.0 → 3.15.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/{collapse.animation-acda1bf5-BuORVmQv.js → collapse.animation-6e0b08df-AHWzNGm_.js} +4 -1
- package/dist/cjs/{constants-d0f19e7b-s0SCO_vi.js → constants-69bafca2-DpB_ghPF.js} +9 -0
- package/dist/cjs/{fade.animation-eb454088-Bma0SpTf.js → fade.animation-9b939939-DV--bM4S.js} +2 -2
- package/dist/cjs/{index-CKAZvszR.js → index-BK1_MpRZ.js} +583 -327
- package/dist/cjs/index.js +9 -1
- package/dist/cjs/{nv-accordion-item.entry-CjBcmF8t.js → nv-accordion-item.entry-BPaDkIFa.js} +5 -4
- package/dist/cjs/{nv-accordion.entry-CRk2Wvt3.js → nv-accordion.entry-BaHER2iL.js} +2 -1
- package/dist/cjs/{nv-alert.entry-D5qB5xZg.js → nv-alert.entry-Hv-y3Bwl.js} +12 -11
- package/dist/cjs/{nv-avatar.entry-CuNYdZl_.js → nv-avatar.entry-BTmGyeGF.js} +8 -7
- package/dist/cjs/{nv-badge_2.entry-BDuX1qOQ.js → nv-badge_2.entry-CwlWa72m.js} +11 -10
- package/dist/cjs/{nv-breadcrumb.entry-BE9U6AF_.js → nv-breadcrumb.entry-BvHgDgxV.js} +2 -1
- package/dist/cjs/{nv-breadcrumbs.entry-DJXqtmMR.js → nv-breadcrumbs.entry-BdptRKYA.js} +2 -1
- package/dist/cjs/{nv-button.entry-CF5IDcG3.js → nv-button.entry-6O39hBHY.js} +8 -7
- package/dist/cjs/{nv-buttongroup.entry-C0Zc2lOi.js → nv-buttongroup.entry-Bh0f3bAn.js} +2 -1
- package/dist/cjs/{nv-calendar.entry-NbVLStMN.js → nv-calendar.entry-BZLITXEC.js} +8 -7
- package/dist/cjs/{nv-col.entry-ahFf8a1Z.js → nv-col.entry-I3bCSLB5.js} +2 -1
- package/dist/cjs/{nv-datagrid.entry-C-MJXEdi.js → nv-datagrid.entry-BzIkgOV6.js} +7 -6
- package/dist/cjs/{nv-datagridcolumn.entry-CxU7soW7.js → nv-datagridcolumn.entry-BuFhEECG.js} +2 -1
- package/dist/cjs/{nv-dialog.entry-WlnaC-w2.js → nv-dialog.entry-DIbIIXo2.js} +4 -3
- package/dist/cjs/{nv-dialogfooter_2.entry-CEWmTnJc.js → nv-dialogfooter_2.entry-Thzk1kVd.js} +5 -4
- package/dist/cjs/{nv-fieldcheckbox.entry-BYhFVrYb.js → nv-fieldcheckbox.entry-mkas423y.js} +3 -2
- package/dist/cjs/{nv-fielddate.entry-DVVnRiOT.js → nv-fielddate.entry-Cek70TQM.js} +2 -1
- package/dist/cjs/{nv-fielddaterange.entry-Cb4X5Q-C.js → nv-fielddaterange.entry-C3BYAnVq.js} +2 -1
- package/dist/cjs/{nv-fielddropdown.entry-D2PKGkpx.js → nv-fielddropdown.entry-Djz5-R1T.js} +2 -1
- package/dist/cjs/{nv-fielddropdownitem.entry-BqgMRnIc.js → nv-fielddropdownitem.entry-B2z13jEI.js} +2 -1
- package/dist/cjs/{nv-fieldmultiselect.entry-Dzw4c9wO.js → nv-fieldmultiselect.entry-uJ9i2gtz.js} +2 -1
- package/dist/cjs/{nv-fieldnumber.entry-Cm5g6tw7.js → nv-fieldnumber.entry-zpWCDG_-.js} +2 -1
- package/dist/cjs/{nv-fieldpassword.entry-BMI5M4RR.js → nv-fieldpassword.entry-C835HE_i.js} +2 -1
- package/dist/cjs/{nv-fieldradio.entry-BrCJvkMR.js → nv-fieldradio.entry-CzLMbo4W.js} +2 -1
- package/dist/cjs/{nv-fieldselect.entry-Cz76Y4Fb.js → nv-fieldselect.entry-BzcYzmqe.js} +2 -1
- package/dist/cjs/{nv-fieldslider.entry-C2ynnMK8.js → nv-fieldslider.entry-B5vyrQZw.js} +2 -1
- package/dist/cjs/{nv-fieldtext.entry-B6ciu2fU.js → nv-fieldtext.entry-DnPQxVqp.js} +2 -1
- package/dist/cjs/{nv-fieldtextarea.entry-BL_gMvTp.js → nv-fieldtextarea.entry-n2MJK2Jg.js} +2 -1
- package/dist/cjs/{nv-fieldtime.entry-Be5fujXA.js → nv-fieldtime.entry-DChhvqKi.js} +61 -60
- package/dist/cjs/nv-icon.entry-agdqxUMS.js +80 -0
- package/dist/cjs/{nv-iconbutton_2.entry-Dlk96yHi.js → nv-iconbutton_2.entry-u0l16LeW.js} +2 -1
- package/dist/cjs/{nv-menu.entry-CDn1Tk9J.js → nv-menu.entry-OYVh6iMu.js} +2 -1
- package/dist/cjs/{nv-menuitem.entry-DIkQnha9.js → nv-menuitem.entry-Dj6N1n9X.js} +2 -1
- package/dist/cjs/nv-notification.entry-D1dVSEYZ.js +262 -0
- package/dist/cjs/nv-notificationcontainer.entry-Bp2NR_fe.js +41 -0
- package/dist/cjs/{nv-popover.entry-Bz9ZWGlN.js → nv-popover.entry-Bf2AEn9B.js} +7 -6
- package/dist/cjs/{nv-row.entry-iJGXINmZ.js → nv-row.entry-Bi9eoQEh.js} +3 -2
- package/dist/cjs/{nv-stack.entry-CifEjR2g.js → nv-stack.entry-Dd680LIT.js} +3 -2
- package/dist/cjs/{nv-table.entry-Dxg0j3fe.js → nv-table.entry-wxn9GDDo.js} +4 -3
- package/dist/cjs/{nv-tablecolumn.entry--29MFEe9.js → nv-tablecolumn.entry-Bo0z0XyB.js} +2 -1
- package/dist/cjs/{nv-toggle.entry-D0eQoEqf.js → nv-toggle.entry-gBokGnGe.js} +4 -3
- package/dist/cjs/{nv-togglebutton.entry-X4eLeP-C.js → nv-togglebutton.entry-ZpltTrQe.js} +3 -2
- package/dist/cjs/{nv-togglebuttongroup.entry-BYO58vql.js → nv-togglebuttongroup.entry-Bu0C6Iq3.js} +3 -2
- package/dist/cjs/{nv-tooltip.entry-DaxjQSt1.js → nv-tooltip.entry-DR4aj5qF.js} +3 -2
- package/dist/generated/components.js +8 -0
- package/dist/generated/components.server.js +8 -1
- package/dist/index.js +1 -0
- package/dist/providers/NotificationProvider.js +83 -0
- package/dist/types/generated/components.d.ts +3 -0
- package/dist/types/generated/components.server.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/providers/NotificationProvider.d.ts +36 -0
- package/package.json +4 -1
- package/dist/cjs/nv-icon.entry-C-wbfOy3.js +0 -79
- package/dist/cjs/nv-notification.entry-BiwnZCkF.js +0 -178
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
4
|
require('react');
|
|
5
|
+
require('react-dom');
|
|
5
6
|
|
|
6
7
|
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)}";
|
|
7
8
|
const NvMenuStyle0 = nvMenuCss;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
4
|
require('react');
|
|
5
|
+
require('react-dom');
|
|
5
6
|
|
|
6
7
|
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)}";
|
|
7
8
|
const NvMenuitemStyle0 = nvMenuitemCss;
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
|
+
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
5
|
+
var collapse_animation6e0b08df = require('./collapse.animation-6e0b08df-AHWzNGm_.js');
|
|
6
|
+
var fade_animation9b939939 = require('./fade.animation-9b939939-DV--bM4S.js');
|
|
7
|
+
var styleValueTypes_esF5d10b79 = require('./style-value-types.es-f5d10b79-D0QCM8OB.js');
|
|
8
|
+
var timeline_animation79215cd4 = require('./timeline.animation-79215cd4-KteJaZPb.js');
|
|
9
|
+
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
10
|
+
require('react');
|
|
11
|
+
require('react-dom');
|
|
12
|
+
|
|
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
|
+
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:500;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:400;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
|
+
|
|
100
|
+
const NvNotification = class {
|
|
101
|
+
constructor(hostRef) {
|
|
102
|
+
index.registerInstance(this, hostRef);
|
|
103
|
+
this.hiddenChanged = index.createEvent(this, "hiddenChanged");
|
|
104
|
+
/****************************************************************************/
|
|
105
|
+
//#region PROPERTIES
|
|
106
|
+
/**
|
|
107
|
+
* Set a unique ID for the notification. Used for aria attributes and managing
|
|
108
|
+
* multiple notifications.
|
|
109
|
+
*/
|
|
110
|
+
this.uid = v4A79185f4.v4();
|
|
111
|
+
/**
|
|
112
|
+
* Specifies the notification type which determines the color and default icon.
|
|
113
|
+
*/
|
|
114
|
+
this.feedback = 'information';
|
|
115
|
+
/**
|
|
116
|
+
* Adjusts the emphasis to make the notification more or less visually
|
|
117
|
+
* prominent to users. Use this to draw attention to important actions or
|
|
118
|
+
* reduce focus on less critical ones
|
|
119
|
+
*/
|
|
120
|
+
this.emphasis = 'medium';
|
|
121
|
+
/**
|
|
122
|
+
* Allows the notification to be dismissed via a close button (x). The
|
|
123
|
+
* notification is not dismissible unless explicitly enabled.
|
|
124
|
+
*/
|
|
125
|
+
this.dismissible = false;
|
|
126
|
+
/**
|
|
127
|
+
* Controls the visibility of the notification.
|
|
128
|
+
*/
|
|
129
|
+
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
130
|
+
/**
|
|
131
|
+
* When true, the notification will be hidden initially, but internal changes
|
|
132
|
+
* will not be in a controlled state. Good for animating the notification in.
|
|
133
|
+
*/
|
|
134
|
+
this.initiallyHidden = false;
|
|
135
|
+
//#endregion EVENTS
|
|
136
|
+
/****************************************************************************/
|
|
137
|
+
//#region INTERNAL
|
|
138
|
+
this.iconByFeedback = {
|
|
139
|
+
[constants69bafca2.FeedbackColors.Warning]: 'alert-circle',
|
|
140
|
+
[constants69bafca2.FeedbackColors.Information]: 'info-circle',
|
|
141
|
+
[constants69bafca2.FeedbackColors.Success]: 'circle-check',
|
|
142
|
+
[constants69bafca2.FeedbackColors.Error]: 'alert-triangle',
|
|
143
|
+
[constants69bafca2.FeedbackColors.Neutral]: 'help',
|
|
144
|
+
};
|
|
145
|
+
this.roleByFeedback = {
|
|
146
|
+
[constants69bafca2.FeedbackColors.Error]: 'alert',
|
|
147
|
+
[constants69bafca2.FeedbackColors.Warning]: 'alert',
|
|
148
|
+
[constants69bafca2.FeedbackColors.Information]: 'status',
|
|
149
|
+
[constants69bafca2.FeedbackColors.Success]: 'status',
|
|
150
|
+
[constants69bafca2.FeedbackColors.Neutral]: 'status',
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
//#endregion PROPERTIES
|
|
154
|
+
/****************************************************************************/
|
|
155
|
+
//#region METHODS
|
|
156
|
+
/**
|
|
157
|
+
* Dismisses the notification with an animation, after the animation is
|
|
158
|
+
* complete, the hiddenChanged event will be emitted with the value of true,
|
|
159
|
+
* and the hidden prop will be set to true.
|
|
160
|
+
*/
|
|
161
|
+
async dismiss() {
|
|
162
|
+
await this.dismissAnimation();
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Sets the hidden prop to false, and shows the notification with an
|
|
166
|
+
* animation, after the animation is complete, the hiddenChanged event will be
|
|
167
|
+
* emitted with the value of false.
|
|
168
|
+
*/
|
|
169
|
+
async show() {
|
|
170
|
+
await this.showAnimation();
|
|
171
|
+
}
|
|
172
|
+
getDefaultIcon() {
|
|
173
|
+
var _a;
|
|
174
|
+
return (_a = this.iconByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'info-circle';
|
|
175
|
+
}
|
|
176
|
+
getAriaRole() {
|
|
177
|
+
var _a;
|
|
178
|
+
return (_a = this.roleByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'status';
|
|
179
|
+
}
|
|
180
|
+
getAriaLive() {
|
|
181
|
+
return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';
|
|
182
|
+
}
|
|
183
|
+
getHeadingId() {
|
|
184
|
+
return this.heading ? `nv-notification-${this.uid}-heading` : null;
|
|
185
|
+
}
|
|
186
|
+
getMessageId() {
|
|
187
|
+
return this.message ? `nv-notification-${this.uid}-message` : null;
|
|
188
|
+
}
|
|
189
|
+
async showAnimation() {
|
|
190
|
+
this.hidden = false;
|
|
191
|
+
const { setFadeIn } = fade_animation9b939939.useFade(this.container);
|
|
192
|
+
const { expand } = collapse_animation6e0b08df.useCollapse(this.el, {
|
|
193
|
+
duration: 300,
|
|
194
|
+
overflow: 'visible',
|
|
195
|
+
});
|
|
196
|
+
const { slideY, setSlideY } = useSlide(this.container, {
|
|
197
|
+
duration: 300,
|
|
198
|
+
});
|
|
199
|
+
setSlideY(-100);
|
|
200
|
+
setFadeIn();
|
|
201
|
+
await timeline_animation79215cd4.parallel(slideY({ from: -100, to: 0 }), expand).start();
|
|
202
|
+
this.hiddenChanged.emit(false);
|
|
203
|
+
}
|
|
204
|
+
getSlideDestination(pos) {
|
|
205
|
+
switch (pos) {
|
|
206
|
+
case constants69bafca2.NotificationPosition.TopRight:
|
|
207
|
+
case constants69bafca2.NotificationPosition.BottomRight:
|
|
208
|
+
return { axis: 'x', to: 100 }; // right
|
|
209
|
+
case constants69bafca2.NotificationPosition.TopLeft:
|
|
210
|
+
case constants69bafca2.NotificationPosition.BottomLeft:
|
|
211
|
+
return { axis: 'x', to: -100 }; // left
|
|
212
|
+
case constants69bafca2.NotificationPosition.TopCenter:
|
|
213
|
+
return { axis: 'y', to: -100 }; // up
|
|
214
|
+
case constants69bafca2.NotificationPosition.BottomCenter:
|
|
215
|
+
return { axis: 'y', to: 100 }; // down
|
|
216
|
+
default:
|
|
217
|
+
return { axis: 'x', to: 100 }; // fallback
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async dismissAnimation() {
|
|
221
|
+
var _a;
|
|
222
|
+
const position = (_a = this.el
|
|
223
|
+
.closest('nv-notificationcontainer')) === null || _a === void 0 ? void 0 : _a.getAttribute('position');
|
|
224
|
+
const destination = this.getSlideDestination(position);
|
|
225
|
+
const { fadeOut } = fade_animation9b939939.useFade(this.container, { duration: 300 });
|
|
226
|
+
const { slideX, slideY, setSlideReset } = useSlide(this.container, {
|
|
227
|
+
duration: 500,
|
|
228
|
+
});
|
|
229
|
+
const { collapse } = collapse_animation6e0b08df.useCollapse(this.el, {
|
|
230
|
+
duration: 500,
|
|
231
|
+
overflow: 'visible',
|
|
232
|
+
});
|
|
233
|
+
const slide = destination.axis === 'x'
|
|
234
|
+
? slideX({ from: 0, to: destination.to })
|
|
235
|
+
: slideY({ from: 0, to: destination.to });
|
|
236
|
+
setSlideReset();
|
|
237
|
+
await timeline_animation79215cd4.parallel(fadeOut, slide, collapse).start();
|
|
238
|
+
this.hidden = true;
|
|
239
|
+
this.hiddenChanged.emit(true);
|
|
240
|
+
}
|
|
241
|
+
//#endregion INTERNAL
|
|
242
|
+
/****************************************************************************/
|
|
243
|
+
//#region LIFECYCLE
|
|
244
|
+
componentWillLoad() {
|
|
245
|
+
this.headingSlot = this.el.querySelector('[slot="heading"]');
|
|
246
|
+
this.messageSlot = this.el.querySelector('[slot="content"]');
|
|
247
|
+
this.actionsSlot = this.el.querySelector('[slot="actions"]');
|
|
248
|
+
if (this.initiallyHidden)
|
|
249
|
+
this.hidden = true;
|
|
250
|
+
}
|
|
251
|
+
//#endregion LIFECYCLE
|
|
252
|
+
/****************************************************************************/
|
|
253
|
+
//#region RENDER
|
|
254
|
+
render() {
|
|
255
|
+
var _a, _b, _c;
|
|
256
|
+
return (index.h(index.Host, { key: '6e0b8abd9cbcb62b0b133db77520aa5aaa4173c9', 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: '41b2ad35bf5220333e132d61f8843d1136cb1f40', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '63116f239f7108ae945845c247c712827d8ae8a6', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: 'dc19bf166c6d2eccd3d40384d43206457f0d03f0', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'e673ac1cc78300bc3425018a0cdfc4b90c679796', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: '95cb6ec06d89cda8e5170f9ff0f863b6b0b7e32d', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: 'ed654c0271d2ff8538295d8f7bf58a9754abb4c9', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: '00cc14a709059b9caf2117174ef7fcc310f5965f', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: 'c7c0bcbc2b54fdfdf8280af6a377929bf17fd688', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: '946db5aeb667b67f52f51adbb1b8f600325f937e', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: 'd94560b658507a515a1360057121e933b95e6fe6', "data-scope": "actions" }, index.h("slot", { key: 'db185d3924c7d1fbeb30578992f2375e92a0d4bc', name: "actions" })))))));
|
|
257
|
+
}
|
|
258
|
+
get el() { return index.getElement(this); }
|
|
259
|
+
};
|
|
260
|
+
NvNotification.style = NvNotificationStyle0;
|
|
261
|
+
|
|
262
|
+
exports.nv_notification = NvNotification;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-dom');
|
|
6
|
+
|
|
7
|
+
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
|
+
|
|
10
|
+
const NvNotificationContainer = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
/****************************************************************************/
|
|
14
|
+
//#region PROPERTIES
|
|
15
|
+
/**
|
|
16
|
+
* Position of the notification container on the screen.
|
|
17
|
+
*/
|
|
18
|
+
this.position = 'top-right';
|
|
19
|
+
}
|
|
20
|
+
//#endregion PROPERTIES
|
|
21
|
+
/****************************************************************************/
|
|
22
|
+
//#region METHODS
|
|
23
|
+
//#endregion METHODS
|
|
24
|
+
/****************************************************************************/
|
|
25
|
+
//#region WATCHERS
|
|
26
|
+
//#endregion WATCHERS
|
|
27
|
+
/****************************************************************************/
|
|
28
|
+
//#region LIFECYCLE
|
|
29
|
+
//#endregion LIFECYCLE
|
|
30
|
+
/****************************************************************************/
|
|
31
|
+
//#region EVENTS
|
|
32
|
+
//#endregion EVENTS
|
|
33
|
+
/****************************************************************************/
|
|
34
|
+
//#region RENDER
|
|
35
|
+
render() {
|
|
36
|
+
return (index.h(index.Host, { key: 'db4005459b926bcfef55e76f61bff0b5635f2872', class: `position-${this.position}` }, index.h("slot", { key: '518909541ca3e9e82168436a43d5362c414c0ec3' })));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
NvNotificationContainer.style = NvNotificationcontainerStyle0;
|
|
40
|
+
|
|
41
|
+
exports.nv_notificationcontainer = NvNotificationContainer;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
|
+
var fade_animation9b939939 = require('./fade.animation-9b939939-DV--bM4S.js');
|
|
5
5
|
var styleValueTypes_esF5d10b79 = require('./style-value-types.es-f5d10b79-D0QCM8OB.js');
|
|
6
6
|
var events_utilsFe1d907f = require('./events.utils-fe1d907f-01N__3wY.js');
|
|
7
7
|
require('react');
|
|
8
|
+
require('react-dom');
|
|
8
9
|
|
|
9
10
|
const useGrow = (node, { duration = 200, amount = 0.8, hasFade = true } = {}) => {
|
|
10
|
-
const nodeStyler =
|
|
11
|
+
const nodeStyler = fade_animation9b939939.index(node);
|
|
11
12
|
/**
|
|
12
13
|
* Will animate the scale and optionally the opacity to make the element grow and fade in,
|
|
13
14
|
* and removes the scale and opacity style attributes once complete.
|
|
@@ -1902,7 +1903,7 @@ const NvPopover = class {
|
|
|
1902
1903
|
duration: isOtherMemberOpen ? 0 : 100,
|
|
1903
1904
|
amount: 0.85,
|
|
1904
1905
|
});
|
|
1905
|
-
const { fadeOut } =
|
|
1906
|
+
const { fadeOut } = fade_animation9b939939.useFade(this.popoverElement, {
|
|
1906
1907
|
duration: isOtherMemberOpen ? 0 : 100,
|
|
1907
1908
|
});
|
|
1908
1909
|
if (open === true) {
|
|
@@ -1939,7 +1940,7 @@ const NvPopover = class {
|
|
|
1939
1940
|
setGrowOut();
|
|
1940
1941
|
}
|
|
1941
1942
|
else {
|
|
1942
|
-
const { setFadeIn } =
|
|
1943
|
+
const { setFadeIn } = fade_animation9b939939.useFade(this.popoverElement);
|
|
1943
1944
|
setFadeIn();
|
|
1944
1945
|
this.popoverElement.removeAttribute('hidden');
|
|
1945
1946
|
}
|
|
@@ -1967,7 +1968,7 @@ const NvPopover = class {
|
|
|
1967
1968
|
/****************************************************************************/
|
|
1968
1969
|
//#region RENDER
|
|
1969
1970
|
render() {
|
|
1970
|
-
return (index.h(index.Host, { key: '
|
|
1971
|
+
return (index.h(index.Host, { key: '1af6f61d4b3d87e30d2311708fcd61979170aa96' }, index.h("slot", { key: '113813292e083fa4b188f3e5750549a08fc8c3aa', name: "trigger" }), index.h("div", { key: '7687d6ae12b24ed575843f0d171d911eb0994675', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: '162f1f50be23da7fadac8f76507e6d8d058fb58b', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: '57ecf69ef395a045cb35e7db9f380027dfceff6e', name: "content" }))));
|
|
1971
1972
|
}
|
|
1972
1973
|
get el() { return index.getElement(this); }
|
|
1973
1974
|
static get watchers() { return {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
4
|
require('react');
|
|
5
|
+
require('react-dom');
|
|
5
6
|
|
|
6
7
|
const nvRowCss = "nv-row{display:flex;flex-wrap:wrap;margin-right:calc(var(--spacing-4) * -1);margin-left:calc(var(--spacing-4) * -1);row-gap:var(--spacing-4)}";
|
|
7
8
|
const NvRowStyle0 = nvRowCss;
|
|
@@ -13,7 +14,7 @@ const NvRow = class {
|
|
|
13
14
|
/****************************************************************************/
|
|
14
15
|
//#region RENDER
|
|
15
16
|
render() {
|
|
16
|
-
return (index.h(index.Host, { key: '
|
|
17
|
+
return (index.h(index.Host, { key: '9623a4c73a5a2557b2ba7eb346ae0740ca7291c5' }, index.h("slot", { key: '502ea804deec9e91057bfaf6f2fa4fdb4a5822c3' })));
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
20
|
NvRow.style = NvRowStyle0;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
require('react');
|
|
6
|
+
require('react-dom');
|
|
6
7
|
|
|
7
8
|
const nvStackCss = "nv-stack{display:flex;align-items:center;justify-content:flex-start;flex-direction:row}nv-stack nv-col{display:flex}nv-stack:not(nv-row){flex-wrap:nowrap}nv-stack>.nv-stack-item-flex{flex-shrink:1;flex-grow:1}nv-stack>.nv-stack-item-lead{margin-right:auto}nv-stack>.nv-stack-item-lead+*{margin-left:0}nv-stack>.nv-stack-item-center{margin-right:auto;margin-left:auto}nv-stack>.nv-stack-item-tail{margin-left:auto}nv-stack>.nv-stack-nowrap{white-space:nowrap}nv-stack.nv-stack-vertical{align-items:stretch;flex-direction:column}nv-stack.nv-stack-vertical>.nv-stack-item-lead{margin-right:0;margin-bottom:auto}nv-stack.nv-stack-vertical>.nv-stack-item-lead+*{margin-top:0}nv-stack.nv-stack-vertical>.nv-stack-item-tail{margin-left:0;margin-top:auto}nv-stack.nv-stack-vertical>.nv-stack-item-center{margin:auto 0}nv-stack.nv-stack-flex>*{flex-shrink:1;flex-grow:1}nv-stack.nv-stack-fill>*{height:100%}nv-stack.nv-stack-fill.nv-stack-vertical>*{height:auto;width:100%}";
|
|
8
9
|
const NvStackStyle0 = nvStackCss;
|
|
@@ -22,7 +23,7 @@ const NvStack = class {
|
|
|
22
23
|
/****************************************************************************/
|
|
23
24
|
//#region RENDER
|
|
24
25
|
render() {
|
|
25
|
-
return (index.h(index.Host, { key: '
|
|
26
|
+
return (index.h(index.Host, { key: '8f771805224c769b5a87f5c550ddbcb8f888d002', class: clsx297c1ffe.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: '6fcd46cfd74415d2f07c762b065e3aa0f0194764' })));
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
29
|
NvStack.style = NvStackStyle0;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
4
|
var dom_utilsAc71e0ef = require('./dom.utils-ac71e0ef-CmIwRr6O.js');
|
|
5
5
|
require('react');
|
|
6
|
+
require('react-dom');
|
|
6
7
|
|
|
7
8
|
const nvTableCss = "nv-table{display:block}nv-table .hidden{display:none}nv-table table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-table th{text-align:left;border-bottom:1px solid var(--components-datagrid-header-border);height:var(--spacing-12);padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md);font-weight:700;color:var(--components-datagrid-header-text)}nv-table td{border-bottom:1px solid var(--components-datagrid-body-border);height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--spacing-2) var(--spacing-4);font-size:var(--font-size-md);font-weight:400;color:var(--components-datagrid-body-text);white-space:nowrap;text-overflow:ellipsis}nv-table tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}";
|
|
8
9
|
const NvTableStyle0 = nvTableCss;
|
|
@@ -314,14 +315,14 @@ const NvTable = class {
|
|
|
314
315
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
315
316
|
? []
|
|
316
317
|
: this.table.data;
|
|
317
|
-
return (index.h(index.Host, { key: '
|
|
318
|
+
return (index.h(index.Host, { key: '08082f0800c32a59606968aa2a80cfa3c2f07960' }, index.h("div", { key: 'f55f5409f45d90ef072abb09006ef6366e7e8c95', class: "hidden" }, index.h("slot", { key: '0b5326e8c7c6f97f419819744a132335d4435bb4' })), index.h("slot", { key: '07d4538957b466ed332cd598e2c132d85a801979', name: "before" }), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("table", { class: "table" }, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", { class: "table-header" }, index.h("tr", null, headerGroups &&
|
|
318
319
|
headerGroups.map(col => {
|
|
319
320
|
return (index.h("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
|
|
320
321
|
})))), index.h("tbody", { class: "table-body" }, !rows || rows.length === 0 ? (index.h("tr", null, index.h("td", { colSpan: headerGroups.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => (index.h("tr", { key: JSON.stringify(row) }, headerGroups.map(col => {
|
|
321
322
|
var _a;
|
|
322
323
|
return (index.h("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
|
|
323
324
|
((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
|
|
324
|
-
})))))))), index.h("slot", { key: '
|
|
325
|
+
})))))))), index.h("slot", { key: '1f505261da2c2e05511940ec90f7375981cb0823', name: "after" })));
|
|
325
326
|
}
|
|
326
327
|
get el() { return index.getElement(this); }
|
|
327
328
|
static get watchers() { return {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
7
|
+
require('react-dom');
|
|
7
8
|
|
|
8
9
|
const nvToggleCss = "nv-toggle{display:inline-flex;align-items:flex-start;gap:var(--form-gap-x);position:relative}nv-toggle:not([disabled],[readonly]) input,nv-toggle:not([disabled],[readonly]) label{cursor:pointer}nv-toggle.label-placement-before{flex-direction:row-reverse}nv-toggle[disabled]{opacity:0.5}nv-toggle label{align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-toggle label.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-toggle .input-container{position:relative;color:var(--components-form-shape-foreground-default)}nv-toggle .input-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--components-form-shape-foreground-disabled)}nv-toggle .input-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-toggle-width);height:var(--form-toggle-height);flex-direction:column;align-items:flex-start;border-radius:var(--form-toggle-radius);border-width:var(--form-toggle-border-width);border-style:solid;border-color:var(--components-toggle-border-default);background:var(--components-toggle-background-default)}nv-toggle .input-container input[type=checkbox]::after{content:\"\";display:block;width:var(--form-toggle-switch-dot-default);height:var(--form-toggle-switch-dot-default);background-color:var(--components-toggle-shape-default);border-radius:var(--radius-rounded-full);position:absolute;top:50%;left:25%;transform:translate(-50%, -50%)}nv-toggle .input-container input[type=checkbox]:hover{border-color:var(--components-toggle-border-hover)}nv-toggle .input-container input[type=checkbox]:hover::after{background-color:var(--components-toggle-shape-hover)}nv-toggle .input-container input[type=checkbox]:focus{border-color:var(--components-toggle-border-default)}nv-toggle .input-container input[type=checkbox]:focus::after{background-color:var(--components-toggle-shape-default)}nv-toggle .input-container input[type=checkbox]:focus,nv-toggle .input-container input[type=checkbox]:focus-within{outline:none}nv-toggle .input-container input[type=checkbox]:focus-visible,nv-toggle .input-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-toggle .input-container input[type=checkbox]:checked{background:var(--components-toggle-background-default-checked);border-color:var(--components-toggle-border-default-checked)}nv-toggle .input-container input[type=checkbox]:checked::after{content:\"\";display:block;width:var(--form-toggle-switch-dot-default);height:var(--form-toggle-switch-dot-default);background-color:var(--components-toggle-shape-default-checked);border-radius:var(--radius-rounded-full);position:absolute;top:50%;left:75%;transform:translate(-50%, -50%)}nv-toggle .input-container input[type=checkbox]:checked:focus{background:var(--components-toggle-background-default-checked);border-color:var(--components-toggle-border-default-checked)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]){box-shadow:unset;background:var(--components-toggle-background-disabled);border-color:var(--components-toggle-border-default)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]):checked{background:var(--components-toggle-background-disabled-checked);border-color:var(--components-toggle-border-disabled-checked)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]):checked::after{background-color:var(--components-toggle-shape-disabled-checked)}nv-toggle .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:450;line-height:var(--form-description-line-height)}nv-toggle .text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}";
|
|
9
10
|
const NvToggleStyle0 = nvToggleCss;
|
|
@@ -65,8 +66,8 @@ const NvToggle = class {
|
|
|
65
66
|
/****************************************************************************/
|
|
66
67
|
//#region RENDER
|
|
67
68
|
render() {
|
|
68
|
-
return (index.h(index.Host, { key: '
|
|
69
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
69
|
+
return (index.h(index.Host, { key: '0f440b59ac0c32d9abe9577668d7045081819b49', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '4289435e34eb31a8e59e00cefcba2e17e98bd03a', class: "input-container" }, index.h("input", { key: '1b7d05f77fd32cece9eed2e6cf79c7e2e707f64c', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: '6d78d7e80eb790bbead21bba6108329f9ded3746', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '524a2c2542a45945bddb688c5dff6c9426d58570', htmlFor: this.inputId, class: clsx297c1ffe.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '59eda4b826602062620e7167acf3c8de0f77ebef', name: "label" }, this.label))), (this.description ||
|
|
70
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '6e8412879ed60fc6806464432348bd52483e3567', class: "description" }, index.h("slot", { key: '85a876130569a5a4051e271eaf1cf49593a014a6', name: "description" }, this.description))))));
|
|
70
71
|
}
|
|
71
72
|
static get formAssociated() { return true; }
|
|
72
73
|
get el() { return index.getElement(this); }
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
4
|
require('react');
|
|
5
|
+
require('react-dom');
|
|
5
6
|
|
|
6
7
|
const nvTogglebuttonCss = "nv-togglebutton{display:inline-flex;justify-content:center;align-items:center}nv-togglebutton:focus-visible,nv-togglebutton:has(:focus-visible){z-index:1}nv-togglebutton[size=xs]{padding:var(--button-xs-padding-y) var(--button-xs-padding-x);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);padding-top:calc(var(--togglegroup-xs-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-xs-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-xs-button-radius));border-width:0}nv-togglebutton[size=xs] nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-togglebutton[size=sm]{padding:var(--button-sm-padding-y) var(--button-sm-padding-x);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);padding-top:calc(var(--togglegroup-sm-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-sm-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-sm-button-radius));border-width:0}nv-togglebutton[size=sm] nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-togglebutton[size=md]{padding:var(--button-md-padding-y) var(--button-md-padding-x);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);padding-top:calc(var(--togglegroup-md-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-md-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-md-button-radius));border-width:0}nv-togglebutton[size=md] nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-togglebutton[size=lg]{padding:var(--button-lg-padding-y) var(--button-lg-padding-x);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);padding-top:calc(var(--togglegroup-lg-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-lg-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-lg-button-radius));border-width:0}nv-togglebutton[size=lg] nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-togglebutton[emphasis=high]{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-togglebutton[emphasis=high]:hover{background:var(--components-button-low-background-hover);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text-hover)}nv-togglebutton[emphasis=high]:active{background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-togglebutton[emphasis=high]:focus,nv-togglebutton[emphasis=high]:focus-within{outline:none}nv-togglebutton[emphasis=high]:focus-visible,nv-togglebutton[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-togglebutton[emphasis=high]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-togglebutton[emphasis=high][active]:not([active=false]){background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-togglebutton[emphasis=low]{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-togglebutton[emphasis=low]:hover{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}nv-togglebutton[emphasis=low]:active{background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-togglebutton[emphasis=low]:focus,nv-togglebutton[emphasis=low]:focus-within{outline:none}nv-togglebutton[emphasis=low]:focus-visible,nv-togglebutton[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-togglebutton[emphasis=low]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-togglebutton[emphasis=low][active]:not([active=false]),nv-togglebutton[emphasis=low]:active{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}";
|
|
7
8
|
const NvTogglebuttonStyle0 = nvTogglebuttonCss;
|
|
@@ -47,7 +48,7 @@ const NvTogglebutton = class {
|
|
|
47
48
|
/****************************************************************************/
|
|
48
49
|
//#region RENDER
|
|
49
50
|
render() {
|
|
50
|
-
return (index.h(index.Host, { key: '
|
|
51
|
+
return (index.h(index.Host, { key: 'b9e37fc1cb34272bca476c7b61db173ab2a9d238', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: 'cf9cf3445fd93873def1f9fa9cbec46c35600025' })));
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
54
|
NvTogglebutton.style = NvTogglebuttonStyle0;
|
package/dist/cjs/{nv-togglebuttongroup.entry-BYO58vql.js → nv-togglebuttongroup.entry-Bu0C6Iq3.js}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
4
|
require('react');
|
|
5
|
+
require('react-dom');
|
|
5
6
|
|
|
6
7
|
const nvTogglebuttongroupCss = "nv-togglebuttongroup{display:flex;gap:var(--togglegroup-lg-gap);border-radius:var(--togglegroup-lg-radius);width:fit-content;padding:var(--togglegroup-lg-gap)}nv-togglebuttongroup[emphasis=high]{border:1px solid var(--components-togglegroup-high-border)}nv-togglebuttongroup[emphasis=low]{border:1px solid var(--components-togglegroup-low-border)}nv-togglebuttongroup[size=xs]{padding:calc(var(--togglegroup-xs-padding) - 1px);gap:var(--togglegroup-xs-gap);border-radius:var(--togglegroup-xs-radius)}nv-togglebuttongroup[size=sm]{padding:calc(var(--togglegroup-sm-padding) - 1px);gap:var(--togglegroup-sm-gap);border-radius:var(--togglegroup-sm-radius)}nv-togglebuttongroup[size=md]{padding:calc(var(--togglegroup-md-padding) - 1px);gap:var(--togglegroup-md-gap);border-radius:var(--togglegroup-md-radius)}nv-togglebuttongroup[size=lg]{padding:calc(var(--togglegroup-lg-padding) - 1px);gap:var(--togglegroup-lg-gap);border-radius:var(--togglegroup-lg-radius)}";
|
|
7
8
|
const NvTogglebuttongroupStyle0 = nvTogglebuttongroupCss;
|
|
@@ -155,7 +156,7 @@ const NvTogglebuttongroup = class {
|
|
|
155
156
|
/****************************************************************************/
|
|
156
157
|
//#region RENDER
|
|
157
158
|
render() {
|
|
158
|
-
return (index.h(index.Host, { key: '
|
|
159
|
+
return (index.h(index.Host, { key: 'edb5b3bb7651b482cd02625038e36cdb35743453' }, index.h("slot", { key: '2b0bc4891b885ecf7febdce7062fc02b120ec939' })));
|
|
159
160
|
}
|
|
160
161
|
get el() { return index.getElement(this); }
|
|
161
162
|
static get watchers() { return {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BK1_MpRZ.js');
|
|
4
4
|
require('react');
|
|
5
|
+
require('react-dom');
|
|
5
6
|
|
|
6
7
|
const nvTooltipCss = "nv-tooltip{display:inline-block;position:relative;user-select:none}nv-tooltip:has([fluid]:not([fluid=false])){display:block}nv-tooltip nv-popover>[data-scope=popover]{background:var(--components-tooltip-background);color:var(--components-tooltip-text);font-weight:var(--font-weight-medium-emphasis);padding:var(--tooltip-padding-y) var(--tooltip-padding-x);font-size:var(--tooltip-font-size);border-radius:var(--tooltip-radius);border:none;box-shadow:0px var(--shadow-y-axis-lg-1) var(--shadow-blur-lg-1) var(--shadow-spread-lg-1) var(--shadow-color-opacity-1), 0px var(--shadow-y-axis-lg-2) var(--shadow-blur-lg-2) var(--shadow-spread-lg-2) var(--shadow-color-opacity-2)}nv-tooltip nv-popover>[data-scope=popover] [data-scope=arrow]{background:var(--components-tooltip-background);box-shadow:none;border:none}";
|
|
7
8
|
const NvTooltipStyle0 = nvTooltipCss;
|
|
@@ -45,7 +46,7 @@ const NvTooltip = class {
|
|
|
45
46
|
/****************************************************************************/
|
|
46
47
|
//#region RENDER
|
|
47
48
|
render() {
|
|
48
|
-
return (index.h(index.Host, { key: '
|
|
49
|
+
return (index.h(index.Host, { key: '5d5facbf2a0487bda4fbae49913a2cb4f69dcf5a' }, index.h("slot", { key: '91080d347f3473879109f7b0b59b159f5bb5979b' }), index.h("nv-popover", { key: '876e5e2487d1b2b5182e42909a6edeab5b3e9db2', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, index.h("p", { key: 'e30ce16ed27e41dee7359fb44ccba7a780e72d37', slot: "content" }, this.message), index.h("slot", { key: '395c75d7f45bab9aaebf979bd75087058b979350', name: "content" }))));
|
|
49
50
|
}
|
|
50
51
|
get el() { return index.getElement(this); }
|
|
51
52
|
};
|
|
@@ -36,6 +36,7 @@ import { NvLoader as NvLoaderElement, defineCustomElement as defineNvLoader } fr
|
|
|
36
36
|
import { NvMenu as NvMenuElement, defineCustomElement as defineNvMenu } from "@nova-design-system/nova-webcomponents/dist/components/nv-menu.js";
|
|
37
37
|
import { NvMenuitem as NvMenuitemElement, defineCustomElement as defineNvMenuitem } from "@nova-design-system/nova-webcomponents/dist/components/nv-menuitem.js";
|
|
38
38
|
import { NvNotification as NvNotificationElement, defineCustomElement as defineNvNotification } from "@nova-design-system/nova-webcomponents/dist/components/nv-notification.js";
|
|
39
|
+
import { NvNotificationcontainer as NvNotificationcontainerElement, defineCustomElement as defineNvNotificationcontainer } from "@nova-design-system/nova-webcomponents/dist/components/nv-notificationcontainer.js";
|
|
39
40
|
import { NvPopover as NvPopoverElement, defineCustomElement as defineNvPopover } from "@nova-design-system/nova-webcomponents/dist/components/nv-popover.js";
|
|
40
41
|
import { NvRow as NvRowElement, defineCustomElement as defineNvRow } from "@nova-design-system/nova-webcomponents/dist/components/nv-row.js";
|
|
41
42
|
import { NvStack as NvStackElement, defineCustomElement as defineNvStack } from "@nova-design-system/nova-webcomponents/dist/components/nv-stack.js";
|
|
@@ -334,6 +335,13 @@ export const NvNotification = createComponent({
|
|
|
334
335
|
events: { onHiddenChanged: 'hiddenChanged' },
|
|
335
336
|
defineCustomElement: defineNvNotification
|
|
336
337
|
});
|
|
338
|
+
export const NvNotificationcontainer = createComponent({
|
|
339
|
+
tagName: 'nv-notificationcontainer',
|
|
340
|
+
elementClass: NvNotificationcontainerElement,
|
|
341
|
+
react: React,
|
|
342
|
+
events: {},
|
|
343
|
+
defineCustomElement: defineNvNotificationcontainer
|
|
344
|
+
});
|
|
337
345
|
export const NvPopover = createComponent({
|
|
338
346
|
tagName: 'nv-popover',
|
|
339
347
|
elementClass: NvPopoverElement,
|
|
@@ -658,11 +658,18 @@ export const NvNotification = createComponent({
|
|
|
658
658
|
message: 'message',
|
|
659
659
|
icon: 'icon',
|
|
660
660
|
dismissible: 'dismissible',
|
|
661
|
-
hidden: 'hidden'
|
|
661
|
+
hidden: 'hidden',
|
|
662
|
+
initiallyHidden: 'initially-hidden'
|
|
662
663
|
},
|
|
663
664
|
hydrateModule: import('@nova-design-system/nova-webcomponents/hydrate'),
|
|
664
665
|
serializeShadowRoot
|
|
665
666
|
});
|
|
667
|
+
export const NvNotificationcontainer = createComponent({
|
|
668
|
+
tagName: 'nv-notificationcontainer',
|
|
669
|
+
properties: { position: 'position' },
|
|
670
|
+
hydrateModule: import('@nova-design-system/nova-webcomponents/hydrate'),
|
|
671
|
+
serializeShadowRoot
|
|
672
|
+
});
|
|
666
673
|
export const NvPopover = createComponent({
|
|
667
674
|
tagName: 'nv-popover',
|
|
668
675
|
properties: {
|