@epam/ai-dial-navigation-panel 1.3.0-dev.98 → 1.3.0-rc.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/components/NavigationSheet/NavigationMenuPage.d.ts +2 -0
- package/components/NavigationSheet/NavigationMenuPage.d.ts.map +1 -1
- package/components/NavigationSheet/NavigationSheet.d.ts.map +1 -1
- package/components/NavigationSheet/ProfilePage.d.ts +2 -0
- package/components/NavigationSheet/ProfilePage.d.ts.map +1 -1
- package/components/NavigationSidebar/NavigationSidebar.d.ts +5 -0
- package/components/NavigationSidebar/NavigationSidebar.d.ts.map +1 -0
- package/components/UserMenu/UserMenu.d.ts +2 -2
- package/components/UserMenu/UserMenu.d.ts.map +1 -1
- package/components/common/ItemGradients.d.ts +13 -0
- package/components/common/ItemGradients.d.ts.map +1 -0
- package/components/common/UserAvatar.d.ts +4 -0
- package/components/common/UserAvatar.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +6 -0
- package/constants/public-class-names.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.d.ts +5 -1
- package/index.d.ts.map +1 -1
- package/index.js +412 -185
- package/models/navigation-item.d.ts +14 -0
- package/models/navigation-item.d.ts.map +1 -1
- package/models/navigation-sheet-props.d.ts +4 -0
- package/models/navigation-sheet-props.d.ts.map +1 -1
- package/models/navigation-sidebar-props.d.ts +91 -0
- package/models/navigation-sidebar-props.d.ts.map +1 -0
- package/models/user-menu-props.d.ts +12 -1
- package/models/user-menu-props.d.ts.map +1 -1
- package/package.json +5 -5
- package/types/navigation-sidebar-variant.d.ts +8 -0
- package/types/navigation-sidebar-variant.d.ts.map +1 -0
- package/types/user-menu-trigger-variant.d.ts +10 -0
- package/types/user-menu-trigger-variant.d.ts.map +1 -0
- package/utils/focus.d.ts +3 -0
- package/utils/focus.d.ts.map +1 -0
package/index.js
CHANGED
|
@@ -1,98 +1,101 @@
|
|
|
1
1
|
import { buildCssVars as e, mergeClasses as t } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { Avatar as n, BASE_ICON_SIZE as r, Button as i, DIAL_ICON_SIZE as a, DIAL_KIT_ICON_STROKE as o, Dropdown as s, DropdownItemType as c,
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { IconCheck as
|
|
6
|
-
import { BottomSheetShell as
|
|
2
|
+
import { Avatar as n, BASE_ICON_SIZE as r, Button as i, DIAL_ICON_SIZE as a, DIAL_KIT_ICON_STROKE as o, Dropdown as s, DropdownItemType as c, ElementSize as l, EllipsisTooltip as u, GhostIconButton as d, IconButton as f, MenuItem as p, MenuItemMark as m, Tooltip as h } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { Fragment as g, createContext as _, memo as v, useCallback as y, useContext as b, useEffect as x, useId as S, useMemo as C, useRef as w, useState as T } from "react";
|
|
4
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
5
|
+
import { IconCheck as k, IconChevronDown as A, IconChevronRight as j, IconChevronUp as ee, IconLayoutSidebar as M, IconLogout as te, IconSettings as N, IconUser as P, IconX as ne } from "@tabler/icons-react";
|
|
6
|
+
import { BottomSheetShell as F } from "@epam/ai-dial-conversation-input";
|
|
7
7
|
//#region src/constants/public-class-names.ts
|
|
8
|
-
var
|
|
8
|
+
var I = {
|
|
9
9
|
rail: "dial-navigation-panel-rail",
|
|
10
|
-
item: "dial-navigation-panel-item"
|
|
11
|
-
|
|
10
|
+
item: "dial-navigation-panel-item",
|
|
11
|
+
sidebar: "dial-navigation-panel-sidebar",
|
|
12
|
+
sidebarItem: "dial-navigation-panel-sidebar-item",
|
|
13
|
+
sidebarFooter: "dial-navigation-panel-sidebar-footer"
|
|
14
|
+
}, L = {
|
|
12
15
|
rail: "_rail_1hxk4_1",
|
|
13
16
|
item: "_item_1hxk4_6",
|
|
14
17
|
itemActive: "_itemActive_1hxk4_33",
|
|
15
18
|
itemFilled: "_itemFilled_1hxk4_38",
|
|
16
19
|
itemFilledOutline: "_itemFilledOutline_1hxk4_79"
|
|
17
|
-
},
|
|
20
|
+
}, R = (e, t) => /* @__PURE__ */ D("a", {
|
|
18
21
|
href: e.href,
|
|
19
22
|
className: "contents",
|
|
20
23
|
children: t
|
|
21
|
-
}),
|
|
22
|
-
let { colors:
|
|
23
|
-
"--np-bg":
|
|
24
|
-
"--np-item-text":
|
|
25
|
-
"--np-item-active-text":
|
|
26
|
-
"--np-item-selected-bg":
|
|
27
|
-
"--np-item-hover-bg":
|
|
28
|
-
"--np-item-hover-icon":
|
|
29
|
-
"--np-item-active-icon":
|
|
30
|
-
"--np-item-active-bg":
|
|
31
|
-
"--np-font-family":
|
|
24
|
+
}), z = v(({ items: n, labels: r, logo: i, footer: s, renderLink: c = R, styles: l }) => {
|
|
25
|
+
let { colors: u, typography: d, className: p, cssVars: m } = l ?? {}, h = S().replace(/[^\w-]/g, ""), _ = `np-hover-gradient-${h}`, v = `np-active-gradient-${h}`, y = C(() => e({
|
|
26
|
+
"--np-bg": u?.background,
|
|
27
|
+
"--np-item-text": u?.itemText,
|
|
28
|
+
"--np-item-active-text": u?.itemActiveText,
|
|
29
|
+
"--np-item-selected-bg": u?.itemSelectedBackground,
|
|
30
|
+
"--np-item-hover-bg": u?.itemHoverBackground,
|
|
31
|
+
"--np-item-hover-icon": u?.itemHoverIcon ?? `url(#${_})`,
|
|
32
|
+
"--np-item-active-icon": u?.itemActiveIcon ?? `url(#${v})`,
|
|
33
|
+
"--np-item-active-bg": u?.itemActiveBackground,
|
|
34
|
+
"--np-font-family": d?.fontFamily
|
|
32
35
|
}), [
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
u,
|
|
37
|
+
d?.fontFamily,
|
|
35
38
|
_,
|
|
36
39
|
v
|
|
37
40
|
]);
|
|
38
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ O("nav", {
|
|
39
42
|
"aria-label": r.ariaLabel,
|
|
40
43
|
style: {
|
|
41
|
-
...
|
|
42
|
-
...
|
|
44
|
+
...m,
|
|
45
|
+
...y
|
|
43
46
|
},
|
|
44
|
-
className: t(
|
|
47
|
+
className: t(L.rail, "relative z-10 flex h-full w-[60px] flex-col justify-between shadow-sm", d?.fontClassName, p, I.rail),
|
|
45
48
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ D("svg", {
|
|
47
50
|
"aria-hidden": !0,
|
|
48
51
|
className: "absolute size-0",
|
|
49
52
|
focusable: "false",
|
|
50
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ O("defs", { children: [/* @__PURE__ */ O("linearGradient", {
|
|
51
54
|
id: _,
|
|
52
55
|
gradientUnits: "userSpaceOnUse",
|
|
53
56
|
x1: "30.2",
|
|
54
57
|
y1: "-2.5",
|
|
55
58
|
x2: "-4.6",
|
|
56
59
|
y2: "25.2",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ D("stop", {
|
|
58
61
|
offset: "0",
|
|
59
62
|
stopColor: "#1d4ed8"
|
|
60
|
-
}), /* @__PURE__ */
|
|
63
|
+
}), /* @__PURE__ */ D("stop", {
|
|
61
64
|
offset: "1",
|
|
62
65
|
stopColor: "#885df2"
|
|
63
66
|
})]
|
|
64
|
-
}), /* @__PURE__ */
|
|
67
|
+
}), /* @__PURE__ */ O("linearGradient", {
|
|
65
68
|
id: v,
|
|
66
69
|
gradientUnits: "userSpaceOnUse",
|
|
67
70
|
x1: "31.3",
|
|
68
71
|
y1: "-1.7",
|
|
69
72
|
x2: "0.2",
|
|
70
73
|
y2: "20.4",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ D("stop", {
|
|
72
75
|
offset: "0",
|
|
73
76
|
stopColor: "#1d4ed8"
|
|
74
|
-
}), /* @__PURE__ */
|
|
77
|
+
}), /* @__PURE__ */ D("stop", {
|
|
75
78
|
offset: "1",
|
|
76
79
|
stopColor: "#885df2"
|
|
77
80
|
})]
|
|
78
81
|
})] })
|
|
79
82
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ O("div", {
|
|
81
84
|
className: "flex flex-col items-center",
|
|
82
|
-
children: [i && /* @__PURE__ */
|
|
85
|
+
children: [i && /* @__PURE__ */ D("a", {
|
|
83
86
|
href: i.href ?? "/",
|
|
84
87
|
"aria-label": i.ariaLabel,
|
|
85
88
|
className: "flex h-16 w-full shrink-0 items-center justify-center",
|
|
86
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ D("span", {
|
|
87
90
|
style: { backgroundImage: `url("${i.iconUrl}")` },
|
|
88
91
|
className: "h-6 w-6 bg-contain bg-center bg-no-repeat"
|
|
89
92
|
})
|
|
90
|
-
}), /* @__PURE__ */
|
|
93
|
+
}), /* @__PURE__ */ D("div", {
|
|
91
94
|
className: "flex flex-col items-center gap-2 p-2",
|
|
92
95
|
children: n.map((e) => {
|
|
93
|
-
let n = !!e.isActive && !!e.activeIcon;
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
icon: /* @__PURE__ */
|
|
96
|
+
let n = !!e.isActive && !!e.activeIcon, r = n && e.activeIcon || e.icon;
|
|
97
|
+
return /* @__PURE__ */ D(g, { children: c(e, /* @__PURE__ */ D(f, {
|
|
98
|
+
icon: /* @__PURE__ */ D(r, {
|
|
96
99
|
size: a.LG,
|
|
97
100
|
stroke: o
|
|
98
101
|
}),
|
|
@@ -100,7 +103,7 @@ var j = {
|
|
|
100
103
|
"aria-current": e.isActive ? "page" : void 0,
|
|
101
104
|
tooltipProps: { tooltip: e.label },
|
|
102
105
|
tabIndex: -1,
|
|
103
|
-
className: t(
|
|
106
|
+
className: t(L.item, "rounded-xl", e.isActive && L.itemActive, n && L.itemFilled, e.isActive && !n && L.itemFilledOutline, I.item)
|
|
104
107
|
})) }, e.id);
|
|
105
108
|
})
|
|
106
109
|
})]
|
|
@@ -108,93 +111,279 @@ var j = {
|
|
|
108
111
|
s
|
|
109
112
|
]
|
|
110
113
|
});
|
|
111
|
-
}),
|
|
114
|
+
}), B = /* @__PURE__ */ function(e) {
|
|
115
|
+
return e.Sidebar = "sidebar", e.Drawer = "drawer", e;
|
|
116
|
+
}({}), V = [
|
|
117
|
+
"a[href]",
|
|
118
|
+
"button:not([disabled])",
|
|
119
|
+
"input:not([disabled]):not([type=\"hidden\"])",
|
|
120
|
+
"select:not([disabled])",
|
|
121
|
+
"textarea:not([disabled])",
|
|
122
|
+
"[tabindex]",
|
|
123
|
+
"[contenteditable=\"true\"]"
|
|
124
|
+
].join(","), re = (e) => Array.from(e.querySelectorAll(V)).filter((e) => e.tabIndex >= 0 && !e.closest("[inert], [hidden], [aria-hidden=\"true\"]")), H = {
|
|
125
|
+
stopStart: "_stopStart_8i550_1",
|
|
126
|
+
stopEnd: "_stopEnd_8i550_5"
|
|
127
|
+
}, ie = ({ activeGradientId: e }) => /* @__PURE__ */ D("svg", {
|
|
128
|
+
"aria-hidden": !0,
|
|
129
|
+
className: "absolute size-0",
|
|
130
|
+
focusable: "false",
|
|
131
|
+
children: /* @__PURE__ */ D("defs", { children: /* @__PURE__ */ O("linearGradient", {
|
|
132
|
+
id: e,
|
|
133
|
+
gradientUnits: "userSpaceOnUse",
|
|
134
|
+
x1: "31.3",
|
|
135
|
+
y1: "-1.7",
|
|
136
|
+
x2: "0.2",
|
|
137
|
+
y2: "20.4",
|
|
138
|
+
children: [/* @__PURE__ */ D("stop", {
|
|
139
|
+
offset: "0",
|
|
140
|
+
className: H.stopStart
|
|
141
|
+
}), /* @__PURE__ */ D("stop", {
|
|
142
|
+
offset: "1",
|
|
143
|
+
className: H.stopEnd
|
|
144
|
+
})]
|
|
145
|
+
}) })
|
|
146
|
+
}), U = {
|
|
147
|
+
sidebar: "_sidebar_1w4pz_1",
|
|
148
|
+
sidebarColumn: "_sidebarColumn_1w4pz_7",
|
|
149
|
+
item: "_item_1w4pz_16",
|
|
150
|
+
itemActive: "_itemActive_1w4pz_21",
|
|
151
|
+
itemFilled: "_itemFilled_1w4pz_38",
|
|
152
|
+
itemFilledOutline: "_itemFilledOutline_1w4pz_45",
|
|
153
|
+
itemIcon: "_itemIcon_1w4pz_49",
|
|
154
|
+
footer: "_footer_1w4pz_55"
|
|
155
|
+
}, ae = (e, t, n) => /* @__PURE__ */ D("a", {
|
|
156
|
+
href: e.href,
|
|
157
|
+
...n,
|
|
158
|
+
children: t
|
|
159
|
+
}), oe = (e, t) => e ? "w-[320px] max-w-full" : t ? "w-[72px]" : "w-[336px]", se = (e, n) => e ? t("fixed inset-y-0 inset-s-0 z-50 flex flex-col overflow-hidden shadow-sm outline-none", "transition-[transform,visibility] duration-200 ease-in-out motion-reduce:transition-none", n ? "visible translate-x-0" : "invisible ltr:-translate-x-full rtl:translate-x-full") : t(U.sidebarColumn, "relative z-10 flex h-full shrink-0 flex-col overflow-hidden shadow-sm"), ce = v(({ items: n, labels: r, variant: i = B.Sidebar, isCollapsed: s = !1, onToggleCollapse: c, isOpen: u = !1, onClose: f, id: p, logo: m, renderLink: _ = ae, children: v, userMenu: y, footerActions: b, styles: T }) => {
|
|
160
|
+
let { colors: k, typography: A, className: j, cssVars: ee } = T ?? {}, te = A?.fontClassName ?? "dial-small-text", N = i === B.Drawer, P = !N && s, F = S(), L = p ?? F, R = `np-sidebar-gradient-${F.replace(/[^\w-]/g, "")}`, z = w(null), V = w(null), H = w(u);
|
|
161
|
+
x(() => {
|
|
162
|
+
let e = H.current;
|
|
163
|
+
H.current = u, N && (u && !e ? (V.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, z.current?.focus()) : !u && e && (V.current?.focus(), V.current = null));
|
|
164
|
+
}, [N, u]);
|
|
165
|
+
let ce = (e) => {
|
|
166
|
+
if (!e.currentTarget.contains(e.target)) return;
|
|
167
|
+
if (e.key === "Escape") {
|
|
168
|
+
f?.();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (e.key !== "Tab") return;
|
|
172
|
+
let t = re(e.currentTarget);
|
|
173
|
+
if (t.length === 0) {
|
|
174
|
+
e.preventDefault();
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
let n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
178
|
+
e.shiftKey && (i === n || i === e.currentTarget) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
179
|
+
}, W = C(() => e({
|
|
180
|
+
"--np-sidebar-bg": k?.background,
|
|
181
|
+
"--np-sidebar-item-text": k?.itemText,
|
|
182
|
+
"--np-sidebar-item-hover-bg": k?.itemHoverBackground,
|
|
183
|
+
"--np-sidebar-item-selected-bg": k?.itemSelectedBackground,
|
|
184
|
+
"--np-sidebar-focus-outline": k?.focusOutline,
|
|
185
|
+
"--np-sidebar-gradient-start": k?.itemActiveGradientStart,
|
|
186
|
+
"--np-sidebar-gradient-end": k?.itemActiveGradientEnd,
|
|
187
|
+
"--np-sidebar-item-active-icon": k?.itemActiveIcon ?? `url(#${R})`,
|
|
188
|
+
"--np-sidebar-font-family": A?.fontFamily
|
|
189
|
+
}), [
|
|
190
|
+
k,
|
|
191
|
+
A?.fontFamily,
|
|
192
|
+
R
|
|
193
|
+
]), G = P ? r.expand ?? "Expand sidebar" : r.collapse ?? "Collapse sidebar", K = r.toggle ?? "Sidebar", q = r.close ?? "Close", J = (e, n) => /* @__PURE__ */ D("span", {
|
|
194
|
+
style: { backgroundImage: `url("${e}")` },
|
|
195
|
+
className: t("bg-contain bg-center bg-no-repeat", n)
|
|
196
|
+
}), le = () => /* @__PURE__ */ D(d, {
|
|
197
|
+
icon: /* @__PURE__ */ O("span", {
|
|
198
|
+
className: "relative block size-6 shrink-0",
|
|
199
|
+
children: [P && m && J(m.iconUrl, "absolute inset-0 transition-opacity group-focus-visible/toggle:opacity-0 group-hover/toggle:opacity-0"), /* @__PURE__ */ D(M, {
|
|
200
|
+
size: a.LG,
|
|
201
|
+
stroke: o,
|
|
202
|
+
className: t("absolute inset-0 rtl:scale-x-[-1]", P && m && "opacity-0 group-hover/toggle:opacity-100 group-focus-visible/toggle:opacity-100"),
|
|
203
|
+
"aria-hidden": !0
|
|
204
|
+
})]
|
|
205
|
+
}),
|
|
206
|
+
size: l.Large,
|
|
207
|
+
"aria-label": K,
|
|
208
|
+
"aria-expanded": !P,
|
|
209
|
+
"aria-controls": L,
|
|
210
|
+
tooltipProps: { tooltip: G },
|
|
211
|
+
onClick: c,
|
|
212
|
+
className: "group/toggle size-10! min-h-0! min-w-0! shrink-0 rounded-full! p-2!"
|
|
213
|
+
}), Y = () => /* @__PURE__ */ D(d, {
|
|
214
|
+
icon: /* @__PURE__ */ D(ne, {
|
|
215
|
+
size: a.LG,
|
|
216
|
+
stroke: o,
|
|
217
|
+
"aria-hidden": !0
|
|
218
|
+
}),
|
|
219
|
+
size: l.Large,
|
|
220
|
+
"aria-label": q,
|
|
221
|
+
tooltipProps: { tooltip: q },
|
|
222
|
+
onClick: f,
|
|
223
|
+
className: "size-10! min-h-0! min-w-0! shrink-0 rounded-full! p-2!"
|
|
224
|
+
}), X = () => m && /* @__PURE__ */ D("a", {
|
|
225
|
+
href: m.href ?? "/",
|
|
226
|
+
"aria-label": m.ariaLabel,
|
|
227
|
+
className: t("flex h-10 items-center", !N && "ps-2"),
|
|
228
|
+
children: J(P ? m.iconUrl : m.logoUrl ?? m.iconUrl, P ? "size-6" : "h-6 min-w-[116px]")
|
|
229
|
+
}), Z = () => /* @__PURE__ */ O("div", {
|
|
230
|
+
className: "flex shrink-0 items-center justify-between ps-4 pe-2 pt-3 pb-2",
|
|
231
|
+
children: [X(), f && Y()]
|
|
232
|
+
}), Q = () => /* @__PURE__ */ O(E, { children: [!(P && c) && X(), c && le()] }), $ = (e) => {
|
|
233
|
+
let n = !!e.isActive && !!e.activeIcon, r = n && e.activeIcon || e.icon, i = /* @__PURE__ */ D("span", {
|
|
234
|
+
className: t("flex size-6 shrink-0 items-center justify-center", U.itemIcon),
|
|
235
|
+
children: /* @__PURE__ */ D(r, {
|
|
236
|
+
size: a.LG,
|
|
237
|
+
stroke: o
|
|
238
|
+
})
|
|
239
|
+
}), s = _(e, /* @__PURE__ */ O(E, { children: [i, /* @__PURE__ */ D("span", {
|
|
240
|
+
className: P ? "sr-only" : te,
|
|
241
|
+
children: e.label
|
|
242
|
+
})] }), {
|
|
243
|
+
className: t("flex items-center rounded-full p-2 no-underline", P ? "size-10 justify-center" : "h-10 w-full gap-2", U.item, e.isActive && U.itemActive, n && U.itemFilled, e.isActive && !n && U.itemFilledOutline, I.sidebarItem),
|
|
244
|
+
"aria-current": e.isActive ? "page" : void 0
|
|
245
|
+
});
|
|
246
|
+
return /* @__PURE__ */ D("li", { children: P ? /* @__PURE__ */ D(h, {
|
|
247
|
+
tooltip: e.label,
|
|
248
|
+
asChild: !0,
|
|
249
|
+
children: s
|
|
250
|
+
}) : s }, e.id);
|
|
251
|
+
}, ue = P ? /* @__PURE__ */ O(g, { children: [b, y] }) : /* @__PURE__ */ O(g, { children: [y, b] });
|
|
252
|
+
return /* @__PURE__ */ O("nav", {
|
|
253
|
+
ref: z,
|
|
254
|
+
id: L,
|
|
255
|
+
"aria-label": r.ariaLabel,
|
|
256
|
+
tabIndex: N ? -1 : void 0,
|
|
257
|
+
inert: N && !u,
|
|
258
|
+
onKeyDown: N ? ce : void 0,
|
|
259
|
+
style: {
|
|
260
|
+
...ee,
|
|
261
|
+
...W
|
|
262
|
+
},
|
|
263
|
+
className: t(U.sidebar, se(N, u), oe(N, P), j, I.sidebar),
|
|
264
|
+
children: [
|
|
265
|
+
!k?.itemActiveIcon && /* @__PURE__ */ D(ie, { activeGradientId: R }),
|
|
266
|
+
N ? /* @__PURE__ */ O("div", {
|
|
267
|
+
className: "flex shrink-0 flex-col",
|
|
268
|
+
children: [Z(), /* @__PURE__ */ D("ul", {
|
|
269
|
+
className: "m-0 flex list-none flex-col gap-1 p-2",
|
|
270
|
+
children: n.map($)
|
|
271
|
+
})]
|
|
272
|
+
}) : /* @__PURE__ */ O("div", {
|
|
273
|
+
className: "flex shrink-0 flex-col gap-4 p-4",
|
|
274
|
+
children: [/* @__PURE__ */ D("div", {
|
|
275
|
+
className: "flex h-10 items-center justify-between",
|
|
276
|
+
children: Q()
|
|
277
|
+
}), /* @__PURE__ */ D("ul", {
|
|
278
|
+
className: "m-0 flex list-none flex-col gap-1 p-0",
|
|
279
|
+
children: n.map($)
|
|
280
|
+
})]
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ D("div", {
|
|
283
|
+
inert: P,
|
|
284
|
+
className: t("min-h-0 flex-1 overflow-hidden", P && "invisible"),
|
|
285
|
+
children: /* @__PURE__ */ D("div", {
|
|
286
|
+
className: t("flex h-full flex-col", N ? "w-full" : "w-[336px]"),
|
|
287
|
+
children: v
|
|
288
|
+
})
|
|
289
|
+
}),
|
|
290
|
+
/* @__PURE__ */ D("div", {
|
|
291
|
+
className: t("flex shrink-0 px-4 py-3 shadow-lg", U.footer, P ? "flex-col items-start gap-2" : "items-center justify-between gap-2", I.sidebarFooter),
|
|
292
|
+
children: ue
|
|
293
|
+
})
|
|
294
|
+
]
|
|
295
|
+
});
|
|
296
|
+
}), W = /* @__PURE__ */ function(e) {
|
|
297
|
+
return e.Avatar = "avatar", e.Profile = "profile", e.Compact = "compact", e;
|
|
298
|
+
}({}), G = { avatar: "_avatar_4hc9t_4" }, K = v(({ shortName: e, className: r, textClassName: i = "dial-tiny-text" }) => /* @__PURE__ */ D(n, {
|
|
112
299
|
name: e ?? "",
|
|
113
300
|
initials: e ?? "",
|
|
114
301
|
size: 28,
|
|
115
302
|
textClassName: i,
|
|
116
|
-
className: t(
|
|
117
|
-
})),
|
|
118
|
-
let
|
|
119
|
-
return /* @__PURE__ */
|
|
303
|
+
className: t(G.avatar, r)
|
|
304
|
+
})), q = v(({ profile: e, alt: t, size: r = 28, initialsClassName: i = "dial-tiny-text" }) => {
|
|
305
|
+
let a = e.isFallbackShown || !e.imageUrl;
|
|
306
|
+
return /* @__PURE__ */ D(n, {
|
|
120
307
|
name: e.displayName,
|
|
121
308
|
initials: e.shortName ?? "",
|
|
122
|
-
src:
|
|
123
|
-
alt:
|
|
124
|
-
size:
|
|
125
|
-
textClassName:
|
|
126
|
-
className:
|
|
309
|
+
src: a ? void 0 : e.imageUrl,
|
|
310
|
+
alt: a ? "" : t,
|
|
311
|
+
size: r,
|
|
312
|
+
textClassName: i,
|
|
313
|
+
className: G.avatar,
|
|
127
314
|
onImageError: e.onImageError
|
|
128
315
|
});
|
|
129
|
-
}),
|
|
130
|
-
wrapper: "
|
|
131
|
-
trigger: "
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"--np-avatar-
|
|
138
|
-
"--np-
|
|
139
|
-
"--np-
|
|
140
|
-
"--np-
|
|
141
|
-
|
|
142
|
-
|
|
316
|
+
}), J = {
|
|
317
|
+
wrapper: "_wrapper_11e9t_1",
|
|
318
|
+
trigger: "_trigger_11e9t_5",
|
|
319
|
+
triggerOpen: "_triggerOpen_11e9t_18",
|
|
320
|
+
identityText: "_identityText_11e9t_22",
|
|
321
|
+
menuLabel: "_menuLabel_11e9t_26"
|
|
322
|
+
}, le = v(({ profile: n, labels: r, groups: l, onLogout: d, onSettings: f, triggerVariant: p = W.Avatar, isTooltipHidden: h, isIdentityHidden: g = !1, styles: _ }) => {
|
|
323
|
+
let { colors: v, typography: y, className: b, cssVars: x } = _ ?? {}, [S, w] = T(!1), k = p === W.Profile, j = p === W.Compact, M = k || j, P = y?.fontClassName ?? "dial-small-text", ne = C(() => e({
|
|
324
|
+
"--np-avatar-bg": v?.avatarBackground,
|
|
325
|
+
"--np-avatar-text": v?.avatarText,
|
|
326
|
+
"--np-menu-text": v?.text,
|
|
327
|
+
"--np-trigger-hover-bg": v?.triggerHoverBackground,
|
|
328
|
+
"--np-trigger-open-bg": v?.triggerOpenBackground,
|
|
329
|
+
"--np-focus-outline": v?.focusOutline,
|
|
330
|
+
"--np-font-family": y?.fontFamily
|
|
331
|
+
}), [v, y?.fontFamily]), F = C(() => t(J.menuLabel, P), [P]), I = C(() => {
|
|
332
|
+
let e = (l ?? []).filter(({ options: e }) => e.length > 0).map(({ id: e, label: t, icon: n, options: r }) => ({
|
|
143
333
|
key: e,
|
|
144
|
-
label: /* @__PURE__ */
|
|
145
|
-
className:
|
|
334
|
+
label: /* @__PURE__ */ D("span", {
|
|
335
|
+
className: F,
|
|
146
336
|
children: t
|
|
147
337
|
}),
|
|
148
338
|
icon: n,
|
|
149
339
|
children: r.map((e) => ({
|
|
150
340
|
key: e.id,
|
|
151
|
-
label: /* @__PURE__ */
|
|
152
|
-
className:
|
|
341
|
+
label: /* @__PURE__ */ D("span", {
|
|
342
|
+
className: F,
|
|
153
343
|
children: e.label
|
|
154
344
|
}),
|
|
155
345
|
icon: e.icon,
|
|
156
|
-
mark:
|
|
346
|
+
mark: m.Check,
|
|
157
347
|
checked: e.isActive,
|
|
158
348
|
onClick: e.onSelect
|
|
159
349
|
}))
|
|
160
|
-
}))
|
|
350
|
+
})), i = [...g ? [] : [{
|
|
351
|
+
key: "identity",
|
|
352
|
+
type: c.PlainText,
|
|
353
|
+
label: /* @__PURE__ */ O("div", {
|
|
354
|
+
className: "flex h-[40px] min-w-0 items-center gap-3",
|
|
355
|
+
children: [/* @__PURE__ */ D(K, { shortName: n.shortName }), /* @__PURE__ */ D(u, {
|
|
356
|
+
text: n.displayName,
|
|
357
|
+
className: t(J.identityText, P, "min-w-0 flex-1 truncate")
|
|
358
|
+
})]
|
|
359
|
+
})
|
|
360
|
+
}], ...e];
|
|
161
361
|
return [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
type: c.PlainText,
|
|
165
|
-
label: /* @__PURE__ */ w("div", {
|
|
166
|
-
className: "flex h-[40px] min-w-0 items-center gap-3",
|
|
167
|
-
children: [/* @__PURE__ */ C(I, { shortName: n.shortName }), /* @__PURE__ */ C(l, {
|
|
168
|
-
text: n.displayName,
|
|
169
|
-
className: t(R.identityText, x, "min-w-0 flex-1 truncate")
|
|
170
|
-
})]
|
|
171
|
-
})
|
|
172
|
-
},
|
|
173
|
-
...e,
|
|
174
|
-
{
|
|
362
|
+
...i,
|
|
363
|
+
...i.length > 0 ? [{
|
|
175
364
|
key: "divider-1",
|
|
176
365
|
type: c.Divider
|
|
177
|
-
},
|
|
178
|
-
...
|
|
366
|
+
}] : [],
|
|
367
|
+
...f ? [{
|
|
179
368
|
key: "settings",
|
|
180
|
-
label: /* @__PURE__ */
|
|
181
|
-
className:
|
|
369
|
+
label: /* @__PURE__ */ D("span", {
|
|
370
|
+
className: F,
|
|
182
371
|
children: r.settings
|
|
183
372
|
}),
|
|
184
|
-
icon: /* @__PURE__ */
|
|
373
|
+
icon: /* @__PURE__ */ D(N, {
|
|
185
374
|
size: a.SM,
|
|
186
375
|
"aria-hidden": !0,
|
|
187
376
|
stroke: o
|
|
188
377
|
}),
|
|
189
|
-
onClick:
|
|
378
|
+
onClick: f
|
|
190
379
|
}] : [],
|
|
191
380
|
{
|
|
192
381
|
key: "logout",
|
|
193
|
-
label: /* @__PURE__ */
|
|
194
|
-
className:
|
|
382
|
+
label: /* @__PURE__ */ D("span", {
|
|
383
|
+
className: F,
|
|
195
384
|
children: r.logOut
|
|
196
385
|
}),
|
|
197
|
-
icon: /* @__PURE__ */
|
|
386
|
+
icon: /* @__PURE__ */ D(te, {
|
|
198
387
|
size: a.SM,
|
|
199
388
|
"aria-hidden": !0,
|
|
200
389
|
stroke: o
|
|
@@ -203,52 +392,86 @@ var j = {
|
|
|
203
392
|
}
|
|
204
393
|
];
|
|
205
394
|
}, [
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
395
|
+
l,
|
|
396
|
+
g,
|
|
397
|
+
P,
|
|
398
|
+
F,
|
|
209
399
|
r.logOut,
|
|
210
400
|
r.settings,
|
|
211
401
|
d,
|
|
212
|
-
|
|
402
|
+
f,
|
|
213
403
|
n.displayName,
|
|
214
404
|
n.shortName
|
|
215
|
-
])
|
|
216
|
-
|
|
405
|
+
]), L = () => {
|
|
406
|
+
if (!k) return /* @__PURE__ */ D(i, {
|
|
407
|
+
"aria-label": r.trigger,
|
|
408
|
+
tooltipProps: {
|
|
409
|
+
tooltip: n.email,
|
|
410
|
+
hideTooltip: h
|
|
411
|
+
},
|
|
412
|
+
iconBefore: /* @__PURE__ */ D(q, {
|
|
413
|
+
profile: n,
|
|
414
|
+
alt: r.avatarAlt,
|
|
415
|
+
size: j ? 24 : void 0,
|
|
416
|
+
initialsClassName: y?.avatarInitialsClassName
|
|
417
|
+
}),
|
|
418
|
+
className: t(j ? "size-10! min-h-0! min-w-0! gap-0 rounded-full! border-0! p-2!" : "size-[44px] gap-0 rounded-full! p-0", J.trigger, j && S && J.triggerOpen)
|
|
419
|
+
});
|
|
420
|
+
let e = S ? ee : A;
|
|
421
|
+
return /* @__PURE__ */ D(i, {
|
|
422
|
+
tooltipProps: {
|
|
423
|
+
tooltip: n.email,
|
|
424
|
+
hideTooltip: h
|
|
425
|
+
},
|
|
426
|
+
iconBefore: /* @__PURE__ */ D(q, {
|
|
427
|
+
profile: n,
|
|
428
|
+
alt: "",
|
|
429
|
+
size: 24,
|
|
430
|
+
initialsClassName: y?.avatarInitialsClassName
|
|
431
|
+
}),
|
|
432
|
+
label: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(u, {
|
|
433
|
+
text: n.displayName,
|
|
434
|
+
className: t(J.identityText, P, "min-w-0 truncate")
|
|
435
|
+
}), /* @__PURE__ */ D("span", {
|
|
436
|
+
className: "sr-only",
|
|
437
|
+
children: r.trigger
|
|
438
|
+
})] }),
|
|
439
|
+
iconAfter: /* @__PURE__ */ D(e, {
|
|
440
|
+
size: a.SM,
|
|
441
|
+
stroke: o,
|
|
442
|
+
"aria-hidden": !0
|
|
443
|
+
}),
|
|
444
|
+
textClassName: "min-w-0",
|
|
445
|
+
className: t("h-10! min-h-0! max-w-full min-w-0! gap-2 rounded-full! border-0! p-2!", J.trigger, S && J.triggerOpen)
|
|
446
|
+
});
|
|
447
|
+
};
|
|
448
|
+
return /* @__PURE__ */ D("div", {
|
|
217
449
|
style: {
|
|
218
|
-
...
|
|
219
|
-
...
|
|
450
|
+
...x,
|
|
451
|
+
...ne
|
|
220
452
|
},
|
|
221
|
-
className: t(
|
|
222
|
-
children: /* @__PURE__ */
|
|
223
|
-
|
|
453
|
+
className: t(J.wrapper, M ? "flex min-w-0 items-center" : "flex size-[60px] items-center justify-center", k && "flex-1", b),
|
|
454
|
+
children: /* @__PURE__ */ D(s, {
|
|
455
|
+
className: M ? "max-w-full min-w-0" : void 0,
|
|
456
|
+
placement: M ? "top-start" : "top-end",
|
|
224
457
|
matchReferenceWidth: !1,
|
|
225
|
-
items:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
tooltipProps: {
|
|
229
|
-
tooltip: n.email,
|
|
230
|
-
hideTooltip: m
|
|
231
|
-
},
|
|
232
|
-
iconBefore: /* @__PURE__ */ C(L, {
|
|
233
|
-
profile: n,
|
|
234
|
-
alt: r.avatarAlt
|
|
235
|
-
}),
|
|
236
|
-
className: t("size-[44px] gap-0 !rounded-full p-0", R.trigger)
|
|
237
|
-
})
|
|
458
|
+
items: I,
|
|
459
|
+
onOpenChange: w,
|
|
460
|
+
children: L()
|
|
238
461
|
})
|
|
239
462
|
});
|
|
240
|
-
}),
|
|
241
|
-
let [c, l] =
|
|
242
|
-
|
|
463
|
+
}), Y = _(void 0), X = v(({ isOpen: e, onClose: t, children: n, title: r, closeLabel: i, backLabel: a, className: o, style: s }) => {
|
|
464
|
+
let [c, l] = T([]);
|
|
465
|
+
x(() => {
|
|
243
466
|
e || l([]);
|
|
244
467
|
}, [e]);
|
|
245
|
-
let u =
|
|
468
|
+
let u = y((e) => {
|
|
246
469
|
l((t) => [...t, e]);
|
|
247
|
-
}, []), d =
|
|
470
|
+
}, []), d = y(() => {
|
|
248
471
|
l((e) => e.slice(0, -1));
|
|
249
|
-
}, []), f =
|
|
472
|
+
}, []), f = y(() => {
|
|
250
473
|
l([]), t();
|
|
251
|
-
}, [t]), p =
|
|
474
|
+
}, [t]), p = C(() => ({
|
|
252
475
|
push: u,
|
|
253
476
|
pop: d,
|
|
254
477
|
close: f
|
|
@@ -257,9 +480,9 @@ var j = {
|
|
|
257
480
|
d,
|
|
258
481
|
f
|
|
259
482
|
]), m = c[c.length - 1];
|
|
260
|
-
return /* @__PURE__ */
|
|
483
|
+
return /* @__PURE__ */ D(Y.Provider, {
|
|
261
484
|
value: p,
|
|
262
|
-
children: /* @__PURE__ */
|
|
485
|
+
children: /* @__PURE__ */ D(F, {
|
|
263
486
|
isOpen: e,
|
|
264
487
|
onClose: f,
|
|
265
488
|
title: m?.title ?? r,
|
|
@@ -271,11 +494,11 @@ var j = {
|
|
|
271
494
|
children: m ? m.content : n
|
|
272
495
|
})
|
|
273
496
|
});
|
|
274
|
-
}),
|
|
275
|
-
let e =
|
|
497
|
+
}), Z = () => {
|
|
498
|
+
let e = b(Y);
|
|
276
499
|
if (!e) throw Error("useSheetNavigation must be used within a NavigableBottomSheet");
|
|
277
500
|
return e;
|
|
278
|
-
},
|
|
501
|
+
}, Q = {
|
|
279
502
|
sheet: "_sheet_1k0ml_1",
|
|
280
503
|
row: "_row_1k0ml_12",
|
|
281
504
|
rowActive: "_rowActive_1k0ml_24",
|
|
@@ -283,145 +506,147 @@ var j = {
|
|
|
283
506
|
divider: "_divider_1k0ml_46",
|
|
284
507
|
mutedText: "_mutedText_1k0ml_50",
|
|
285
508
|
activeIcon: "_activeIcon_1k0ml_54"
|
|
286
|
-
},
|
|
509
|
+
}, $ = v(({ label: e, onClick: n, icon: r, trailing: i, isCurrent: a = !1, isHighlighted: o = !1, textClassName: s = "dial-small-text" }) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */ D(p, {
|
|
287
510
|
label: e,
|
|
288
511
|
labelClassName: s,
|
|
289
|
-
icon: r && /* @__PURE__ */
|
|
290
|
-
className:
|
|
512
|
+
icon: r && /* @__PURE__ */ D("span", {
|
|
513
|
+
className: Q.rowIcon,
|
|
291
514
|
children: r
|
|
292
515
|
}),
|
|
293
516
|
trailing: i,
|
|
294
|
-
mark:
|
|
517
|
+
mark: m.Highlight,
|
|
295
518
|
selected: o,
|
|
296
519
|
"aria-current": a ? "true" : void 0,
|
|
297
|
-
className: t("h-auto gap-3 rounded-none px-4 py-[10px]",
|
|
520
|
+
className: t("h-auto gap-3 rounded-none px-4 py-[10px]", Q.row, o && Q.rowActive),
|
|
298
521
|
onClick: n
|
|
299
|
-
}) })),
|
|
300
|
-
let { pop: n } =
|
|
301
|
-
return /* @__PURE__ */
|
|
522
|
+
}) })), ue = v(({ options: e, textClassName: t }) => {
|
|
523
|
+
let { pop: n } = Z();
|
|
524
|
+
return /* @__PURE__ */ D("ul", {
|
|
302
525
|
className: "flex flex-col pb-4",
|
|
303
|
-
children: e.map((e) => /* @__PURE__ */
|
|
526
|
+
children: e.map((e) => /* @__PURE__ */ D($, {
|
|
304
527
|
label: e.label,
|
|
305
528
|
icon: e.icon,
|
|
306
529
|
textClassName: t,
|
|
307
530
|
isCurrent: e.isActive,
|
|
308
|
-
trailing: e.isActive ? /* @__PURE__ */
|
|
531
|
+
trailing: e.isActive ? /* @__PURE__ */ D(k, {
|
|
309
532
|
size: a.SM,
|
|
310
533
|
stroke: o,
|
|
311
534
|
"aria-hidden": !0,
|
|
312
|
-
className:
|
|
535
|
+
className: Q.activeIcon
|
|
313
536
|
}) : void 0,
|
|
314
537
|
onClick: () => {
|
|
315
538
|
e.onSelect(), n();
|
|
316
539
|
}
|
|
317
540
|
}, e.id))
|
|
318
541
|
});
|
|
319
|
-
}),
|
|
320
|
-
let { push:
|
|
321
|
-
return /* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
542
|
+
}), de = v(({ profile: e, logOutLabel: n, onLogout: i, settingsLabel: a, onSettings: s, groups: c, textClassName: l = "dial-small-text", avatarInitialsClassName: d }) => {
|
|
543
|
+
let { push: f, close: p } = Z(), m = (c ?? []).filter(({ options: e }) => e.length > 0);
|
|
544
|
+
return /* @__PURE__ */ O(E, { children: [
|
|
545
|
+
/* @__PURE__ */ O("div", {
|
|
323
546
|
className: "flex h-[56px] items-center gap-3 px-4 py-2",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ D(q, {
|
|
325
548
|
profile: e,
|
|
326
|
-
alt: ""
|
|
327
|
-
|
|
549
|
+
alt: "",
|
|
550
|
+
initialsClassName: d
|
|
551
|
+
}), /* @__PURE__ */ D(u, {
|
|
328
552
|
text: e.displayName,
|
|
329
|
-
className: t(
|
|
553
|
+
className: t(Q.mutedText, l, "min-w-0 flex-1 truncate")
|
|
330
554
|
})]
|
|
331
555
|
}),
|
|
332
|
-
|
|
556
|
+
m.length > 0 && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("ul", {
|
|
333
557
|
className: "flex flex-col",
|
|
334
|
-
children:
|
|
558
|
+
children: m.map((e) => /* @__PURE__ */ D($, {
|
|
335
559
|
label: e.label,
|
|
336
560
|
icon: e.icon,
|
|
337
|
-
textClassName:
|
|
338
|
-
trailing: /* @__PURE__ */
|
|
561
|
+
textClassName: l,
|
|
562
|
+
trailing: /* @__PURE__ */ D(j, {
|
|
339
563
|
size: r,
|
|
340
564
|
stroke: o,
|
|
341
565
|
"aria-hidden": !0,
|
|
342
|
-
className: t(
|
|
566
|
+
className: t(Q.rowIcon, "rtl:scale-x-[-1]")
|
|
343
567
|
}),
|
|
344
|
-
onClick: () =>
|
|
568
|
+
onClick: () => f({
|
|
345
569
|
title: e.label,
|
|
346
|
-
content: /* @__PURE__ */
|
|
570
|
+
content: /* @__PURE__ */ D(ue, {
|
|
347
571
|
options: e.options,
|
|
348
|
-
textClassName:
|
|
572
|
+
textClassName: l
|
|
349
573
|
})
|
|
350
574
|
})
|
|
351
575
|
}, e.id))
|
|
352
|
-
}), /* @__PURE__ */
|
|
353
|
-
/* @__PURE__ */
|
|
576
|
+
}), /* @__PURE__ */ D("hr", { className: Q.divider })] }),
|
|
577
|
+
/* @__PURE__ */ O("ul", {
|
|
354
578
|
className: "flex flex-col pb-4",
|
|
355
|
-
children: [s && a && /* @__PURE__ */
|
|
579
|
+
children: [s && a && /* @__PURE__ */ D($, {
|
|
356
580
|
label: a,
|
|
357
|
-
textClassName:
|
|
358
|
-
icon: /* @__PURE__ */
|
|
581
|
+
textClassName: l,
|
|
582
|
+
icon: /* @__PURE__ */ D(N, {
|
|
359
583
|
size: r,
|
|
360
584
|
stroke: o,
|
|
361
585
|
"aria-hidden": !0
|
|
362
586
|
}),
|
|
363
587
|
onClick: () => {
|
|
364
|
-
|
|
588
|
+
p(), s?.();
|
|
365
589
|
}
|
|
366
|
-
}), /* @__PURE__ */
|
|
590
|
+
}), /* @__PURE__ */ D($, {
|
|
367
591
|
label: n,
|
|
368
|
-
textClassName:
|
|
369
|
-
icon: /* @__PURE__ */
|
|
592
|
+
textClassName: l,
|
|
593
|
+
icon: /* @__PURE__ */ D(te, {
|
|
370
594
|
size: r,
|
|
371
595
|
stroke: o,
|
|
372
596
|
"aria-hidden": !0
|
|
373
597
|
}),
|
|
374
598
|
onClick: () => {
|
|
375
|
-
|
|
599
|
+
p(), i();
|
|
376
600
|
}
|
|
377
601
|
})]
|
|
378
602
|
})
|
|
379
603
|
] });
|
|
380
|
-
}),
|
|
381
|
-
let { push:
|
|
382
|
-
|
|
604
|
+
}), fe = v(({ items: e, onSelectItem: t, profileLabel: n, logOutLabel: i, onLogout: a, settingsLabel: s, onSettings: c, profile: l, groups: u, footer: d, textClassName: f, avatarInitialsClassName: p }) => {
|
|
605
|
+
let { push: m, close: h } = Z(), g = (e) => {
|
|
606
|
+
h(), t(e);
|
|
383
607
|
};
|
|
384
|
-
return /* @__PURE__ */
|
|
608
|
+
return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O("ul", {
|
|
385
609
|
className: "flex flex-col pb-4",
|
|
386
610
|
children: [e.map((e) => {
|
|
387
611
|
let t = e.isActive && e.activeIcon || e.icon;
|
|
388
|
-
return /* @__PURE__ */
|
|
612
|
+
return /* @__PURE__ */ D($, {
|
|
389
613
|
label: e.label,
|
|
390
614
|
textClassName: f,
|
|
391
615
|
isCurrent: e.isActive,
|
|
392
616
|
isHighlighted: e.isActive,
|
|
393
|
-
icon: /* @__PURE__ */
|
|
617
|
+
icon: /* @__PURE__ */ D(t, {
|
|
394
618
|
size: r,
|
|
395
619
|
stroke: o
|
|
396
620
|
}),
|
|
397
|
-
onClick: () =>
|
|
621
|
+
onClick: () => g(e)
|
|
398
622
|
}, e.id);
|
|
399
|
-
}), l && /* @__PURE__ */
|
|
623
|
+
}), l && /* @__PURE__ */ D($, {
|
|
400
624
|
label: n,
|
|
401
625
|
textClassName: f,
|
|
402
|
-
icon: /* @__PURE__ */
|
|
626
|
+
icon: /* @__PURE__ */ D(P, {
|
|
403
627
|
size: r,
|
|
404
628
|
stroke: o,
|
|
405
629
|
"aria-hidden": !0
|
|
406
630
|
}),
|
|
407
631
|
onClick: () => {
|
|
408
|
-
l &&
|
|
632
|
+
l && m({
|
|
409
633
|
title: n,
|
|
410
|
-
content: /* @__PURE__ */
|
|
634
|
+
content: /* @__PURE__ */ D(de, {
|
|
411
635
|
profile: l,
|
|
412
636
|
groups: u,
|
|
413
637
|
logOutLabel: i,
|
|
414
638
|
onLogout: a,
|
|
415
639
|
settingsLabel: s,
|
|
416
640
|
onSettings: c,
|
|
417
|
-
textClassName: f
|
|
641
|
+
textClassName: f,
|
|
642
|
+
avatarInitialsClassName: p
|
|
418
643
|
})
|
|
419
644
|
});
|
|
420
645
|
}
|
|
421
646
|
})]
|
|
422
647
|
}), d] });
|
|
423
|
-
}),
|
|
424
|
-
let { colors: p, typography: m, className: h, cssVars: g } = f ?? {}, _ =
|
|
648
|
+
}), pe = v(({ isOpen: n, onClose: r, items: i, onSelectItem: a, labels: o, profile: s, groups: c, onLogout: l, onSettings: u, footer: d, styles: f }) => {
|
|
649
|
+
let { colors: p, typography: m, className: h, cssVars: g } = f ?? {}, _ = C(() => e({
|
|
425
650
|
"--np-sheet-text": p?.text,
|
|
426
651
|
"--np-sheet-item-hover": p?.itemHoverBackground,
|
|
427
652
|
"--np-sheet-item-active": p?.itemActiveBackground,
|
|
@@ -433,20 +658,21 @@ var j = {
|
|
|
433
658
|
"--np-avatar-bg": p?.avatarBackground,
|
|
434
659
|
"--np-avatar-text": p?.avatarText,
|
|
435
660
|
"--np-menu-active-icon": p?.activeIcon,
|
|
661
|
+
"--np-sheet-muted-text": p?.mutedText,
|
|
436
662
|
"--np-font-family": m?.fontFamily
|
|
437
663
|
}), [p, m?.fontFamily]);
|
|
438
|
-
return /* @__PURE__ */
|
|
664
|
+
return /* @__PURE__ */ D(X, {
|
|
439
665
|
isOpen: n,
|
|
440
666
|
onClose: r,
|
|
441
667
|
title: o.title,
|
|
442
668
|
closeLabel: o.close,
|
|
443
669
|
backLabel: o.back,
|
|
444
|
-
className: t(
|
|
670
|
+
className: t(Q.sheet, h),
|
|
445
671
|
style: {
|
|
446
672
|
...g,
|
|
447
673
|
..._
|
|
448
674
|
},
|
|
449
|
-
children: /* @__PURE__ */
|
|
675
|
+
children: /* @__PURE__ */ D(fe, {
|
|
450
676
|
items: i,
|
|
451
677
|
onSelectItem: a,
|
|
452
678
|
profileLabel: o.profile,
|
|
@@ -457,9 +683,10 @@ var j = {
|
|
|
457
683
|
profile: s,
|
|
458
684
|
groups: c,
|
|
459
685
|
footer: d,
|
|
460
|
-
textClassName: m?.fontClassName
|
|
686
|
+
textClassName: m?.fontClassName,
|
|
687
|
+
avatarInitialsClassName: m?.avatarInitialsClassName
|
|
461
688
|
})
|
|
462
689
|
});
|
|
463
690
|
});
|
|
464
691
|
//#endregion
|
|
465
|
-
export {
|
|
692
|
+
export { K as AvatarInitials, I as NAVIGATION_PANEL_CLASS, X as NavigableBottomSheet, fe as NavigationMenuPage, z as NavigationPanel, pe as NavigationSheet, ce as NavigationSidebar, B as NavigationSidebarVariant, ue as OptionListPage, de as ProfilePage, $ as SheetRow, q as UserAvatar, le as UserMenu, W as UserMenuTriggerVariant, Z as useSheetNavigation };
|