@nova-design-system/nova-react 3.0.0-beta.43 → 3.0.0-beta.45
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/{index-CinzsZ8D.js → index-S09Gr7Tw.js} +180 -218
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{nv-alert.entry-BVY_rxey.js → nv-alert.entry-DH8Qd2s2.js} +1 -1
- package/dist/cjs/{nv-avatar.entry-pREKtiv2.js → nv-avatar.entry-B3-elLZC.js} +1 -1
- package/dist/cjs/{nv-badge_2.entry-wDuiCwys.js → nv-badge_2.entry-D15EDzX0.js} +2 -2
- package/dist/cjs/{nv-base.entry-DwtTXK_n.js → nv-base.entry-D-_RUZTX.js} +1 -1
- package/dist/cjs/{nv-breadcrumb.entry-B0hIeE83.js → nv-breadcrumb.entry-DG49Nj1L.js} +2 -2
- package/dist/cjs/{nv-breadcrumbs.entry-Cq0LsIFs.js → nv-breadcrumbs.entry-BqJO5pbN.js} +1 -1
- package/dist/cjs/{nv-button.entry-DaSGnB1L.js → nv-button.entry-CN9kB98T.js} +6 -4
- package/dist/cjs/{nv-calendar.entry-BC6NDsVl.js → nv-calendar.entry-CMEgSU64.js} +6 -6
- package/dist/cjs/{nv-col.entry-DNUY559i.js → nv-col.entry-wcZ9HHAb.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-Cp8RCSEv.js → nv-datagrid.entry-GCLeN2qT.js} +32 -5
- package/dist/cjs/{nv-datagridcolumn.entry-CR9_1fsZ.js → nv-datagridcolumn.entry-lgIz71UU.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-BjTJ5FFL.js → nv-dialog.entry-DfY0TaYp.js} +17 -13
- package/dist/cjs/{nv-dialogfooter_2.entry-DJkKzEgO.js → nv-dialogfooter_2.entry-OByWsulH.js} +6 -6
- package/dist/cjs/{nv-fieldcheckbox.entry-C0DmeqXD.js → nv-fieldcheckbox.entry-Bqpe9BK3.js} +2 -2
- package/dist/cjs/{nv-fielddate.entry-DRX2mfZL.js → nv-fielddate.entry-DJePv6tR.js} +1 -1
- package/dist/cjs/{nv-fielddaterange.entry-ka3JiDvT.js → nv-fielddaterange.entry--YC750sX.js} +1 -1
- package/dist/cjs/{nv-fielddropdown.entry-DUAKFYgw.js → nv-fielddropdown.entry-BPlTlc_S.js} +45 -75
- package/dist/cjs/{nv-fielddropdownitem.entry-BsbvJERH.js → nv-fielddropdownitem.entry-zwoGySum.js} +7 -9
- package/dist/cjs/{nv-fieldmultiselect.entry-DFr-ZICs.js → nv-fieldmultiselect.entry-Bg_v0LUF.js} +7 -49
- package/dist/cjs/{nv-fieldnumber.entry-ezdDvJh_.js → nv-fieldnumber.entry-BLNaq7yr.js} +1 -1
- package/dist/cjs/{nv-fieldpassword.entry-D4a8SnGr.js → nv-fieldpassword.entry-iSEdS5R8.js} +1 -1
- package/dist/cjs/{nv-fieldradio.entry-Co7WX2vI.js → nv-fieldradio.entry-Dov4vZkh.js} +1 -1
- package/dist/cjs/{nv-fieldselect.entry-sTbv_flF.js → nv-fieldselect.entry-NmpesarX.js} +1 -1
- package/dist/cjs/{nv-fieldtext.entry-DRPCH6Sf.js → nv-fieldtext.entry-r6oQajRS.js} +1 -1
- package/dist/cjs/{nv-fieldtextarea.entry-BwJCUiVW.js → nv-fieldtextarea.entry-CJ2yQkfi.js} +1 -1
- package/dist/cjs/{nv-fieldtime.entry-uU-IET2k.js → nv-fieldtime.entry-Bxoj6N53.js} +1 -1
- package/dist/cjs/nv-icon.entry-CWKRt8F0.js +79 -0
- package/dist/cjs/{nv-iconbutton_2.entry-Dx4usGkY.js → nv-iconbutton_2.entry-CnbscpNn.js} +1 -1
- package/dist/cjs/{nv-menu.entry-D3qvf_0H.js → nv-menu.entry-wC7oSruP.js} +1 -1
- package/dist/cjs/{nv-menuitem.entry-3t6TixM7.js → nv-menuitem.entry-BVSa1vrS.js} +1 -1
- package/dist/cjs/{nv-popover.entry-Bv6kuTK_.js → nv-popover.entry-ChP1we3l.js} +12 -10
- package/dist/cjs/{nv-row.entry-BPK1Li7w.js → nv-row.entry-D6FeFpzG.js} +1 -1
- package/dist/cjs/{nv-stack.entry-ByaO-0TJ.js → nv-stack.entry-zjJmztkO.js} +1 -1
- package/dist/cjs/{nv-table.entry-C7Hd57Iq.js → nv-table.entry-CGX0jsR3.js} +2 -2
- package/dist/cjs/{nv-tablecolumn.entry-BDCw_45v.js → nv-tablecolumn.entry-Cwdmo_RY.js} +1 -1
- package/dist/cjs/{nv-toggle.entry-BTqGH_H0.js → nv-toggle.entry-BvToMkI2.js} +2 -2
- package/dist/cjs/{nv-tooltip.entry-BDZfrLHv.js → nv-tooltip.entry-DZ7_lB-p.js} +2 -2
- package/dist/generated/components.js +3 -3
- package/dist/types/generated/components.d.ts +3 -5
- package/package.json +1 -1
- package/dist/cjs/index-C8UfzrMI.js +0 -26405
- package/dist/cjs/nv-alert.entry-8esWDUyU.js +0 -173
- package/dist/cjs/nv-avatar.entry-CO6bt4k6.js +0 -67
- package/dist/cjs/nv-badge_2.entry-xfXsesV0.js +0 -195
- package/dist/cjs/nv-base.entry-BO-6krwg.js +0 -71
- package/dist/cjs/nv-breadcrumb.entry-DTwjCmMI.js +0 -45
- package/dist/cjs/nv-breadcrumbs.entry-jn5hRjpQ.js +0 -20
- package/dist/cjs/nv-button.entry-DxzA6-My.js +0 -162
- package/dist/cjs/nv-calendar.entry-DKz-iBnp.js +0 -1036
- package/dist/cjs/nv-col.entry-X7jkNThH.js +0 -37
- package/dist/cjs/nv-datagrid.entry-DL-Fyo4l.js +0 -3671
- package/dist/cjs/nv-datagridcolumn.entry-CyTG5E7M.js +0 -18
- package/dist/cjs/nv-dialog.entry-Do_uALC6.js +0 -784
- package/dist/cjs/nv-dialogfooter_2.entry-DJ8qS9q6.js +0 -134
- package/dist/cjs/nv-fieldcheckbox.entry-DoGQX-5D.js +0 -137
- package/dist/cjs/nv-fielddate.entry-D-PjbYaA.js +0 -278
- package/dist/cjs/nv-fielddaterange.entry-BrC5jKLp.js +0 -355
- package/dist/cjs/nv-fielddropdown.entry-MsUR1kVe.js +0 -391
- package/dist/cjs/nv-fielddropdownitem.entry-DRM-Zljt.js +0 -70
- package/dist/cjs/nv-fieldmultiselect.entry-Dr8FfT_W.js +0 -1060
- package/dist/cjs/nv-fieldnumber.entry-DZsM1vmO.js +0 -126
- package/dist/cjs/nv-fieldpassword.entry-Biw__M2W.js +0 -115
- package/dist/cjs/nv-fieldradio.entry-ZL7KgEZ7.js +0 -102
- package/dist/cjs/nv-fieldselect.entry-D6eRsM9T.js +0 -365
- package/dist/cjs/nv-fieldtext.entry-DKdxC2cG.js +0 -119
- package/dist/cjs/nv-fieldtextarea.entry-Dc_TGlmI.js +0 -194
- package/dist/cjs/nv-fieldtime.entry-CXRtpWt1.js +0 -1011
- package/dist/cjs/nv-icon.entry-iipuvT3D.js +0 -79
- package/dist/cjs/nv-icon.entry-xltjoSa2.js +0 -79
- package/dist/cjs/nv-iconbutton_2.entry-BsXvYbCi.js +0 -163
- package/dist/cjs/nv-menu.entry-DFEYw_KZ.js +0 -227
- package/dist/cjs/nv-menuitem.entry-BeTXOtir.js +0 -58
- package/dist/cjs/nv-popover.entry-Zt25YeAv.js +0 -1960
- package/dist/cjs/nv-row.entry-Bwzlub3i.js +0 -21
- package/dist/cjs/nv-stack.entry-bhess4lQ.js +0 -30
- package/dist/cjs/nv-table.entry-D3U4dFcw.js +0 -338
- package/dist/cjs/nv-tablecolumn.entry-BzwWPlLf.js +0 -18
- package/dist/cjs/nv-toggle.entry-DXpNGkbz.js +0 -79
- package/dist/cjs/nv-tooltip.entry-CvCZZV88.js +0 -44
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-C8UfzrMI.js');
|
|
4
|
-
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
|
-
var constants98e2dcc2 = require('./constants-98e2dcc2-C0SBCapP.js');
|
|
6
|
-
var timeline_animation1b88f052 = require('./timeline.animation-1b88f052-B8-vCVrY.js');
|
|
7
|
-
var fade_animation2a077983 = require('./fade.animation-2a077983-aKN0EDTo.js');
|
|
8
|
-
require('react');
|
|
9
|
-
|
|
10
|
-
const nvAlertCss = "nv-alert{display:flex !important;align-items:flex-start;position:relative;gap:var(--alert-gap-x);border-radius:var(--alert-radius);font-family:\"TT Norms Pro\", \"Montserrat\", sans-serif}nv-alert>nv-icon{margin-left:var(--alert-icon-position-x);margin-top:var(--alert-icon-position-y)}nv-alert.feedback-information{background-color:var(--components-alert-information-background);border:1px solid var(--components-alert-information-border) !important}nv-alert.feedback-information>.close:focus,nv-alert.feedback-information>.close:focus-within{outline:none}nv-alert.feedback-information>.close:focus-visible,nv-alert.feedback-information>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-information-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-warning{background-color:var(--components-alert-warning-background);border:1px solid var(--components-alert-warning-border) !important}nv-alert.feedback-warning>.close:focus,nv-alert.feedback-warning>.close:focus-within{outline:none}nv-alert.feedback-warning>.close:focus-visible,nv-alert.feedback-warning>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-warning-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-error{background-color:var(--components-alert-error-background);border:1px solid var(--components-alert-error-border) !important}nv-alert.feedback-error>.close:focus,nv-alert.feedback-error>.close:focus-within{outline:none}nv-alert.feedback-error>.close:focus-visible,nv-alert.feedback-error>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-error-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-success{background-color:var(--components-alert-success-background);border:1px solid var(--components-alert-success-border) !important}nv-alert.feedback-success>.close:focus,nv-alert.feedback-success>.close:focus-within{outline:none}nv-alert.feedback-success>.close:focus-visible,nv-alert.feedback-success>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-success-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-neutral{background-color:var(--components-alert-neutral-background);border:1px solid var(--components-alert-neutral-border) !important}nv-alert.feedback-neutral>.close:focus,nv-alert.feedback-neutral>.close:focus-within{outline:none}nv-alert.feedback-neutral>.close:focus-visible,nv-alert.feedback-neutral>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-neutral-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert>nv-icon.icon-information{color:var(--components-alert-information-icon)}nv-alert>nv-icon.icon-warning{color:var(--components-alert-warning-icon)}nv-alert>nv-icon.icon-error{color:var(--components-alert-error-icon)}nv-alert>nv-icon.icon-success{color:var(--components-alert-success-icon)}nv-alert>nv-icon.icon-neutral{color:var(--components-alert-neutral-icon)}nv-alert>.content{display:flex;padding:var(--alert-padding);padding-left:0;flex-direction:column;gap:var(--alert-gap-y)}nv-alert>.content>.heading{color:var(--components-alert-content-title);font-size:var(--alert-heading-font-size);line-height:var(--alert-heading-line-height);font-weight:var(--alert-heading-font-weight)}nv-alert>.content>.message{color:var(--components-alert-content-description);font-size:var(--alert-message-font-size);line-height:var(--alert-message-line-height)}nv-alert>.close{border-radius:var(--alert-radius);position:absolute;display:flex;top:var(--alert-icon-position-y);right:var(--alert-icon-position-x);padding:0;border:none;background:none;cursor:pointer}";
|
|
11
|
-
const NvAlertStyle0 = nvAlertCss;
|
|
12
|
-
|
|
13
|
-
const NvAlert = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
index.registerInstance(this, hostRef);
|
|
16
|
-
this.hiddenChanged = index.createEvent(this, "hiddenChanged");
|
|
17
|
-
this.hiddenChangedComplete = index.createEvent(this, "hiddenChangedComplete");
|
|
18
|
-
this.closeClicked = index.createEvent(this, "closeClicked");
|
|
19
|
-
//#endregion DEPRECATED
|
|
20
|
-
/****************************************************************************/
|
|
21
|
-
//#region PROPERTIES
|
|
22
|
-
/**
|
|
23
|
-
* Specifies the alert type which determines the color and default icon.
|
|
24
|
-
*/
|
|
25
|
-
this.feedback = 'information';
|
|
26
|
-
/**
|
|
27
|
-
* Allows the alert to be dismissed via a close button (x). The alert is not
|
|
28
|
-
* dismissible unless explicitly enabled.
|
|
29
|
-
*/
|
|
30
|
-
this.dismissible = false;
|
|
31
|
-
/**
|
|
32
|
-
* When true, the alert does not automatically close upon dismissing.
|
|
33
|
-
* Useful for externally controlled component behavior.
|
|
34
|
-
*/
|
|
35
|
-
this.preventAutoClose = false;
|
|
36
|
-
/**
|
|
37
|
-
* Controls the visibility of the alert. Will animate with fade and collapse.
|
|
38
|
-
*/
|
|
39
|
-
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
40
|
-
/**
|
|
41
|
-
* When true, the alert will not animate when it is hidden or shown.
|
|
42
|
-
*/
|
|
43
|
-
this.hasNoAnimations = false;
|
|
44
|
-
//#endregion WATCHERS
|
|
45
|
-
/****************************************************************************/
|
|
46
|
-
//#region METHODS
|
|
47
|
-
/**
|
|
48
|
-
* Handles the dismissal of the alert, considering the preventAutoClose prop.
|
|
49
|
-
* Passes the original event from the close button to the close event detail.
|
|
50
|
-
* @param {MouseEvent} originalEvent - The original event from the close button.
|
|
51
|
-
*/
|
|
52
|
-
this.handleDismiss = (originalEvent) => {
|
|
53
|
-
if (!this.preventAutoClose) {
|
|
54
|
-
this.hidden = true;
|
|
55
|
-
}
|
|
56
|
-
this.closeClicked.emit(originalEvent);
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* By default an icon is linked to the feedback type
|
|
60
|
-
* @returns {string} - The default icon name.
|
|
61
|
-
*/
|
|
62
|
-
this.getDefaultIcon = () => {
|
|
63
|
-
switch (this.feedback) {
|
|
64
|
-
case constants98e2dcc2.FeedbackColors.Warning:
|
|
65
|
-
return 'alert-circle';
|
|
66
|
-
case constants98e2dcc2.FeedbackColors.Information:
|
|
67
|
-
return 'info-circle';
|
|
68
|
-
case constants98e2dcc2.FeedbackColors.Success:
|
|
69
|
-
return 'circle-check';
|
|
70
|
-
case constants98e2dcc2.FeedbackColors.Error:
|
|
71
|
-
return 'alert-circle';
|
|
72
|
-
case constants98e2dcc2.FeedbackColors.Neutral:
|
|
73
|
-
return 'help';
|
|
74
|
-
default:
|
|
75
|
-
return 'info-circle';
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
componentWillRender() {
|
|
80
|
-
if (this.color) {
|
|
81
|
-
switch (this.color) {
|
|
82
|
-
case 'primary':
|
|
83
|
-
this.feedback = 'warning';
|
|
84
|
-
break;
|
|
85
|
-
case 'secondary':
|
|
86
|
-
this.feedback = 'information';
|
|
87
|
-
break;
|
|
88
|
-
case 'neutral':
|
|
89
|
-
this.feedback = 'information';
|
|
90
|
-
break;
|
|
91
|
-
default:
|
|
92
|
-
this.feedback = this.color;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
//#endregion EVENTS
|
|
97
|
-
/****************************************************************************/
|
|
98
|
-
//#region WATCHERS
|
|
99
|
-
/**
|
|
100
|
-
* Used for 2 way binding with the hidden property.
|
|
101
|
-
* Triggers open and close animations.
|
|
102
|
-
* @param {boolean} hidden - The visibility state of the alert.
|
|
103
|
-
*/
|
|
104
|
-
async handleHiddenChange(hidden) {
|
|
105
|
-
this.hiddenChanged.emit(hidden);
|
|
106
|
-
await this.updateVisibility(hidden);
|
|
107
|
-
this.hiddenChangedComplete.emit(hidden);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Updates the visibility state of the alert with optional animations
|
|
111
|
-
* @param {boolean} hidden - Whether the alert should be hidden
|
|
112
|
-
*/
|
|
113
|
-
async updateVisibility(hidden) {
|
|
114
|
-
if (this.hasNoAnimations) {
|
|
115
|
-
this.toggleHiddenClass(hidden);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
const { fadeIn, fadeOut } = fade_animation2a077983.useFade(this.ref, { duration: 150 });
|
|
119
|
-
const { collapse, expand } = timeline_animation1b88f052.useCollapse(this.ref, { duration: 150 });
|
|
120
|
-
if (hidden) {
|
|
121
|
-
await timeline_animation1b88f052.timeline(fadeOut, collapse).start();
|
|
122
|
-
this.toggleHiddenClass(true);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
this.toggleHiddenClass(false);
|
|
126
|
-
await timeline_animation1b88f052.timeline(expand, fadeIn).start();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Toggles the 'hidden' class on the element
|
|
131
|
-
* @param {boolean} hidden - Whether to add or remove the hidden class
|
|
132
|
-
*/
|
|
133
|
-
toggleHiddenClass(hidden) {
|
|
134
|
-
this.ref.classList.toggle('hidden', hidden);
|
|
135
|
-
}
|
|
136
|
-
//#endregion METHODS
|
|
137
|
-
/****************************************************************************/
|
|
138
|
-
//#region LIFECYCLE
|
|
139
|
-
componentWillLoad() {
|
|
140
|
-
if (this.color) {
|
|
141
|
-
switch (this.color) {
|
|
142
|
-
case 'primary':
|
|
143
|
-
this.feedback = 'warning';
|
|
144
|
-
break;
|
|
145
|
-
case 'secondary':
|
|
146
|
-
this.feedback = 'information';
|
|
147
|
-
break;
|
|
148
|
-
case 'neutral':
|
|
149
|
-
this.feedback = 'information';
|
|
150
|
-
break;
|
|
151
|
-
default:
|
|
152
|
-
this.feedback = this.color;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (this.hidden) {
|
|
156
|
-
this.ref.classList.add('hidden');
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
//#endregion LIFECYCLE
|
|
160
|
-
/****************************************************************************/
|
|
161
|
-
//#region RENDER
|
|
162
|
-
render() {
|
|
163
|
-
var _a;
|
|
164
|
-
return (index.h(index.Host, { key: 'af85e9207f425c89cd940ec370d82eb2aa165a66', role: "alert", class: clsx297c1ffe.clsx('root', `feedback-${this.feedback}`) }, index.h("nv-icon", { key: '459faba5ca075cdd91e1edf26920942f3f290402', name: (_a = this.icon) !== null && _a !== void 0 ? _a : this.getDefaultIcon(), class: `icon-${this.feedback}`, size: "md" }), index.h("div", { key: '285aa198a2f4a10103b80478f6d81869bc2d1bbe', class: "content" }, this.heading && index.h("p", { key: '59e0a0c1ab6860d63699be6c46679df1c3f23b5a', class: "heading" }, this.heading), this.message && index.h("p", { key: '9b6e9399e771ccc884d0af5e219029f270c71085', class: "message" }, this.message), index.h("slot", { key: '117a939af48556169772e8e1537c70b43ce2da8d' })), this.dismissible && (index.h("button", { key: '4b1a3c19ba3dcf2120085f969373d79651fb2b09', class: "close", type: "button", onClick: this.handleDismiss }, index.h("nv-icon", { key: 'de33be1c3616a30178ea939d4e7df7ea6d32a638', name: "x", size: "sm" })))));
|
|
165
|
-
}
|
|
166
|
-
get ref() { return index.getElement(this); }
|
|
167
|
-
static get watchers() { return {
|
|
168
|
-
"hidden": ["handleHiddenChange"]
|
|
169
|
-
}; }
|
|
170
|
-
};
|
|
171
|
-
NvAlert.style = NvAlertStyle0;
|
|
172
|
-
|
|
173
|
-
exports.nv_alert = NvAlert;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-C8UfzrMI.js');
|
|
4
|
-
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
|
-
var constants98e2dcc2 = require('./constants-98e2dcc2-C0SBCapP.js');
|
|
6
|
-
require('react');
|
|
7
|
-
|
|
8
|
-
const nvAvatarCss = "nv-avatar{align-items:center !important;background-color:var(--components-avatar-background-1);border-radius:var(--radius-rounded-full) !important;display:flex !important;flex-shrink:0 !important;font-family:\"TT Norms Pro\", sans-serif;font-style:normal;font-weight:var(--font-weight-medium-emphasis);justify-content:center !important;leading-trim:both;line-height:1 !important;text-align:center;text-edge:cap;text-transform:uppercase}nv-avatar.avatar-color-1{background-color:var(--components-avatar-background-1);color:var(--components-avatar-content-1)}nv-avatar.avatar-color-2{background-color:var(--components-avatar-background-2);color:var(--components-avatar-content-2)}nv-avatar.avatar-color-3{background-color:var(--components-avatar-background-3);color:var(--components-avatar-content-3)}nv-avatar.avatar-color-4{background-color:var(--components-avatar-background-4);color:var(--components-avatar-content-4)}nv-avatar.avatar-color-5{background-color:var(--components-avatar-background-5);color:var(--components-avatar-content-5)}nv-avatar.avatar-color-6{background-color:var(--components-avatar-background-6);color:var(--components-avatar-content-6)}nv-avatar.avatar-color-7{background-color:var(--components-avatar-background-7);color:var(--components-avatar-content-7)}nv-avatar.avatar-color-8{background-color:var(--components-avatar-background-8);color:var(--components-avatar-content-8)}nv-avatar.avatar-color-9{background-color:var(--components-avatar-background-9);color:var(--components-avatar-content-9)}nv-avatar.avatar-color-10{background-color:var(--components-avatar-background-10);color:var(--components-avatar-content-10)}nv-avatar img{height:100%;width:100%;object-fit:cover;object-position:center;border-radius:50%}nv-avatar.avatar-xs{width:var(--avatar-xs-size);height:var(--avatar-xs-size);font-size:var(--avatar-xs-font-size);line-height:var(--avatar-xs-font-size)}nv-avatar.avatar-xs nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-avatar.avatar-sm{width:var(--avatar-sm-size);height:var(--avatar-sm-size);font-size:var(--avatar-sm-font-size);line-height:var(--avatar-sm-font-size)}nv-avatar.avatar-sm nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-avatar.avatar-md{width:var(--avatar-md-size);height:var(--avatar-md-size);font-size:var(--avatar-md-font-size);line-height:var(--avatar-md-font-size)}nv-avatar.avatar-md nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-avatar.avatar-lg{width:var(--avatar-lg-size);height:var(--avatar-lg-size);font-size:var(--avatar-lg-font-size);line-height:var(--avatar-lg-font-size)}nv-avatar.avatar-lg nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-avatar.avatar-xl{width:var(--avatar-xl-size);height:var(--avatar-xl-size);font-size:var(--avatar-xl-font-size);line-height:var(--avatar-xl-font-size)}nv-avatar.avatar-xl nv-icon>svg{width:var(--spacing-7);height:var(--spacing-7);stroke-width:1.9px}";
|
|
9
|
-
const NvAvatarStyle0 = nvAvatarCss;
|
|
10
|
-
|
|
11
|
-
const NvAvatar = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
/**
|
|
15
|
-
* Define the size of the avatar. You can use t-shirt sizes.
|
|
16
|
-
*/
|
|
17
|
-
this.size = 'md';
|
|
18
|
-
/**
|
|
19
|
-
* You can apply different colors on the Avatar.
|
|
20
|
-
* Use a string number between 1 and 10.
|
|
21
|
-
*/
|
|
22
|
-
this.color = '1';
|
|
23
|
-
}
|
|
24
|
-
componentWillRender() {
|
|
25
|
-
if (this.xsmall) {
|
|
26
|
-
this.size = constants98e2dcc2.SemanticSizes.ExtraSmall;
|
|
27
|
-
}
|
|
28
|
-
if (this.small) {
|
|
29
|
-
this.size = constants98e2dcc2.SemanticSizes.Small;
|
|
30
|
-
}
|
|
31
|
-
if (this.medium) {
|
|
32
|
-
this.size = constants98e2dcc2.SemanticSizes.Medium;
|
|
33
|
-
}
|
|
34
|
-
if (this.large) {
|
|
35
|
-
this.size = constants98e2dcc2.SemanticSizes.Large;
|
|
36
|
-
}
|
|
37
|
-
if (this.xlarge) {
|
|
38
|
-
this.size = constants98e2dcc2.SemanticSizes.ExtraLarge;
|
|
39
|
-
}
|
|
40
|
-
if (this.text) {
|
|
41
|
-
this.initials = this.text;
|
|
42
|
-
}
|
|
43
|
-
if (this.url) {
|
|
44
|
-
this.src = this.url;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
//#endregion PROPERTIES
|
|
48
|
-
/****************************************************************************/
|
|
49
|
-
//#region METHODS
|
|
50
|
-
/**
|
|
51
|
-
* Makes sure the initials are trimmed to 2 letters.
|
|
52
|
-
* @param {string} initials - The initials to be trimmed.
|
|
53
|
-
* @returns {string} The trimmed initials.
|
|
54
|
-
*/
|
|
55
|
-
trimInitials(initials) {
|
|
56
|
-
return initials.trim().substring(0, 2);
|
|
57
|
-
}
|
|
58
|
-
//#endregion METHODS
|
|
59
|
-
/****************************************************************************/
|
|
60
|
-
//#region RENDER
|
|
61
|
-
render() {
|
|
62
|
-
return (index.h(index.Host, { key: 'a6f25d1d8a45eda09ce76f89aff5c1ca160f0b7c', class: clsx297c1ffe.clsx(`avatar-${this.size}`, `avatar-color-${this.color}`), "aria-label": this.alt }, this.src ? (index.h("img", { src: this.src, alt: this.alt })) : this.initials ? (this.trimInitials(this.initials)) : (index.h("slot", { name: "icon" }, index.h("nv-icon", { name: "user" })))));
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
NvAvatar.style = NvAvatarStyle0;
|
|
66
|
-
|
|
67
|
-
exports.nv_avatar = NvAvatar;
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-C8UfzrMI.js');
|
|
4
|
-
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
|
-
var timeline_animation1b88f052 = require('./timeline.animation-1b88f052-B8-vCVrY.js');
|
|
6
|
-
var fade_animation2a077983 = require('./fade.animation-2a077983-aKN0EDTo.js');
|
|
7
|
-
require('react');
|
|
8
|
-
|
|
9
|
-
const nvBadgeCss = "nv-badge{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.with-gap{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content;gap:var(--badge-gap-x)}nv-badge:not(.with-gap){padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.badge-1{color:var(--color-rainbow-1-text);background-color:var(--color-rainbow-1-background)}nv-badge.badge-1 .close:focus,nv-badge.badge-1 .close:focus-within{outline:none}nv-badge.badge-1 .close:focus-visible,nv-badge.badge-1 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-1-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-1 nv-icon{color:var(--color-rainbow-1-icon)}nv-badge.badge-2{color:var(--color-rainbow-2-text);background-color:var(--color-rainbow-2-background)}nv-badge.badge-2 .close:focus,nv-badge.badge-2 .close:focus-within{outline:none}nv-badge.badge-2 .close:focus-visible,nv-badge.badge-2 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-2-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-2 nv-icon{color:var(--color-rainbow-2-icon)}nv-badge.badge-3{color:var(--color-rainbow-3-text);background-color:var(--color-rainbow-3-background)}nv-badge.badge-3 .close:focus,nv-badge.badge-3 .close:focus-within{outline:none}nv-badge.badge-3 .close:focus-visible,nv-badge.badge-3 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-3-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-3 nv-icon{color:var(--color-rainbow-3-icon)}nv-badge.badge-4{color:var(--color-rainbow-4-text);background-color:var(--color-rainbow-4-background)}nv-badge.badge-4 .close:focus,nv-badge.badge-4 .close:focus-within{outline:none}nv-badge.badge-4 .close:focus-visible,nv-badge.badge-4 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-4-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-4 nv-icon{color:var(--color-rainbow-4-icon)}nv-badge.badge-5{color:var(--color-rainbow-5-text);background-color:var(--color-rainbow-5-background)}nv-badge.badge-5 .close:focus,nv-badge.badge-5 .close:focus-within{outline:none}nv-badge.badge-5 .close:focus-visible,nv-badge.badge-5 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-5-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-5 nv-icon{color:var(--color-rainbow-5-icon)}nv-badge.badge-6{color:var(--color-rainbow-6-text);background-color:var(--color-rainbow-6-background)}nv-badge.badge-6 .close:focus,nv-badge.badge-6 .close:focus-within{outline:none}nv-badge.badge-6 .close:focus-visible,nv-badge.badge-6 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-6-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-6 nv-icon{color:var(--color-rainbow-6-icon)}nv-badge.badge-7{color:var(--color-rainbow-7-text);background-color:var(--color-rainbow-7-background)}nv-badge.badge-7 .close:focus,nv-badge.badge-7 .close:focus-within{outline:none}nv-badge.badge-7 .close:focus-visible,nv-badge.badge-7 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-7-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-7 nv-icon{color:var(--color-rainbow-7-icon)}nv-badge.badge-8{color:var(--color-rainbow-8-text);background-color:var(--color-rainbow-8-background)}nv-badge.badge-8 .close:focus,nv-badge.badge-8 .close:focus-within{outline:none}nv-badge.badge-8 .close:focus-visible,nv-badge.badge-8 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-8-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-8 nv-icon{color:var(--color-rainbow-8-icon)}nv-badge.badge-9{color:var(--color-rainbow-9-text);background-color:var(--color-rainbow-9-background)}nv-badge.badge-9 .close:focus,nv-badge.badge-9 .close:focus-within{outline:none}nv-badge.badge-9 .close:focus-visible,nv-badge.badge-9 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-9-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-9 nv-icon{color:var(--color-rainbow-9-icon)}nv-badge.badge-10{color:var(--color-rainbow-10-text);background-color:var(--color-rainbow-10-background)}nv-badge.badge-10 .close:focus,nv-badge.badge-10 .close:focus-within{outline:none}nv-badge.badge-10 .close:focus-visible,nv-badge.badge-10 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-10-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-10 nv-icon{color:var(--color-rainbow-10-icon)}nv-badge span{font-size:var(--font-size-xs);line-height:var(--line-height-xs) !important}nv-badge nv-icon>svg.icon-xs{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-sm{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-md{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-lg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-xl{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge .close{padding:0;line-height:0;border:none;background:none;cursor:pointer;color:inherit;display:inline-flex;align-items:center;aspect-ratio:1/1;border-radius:var(--radius-rounded-full)}";
|
|
10
|
-
const NvBadgeStyle0 = nvBadgeCss;
|
|
11
|
-
|
|
12
|
-
const NvBadge = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this.closeClicked = index.createEvent(this, "closeClicked");
|
|
16
|
-
this.hiddenChanged = index.createEvent(this, "hiddenChanged");
|
|
17
|
-
this.hiddenChangedComplete = index.createEvent(this, "hiddenChangedComplete");
|
|
18
|
-
/****************************************************************************/
|
|
19
|
-
//#region DEPRECATED
|
|
20
|
-
/**
|
|
21
|
-
* Whether the badge is dismissible.
|
|
22
|
-
* @deprecated use dismissible instead.
|
|
23
|
-
*/
|
|
24
|
-
this.dismissal = false;
|
|
25
|
-
//#endregion DEPRECATED
|
|
26
|
-
/****************************************************************************/
|
|
27
|
-
//#region PROPERTIES
|
|
28
|
-
/**
|
|
29
|
-
* The color of the badge. Use a string between 1 to 10
|
|
30
|
-
*/
|
|
31
|
-
this.color = '1';
|
|
32
|
-
/**
|
|
33
|
-
* Main content of the badge.
|
|
34
|
-
*/
|
|
35
|
-
this.label = null;
|
|
36
|
-
/**
|
|
37
|
-
* The lead icon of the badge.
|
|
38
|
-
*/
|
|
39
|
-
this.leadIcon = null;
|
|
40
|
-
/**
|
|
41
|
-
* Whether the badge is dismissible.
|
|
42
|
-
*/
|
|
43
|
-
this.dismissible = false;
|
|
44
|
-
/**
|
|
45
|
-
* Controls the visibility of the badge. Will animate with fade and collapse.
|
|
46
|
-
*/
|
|
47
|
-
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
48
|
-
this._isHidden = this.hidden;
|
|
49
|
-
/**
|
|
50
|
-
* When true, the alert does not automatically close upon dismissing.
|
|
51
|
-
* Useful for externally controlled component behavior.
|
|
52
|
-
*/
|
|
53
|
-
this.preventAutoClose = false;
|
|
54
|
-
//#endregion LIFECYCLE
|
|
55
|
-
/****************************************************************************/
|
|
56
|
-
//#region METHODS
|
|
57
|
-
/**
|
|
58
|
-
* Handles the close button click.
|
|
59
|
-
* @param {MouseEvent} originalEvent - The original event.
|
|
60
|
-
*/
|
|
61
|
-
this.handleClose = (originalEvent) => {
|
|
62
|
-
if (!this.preventAutoClose) {
|
|
63
|
-
this.hidden = true;
|
|
64
|
-
}
|
|
65
|
-
this.closeClicked.emit(originalEvent);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
//#endregion EVENTS
|
|
69
|
-
/****************************************************************************/
|
|
70
|
-
//#region WATCHERS
|
|
71
|
-
/**
|
|
72
|
-
* Handles the dismissal prop change.
|
|
73
|
-
* @param {boolean} dismissal - The new dismissal value.
|
|
74
|
-
*/
|
|
75
|
-
handleDismissalChange(dismissal) {
|
|
76
|
-
this.dismissible = dismissal;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Handles the icon prop change.
|
|
80
|
-
* @param {string} icon - The new icon value.
|
|
81
|
-
*/
|
|
82
|
-
handleIconChange(icon) {
|
|
83
|
-
this.leadIcon = icon;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Handles the hidden prop change.
|
|
87
|
-
* @param {boolean} hidden - The new hidden value.
|
|
88
|
-
*/
|
|
89
|
-
async handleHiddenChange(hidden) {
|
|
90
|
-
this.hiddenChanged.emit(hidden);
|
|
91
|
-
if (this._isHidden === true)
|
|
92
|
-
this._isHidden = hidden;
|
|
93
|
-
const { fadeIn, fadeOut } = fade_animation2a077983.useFade(this.ref, { duration: 150 });
|
|
94
|
-
const { collapse, expand } = timeline_animation1b88f052.useCollapse(this.ref, { duration: 150 });
|
|
95
|
-
if (hidden === true)
|
|
96
|
-
await timeline_animation1b88f052.timeline(fadeOut, collapse).start();
|
|
97
|
-
if (hidden === false)
|
|
98
|
-
await timeline_animation1b88f052.timeline(expand, fadeIn).start();
|
|
99
|
-
this.hiddenChangedComplete.emit(hidden);
|
|
100
|
-
if (this._isHidden === false)
|
|
101
|
-
this._isHidden = hidden;
|
|
102
|
-
}
|
|
103
|
-
//#endregion WATCHERS
|
|
104
|
-
/****************************************************************************/
|
|
105
|
-
//#region LIFECYCLE
|
|
106
|
-
/**
|
|
107
|
-
* Component will load.
|
|
108
|
-
*/
|
|
109
|
-
componentWillLoad() {
|
|
110
|
-
if (this.dismissal) {
|
|
111
|
-
this.dismissible = this.dismissal;
|
|
112
|
-
}
|
|
113
|
-
if (this.icon != null && this.icon != '') {
|
|
114
|
-
this.leadIcon = this.icon;
|
|
115
|
-
}
|
|
116
|
-
if (this.hidden) {
|
|
117
|
-
const { setCollapsed } = timeline_animation1b88f052.useCollapse(this.ref);
|
|
118
|
-
const { setFadeOut } = fade_animation2a077983.useFade(this.ref);
|
|
119
|
-
setCollapsed();
|
|
120
|
-
setFadeOut();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
//#endregion METHODS
|
|
124
|
-
/****************************************************************************/
|
|
125
|
-
//#region RENDER
|
|
126
|
-
render() {
|
|
127
|
-
return (index.h(index.Host, { key: '25a36133db083b5a02ade58a84650cc2d9f6e412', class: clsx297c1ffe.clsx(`badge-${this.color}`, {
|
|
128
|
-
'has-close': this.dismissible,
|
|
129
|
-
'with-gap': this.dismissible || this.label,
|
|
130
|
-
'visually-hidden': this._isHidden,
|
|
131
|
-
}) }, index.h("slot", { key: 'ca3afa597464e0266142aaf555552b1cc15335c6', name: "leading-icon" }, this.leadIcon && (index.h("nv-icon", { key: 'f85f55a086d0092057d498c01ec8d2e09e94a12d', slot: "leading-icon", name: this.leadIcon, size: "sm" }))), this.label && index.h("span", { key: '7c2f5845789319ba3d7035aceccedab671d21f70' }, this.label), this.dismissible && (index.h("button", { key: 'aca006f50e839c83aa7fef766f4e45b6148c0c51', onClick: this.handleClose, class: "close", type: "button" }, index.h("nv-icon", { key: '0ad3c5fb85ee81bb820480612eac7b2e5e0a642a', name: "x", size: "sm" })))));
|
|
132
|
-
}
|
|
133
|
-
get ref() { return index.getElement(this); }
|
|
134
|
-
static get watchers() { return {
|
|
135
|
-
"dismissal": ["handleDismissalChange"],
|
|
136
|
-
"icon": ["handleIconChange"],
|
|
137
|
-
"hidden": ["handleHiddenChange"]
|
|
138
|
-
}; }
|
|
139
|
-
};
|
|
140
|
-
NvBadge.style = NvBadgeStyle0;
|
|
141
|
-
|
|
142
|
-
const nvFielddropdownitemcheckCss = "nv-fielddropdownitemcheck{cursor:pointer;display:flex;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);border-radius:var(--list-dropdown-item-radius)}nv-fielddropdownitemcheck slot-fb,nv-fielddropdownitemcheck span{all:unset}nv-fielddropdownitemcheck:hover{background-color:var(--components-list-dropdown-item-background-hover)}";
|
|
143
|
-
const NvFielddropdownitemcheckStyle0 = nvFielddropdownitemcheckCss;
|
|
144
|
-
|
|
145
|
-
const NvFielddropdownitemcheck = class {
|
|
146
|
-
constructor(hostRef) {
|
|
147
|
-
index.registerInstance(this, hostRef);
|
|
148
|
-
this.itemChecked = index.createEvent(this, "itemChecked");
|
|
149
|
-
/****************************************************************************/
|
|
150
|
-
//#region PROPERTIES
|
|
151
|
-
/**
|
|
152
|
-
* Indicates whether the checkbox is selected.
|
|
153
|
-
*/
|
|
154
|
-
this.checked = false;
|
|
155
|
-
/**
|
|
156
|
-
* Disables the item, preventing any user interaction.
|
|
157
|
-
*/
|
|
158
|
-
this.disabled = false;
|
|
159
|
-
/**
|
|
160
|
-
* when the child <nv-fieldcheckbox> change its `checked` state,
|
|
161
|
-
* update `this.checked` and emit `itemChecked`.
|
|
162
|
-
* @param {CustomEvent<boolean>} event - The event emitted by the <nv-fieldcheckbox> component.
|
|
163
|
-
*/
|
|
164
|
-
this.onFieldcheckboxChanged = (event) => {
|
|
165
|
-
if (this.disabled)
|
|
166
|
-
return;
|
|
167
|
-
// NvFieldcheckbox has emitted checkedChanged
|
|
168
|
-
this.checked = event.detail; // get the new state
|
|
169
|
-
this.itemChecked.emit({
|
|
170
|
-
value: this.value,
|
|
171
|
-
checked: this.checked,
|
|
172
|
-
group: this.group,
|
|
173
|
-
});
|
|
174
|
-
};
|
|
175
|
-
/** Make sure the checkbox is checked when clicked anywhere in the item. */
|
|
176
|
-
this.handleClick = () => {
|
|
177
|
-
if (this.disabled)
|
|
178
|
-
return;
|
|
179
|
-
if (this.el.querySelector('input').checked) {
|
|
180
|
-
this.checked = false;
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
this.checked = true;
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
render() {
|
|
188
|
-
return (index.h(index.Host, { key: '7b292a5cf03a4b45090535f86dde4cec73a690dc', onClick: this.handleClick }, index.h("nv-fieldcheckbox", { key: '928fa9396e77a2f1e3beb8b48757c67f73bb9715', checked: this.checked, name: this.label || this.value, label: this.label || this.value, "label-placement": "after", description: this.description, disabled: this.disabled, tabindex: "-1", role: "option", onCheckedChanged: this.onFieldcheckboxChanged })));
|
|
189
|
-
}
|
|
190
|
-
get el() { return index.getElement(this); }
|
|
191
|
-
};
|
|
192
|
-
NvFielddropdownitemcheck.style = NvFielddropdownitemcheckStyle0;
|
|
193
|
-
|
|
194
|
-
exports.nv_badge = NvBadge;
|
|
195
|
-
exports.nv_fielddropdownitemcheck = NvFielddropdownitemcheck;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-C8UfzrMI.js');
|
|
4
|
-
require('react');
|
|
5
|
-
|
|
6
|
-
const classes = {
|
|
7
|
-
'w-full': 'w-full',
|
|
8
|
-
'wFull': 'w-full',
|
|
9
|
-
'is-active': 'is-active',
|
|
10
|
-
'is-selected': 'is-selected',
|
|
11
|
-
};
|
|
12
|
-
const NvBaseComponent = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
}
|
|
16
|
-
/****************************************************************************/
|
|
17
|
-
//#region LIFECYCLE
|
|
18
|
-
componentWillLoad() {
|
|
19
|
-
this.applyClassesOnInitialRender();
|
|
20
|
-
}
|
|
21
|
-
componentDidLoad() {
|
|
22
|
-
this.mutationObserver = new MutationObserver(mutations => {
|
|
23
|
-
mutations.forEach(mutation => {
|
|
24
|
-
if (mutation.type === 'attributes') {
|
|
25
|
-
const target = mutation.target;
|
|
26
|
-
Object.keys(classes).forEach(attributeName => {
|
|
27
|
-
if (target.hasAttribute(attributeName)) {
|
|
28
|
-
target.classList.add(classes[attributeName]);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
target.classList.remove(classes[attributeName]);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
this.observeElements();
|
|
38
|
-
}
|
|
39
|
-
disconnectedCallback() {
|
|
40
|
-
if (this.mutationObserver) {
|
|
41
|
-
this.mutationObserver.disconnect();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
//#endregion LIFECYCLE
|
|
45
|
-
/****************************************************************************/
|
|
46
|
-
//#region METHODS
|
|
47
|
-
applyClassesOnInitialRender() {
|
|
48
|
-
Object.keys(classes).forEach(attributeName => {
|
|
49
|
-
const elements = this.el.querySelectorAll(`[${attributeName}]`);
|
|
50
|
-
elements.forEach(element => {
|
|
51
|
-
element.classList.add(classes[attributeName]);
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
observeElements() {
|
|
56
|
-
this.mutationObserver.observe(this.el, {
|
|
57
|
-
attributes: true,
|
|
58
|
-
attributeFilter: Object.keys(classes),
|
|
59
|
-
subtree: true,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
//#endregion METHODS
|
|
63
|
-
/****************************************************************************/
|
|
64
|
-
//#region RENDER
|
|
65
|
-
render() {
|
|
66
|
-
return (index.h(index.Host, { key: 'ee2869bb42012e8c6b185e412503b14482f58af0', style: { display: 'block' } }, index.h("slot", { key: '2d89c30073a159339419bbec3f323abdcbf312cf' })));
|
|
67
|
-
}
|
|
68
|
-
get el() { return index.getElement(this); }
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
exports.nv_base = NvBaseComponent;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-C8UfzrMI.js');
|
|
4
|
-
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
|
-
require('react');
|
|
6
|
-
|
|
7
|
-
const nvBreadcrumbCss = "nv-breadcrumb{display:flex;align-items:center;color:var(--components-breadcrumb-text);font-size:var(--font-size-sm);font-style:normal;font-weight:500;line-height:var(--line-height-sm)}nv-breadcrumb ul{display:flex;flex-direction:column;gap:var(--spacing-1-5);padding:var(--spacing-1)}nv-breadcrumb ul a,nv-breadcrumb ul button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb ul a:focus,nv-breadcrumb ul a:focus-within,nv-breadcrumb ul button:focus,nv-breadcrumb ul button:focus-within{outline:none}nv-breadcrumb ul a:focus-visible,nv-breadcrumb ul a:has(:focus-visible),nv-breadcrumb ul button:focus-visible,nv-breadcrumb ul button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb ul a:hover,nv-breadcrumb ul button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb>a,nv-breadcrumb>button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb>a:focus,nv-breadcrumb>a:focus-within,nv-breadcrumb>button:focus,nv-breadcrumb>button:focus-within{outline:none}nv-breadcrumb>a:focus-visible,nv-breadcrumb>a:has(:focus-visible),nv-breadcrumb>button:focus-visible,nv-breadcrumb>button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb>a:hover,nv-breadcrumb>button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb span[data-scope=separator]{display:inline-flex;padding-left:var(--breadcrumb-padding-y)}";
|
|
8
|
-
const NvBreadcrumbStyle0 = nvBreadcrumbCss;
|
|
9
|
-
|
|
10
|
-
const NvBreadcrumb = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
/****************************************************************************/
|
|
14
|
-
//#region PROPERTIES
|
|
15
|
-
/**
|
|
16
|
-
* The type of the breadcrumb. Use 'collapsed' to house multiple breadcrumbs
|
|
17
|
-
* in a dropdown. Use default for a single item. When passing multiple items
|
|
18
|
-
* as collapsed, make sure to wrap you links in list tags
|
|
19
|
-
*/
|
|
20
|
-
this.type = 'default';
|
|
21
|
-
}
|
|
22
|
-
//#endregion PROPERTIES
|
|
23
|
-
/****************************************************************************/
|
|
24
|
-
//#region LIFECYCLE
|
|
25
|
-
componentDidLoad() {
|
|
26
|
-
// Force a re-render to pass the popoverTrigger ref to the popovers
|
|
27
|
-
if (this.type === 'collapsed')
|
|
28
|
-
index.forceUpdate(this);
|
|
29
|
-
}
|
|
30
|
-
componentWillLoad() {
|
|
31
|
-
if (this.type === 'default' && this.tooltip) {
|
|
32
|
-
this.popoverTrigger = Array.from(this.el.children).find(child => child.getAttribute('slot') === null);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//#endregion LIFECYCLE
|
|
36
|
-
/****************************************************************************/
|
|
37
|
-
//#region RENDER
|
|
38
|
-
render() {
|
|
39
|
-
return (index.h(index.Host, { key: '88cc0ffe7aee64066946b3f2579d0ace70a56339', role: "listitem", "aria-current": this.current ? 'location' : undefined, class: clsx297c1ffe.clsx({ 'visually-hidden': this.current }) }, this.type === 'collapsed' ? (index.h("button", { ref: el => (this.popoverTrigger = el) }, "...")) : (index.h("slot", null)), this.tooltip && (index.h("nv-tooltip", { key: '1e1bb755b7a9466c5a174e57b562b718d7f2a78a', message: this.tooltip, triggerElement: this.popoverTrigger, placement: "top" })), this.type === 'collapsed' && (index.h("nv-popover", { key: '91b3238143defb7b5fd71b14bb31edb8093778d2', triggerMode: "click", groupName: "breadcrumbs", triggerElement: this.popoverTrigger }, index.h("ul", { key: '4c1851c8988b7eb1f607e422ceac1dc6b04022c5', slot: "content" }, index.h("slot", { key: '11213bce3ff14309b0be7336f0022411a2e6721d' })))), index.h("span", { key: '3b97cd9edbb33196c85a29afbaf5b2ac647b0912', "data-scope": "separator" }, "/")));
|
|
40
|
-
}
|
|
41
|
-
get el() { return index.getElement(this); }
|
|
42
|
-
};
|
|
43
|
-
NvBreadcrumb.style = NvBreadcrumbStyle0;
|
|
44
|
-
|
|
45
|
-
exports.nv_breadcrumb = NvBreadcrumb;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-C8UfzrMI.js');
|
|
4
|
-
require('react');
|
|
5
|
-
|
|
6
|
-
const nvBreadcrumbsCss = "nv-breadcrumbs{display:block}nv-breadcrumbs>ol{display:flex;flex-wrap:wrap;align-items:center;gap:var(--breadcrumb-padding-y)}nv-breadcrumbs nv-breadcrumb:last-child [data-scope=separator],nv-breadcrumbs nv-breadcrumb:last-child [slot=separator]{display:none}";
|
|
7
|
-
const NvBreadcrumbsStyle0 = nvBreadcrumbsCss;
|
|
8
|
-
|
|
9
|
-
const NvBreadcrumbs = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
//#region RENDER
|
|
14
|
-
render() {
|
|
15
|
-
return (index.h(index.Host, { key: '832ca6782b23a6aa0ca9fdea78cd7b0173db66b4', role: "navigation", "aria-label": "breadcrumbs" }, index.h("ol", { key: 'e71aaabc2c3e8912097f822e24947eeec112ea3b' }, index.h("slot", { key: '0af6f306a8ad6ec26bbcf3bf480acb3cc4a9682a' }))));
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
NvBreadcrumbs.style = NvBreadcrumbsStyle0;
|
|
19
|
-
|
|
20
|
-
exports.nv_breadcrumbs = NvBreadcrumbs;
|