@nova-design-system/nova-react 3.21.0 → 3.21.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated/components.server.js +92 -0
- package/dist/cjs/grow.animation-24ad5cf8-LUp_ITEx.js +111 -0
- package/dist/cjs/{index-yxDlFA78.js → index-CEKdYnmK.js} +1449 -407
- package/dist/cjs/index.js +11 -1
- package/dist/cjs/{nv-accordion-item.entry-5DF2ffDE.js → nv-accordion-item.entry-zvp8yDql.js} +1 -1
- package/dist/cjs/{nv-accordion.entry-CPB1HBT1.js → nv-accordion.entry-D6gckOF4.js} +1 -1
- package/dist/cjs/{nv-alert.entry-jPxt1obA.js → nv-alert.entry-Df8-nQ-R.js} +1 -1
- package/dist/cjs/{nv-avatar.entry-zmnREEN-.js → nv-avatar.entry-ZOnVWP9L.js} +1 -1
- package/dist/cjs/{nv-badge_2.entry-DtkQx_M9.js → nv-badge_2.entry-DgiVv_Yf.js} +2 -2
- package/dist/cjs/{nv-breadcrumb.entry-DHAe5FxQ.js → nv-breadcrumb.entry-IqtE1JL0.js} +1 -1
- package/dist/cjs/{nv-breadcrumbs.entry-C7XepUqF.js → nv-breadcrumbs.entry-Be6dz7zI.js} +1 -1
- package/dist/cjs/{nv-button.entry-Dg1knj3Y.js → nv-button.entry-CmswF3Si.js} +1 -1
- package/dist/cjs/{nv-buttongroup.entry-Dlim9p8N.js → nv-buttongroup.entry-Cfe6rFSs.js} +1 -1
- package/dist/cjs/{nv-calendar.entry-rL5_GdQg.js → nv-calendar.entry-q83sS_dN.js} +1 -1
- package/dist/cjs/{nv-col.entry-CnbFx7h1.js → nv-col.entry-Cu-Qi1bi.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-CjUfR4ha.js → nv-datagrid.entry-Cx7SvD5S.js} +1 -1
- package/dist/cjs/{nv-datagridcolumn.entry-BiuYIp4q.js → nv-datagridcolumn.entry-B_uXKFLg.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-fDywe5i2.js → nv-dialog.entry-J6Xwi6z1.js} +54 -20
- package/dist/cjs/{nv-dialogfooter_2.entry-CckfZ_QW.js → nv-dialogfooter_2.entry-DOlhqDTh.js} +3 -3
- package/dist/cjs/{nv-fieldcheckbox.entry-WmfLxGad.js → nv-fieldcheckbox.entry-C23dGGX7.js} +5 -5
- package/dist/cjs/{nv-fielddate.entry-GLGb7tzu.js → nv-fielddate.entry-xWi3GpLl.js} +15 -18
- package/dist/cjs/{nv-fielddaterange.entry-C8gXNY2P.js → nv-fielddaterange.entry-BwFtpw9X.js} +8 -10
- package/dist/cjs/{nv-fielddropdown.entry-BX1V8Uef.js → nv-fielddropdown.entry-mnl7mSaK.js} +15 -6
- package/dist/cjs/{nv-fielddropdownitem.entry-BMVFbA1v.js → nv-fielddropdownitem.entry-DjyFlVXw.js} +3 -3
- package/dist/cjs/{nv-fieldmultiselect.entry-BuV-qWbu.js → nv-fieldmultiselect.entry-BtLTG7nM.js} +2 -2
- package/dist/cjs/{nv-fieldnumber.entry-qM1ct5SM.js → nv-fieldnumber.entry-C00Hg70B.js} +4 -4
- package/dist/cjs/{nv-fieldpassword.entry-BnGWErFQ.js → nv-fieldpassword.entry-BLg8tCN0.js} +4 -4
- package/dist/cjs/{nv-fieldradio.entry-EliQYldW.js → nv-fieldradio.entry-2hb1Ur40.js} +4 -4
- package/dist/cjs/{nv-fieldselect.entry-BfPVPmaZ.js → nv-fieldselect.entry-D-eYQpAv.js} +6 -6
- package/dist/cjs/{nv-fieldslider.entry-DBPpL94x.js → nv-fieldslider.entry-BGle1RZR.js} +4 -4
- package/dist/cjs/{nv-fieldtext.entry-BnabKYgq.js → nv-fieldtext.entry-Djg8cqOa.js} +4 -4
- package/dist/cjs/{nv-fieldtextarea.entry-HaELAnJb.js → nv-fieldtextarea.entry-Z32-s901.js} +4 -4
- package/dist/cjs/{nv-fieldtime.entry-CWQM7fza.js → nv-fieldtime.entry-CDFGdfFL.js} +4 -4
- package/dist/cjs/{nv-icon.entry-B5cWNyvf.js → nv-icon.entry-BDq7DKRt.js} +2 -2
- package/dist/cjs/{nv-iconbutton_2.entry-CP1o9IVZ.js → nv-iconbutton_2.entry-DdgEkFLK.js} +3 -3
- package/dist/cjs/{nv-menu.entry-wMwI_sZ3.js → nv-menu.entry-iob0Kve8.js} +2 -2
- package/dist/cjs/{nv-menuitem.entry-C53TrB0_.js → nv-menuitem.entry-C989Ui60.js} +2 -2
- package/dist/cjs/nv-notification-bullet.entry-J8OkAZtU.js +77 -0
- package/dist/cjs/{nv-notification.entry-BPyEusqt.js → nv-notification.entry-BxvJMKxH.js} +2 -2
- package/dist/cjs/{nv-notificationcontainer.entry-MRIJURIS.js → nv-notificationcontainer.entry-CxGCIb96.js} +2 -2
- package/dist/cjs/{nv-popover.entry-fj50OLMu.js → nv-popover.entry-1KsO_KQm.js} +14 -98
- package/dist/cjs/{nv-row.entry-T0OlcSij.js → nv-row.entry-PBLq_BzJ.js} +2 -2
- package/dist/cjs/nv-sidebar.entry-CjLbvLqw.js +177 -0
- package/dist/cjs/nv-sidebarcontent.entry-Cv76IH4W.js +22 -0
- package/dist/cjs/nv-sidebardivider.entry-DYPJ_k73.js +22 -0
- package/dist/cjs/nv-sidebarfooter.entry-mGcMBRmv.js +22 -0
- package/dist/cjs/nv-sidebargroup.entry-DtwFliHZ.js +23 -0
- package/dist/cjs/nv-sidebarheader.entry-BdOYIXCA.js +22 -0
- package/dist/cjs/nv-sidebarlogo.entry-Da0kGsfw.js +32 -0
- package/dist/cjs/nv-sidebarnavitem.entry-D5xLfpwn.js +297 -0
- package/dist/cjs/nv-sidebarnavsubitem.entry-CkeJfHH4.js +35 -0
- package/dist/cjs/{nv-split.entry-DlI7I6Tb.js → nv-split.entry-y66NBf88.js} +2 -2
- package/dist/cjs/{nv-stack.entry-991A3rOk.js → nv-stack.entry-CXjpkpbW.js} +2 -2
- package/dist/cjs/{nv-table.entry-ClSU3-cR.js → nv-table.entry-quaVnLru.js} +2 -2
- package/dist/cjs/{nv-tableheader.entry-DzvbPDBN.js → nv-tableheader.entry-DTBE2XQO.js} +2 -2
- package/dist/cjs/{nv-toggle.entry-Dq5hAoVB.js → nv-toggle.entry-CxUwF0pb.js} +3 -3
- package/dist/cjs/{nv-togglebutton.entry-DI8HQ5Ou.js → nv-togglebutton.entry-w-WEAmE6.js} +2 -2
- package/dist/cjs/{nv-togglebuttongroup.entry-DzGOSBF7.js → nv-togglebuttongroup.entry-UbrE8y7a.js} +2 -2
- package/dist/cjs/{nv-tooltip.entry-CF0-gdZL.js → nv-tooltip.entry-Dq2bkV33.js} +2 -2
- package/dist/generated/components.js +80 -0
- package/dist/generated/components.server.js +82 -0
- package/dist/types/generated/components.d.ts +32 -0
- package/dist/types/generated/components.server.d.ts +32 -0
- package/package.json +1 -1
- package/dist/cjs/events.utils-fe1d907f-01N__3wY.js +0 -23
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-dom');
|
|
6
|
+
|
|
7
|
+
const nvNotificationBulletCss = "nv-notification-bullet{display:inline-flex;align-items:center;position:relative;}nv-notification-bullet .nv-notification-bullet{display:inline-flex;align-items:center;justify-content:center;min-width:var(--sidebar-primary-notification-bullet-size);max-width:var(--sidebar-primary-notification-bullet-size);min-height:var(--sidebar-primary-notification-bullet-size);max-height:var(--sidebar-primary-notification-bullet-size);padding:0 var(--spacing-1);border-radius:var(--radius-rounded-full);font-size:var(--sidebar-primary-notification-bullet-font-size);font-weight:var(--sidebar-primary-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-error-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-neutral .nv-notification-bullet.nv-notification-bullet-high{background-color:var(--color-interaction-container-neutral-background);color:var(--color-interaction-container-neutral-text)}nv-notification-bullet.nv-notification-bullet-neutral .nv-notification-bullet.nv-notification-bullet-low{background-color:var(--color-interaction-container-neutral-background);color:var(--color-interaction-container-neutral-text)}nv-notification-bullet.nv-notification-bullet-with-cross-border::before{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:calc(var(--sidebar-primary-notification-bullet-size) * 1.5);height:calc(var(--sidebar-primary-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-sidebar[collapsed] nv-notification-bullet.nv-notification-bullet-with-cross-border::before{width:calc(var(--sidebar-primary-notification-bullet-size-reduced) * 1.5);height:calc(var(--sidebar-primary-notification-bullet-size-reduced) * 1.5)}nv-notification-bullet .nv-notification-bullet.nv-notification-bullet-with-border{}nv-notification-bullet .nv-notification-bullet.nv-notification-bullet-reduced,nv-sidebar[collapsed] nv-notification-bullet .nv-notification-bullet{min-width:var(--sidebar-primary-notification-bullet-size-reduced);max-width:var(--sidebar-primary-notification-bullet-size-reduced);min-height:var(--sidebar-primary-notification-bullet-size-reduced);max-height:var(--sidebar-primary-notification-bullet-size-reduced);padding:0;font-size:0;}nv-notification-bullet .nv-notification-bullet.nv-notification-bullet-reduced.nv-notification-bullet-with-border,nv-sidebar[collapsed] nv-notification-bullet .nv-notification-bullet.nv-notification-bullet-with-border{}";
|
|
8
|
+
const NvNotificationBulletStyle0 = nvNotificationBulletCss;
|
|
9
|
+
|
|
10
|
+
const NvNotificationBullet = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
/**
|
|
14
|
+
* Determines the size of the notification bullet.
|
|
15
|
+
* - default: Normal size with text visible
|
|
16
|
+
* - reduced: Smaller size, text hidden (just a dot)
|
|
17
|
+
*/
|
|
18
|
+
this.size = 'default';
|
|
19
|
+
/**
|
|
20
|
+
* Allows to add a border to add contrast on background.
|
|
21
|
+
*/
|
|
22
|
+
this.contrastingBorder = false;
|
|
23
|
+
}
|
|
24
|
+
//#endregion PROPERTIES
|
|
25
|
+
/****************************************************************************/
|
|
26
|
+
//#region METHODS
|
|
27
|
+
getIntention() {
|
|
28
|
+
if (this.intention) {
|
|
29
|
+
return this.intention;
|
|
30
|
+
}
|
|
31
|
+
// Inherit from parent nv-sidebar
|
|
32
|
+
const sidebar = this.el.closest('nv-sidebar');
|
|
33
|
+
if (sidebar) {
|
|
34
|
+
const sidebarIntention = sidebar.getAttribute('notification-intention');
|
|
35
|
+
if (sidebarIntention === 'neutral' || sidebarIntention === 'brand') {
|
|
36
|
+
return sidebarIntention;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return 'brand'; // Default fallback
|
|
40
|
+
}
|
|
41
|
+
getEmphasis() {
|
|
42
|
+
if (this.emphasis) {
|
|
43
|
+
return this.emphasis;
|
|
44
|
+
}
|
|
45
|
+
// Inherit from parent nv-sidebar
|
|
46
|
+
const sidebar = this.el.closest('nv-sidebar');
|
|
47
|
+
if (sidebar) {
|
|
48
|
+
const sidebarEmphasis = sidebar.getAttribute('notification-emphasis');
|
|
49
|
+
if (sidebarEmphasis === 'high' || sidebarEmphasis === 'low') {
|
|
50
|
+
return sidebarEmphasis;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return 'high'; // Default fallback
|
|
54
|
+
}
|
|
55
|
+
//#region RENDER
|
|
56
|
+
render() {
|
|
57
|
+
var _a;
|
|
58
|
+
const displayCount = (_a = this.count) !== null && _a !== void 0 ? _a : 0;
|
|
59
|
+
const displayText = displayCount > 99 ? '99+' : String(displayCount);
|
|
60
|
+
if (displayCount <= 0) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
const sizeClass = this.size === 'reduced' ? 'nv-notification-bullet-reduced' : '';
|
|
64
|
+
const intention = this.getIntention();
|
|
65
|
+
const emphasis = this.getEmphasis();
|
|
66
|
+
const intentionClass = `nv-notification-bullet-${intention}`;
|
|
67
|
+
const emphasisClass = `nv-notification-bullet-${emphasis}`;
|
|
68
|
+
const borderClass = this.contrastingBorder
|
|
69
|
+
? 'nv-notification-bullet-with-border'
|
|
70
|
+
: '';
|
|
71
|
+
return (index.h(index.Host, { class: `${intentionClass} ${borderClass ? 'nv-notification-bullet-with-cross-border' : ''}` }, index.h("span", { class: `nv-notification-bullet ${emphasisClass} ${sizeClass} ${borderClass}`, "aria-label": `${displayCount} notifications` }, displayText)));
|
|
72
|
+
}
|
|
73
|
+
get el() { return index.getElement(this); }
|
|
74
|
+
};
|
|
75
|
+
NvNotificationBullet.style = NvNotificationBulletStyle0;
|
|
76
|
+
|
|
77
|
+
exports.nv_notification_bullet = NvNotificationBullet;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
4
|
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
5
5
|
var collapse_animation6e0b08df = require('./collapse.animation-6e0b08df-AHWzNGm_.js');
|
|
6
6
|
var fade_animation9b939939 = require('./fade.animation-9b939939-DV--bM4S.js');
|
|
@@ -253,7 +253,7 @@ const NvNotification = class {
|
|
|
253
253
|
//#region RENDER
|
|
254
254
|
render() {
|
|
255
255
|
var _a, _b, _c;
|
|
256
|
-
return (index.h(index.Host, { key: '
|
|
256
|
+
return (index.h(index.Host, { key: '10e49ace93a23660383f9bbfb45460e610320db3', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": (_a = this.getHeadingId()) !== null && _a !== void 0 ? _a : null, "aria-describedby": (_b = this.getMessageId()) !== null && _b !== void 0 ? _b : null, tabindex: "-1" }, index.h("div", { key: '1cce0d5c025e404ad641eed3c0ff07045db12de6', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '64a9e8f95f51908ed82f5c832d5a9738420b574b', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: 'f4f5a742b862a52ebf7e2edc320e4521ad575a29', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'a85552d6f9d81f67643f4a8c428464ed7af2ff90', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: 'bb7fd2fd626191f53b59507c3d5003369aaa2d70', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: 'ce333015dc488c8371d2dc90b97461888a28174e', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: '32c9d8c3c5a85a60e3993a5963ed019f5900e6c3', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: '08d57bf3058e3efcaf6d95de5754c34405ddddfb', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: 'f930fb38f00addf2911fc5401d906ee7c52b0920', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: '983c60ec7fdf1ed85d2ef9d1a5c327d0aaf78013', "data-scope": "actions" }, index.h("slot", { key: '521bd4d20db65dc6025a9fb285599dbd7643bed0', name: "actions" })))))));
|
|
257
257
|
}
|
|
258
258
|
get el() { return index.getElement(this); }
|
|
259
259
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('react-dom');
|
|
6
6
|
|
|
@@ -33,7 +33,7 @@ const NvNotificationContainer = class {
|
|
|
33
33
|
/****************************************************************************/
|
|
34
34
|
//#region RENDER
|
|
35
35
|
render() {
|
|
36
|
-
return (index.h(index.Host, { key: '
|
|
36
|
+
return (index.h(index.Host, { key: 'bf0b7cd02e0d214516f352eb7016d6060d6959c5', class: `position-${this.position}` }, index.h("slot", { key: 'f042e3f11b4d2af4b47aadeba04a332c57889616' })));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
NvNotificationContainer.style = NvNotificationcontainerStyle0;
|
|
@@ -1,96 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
4
|
var fade_animation9b939939 = require('./fade.animation-9b939939-DV--bM4S.js');
|
|
5
|
-
var
|
|
6
|
-
|
|
5
|
+
var grow_animation24ad5cf8 = require('./grow.animation-24ad5cf8-LUp_ITEx.js');
|
|
6
|
+
require('./style-value-types.es-f5d10b79-D0QCM8OB.js');
|
|
7
7
|
require('react');
|
|
8
8
|
require('react-dom');
|
|
9
9
|
|
|
10
|
-
const useGrow = (node, { duration = 200, amount = 0.8, hasFade = true } = {}) => {
|
|
11
|
-
const nodeStyler = fade_animation9b939939.index(node);
|
|
12
|
-
/**
|
|
13
|
-
* Will animate the scale and optionally the opacity to make the element grow and fade in,
|
|
14
|
-
* and removes the scale and opacity style attributes once complete.
|
|
15
|
-
*/
|
|
16
|
-
function growIn() {
|
|
17
|
-
return new Promise(resolve => {
|
|
18
|
-
styleValueTypes_esF5d10b79.animate({
|
|
19
|
-
from: { opacity: hasFade ? 0 : 1, scale: amount },
|
|
20
|
-
to: { opacity: 1, scale: 1 },
|
|
21
|
-
duration,
|
|
22
|
-
onUpdate(latest) {
|
|
23
|
-
const updates = {
|
|
24
|
-
scale: latest.scale,
|
|
25
|
-
};
|
|
26
|
-
if (hasFade) {
|
|
27
|
-
updates['opacity'] = latest.opacity;
|
|
28
|
-
}
|
|
29
|
-
nodeStyler.set(updates);
|
|
30
|
-
},
|
|
31
|
-
onComplete() {
|
|
32
|
-
resolve();
|
|
33
|
-
if (hasFade) {
|
|
34
|
-
node.style.removeProperty('opacity');
|
|
35
|
-
}
|
|
36
|
-
node.style.removeProperty('transform');
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Applies the growOut styles without animating, useful when the initial
|
|
43
|
-
* state is hidden.
|
|
44
|
-
*/
|
|
45
|
-
function setGrowOut() {
|
|
46
|
-
node.style.transform = `scale(${amount})`;
|
|
47
|
-
if (hasFade) {
|
|
48
|
-
node.style.opacity = '0';
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Applies the growIn styles without animating, useful when the initial
|
|
53
|
-
* state is visible.
|
|
54
|
-
*/
|
|
55
|
-
function setGrowIn() {
|
|
56
|
-
node.style.transform = `scale(1)`;
|
|
57
|
-
if (hasFade) {
|
|
58
|
-
node.style.opacity = '1';
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Will animate the scale and optionally the opacity to make the element shrink and fade out,
|
|
63
|
-
* leaving the scale and opacity styles on the element.
|
|
64
|
-
*/
|
|
65
|
-
function growOut() {
|
|
66
|
-
return new Promise(resolve => {
|
|
67
|
-
styleValueTypes_esF5d10b79.animate({
|
|
68
|
-
from: { opacity: 1, scale: 1 },
|
|
69
|
-
to: { opacity: hasFade ? 0 : 1, scale: amount },
|
|
70
|
-
duration,
|
|
71
|
-
onUpdate(latest) {
|
|
72
|
-
const updates = {
|
|
73
|
-
scale: latest.scale,
|
|
74
|
-
};
|
|
75
|
-
if (hasFade) {
|
|
76
|
-
updates['opacity'] = latest.opacity;
|
|
77
|
-
}
|
|
78
|
-
nodeStyler.set(updates);
|
|
79
|
-
},
|
|
80
|
-
onComplete() {
|
|
81
|
-
resolve();
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
growIn,
|
|
88
|
-
growOut,
|
|
89
|
-
setGrowOut,
|
|
90
|
-
setGrowIn,
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
|
|
94
10
|
const min = Math.min;
|
|
95
11
|
const max = Math.max;
|
|
96
12
|
const round = Math.round;
|
|
@@ -1808,14 +1724,14 @@ const NvPopover = class {
|
|
|
1808
1724
|
*/
|
|
1809
1725
|
attachEventListeners() {
|
|
1810
1726
|
if (this.triggerElement && !this.eventsAttached) {
|
|
1811
|
-
|
|
1727
|
+
grow_animation24ad5cf8.addEventListeners(this.closeEvents, document, this);
|
|
1812
1728
|
if (this.triggerMode === 'click') {
|
|
1813
|
-
|
|
1729
|
+
grow_animation24ad5cf8.addEventListeners(this.clickEvents, this.triggerElement, this);
|
|
1814
1730
|
// Add document click and touch listeners
|
|
1815
|
-
|
|
1731
|
+
grow_animation24ad5cf8.addEventListeners(this.outsideClickEvents, document, this);
|
|
1816
1732
|
}
|
|
1817
1733
|
if (this.triggerMode === 'hover') {
|
|
1818
|
-
|
|
1734
|
+
grow_animation24ad5cf8.addEventListeners(this.hoverEvents, this.triggerElement, this);
|
|
1819
1735
|
}
|
|
1820
1736
|
this.eventsAttached = true;
|
|
1821
1737
|
}
|
|
@@ -1890,7 +1806,7 @@ const NvPopover = class {
|
|
|
1890
1806
|
state.groups.delete(this.groupName);
|
|
1891
1807
|
if (this.groupName && open)
|
|
1892
1808
|
state.groups.set(this.groupName, { openedBy: this.el });
|
|
1893
|
-
const { growIn } = useGrow(this.popoverElement, {
|
|
1809
|
+
const { growIn } = grow_animation24ad5cf8.useGrow(this.popoverElement, {
|
|
1894
1810
|
duration: isOtherMemberOpen ? 0 : 100,
|
|
1895
1811
|
amount: 0.85,
|
|
1896
1812
|
});
|
|
@@ -1942,7 +1858,7 @@ const NvPopover = class {
|
|
|
1942
1858
|
componentDidLoad() {
|
|
1943
1859
|
// Initial inline style setup
|
|
1944
1860
|
if (!this.open) {
|
|
1945
|
-
const { setGrowOut } = useGrow(this.popoverElement);
|
|
1861
|
+
const { setGrowOut } = grow_animation24ad5cf8.useGrow(this.popoverElement);
|
|
1946
1862
|
setGrowOut();
|
|
1947
1863
|
}
|
|
1948
1864
|
else {
|
|
@@ -1954,14 +1870,14 @@ const NvPopover = class {
|
|
|
1954
1870
|
this.attachEventListeners();
|
|
1955
1871
|
}
|
|
1956
1872
|
disconnectedCallback() {
|
|
1957
|
-
|
|
1873
|
+
grow_animation24ad5cf8.removeEventListeners(this.closeEvents, document, this);
|
|
1958
1874
|
if (this.triggerMode === 'click') {
|
|
1959
|
-
|
|
1875
|
+
grow_animation24ad5cf8.removeEventListeners(this.clickEvents, this.triggerElement, this);
|
|
1960
1876
|
// Remove document listeners
|
|
1961
|
-
|
|
1877
|
+
grow_animation24ad5cf8.removeEventListeners(this.outsideClickEvents, document, this);
|
|
1962
1878
|
}
|
|
1963
1879
|
if (this.triggerMode === 'hover')
|
|
1964
|
-
|
|
1880
|
+
grow_animation24ad5cf8.removeEventListeners(this.hoverEvents, this.triggerElement, this);
|
|
1965
1881
|
// Reset flag so events can be reattached if component is reconnected
|
|
1966
1882
|
this.eventsAttached = false;
|
|
1967
1883
|
// Clean up any pending timeouts
|
|
@@ -1974,7 +1890,7 @@ const NvPopover = class {
|
|
|
1974
1890
|
/****************************************************************************/
|
|
1975
1891
|
//#region RENDER
|
|
1976
1892
|
render() {
|
|
1977
|
-
return (index.h(index.Host, { key: '
|
|
1893
|
+
return (index.h(index.Host, { key: 'c54fc90b90bbe48b0410c750bf4ba97e51eb24e5' }, index.h("slot", { key: 'd957fba61d4e91d8afd85f14b602290c88e5128a', name: "trigger" }), index.h("div", { key: '548c798fc047d41c06d8a84cc9a4f65a4cbf75b5', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: 'd3c6e110e2c3f45ba0ed5c69b99f0a60413cbb39', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: '20c2d8e3ff0ed3d3b9957513e19586e4aa4a39ca', name: "content" }))));
|
|
1978
1894
|
}
|
|
1979
1895
|
get el() { return index.getElement(this); }
|
|
1980
1896
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('react-dom');
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ const NvRow = class {
|
|
|
14
14
|
/****************************************************************************/
|
|
15
15
|
//#region RENDER
|
|
16
16
|
render() {
|
|
17
|
-
return (index.h(index.Host, { key: '
|
|
17
|
+
return (index.h(index.Host, { key: '8415bdad0106bd3d836996c617a749294e0c19e2' }, index.h("slot", { key: '77c069ced0dc25c4169945877c388f30d27fdc4f' })));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
NvRow.style = NvRowStyle0;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-dom');
|
|
6
|
+
|
|
7
|
+
const nvSidebarCss = "nv-sidebarnavitem a,nv-sidebarnavitem a:link,nv-sidebarnavitem a:visited,nv-sidebarnavitem a:hover,nv-sidebarnavitem a:active,nv-sidebarnavsubitem a,nv-sidebarnavsubitem a:link,nv-sidebarnavsubitem a:visited,nv-sidebarnavsubitem a:hover,nv-sidebarnavsubitem a:active{color:inherit !important;text-decoration:none !important}nv-sidebar{display:flex;flex-direction:column;position:relative;height:100vh;background-color:var(--color-level-00-background);border-right:var(--sidebar-primary-separator-size) solid var(--color-content-low-border);transition:width 0.3s ease;width:var(--sidebar-width)}nv-sidebar[collapsed]{width:var(--sidebar-reduced-max-width)}nv-sidebar[collapsed] [data-hide-on-collapsed]{display:none !important}nv-sidebar[collapsed] .nv-sidebar-container{padding:var(--spacing-6) var(--spacing-5)}nv-sidebar .nv-sidebar-container{display:flex;flex-direction:column;flex:1;overflow:hidden;padding:var(--spacing-6);gap:var(--sidebar-gap-y)}nv-sidebar .nv-sidebar-toggle{position:absolute;top:var(--spacing-8);right:calc(var(--spacing-8) / -2);display:flex;align-items:center;justify-content:center;width:var(--spacing-8);height:var(--spacing-8);padding:var(--sidebar-collapsible-button-padding);background-color:var(--color-level-00-background);border:var(--sidebar-primary-separator-size) solid var(--color-content-low-border);border-radius:var(--radius-rounded-full);cursor:pointer;transition:transform 0.2s ease;z-index:10}nv-sidebar .nv-sidebar-toggle:hover{background-color:var(--color-level-10-background)}nv-sidebar .nv-sidebar-toggle:focus,nv-sidebar .nv-sidebar-toggle:focus-within{outline:none}nv-sidebar .nv-sidebar-toggle:focus-visible,nv-sidebar .nv-sidebar-toggle:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-sidebar .nv-sidebar-toggle nv-icon{width:var(--sidebar-collapsible-button-icon-size);height:var(--sidebar-collapsible-button-icon-size);color:var(--color-interaction-container-neutral-icon)}";
|
|
8
|
+
const NvSidebarStyle0 = nvSidebarCss;
|
|
9
|
+
|
|
10
|
+
const NvSidebar = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.openChanged = index.createEvent(this, "openChanged");
|
|
14
|
+
/****************************************************************************/
|
|
15
|
+
//#region PROPERTIES
|
|
16
|
+
/**
|
|
17
|
+
* The type of sidebar behavior.
|
|
18
|
+
* - collapsible: Can be toggled open/closed
|
|
19
|
+
* - persistent: Always visible
|
|
20
|
+
*/
|
|
21
|
+
this.type = 'persistent';
|
|
22
|
+
/**
|
|
23
|
+
* Whether the sidebar is currently open (only applies to collapsible type).
|
|
24
|
+
*/
|
|
25
|
+
// eslint-disable-next-line @stencil-community/ban-default-true
|
|
26
|
+
this.open = true;
|
|
27
|
+
/**
|
|
28
|
+
* Determines the type of notification bullets in the sidebar.
|
|
29
|
+
* - neutral: Uses neutral colors (gray)
|
|
30
|
+
* - brand: Uses brand colors (orange/teal depending on theme)
|
|
31
|
+
*/
|
|
32
|
+
this.notificationIntention = 'brand';
|
|
33
|
+
/**
|
|
34
|
+
* Determines the emphasis of notification bullets in the sidebar.
|
|
35
|
+
* - high: More prominent appearance
|
|
36
|
+
* - low: Less prominent appearance
|
|
37
|
+
*/
|
|
38
|
+
this.notificationEmphasis = 'high';
|
|
39
|
+
//#endregion EVENTS
|
|
40
|
+
/****************************************************************************/
|
|
41
|
+
//#region METHODS
|
|
42
|
+
this.handleToggle = () => {
|
|
43
|
+
if (this.type === 'collapsible') {
|
|
44
|
+
// Changing open will trigger @Watch which emits the event
|
|
45
|
+
this.open = !this.open;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Sets the active state of navigation items based on activePath
|
|
50
|
+
*/
|
|
51
|
+
this.setActiveNavItems = () => {
|
|
52
|
+
if (!this.activePath)
|
|
53
|
+
return;
|
|
54
|
+
// First, check all subitems to find if any matches exactly
|
|
55
|
+
const activeSubitemHrefs = new Set();
|
|
56
|
+
this.el.querySelectorAll('nv-sidebarnavsubitem').forEach(subItem => {
|
|
57
|
+
const link = subItem.querySelector('a');
|
|
58
|
+
const href = link === null || link === void 0 ? void 0 : link.getAttribute('href');
|
|
59
|
+
if (href) {
|
|
60
|
+
const isActive = this.activePath === href;
|
|
61
|
+
subItem.active = isActive;
|
|
62
|
+
if (isActive) {
|
|
63
|
+
activeSubitemHrefs.add(href);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
// Then, set nav items active only if:
|
|
68
|
+
// 1. Exact match with activePath AND no subitem matches
|
|
69
|
+
// 2. OR the navitem has no subitems and activePath starts with its href
|
|
70
|
+
this.el.querySelectorAll('nv-sidebarnavitem').forEach(navItem => {
|
|
71
|
+
const link = navItem.querySelector(':scope > a, :scope > .nv-sidebarnavitem-trigger a, .nv-sidebarnavitem-content > a');
|
|
72
|
+
const href = link === null || link === void 0 ? void 0 : link.getAttribute('href');
|
|
73
|
+
const hasSubitems = navItem.querySelector('nv-sidebarnavsubitem') !== null;
|
|
74
|
+
if (href) {
|
|
75
|
+
if (hasSubitems) {
|
|
76
|
+
// Parent with subitems: only active if exact match (not when subitem is active)
|
|
77
|
+
navItem.active = this.activePath === href;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
// Item without subitems: active on exact match
|
|
81
|
+
navItem.active = this.activePath === href;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
this.pendingActiveUpdate = null;
|
|
87
|
+
/**
|
|
88
|
+
* Sets up the MutationObserver to watch for changes in child elements.
|
|
89
|
+
* Only triggers on new nav items being added, not on attribute changes.
|
|
90
|
+
*/
|
|
91
|
+
this.setupMutationObserver = () => {
|
|
92
|
+
this.mutationObserver = new MutationObserver(mutations => {
|
|
93
|
+
// Only react to new nav items being added, ignore other mutations
|
|
94
|
+
const hasNewNavItems = mutations.some(mutation => {
|
|
95
|
+
if (mutation.type !== 'childList')
|
|
96
|
+
return false;
|
|
97
|
+
return Array.from(mutation.addedNodes).some(node => {
|
|
98
|
+
if (node.nodeType !== Node.ELEMENT_NODE)
|
|
99
|
+
return false;
|
|
100
|
+
const el = node;
|
|
101
|
+
return (el.tagName.toLowerCase() === 'nv-sidebarnavitem' ||
|
|
102
|
+
el.tagName.toLowerCase() === 'nv-sidebarnavsubitem' ||
|
|
103
|
+
el.querySelector('nv-sidebarnavitem, nv-sidebarnavsubitem'));
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
if (hasNewNavItems) {
|
|
107
|
+
// Debounce to prevent multiple rapid calls
|
|
108
|
+
if (this.pendingActiveUpdate) {
|
|
109
|
+
clearTimeout(this.pendingActiveUpdate);
|
|
110
|
+
}
|
|
111
|
+
this.pendingActiveUpdate = window.setTimeout(() => {
|
|
112
|
+
this.setActiveNavItems();
|
|
113
|
+
this.pendingActiveUpdate = null;
|
|
114
|
+
}, 50);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
this.mutationObserver.observe(this.el, {
|
|
118
|
+
childList: true,
|
|
119
|
+
subtree: true,
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
handleCollapsedSideEffects(isCollapsed) {
|
|
124
|
+
if (!isCollapsed) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
this.el.querySelectorAll('nv-sidebarnavitem[open]').forEach(navItem => {
|
|
128
|
+
navItem.open = false;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
//#endregion METHODS
|
|
132
|
+
/****************************************************************************/
|
|
133
|
+
//#region WATCHERS
|
|
134
|
+
onActivePathChanged() {
|
|
135
|
+
this.setActiveNavItems();
|
|
136
|
+
}
|
|
137
|
+
//#endregion WATCHERS
|
|
138
|
+
/****************************************************************************/
|
|
139
|
+
//#region LIFECYCLE
|
|
140
|
+
componentWillLoad() {
|
|
141
|
+
this.setActiveNavItems();
|
|
142
|
+
this.setupMutationObserver();
|
|
143
|
+
this.handleCollapsedSideEffects(this.type === 'collapsible' && !this.open);
|
|
144
|
+
}
|
|
145
|
+
onOpenChanged(newValue, oldValue) {
|
|
146
|
+
this.handleCollapsedSideEffects(this.type === 'collapsible' && !newValue);
|
|
147
|
+
// Only emit event when open state actually changes (not on re-render with same value)
|
|
148
|
+
if (this.type === 'collapsible' && newValue !== oldValue) {
|
|
149
|
+
this.openChanged.emit(newValue);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
disconnectedCallback() {
|
|
153
|
+
if (this.mutationObserver) {
|
|
154
|
+
this.mutationObserver.disconnect();
|
|
155
|
+
}
|
|
156
|
+
if (this.pendingActiveUpdate) {
|
|
157
|
+
clearTimeout(this.pendingActiveUpdate);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
//#endregion LIFECYCLE
|
|
161
|
+
/****************************************************************************/
|
|
162
|
+
//#region RENDER
|
|
163
|
+
render() {
|
|
164
|
+
const isCollapsed = this.type === 'collapsible' && !this.open;
|
|
165
|
+
return (index.h(index.Host, { key: 'af78cae6f6cd895dbef098e549e63ac8baace243', role: "navigation", collapsed: isCollapsed ? true : undefined, "notification-intention": this.notificationIntention, "notification-emphasis": this.notificationEmphasis, "aria-expanded": this.type === 'collapsible' ? String(this.open) : undefined }, index.h("div", { key: '28a2ec38d36308d803362d361a243dc5c1b6083e', class: "nv-sidebar-container" }, index.h("slot", { key: 'c4d85987d256e89508392b6e28fdb74be9140ccb' })), this.type === 'collapsible' && (index.h("button", { key: 'a34c2b6a0be9b1bd494ac542db3ed096c81e32f9', class: "nv-sidebar-toggle", onClick: this.handleToggle, "aria-label": this.open ? 'Collapse sidebar' : 'Expand sidebar' }, index.h("nv-icon", { key: '8905351a55b339106a4c7bb5cf61582a98dd31a5', name: this.open
|
|
166
|
+
? 'layout-sidebar-left-collapse'
|
|
167
|
+
: 'layout-sidebar-right-collapse', size: "sm" })))));
|
|
168
|
+
}
|
|
169
|
+
get el() { return index.getElement(this); }
|
|
170
|
+
static get watchers() { return {
|
|
171
|
+
"activePath": ["onActivePathChanged"],
|
|
172
|
+
"open": ["onOpenChanged"]
|
|
173
|
+
}; }
|
|
174
|
+
};
|
|
175
|
+
NvSidebar.style = NvSidebarStyle0;
|
|
176
|
+
|
|
177
|
+
exports.nv_sidebar = NvSidebar;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-dom');
|
|
6
|
+
|
|
7
|
+
const nvSidebarcontentCss = "nv-sidebarcontent{display:flex;flex-direction:column;flex:1;overflow-y:auto;overflow-x:hidden}";
|
|
8
|
+
const NvSidebarcontentStyle0 = nvSidebarcontentCss;
|
|
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: 'd960a2c2abe06db605980bf35d2c7cc74f4e0dba', role: "list" }, index.h("slot", { key: '7c0b0ad872d1afc279bfd9c9d381097207f055e2' })));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
NvSidebarcontent.style = NvSidebarcontentStyle0;
|
|
21
|
+
|
|
22
|
+
exports.nv_sidebarcontent = NvSidebarcontent;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-dom');
|
|
6
|
+
|
|
7
|
+
const nvSidebardividerCss = "nv-sidebardivider{display:block;height:var(--sidebar-primary-separator-size);background-color:var(--color-content-low-border);margin:var(--spacing-2) 0}";
|
|
8
|
+
const NvSidebardividerStyle0 = nvSidebardividerCss;
|
|
9
|
+
|
|
10
|
+
const NvSidebardivider = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
}
|
|
14
|
+
/****************************************************************************/
|
|
15
|
+
//#region RENDER
|
|
16
|
+
render() {
|
|
17
|
+
return index.h(index.Host, { key: 'a4328b357b750232920c8b5e24e91503bba7e235', role: "separator", "aria-orientation": "horizontal" });
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
NvSidebardivider.style = NvSidebardividerStyle0;
|
|
21
|
+
|
|
22
|
+
exports.nv_sidebardivider = NvSidebardivider;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-dom');
|
|
6
|
+
|
|
7
|
+
const nvSidebarfooterCss = "nv-sidebarfooter{display:block;margin-top:auto}";
|
|
8
|
+
const NvSidebarfooterStyle0 = nvSidebarfooterCss;
|
|
9
|
+
|
|
10
|
+
const NvSidebarfooter = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
}
|
|
14
|
+
/****************************************************************************/
|
|
15
|
+
//#region RENDER
|
|
16
|
+
render() {
|
|
17
|
+
return (index.h(index.Host, { key: '73ce5246f93d982caf0d65f2cde8156dfbe565da' }, index.h("slot", { key: '92a297a59988ce6e70875eedd50227cdf011d4bf' })));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
NvSidebarfooter.style = NvSidebarfooterStyle0;
|
|
21
|
+
|
|
22
|
+
exports.nv_sidebarfooter = NvSidebarfooter;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-dom');
|
|
6
|
+
|
|
7
|
+
const nvSidebargroupCss = "nv-sidebargroup{display:flex;flex-direction:column;gap:var(--spacing-1)}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-primary-title-padding-y) var(--sidebar-primary-title-padding-x)}nv-sidebar[collapsed] nv-sidebargroup .nv-sidebargroup-label{display:none}";
|
|
8
|
+
const NvSidebargroupStyle0 = nvSidebargroupCss;
|
|
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: 'c7b4e34d8237dc93adaa33f12d7cfda36a8ac269', role: "group", "aria-label": this.label }, this.label && index.h("div", { key: '7cafdf840b12c89604efda7895b764331c8054b7', class: "nv-sidebargroup-label" }, this.label), index.h("slot", { key: 'b6567a223f7cc05ce2874a632d38d6665c255659' })));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
NvSidebargroup.style = NvSidebargroupStyle0;
|
|
22
|
+
|
|
23
|
+
exports.nv_sidebargroup = NvSidebargroup;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-dom');
|
|
6
|
+
|
|
7
|
+
const nvSidebarheaderCss = "nv-sidebarheader{display:block}";
|
|
8
|
+
const NvSidebarheaderStyle0 = nvSidebarheaderCss;
|
|
9
|
+
|
|
10
|
+
const NvSidebarheader = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
}
|
|
14
|
+
/****************************************************************************/
|
|
15
|
+
//#region RENDER
|
|
16
|
+
render() {
|
|
17
|
+
return (index.h(index.Host, { key: '42d91f8325df19e8208ab045a057657c97bf3ff4' }, index.h("slot", { key: '42b4e5952fd55b95fe2934297929cef3bd1b226c' })));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
NvSidebarheader.style = NvSidebarheaderStyle0;
|
|
21
|
+
|
|
22
|
+
exports.nv_sidebarheader = NvSidebarheader;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CEKdYnmK.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-dom');
|
|
6
|
+
|
|
7
|
+
const nvSidebarlogoCss = "nv-sidebarlogo{display:block}nv-sidebarlogo .nv-sidebarlogo-container{display:flex;align-items:center;gap:var(--spacing-3)}nv-sidebarlogo .nv-sidebarlogo-full,nv-sidebarlogo .nv-sidebarlogo-collapsed{height:var(--spacing-8);width:auto;object-fit:contain}nv-sidebarlogo .nv-sidebarlogo-collapsed{display:none}nv-sidebarlogo .nv-sidebarlogo-title{font-size:var(--nv-sidebarlogo-font-size, var(--font-size-md));font-weight:var(--nv-sidebarlogo-font-weight, var(--font-weight-high-emphasis));font-family:var(--nv-sidebarlogo-font-family, inherit);color:var(--color-content-high-text);white-space:nowrap;overflow:hidden;transition:opacity 0.2s ease, max-width 0.3s ease, margin-left 0.3s ease;max-width:200px;opacity:1}nv-sidebar[collapsed] nv-sidebarlogo .nv-sidebarlogo-full{display:none}nv-sidebar[collapsed] nv-sidebarlogo .nv-sidebarlogo-collapsed{display:block}nv-sidebar[collapsed] nv-sidebarlogo .nv-sidebarlogo-title{max-width:0;opacity:0;margin-left:0}nv-sidebar[collapsed] nv-sidebarlogo .nv-sidebarlogo-container{justify-content:center;align-items:center;gap:0;width:100%;min-height:var(--spacing-12);padding:0}";
|
|
8
|
+
const NvSidebarlogoStyle0 = nvSidebarlogoCss;
|
|
9
|
+
|
|
10
|
+
const NvSidebarlogo = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
//#endregion PROPERTIES
|
|
14
|
+
/****************************************************************************/
|
|
15
|
+
//#region CONSTANTS
|
|
16
|
+
// Default Nova logo SVG (expanded - icon only, text comes from label prop)
|
|
17
|
+
this.defaultLogo = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"%3E%3Cstyle%3E.cls-1{fill:%23f0801a;}%3C/style%3E%3Cpath class="cls-1" d="M25.71,2.13l-5.08,11.39c-.39.88-.38,1.92.13,2.73.74,1.17,2.19,1.59,3.42,1.07l14.26-6-3.14-2.27-10.89,4.66c-.15.06-.3-.09-.23-.24l4.34-9.31-2.81-2.03Z"/%3E%3Cpath class="cls-1" d="M4.29,10l9.22,8.4c.71.65,1.7.97,2.63.73,1.34-.34,2.2-1.58,2.09-2.91l-1.22-15.43-3.14,2.27,1.01,11.8c.01.16-.18.26-.3.15l-7.48-7.04-2.81,2.03Z"/%3E%3Cpath class="cls-1" d="M26.95,39.15l-2.59-12.2c-.2-.94-.82-1.78-1.71-2.13-1.29-.51-2.71,0-3.4,1.14l-8.01,13.24h3.87s6.07-10.18,6.07-10.18c.08-.14.3-.1.33.06l1.97,10.08h3.47Z"/%3E%3Cpath class="cls-1" d="M4.85,32.76l10.82-6.19c.83-.48,1.44-1.32,1.5-2.28.09-1.38-.83-2.58-2.13-2.89L0,17.82l1.2,3.68,11.54,2.67c.16.04.19.25.05.33l-9,4.96,1.07,3.3Z"/%3E%3Cpath class="cls-1" d="M40,20.11l-12.4-1.35c-.95-.1-1.94.22-2.56.96-.89,1.07-.84,2.58.03,3.58l10.08,11.74,1.2-3.69-7.77-8.94c-.11-.12,0-.32.16-.3l10.19,1.28,1.07-3.3Z"/%3E%3C/svg%3E';
|
|
18
|
+
// Default Nova icon (collapsed - same logo but will be displayed smaller)
|
|
19
|
+
this.defaultCollapsedLogo = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"%3E%3Cstyle%3E.cls-1{fill:%23f0801a;}%3C/style%3E%3Cpath class="cls-1" d="M25.71,2.13l-5.08,11.39c-.39.88-.38,1.92.13,2.73.74,1.17,2.19,1.59,3.42,1.07l14.26-6-3.14-2.27-10.89,4.66c-.15.06-.3-.09-.23-.24l4.34-9.31-2.81-2.03Z"/%3E%3Cpath class="cls-1" d="M4.29,10l9.22,8.4c.71.65,1.7.97,2.63.73,1.34-.34,2.2-1.58,2.09-2.91l-1.22-15.43-3.14,2.27,1.01,11.8c.01.16-.18.26-.3.15l-7.48-7.04-2.81,2.03Z"/%3E%3Cpath class="cls-1" d="M26.95,39.15l-2.59-12.2c-.2-.94-.82-1.78-1.71-2.13-1.29-.51-2.71,0-3.4,1.14l-8.01,13.24h3.87s6.07-10.18,6.07-10.18c.08-.14.3-.1.33.06l1.97,10.08h3.47Z"/%3E%3Cpath class="cls-1" d="M4.85,32.76l10.82-6.19c.83-.48,1.44-1.32,1.5-2.28.09-1.38-.83-2.58-2.13-2.89L0,17.82l1.2,3.68,11.54,2.67c.16.04.19.25.05.33l-9,4.96,1.07,3.3Z"/%3E%3Cpath class="cls-1" d="M40,20.11l-12.4-1.35c-.95-.1-1.94.22-2.56.96-.89,1.07-.84,2.58.03,3.58l10.08,11.74,1.2-3.69-7.77-8.94c-.11-.12,0-.32.16-.3l10.19,1.28,1.07-3.3Z"/%3E%3C/svg%3E';
|
|
20
|
+
}
|
|
21
|
+
//#endregion CONSTANTS
|
|
22
|
+
/****************************************************************************/
|
|
23
|
+
//#region RENDER
|
|
24
|
+
render() {
|
|
25
|
+
const logoSrc = this.logo || this.defaultLogo;
|
|
26
|
+
const collapsedLogoSrc = this.collapsedLogo || this.defaultCollapsedLogo;
|
|
27
|
+
return (index.h(index.Host, { key: 'ec2aba08293e4def2fe083c311b69cafe005cf5e' }, index.h("div", { key: '3a24d832a0bb5aa44264fe1fc3091878556649bd', class: "nv-sidebarlogo-container" }, index.h("img", { key: 'a9a08e7c5dd51902d9ffbda0d9216a4ffb186756', src: logoSrc, alt: this.label || 'Logo', class: "nv-sidebarlogo-full" }), index.h("img", { key: 'daef311e11c8d5ee6b823a4896be36ea5bd696cc', src: collapsedLogoSrc, alt: this.label || 'Logo', class: "nv-sidebarlogo-collapsed" }), this.label && index.h("span", { key: '9685e4c110e7bb7356f5d49b615105033a32a736', class: "nv-sidebarlogo-title" }, this.label))));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
NvSidebarlogo.style = NvSidebarlogoStyle0;
|
|
31
|
+
|
|
32
|
+
exports.nv_sidebarlogo = NvSidebarlogo;
|