@alfadocs/ui-kit-debug 0.97.1 → 0.97.2
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/_chunks/{marketplace-app-shell-DpOR905C.js → marketplace-app-shell-Bv1ZO4XO.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-DpOR905C.js.map → marketplace-app-shell-Bv1ZO4XO.js.map} +1 -1
- package/dist/_chunks/{sidebar-CanH-Sha.js → sidebar-C-Gr2LL-.js} +238 -239
- package/dist/_chunks/sidebar-C-Gr2LL-.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/sidebar-CanH-Sha.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as s, jsxs as u, Fragment as X } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as b, useState as B, useEffect as L, useCallback as ss, useRef as G, useMemo as $, useId as
|
|
2
|
+
import { forwardRef as b, useState as B, useEffect as L, useCallback as ss, useRef as G, useMemo as $, useId as ds, useContext as q, createContext as Z } from "react";
|
|
3
3
|
import * as R from "@radix-ui/react-dialog";
|
|
4
4
|
import * as K from "@radix-ui/react-collapsible";
|
|
5
5
|
import * as E from "@radix-ui/react-accordion";
|
|
6
6
|
import * as h from "@radix-ui/react-tooltip";
|
|
7
|
-
import { a as
|
|
8
|
-
import { S as
|
|
7
|
+
import { a as ts } from "./accordion-C11v9ouP.js";
|
|
8
|
+
import { S as os } from "./scroll-area-BZOvUhwQ.js";
|
|
9
9
|
import { Slot as ls } from "@radix-ui/react-slot";
|
|
10
10
|
import { c as T } from "./index-D2ZczOXr.js";
|
|
11
|
-
import { useTranslation as
|
|
11
|
+
import { useTranslation as A } from "react-i18next";
|
|
12
12
|
import { u as cs } from "./registry-DvAUVLHh.js";
|
|
13
13
|
import { u as us } from "./use-edge-resize-ZnGG7gyO.js";
|
|
14
14
|
import { c as ms } from "./compose-refs-C0k0tdqF.js";
|
|
@@ -87,7 +87,7 @@ const zs = [
|
|
|
87
87
|
}, O = Z({
|
|
88
88
|
mode: "expanded",
|
|
89
89
|
density: "default"
|
|
90
|
-
}),
|
|
90
|
+
}), N = () => q(O), es = "ui.sidebar.state";
|
|
91
91
|
function Cs(e) {
|
|
92
92
|
if (typeof window > "u") return e;
|
|
93
93
|
try {
|
|
@@ -164,36 +164,36 @@ const J = T(
|
|
|
164
164
|
"ds:before:[inset-block:0]",
|
|
165
165
|
"ds:before:[inline-size:var(--min-target-size)]",
|
|
166
166
|
"ds:before:[inset-inline:calc(0px_-_(var(--min-target-size)_-_var(--resizable-handle-size))_/_2)]"
|
|
167
|
-
].join(" "),
|
|
167
|
+
].join(" "), As = b(
|
|
168
168
|
({
|
|
169
169
|
state: e,
|
|
170
170
|
defaultState: a = "expanded",
|
|
171
171
|
onStateChange: r,
|
|
172
|
-
density:
|
|
173
|
-
open:
|
|
174
|
-
onOpenChange:
|
|
175
|
-
resizable:
|
|
176
|
-
"aria-label":
|
|
177
|
-
className:
|
|
178
|
-
children:
|
|
172
|
+
density: n = "default",
|
|
173
|
+
open: d,
|
|
174
|
+
onOpenChange: o,
|
|
175
|
+
resizable: t = !1,
|
|
176
|
+
"aria-label": l,
|
|
177
|
+
className: c,
|
|
178
|
+
children: m,
|
|
179
179
|
id: f,
|
|
180
180
|
...g
|
|
181
|
-
},
|
|
182
|
-
const { t:
|
|
181
|
+
}, y) => {
|
|
182
|
+
const { t: x } = A(), i = e !== void 0, [w, z] = B(
|
|
183
183
|
() => i ? e : Cs(a)
|
|
184
|
-
),
|
|
184
|
+
), v = i ? e : w;
|
|
185
185
|
L(() => {
|
|
186
|
-
i || ks(
|
|
187
|
-
}, [
|
|
186
|
+
i || ks(w);
|
|
187
|
+
}, [w, i]);
|
|
188
188
|
const S = ss(
|
|
189
189
|
(k) => {
|
|
190
190
|
i || z(k), r == null || r(k);
|
|
191
191
|
},
|
|
192
192
|
[i, r]
|
|
193
|
-
), j =
|
|
193
|
+
), j = l ?? x("navigation.sidebar.label"), C = G(v);
|
|
194
194
|
L(() => {
|
|
195
|
-
C.current =
|
|
196
|
-
}, [
|
|
195
|
+
C.current = v;
|
|
196
|
+
}, [v]);
|
|
197
197
|
const F = $(
|
|
198
198
|
() => ({
|
|
199
199
|
getIsCollapsed: () => C.current !== "expanded",
|
|
@@ -205,20 +205,20 @@ const J = T(
|
|
|
205
205
|
[S]
|
|
206
206
|
);
|
|
207
207
|
cs(js, F, f);
|
|
208
|
-
const
|
|
208
|
+
const D = G(null), _ = $(() => ms(y, D), [y]), { separatorProps: U, isResizing: P } = us({
|
|
209
209
|
edge: "inline-end",
|
|
210
|
-
targetRef:
|
|
210
|
+
targetRef: D,
|
|
211
211
|
cssProperty: "--sidebar-modern-expanded-size",
|
|
212
212
|
minSize: Ts,
|
|
213
213
|
maxSize: Is,
|
|
214
214
|
defaultSize: Rs,
|
|
215
|
-
disabled: !
|
|
216
|
-
}), M =
|
|
217
|
-
return
|
|
215
|
+
disabled: !t || v !== "expanded"
|
|
216
|
+
}), M = t && v === "expanded";
|
|
217
|
+
return v === "overlay" ? /* @__PURE__ */ s(
|
|
218
218
|
O.Provider,
|
|
219
219
|
{
|
|
220
|
-
value: { mode: "overlay", density:
|
|
221
|
-
children: /* @__PURE__ */ s(R.Root, { open:
|
|
220
|
+
value: { mode: "overlay", density: n, transitionTo: S },
|
|
221
|
+
children: /* @__PURE__ */ s(R.Root, { open: d, onOpenChange: o, children: /* @__PURE__ */ u(R.Portal, { children: [
|
|
222
222
|
/* @__PURE__ */ s(
|
|
223
223
|
R.Overlay,
|
|
224
224
|
{
|
|
@@ -242,34 +242,34 @@ const J = T(
|
|
|
242
242
|
// utilities and compiled to nothing.
|
|
243
243
|
"ds:start-0 ds:top-0",
|
|
244
244
|
"ds:h-dvh",
|
|
245
|
-
J({ mode: "overlay", density:
|
|
245
|
+
J({ mode: "overlay", density: n }),
|
|
246
246
|
"ds:shadow-[var(--shadow-xl)]",
|
|
247
247
|
"ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out",
|
|
248
248
|
"ds:data-[state=open]:slide-in-from-left ds:data-[state=closed]:slide-out-to-left",
|
|
249
249
|
"ds:rtl:data-[state=open]:slide-in-from-right ds:rtl:data-[state=closed]:slide-out-to-right",
|
|
250
250
|
"ds:motion-reduce:animate-none",
|
|
251
251
|
"ds:focus:outline-none",
|
|
252
|
-
|
|
252
|
+
c ?? ""
|
|
253
253
|
].filter(Boolean).join(" "),
|
|
254
254
|
children: [
|
|
255
255
|
/* @__PURE__ */ s(
|
|
256
256
|
"nav",
|
|
257
257
|
{
|
|
258
|
-
ref:
|
|
258
|
+
ref: _,
|
|
259
259
|
id: f,
|
|
260
260
|
"aria-label": j,
|
|
261
261
|
"data-component": "sidebar",
|
|
262
262
|
"data-component-id": f,
|
|
263
263
|
className: "ds:flex ds:flex-col ds:h-full",
|
|
264
264
|
...g,
|
|
265
|
-
children:
|
|
265
|
+
children: m
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
268
|
/* @__PURE__ */ s(R.Close, { asChild: !0, children: /* @__PURE__ */ s(
|
|
269
269
|
"button",
|
|
270
270
|
{
|
|
271
271
|
type: "button",
|
|
272
|
-
"aria-label":
|
|
272
|
+
"aria-label": x("navigation.sidebar.close"),
|
|
273
273
|
className: [
|
|
274
274
|
"ds:absolute ds:top-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]",
|
|
275
275
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
@@ -290,31 +290,31 @@ const J = T(
|
|
|
290
290
|
) : /* @__PURE__ */ s(
|
|
291
291
|
O.Provider,
|
|
292
292
|
{
|
|
293
|
-
value: { mode:
|
|
293
|
+
value: { mode: v, density: n, transitionTo: S },
|
|
294
294
|
children: /* @__PURE__ */ s(h.Provider, { delayDuration: 300, children: /* @__PURE__ */ u(
|
|
295
295
|
"nav",
|
|
296
296
|
{
|
|
297
|
-
ref:
|
|
297
|
+
ref: _,
|
|
298
298
|
id: f,
|
|
299
299
|
"aria-label": j,
|
|
300
300
|
"data-component": "sidebar",
|
|
301
301
|
"data-component-id": f,
|
|
302
|
-
"data-mode":
|
|
303
|
-
"data-density":
|
|
302
|
+
"data-mode": v,
|
|
303
|
+
"data-density": n,
|
|
304
304
|
"data-resizing": P ? "" : void 0,
|
|
305
305
|
className: [
|
|
306
|
-
J({ mode:
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
J({ mode: v, density: n }),
|
|
307
|
+
n === "compact" ? "ds:density-compact" : "",
|
|
308
|
+
c ?? ""
|
|
309
309
|
].filter(Boolean).join(" "),
|
|
310
310
|
...g,
|
|
311
311
|
children: [
|
|
312
|
-
|
|
312
|
+
m,
|
|
313
313
|
M ? /* @__PURE__ */ s(
|
|
314
314
|
"div",
|
|
315
315
|
{
|
|
316
316
|
...U,
|
|
317
|
-
"aria-label":
|
|
317
|
+
"aria-label": x("navigation.sidebar.resize"),
|
|
318
318
|
"data-resizing": P ? "" : void 0,
|
|
319
319
|
className: Bs
|
|
320
320
|
}
|
|
@@ -326,9 +326,9 @@ const J = T(
|
|
|
326
326
|
);
|
|
327
327
|
}
|
|
328
328
|
);
|
|
329
|
-
|
|
330
|
-
const
|
|
331
|
-
const { mode:
|
|
329
|
+
As.displayName = "Sidebar";
|
|
330
|
+
const Ds = b(({ className: e, ...a }, r) => {
|
|
331
|
+
const { mode: n } = N();
|
|
332
332
|
return /* @__PURE__ */ s(
|
|
333
333
|
"div",
|
|
334
334
|
{
|
|
@@ -336,18 +336,14 @@ const As = b(({ className: e, ...a }, r) => {
|
|
|
336
336
|
className: [
|
|
337
337
|
"ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
338
338
|
"ds:min-h-[var(--min-target-size)]",
|
|
339
|
-
//
|
|
340
|
-
//
|
|
341
|
-
//
|
|
342
|
-
// `
|
|
343
|
-
//
|
|
344
|
-
//
|
|
345
|
-
//
|
|
346
|
-
|
|
347
|
-
// 32px collapsed). Keep `justify-center` in the rail so a header
|
|
348
|
-
// holding something narrower than the target size still centres.
|
|
349
|
-
d === "icon" ? "ds:justify-center" : "",
|
|
350
|
-
"ds:[padding-inline:calc((var(--sidebar-modern-icon-size)_-_var(--min-target-size))/2)]",
|
|
339
|
+
// Expanded uses the SAME inline padding as `SidebarBody`, so the
|
|
340
|
+
// header's first control starts on the nav items' left edge and its
|
|
341
|
+
// icon can land on the nav icon column (the trigger adds the item's
|
|
342
|
+
// own `ps` on top — see `SidebarCollapseTrigger`). In the rail,
|
|
343
|
+
// `justify-center` centres the control exactly as the nav icons
|
|
344
|
+
// centre. Header content therefore tracks the nav column in both
|
|
345
|
+
// modes instead of sitting on its own axis.
|
|
346
|
+
n === "icon" ? "ds:justify-center ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]" : "ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
351
347
|
"ds:py-[var(--spacing-sm)]",
|
|
352
348
|
// Hairline border + downward chrome shadow cast the header as a
|
|
353
349
|
// sticky top band above the scrolling body.
|
|
@@ -359,9 +355,9 @@ const As = b(({ className: e, ...a }, r) => {
|
|
|
359
355
|
}
|
|
360
356
|
);
|
|
361
357
|
});
|
|
362
|
-
|
|
363
|
-
const
|
|
364
|
-
({ className: e, children: a, ...r },
|
|
358
|
+
Ds.displayName = "SidebarHeader";
|
|
359
|
+
const _s = b(
|
|
360
|
+
({ className: e, children: a, ...r }, n) => (
|
|
365
361
|
// Scroll the nav sections through the kit `ScrollArea` (8px tokenised
|
|
366
362
|
// scrollbar) instead of native `overflow-auto` (the OS scrollbar), so the
|
|
367
363
|
// sidebar matches the Control Room rail and the kit's trays. `flex-1 min-h-0`
|
|
@@ -369,14 +365,14 @@ const Ds = b(
|
|
|
369
365
|
// body box (the ScrollArea root). Padding + `ref` + div props go on the inner
|
|
370
366
|
// content div so the scrollbar sits flush at the inline-end edge.
|
|
371
367
|
/* @__PURE__ */ s(
|
|
372
|
-
|
|
368
|
+
os,
|
|
373
369
|
{
|
|
374
370
|
orientation: "vertical",
|
|
375
371
|
className: ["ds:flex-1 ds:min-h-0", e ?? ""].filter(Boolean).join(" "),
|
|
376
372
|
children: /* @__PURE__ */ s(
|
|
377
373
|
"div",
|
|
378
374
|
{
|
|
379
|
-
ref:
|
|
375
|
+
ref: n,
|
|
380
376
|
className: "ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:py-[var(--spacing-sm)]",
|
|
381
377
|
...r,
|
|
382
378
|
children: a
|
|
@@ -386,9 +382,9 @@ const Ds = b(
|
|
|
386
382
|
)
|
|
387
383
|
)
|
|
388
384
|
);
|
|
389
|
-
|
|
385
|
+
_s.displayName = "SidebarBody";
|
|
390
386
|
const Ps = b(({ className: e, ...a }, r) => {
|
|
391
|
-
const { mode:
|
|
387
|
+
const { mode: n } = N();
|
|
392
388
|
return /* @__PURE__ */ s(
|
|
393
389
|
"div",
|
|
394
390
|
{
|
|
@@ -397,7 +393,7 @@ const Ps = b(({ className: e, ...a }, r) => {
|
|
|
397
393
|
"ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
398
394
|
// Icon-rail is 64px — two 44×44 controls can't sit side-by-side,
|
|
399
395
|
// so switch to a vertical stack and let each row self-centre.
|
|
400
|
-
|
|
396
|
+
n === "icon" ? "ds:flex-col ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]" : "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
401
397
|
"ds:min-h-[var(--min-target-size)]",
|
|
402
398
|
"ds:py-[var(--spacing-sm)]",
|
|
403
399
|
// Hairline border + upward chrome shadow cast the footer as a
|
|
@@ -431,21 +427,21 @@ const Es = [
|
|
|
431
427
|
label: e,
|
|
432
428
|
icon: a,
|
|
433
429
|
collapsible: r = !0,
|
|
434
|
-
defaultOpen:
|
|
435
|
-
open:
|
|
436
|
-
onOpenChange:
|
|
437
|
-
className:
|
|
438
|
-
children:
|
|
439
|
-
...
|
|
440
|
-
},
|
|
441
|
-
const { mode: f } =
|
|
430
|
+
defaultOpen: n = !0,
|
|
431
|
+
open: d,
|
|
432
|
+
onOpenChange: o,
|
|
433
|
+
className: t,
|
|
434
|
+
children: l,
|
|
435
|
+
...c
|
|
436
|
+
}, m) => {
|
|
437
|
+
const { mode: f } = N(), g = f === "icon", y = r && !g && !!e, x = [
|
|
442
438
|
"ds:flex ds:flex-col",
|
|
443
439
|
"ds:gap-[var(--spacing-xs)]",
|
|
444
440
|
"ds:mt-[var(--spacing-sm)]",
|
|
445
|
-
|
|
441
|
+
t ?? ""
|
|
446
442
|
].filter(Boolean).join(" ");
|
|
447
|
-
if (!
|
|
448
|
-
return /* @__PURE__ */ u("div", { ref:
|
|
443
|
+
if (!y)
|
|
444
|
+
return /* @__PURE__ */ u("div", { ref: m, className: x, ...c, children: [
|
|
449
445
|
!!e || !!a ? /* @__PURE__ */ u(
|
|
450
446
|
"span",
|
|
451
447
|
{
|
|
@@ -463,7 +459,7 @@ const Es = [
|
|
|
463
459
|
]
|
|
464
460
|
}
|
|
465
461
|
) : null,
|
|
466
|
-
|
|
462
|
+
l
|
|
467
463
|
] });
|
|
468
464
|
const i = "section";
|
|
469
465
|
return /* @__PURE__ */ s(
|
|
@@ -471,11 +467,11 @@ const Es = [
|
|
|
471
467
|
{
|
|
472
468
|
type: "single",
|
|
473
469
|
collapsible: !0,
|
|
474
|
-
defaultValue:
|
|
475
|
-
value:
|
|
476
|
-
onValueChange:
|
|
470
|
+
defaultValue: d === void 0 && n ? i : void 0,
|
|
471
|
+
value: d === void 0 ? void 0 : d ? i : "",
|
|
472
|
+
onValueChange: o ? (w) => o(w === i) : void 0,
|
|
477
473
|
asChild: !0,
|
|
478
|
-
children: /* @__PURE__ */ s("div", { ref:
|
|
474
|
+
children: /* @__PURE__ */ s("div", { ref: m, className: x, ...c, children: /* @__PURE__ */ u(E.Item, { value: i, children: [
|
|
479
475
|
/* @__PURE__ */ s(E.Header, { className: "ds:flex", children: /* @__PURE__ */ u(E.Trigger, { className: Es, children: [
|
|
480
476
|
a ? /* @__PURE__ */ s("span", { "aria-hidden": "true", className: Q, children: a }) : null,
|
|
481
477
|
/* @__PURE__ */ s("span", { className: "ds:flex-1 ds:text-start", children: e }),
|
|
@@ -488,11 +484,11 @@ const Es = [
|
|
|
488
484
|
)
|
|
489
485
|
] }) }),
|
|
490
486
|
/* @__PURE__ */ s(
|
|
491
|
-
|
|
487
|
+
ts,
|
|
492
488
|
{
|
|
493
489
|
"aria-label": e,
|
|
494
490
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:[&>div]:contents",
|
|
495
|
-
children:
|
|
491
|
+
children: l
|
|
496
492
|
}
|
|
497
493
|
)
|
|
498
494
|
] }) })
|
|
@@ -517,22 +513,22 @@ const Hs = [
|
|
|
517
513
|
label: e,
|
|
518
514
|
icon: a,
|
|
519
515
|
children: r,
|
|
520
|
-
className:
|
|
521
|
-
defaultOpen:
|
|
522
|
-
open:
|
|
523
|
-
onOpenChange:
|
|
524
|
-
...
|
|
525
|
-
},
|
|
526
|
-
const { mode:
|
|
516
|
+
className: n,
|
|
517
|
+
defaultOpen: d,
|
|
518
|
+
open: o,
|
|
519
|
+
onOpenChange: t,
|
|
520
|
+
...l
|
|
521
|
+
}, c) => {
|
|
522
|
+
const { mode: m } = N();
|
|
527
523
|
return /* @__PURE__ */ u(
|
|
528
524
|
K.Root,
|
|
529
525
|
{
|
|
530
|
-
ref:
|
|
531
|
-
defaultOpen:
|
|
532
|
-
open:
|
|
533
|
-
onOpenChange:
|
|
534
|
-
className:
|
|
535
|
-
...
|
|
526
|
+
ref: c,
|
|
527
|
+
defaultOpen: d,
|
|
528
|
+
open: o,
|
|
529
|
+
onOpenChange: t,
|
|
530
|
+
className: n,
|
|
531
|
+
...l,
|
|
536
532
|
children: [
|
|
537
533
|
/* @__PURE__ */ u(K.Trigger, { className: Hs, children: [
|
|
538
534
|
a ? /* @__PURE__ */ s(
|
|
@@ -548,12 +544,12 @@ const Hs = [
|
|
|
548
544
|
{
|
|
549
545
|
className: [
|
|
550
546
|
"ds:flex-1 ds:text-start",
|
|
551
|
-
|
|
547
|
+
m === "icon" ? "ds:sr-only" : ""
|
|
552
548
|
].join(" "),
|
|
553
549
|
children: e
|
|
554
550
|
}
|
|
555
551
|
),
|
|
556
|
-
|
|
552
|
+
m !== "icon" ? /* @__PURE__ */ s(
|
|
557
553
|
H,
|
|
558
554
|
{
|
|
559
555
|
"aria-hidden": "true",
|
|
@@ -645,50 +641,50 @@ const Us = T(
|
|
|
645
641
|
asChild: e = !1,
|
|
646
642
|
isActive: a = !1,
|
|
647
643
|
navId: r,
|
|
648
|
-
isPinned:
|
|
649
|
-
onPinChange:
|
|
650
|
-
pinLabel:
|
|
651
|
-
className:
|
|
652
|
-
children:
|
|
653
|
-
"aria-label":
|
|
654
|
-
...
|
|
644
|
+
isPinned: n = !1,
|
|
645
|
+
onPinChange: d,
|
|
646
|
+
pinLabel: o,
|
|
647
|
+
className: t,
|
|
648
|
+
children: l,
|
|
649
|
+
"aria-label": c,
|
|
650
|
+
...m
|
|
655
651
|
}, f) => {
|
|
656
|
-
const { mode: g, density:
|
|
657
|
-
|
|
652
|
+
const { mode: g, density: y } = N(), x = e ? ls : "a", i = d !== void 0 && g !== "icon", [w, z] = B(null), v = g === "icon" && c != null && w ? `${c}, ${w}` : c, S = /* @__PURE__ */ s(
|
|
653
|
+
x,
|
|
658
654
|
{
|
|
659
655
|
ref: f,
|
|
660
656
|
"aria-current": a ? "page" : void 0,
|
|
661
|
-
"aria-label":
|
|
657
|
+
"aria-label": v,
|
|
662
658
|
"data-nav-id": r,
|
|
663
659
|
className: Us({
|
|
664
660
|
mode: g,
|
|
665
|
-
density:
|
|
661
|
+
density: y,
|
|
666
662
|
isActive: a,
|
|
667
|
-
className: i ? "ds:flex-1 ds:min-w-0" :
|
|
663
|
+
className: i ? "ds:flex-1 ds:min-w-0" : t
|
|
668
664
|
}),
|
|
669
|
-
...
|
|
670
|
-
children:
|
|
665
|
+
...m,
|
|
666
|
+
children: l
|
|
671
667
|
}
|
|
672
668
|
), j = i ? /* @__PURE__ */ u(
|
|
673
669
|
"div",
|
|
674
670
|
{
|
|
675
671
|
className: [
|
|
676
672
|
"ds:group/item ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
677
|
-
|
|
673
|
+
t ?? ""
|
|
678
674
|
].filter(Boolean).join(" "),
|
|
679
675
|
children: [
|
|
680
676
|
S,
|
|
681
677
|
/* @__PURE__ */ s(
|
|
682
678
|
Y,
|
|
683
679
|
{
|
|
684
|
-
isPinned:
|
|
685
|
-
label:
|
|
686
|
-
onPinChange:
|
|
680
|
+
isPinned: n,
|
|
681
|
+
label: o ?? c ?? "",
|
|
682
|
+
onPinChange: d
|
|
687
683
|
}
|
|
688
684
|
)
|
|
689
685
|
]
|
|
690
686
|
}
|
|
691
|
-
) : S, C = g === "icon" &&
|
|
687
|
+
) : S, C = g === "icon" && c ? /* @__PURE__ */ u(h.Root, { children: [
|
|
692
688
|
/* @__PURE__ */ s(h.Trigger, { asChild: !0, children: j }),
|
|
693
689
|
/* @__PURE__ */ s(h.Portal, { children: /* @__PURE__ */ u(
|
|
694
690
|
h.Content,
|
|
@@ -703,7 +699,7 @@ const Us = T(
|
|
|
703
699
|
"ds:animate-in ds:fade-in ds:zoom-in-95 ds:motion-reduce:animate-none"
|
|
704
700
|
].join(" "),
|
|
705
701
|
children: [
|
|
706
|
-
|
|
702
|
+
c,
|
|
707
703
|
/* @__PURE__ */ s(h.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
708
704
|
]
|
|
709
705
|
}
|
|
@@ -713,10 +709,10 @@ const Us = T(
|
|
|
713
709
|
}
|
|
714
710
|
);
|
|
715
711
|
is.displayName = "SidebarItem";
|
|
716
|
-
const Ms = b(({ className: e, children: a, ...r },
|
|
712
|
+
const Ms = b(({ className: e, children: a, ...r }, n) => /* @__PURE__ */ s(
|
|
717
713
|
"span",
|
|
718
714
|
{
|
|
719
|
-
ref:
|
|
715
|
+
ref: n,
|
|
720
716
|
"aria-hidden": "true",
|
|
721
717
|
className: [
|
|
722
718
|
"ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
|
|
@@ -735,17 +731,17 @@ const Ms = b(({ className: e, children: a, ...r }, d) => /* @__PURE__ */ s(
|
|
|
735
731
|
}
|
|
736
732
|
));
|
|
737
733
|
Ms.displayName = "SidebarItemIcon";
|
|
738
|
-
const Vs = b(({ className: e, children: a, ...r },
|
|
739
|
-
const { mode:
|
|
734
|
+
const Vs = b(({ className: e, children: a, ...r }, n) => {
|
|
735
|
+
const { mode: d } = N();
|
|
740
736
|
return /* @__PURE__ */ s(
|
|
741
737
|
"span",
|
|
742
738
|
{
|
|
743
|
-
ref:
|
|
739
|
+
ref: n,
|
|
744
740
|
className: [
|
|
745
741
|
"ds:flex-1",
|
|
746
742
|
"ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap ds:break-normal",
|
|
747
743
|
"ds:text-start",
|
|
748
|
-
|
|
744
|
+
d === "icon" ? "ds:sr-only" : "",
|
|
749
745
|
e ?? ""
|
|
750
746
|
].filter(Boolean).join(" "),
|
|
751
747
|
...r,
|
|
@@ -754,21 +750,21 @@ const Vs = b(({ className: e, children: a, ...r }, d) => {
|
|
|
754
750
|
);
|
|
755
751
|
});
|
|
756
752
|
Vs.displayName = "SidebarItemLabel";
|
|
757
|
-
const Ks = b(({ className: e, children: a, ...r },
|
|
758
|
-
const { mode:
|
|
753
|
+
const Ks = b(({ className: e, children: a, ...r }, n) => {
|
|
754
|
+
const { mode: d } = N(), o = d === "icon", t = q(rs);
|
|
759
755
|
return L(() => {
|
|
760
|
-
if (!
|
|
761
|
-
const
|
|
762
|
-
return
|
|
763
|
-
}, [
|
|
756
|
+
if (!t || !o) return;
|
|
757
|
+
const l = a == null || a === !1 ? null : String(a).trim() || null;
|
|
758
|
+
return t(l), () => t(null);
|
|
759
|
+
}, [t, a, o]), /* @__PURE__ */ s(
|
|
764
760
|
"span",
|
|
765
761
|
{
|
|
766
|
-
ref:
|
|
767
|
-
"aria-hidden":
|
|
762
|
+
ref: n,
|
|
763
|
+
"aria-hidden": o ? "true" : void 0,
|
|
768
764
|
className: [
|
|
769
765
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
770
766
|
"ds:font-[var(--font-weight-semibold)]",
|
|
771
|
-
|
|
767
|
+
o ? [
|
|
772
768
|
"ds:absolute ds:top-[2px] ds:end-[2px]",
|
|
773
769
|
"ds:min-w-0 ds:size-[10px] ds:ps-0 ds:pe-0",
|
|
774
770
|
"ds:rounded-[var(--radius-full)]",
|
|
@@ -838,16 +834,16 @@ const Ls = T(
|
|
|
838
834
|
defaultVariants: { variant: "ghost" }
|
|
839
835
|
}
|
|
840
836
|
), Gs = b(
|
|
841
|
-
({ logo: e, name: a, showChevron: r = !0, variant:
|
|
842
|
-
const { mode:
|
|
837
|
+
({ logo: e, name: a, showChevron: r = !0, variant: n = "ghost", className: d, ...o }, t) => {
|
|
838
|
+
const { mode: l } = N(), c = l !== "icon";
|
|
843
839
|
return /* @__PURE__ */ u(
|
|
844
840
|
"button",
|
|
845
841
|
{
|
|
846
|
-
ref:
|
|
842
|
+
ref: t,
|
|
847
843
|
type: "button",
|
|
848
844
|
"aria-label": a,
|
|
849
|
-
className: [Ls({ variant:
|
|
850
|
-
...
|
|
845
|
+
className: [Ls({ variant: n }), d].filter(Boolean).join(" "),
|
|
846
|
+
...o,
|
|
851
847
|
children: [
|
|
852
848
|
/* @__PURE__ */ s(
|
|
853
849
|
"span",
|
|
@@ -857,7 +853,7 @@ const Ls = T(
|
|
|
857
853
|
children: e
|
|
858
854
|
}
|
|
859
855
|
),
|
|
860
|
-
|
|
856
|
+
c ? /* @__PURE__ */ u(X, { children: [
|
|
861
857
|
/* @__PURE__ */ s("span", { className: "ds:truncate ds:flex-1 ds:text-start ds:max-w-[var(--header-workspace-max-inline-size)]", children: a }),
|
|
862
858
|
r ? /* @__PURE__ */ s(
|
|
863
859
|
H,
|
|
@@ -896,17 +892,17 @@ const $s = T(
|
|
|
896
892
|
},
|
|
897
893
|
defaultVariants: { mode: "expanded" }
|
|
898
894
|
}
|
|
899
|
-
), Os = b(({ icon: e, label: a, shortcut: r, className:
|
|
900
|
-
const { mode:
|
|
895
|
+
), Os = b(({ icon: e, label: a, shortcut: r, className: n, ...d }, o) => {
|
|
896
|
+
const { mode: t } = N(), l = t !== "icon";
|
|
901
897
|
return /* @__PURE__ */ u(
|
|
902
898
|
"button",
|
|
903
899
|
{
|
|
904
|
-
ref:
|
|
900
|
+
ref: o,
|
|
905
901
|
type: "button",
|
|
906
902
|
"aria-label": a,
|
|
907
903
|
"aria-keyshortcuts": r,
|
|
908
|
-
className: [$s({ mode:
|
|
909
|
-
...
|
|
904
|
+
className: [$s({ mode: t }), n].filter(Boolean).join(" "),
|
|
905
|
+
...d,
|
|
910
906
|
children: [
|
|
911
907
|
/* @__PURE__ */ s(
|
|
912
908
|
"span",
|
|
@@ -916,7 +912,7 @@ const $s = T(
|
|
|
916
912
|
children: e
|
|
917
913
|
}
|
|
918
914
|
),
|
|
919
|
-
|
|
915
|
+
l ? /* @__PURE__ */ u(X, { children: [
|
|
920
916
|
/* @__PURE__ */ s("span", { className: "ds:truncate", children: a }),
|
|
921
917
|
r ? /* @__PURE__ */ s("kbd", { className: "ds:ms-auto ds:text-[length:var(--font-size-xs)] ds:font-[family-name:var(--font-mono)] ds:opacity-80", children: r }) : null
|
|
922
918
|
] }) : null
|
|
@@ -950,22 +946,22 @@ const Xs = [
|
|
|
950
946
|
"ds:transition-[color,opacity,background-color] ds:duration-[var(--animation-duration)]",
|
|
951
947
|
"ds:motion-reduce:transition-none"
|
|
952
948
|
].join(" "), Y = b(
|
|
953
|
-
({ isPinned: e, onPinChange: a, label: r, className:
|
|
954
|
-
const { t } =
|
|
955
|
-
if (
|
|
956
|
-
const
|
|
949
|
+
({ isPinned: e, onPinChange: a, label: r, className: n, onClick: d, ...o }, t) => {
|
|
950
|
+
const { t: l } = A(), { mode: c } = N();
|
|
951
|
+
if (c === "icon") return null;
|
|
952
|
+
const m = e ? l("navigation.sidebar.unpinItem", "Unpin {{label}}", { label: r }) : l("navigation.sidebar.pinItem", "Pin {{label}}", { label: r });
|
|
957
953
|
return /* @__PURE__ */ s(
|
|
958
954
|
"button",
|
|
959
955
|
{
|
|
960
|
-
ref:
|
|
956
|
+
ref: t,
|
|
961
957
|
type: "button",
|
|
962
|
-
"aria-label":
|
|
958
|
+
"aria-label": m,
|
|
963
959
|
"aria-pressed": e,
|
|
964
|
-
className: [Xs,
|
|
960
|
+
className: [Xs, n].filter(Boolean).join(" "),
|
|
965
961
|
onClick: (f) => {
|
|
966
|
-
f.preventDefault(), f.stopPropagation(), a == null || a(!e),
|
|
962
|
+
f.preventDefault(), f.stopPropagation(), a == null || a(!e), d == null || d(f);
|
|
967
963
|
},
|
|
968
|
-
...
|
|
964
|
+
...o,
|
|
969
965
|
children: /* @__PURE__ */ s(
|
|
970
966
|
hs,
|
|
971
967
|
{
|
|
@@ -979,23 +975,23 @@ const Xs = [
|
|
|
979
975
|
}
|
|
980
976
|
);
|
|
981
977
|
Y.displayName = "SidebarPinButton";
|
|
982
|
-
const
|
|
983
|
-
({ heading: e, emptyMessage: a, onReorder: r, className:
|
|
984
|
-
const { t } =
|
|
985
|
-
z.current = !z.current,
|
|
978
|
+
const ns = Z(null), qs = () => q(ns), Zs = b(
|
|
979
|
+
({ heading: e, emptyMessage: a, onReorder: r, className: n, children: d, ...o }, t) => {
|
|
980
|
+
const { t: l } = A(), c = e ?? l("navigation.sidebar.favorites", "Favourites"), m = Array.isArray(d) ? d.filter(Boolean) : d ? [d] : [], f = m.length, g = f > 0, [y, x] = B(null), [i, w] = B(""), z = G(!1), v = ss((j) => {
|
|
981
|
+
z.current = !z.current, w(z.current ? j : `${j}`);
|
|
986
982
|
}, []), S = $(
|
|
987
|
-
() => ({ onReorder: r, count: f, dragSource:
|
|
988
|
-
[r, f,
|
|
983
|
+
() => ({ onReorder: r, count: f, dragSource: y, setDragSource: x, announce: v }),
|
|
984
|
+
[r, f, y, v]
|
|
989
985
|
);
|
|
990
|
-
return !g && !a ? null : /* @__PURE__ */ s(
|
|
986
|
+
return !g && !a ? null : /* @__PURE__ */ s(ns.Provider, { value: S, children: /* @__PURE__ */ u(
|
|
991
987
|
as,
|
|
992
988
|
{
|
|
993
|
-
ref:
|
|
994
|
-
label:
|
|
995
|
-
className:
|
|
996
|
-
...
|
|
989
|
+
ref: t,
|
|
990
|
+
label: c,
|
|
991
|
+
className: n,
|
|
992
|
+
...o,
|
|
997
993
|
children: [
|
|
998
|
-
g ?
|
|
994
|
+
g ? m : /* @__PURE__ */ s("p", { className: "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] type-meta ds:text-[color:var(--muted-foreground)]", children: a }),
|
|
999
995
|
/* @__PURE__ */ s("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: i })
|
|
1000
996
|
]
|
|
1001
997
|
}
|
|
@@ -1041,36 +1037,36 @@ const Ws = T(
|
|
|
1041
1037
|
index: e,
|
|
1042
1038
|
isActive: a = !1,
|
|
1043
1039
|
asChild: r = !1,
|
|
1044
|
-
reorderLabel:
|
|
1045
|
-
isPinned:
|
|
1046
|
-
onPinChange:
|
|
1047
|
-
pinLabel:
|
|
1048
|
-
"aria-label":
|
|
1049
|
-
className:
|
|
1050
|
-
children:
|
|
1040
|
+
reorderLabel: n,
|
|
1041
|
+
isPinned: d = !1,
|
|
1042
|
+
onPinChange: o,
|
|
1043
|
+
pinLabel: t,
|
|
1044
|
+
"aria-label": l,
|
|
1045
|
+
className: c,
|
|
1046
|
+
children: m,
|
|
1051
1047
|
...f
|
|
1052
1048
|
}, g) => {
|
|
1053
|
-
const { t:
|
|
1049
|
+
const { t: y } = A(), { mode: x } = N(), i = qs(), [w, z] = B(!1), v = !!(i != null && i.onReorder) && x !== "icon", S = n ?? l ?? "", j = ds(), C = (p, I) => {
|
|
1054
1050
|
if (!(i != null && i.onReorder)) return;
|
|
1055
1051
|
const V = Math.max(0, Math.min(i.count - 1, I));
|
|
1056
|
-
V !==
|
|
1057
|
-
|
|
1052
|
+
V !== p && (i.onReorder(p, V), i.announce(
|
|
1053
|
+
y(
|
|
1058
1054
|
"navigation.sidebar.reorderAnnounce",
|
|
1059
1055
|
"{{label}} moved to position {{to}} of {{total}}",
|
|
1060
1056
|
{ label: S, to: V + 1, total: i.count }
|
|
1061
1057
|
)
|
|
1062
1058
|
));
|
|
1063
|
-
}, F = (
|
|
1064
|
-
|
|
1065
|
-
},
|
|
1066
|
-
|
|
1067
|
-
},
|
|
1059
|
+
}, F = (p) => {
|
|
1060
|
+
v && (p.altKey && p.key === "ArrowUp" ? (p.preventDefault(), C(e, e - 1)) : p.altKey && p.key === "ArrowDown" ? (p.preventDefault(), C(e, e + 1)) : p.key === "Home" && p.altKey ? (p.preventDefault(), C(e, 0)) : p.key === "End" && p.altKey && (p.preventDefault(), C(e, i.count - 1)));
|
|
1061
|
+
}, D = (p) => {
|
|
1062
|
+
v && (i == null || i.setDragSource(e), p.dataTransfer && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("ds:text/plain", String(e))));
|
|
1063
|
+
}, _ = () => {
|
|
1068
1064
|
i == null || i.setDragSource(null), z(!1);
|
|
1069
|
-
}, U = (
|
|
1070
|
-
!
|
|
1071
|
-
}, P = () => z(!1), M = (
|
|
1072
|
-
if (!
|
|
1073
|
-
|
|
1065
|
+
}, U = (p) => {
|
|
1066
|
+
!v || (i == null ? void 0 : i.dragSource) === null || (p.preventDefault(), p.dataTransfer && (p.dataTransfer.dropEffect = "move"), z(!0));
|
|
1067
|
+
}, P = () => z(!1), M = (p) => {
|
|
1068
|
+
if (!v) return;
|
|
1069
|
+
p.preventDefault();
|
|
1074
1070
|
const I = i == null ? void 0 : i.dragSource;
|
|
1075
1071
|
z(!1), !(I == null || I === e) && C(I, e);
|
|
1076
1072
|
}, k = (i == null ? void 0 : i.dragSource) === e;
|
|
@@ -1079,11 +1075,11 @@ const Ws = T(
|
|
|
1079
1075
|
{
|
|
1080
1076
|
className: Ws({
|
|
1081
1077
|
dragging: k,
|
|
1082
|
-
dropTarget:
|
|
1078
|
+
dropTarget: w && !k
|
|
1083
1079
|
}),
|
|
1084
|
-
draggable:
|
|
1085
|
-
onDragStart:
|
|
1086
|
-
onDragEnd:
|
|
1080
|
+
draggable: v || void 0,
|
|
1081
|
+
onDragStart: v ? D : void 0,
|
|
1082
|
+
onDragEnd: v ? _ : void 0,
|
|
1087
1083
|
onDragOver: U,
|
|
1088
1084
|
onDragLeave: P,
|
|
1089
1085
|
onDrop: M,
|
|
@@ -1094,20 +1090,20 @@ const Ws = T(
|
|
|
1094
1090
|
ref: g,
|
|
1095
1091
|
isActive: a,
|
|
1096
1092
|
asChild: r,
|
|
1097
|
-
"aria-label":
|
|
1098
|
-
"aria-describedby":
|
|
1099
|
-
draggable:
|
|
1100
|
-
className: [
|
|
1093
|
+
"aria-label": l,
|
|
1094
|
+
"aria-describedby": v ? j : void 0,
|
|
1095
|
+
draggable: v ? !1 : void 0,
|
|
1096
|
+
className: [v ? "ds:flex-1 ds:min-w-0" : "", c ?? ""].filter(Boolean).join(" "),
|
|
1101
1097
|
...f,
|
|
1102
|
-
children:
|
|
1098
|
+
children: m
|
|
1103
1099
|
}
|
|
1104
1100
|
),
|
|
1105
|
-
|
|
1101
|
+
v ? /* @__PURE__ */ s(
|
|
1106
1102
|
"button",
|
|
1107
1103
|
{
|
|
1108
1104
|
type: "button",
|
|
1109
1105
|
id: j,
|
|
1110
|
-
"aria-label":
|
|
1106
|
+
"aria-label": y(
|
|
1111
1107
|
"navigation.sidebar.reorderHandle",
|
|
1112
1108
|
"Reorder {{label}}. Press Alt + Up or Alt + Down to move.",
|
|
1113
1109
|
{ label: S }
|
|
@@ -1117,12 +1113,12 @@ const Ws = T(
|
|
|
1117
1113
|
children: /* @__PURE__ */ s(bs, { "aria-hidden": "true", className: "ds:size-4" })
|
|
1118
1114
|
}
|
|
1119
1115
|
) : null,
|
|
1120
|
-
|
|
1116
|
+
o && x !== "icon" ? /* @__PURE__ */ s(
|
|
1121
1117
|
Y,
|
|
1122
1118
|
{
|
|
1123
|
-
isPinned:
|
|
1124
|
-
label:
|
|
1125
|
-
onPinChange:
|
|
1119
|
+
isPinned: d,
|
|
1120
|
+
label: t ?? l ?? "",
|
|
1121
|
+
onPinChange: o
|
|
1126
1122
|
}
|
|
1127
1123
|
) : null
|
|
1128
1124
|
]
|
|
@@ -1144,16 +1140,16 @@ const Qs = T(
|
|
|
1144
1140
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
1145
1141
|
"ds:no-underline"
|
|
1146
1142
|
].join(" ")
|
|
1147
|
-
), se = b(({ avatar: e, name: a, subtitle: r, subtitleLabel:
|
|
1148
|
-
const { mode:
|
|
1143
|
+
), se = b(({ avatar: e, name: a, subtitle: r, subtitleLabel: n, className: d, ...o }, t) => {
|
|
1144
|
+
const { mode: l } = N(), c = l !== "icon", m = typeof r == "string" ? r : n;
|
|
1149
1145
|
return /* @__PURE__ */ u(
|
|
1150
1146
|
"button",
|
|
1151
1147
|
{
|
|
1152
|
-
ref:
|
|
1148
|
+
ref: t,
|
|
1153
1149
|
type: "button",
|
|
1154
|
-
"aria-label":
|
|
1155
|
-
className: [Qs(),
|
|
1156
|
-
...
|
|
1150
|
+
"aria-label": m ? `${a}, ${m}` : a,
|
|
1151
|
+
className: [Qs(), d].filter(Boolean).join(" "),
|
|
1152
|
+
...o,
|
|
1157
1153
|
children: [
|
|
1158
1154
|
/* @__PURE__ */ s(
|
|
1159
1155
|
"span",
|
|
@@ -1163,7 +1159,7 @@ const Qs = T(
|
|
|
1163
1159
|
children: e
|
|
1164
1160
|
}
|
|
1165
1161
|
),
|
|
1166
|
-
|
|
1162
|
+
c ? /* @__PURE__ */ u("span", { className: "ds:flex-1 ds:min-w-0 ds:text-start", children: [
|
|
1167
1163
|
/* @__PURE__ */ s("span", { className: "ds:block ds:truncate type-label", children: a }),
|
|
1168
1164
|
r ? typeof r == "string" ? /* @__PURE__ */ s("span", { className: "ds:block ds:truncate type-meta ds:text-[color:var(--muted-foreground)]", children: r }) : /* @__PURE__ */ s("span", { className: "ds:flex ds:items-center ds:gap-[length:var(--spacing-xs)] ds:min-w-0 type-meta ds:text-[color:var(--muted-foreground)]", children: r }) : null
|
|
1169
1165
|
] }) : null
|
|
@@ -1182,22 +1178,25 @@ const ee = [
|
|
|
1182
1178
|
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1183
1179
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
1184
1180
|
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
1185
|
-
].join(" "), ae = b(({ className: e, "aria-label": a, onClick: r, ...
|
|
1186
|
-
const { t:
|
|
1187
|
-
if (
|
|
1188
|
-
const
|
|
1181
|
+
].join(" "), ae = b(({ className: e, "aria-label": a, onClick: r, ...n }, d) => {
|
|
1182
|
+
const { t: o } = A(), { mode: t, density: l, transitionTo: c } = N();
|
|
1183
|
+
if (t === "overlay") return null;
|
|
1184
|
+
const m = t === "expanded", f = m ? [
|
|
1185
|
+
"ds:justify-start",
|
|
1186
|
+
l === "compact" ? "ds:ps-[var(--spacing-xs)]" : "ds:ps-[var(--spacing-sm)]"
|
|
1187
|
+
].join(" ") : "ds:justify-center", g = a ?? (m ? o("navigation.sidebar.collapse", "Collapse sidebar") : o("navigation.sidebar.expand", "Expand sidebar")), y = /* @__PURE__ */ s(
|
|
1189
1188
|
"button",
|
|
1190
1189
|
{
|
|
1191
|
-
ref:
|
|
1190
|
+
ref: d,
|
|
1192
1191
|
type: "button",
|
|
1193
|
-
"aria-label":
|
|
1194
|
-
"aria-expanded":
|
|
1195
|
-
onClick: (
|
|
1196
|
-
|
|
1192
|
+
"aria-label": g,
|
|
1193
|
+
"aria-expanded": m,
|
|
1194
|
+
onClick: (x) => {
|
|
1195
|
+
c == null || c(m ? "icon" : "expanded"), r == null || r(x);
|
|
1197
1196
|
},
|
|
1198
|
-
className: [ee, e].filter(Boolean).join(" "),
|
|
1199
|
-
...
|
|
1200
|
-
children:
|
|
1197
|
+
className: [ee, f, e].filter(Boolean).join(" "),
|
|
1198
|
+
...n,
|
|
1199
|
+
children: /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:size-5 ds:shrink-0 ds:items-center ds:justify-center", children: m ? /* @__PURE__ */ s(
|
|
1201
1200
|
ys,
|
|
1202
1201
|
{
|
|
1203
1202
|
"aria-hidden": "true",
|
|
@@ -1209,15 +1208,15 @@ const ee = [
|
|
|
1209
1208
|
"aria-hidden": "true",
|
|
1210
1209
|
className: "ds:size-4 ds:rtl:-scale-x-100"
|
|
1211
1210
|
}
|
|
1212
|
-
)
|
|
1211
|
+
) })
|
|
1213
1212
|
}
|
|
1214
1213
|
);
|
|
1215
1214
|
return /* @__PURE__ */ u(h.Root, { children: [
|
|
1216
|
-
/* @__PURE__ */ s(h.Trigger, { asChild: !0, children:
|
|
1215
|
+
/* @__PURE__ */ s(h.Trigger, { asChild: !0, children: y }),
|
|
1217
1216
|
/* @__PURE__ */ s(h.Portal, { children: /* @__PURE__ */ u(
|
|
1218
1217
|
h.Content,
|
|
1219
1218
|
{
|
|
1220
|
-
side:
|
|
1219
|
+
side: t === "icon" ? "right" : "top",
|
|
1221
1220
|
sideOffset: 6,
|
|
1222
1221
|
className: [
|
|
1223
1222
|
"ds:z-[var(--z-tooltip)] ds:max-w-[16rem]",
|
|
@@ -1227,7 +1226,7 @@ const ee = [
|
|
|
1227
1226
|
"ds:animate-in ds:fade-in ds:zoom-in-95 ds:motion-reduce:animate-none"
|
|
1228
1227
|
].join(" "),
|
|
1229
1228
|
children: [
|
|
1230
|
-
|
|
1229
|
+
g,
|
|
1231
1230
|
/* @__PURE__ */ s(h.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
1232
1231
|
]
|
|
1233
1232
|
}
|
|
@@ -1266,18 +1265,18 @@ const re = T(
|
|
|
1266
1265
|
},
|
|
1267
1266
|
defaultVariants: { mode: "expanded" }
|
|
1268
1267
|
}
|
|
1269
|
-
), ie = b(({ title: e, description: a, icon: r, className:
|
|
1270
|
-
const { mode:
|
|
1268
|
+
), ie = b(({ title: e, description: a, icon: r, className: n, ...d }, o) => {
|
|
1269
|
+
const { mode: t } = N(), l = t === "icon", c = (
|
|
1271
1270
|
// aria-label only in icon mode (where the copy is hidden) — in
|
|
1272
1271
|
// expanded mode the accessible name comes from the visible contents
|
|
1273
1272
|
// so the description isn't excluded from it.
|
|
1274
1273
|
/* @__PURE__ */ u(
|
|
1275
1274
|
"a",
|
|
1276
1275
|
{
|
|
1277
|
-
ref:
|
|
1278
|
-
"aria-label":
|
|
1279
|
-
className: re({ mode:
|
|
1280
|
-
...
|
|
1276
|
+
ref: o,
|
|
1277
|
+
"aria-label": l ? e : void 0,
|
|
1278
|
+
className: re({ mode: t, className: n }),
|
|
1279
|
+
...d,
|
|
1281
1280
|
children: [
|
|
1282
1281
|
/* @__PURE__ */ s(
|
|
1283
1282
|
"span",
|
|
@@ -1291,7 +1290,7 @@ const re = T(
|
|
|
1291
1290
|
children: r ?? /* @__PURE__ */ s(Ss, { className: "ds:size-4" })
|
|
1292
1291
|
}
|
|
1293
1292
|
),
|
|
1294
|
-
|
|
1293
|
+
l ? null : /* @__PURE__ */ u(X, { children: [
|
|
1295
1294
|
/* @__PURE__ */ u("span", { className: "ds:flex-1 ds:min-w-0 ds:text-start", children: [
|
|
1296
1295
|
/* @__PURE__ */ s("span", { className: "ds:block ds:line-clamp-2 type-label", children: e }),
|
|
1297
1296
|
a ? (
|
|
@@ -1312,8 +1311,8 @@ const re = T(
|
|
|
1312
1311
|
}
|
|
1313
1312
|
)
|
|
1314
1313
|
);
|
|
1315
|
-
return
|
|
1316
|
-
/* @__PURE__ */ s(h.Trigger, { asChild: !0, children:
|
|
1314
|
+
return l ? /* @__PURE__ */ u(h.Root, { children: [
|
|
1315
|
+
/* @__PURE__ */ s(h.Trigger, { asChild: !0, children: c }),
|
|
1317
1316
|
/* @__PURE__ */ s(h.Portal, { children: /* @__PURE__ */ u(
|
|
1318
1317
|
h.Content,
|
|
1319
1318
|
{
|
|
@@ -1332,18 +1331,18 @@ const re = T(
|
|
|
1332
1331
|
]
|
|
1333
1332
|
}
|
|
1334
1333
|
) })
|
|
1335
|
-
] }) :
|
|
1334
|
+
] }) : c;
|
|
1336
1335
|
});
|
|
1337
1336
|
ie.displayName = "SidebarUpgradeChip";
|
|
1338
1337
|
export {
|
|
1339
|
-
|
|
1340
|
-
|
|
1338
|
+
As as S,
|
|
1339
|
+
_s as a,
|
|
1341
1340
|
ae as b,
|
|
1342
1341
|
Js as c,
|
|
1343
1342
|
Zs as d,
|
|
1344
1343
|
Ps as e,
|
|
1345
1344
|
Fs as f,
|
|
1346
|
-
|
|
1345
|
+
Ds as g,
|
|
1347
1346
|
is as h,
|
|
1348
1347
|
Ks as i,
|
|
1349
1348
|
Ms as j,
|
|
@@ -1355,6 +1354,6 @@ export {
|
|
|
1355
1354
|
ie as p,
|
|
1356
1355
|
Gs as q,
|
|
1357
1356
|
js as s,
|
|
1358
|
-
|
|
1357
|
+
N as u
|
|
1359
1358
|
};
|
|
1360
|
-
//# sourceMappingURL=sidebar-
|
|
1359
|
+
//# sourceMappingURL=sidebar-C-Gr2LL-.js.map
|