@acronis-platform/ui-react 0.53.0 → 0.55.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/components/ui/avatar/avatar.js +1 -1
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +5 -5
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/chip/chip.js +1 -1
- package/dist/components/ui/chip/chip.js.map +1 -1
- package/dist/components/ui/combobox/combobox.js +51 -47
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/data-table/data-table-column-header.js +7 -7
- package/dist/components/ui/data-table/data-table-column-header.js.map +1 -1
- package/dist/components/ui/data-table/data-table-view-options.js +4 -4
- package/dist/components/ui/data-table/data-table-view-options.js.map +1 -1
- package/dist/components/ui/data-table/data-table.js +1 -1
- package/dist/components/ui/data-table/data-table.js.map +1 -1
- package/dist/components/ui/dialog/dialog.js +36 -35
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +55 -54
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/filter-search/filter-search.js +28 -0
- package/dist/components/ui/filter-search/filter-search.js.map +1 -0
- package/dist/components/ui/input-date-picker/input-date-picker.js +8 -8
- package/dist/components/ui/input-date-picker/input-date-picker.js.map +1 -1
- package/dist/components/ui/input-search/input-search.js +11 -12
- package/dist/components/ui/input-search/input-search.js.map +1 -1
- package/dist/components/ui/input-select/input-select.js +72 -68
- package/dist/components/ui/input-select/input-select.js.map +1 -1
- package/dist/components/ui/input-text/input-text.js +6 -6
- package/dist/components/ui/input-text/input-text.js.map +1 -1
- package/dist/components/ui/popover/popover.js +18 -17
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/resizable/resizable.js +24 -32
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js +61 -0
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/ui/sheet/sheet.js +38 -37
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/sidebar-primary/sidebar-primary.js +203 -141
- package/dist/components/ui/sidebar-primary/sidebar-primary.js.map +1 -1
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +509 -351
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
- package/dist/components/ui/switch/switch.js +6 -6
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/table/table.js +7 -7
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/tabs/tabs.js +11 -11
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/toast/toast.js +35 -33
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/tooltip/tooltip.js +41 -37
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/index.js +353 -349
- package/dist/index.js.map +1 -1
- package/dist/lib/portal-container.js +14 -0
- package/dist/lib/portal-container.js.map +1 -0
- package/dist/react.js +353 -349
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/filter-search/filter-search.d.ts +6 -0
- package/dist/src/components/ui/filter-search/index.d.ts +2 -0
- package/dist/src/components/ui/resizable/index.d.ts +2 -1
- package/dist/src/components/ui/resizable/resizable.d.ts +2 -5
- package/dist/src/components/ui/scroll-area/index.d.ts +1 -0
- package/dist/src/components/ui/scroll-area/scroll-area.d.ts +10 -0
- package/dist/src/components/ui/sidebar-primary/sidebar-primary.d.ts +48 -3
- package/dist/src/components/ui/sidebar-secondary/index.d.ts +1 -1
- package/dist/src/components/ui/sidebar-secondary/sidebar-secondary.d.ts +38 -33
- package/dist/src/index.d.ts +3 -0
- package/dist/src/lib/portal-container.d.ts +36 -0
- package/dist/ui-react.css +1 -1
- package/package.json +2 -3
|
@@ -1,251 +1,467 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { mergeProps as
|
|
4
|
-
import { useRender as
|
|
5
|
-
import { Collapsible as
|
|
6
|
-
import {
|
|
7
|
-
import { cva as
|
|
8
|
-
import { cn as
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
1
|
+
import { jsxs as f, Fragment as _, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { mergeProps as j } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender as q } from "@base-ui/react/use-render";
|
|
5
|
+
import { Collapsible as X } from "@base-ui/react/collapsible";
|
|
6
|
+
import { SquareArrowUpRightIcon as ae, ChevronDownIcon as G } from "@acronis-platform/icons-react/stroke-mono";
|
|
7
|
+
import { cva as te } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
|
8
|
+
import { cn as b } from "../../../lib/utils.js";
|
|
9
|
+
import { Tooltip as P, TooltipTrigger as A, TooltipContent as M } from "../tooltip/tooltip.js";
|
|
10
|
+
function J() {
|
|
11
|
+
const [t, r] = n.useState("ltr");
|
|
12
|
+
return n.useEffect(() => {
|
|
13
|
+
r(document.documentElement.dir === "rtl" ? "rtl" : "ltr");
|
|
14
|
+
}, []), t;
|
|
15
|
+
}
|
|
16
|
+
function K(t, { enabled: r }) {
|
|
17
|
+
const [s, l] = n.useState(!1);
|
|
18
|
+
return n.useEffect(() => {
|
|
19
|
+
const i = t.current;
|
|
20
|
+
if (!r || !i) {
|
|
21
|
+
l(!1);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const a = () => l(i.scrollWidth > i.clientWidth);
|
|
25
|
+
a();
|
|
26
|
+
const o = new ResizeObserver(a);
|
|
27
|
+
return o.observe(i), () => o.disconnect();
|
|
28
|
+
}, [t, r]), s;
|
|
29
|
+
}
|
|
30
|
+
const R = 256, Q = R * 2, Y = /* @__PURE__ */ f(_, { children: [
|
|
31
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: "Resize:" }),
|
|
32
|
+
" Drag",
|
|
33
|
+
/* @__PURE__ */ e("br", {}),
|
|
34
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: "Collapse:" }),
|
|
35
|
+
" Click",
|
|
36
|
+
/* @__PURE__ */ e("br", {}),
|
|
37
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: "Reset size:" }),
|
|
38
|
+
" Double click"
|
|
39
|
+
] }), Z = /* @__PURE__ */ f(_, { children: [
|
|
40
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: "Resize:" }),
|
|
41
|
+
" Drag",
|
|
42
|
+
/* @__PURE__ */ e("br", {}),
|
|
43
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: "Expand:" }),
|
|
44
|
+
" Click"
|
|
45
|
+
] }), $ = n.createContext(null);
|
|
46
|
+
function I() {
|
|
47
|
+
return n.useContext($) ?? {
|
|
12
48
|
expanded: !0,
|
|
13
49
|
toggleExpanded: () => {
|
|
14
|
-
}
|
|
50
|
+
},
|
|
51
|
+
resizable: !1,
|
|
52
|
+
width: R,
|
|
53
|
+
setWidth: () => {
|
|
54
|
+
},
|
|
55
|
+
minWidth: R,
|
|
56
|
+
maxWidth: Q,
|
|
57
|
+
defaultWidth: R,
|
|
58
|
+
headerLabel: void 0,
|
|
59
|
+
setHeaderLabel: () => {
|
|
60
|
+
},
|
|
61
|
+
selectedLabel: void 0,
|
|
62
|
+
setSelectedLabel: () => {
|
|
63
|
+
},
|
|
64
|
+
resizeAriaLabel: "Resize sidebar",
|
|
65
|
+
resizeTooltipExpanded: Y,
|
|
66
|
+
resizeTooltipCollapsed: Z
|
|
15
67
|
};
|
|
16
68
|
}
|
|
17
|
-
function
|
|
18
|
-
const [
|
|
19
|
-
(
|
|
20
|
-
|
|
69
|
+
function ne(t, r, s) {
|
|
70
|
+
const [l, i] = n.useState(r), a = t !== void 0, o = a ? t : l, u = n.useCallback(
|
|
71
|
+
(d) => {
|
|
72
|
+
a || i(d), s == null || s(d);
|
|
21
73
|
},
|
|
22
|
-
[
|
|
74
|
+
[a, s]
|
|
23
75
|
);
|
|
24
|
-
return [
|
|
76
|
+
return [o, u];
|
|
25
77
|
}
|
|
26
|
-
|
|
78
|
+
function ie() {
|
|
79
|
+
const t = I(), { expanded: r, toggleExpanded: s, resizable: l } = t, i = J(), a = n.useRef(t);
|
|
80
|
+
a.current = t;
|
|
81
|
+
const o = n.useRef(!1), [u, d] = n.useState(!1), [c, v] = n.useState(!1), m = n.useRef(
|
|
82
|
+
null
|
|
83
|
+
);
|
|
84
|
+
if (n.useEffect(() => () => {
|
|
85
|
+
m.current && clearTimeout(m.current);
|
|
86
|
+
}, []), !l) return null;
|
|
87
|
+
const S = (p) => {
|
|
88
|
+
p.preventDefault();
|
|
89
|
+
const C = p.currentTarget;
|
|
90
|
+
C.setPointerCapture(p.pointerId), o.current = !1, v(!0), d(!1);
|
|
91
|
+
const h = C.closest("[data-state]");
|
|
92
|
+
if (!h) {
|
|
93
|
+
v(!1), C.releasePointerCapture(p.pointerId);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
h.style.transitionProperty = "none";
|
|
97
|
+
const w = getComputedStyle(h).direction === "rtl", N = h.getBoundingClientRect(), { minWidth: x, maxWidth: T } = a.current, y = x / 2, z = (O) => {
|
|
98
|
+
o.current = !0;
|
|
99
|
+
const D = w ? N.right - O.clientX : O.clientX - N.left, { expanded: B } = a.current;
|
|
100
|
+
B ? D < y ? a.current.toggleExpanded() : a.current.setWidth(
|
|
101
|
+
Math.min(Math.max(D, x), T)
|
|
102
|
+
) : D > y && a.current.toggleExpanded();
|
|
103
|
+
}, W = () => {
|
|
104
|
+
v(!1), h && (h.style.transitionProperty = ""), window.removeEventListener("pointermove", z), window.removeEventListener("pointerup", W);
|
|
105
|
+
};
|
|
106
|
+
window.addEventListener("pointermove", z), window.addEventListener("pointerup", W);
|
|
107
|
+
}, E = () => {
|
|
108
|
+
o.current || (m.current && clearTimeout(m.current), m.current = setTimeout(() => {
|
|
109
|
+
s();
|
|
110
|
+
}, 250));
|
|
111
|
+
}, L = () => {
|
|
112
|
+
m.current && (clearTimeout(m.current), m.current = null), r || s(), a.current.setWidth(a.current.defaultWidth);
|
|
113
|
+
}, g = (p) => {
|
|
114
|
+
const {
|
|
115
|
+
minWidth: C,
|
|
116
|
+
maxWidth: h,
|
|
117
|
+
defaultWidth: w,
|
|
118
|
+
width: N,
|
|
119
|
+
setWidth: x,
|
|
120
|
+
expanded: T,
|
|
121
|
+
toggleExpanded: y
|
|
122
|
+
} = a.current, z = 16, W = i === "rtl" ? "ArrowLeft" : "ArrowRight", O = i === "rtl" ? "ArrowRight" : "ArrowLeft";
|
|
123
|
+
if (p.key === W && T)
|
|
124
|
+
p.preventDefault(), x(Math.min(N + z, h));
|
|
125
|
+
else if (p.key === O && T) {
|
|
126
|
+
p.preventDefault();
|
|
127
|
+
const D = N - z;
|
|
128
|
+
D < C ? y() : x(D);
|
|
129
|
+
} else p.key === "Enter" ? (p.preventDefault(), y()) : p.key === "Home" && (p.preventDefault(), T || y(), x(w));
|
|
130
|
+
};
|
|
131
|
+
return /* @__PURE__ */ f(P, { open: u, onOpenChange: (p) => {
|
|
132
|
+
c || d(p);
|
|
133
|
+
}, children: [
|
|
134
|
+
/* @__PURE__ */ e(
|
|
135
|
+
A,
|
|
136
|
+
{
|
|
137
|
+
render: /* @__PURE__ */ e(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
role: "separator",
|
|
141
|
+
"aria-orientation": "vertical",
|
|
142
|
+
"aria-label": t.resizeAriaLabel,
|
|
143
|
+
className: b(
|
|
144
|
+
// 9px hit area matching ResizableHandle, absolutely positioned on inline-end edge.
|
|
145
|
+
// No after: divider — the sidebar's own border-e changes color via :has() on hover/active/focus.
|
|
146
|
+
"absolute end-0 top-0 h-full w-[9px] ltr:translate-x-1/2 rtl:-translate-x-1/2 cursor-[var(--ui-resizable-cursor,ew-resize)] z-10",
|
|
147
|
+
"focus-visible:outline-none"
|
|
148
|
+
),
|
|
149
|
+
tabIndex: 0,
|
|
150
|
+
onKeyDown: g,
|
|
151
|
+
onPointerDown: S,
|
|
152
|
+
onClick: E,
|
|
153
|
+
onDoubleClick: L
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
(r ? t.resizeTooltipExpanded : t.resizeTooltipCollapsed) != null && /* @__PURE__ */ e(M, { side: i === "rtl" ? "left" : "right", align: "center", children: r ? t.resizeTooltipExpanded : t.resizeTooltipCollapsed })
|
|
159
|
+
] });
|
|
160
|
+
}
|
|
161
|
+
const se = n.forwardRef(
|
|
27
162
|
({
|
|
28
|
-
className:
|
|
29
|
-
expanded:
|
|
30
|
-
defaultExpanded:
|
|
31
|
-
onExpandedChange:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
163
|
+
className: t,
|
|
164
|
+
expanded: r,
|
|
165
|
+
defaultExpanded: s = !0,
|
|
166
|
+
onExpandedChange: l,
|
|
167
|
+
resizable: i = !0,
|
|
168
|
+
width: a,
|
|
169
|
+
onWidthChange: o,
|
|
170
|
+
resizeAriaLabel: u = "Resize sidebar",
|
|
171
|
+
resizeTooltipExpanded: d = Y,
|
|
172
|
+
resizeTooltipCollapsed: c = Z,
|
|
173
|
+
"aria-label": v = "Section navigation",
|
|
174
|
+
render: m,
|
|
175
|
+
children: S,
|
|
176
|
+
...E
|
|
177
|
+
}, L) => {
|
|
178
|
+
const [g, k] = ne(
|
|
39
179
|
r,
|
|
40
|
-
s
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
180
|
+
s,
|
|
181
|
+
l
|
|
182
|
+
), [p, C] = n.useState(R), h = a !== void 0, w = h ? a : p, N = n.useCallback(
|
|
183
|
+
(F) => {
|
|
184
|
+
h || C(F), o == null || o(F);
|
|
185
|
+
},
|
|
186
|
+
[h, o]
|
|
187
|
+
), [x, T] = n.useState(void 0), [y, z] = n.useState(void 0), W = n.useMemo(
|
|
188
|
+
() => ({
|
|
189
|
+
expanded: g,
|
|
190
|
+
toggleExpanded: () => k(!g),
|
|
191
|
+
resizable: i,
|
|
192
|
+
width: w,
|
|
193
|
+
setWidth: N,
|
|
194
|
+
minWidth: R,
|
|
195
|
+
maxWidth: Q,
|
|
196
|
+
defaultWidth: R,
|
|
197
|
+
headerLabel: x,
|
|
198
|
+
setHeaderLabel: T,
|
|
199
|
+
selectedLabel: y,
|
|
200
|
+
setSelectedLabel: z,
|
|
201
|
+
resizeAriaLabel: u,
|
|
202
|
+
resizeTooltipExpanded: d,
|
|
203
|
+
resizeTooltipCollapsed: c
|
|
204
|
+
}),
|
|
205
|
+
[
|
|
206
|
+
g,
|
|
207
|
+
k,
|
|
208
|
+
i,
|
|
209
|
+
w,
|
|
210
|
+
N,
|
|
211
|
+
x,
|
|
212
|
+
y,
|
|
213
|
+
u,
|
|
214
|
+
d,
|
|
215
|
+
c
|
|
216
|
+
]
|
|
217
|
+
), B = q({
|
|
218
|
+
render: m,
|
|
219
|
+
ref: L,
|
|
47
220
|
defaultTagName: "nav",
|
|
48
|
-
props:
|
|
221
|
+
props: j(
|
|
49
222
|
{
|
|
50
|
-
"aria-label":
|
|
51
|
-
"data-state":
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
223
|
+
"aria-label": v,
|
|
224
|
+
"data-state": g ? "expanded" : "collapsed",
|
|
225
|
+
style: i && g && (h || w !== R) ? { width: w } : void 0,
|
|
226
|
+
className: b(
|
|
227
|
+
"group/sidebar relative flex h-full flex-col bg-[var(--ui-sidebar-secondary-global-container-color)] border-e border-[var(--ui-sidebar-secondary-global-container-border-color)] [border-inline-end-width:var(--ui-sidebar-secondary-global-container-border-width)] w-[var(--ui-sidebar-secondary-collapsed-container-width)] data-[state=expanded]:w-[var(--ui-sidebar-secondary-expanded-container-width)] transition-[width]",
|
|
228
|
+
i && "transition-[width,border-color] has-[[role=separator]:hover]:border-[var(--ui-resizable-border-color-hover)] has-[[role=separator]:active]:border-[var(--ui-resizable-border-color-active)] has-[[role=separator]:focus-visible]:border-[var(--ui-resizable-border-color-hover)] has-[[role=separator]:focus-visible]:ring-[3px] has-[[role=separator]:focus-visible]:ring-[var(--ui-focus-primary)]",
|
|
229
|
+
t
|
|
55
230
|
),
|
|
56
|
-
children:
|
|
231
|
+
children: /* @__PURE__ */ f(_, { children: [
|
|
232
|
+
/* @__PURE__ */ e(ee, {}),
|
|
233
|
+
S,
|
|
234
|
+
/* @__PURE__ */ e(ie, {})
|
|
235
|
+
] })
|
|
57
236
|
},
|
|
58
|
-
|
|
237
|
+
E
|
|
59
238
|
)
|
|
60
239
|
});
|
|
61
|
-
return /* @__PURE__ */
|
|
240
|
+
return /* @__PURE__ */ e($.Provider, { value: W, children: B });
|
|
62
241
|
}
|
|
63
242
|
);
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
243
|
+
se.displayName = "SidebarSecondary";
|
|
244
|
+
const oe = n.forwardRef(({ className: t, label: r, children: s, ...l }, i) => {
|
|
245
|
+
const { setHeaderLabel: a } = I(), o = r ?? s;
|
|
246
|
+
return n.useEffect(() => {
|
|
247
|
+
a(o);
|
|
248
|
+
}, [o, a]), /* @__PURE__ */ e(
|
|
69
249
|
"div",
|
|
70
250
|
{
|
|
71
251
|
ref: i,
|
|
72
|
-
className:
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"px-[var(--ui-sidebar-secondary-
|
|
76
|
-
|
|
77
|
-
n
|
|
252
|
+
className: b(
|
|
253
|
+
"hidden items-center shrink-0",
|
|
254
|
+
"group-data-[state=expanded]/sidebar:flex",
|
|
255
|
+
"px-[var(--ui-sidebar-secondary-global-container-header-padding-x)] py-[var(--ui-sidebar-secondary-global-container-header-padding-y)]",
|
|
256
|
+
t
|
|
78
257
|
),
|
|
79
|
-
...
|
|
80
|
-
children: /* @__PURE__ */
|
|
258
|
+
...l,
|
|
259
|
+
children: /* @__PURE__ */ e("h2", { className: "ui-sidebar-secondary-global-header-label-text-style truncate text-[var(--ui-sidebar-secondary-global-header-label-color)]", children: o })
|
|
81
260
|
}
|
|
82
|
-
)
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
const
|
|
261
|
+
);
|
|
262
|
+
});
|
|
263
|
+
oe.displayName = "SidebarSecondaryHeader";
|
|
264
|
+
const le = n.forwardRef(({ className: t, ...r }, s) => (
|
|
86
265
|
// Expanded: the section list. Hidden in collapsed mode, where the
|
|
87
266
|
// CollapsedBreadcrumb sibling takes over.
|
|
88
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ e(
|
|
89
268
|
"div",
|
|
90
269
|
{
|
|
91
|
-
ref:
|
|
92
|
-
className:
|
|
270
|
+
ref: s,
|
|
271
|
+
className: b(
|
|
93
272
|
"flex flex-1 flex-col overflow-y-auto gap-[var(--ui-sidebar-secondary-global-section-list-gap)]",
|
|
94
273
|
"hidden group-data-[state=expanded]/sidebar:flex",
|
|
95
|
-
|
|
274
|
+
t
|
|
96
275
|
),
|
|
97
|
-
...
|
|
276
|
+
...r
|
|
98
277
|
}
|
|
99
278
|
)
|
|
100
279
|
));
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"flex flex-1 flex-col items-center",
|
|
118
|
-
"gap-[var(--ui-sidebar-secondary-collapsed-container-content-gap)] py-[var(--ui-sidebar-secondary-collapsed-container-content-padding-y)]",
|
|
119
|
-
"flex group-data-[state=expanded]/sidebar:hidden",
|
|
120
|
-
n
|
|
121
|
-
),
|
|
122
|
-
...i,
|
|
123
|
-
children: [
|
|
124
|
-
/* @__PURE__ */ a("span", { className: "ui-sidebar-secondary-collapsed-breadcrumb-label-text-style whitespace-nowrap [writing-mode:vertical-rl] text-[var(--ui-sidebar-secondary-collapsed-breadcrumb-label-color)]", children: e }),
|
|
125
|
-
/* @__PURE__ */ a(
|
|
126
|
-
"span",
|
|
127
|
-
{
|
|
128
|
-
"aria-hidden": "true",
|
|
129
|
-
className: "inline-flex items-center text-[var(--ui-sidebar-secondary-collapsed-icon-separator-color)] [&>svg]:size-[var(--ui-sidebar-secondary-collapsed-icon-separator-size)]",
|
|
130
|
-
children: s ?? /* @__PURE__ */ a(k, { size: 16, className: "rotate-90" })
|
|
131
|
-
}
|
|
280
|
+
le.displayName = "SidebarSecondaryContent";
|
|
281
|
+
const ee = n.forwardRef(({ className: t, parentLabel: r, currentLabel: s, separator: l, ...i }, a) => {
|
|
282
|
+
const { headerLabel: o, selectedLabel: u } = I(), d = r ?? o, c = s ?? u;
|
|
283
|
+
return (
|
|
284
|
+
// Shown only in collapsed mode — toggled by the same data-[state] selector so
|
|
285
|
+
// it stays in the DOM (SSR-present) with no JS branch. Laid out vertically:
|
|
286
|
+
// parent → separator → current page.
|
|
287
|
+
/* @__PURE__ */ f(
|
|
288
|
+
"div",
|
|
289
|
+
{
|
|
290
|
+
ref: a,
|
|
291
|
+
className: b(
|
|
292
|
+
"flex flex-1 flex-col items-center min-h-0",
|
|
293
|
+
"gap-[var(--ui-sidebar-secondary-collapsed-container-content-gap)] py-[var(--ui-sidebar-secondary-collapsed-container-content-padding-y)]",
|
|
294
|
+
"flex group-data-[state=expanded]/sidebar:hidden",
|
|
295
|
+
t
|
|
132
296
|
),
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
297
|
+
...i,
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ e("span", { className: "[writing-mode:vertical-rl] [direction:ltr] shrink-0 ui-sidebar-secondary-collapsed-breadcrumb-label-text-style text-[var(--ui-sidebar-secondary-collapsed-breadcrumb-label-color)]", children: d }),
|
|
300
|
+
/* @__PURE__ */ e(
|
|
301
|
+
"span",
|
|
302
|
+
{
|
|
303
|
+
"aria-hidden": "true",
|
|
304
|
+
className: "inline-flex items-center text-[var(--ui-sidebar-secondary-collapsed-icon-separator-color)] [&>svg]:size-[var(--ui-sidebar-secondary-collapsed-icon-separator-size)]",
|
|
305
|
+
children: l ?? /* @__PURE__ */ e(G, { size: 16 })
|
|
306
|
+
}
|
|
307
|
+
),
|
|
308
|
+
/* @__PURE__ */ e("span", { className: "[writing-mode:vertical-rl] [direction:ltr] flex-1 min-h-0 overflow-hidden ui-sidebar-secondary-collapsed-label-current-page-text-style text-[var(--ui-sidebar-secondary-collapsed-label-current-page-color)]", children: c })
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
)
|
|
312
|
+
);
|
|
313
|
+
});
|
|
314
|
+
ee.displayName = "SidebarSecondaryCollapsedBreadcrumb";
|
|
315
|
+
const de = n.forwardRef(({ className: t, ...r }, s) => /* @__PURE__ */ e(
|
|
140
316
|
"div",
|
|
141
317
|
{
|
|
142
|
-
ref:
|
|
143
|
-
className:
|
|
318
|
+
ref: s,
|
|
319
|
+
className: b(
|
|
144
320
|
"flex flex-col shrink-0",
|
|
145
321
|
"border-t border-[var(--ui-sidebar-secondary-global-container-footer-border-color)] [border-top-width:var(--ui-sidebar-secondary-global-container-footer-border-width)]",
|
|
146
322
|
"py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
|
|
147
|
-
|
|
323
|
+
t
|
|
148
324
|
),
|
|
149
|
-
...
|
|
325
|
+
...r
|
|
150
326
|
}
|
|
151
327
|
));
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
328
|
+
de.displayName = "SidebarSecondaryFooter";
|
|
329
|
+
const H = n.createContext({
|
|
330
|
+
expandable: !1
|
|
331
|
+
}), ce = {
|
|
332
|
+
expandable: !1
|
|
333
|
+
}, ue = {
|
|
334
|
+
expandable: !0
|
|
335
|
+
}, be = n.forwardRef(
|
|
336
|
+
({
|
|
337
|
+
className: t,
|
|
338
|
+
expandable: r = !1,
|
|
339
|
+
open: s,
|
|
340
|
+
defaultOpen: l = !0,
|
|
341
|
+
onOpenChange: i,
|
|
342
|
+
children: a,
|
|
343
|
+
...o
|
|
344
|
+
}, u) => {
|
|
345
|
+
const d = b(
|
|
156
346
|
"flex flex-col py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
|
|
157
|
-
|
|
347
|
+
t
|
|
158
348
|
);
|
|
159
|
-
return
|
|
160
|
-
|
|
349
|
+
return r ? /* @__PURE__ */ e(H.Provider, { value: ue, children: /* @__PURE__ */ e(
|
|
350
|
+
X.Root,
|
|
161
351
|
{
|
|
162
|
-
ref:
|
|
163
|
-
open:
|
|
164
|
-
defaultOpen:
|
|
352
|
+
ref: u,
|
|
353
|
+
open: s,
|
|
354
|
+
defaultOpen: l,
|
|
165
355
|
onOpenChange: i,
|
|
166
|
-
render: /* @__PURE__ */
|
|
167
|
-
...
|
|
168
|
-
children:
|
|
356
|
+
render: /* @__PURE__ */ e("div", { className: d }),
|
|
357
|
+
...o,
|
|
358
|
+
children: a
|
|
169
359
|
}
|
|
170
|
-
) }) : /* @__PURE__ */
|
|
360
|
+
) }) : /* @__PURE__ */ e(H.Provider, { value: ce, children: /* @__PURE__ */ e("div", { ref: u, className: d, ...o, children: a }) });
|
|
171
361
|
}
|
|
172
362
|
);
|
|
173
|
-
|
|
174
|
-
const
|
|
175
|
-
const { expandable:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
363
|
+
be.displayName = "SidebarSecondarySection";
|
|
364
|
+
const U = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-sidebar-secondary-section-label-section-color)]", V = "min-h-[var(--ui-sidebar-secondary-menu-item-global-container-height-min)] py-[var(--ui-sidebar-secondary-section-container-header-padding-y)] px-[var(--ui-sidebar-secondary-section-container-header-padding-x)]", pe = n.forwardRef(({ className: t, actions: r, unreadRollup: s, children: l, ...i }, a) => {
|
|
365
|
+
const { expandable: o } = n.useContext(H), u = n.useRef(null), d = K(u, { enabled: !0 }), c = /* @__PURE__ */ f(P, { disabled: !d, children: [
|
|
366
|
+
/* @__PURE__ */ e(
|
|
367
|
+
A,
|
|
368
|
+
{
|
|
369
|
+
render: /* @__PURE__ */ e(
|
|
370
|
+
"span",
|
|
371
|
+
{
|
|
372
|
+
ref: u,
|
|
373
|
+
className: "min-w-0 flex-1 truncate"
|
|
374
|
+
}
|
|
375
|
+
),
|
|
376
|
+
children: l
|
|
377
|
+
}
|
|
378
|
+
),
|
|
379
|
+
/* @__PURE__ */ e(M, { children: l })
|
|
380
|
+
] });
|
|
381
|
+
if (!o) {
|
|
382
|
+
const v = b(U, V, t);
|
|
383
|
+
return r == null ? /* @__PURE__ */ e(
|
|
179
384
|
"div",
|
|
180
385
|
{
|
|
181
|
-
ref:
|
|
182
|
-
className:
|
|
183
|
-
|
|
386
|
+
ref: a,
|
|
387
|
+
className: b(
|
|
388
|
+
v,
|
|
389
|
+
"flex items-center"
|
|
390
|
+
),
|
|
391
|
+
...i,
|
|
392
|
+
children: c
|
|
393
|
+
}
|
|
394
|
+
) : /* @__PURE__ */ f(
|
|
395
|
+
"div",
|
|
396
|
+
{
|
|
397
|
+
ref: a,
|
|
398
|
+
className: b(
|
|
399
|
+
v,
|
|
184
400
|
"flex items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)]"
|
|
185
401
|
),
|
|
186
402
|
...i,
|
|
187
403
|
children: [
|
|
188
|
-
|
|
189
|
-
/* @__PURE__ */
|
|
404
|
+
c,
|
|
405
|
+
/* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: r })
|
|
190
406
|
]
|
|
191
407
|
}
|
|
192
408
|
);
|
|
193
409
|
}
|
|
194
|
-
return /* @__PURE__ */
|
|
410
|
+
return /* @__PURE__ */ f(
|
|
195
411
|
"div",
|
|
196
412
|
{
|
|
197
|
-
ref:
|
|
198
|
-
className:
|
|
413
|
+
ref: a,
|
|
414
|
+
className: b(
|
|
199
415
|
"flex items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)]",
|
|
200
|
-
|
|
201
|
-
|
|
416
|
+
V,
|
|
417
|
+
t
|
|
202
418
|
),
|
|
203
419
|
...i,
|
|
204
420
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
|
|
421
|
+
/* @__PURE__ */ f(
|
|
422
|
+
X.Trigger,
|
|
207
423
|
{
|
|
208
|
-
className:
|
|
209
|
-
"group/section flex min-w-0 flex-1 items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)] text-
|
|
210
|
-
|
|
424
|
+
className: b(
|
|
425
|
+
"group/section flex min-w-0 flex-1 items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)] text-start",
|
|
426
|
+
U,
|
|
211
427
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-brand)] focus-visible:ring-inset"
|
|
212
428
|
),
|
|
213
429
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
|
|
430
|
+
/* @__PURE__ */ e(
|
|
431
|
+
G,
|
|
216
432
|
{
|
|
217
433
|
size: 16,
|
|
218
434
|
"aria-hidden": "true",
|
|
219
|
-
className: "shrink-0 -rotate-90 transition-transform group-data-[panel-open]/section:rotate-0 text-[var(--ui-sidebar-secondary-section-icon-arrow-color)]"
|
|
435
|
+
className: "shrink-0 ltr:-rotate-90 rtl:rotate-90 transition-transform group-data-[panel-open]/section:rotate-0 text-[var(--ui-sidebar-secondary-section-icon-arrow-color)]"
|
|
220
436
|
}
|
|
221
437
|
),
|
|
222
|
-
|
|
223
|
-
|
|
438
|
+
c,
|
|
439
|
+
s != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center group-data-[panel-open]/section:hidden", children: s })
|
|
224
440
|
]
|
|
225
441
|
}
|
|
226
442
|
),
|
|
227
|
-
|
|
443
|
+
r != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: r })
|
|
228
444
|
]
|
|
229
445
|
}
|
|
230
446
|
);
|
|
231
447
|
});
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
const { expandable:
|
|
448
|
+
pe.displayName = "SidebarSecondarySectionLabel";
|
|
449
|
+
const me = n.forwardRef(({ className: t, ...r }, s) => {
|
|
450
|
+
const { expandable: l } = n.useContext(H), i = /* @__PURE__ */ e(
|
|
235
451
|
"ul",
|
|
236
452
|
{
|
|
237
|
-
ref:
|
|
238
|
-
className:
|
|
453
|
+
ref: s,
|
|
454
|
+
className: b(
|
|
239
455
|
"flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]",
|
|
240
|
-
|
|
456
|
+
t
|
|
241
457
|
),
|
|
242
|
-
...
|
|
458
|
+
...r
|
|
243
459
|
}
|
|
244
460
|
);
|
|
245
|
-
return
|
|
461
|
+
return l ? /* @__PURE__ */ e(X.Panel, { children: i }) : i;
|
|
246
462
|
});
|
|
247
|
-
|
|
248
|
-
const
|
|
463
|
+
me.displayName = "SidebarSecondaryMenu";
|
|
464
|
+
const fe = "group/row flex w-full items-start gap-[var(--ui-sidebar-secondary-menu-item-global-container-gap)] min-h-[var(--ui-sidebar-secondary-menu-item-global-container-height-min)] px-[var(--ui-sidebar-secondary-menu-item-global-container-padding-x)] py-[var(--ui-sidebar-secondary-menu-item-global-container-padding-y)] no-underline ui-sidebar-secondary-menu-item-global-label-text-style transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-brand)] focus-visible:ring-inset text-[var(--ui-sidebar-secondary-menu-item-global-label-color-color)] [&_svg]:shrink-0 [&_svg]:size-[var(--ui-sidebar-secondary-menu-item-global-icon-size)] [&_svg]:text-[var(--ui-sidebar-secondary-menu-item-global-icon-color-color)]", re = te(fe, {
|
|
249
465
|
variants: {
|
|
250
466
|
variant: {
|
|
251
467
|
unselected: "bg-[var(--ui-sidebar-secondary-menu-item-unselected-container-color-idle)] hover:bg-[var(--ui-sidebar-secondary-menu-item-unselected-container-color-hover)] active:bg-[var(--ui-sidebar-secondary-menu-item-unselected-container-color-active)]",
|
|
@@ -255,139 +471,77 @@ const O = "group/row flex w-full items-center gap-[var(--ui-sidebar-secondary-me
|
|
|
255
471
|
defaultVariants: {
|
|
256
472
|
variant: "unselected"
|
|
257
473
|
}
|
|
258
|
-
}),
|
|
259
|
-
|
|
260
|
-
(
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
"span",
|
|
280
|
-
{
|
|
281
|
-
className: t(
|
|
282
|
-
"min-w-0 flex-1 truncate text-left",
|
|
283
|
-
!l && "sr-only"
|
|
284
|
-
),
|
|
285
|
-
children: p
|
|
286
|
-
}
|
|
474
|
+
}), ve = n.forwardRef(
|
|
475
|
+
({ className: t, selected: r = !1, icon: s, extras: l, render: i, children: a, ...o }, u) => {
|
|
476
|
+
const { expanded: d, setSelectedLabel: c } = I(), { expandable: v } = n.useContext(H), m = n.useRef(null), S = K(m, { enabled: d });
|
|
477
|
+
n.useEffect(() => {
|
|
478
|
+
r && c(a);
|
|
479
|
+
}, [r, a, c]);
|
|
480
|
+
const E = q({
|
|
481
|
+
render: i,
|
|
482
|
+
ref: u,
|
|
483
|
+
defaultTagName: "a",
|
|
484
|
+
props: j(
|
|
485
|
+
{
|
|
486
|
+
className: b(
|
|
487
|
+
re({
|
|
488
|
+
variant: r ? "selected" : "unselected"
|
|
489
|
+
}),
|
|
490
|
+
// Inside an expandable section, increase start padding so the
|
|
491
|
+
// label aligns with the section header text (after chevron + gap)
|
|
492
|
+
// while keeping the container full-width for hover/active fills.
|
|
493
|
+
v && "ps-[calc(var(--ui-sidebar-secondary-menu-item-global-container-padding-x)+var(--ui-sidebar-secondary-section-container-header-gap)+16px)]",
|
|
494
|
+
t
|
|
287
495
|
),
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
)
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
n
|
|
324
|
-
),
|
|
325
|
-
...i,
|
|
326
|
-
children: [
|
|
327
|
-
r != null && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: r }),
|
|
328
|
-
/* @__PURE__ */ a("span", { className: t("flex-1 truncate", !c && "sr-only"), children: s }),
|
|
329
|
-
/* @__PURE__ */ a(
|
|
330
|
-
R,
|
|
331
|
-
{
|
|
332
|
-
size: 16,
|
|
333
|
-
"aria-hidden": "true",
|
|
334
|
-
className: t(
|
|
335
|
-
"shrink-0 transition-transform group-data-[panel-open]/row:rotate-180",
|
|
336
|
-
!c && "hidden"
|
|
337
|
-
)
|
|
338
|
-
}
|
|
339
|
-
)
|
|
340
|
-
]
|
|
341
|
-
}
|
|
342
|
-
);
|
|
343
|
-
});
|
|
344
|
-
X.displayName = "SidebarSecondaryMenuSubTrigger";
|
|
345
|
-
const G = o.forwardRef(({ className: n, children: e, ...r }, s) => /* @__PURE__ */ a(x.Panel, { ref: s, className: t(n), ...r, children: /* @__PURE__ */ a("ul", { className: "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]", children: e }) }));
|
|
346
|
-
G.displayName = "SidebarSecondaryMenuSubContent";
|
|
347
|
-
const J = o.forwardRef(({ className: n, selected: e = !1, render: r, children: s, ...i }, d) => {
|
|
348
|
-
const { expanded: c } = g(), l = N({
|
|
349
|
-
render: r,
|
|
350
|
-
ref: d,
|
|
351
|
-
defaultTagName: "a",
|
|
352
|
-
props: h(
|
|
353
|
-
{
|
|
354
|
-
className: t(
|
|
355
|
-
v({
|
|
356
|
-
variant: e ? "selected" : "unselected"
|
|
357
|
-
}),
|
|
358
|
-
// Level-2 left indent (no icon column). The dedicated level-2 padding
|
|
359
|
-
// token was removed in the next-gen sync; reconstruct the indent from
|
|
360
|
-
// surviving tokens so the label aligns under level-1 labels (row
|
|
361
|
-
// padding + icon column + gap).
|
|
362
|
-
"pl-[calc(var(--ui-sidebar-secondary-menu-item-global-container-padding-x)+var(--ui-sidebar-secondary-menu-item-global-icon-size)+var(--ui-sidebar-secondary-menu-item-global-container-gap))]",
|
|
363
|
-
n
|
|
364
|
-
),
|
|
365
|
-
"aria-current": e ? "page" : void 0,
|
|
366
|
-
children: /* @__PURE__ */ a("span", { className: t("flex-1 truncate text-left", !c && "sr-only"), children: s })
|
|
367
|
-
},
|
|
368
|
-
i
|
|
369
|
-
)
|
|
370
|
-
});
|
|
371
|
-
return /* @__PURE__ */ a("li", { className: "contents", children: l });
|
|
372
|
-
});
|
|
373
|
-
J.displayName = "SidebarSecondaryMenuSubItem";
|
|
374
|
-
const K = o.forwardRef(({ className: n, variant: e, shortcut: r, tag: s, children: i, ...d }, c) => {
|
|
375
|
-
const { expanded: l } = g(), u = e === "tag" || e === "tag-externalLink", b = e === "externalLink" || e === "tag-externalLink", p = e === "shortcut";
|
|
376
|
-
return /* @__PURE__ */ m(
|
|
496
|
+
"aria-current": r ? "page" : void 0,
|
|
497
|
+
children: /* @__PURE__ */ f(_, { children: [
|
|
498
|
+
s != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: s }),
|
|
499
|
+
/* @__PURE__ */ f(P, { disabled: !S, children: [
|
|
500
|
+
/* @__PURE__ */ e(
|
|
501
|
+
A,
|
|
502
|
+
{
|
|
503
|
+
render: /* @__PURE__ */ e(
|
|
504
|
+
"span",
|
|
505
|
+
{
|
|
506
|
+
ref: m,
|
|
507
|
+
className: b(
|
|
508
|
+
"flex-1 min-w-[60px] truncate text-start",
|
|
509
|
+
!d && "sr-only"
|
|
510
|
+
)
|
|
511
|
+
}
|
|
512
|
+
),
|
|
513
|
+
children: a
|
|
514
|
+
}
|
|
515
|
+
),
|
|
516
|
+
/* @__PURE__ */ e(M, { children: a })
|
|
517
|
+
] }),
|
|
518
|
+
l
|
|
519
|
+
] })
|
|
520
|
+
},
|
|
521
|
+
o
|
|
522
|
+
)
|
|
523
|
+
});
|
|
524
|
+
return /* @__PURE__ */ e("li", { className: "contents", children: E });
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
ve.displayName = "SidebarSecondaryMenuItem";
|
|
528
|
+
const he = n.forwardRef(({ className: t, variant: r, shortcut: s, tag: l, children: i, ...a }, o) => {
|
|
529
|
+
const { expanded: u } = I(), d = r === "tag" || r === "tag-externalLink", c = r === "externalLink" || r === "tag-externalLink", v = r === "shortcut";
|
|
530
|
+
return /* @__PURE__ */ f(
|
|
377
531
|
"span",
|
|
378
532
|
{
|
|
379
|
-
ref:
|
|
380
|
-
className:
|
|
381
|
-
"inline-flex items-center gap-[var(--ui-sidebar-secondary-menu-item-extras-global-container-gap)]",
|
|
382
|
-
!
|
|
383
|
-
|
|
533
|
+
ref: o,
|
|
534
|
+
className: b(
|
|
535
|
+
"inline-flex items-center shrink-0 min-h-6 overflow-clip gap-[var(--ui-sidebar-secondary-menu-item-extras-global-container-gap)]",
|
|
536
|
+
!u && "hidden",
|
|
537
|
+
t
|
|
384
538
|
),
|
|
385
|
-
...
|
|
539
|
+
...a,
|
|
386
540
|
children: [
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
541
|
+
d && (l ?? i),
|
|
542
|
+
v && /* @__PURE__ */ e("span", { className: "ui-sidebar-secondary-menu-item-extras-global-shortcut-text-style text-[var(--ui-sidebar-secondary-menu-item-extras-global-shortcut-color)]", children: s ?? i }),
|
|
543
|
+
c && /* @__PURE__ */ e(
|
|
544
|
+
ae,
|
|
391
545
|
{
|
|
392
546
|
size: 16,
|
|
393
547
|
className: "text-[var(--ui-sidebar-secondary-menu-item-extras-global-external-icon-color)] size-[var(--ui-sidebar-secondary-menu-item-extras-global-external-icon-size)]"
|
|
@@ -397,70 +551,74 @@ const K = o.forwardRef(({ className: n, variant: e, shortcut: r, tag: s, childre
|
|
|
397
551
|
}
|
|
398
552
|
);
|
|
399
553
|
});
|
|
400
|
-
|
|
401
|
-
const
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
/* @__PURE__ */ a(
|
|
423
|
-
"span",
|
|
424
|
-
{
|
|
425
|
-
className: t(
|
|
426
|
-
"flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)] transition-transform",
|
|
427
|
-
!l && "rotate-180"
|
|
428
|
-
),
|
|
429
|
-
children: e
|
|
430
|
-
}
|
|
554
|
+
he.displayName = "SidebarSecondaryMenuItemExtras";
|
|
555
|
+
const ge = n.forwardRef(
|
|
556
|
+
({
|
|
557
|
+
className: t,
|
|
558
|
+
icon: r,
|
|
559
|
+
expandIcon: s,
|
|
560
|
+
expandTooltip: l = "Expand",
|
|
561
|
+
extras: i,
|
|
562
|
+
children: a,
|
|
563
|
+
onClick: o,
|
|
564
|
+
...u
|
|
565
|
+
}, d) => {
|
|
566
|
+
const { expanded: c, toggleExpanded: v } = I(), m = J(), S = n.useRef(null), E = K(S, { enabled: c }), L = c ? r : s ?? r, g = /* @__PURE__ */ f(
|
|
567
|
+
"button",
|
|
568
|
+
{
|
|
569
|
+
ref: d,
|
|
570
|
+
type: "button",
|
|
571
|
+
"aria-expanded": c,
|
|
572
|
+
className: b(
|
|
573
|
+
re({ variant: "unselected" }),
|
|
574
|
+
"text-start",
|
|
575
|
+
t
|
|
431
576
|
),
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
577
|
+
onClick: (k) => {
|
|
578
|
+
o == null || o(k), k.defaultPrevented || v();
|
|
579
|
+
},
|
|
580
|
+
...u,
|
|
581
|
+
children: [
|
|
582
|
+
L != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)] rtl:-scale-x-100", children: L }),
|
|
583
|
+
/* @__PURE__ */ f(P, { disabled: !E, children: [
|
|
584
|
+
/* @__PURE__ */ e(
|
|
585
|
+
A,
|
|
586
|
+
{
|
|
587
|
+
render: /* @__PURE__ */ e(
|
|
588
|
+
"span",
|
|
589
|
+
{
|
|
590
|
+
ref: S,
|
|
591
|
+
className: b("flex-1 min-w-[60px] truncate", !c && "sr-only")
|
|
592
|
+
}
|
|
593
|
+
),
|
|
594
|
+
children: a
|
|
595
|
+
}
|
|
439
596
|
),
|
|
440
|
-
children:
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
597
|
+
/* @__PURE__ */ e(M, { children: a })
|
|
598
|
+
] }),
|
|
599
|
+
i
|
|
600
|
+
]
|
|
601
|
+
}
|
|
602
|
+
);
|
|
603
|
+
return /* @__PURE__ */ e("li", { className: "contents", children: c ? g : /* @__PURE__ */ f(P, { children: [
|
|
604
|
+
/* @__PURE__ */ e(A, { render: g }),
|
|
605
|
+
/* @__PURE__ */ e(M, { side: m === "rtl" ? "left" : "right", children: l })
|
|
606
|
+
] }) });
|
|
607
|
+
}
|
|
608
|
+
);
|
|
609
|
+
ge.displayName = "SidebarSecondaryCollapseTrigger";
|
|
448
610
|
export {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
X as SidebarSecondaryMenuSubTrigger,
|
|
462
|
-
H as SidebarSecondarySection,
|
|
463
|
-
j as SidebarSecondarySectionLabel,
|
|
464
|
-
v as sidebarSecondaryMenuItemVariants
|
|
611
|
+
se as SidebarSecondary,
|
|
612
|
+
ge as SidebarSecondaryCollapseTrigger,
|
|
613
|
+
ee as SidebarSecondaryCollapsedBreadcrumb,
|
|
614
|
+
le as SidebarSecondaryContent,
|
|
615
|
+
de as SidebarSecondaryFooter,
|
|
616
|
+
oe as SidebarSecondaryHeader,
|
|
617
|
+
me as SidebarSecondaryMenu,
|
|
618
|
+
ve as SidebarSecondaryMenuItem,
|
|
619
|
+
he as SidebarSecondaryMenuItemExtras,
|
|
620
|
+
be as SidebarSecondarySection,
|
|
621
|
+
pe as SidebarSecondarySectionLabel,
|
|
622
|
+
re as sidebarSecondaryMenuItemVariants
|
|
465
623
|
};
|
|
466
624
|
//# sourceMappingURL=sidebar-secondary.js.map
|