@nova-design-system/nova-react 3.24.0 → 3.25.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/README.md +1 -0
- package/dist/cjs/dom.utils-CuXVGECR-8VY5SfMZ.js +177 -0
- package/dist/cjs/generated/components.server.js +80 -61
- package/dist/cjs/index-DUlunl9a.js +9696 -0
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/{nv-accordion-item.entry-Bu1tAcCq.js → nv-accordion-item.entry-CqnjIt4R.js} +8 -7
- package/dist/cjs/{nv-accordion.entry-jWjLdX8w.js → nv-accordion.entry-Dx7FmGg_.js} +10 -8
- package/dist/cjs/{nv-alert.entry-E9ZJay_K.js → nv-alert.entry-BL3Pdcxd.js} +6 -4
- package/dist/cjs/nv-avatar.entry-2dFR4I9_.js +68 -0
- package/dist/cjs/nv-badge_2.entry-5FShR2Ax.js +218 -0
- package/dist/cjs/nv-breadcrumb.entry-Cfi32bBT.js +49 -0
- package/dist/cjs/nv-breadcrumbs.entry-BSgn3KUO.js +21 -0
- package/dist/cjs/nv-button.entry-BdQQ_LE7.js +166 -0
- package/dist/cjs/{nv-buttongroup.entry-CuZCRsnV.js → nv-buttongroup.entry-BM8CwXFK.js} +13 -7
- package/dist/cjs/{nv-calendar.entry-CT3mASW6.js → nv-calendar.entry-CeKsMGOa.js} +27 -10
- package/dist/cjs/nv-col.entry-D-h2PGcz.js +38 -0
- package/dist/cjs/{nv-datagrid.entry-CGCEhO8C.js → nv-datagrid.entry-nOBIfqOS.js} +47 -184
- package/dist/cjs/{nv-datagridcolumn.entry-Fsqc7CT_.js → nv-datagridcolumn.entry-BAzTU_KM.js} +2 -2
- package/dist/cjs/{nv-dialog.entry-B6OYcZxQ.js → nv-dialog.entry-Bi2ZVSe2.js} +19 -20
- package/dist/cjs/{nv-dialogfooter_2.entry-C4fP_n2-.js → nv-dialogfooter_2.entry-D6lzC-3S.js} +11 -29
- package/dist/cjs/{nv-drawer.entry-C5O4KvHU.js → nv-drawer.entry-Dp4AfBiF.js} +19 -19
- package/dist/cjs/{nv-drawerfooter_2.entry-C-reYJXG.js → nv-drawerfooter_2.entry-DpWSsq6d.js} +11 -29
- package/dist/cjs/nv-fieldcheckbox.entry-COA3LXnX.js +179 -0
- package/dist/cjs/{nv-fielddate.entry-dqZDBVmm.js → nv-fielddate.entry-B8r5RFXd.js} +15 -13
- package/dist/cjs/{nv-fielddaterange.entry-wNRasXky.js → nv-fielddaterange.entry-C6_Kq93P.js} +15 -13
- package/dist/cjs/{nv-fielddropdown.entry-BA15piWa.js → nv-fielddropdown.entry-B2Dr5zHd.js} +17 -15
- package/dist/cjs/nv-fielddropdownitem.entry-DapivVnR.js +69 -0
- package/dist/cjs/{nv-fieldmultiselect.entry-BWY5xOAd.js → nv-fieldmultiselect.entry-DSpQeiPx.js} +12 -8
- package/dist/cjs/nv-fieldnumber.entry-BwxR9sRr.js +189 -0
- package/dist/cjs/nv-fieldpassword.entry-BOSU-Skh.js +167 -0
- package/dist/cjs/nv-fieldradio.entry-ZFafNY5_.js +105 -0
- package/dist/cjs/{nv-fieldselect.entry-uUIZ6hmN.js → nv-fieldselect.entry-CfWjQAd9.js} +20 -12
- package/dist/cjs/{nv-fieldslider.entry-DnvmxxYY.js → nv-fieldslider.entry-dDPcWUxs.js} +33 -15
- package/dist/cjs/nv-fieldtext.entry-Yaa-mkjJ.js +163 -0
- package/dist/cjs/{nv-fieldtextarea.entry-DU2bWYeg.js → nv-fieldtextarea.entry-Dp_l2pKZ.js} +15 -9
- package/dist/cjs/{nv-fieldtime.entry-DlMNDTht.js → nv-fieldtime.entry-CWxi4Uel.js} +15 -9
- package/dist/cjs/{nv-icon.entry-CnUkRzaA.js → nv-icon.entry-Dci11W9S.js} +4 -4
- package/dist/cjs/nv-iconbutton_2.entry-A6FKFJT_.js +171 -0
- package/dist/cjs/{nv-menu.entry-Dc_FvIx7.js → nv-menu.entry-BHaYP-9M.js} +9 -13
- package/dist/cjs/nv-menuitem.entry-Cm1vvN25.js +59 -0
- package/dist/cjs/nv-notification-bullet.entry-DRlS3Ybc.js +76 -0
- package/dist/cjs/{nv-notification.entry-C3m5p5BL.js → nv-notification.entry-BeDmR-XC.js} +4 -4
- package/dist/cjs/nv-notificationcontainer.entry-C3p_87Dg.js +41 -0
- package/dist/cjs/nv-paginationtable.entry-BzEqQOBa.js +231 -0
- package/dist/cjs/{nv-popover.entry-B0c-2rO4.js → nv-popover.entry-D2oFn9vL.js} +105 -33
- package/dist/cjs/nv-row.entry-hV1kxmrr.js +22 -0
- package/dist/cjs/{nv-sidebar.entry-CiN813gQ.js → nv-sidebar.entry-BJrqJ8K7.js} +10 -6
- package/dist/cjs/nv-sidebarcontent.entry-CPfGF7nx.js +22 -0
- package/dist/cjs/{nv-sidebardivider.entry-B4EMyca5.js → nv-sidebardivider.entry-D2wmzHCO.js} +4 -4
- package/dist/cjs/{nv-sidebarfooter.entry-CHi4qOFe.js → nv-sidebarfooter.entry-C7fqCzjH.js} +4 -4
- package/dist/cjs/nv-sidebargroup.entry-qkXnxhs_.js +23 -0
- package/dist/cjs/{nv-sidebarheader.entry-_7ch0O3G.js → nv-sidebarheader.entry-DBsOmyQ0.js} +4 -4
- package/dist/cjs/{nv-sidebarlogo.entry-Ch9F-JnT.js → nv-sidebarlogo.entry-902Ht3UR.js} +4 -4
- package/dist/cjs/{nv-sidebarnavitem.entry-DVrafSMr.js → nv-sidebarnavitem.entry-CICrllp8.js} +9 -7
- package/dist/cjs/nv-sidebarnavsubitem.entry-Q9jjU_7D.js +35 -0
- package/dist/cjs/{nv-split.entry-0HTslRAX.js → nv-split.entry-BYIsE2wp.js} +10 -6
- package/dist/cjs/nv-stack.entry-DgE5ASGH.js +31 -0
- package/dist/cjs/{nv-table.entry-DH85n8Mc.js → nv-table.entry-DHXBu2n1.js} +4 -4
- package/dist/cjs/{nv-tableheader.entry-CKfocdxD.js → nv-tableheader.entry-BijgOxcO.js} +4 -4
- package/dist/cjs/nv-toggle.entry-CMI1WdvV.js +82 -0
- package/dist/cjs/nv-togglebutton.entry-DAPETEmF.js +66 -0
- package/dist/cjs/{nv-togglebuttongroup.entry-C0NLbsq7.js → nv-togglebuttongroup.entry-CzDI1XCr.js} +13 -9
- package/dist/cjs/nv-tooltip.entry-DPoUP9iL.js +56 -0
- package/dist/components/NvDatatable/NvDatatable.js +29 -8
- package/dist/generated/components.js +11 -0
- package/dist/generated/components.server.js +79 -61
- package/dist/types/components/NvDatatable/types.d.ts +5 -0
- package/dist/types/generated/components.d.ts +52 -46
- package/dist/types/generated/components.server.d.ts +52 -46
- package/package.json +2 -2
- package/dist/cjs/index-kU2nW5aN.js +0 -40286
- package/dist/cjs/nv-avatar.entry-CUX7u0kR.js +0 -68
- package/dist/cjs/nv-badge_2.entry-bxpV5gxE.js +0 -213
- package/dist/cjs/nv-breadcrumb.entry-Cbbb9Qeh.js +0 -46
- package/dist/cjs/nv-breadcrumbs.entry-BTqnp9zO.js +0 -21
- package/dist/cjs/nv-button.entry-upWH19y6.js +0 -162
- package/dist/cjs/nv-col.entry--pCxkaTh.js +0 -38
- package/dist/cjs/nv-fieldcheckbox.entry-bk7UNQny.js +0 -177
- package/dist/cjs/nv-fielddropdownitem.entry-DEWaf9dC.js +0 -72
- package/dist/cjs/nv-fieldnumber.entry-DoYORd0d.js +0 -187
- package/dist/cjs/nv-fieldpassword.entry-CPaLj9aD.js +0 -165
- package/dist/cjs/nv-fieldradio.entry-CvUmEaCa.js +0 -103
- package/dist/cjs/nv-fieldtext.entry-BYAJp3n_.js +0 -163
- package/dist/cjs/nv-iconbutton_2.entry-hqp4AcRq.js +0 -167
- package/dist/cjs/nv-menuitem.entry-DzMhx6c_.js +0 -60
- package/dist/cjs/nv-notification-bullet.entry-BwhHCMQF.js +0 -76
- package/dist/cjs/nv-notificationcontainer.entry-DTRNn7VE.js +0 -41
- package/dist/cjs/nv-row.entry-CdcjVGZv.js +0 -22
- package/dist/cjs/nv-sidebarcontent.entry-D9hpAhK8.js +0 -22
- package/dist/cjs/nv-sidebargroup.entry-RVqrsyIU.js +0 -23
- package/dist/cjs/nv-sidebarnavsubitem.entry-C0XDAzma.js +0 -35
- package/dist/cjs/nv-stack.entry-CqO7uTQf.js +0 -31
- package/dist/cjs/nv-toggle.entry-BHUl76Im.js +0 -80
- package/dist/cjs/nv-togglebutton.entry-D_9COjY-.js +0 -67
- package/dist/cjs/nv-tooltip.entry-BfViGE_U.js +0 -55
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
|
|
5
|
-
require('@stencil/react-output-target/runtime');
|
|
6
|
-
require('react');
|
|
7
|
-
require('react-dom');
|
|
8
|
-
|
|
9
|
-
const nvIconbuttonCss = "nv-iconbutton.root{display:inline-flex;justify-content:center;align-items:center;font-style:normal;font-weight:var(--font-weight-medium-emphasis);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;transition:background-color 150ms ease-out;height:fit-content;width:fit-content}nv-iconbutton.size-xs{padding:calc(var(--button-xs-icon-button-padding) - 1px);gap:var(--button-xs-gap);border-radius:var(--button-xs-border-radius);line-height:var(--button-xs-line-height);font-size:var(--button-xs-font-size)}nv-iconbutton.size-sm{padding:calc(var(--button-sm-icon-button-padding) - 1px);gap:var(--button-sm-gap);border-radius:var(--button-sm-border-radius);line-height:var(--button-sm-line-height);font-size:var(--button-sm-font-size)}nv-iconbutton.size-md{padding:calc(var(--button-md-icon-button-padding) - 1px);gap:var(--button-md-gap);border-radius:var(--button-md-border-radius);line-height:var(--button-md-line-height);font-size:var(--button-md-font-size)}nv-iconbutton.size-lg{padding:calc(var(--button-lg-icon-button-padding) - 1px);gap:var(--button-lg-gap);border-radius:var(--button-lg-border-radius);line-height:var(--button-lg-line-height);font-size:var(--button-lg-font-size)}nv-iconbutton.emphasis-high{background:var(--components-button-high-background);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text)}nv-iconbutton.emphasis-high:hover{background:var(--components-button-high-background-hover);color:var(--components-button-high-text-hover)}nv-iconbutton.emphasis-high:focus,nv-iconbutton.emphasis-high:focus-within{outline:none}nv-iconbutton.emphasis-high:focus-visible,nv-iconbutton.emphasis-high:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-high:disabled{background:var(--components-button-high-background);color:var(--components-button-high-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-high nv-icon>svg{color:var(--components-button-high-icon)}nv-iconbutton.emphasis-medium{background:var(--components-button-medium-background);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text)}nv-iconbutton.emphasis-medium:hover{background:var(--components-button-medium-background-hover);color:var(--components-button-medium-text-hover)}nv-iconbutton.emphasis-medium:focus,nv-iconbutton.emphasis-medium:focus-within{outline:none}nv-iconbutton.emphasis-medium:focus-visible,nv-iconbutton.emphasis-medium:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-medium:disabled{background:var(--components-button-medium-background);color:var(--components-button-medium-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-medium nv-icon>svg{color:var(--components-button-medium-icon)}nv-iconbutton.emphasis-low{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-iconbutton.emphasis-low:hover{background:var(--components-button-low-background-hover);color:var(--components-button-low-text-hover)}nv-iconbutton.emphasis-low:focus,nv-iconbutton.emphasis-low:focus-within{outline:none}nv-iconbutton.emphasis-low:focus-visible,nv-iconbutton.emphasis-low:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-low:disabled{background:var(--components-button-low-background);color:var(--components-button-low-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-low nv-icon>svg{color:var(--components-button-low-icon)}nv-iconbutton.emphasis-lower{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-iconbutton.emphasis-lower:hover{background:var(--components-button-lower-background-hover);color:var(--components-button-lower-text-hover)}nv-iconbutton.emphasis-lower:focus,nv-iconbutton.emphasis-lower:focus-within{outline:none}nv-iconbutton.emphasis-lower:focus-visible,nv-iconbutton.emphasis-lower:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-iconbutton.emphasis-lower:disabled{background:var(--components-button-lower-background);color:var(--components-button-lower-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-lower nv-icon>svg{color:var(--components-button-lower-icon)}nv-iconbutton.loading [slot=leading-icon]{display:none}nv-iconbutton.shape-rounded{border-radius:var(--radius-rounded-full)}";
|
|
10
|
-
|
|
11
|
-
const NvIconbutton = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
15
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
19
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
20
|
-
}
|
|
21
|
-
/****************************************************************************/
|
|
22
|
-
//#region PROPERTIES
|
|
23
|
-
/**
|
|
24
|
-
* Determines how large or small the button appears, allowing for
|
|
25
|
-
* customization of the button's dimensions to fit different design
|
|
26
|
-
* specifications and user needs.
|
|
27
|
-
*/
|
|
28
|
-
this.size = 'md';
|
|
29
|
-
/**
|
|
30
|
-
* Adjusts the button’s emphasis to make it more or less visually prominent
|
|
31
|
-
* to users. Use this to draw attention to important actions or reduce focus
|
|
32
|
-
* on less critical ones.
|
|
33
|
-
*/
|
|
34
|
-
this.emphasis = 'high';
|
|
35
|
-
/**
|
|
36
|
-
* Set this to true to show a spinner on the button, letting users know that
|
|
37
|
-
* their action is being processed. It helps improve user experience by
|
|
38
|
-
* indicating ongoing activities. The icon is not displayed when the button
|
|
39
|
-
* is loading. Also, the button is disabled. If you want to disable the
|
|
40
|
-
* button, it is not possible. It is automatically disabled when loading.
|
|
41
|
-
*/
|
|
42
|
-
this.loading = false;
|
|
43
|
-
/**
|
|
44
|
-
* Disables the button, preventing user interaction.
|
|
45
|
-
*/
|
|
46
|
-
this.disabled = false;
|
|
47
|
-
/**
|
|
48
|
-
* Makes the button look active when it’s within a compatible component
|
|
49
|
-
* like a button group.
|
|
50
|
-
*/
|
|
51
|
-
this.active = false;
|
|
52
|
-
/**
|
|
53
|
-
* Sets the button type to control its function in forms. Use 'submit' to send
|
|
54
|
-
* form data, 'reset' to clear the form, or 'button' for a standard button
|
|
55
|
-
* that doesn’t interact with form submission by default.
|
|
56
|
-
*/
|
|
57
|
-
this.type = 'button';
|
|
58
|
-
/**
|
|
59
|
-
* Sets the shape of the button. Choose between square and rounded.
|
|
60
|
-
*/
|
|
61
|
-
this.shape = 'square';
|
|
62
|
-
/**
|
|
63
|
-
* Use this to make the button skip-able when users navigate with the keyboard.
|
|
64
|
-
* The button remains clickable but won’t be reached via the Tab key.
|
|
65
|
-
*/
|
|
66
|
-
this.disableTabindex = false;
|
|
67
|
-
//#endregion PROPERTIES
|
|
68
|
-
/****************************************************************************/
|
|
69
|
-
//#region METHODS
|
|
70
|
-
/**
|
|
71
|
-
* Handles form-related actions when the button is clicked.
|
|
72
|
-
* - Submits the form if the button type is 'submit'.
|
|
73
|
-
* - Resets the form if the button type is 'reset'.
|
|
74
|
-
* @param {Event} event - The click event.
|
|
75
|
-
*/
|
|
76
|
-
this.handleClick = (event) => {
|
|
77
|
-
if (this.disabled) {
|
|
78
|
-
event.preventDefault();
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (this.type === 'submit') {
|
|
82
|
-
this.internals?.form?.requestSubmit();
|
|
83
|
-
}
|
|
84
|
-
if (this.type === 'reset') {
|
|
85
|
-
this.internals?.form?.reset();
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
//#endregion METHODS
|
|
90
|
-
/****************************************************************************/
|
|
91
|
-
//#region WATCHERS
|
|
92
|
-
handleLoadingChange(loading) {
|
|
93
|
-
this.loading = loading;
|
|
94
|
-
this.disabled = loading;
|
|
95
|
-
}
|
|
96
|
-
handleDisabledChange(disabled) {
|
|
97
|
-
if (this.loading) {
|
|
98
|
-
this.disabled = this.loading;
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
this.disabled = disabled;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
//#endregion WATCHERS
|
|
105
|
-
/****************************************************************************/
|
|
106
|
-
//#region EVENTS
|
|
107
|
-
handleKeyDown(event) {
|
|
108
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
109
|
-
event.preventDefault();
|
|
110
|
-
this.el.click();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
handleTouchStart(event) {
|
|
114
|
-
if (event.touches.length > 1)
|
|
115
|
-
return;
|
|
116
|
-
event.preventDefault();
|
|
117
|
-
this.el.click();
|
|
118
|
-
}
|
|
119
|
-
//#endregion EVENTS
|
|
120
|
-
/****************************************************************************/
|
|
121
|
-
//#region LIFECYCLE
|
|
122
|
-
componentWillLoad() {
|
|
123
|
-
if (this.loading) {
|
|
124
|
-
this.disabled = this.loading;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
//#endregion LIFECYCLE
|
|
128
|
-
/****************************************************************************/
|
|
129
|
-
//#region RENDER
|
|
130
|
-
render() {
|
|
131
|
-
return (index.h(index.Host, { key: '2e0011f5ebb23512aa89756ae7fd5ad81586f8b1', role: "button", type: this.type, tabindex: this.disableTabindex ? -1 : 0, disabled: this.disabled ? true : undefined, class: clsxChV9xqsO.clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && index.h("nv-loader", { key: '435692a00ed0af3548c2ac875e573af00daf5d62', size: this.size }), !this.loading && index.h("nv-icon", { key: '00b08fbd43724ad7ce54c96cd052ba637e111ece', name: this.name, size: this.size }), index.h("slot", { key: 'bb61e7db6115c9017007f15320dd5b2f6ccd9671' })));
|
|
132
|
-
}
|
|
133
|
-
static get formAssociated() { return true; }
|
|
134
|
-
get el() { return index.getElement(this); }
|
|
135
|
-
static get watchers() { return {
|
|
136
|
-
"loading": ["handleLoadingChange"],
|
|
137
|
-
"disabled": ["handleDisabledChange"]
|
|
138
|
-
}; }
|
|
139
|
-
};
|
|
140
|
-
NvIconbutton.style = nvIconbuttonCss;
|
|
141
|
-
|
|
142
|
-
const nvLoaderCss = "@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}nv-loader{display:inline-block;position:relative;aspect-ratio:1/1;border-radius:9999px;color:inherit}nv-loader.size-xs{width:var(--loader-size-xs);height:var(--loader-size-xs)}nv-loader.size-xs::before,nv-loader.size-xs::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-xs::before{content:\" \";border:calc(var(--loader-size-xs) / 10) solid;opacity:0.3}nv-loader.size-xs::after{content:\" \";border-top:calc(var(--loader-size-xs) / 10) solid transparent;border-left:calc(var(--loader-size-xs) / 10) solid transparent;border-right:calc(var(--loader-size-xs) / 10) solid transparent;border-bottom:calc(var(--loader-size-xs) / 10) solid;animation:rotation 1s linear infinite}nv-loader.size-sm{width:var(--loader-size-sm);height:var(--loader-size-sm)}nv-loader.size-sm::before,nv-loader.size-sm::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-sm::before{content:\" \";border:calc(var(--loader-size-sm) / 10) solid;opacity:0.3}nv-loader.size-sm::after{content:\" \";border-top:calc(var(--loader-size-sm) / 10) solid transparent;border-left:calc(var(--loader-size-sm) / 10) solid transparent;border-right:calc(var(--loader-size-sm) / 10) solid transparent;border-bottom:calc(var(--loader-size-sm) / 10) solid;animation:rotation 1s linear infinite}nv-loader.size-md{width:var(--loader-size-md);height:var(--loader-size-md)}nv-loader.size-md::before,nv-loader.size-md::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-md::before{content:\" \";border:calc(var(--loader-size-md) / 10) solid;opacity:0.3}nv-loader.size-md::after{content:\" \";border-top:calc(var(--loader-size-md) / 10) solid transparent;border-left:calc(var(--loader-size-md) / 10) solid transparent;border-right:calc(var(--loader-size-md) / 10) solid transparent;border-bottom:calc(var(--loader-size-md) / 10) solid;animation:rotation 1s linear infinite}nv-loader.size-lg{width:var(--loader-size-lg);height:var(--loader-size-lg)}nv-loader.size-lg::before,nv-loader.size-lg::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-lg::before{content:\" \";border:calc(var(--loader-size-lg) / 10) solid;opacity:0.3}nv-loader.size-lg::after{content:\" \";border-top:calc(var(--loader-size-lg) / 10) solid transparent;border-left:calc(var(--loader-size-lg) / 10) solid transparent;border-right:calc(var(--loader-size-lg) / 10) solid transparent;border-bottom:calc(var(--loader-size-lg) / 10) solid;animation:rotation 1s linear infinite}nv-loader.size-xl{width:var(--loader-size-xl);height:var(--loader-size-xl)}nv-loader.size-xl::before,nv-loader.size-xl::after{content:\" \";position:absolute;top:0;left:0;border-radius:inherit;width:100%;height:100%}nv-loader.size-xl::before{content:\" \";border:calc(var(--loader-size-xl) / 10) solid;opacity:0.3}nv-loader.size-xl::after{content:\" \";border-top:calc(var(--loader-size-xl) / 10) solid transparent;border-left:calc(var(--loader-size-xl) / 10) solid transparent;border-right:calc(var(--loader-size-xl) / 10) solid transparent;border-bottom:calc(var(--loader-size-xl) / 10) solid;animation:rotation 1s linear infinite}nv-loader.color-brand::before{border-color:var(--components-loader-brand-background);opacity:1}nv-loader.color-brand::after{border-bottom-color:var(--components-loader-brand-foreground)}nv-loader.color-white::before{border-color:var(--components-loader-white-background);opacity:1}nv-loader.color-white::after{border-bottom-color:var(--components-loader-white-foreground)}";
|
|
143
|
-
|
|
144
|
-
const NvLoader = class {
|
|
145
|
-
constructor(hostRef) {
|
|
146
|
-
index.registerInstance(this, hostRef);
|
|
147
|
-
/****************************************************************************/
|
|
148
|
-
//#region PROPERTIES
|
|
149
|
-
/**
|
|
150
|
-
* Choose the size of the loader to best fit your application’s needs, whether
|
|
151
|
-
* it’s a small spinner for subtle loading indicators or a large one for more
|
|
152
|
-
* prominent displays.
|
|
153
|
-
*/
|
|
154
|
-
this.size = 'md';
|
|
155
|
-
}
|
|
156
|
-
//#endregion PROPERTIES
|
|
157
|
-
/****************************************************************************/
|
|
158
|
-
//#region RENDER
|
|
159
|
-
/* <slot> empty to force rendering change */
|
|
160
|
-
render() {
|
|
161
|
-
return (index.h(index.Host, { key: '4347ec4ee393edb5e23a60e253bae73d0f9db583', class: clsxChV9xqsO.clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
NvLoader.style = nvLoaderCss;
|
|
165
|
-
|
|
166
|
-
exports.nv_iconbutton = NvIconbutton;
|
|
167
|
-
exports.nv_loader = NvLoader;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
require('@stencil/react-output-target/runtime');
|
|
5
|
-
require('react');
|
|
6
|
-
require('react-dom');
|
|
7
|
-
|
|
8
|
-
const 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)}";
|
|
9
|
-
|
|
10
|
-
const NvMenuitem = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.menuitemSelected = index.createEvent(this, "menuitemSelected", 7);
|
|
14
|
-
/**
|
|
15
|
-
* Disables the item, preventing user interaction.
|
|
16
|
-
*/
|
|
17
|
-
this.disabled = false;
|
|
18
|
-
/**
|
|
19
|
-
* If the menu item has a submenu, the a caret icon will be displayed.
|
|
20
|
-
*/
|
|
21
|
-
this.hasSubmenu = false;
|
|
22
|
-
}
|
|
23
|
-
/* eslint-enable nova/event-bubbling */
|
|
24
|
-
handleMenuItemSelect(event) {
|
|
25
|
-
// If the element is disabled, stop propagation
|
|
26
|
-
if (this.disabled) {
|
|
27
|
-
event.stopPropagation();
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
this.menuitemSelected.emit({
|
|
31
|
-
id: this.el.id,
|
|
32
|
-
name: this.name,
|
|
33
|
-
hasSubmenu: this.hasSubmenu,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
handleClick(event) {
|
|
37
|
-
this.handleMenuItemSelect(event);
|
|
38
|
-
}
|
|
39
|
-
handleKeyDown(event) {
|
|
40
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
41
|
-
const activeElement = document.activeElement;
|
|
42
|
-
if (activeElement &&
|
|
43
|
-
activeElement.tagName === 'NV-MENUITEM' &&
|
|
44
|
-
!activeElement.hasAttribute('has-submenu')) {
|
|
45
|
-
event.preventDefault();
|
|
46
|
-
this.el.click();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
//#endregion EVENTS
|
|
51
|
-
/****************************************************************************/
|
|
52
|
-
//#region RENDER
|
|
53
|
-
render() {
|
|
54
|
-
return (index.h(index.Host, { key: 'e21f532b90f018810befe6a03ef4cb75fe05aea2', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && index.h("nv-icon", { key: 'a63bdcae06b1311440ec95ecf002a8b9a130aea8', name: this.icon }), index.h("slot", { key: 'f25c0104369b8d70ce35d4bf74cf92c1bcdf66c6' }), this.label && index.h("span", { key: '5ab5691b53857876c8e13e91f975b41e255999da', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && index.h("kbd", { key: 'c93777342da74e2cba4dfbbdf6657814b3996f41' }, this.shortcut), this.hasSubmenu && index.h("nv-icon", { key: '87a58745651c54efb1c96841846363e377ee6fca', name: "chevron-right" })));
|
|
55
|
-
}
|
|
56
|
-
get el() { return index.getElement(this); }
|
|
57
|
-
};
|
|
58
|
-
NvMenuitem.style = nvMenuitemCss;
|
|
59
|
-
|
|
60
|
-
exports.nv_menuitem = NvMenuitem;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
require('@stencil/react-output-target/runtime');
|
|
5
|
-
require('react');
|
|
6
|
-
require('react-dom');
|
|
7
|
-
|
|
8
|
-
const nvNotificationBulletCss = "nv-notification-bullet{display:inline-flex;align-items:center;justify-content:center;min-width:var(--sidebar-notification-bullet-size);max-width:var(--sidebar-notification-bullet-size);height:var(--sidebar-notification-bullet-size);padding:0 var(--spacing-1);border-radius:var(--radius-rounded-full);font-size:var(--sidebar-notification-bullet-font-size);font-weight:var(--sidebar-notification-bullet-font-weight);white-space:nowrap;flex-shrink:0;position:relative;}nv-notification-bullet.nv-notification-bullet-brand .nv-notification-bullet{display:inline-flex;align-items:center;justify-content:center;min-width:var(--sidebar-notification-bullet-size);max-width:var(--sidebar-notification-bullet-size);height:var(--sidebar-notification-bullet-size);padding:0 var(--spacing-1);border-radius:var(--radius-rounded-full);font-size:var(--sidebar-notification-bullet-font-size);font-weight:var(--sidebar-notification-bullet-font-weight);white-space:nowrap;flex-shrink:0}nv-notification-bullet.nv-notification-bullet-brand .nv-notification-bullet.nv-notification-bullet-high{background-color:var(--color-brand-500);color:var(--color-feedback-neutral-high-contrast-title)}nv-notification-bullet.nv-notification-bullet-brand .nv-notification-bullet.nv-notification-bullet-low{background-color:var(--color-brand-50);color:var(--color-brand-600);border:1px solid var(--color-brand-600)}nv-notification-bullet{}nv-notification-bullet.nv-notification-bullet-neutral{display:inline-flex;align-items:center;justify-content:center;min-width:var(--sidebar-notification-bullet-size);max-width:var(--sidebar-notification-bullet-size);height:var(--sidebar-notification-bullet-size);padding:0 var(--spacing-1);border-radius:var(--radius-rounded-full);font-size:var(--sidebar-notification-bullet-font-size);font-weight:var(--sidebar-notification-bullet-font-weight);white-space:nowrap;flex-shrink:0}nv-notification-bullet.nv-notification-bullet-neutral .nv-notification-bullet.nv-notification-bullet-high{background-color:var(--color-feedback-neutral-high-contrast-background);color:var(--color-feedback-neutral-high-contrast-title)}nv-notification-bullet.nv-notification-bullet-neutral .nv-notification-bullet.nv-notification-bullet-low{background-color:var(--color-feedback-neutral-low-background);color:var(--color-feedback-neutral-low-text);border-radius:var(--radius-rounded-full)}nv-notification-bullet{}nv-notification-bullet.nv-notification-bullet-with-cross-border::before{content:\"\";position:absolute;top:55%;left:45%;transform:translate(-50%, -50%);width:calc(var(--sidebar-notification-bullet-size) + 1.5px);height:calc(var(--sidebar-notification-bullet-size) * 1.5);border-radius:var(--radius-rounded-full);background-color:var(--nv-component-background, var(--nv-sidebarnavitem-background, var(--color-interaction-container-neutral-background)));z-index:-1;pointer-events:none}nv-notification-bullet{}nv-sidebar[collapsed] nv-notification-bullet.nv-notification-bullet-with-cross-border::before{width:calc(var(--sidebar-notification-bullet-size-reduced) * 1.5);height:calc(var(--sidebar-notification-bullet-size-reduced) * 1.5)}nv-notification-bullet{}nv-notification-bullet .nv-notification-bullet.nv-notification-bullet-reduced,nv-sidebar[collapsed] nv-notification-bullet .nv-notification-bullet{width:var(--sidebar-notification-bullet-size-reduced);height:var(--sidebar-notification-bullet-size-reduced);min-width:var(--sidebar-notification-bullet-size-reduced);max-width:var(--sidebar-notification-bullet-size-reduced);min-height:var(--sidebar-notification-bullet-size-reduced);max-height:var(--sidebar-notification-bullet-size-reduced);padding:0;font-size:0}";
|
|
9
|
-
|
|
10
|
-
const NvNotificationBullet = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
/**
|
|
14
|
-
* Determines the size of the notification bullet.
|
|
15
|
-
* - default: Normal size with text visible
|
|
16
|
-
* - reduced: Smaller size, text hidden (just a dot)
|
|
17
|
-
*/
|
|
18
|
-
this.size = 'default';
|
|
19
|
-
/**
|
|
20
|
-
* Allows to add a border to add contrast on background.
|
|
21
|
-
*/
|
|
22
|
-
this.contrastingBorder = false;
|
|
23
|
-
}
|
|
24
|
-
//#endregion PROPERTIES
|
|
25
|
-
/****************************************************************************/
|
|
26
|
-
//#region METHODS
|
|
27
|
-
getIntention() {
|
|
28
|
-
if (this.intention) {
|
|
29
|
-
return this.intention;
|
|
30
|
-
}
|
|
31
|
-
// Inherit from parent nv-sidebar
|
|
32
|
-
const sidebar = this.el.closest('nv-sidebar');
|
|
33
|
-
if (sidebar) {
|
|
34
|
-
const sidebarIntention = sidebar.getAttribute('notification-intention');
|
|
35
|
-
if (sidebarIntention === 'neutral' || sidebarIntention === 'brand') {
|
|
36
|
-
return sidebarIntention;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return 'brand'; // Default fallback
|
|
40
|
-
}
|
|
41
|
-
getEmphasis() {
|
|
42
|
-
if (this.emphasis) {
|
|
43
|
-
return this.emphasis;
|
|
44
|
-
}
|
|
45
|
-
// Inherit from parent nv-sidebar
|
|
46
|
-
const sidebar = this.el.closest('nv-sidebar');
|
|
47
|
-
if (sidebar) {
|
|
48
|
-
const sidebarEmphasis = sidebar.getAttribute('notification-emphasis');
|
|
49
|
-
if (sidebarEmphasis === 'high' || sidebarEmphasis === 'low') {
|
|
50
|
-
return sidebarEmphasis;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return 'high'; // Default fallback
|
|
54
|
-
}
|
|
55
|
-
//#region RENDER
|
|
56
|
-
render() {
|
|
57
|
-
const displayCount = this.count ?? 0;
|
|
58
|
-
const displayText = displayCount > 99 ? '99+' : String(displayCount);
|
|
59
|
-
if (displayCount <= 0) {
|
|
60
|
-
return index.h(index.Host, { style: { display: 'none' } });
|
|
61
|
-
}
|
|
62
|
-
const sizeClass = this.size === 'reduced' ? 'nv-notification-bullet-reduced' : '';
|
|
63
|
-
const intention = this.getIntention();
|
|
64
|
-
const emphasis = this.getEmphasis();
|
|
65
|
-
const intentionClass = `nv-notification-bullet-${intention}`;
|
|
66
|
-
const emphasisClass = `nv-notification-bullet-${emphasis}`;
|
|
67
|
-
const borderClass = this.contrastingBorder
|
|
68
|
-
? 'nv-notification-bullet-with-border'
|
|
69
|
-
: '';
|
|
70
|
-
return (index.h(index.Host, { class: `${intentionClass} ${borderClass ? 'nv-notification-bullet-with-cross-border' : ''}` }, index.h("span", { class: `nv-notification-bullet ${emphasisClass} ${sizeClass} ${borderClass}`, "aria-label": `${displayCount} notifications` }, displayText)));
|
|
71
|
-
}
|
|
72
|
-
get el() { return index.getElement(this); }
|
|
73
|
-
};
|
|
74
|
-
NvNotificationBullet.style = nvNotificationBulletCss;
|
|
75
|
-
|
|
76
|
-
exports.nv_notification_bullet = NvNotificationBullet;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
require('@stencil/react-output-target/runtime');
|
|
5
|
-
require('react');
|
|
6
|
-
require('react-dom');
|
|
7
|
-
|
|
8
|
-
const 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}";
|
|
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: '5dee0dc22cb8917d8134e2f256996118e3e30b42', class: `position-${this.position}` }, index.h("slot", { key: '14664d70fb1840877d80eda1b3c7804457ffa67f' })));
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
NvNotificationContainer.style = nvNotificationcontainerCss;
|
|
40
|
-
|
|
41
|
-
exports.nv_notificationcontainer = NvNotificationContainer;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
require('@stencil/react-output-target/runtime');
|
|
5
|
-
require('react');
|
|
6
|
-
require('react-dom');
|
|
7
|
-
|
|
8
|
-
const 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)}";
|
|
9
|
-
|
|
10
|
-
const NvRow = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
}
|
|
14
|
-
/****************************************************************************/
|
|
15
|
-
//#region RENDER
|
|
16
|
-
render() {
|
|
17
|
-
return (index.h(index.Host, { key: 'fda91377821b426a6cbc6ade6f253144a388fb62' }, index.h("slot", { key: '5d7cc9aa4d4ad0b251aa5c028adfddade4e4d1c4' })));
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
NvRow.style = nvRowCss;
|
|
21
|
-
|
|
22
|
-
exports.nv_row = NvRow;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
require('@stencil/react-output-target/runtime');
|
|
5
|
-
require('react');
|
|
6
|
-
require('react-dom');
|
|
7
|
-
|
|
8
|
-
const nvSidebarcontentCss = "nv-sidebarcontent{display:flex;flex-direction:column;flex:1;overflow-y:auto;overflow-x:hidden}";
|
|
9
|
-
|
|
10
|
-
const NvSidebarcontent = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
}
|
|
14
|
-
/****************************************************************************/
|
|
15
|
-
//#region RENDER
|
|
16
|
-
render() {
|
|
17
|
-
return (index.h(index.Host, { key: 'c72a3de4460c4de37c2008ec4d777771d8771d32', role: "list" }, index.h("slot", { key: '8d08c073aebf079dbb9062bb183370e4dc4d9fe8' })));
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
NvSidebarcontent.style = nvSidebarcontentCss;
|
|
21
|
-
|
|
22
|
-
exports.nv_sidebarcontent = NvSidebarcontent;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
require('@stencil/react-output-target/runtime');
|
|
5
|
-
require('react');
|
|
6
|
-
require('react-dom');
|
|
7
|
-
|
|
8
|
-
const nvSidebargroupCss = "nv-sidebargroup{display:flex;flex-direction:column;gap:var(--sidebar-group-gap-y)}nv-sidebargroup .nv-sidebargroup-label{display:block;font-size:var(--font-size-sm);line-height:var(--line-height-sm);font-weight:var(--font-weight-medium-emphasis);color:var(--color-content-lower-text);letter-spacing:0;padding:var(--sidebar-title-padding-y) var(--sidebar-title-padding-x)}nv-sidebar[collapsed] nv-sidebargroup .nv-sidebargroup-label{display:none}";
|
|
9
|
-
|
|
10
|
-
const NvSidebargroup = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
}
|
|
14
|
-
//#endregion PROPERTIES
|
|
15
|
-
/****************************************************************************/
|
|
16
|
-
//#region RENDER
|
|
17
|
-
render() {
|
|
18
|
-
return (index.h(index.Host, { key: '64b17f621fef826a4105dfa39fbc57013bad0abc', role: "group", "aria-label": this.label }, this.label && index.h("div", { key: '48e36725296ecc87da7d15606977fbe616dd4aa3', class: "nv-sidebargroup-label" }, this.label), index.h("slot", { key: '61aaf8541e9372220df24dcf9cf0b5b43e22e19b' })));
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
NvSidebargroup.style = nvSidebargroupCss;
|
|
22
|
-
|
|
23
|
-
exports.nv_sidebargroup = NvSidebargroup;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
require('@stencil/react-output-target/runtime');
|
|
5
|
-
require('react');
|
|
6
|
-
require('react-dom');
|
|
7
|
-
|
|
8
|
-
const nvSidebarnavsubitemCss = "nv-sidebarnavsubitem{display:flex;align-items:center;gap:var(--spacing-2);padding:var(--sidebar-item-padding-y) var(--sidebar-item-padding-x) var(--sidebar-item-padding-y) calc(var(--sidebar-sub-item-padding-left) + var(--sidebar-item-padding-x));cursor:pointer;transition:all 0.15s ease;position:relative;min-height:var(--spacing-10);background-color:var(--color-interaction-container-neutral-background);border-radius:var(--sidebar-item-radius);--nv-component-background:var(--color-interaction-container-neutral-background)}nv-sidebarnavsubitem:hover{background-color:var(--color-interaction-container-neutral-background-hover);--nv-component-background:var(--color-interaction-container-neutral-background-hover)}nv-sidebarnavsubitem:focus,nv-sidebarnavsubitem:focus-within{outline:none}nv-sidebarnavsubitem:focus-visible,nv-sidebarnavsubitem:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-sidebarnavsubitem .nv-sidebarnavsubitem-indicator{display:none}nv-sidebarnavsubitem .nv-sidebarnavsubitem-content{flex:1;display:flex;align-items:center;gap:var(--spacing-2);font-size:var(--font-size-sm);color:var(--color-content-medium-text);text-decoration:none;font-weight:var(--font-weight-medium-emphasis)}nv-sidebarnavsubitem .nv-sidebarnavsubitem-content a{color:inherit !important;text-decoration:none !important;font-weight:var(--font-weight-medium-emphasis) !important;flex:1}nv-sidebarnavsubitem:hover .nv-sidebarnavsubitem-content{color:var(--color-content-medium-text)}nv-sidebarnavsubitem[active]{background-color:var(--color-interaction-container-neutral-background-active);--nv-component-background:var(--color-interaction-container-neutral-background-active)}nv-sidebarnavsubitem[active] .nv-sidebarnavsubitem-content{color:var(--color-interaction-container-neutral-text-active);font-weight:var(--font-weight-high-emphasis)}nv-sidebarnavsubitem .nv-sidebarnavsubitem-trailing{display:flex;align-items:center}nv-sidebar[collapsed] nv-sidebarnavsubitem .nv-sidebarnavsubitem-content{max-width:0;opacity:0;margin:0;overflow:hidden;transition:opacity 0.2s ease, max-width 0.2s ease}nv-sidebar[collapsed] nv-sidebarnavsubitem .nv-sidebarnavsubitem-indicator{margin-right:0;width:var(--spacing-6);justify-content:center}nv-sidebar[collapsed] nv-sidebarnavsubitem .nv-sidebarnavsubitem-trailing{display:none}";
|
|
9
|
-
|
|
10
|
-
const NvSidebarnavsubitem = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
/****************************************************************************/
|
|
14
|
-
//#region PROPERTIES
|
|
15
|
-
/**
|
|
16
|
-
* Whether this sub-item represents the active/current page.
|
|
17
|
-
*/
|
|
18
|
-
this.active = false;
|
|
19
|
-
}
|
|
20
|
-
//#endregion PROPERTIES
|
|
21
|
-
/****************************************************************************/
|
|
22
|
-
//#region METHODS
|
|
23
|
-
// Note: We no longer use stopPropagation() here because it prevents React Router
|
|
24
|
-
// (and other SPA routers) from receiving the click event due to event delegation.
|
|
25
|
-
// Instead, the parent nv-sidebarnavitem checks if clicks originate from subitems.
|
|
26
|
-
//#endregion METHODS
|
|
27
|
-
/****************************************************************************/
|
|
28
|
-
//#region RENDER
|
|
29
|
-
render() {
|
|
30
|
-
return (index.h(index.Host, { key: '7e9b3aaf42bc7ca19cc3ceeed4afc74058ea48f2', role: "listitem", "aria-current": this.active ? 'page' : undefined }, index.h("div", { key: 'd865d9cff0e9632dd0ca5f97334e09ae3ad6ddf8', class: "nv-sidebarnavsubitem-indicator" }), index.h("div", { key: '28bddb32eea17dbc3b33f2e1c3ef6744e6646cbe', class: "nv-sidebarnavsubitem-content" }, index.h("slot", { key: '0f58fbe30b054e42ac3f431cb8cafe0374994856' })), index.h("div", { key: '3b1b74c67b1e338e158a67dab828941f40f3a147', class: "nv-sidebarnavsubitem-trailing" }, index.h("slot", { key: '98ad3fde4a5295f6835ba6b15ac832fc0426b75b', name: "trailing" }))));
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
NvSidebarnavsubitem.style = nvSidebarnavsubitemCss;
|
|
34
|
-
|
|
35
|
-
exports.nv_sidebarnavsubitem = NvSidebarnavsubitem;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
|
|
5
|
-
require('@stencil/react-output-target/runtime');
|
|
6
|
-
require('react');
|
|
7
|
-
require('react-dom');
|
|
8
|
-
|
|
9
|
-
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%}";
|
|
10
|
-
|
|
11
|
-
const NvStack = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
/****************************************************************************/
|
|
15
|
-
//#region PROPERTIES
|
|
16
|
-
/**
|
|
17
|
-
* Gutter refers to the space that exists between children components inside
|
|
18
|
-
* the stack container.
|
|
19
|
-
*/
|
|
20
|
-
this.gutter = 2;
|
|
21
|
-
}
|
|
22
|
-
//#endregion PROPERTIES
|
|
23
|
-
/****************************************************************************/
|
|
24
|
-
//#region RENDER
|
|
25
|
-
render() {
|
|
26
|
-
return (index.h(index.Host, { key: '7b44b30e42b8df1c456f70b1f3be986e2fce1617', class: clsxChV9xqsO.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: 'd38b6f0c043959ed97b3e90d21309ab832713b4e' })));
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
NvStack.style = nvStackCss;
|
|
30
|
-
|
|
31
|
-
exports.nv_stack = NvStack;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-kU2nW5aN.js');
|
|
4
|
-
var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
|
|
5
|
-
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
6
|
-
require('@stencil/react-output-target/runtime');
|
|
7
|
-
require('react');
|
|
8
|
-
require('react-dom');
|
|
9
|
-
|
|
10
|
-
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:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);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:var(--font-family-default), var(--font-family-fallback), 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}";
|
|
11
|
-
|
|
12
|
-
const NvToggle = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this.checkedChanged = index.createEvent(this, "checkedChanged", 3);
|
|
16
|
-
/****************************************************************************/
|
|
17
|
-
//#region PROPERTIES
|
|
18
|
-
/**
|
|
19
|
-
* Sets the ID for the radio button’s input element and the for attribute of
|
|
20
|
-
* the associated label. If no ID is provided, a random one will be
|
|
21
|
-
* automatically generated to ensure unique identification, facilitating
|
|
22
|
-
* proper label association and accessibility.
|
|
23
|
-
*/
|
|
24
|
-
this.inputId = v4BdYh22OP.v4();
|
|
25
|
-
/**
|
|
26
|
-
* Hides the label visually while still keeping it available for screen
|
|
27
|
-
* readers.
|
|
28
|
-
*/
|
|
29
|
-
this.hideLabel = false;
|
|
30
|
-
/** Indicates whether the toggle is checked or not. */
|
|
31
|
-
this.checked = false;
|
|
32
|
-
/** Disables the toggle, preventing user interaction. */
|
|
33
|
-
this.disabled = false;
|
|
34
|
-
/**
|
|
35
|
-
* Sets the toggle to read-only, preventing user changes but still allowing
|
|
36
|
-
* focus and selection of text.
|
|
37
|
-
*/
|
|
38
|
-
this.readonly = false;
|
|
39
|
-
}
|
|
40
|
-
//#endregion EVENTS
|
|
41
|
-
/****************************************************************************/
|
|
42
|
-
//#region WATCHERS
|
|
43
|
-
/**
|
|
44
|
-
* Watches for changes to the checked state and emits the new value.
|
|
45
|
-
* @param {boolean} checked - The new value of the checked state.
|
|
46
|
-
*/
|
|
47
|
-
onCheckedChanged(checked) {
|
|
48
|
-
this.checkedChanged.emit(checked);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Listens for the change event on the toggle input element and updates the checked state.
|
|
52
|
-
* the checked state of the host elements.
|
|
53
|
-
* @param {Event} event - The change event.
|
|
54
|
-
*/
|
|
55
|
-
handleChange(event) {
|
|
56
|
-
const target = event.target;
|
|
57
|
-
if (target.type === 'checkbox' && target.id === this.inputId) {
|
|
58
|
-
if (this.readonly || this.disabled) {
|
|
59
|
-
event.preventDefault();
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
this.checked = target.checked;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
//#endregion WATCHERS
|
|
66
|
-
/****************************************************************************/
|
|
67
|
-
//#region RENDER
|
|
68
|
-
render() {
|
|
69
|
-
return (index.h(index.Host, { key: 'bf104d1513a3cf741c6b42ab48554c40d19263d1', class: clsxChV9xqsO.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '8c7e9684887e0d454a69101fb83f290d26236841', class: "input-container" }, index.h("input", { key: '5771d8999e03247600a2b98d0eae985ff0345e28', 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: '8c95821037235c2eab053bce5bb7a0dc15173ea4', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '36c1d110f4c9151e1d05c665546f01f323999b15', htmlFor: this.inputId, class: clsxChV9xqsO.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '4fe3f5fab8c1a20480c9eba085221afc36caae73', name: "label" }, this.label))), (this.description ||
|
|
70
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '63dc983d3b09327f57bd62feb7a25865f90390a7', class: "description" }, index.h("slot", { key: 'e85b616e8bf1301e53f62a2c4e1ea87675b1dcff', name: "description" }, this.description))))));
|
|
71
|
-
}
|
|
72
|
-
static get formAssociated() { return true; }
|
|
73
|
-
get el() { return index.getElement(this); }
|
|
74
|
-
static get watchers() { return {
|
|
75
|
-
"checked": ["onCheckedChanged"]
|
|
76
|
-
}; }
|
|
77
|
-
};
|
|
78
|
-
NvToggle.style = nvToggleCss;
|
|
79
|
-
|
|
80
|
-
exports.nv_toggle = NvToggle;
|