@acronis-platform/ui-react 0.53.0 → 0.54.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/scroll-area/scroll-area.js +61 -0
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/ui/sidebar-primary/sidebar-primary.js +70 -74
- package/dist/components/ui/sidebar-primary/sidebar-primary.js.map +1 -1
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +120 -116
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
- package/dist/index.js +219 -216
- package/dist/index.js.map +1 -1
- package/dist/react.js +219 -216
- package/dist/react.js.map +1 -1
- 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/index.d.ts +1 -0
- package/dist/ui-react.css +1 -1
- package/package.json +2 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as m, Fragment as k } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import { mergeProps as
|
|
3
|
+
import { mergeProps as S } from "@base-ui/react/merge-props";
|
|
4
4
|
import { useRender as N } from "@base-ui/react/use-render";
|
|
5
5
|
import { Collapsible as x } from "@base-ui/react/collapsible";
|
|
6
|
-
import { ChevronRightIcon as
|
|
6
|
+
import { ChevronRightIcon as T, SquareArrowUpRightIcon as I, ChevronDownIcon as R } from "@acronis-platform/icons-react/stroke-mono";
|
|
7
7
|
import { cva as E } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
|
8
8
|
import { cn as t } from "../../../lib/utils.js";
|
|
9
|
+
import { ScrollArea as z } from "../scroll-area/scroll-area.js";
|
|
9
10
|
const M = o.createContext(null);
|
|
10
11
|
function g() {
|
|
11
12
|
return o.useContext(M) ?? {
|
|
@@ -14,8 +15,8 @@ function g() {
|
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
const [s, i] = o.useState(
|
|
18
|
+
function P(n, a, r) {
|
|
19
|
+
const [s, i] = o.useState(a), d = n !== void 0, c = d ? n : s, l = o.useCallback(
|
|
19
20
|
(u) => {
|
|
20
21
|
d || i(u), r == null || r(u);
|
|
21
22
|
},
|
|
@@ -23,10 +24,10 @@ function z(n, e, r) {
|
|
|
23
24
|
);
|
|
24
25
|
return [c, l];
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
+
const L = o.forwardRef(
|
|
27
28
|
({
|
|
28
29
|
className: n,
|
|
29
|
-
expanded:
|
|
30
|
+
expanded: a,
|
|
30
31
|
defaultExpanded: r = !0,
|
|
31
32
|
onExpandedChange: s,
|
|
32
33
|
"aria-label": i = "Section navigation",
|
|
@@ -34,18 +35,18 @@ const P = o.forwardRef(
|
|
|
34
35
|
children: c,
|
|
35
36
|
...l
|
|
36
37
|
}, u) => {
|
|
37
|
-
const [b, p] =
|
|
38
|
-
|
|
38
|
+
const [b, p] = P(
|
|
39
|
+
a,
|
|
39
40
|
r,
|
|
40
41
|
s
|
|
41
|
-
),
|
|
42
|
+
), h = o.useMemo(
|
|
42
43
|
() => ({ expanded: b, toggleExpanded: () => p(!b) }),
|
|
43
44
|
[b, p]
|
|
44
45
|
), y = N({
|
|
45
46
|
render: d,
|
|
46
47
|
ref: u,
|
|
47
48
|
defaultTagName: "nav",
|
|
48
|
-
props:
|
|
49
|
+
props: S(
|
|
49
50
|
{
|
|
50
51
|
"aria-label": i,
|
|
51
52
|
"data-state": b ? "expanded" : "collapsed",
|
|
@@ -58,14 +59,14 @@ const P = o.forwardRef(
|
|
|
58
59
|
l
|
|
59
60
|
)
|
|
60
61
|
});
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ e(M.Provider, { value: h, children: y });
|
|
62
63
|
}
|
|
63
64
|
);
|
|
64
|
-
|
|
65
|
-
const
|
|
65
|
+
L.displayName = "SidebarSecondary";
|
|
66
|
+
const A = o.forwardRef(({ className: n, label: a, children: r, ...s }, i) => (
|
|
66
67
|
// Hidden in collapsed mode — the CollapsedBreadcrumb's parent label carries the
|
|
67
68
|
// section context in the rail, so a truncated single-letter heading is omitted.
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ e(
|
|
69
70
|
"div",
|
|
70
71
|
{
|
|
71
72
|
ref: i,
|
|
@@ -77,29 +78,32 @@ const L = o.forwardRef(({ className: n, label: e, children: r, ...s }, i) => (
|
|
|
77
78
|
n
|
|
78
79
|
),
|
|
79
80
|
...s,
|
|
80
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ e("h2", { className: "ui-sidebar-secondary-global-header-label-text-style truncate text-[var(--ui-sidebar-secondary-global-header-label-color)]", children: a ?? r })
|
|
81
82
|
}
|
|
82
83
|
)
|
|
83
84
|
));
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
// Expanded: the section list
|
|
87
|
-
//
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
A.displayName = "SidebarSecondaryHeader";
|
|
86
|
+
const _ = o.forwardRef(({ className: n, children: a, ...r }, s) => (
|
|
87
|
+
// Expanded: the section list, scrolling inside a ScrollArea whose overlay
|
|
88
|
+
// scrollbar floats over the content and reserves no gutter (full-bleed rows
|
|
89
|
+
// are never cropped). Hidden in collapsed mode, where the CollapsedBreadcrumb
|
|
90
|
+
// sibling takes over.
|
|
91
|
+
/* @__PURE__ */ e(
|
|
92
|
+
z,
|
|
90
93
|
{
|
|
91
|
-
ref:
|
|
94
|
+
ref: s,
|
|
92
95
|
className: t(
|
|
93
|
-
"
|
|
94
|
-
"hidden group-data-[state=expanded]/sidebar:
|
|
96
|
+
"min-h-0 flex-1",
|
|
97
|
+
"hidden group-data-[state=expanded]/sidebar:block",
|
|
95
98
|
n
|
|
96
99
|
),
|
|
97
|
-
...
|
|
100
|
+
...r,
|
|
101
|
+
children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-[var(--ui-sidebar-secondary-global-section-list-gap)]", children: a })
|
|
98
102
|
}
|
|
99
103
|
)
|
|
100
104
|
));
|
|
101
|
-
|
|
102
|
-
const
|
|
105
|
+
_.displayName = "SidebarSecondaryContent";
|
|
106
|
+
const B = o.forwardRef(({ className: n, parentLabel: a, currentLabel: r, separator: s, ...i }, d) => (
|
|
103
107
|
// Shown only in collapsed mode — toggled by the same data-[state] selector so
|
|
104
108
|
// it stays in the DOM (SSR-present) with no JS branch. Stacked top→bottom:
|
|
105
109
|
// parent → separator → current page. In the ~48px rail the labels are rotated
|
|
@@ -121,22 +125,22 @@ const _ = o.forwardRef(({ className: n, parentLabel: e, currentLabel: r, separat
|
|
|
121
125
|
),
|
|
122
126
|
...i,
|
|
123
127
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ e("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: a }),
|
|
129
|
+
/* @__PURE__ */ e(
|
|
126
130
|
"span",
|
|
127
131
|
{
|
|
128
132
|
"aria-hidden": "true",
|
|
129
133
|
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__ */
|
|
134
|
+
children: s ?? /* @__PURE__ */ e(T, { size: 16, className: "rotate-90" })
|
|
131
135
|
}
|
|
132
136
|
),
|
|
133
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ e("span", { className: "ui-sidebar-secondary-collapsed-label-current-page-text-style whitespace-nowrap [writing-mode:vertical-rl] text-[var(--ui-sidebar-secondary-collapsed-label-current-page-color)]", children: r })
|
|
134
138
|
]
|
|
135
139
|
}
|
|
136
140
|
)
|
|
137
141
|
));
|
|
138
|
-
|
|
139
|
-
const
|
|
142
|
+
B.displayName = "SidebarSecondaryCollapsedBreadcrumb";
|
|
143
|
+
const V = o.forwardRef(({ className: n, ...a }, r) => /* @__PURE__ */ e(
|
|
140
144
|
"div",
|
|
141
145
|
{
|
|
142
146
|
ref: r,
|
|
@@ -146,36 +150,36 @@ const B = o.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ a(
|
|
|
146
150
|
"py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
|
|
147
151
|
n
|
|
148
152
|
),
|
|
149
|
-
...
|
|
153
|
+
...a
|
|
150
154
|
}
|
|
151
155
|
));
|
|
152
|
-
|
|
153
|
-
const f = o.createContext({ expandable: !1 }),
|
|
154
|
-
({ className: n, expandable:
|
|
156
|
+
V.displayName = "SidebarSecondaryFooter";
|
|
157
|
+
const f = o.createContext({ expandable: !1 }), F = { expandable: !1 }, H = { expandable: !0 }, j = o.forwardRef(
|
|
158
|
+
({ className: n, expandable: a = !1, open: r, defaultOpen: s = !0, onOpenChange: i, children: d, ...c }, l) => {
|
|
155
159
|
const u = t(
|
|
156
160
|
"flex flex-col py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
|
|
157
161
|
n
|
|
158
162
|
);
|
|
159
|
-
return
|
|
163
|
+
return a ? /* @__PURE__ */ e(f.Provider, { value: H, children: /* @__PURE__ */ e(
|
|
160
164
|
x.Root,
|
|
161
165
|
{
|
|
162
166
|
ref: l,
|
|
163
167
|
open: r,
|
|
164
168
|
defaultOpen: s,
|
|
165
169
|
onOpenChange: i,
|
|
166
|
-
render: /* @__PURE__ */
|
|
170
|
+
render: /* @__PURE__ */ e("div", { className: u }),
|
|
167
171
|
...c,
|
|
168
172
|
children: d
|
|
169
173
|
}
|
|
170
|
-
) }) : /* @__PURE__ */
|
|
174
|
+
) }) : /* @__PURE__ */ e(f.Provider, { value: F, children: /* @__PURE__ */ e("div", { ref: l, className: u, ...c, children: d }) });
|
|
171
175
|
}
|
|
172
176
|
);
|
|
173
|
-
|
|
174
|
-
const w = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-sidebar-secondary-section-label-section-color)]", C = "
|
|
177
|
+
j.displayName = "SidebarSecondarySection";
|
|
178
|
+
const w = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-sidebar-secondary-section-label-section-color)]", C = "flex min-h-9 items-center px-[var(--ui-sidebar-secondary-section-container-header-padding-x)]", D = o.forwardRef(({ className: n, actions: a, unreadRollup: r, children: s, ...i }, d) => {
|
|
175
179
|
const { expandable: c } = o.useContext(f);
|
|
176
180
|
if (!c) {
|
|
177
181
|
const l = t(w, C, n);
|
|
178
|
-
return
|
|
182
|
+
return a == null ? /* @__PURE__ */ e("div", { ref: d, className: l, ...i, children: s }) : /* @__PURE__ */ m(
|
|
179
183
|
"div",
|
|
180
184
|
{
|
|
181
185
|
ref: d,
|
|
@@ -185,8 +189,8 @@ const w = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-
|
|
|
185
189
|
),
|
|
186
190
|
...i,
|
|
187
191
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: s }),
|
|
193
|
+
/* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: a })
|
|
190
194
|
]
|
|
191
195
|
}
|
|
192
196
|
);
|
|
@@ -211,7 +215,7 @@ const w = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-
|
|
|
211
215
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-brand)] focus-visible:ring-inset"
|
|
212
216
|
),
|
|
213
217
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ e(
|
|
215
219
|
R,
|
|
216
220
|
{
|
|
217
221
|
size: 16,
|
|
@@ -219,19 +223,19 @@ const w = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-
|
|
|
219
223
|
className: "shrink-0 -rotate-90 transition-transform group-data-[panel-open]/section:rotate-0 text-[var(--ui-sidebar-secondary-section-icon-arrow-color)]"
|
|
220
224
|
}
|
|
221
225
|
),
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
r != null && /* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: s }),
|
|
227
|
+
r != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center group-data-[panel-open]/section:hidden", children: r })
|
|
224
228
|
]
|
|
225
229
|
}
|
|
226
230
|
),
|
|
227
|
-
|
|
231
|
+
a != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: a })
|
|
228
232
|
]
|
|
229
233
|
}
|
|
230
234
|
);
|
|
231
235
|
});
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
const { expandable: s } = o.useContext(f), i = /* @__PURE__ */
|
|
236
|
+
D.displayName = "SidebarSecondarySectionLabel";
|
|
237
|
+
const O = o.forwardRef(({ className: n, ...a }, r) => {
|
|
238
|
+
const { expandable: s } = o.useContext(f), i = /* @__PURE__ */ e(
|
|
235
239
|
"ul",
|
|
236
240
|
{
|
|
237
241
|
ref: r,
|
|
@@ -239,13 +243,13 @@ const D = o.forwardRef(({ className: n, ...e }, r) => {
|
|
|
239
243
|
"flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]",
|
|
240
244
|
n
|
|
241
245
|
),
|
|
242
|
-
...
|
|
246
|
+
...a
|
|
243
247
|
}
|
|
244
248
|
);
|
|
245
|
-
return s ? /* @__PURE__ */
|
|
249
|
+
return s ? /* @__PURE__ */ e(x.Panel, { children: i }) : i;
|
|
246
250
|
});
|
|
247
|
-
|
|
248
|
-
const
|
|
251
|
+
O.displayName = "SidebarSecondaryMenu";
|
|
252
|
+
const U = "group/row flex w-full items-center 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)]", v = E(U, {
|
|
249
253
|
variants: {
|
|
250
254
|
variant: {
|
|
251
255
|
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,27 +259,27 @@ const O = "group/row flex w-full items-center gap-[var(--ui-sidebar-secondary-me
|
|
|
255
259
|
defaultVariants: {
|
|
256
260
|
variant: "unselected"
|
|
257
261
|
}
|
|
258
|
-
}),
|
|
262
|
+
}), q = o.forwardRef(({ className: n, selected: a = !1, icon: r, render: s, children: i, ...d }, c) => {
|
|
259
263
|
const { expanded: l } = g(), u = o.Children.toArray(i), b = u.filter(
|
|
260
264
|
(y) => o.isValidElement(y) && y.type.displayName === "SidebarSecondaryMenuItemExtras"
|
|
261
265
|
), p = u.filter(
|
|
262
266
|
(y) => !b.includes(y)
|
|
263
|
-
),
|
|
267
|
+
), h = N({
|
|
264
268
|
render: s,
|
|
265
269
|
ref: c,
|
|
266
270
|
defaultTagName: "a",
|
|
267
|
-
props:
|
|
271
|
+
props: S(
|
|
268
272
|
{
|
|
269
273
|
className: t(
|
|
270
274
|
v({
|
|
271
|
-
variant:
|
|
275
|
+
variant: a ? "selected" : "unselected"
|
|
272
276
|
}),
|
|
273
277
|
n
|
|
274
278
|
),
|
|
275
|
-
"aria-current":
|
|
276
|
-
children: /* @__PURE__ */ m(
|
|
277
|
-
r != null && /* @__PURE__ */
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
+
"aria-current": a ? "page" : void 0,
|
|
280
|
+
children: /* @__PURE__ */ m(k, { children: [
|
|
281
|
+
r != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: r }),
|
|
282
|
+
/* @__PURE__ */ e(
|
|
279
283
|
"span",
|
|
280
284
|
{
|
|
281
285
|
className: t(
|
|
@@ -285,48 +289,48 @@ const O = "group/row flex w-full items-center gap-[var(--ui-sidebar-secondary-me
|
|
|
285
289
|
children: p
|
|
286
290
|
}
|
|
287
291
|
),
|
|
288
|
-
b.length > 0 && /* @__PURE__ */
|
|
292
|
+
b.length > 0 && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: b })
|
|
289
293
|
] })
|
|
290
294
|
},
|
|
291
295
|
d
|
|
292
296
|
)
|
|
293
297
|
});
|
|
294
|
-
return /* @__PURE__ */
|
|
298
|
+
return /* @__PURE__ */ e("li", { className: "contents", children: h });
|
|
295
299
|
});
|
|
296
|
-
|
|
297
|
-
const
|
|
300
|
+
q.displayName = "SidebarSecondaryMenuItem";
|
|
301
|
+
const X = o.forwardRef(({ className: n, render: a, ...r }, s) => (
|
|
298
302
|
// Disclosure row: Base UI Collapsible gives per-row open state +
|
|
299
303
|
// aria-expanded/aria-controls. Rendered as the list `<li>` wrapper.
|
|
300
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ e(
|
|
301
305
|
x.Root,
|
|
302
306
|
{
|
|
303
307
|
ref: s,
|
|
304
|
-
render:
|
|
308
|
+
render: a ?? /* @__PURE__ */ e("li", {}),
|
|
305
309
|
className: t("contents", n),
|
|
306
310
|
...r
|
|
307
311
|
}
|
|
308
312
|
)
|
|
309
313
|
));
|
|
310
|
-
|
|
311
|
-
const
|
|
314
|
+
X.displayName = "SidebarSecondaryMenuSub";
|
|
315
|
+
const G = o.forwardRef(({ className: n, selected: a = !1, icon: r, children: s, ...i }, d) => {
|
|
312
316
|
const { expanded: c } = g();
|
|
313
317
|
return /* @__PURE__ */ m(
|
|
314
318
|
x.Trigger,
|
|
315
319
|
{
|
|
316
320
|
ref: d,
|
|
317
|
-
"aria-current":
|
|
321
|
+
"aria-current": a ? "page" : void 0,
|
|
318
322
|
className: t(
|
|
319
323
|
v({
|
|
320
|
-
variant:
|
|
324
|
+
variant: a ? "selected" : "unselected"
|
|
321
325
|
}),
|
|
322
326
|
"text-left",
|
|
323
327
|
n
|
|
324
328
|
),
|
|
325
329
|
...i,
|
|
326
330
|
children: [
|
|
327
|
-
r != null && /* @__PURE__ */
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */
|
|
331
|
+
r != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: r }),
|
|
332
|
+
/* @__PURE__ */ e("span", { className: t("flex-1 truncate", !c && "sr-only"), children: s }),
|
|
333
|
+
/* @__PURE__ */ e(
|
|
330
334
|
R,
|
|
331
335
|
{
|
|
332
336
|
size: 16,
|
|
@@ -341,19 +345,19 @@ const X = o.forwardRef(({ className: n, selected: e = !1, icon: r, children: s,
|
|
|
341
345
|
}
|
|
342
346
|
);
|
|
343
347
|
});
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
+
G.displayName = "SidebarSecondaryMenuSubTrigger";
|
|
349
|
+
const J = o.forwardRef(({ className: n, children: a, ...r }, s) => /* @__PURE__ */ e(x.Panel, { ref: s, className: t(n), ...r, children: /* @__PURE__ */ e("ul", { className: "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]", children: a }) }));
|
|
350
|
+
J.displayName = "SidebarSecondaryMenuSubContent";
|
|
351
|
+
const K = o.forwardRef(({ className: n, selected: a = !1, render: r, children: s, ...i }, d) => {
|
|
348
352
|
const { expanded: c } = g(), l = N({
|
|
349
353
|
render: r,
|
|
350
354
|
ref: d,
|
|
351
355
|
defaultTagName: "a",
|
|
352
|
-
props:
|
|
356
|
+
props: S(
|
|
353
357
|
{
|
|
354
358
|
className: t(
|
|
355
359
|
v({
|
|
356
|
-
variant:
|
|
360
|
+
variant: a ? "selected" : "unselected"
|
|
357
361
|
}),
|
|
358
362
|
// Level-2 left indent (no icon column). The dedicated level-2 padding
|
|
359
363
|
// token was removed in the next-gen sync; reconstruct the indent from
|
|
@@ -362,17 +366,17 @@ const J = o.forwardRef(({ className: n, selected: e = !1, render: r, children: s
|
|
|
362
366
|
"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
367
|
n
|
|
364
368
|
),
|
|
365
|
-
"aria-current":
|
|
366
|
-
children: /* @__PURE__ */
|
|
369
|
+
"aria-current": a ? "page" : void 0,
|
|
370
|
+
children: /* @__PURE__ */ e("span", { className: t("flex-1 truncate text-left", !c && "sr-only"), children: s })
|
|
367
371
|
},
|
|
368
372
|
i
|
|
369
373
|
)
|
|
370
374
|
});
|
|
371
|
-
return /* @__PURE__ */
|
|
375
|
+
return /* @__PURE__ */ e("li", { className: "contents", children: l });
|
|
372
376
|
});
|
|
373
|
-
|
|
374
|
-
const
|
|
375
|
-
const { expanded: l } = g(), u =
|
|
377
|
+
K.displayName = "SidebarSecondaryMenuSubItem";
|
|
378
|
+
const Q = o.forwardRef(({ className: n, variant: a, shortcut: r, tag: s, children: i, ...d }, c) => {
|
|
379
|
+
const { expanded: l } = g(), u = a === "tag" || a === "tag-externalLink", b = a === "externalLink" || a === "tag-externalLink", p = a === "shortcut";
|
|
376
380
|
return /* @__PURE__ */ m(
|
|
377
381
|
"span",
|
|
378
382
|
{
|
|
@@ -385,8 +389,8 @@ const K = o.forwardRef(({ className: n, variant: e, shortcut: r, tag: s, childre
|
|
|
385
389
|
...d,
|
|
386
390
|
children: [
|
|
387
391
|
u && (s ?? i),
|
|
388
|
-
p && /* @__PURE__ */
|
|
389
|
-
b && /* @__PURE__ */
|
|
392
|
+
p && /* @__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: r ?? i }),
|
|
393
|
+
b && /* @__PURE__ */ e(
|
|
390
394
|
I,
|
|
391
395
|
{
|
|
392
396
|
size: 16,
|
|
@@ -397,10 +401,10 @@ const K = o.forwardRef(({ className: n, variant: e, shortcut: r, tag: s, childre
|
|
|
397
401
|
}
|
|
398
402
|
);
|
|
399
403
|
});
|
|
400
|
-
|
|
401
|
-
const
|
|
404
|
+
Q.displayName = "SidebarSecondaryMenuItemExtras";
|
|
405
|
+
const W = o.forwardRef(({ className: n, icon: a, shortcut: r, children: s, onClick: i, ...d }, c) => {
|
|
402
406
|
const { expanded: l, toggleExpanded: u } = g();
|
|
403
|
-
return /* @__PURE__ */
|
|
407
|
+
return /* @__PURE__ */ e("li", { className: "contents", children: /* @__PURE__ */ m(
|
|
404
408
|
"button",
|
|
405
409
|
{
|
|
406
410
|
ref: c,
|
|
@@ -416,21 +420,21 @@ const Q = o.forwardRef(({ className: n, icon: e, shortcut: r, children: s, onCli
|
|
|
416
420
|
},
|
|
417
421
|
...d,
|
|
418
422
|
children: [
|
|
419
|
-
|
|
423
|
+
a != null && // Flip the chevron when collapsed so a chevron-left ("collapse")
|
|
420
424
|
// becomes a chevron-right ("expand") — the icon always points toward
|
|
421
425
|
// the action it triggers.
|
|
422
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ e(
|
|
423
427
|
"span",
|
|
424
428
|
{
|
|
425
429
|
className: t(
|
|
426
430
|
"flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)] transition-transform",
|
|
427
431
|
!l && "rotate-180"
|
|
428
432
|
),
|
|
429
|
-
children:
|
|
433
|
+
children: a
|
|
430
434
|
}
|
|
431
435
|
),
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
-
r != null && /* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ e("span", { className: t("flex-1 truncate", !l && "sr-only"), children: s }),
|
|
437
|
+
r != null && /* @__PURE__ */ e(
|
|
434
438
|
"span",
|
|
435
439
|
{
|
|
436
440
|
className: t(
|
|
@@ -444,23 +448,23 @@ const Q = o.forwardRef(({ className: n, icon: e, shortcut: r, children: s, onCli
|
|
|
444
448
|
}
|
|
445
449
|
) });
|
|
446
450
|
});
|
|
447
|
-
|
|
451
|
+
W.displayName = "SidebarSecondaryCollapseTrigger";
|
|
448
452
|
export {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
453
|
+
L as SidebarSecondary,
|
|
454
|
+
W as SidebarSecondaryCollapseTrigger,
|
|
455
|
+
B as SidebarSecondaryCollapsedBreadcrumb,
|
|
456
|
+
_ as SidebarSecondaryContent,
|
|
457
|
+
V as SidebarSecondaryFooter,
|
|
458
|
+
A as SidebarSecondaryHeader,
|
|
459
|
+
O as SidebarSecondaryMenu,
|
|
460
|
+
q as SidebarSecondaryMenuItem,
|
|
461
|
+
Q as SidebarSecondaryMenuItemExtras,
|
|
462
|
+
X as SidebarSecondaryMenuSub,
|
|
463
|
+
J as SidebarSecondaryMenuSubContent,
|
|
464
|
+
K as SidebarSecondaryMenuSubItem,
|
|
465
|
+
G as SidebarSecondaryMenuSubTrigger,
|
|
466
|
+
j as SidebarSecondarySection,
|
|
467
|
+
D as SidebarSecondarySectionLabel,
|
|
464
468
|
v as sidebarSecondaryMenuItemVariants
|
|
465
469
|
};
|
|
466
470
|
//# sourceMappingURL=sidebar-secondary.js.map
|