@alfadocs/ui-kit 0.17.1 → 0.17.3
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/{accordion-DOmxGEWU.js → accordion-CNcodXuO.js} +6 -6
- package/dist/_chunks/{ai-prompt-input-DEiQwIMn.js → ai-prompt-input-B-w5Rx3V.js} +184 -181
- package/dist/_chunks/{alert-pgdXrEO5.js → alert-DBnawbmf.js} +64 -59
- package/dist/_chunks/{audio-recorder-CRh4uyFL.js → audio-recorder-DNkQLW1G.js} +3 -3
- package/dist/_chunks/{autocomplete-mOg7WLOh.js → autocomplete-BxfabhZ8.js} +167 -164
- package/dist/_chunks/{balance-cell-renderer-DWWtX-VM.js → balance-cell-renderer-DJB6WDPe.js} +2 -2
- package/dist/_chunks/{chat-input-UK-bXU7u.js → chat-input-B3XmFGDw.js} +123 -122
- package/dist/_chunks/checkbox-group-Bwmt1ovQ.js +213 -0
- package/dist/_chunks/{checkbox-D5EHnB14.js → checkbox-mwbrPZDY.js} +75 -70
- package/dist/_chunks/{collapsible-CuxUBoHJ.js → collapsible-hHiyZp0b.js} +61 -63
- package/dist/_chunks/{color-picker-BPfcByHH.js → color-picker-Bm-gzpsh.js} +2 -2
- package/dist/_chunks/{combobox-D5tWe0t_.js → combobox-Da9eq00i.js} +214 -211
- package/dist/_chunks/{copy-field-BCHAZ8QV.js → copy-field-BAF4mt9h.js} +95 -132
- package/dist/_chunks/{date-picker-BlhtBhPo.js → date-picker-BIoSLRly.js} +222 -219
- package/dist/_chunks/{date-range-picker-C2hRu_Ke.js → date-range-picker-9gANFNG9.js} +81 -78
- package/dist/_chunks/{date-time-picker-B67mPZmP.js → date-time-picker-DG7BiGdb.js} +98 -95
- package/dist/_chunks/{dialog-DRp6Dejy.js → dialog-DUomPCRS.js} +69 -71
- package/dist/_chunks/{dropdown-menu-dyV7gHh_.js → dropdown-menu-DZxwF23X.js} +108 -110
- package/dist/_chunks/{freemium-paywall-BTEiVkes.js → freemium-paywall-DXc7XlGE.js} +98 -97
- package/dist/_chunks/{leo-sidebar-D3TuyH5_.js → leo-sidebar-DIsiTju3.js} +2 -2
- package/dist/_chunks/{list-DcjV0m5B.js → list-BdvDctBz.js} +184 -180
- package/dist/_chunks/{message-tray-Fsend-du.js → message-tray-BNAS8al4.js} +111 -111
- package/dist/_chunks/{multi-select-DooDzQIp.js → multi-select-CyspR5ZF.js} +157 -154
- package/dist/_chunks/{navigation-menu-DdufF-_4.js → navigation-menu-CyS1fBJ7.js} +85 -87
- package/dist/_chunks/{notification-tray-C3dYdLAF.js → notification-tray-D_69dXFY.js} +114 -114
- package/dist/_chunks/{number-input-DH00o0DN.js → number-input-BZXu6bPY.js} +92 -89
- package/dist/_chunks/{otp-input-BBXYvLx5.js → otp-input-BDF_iNpa.js} +92 -93
- package/dist/_chunks/{pagination-F1ei4khE.js → pagination-BWaXF7W0.js} +194 -211
- package/dist/_chunks/{patient-shell-BE0CdPOJ.js → patient-shell-BOOaWZA9.js} +3 -3
- package/dist/_chunks/{payment-form-CI77oIx1.js → payment-form-BjkuQeqR.js} +2 -2
- package/dist/_chunks/{pdf-viewer-CnEJvmXC.js → pdf-viewer-BG_nsFT5.js} +2 -2
- package/dist/_chunks/{radio-group-Cz1a4QCA.js → radio-group-BHZOxrIK.js} +4 -4
- package/dist/_chunks/{select-Ca6ibiDL.js → select-C92AT_OZ.js} +7 -7
- package/dist/_chunks/{sidebar-D8Lq065m.js → sidebar-BqzlRBvC.js} +271 -291
- package/dist/_chunks/{slider-CkR6CLun.js → slider-CfEzeseL.js} +4 -4
- package/dist/_chunks/{tabs-CRCyPpJo.js → tabs-aEQfQV3x.js} +8 -8
- package/dist/_chunks/{theme-toggle-B3meAb3y.js → theme-toggle-BswYl0Yp.js} +2 -2
- package/dist/_chunks/use-controllable-state-BiY4xTzM.js +23 -0
- package/dist/_chunks/use-copy-to-clipboard-Cyfc_dlv.js +43 -0
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +24 -0
- package/dist/_chunks/{warning-stack-CeRihME9.js → warning-stack-CDH9TudY.js} +2 -2
- package/dist/_chunks/{workflow-map-D3MvrsZV.js → workflow-map-BeKe23uw.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/use-debounced-callback.d.ts +1 -5
- package/dist/components/_shared/use-direction.d.ts +1 -18
- package/dist/components/_shared/use-focus-trap.d.ts +1 -31
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/command-palette.d.ts +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/icon-button-group/icon-button-group.d.ts +14 -14
- package/dist/components/list/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sidebar/index.js +8 -7
- package/dist/components/sidebar/sidebar.d.ts +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.js +98 -15
- package/dist/hooks/use-debounced-callback.d.ts +19 -0
- package/dist/hooks/use-debounced-value.d.ts +16 -0
- package/dist/hooks/use-direction.d.ts +19 -0
- package/dist/hooks/use-focus-trap.d.ts +32 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +13 -0
- package/dist/hooks/use-persistent-state.d.ts +16 -0
- package/dist/index.js +493 -492
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +4 -2
- package/dist/_chunks/checkbox-group-Qkm3Rg1S.js +0 -208
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as b, useState as
|
|
3
|
-
import * as
|
|
1
|
+
import { jsx as e, jsxs as f, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b, useState as R, useEffect as K, useCallback as G, useRef as U, useMemo as q, useId as is, useContext as W, createContext as X } from "react";
|
|
3
|
+
import * as I from "@radix-ui/react-dialog";
|
|
4
4
|
import * as H from "@radix-ui/react-collapsible";
|
|
5
|
-
import * as
|
|
5
|
+
import * as A from "@radix-ui/react-accordion";
|
|
6
6
|
import * as S from "@radix-ui/react-tooltip";
|
|
7
|
-
import { a as
|
|
8
|
-
import { Slot as
|
|
9
|
-
import { c as
|
|
10
|
-
import { useTranslation as
|
|
11
|
-
import { u as
|
|
7
|
+
import { a as ts } from "./accordion-CNcodXuO.js";
|
|
8
|
+
import { Slot as ns } from "@radix-ui/react-slot";
|
|
9
|
+
import { c as B } from "./index-D2ZczOXr.js";
|
|
10
|
+
import { useTranslation as D } from "react-i18next";
|
|
11
|
+
import { u as os } from "./registry-C9nwlNyL.js";
|
|
12
12
|
import { X as ls } from "./x-CCcI3eJp.js";
|
|
13
|
-
import { c as
|
|
13
|
+
import { c as E } from "./createLucideIcon-CrFbzy84.js";
|
|
14
14
|
import { C as _ } from "./chevron-right-BrpYejk0.js";
|
|
15
15
|
import { S as cs } from "./star-vav0SJ9e.js";
|
|
16
16
|
/**
|
|
@@ -26,7 +26,7 @@ const us = [
|
|
|
26
26
|
["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
|
|
27
27
|
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
28
28
|
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
29
|
-
], ms =
|
|
29
|
+
], ms = E("grip-vertical", us);
|
|
30
30
|
/**
|
|
31
31
|
* @license lucide-react v1.8.0 - ISC
|
|
32
32
|
*
|
|
@@ -37,18 +37,18 @@ const fs = [
|
|
|
37
37
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
38
38
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
39
39
|
["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
|
|
40
|
-
],
|
|
40
|
+
], vs = E("panel-left-close", fs);
|
|
41
41
|
/**
|
|
42
42
|
* @license lucide-react v1.8.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
const
|
|
47
|
+
const ps = [
|
|
48
48
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
49
49
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
50
50
|
["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
|
|
51
|
-
], gs =
|
|
51
|
+
], gs = E("panel-left-open", ps), bs = {
|
|
52
52
|
id: "sidebar",
|
|
53
53
|
capabilities: ["expand"],
|
|
54
54
|
state: {
|
|
@@ -79,15 +79,15 @@ const vs = [
|
|
|
79
79
|
description: "Each Sidebar.Item emits its key as data-nav-id."
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
},
|
|
82
|
+
}, F = X({
|
|
83
83
|
mode: "expanded",
|
|
84
84
|
density: "default"
|
|
85
|
-
}), y = () =>
|
|
85
|
+
}), y = () => W(F), Y = "ui.sidebar.state";
|
|
86
86
|
function hs(s) {
|
|
87
87
|
if (typeof window > "u") return s;
|
|
88
88
|
try {
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
89
|
+
const a = window.localStorage.getItem(Y);
|
|
90
|
+
if (a === "expanded" || a === "icon" || a === "overlay") return a;
|
|
91
91
|
} catch {
|
|
92
92
|
}
|
|
93
93
|
return s;
|
|
@@ -95,30 +95,11 @@ function hs(s) {
|
|
|
95
95
|
function xs(s) {
|
|
96
96
|
if (!(typeof window > "u"))
|
|
97
97
|
try {
|
|
98
|
-
window.localStorage.setItem(
|
|
98
|
+
window.localStorage.setItem(Y, s);
|
|
99
99
|
} catch {
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
const [r, d] = D(() => {
|
|
104
|
-
if (typeof window > "u")
|
|
105
|
-
return typeof e == "function" ? e() : e;
|
|
106
|
-
try {
|
|
107
|
-
const n = window.localStorage.getItem(s);
|
|
108
|
-
if (n !== null) return JSON.parse(n);
|
|
109
|
-
} catch {
|
|
110
|
-
}
|
|
111
|
-
return typeof e == "function" ? e() : e;
|
|
112
|
-
});
|
|
113
|
-
return F(() => {
|
|
114
|
-
if (!(typeof window > "u"))
|
|
115
|
-
try {
|
|
116
|
-
window.localStorage.setItem(s, JSON.stringify(r));
|
|
117
|
-
} catch {
|
|
118
|
-
}
|
|
119
|
-
}, [s, r]), [r, d];
|
|
120
|
-
}
|
|
121
|
-
const M = I(
|
|
102
|
+
const M = B(
|
|
122
103
|
[
|
|
123
104
|
"ds:flex ds:flex-col",
|
|
124
105
|
// Sidebar sits at the page background in light mode (white-on-white
|
|
@@ -161,49 +142,49 @@ const M = I(
|
|
|
161
142
|
), ys = b(
|
|
162
143
|
({
|
|
163
144
|
state: s,
|
|
164
|
-
defaultState:
|
|
145
|
+
defaultState: a = "expanded",
|
|
165
146
|
onStateChange: r,
|
|
166
|
-
density:
|
|
167
|
-
open:
|
|
168
|
-
onOpenChange:
|
|
147
|
+
density: i = "default",
|
|
148
|
+
open: t,
|
|
149
|
+
onOpenChange: o,
|
|
169
150
|
"aria-label": u,
|
|
170
|
-
className:
|
|
151
|
+
className: n,
|
|
171
152
|
children: m,
|
|
172
153
|
id: l,
|
|
173
|
-
...
|
|
154
|
+
...v
|
|
174
155
|
}, x) => {
|
|
175
|
-
const { t: w } =
|
|
176
|
-
() => g ? s : hs(
|
|
177
|
-
), h = g ? s :
|
|
178
|
-
|
|
179
|
-
g || xs(
|
|
180
|
-
}, [
|
|
181
|
-
const
|
|
156
|
+
const { t: w } = D(), g = s !== void 0, [d, N] = R(
|
|
157
|
+
() => g ? s : hs(a)
|
|
158
|
+
), h = g ? s : d;
|
|
159
|
+
K(() => {
|
|
160
|
+
g || xs(d);
|
|
161
|
+
}, [d, g]);
|
|
162
|
+
const p = G(
|
|
182
163
|
(C) => {
|
|
183
164
|
g || N(C), r == null || r(C);
|
|
184
165
|
},
|
|
185
166
|
[g, r]
|
|
186
|
-
), z = u ?? w("navigation.sidebar.label"), j =
|
|
187
|
-
|
|
167
|
+
), z = u ?? w("navigation.sidebar.label"), j = U(h);
|
|
168
|
+
K(() => {
|
|
188
169
|
j.current = h;
|
|
189
170
|
}, [h]);
|
|
190
|
-
const k =
|
|
171
|
+
const k = q(
|
|
191
172
|
() => ({
|
|
192
173
|
getIsCollapsed: () => j.current !== "expanded",
|
|
193
174
|
toggleCollapsed: () => {
|
|
194
175
|
const C = j.current === "expanded" ? "icon" : "expanded";
|
|
195
|
-
|
|
176
|
+
p(C);
|
|
196
177
|
}
|
|
197
178
|
}),
|
|
198
|
-
[
|
|
179
|
+
[p]
|
|
199
180
|
);
|
|
200
|
-
return
|
|
201
|
-
|
|
181
|
+
return os(bs, k, l), h === "overlay" ? /* @__PURE__ */ e(
|
|
182
|
+
F.Provider,
|
|
202
183
|
{
|
|
203
|
-
value: { mode: "overlay", density:
|
|
204
|
-
children: /* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
|
|
184
|
+
value: { mode: "overlay", density: i, transitionTo: p },
|
|
185
|
+
children: /* @__PURE__ */ e(I.Root, { open: t, onOpenChange: o, children: /* @__PURE__ */ f(I.Portal, { children: [
|
|
186
|
+
/* @__PURE__ */ e(
|
|
187
|
+
I.Overlay,
|
|
207
188
|
{
|
|
208
189
|
className: [
|
|
209
190
|
"ds:fixed ds:inset-0 ds:z-[var(--z-modal-backdrop)]",
|
|
@@ -215,24 +196,24 @@ const M = I(
|
|
|
215
196
|
}
|
|
216
197
|
),
|
|
217
198
|
/* @__PURE__ */ f(
|
|
218
|
-
|
|
199
|
+
I.Content,
|
|
219
200
|
{
|
|
220
201
|
"aria-label": z,
|
|
221
202
|
className: [
|
|
222
203
|
"ds:fixed ds:z-[var(--z-modal)]",
|
|
223
204
|
"ds:inset-inline-start-0 ds:inset-block-start-0",
|
|
224
205
|
"ds:h-dvh",
|
|
225
|
-
M({ mode: "overlay", density:
|
|
206
|
+
M({ mode: "overlay", density: i }),
|
|
226
207
|
"ds:shadow-[var(--shadow-xl)]",
|
|
227
208
|
"ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out",
|
|
228
209
|
"ds:data-[state=open]:slide-in-from-left ds:data-[state=closed]:slide-out-to-left",
|
|
229
210
|
"ds:rtl:data-[state=open]:slide-in-from-right ds:rtl:data-[state=closed]:slide-out-to-right",
|
|
230
211
|
"ds:motion-reduce:animate-none",
|
|
231
212
|
"ds:focus:outline-none",
|
|
232
|
-
|
|
213
|
+
n ?? ""
|
|
233
214
|
].filter(Boolean).join(" "),
|
|
234
215
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ e(
|
|
236
217
|
"nav",
|
|
237
218
|
{
|
|
238
219
|
ref: x,
|
|
@@ -241,11 +222,11 @@ const M = I(
|
|
|
241
222
|
"data-component": "sidebar",
|
|
242
223
|
"data-component-id": l,
|
|
243
224
|
className: "ds:flex ds:flex-col ds:h-full",
|
|
244
|
-
...
|
|
225
|
+
...v,
|
|
245
226
|
children: m
|
|
246
227
|
}
|
|
247
228
|
),
|
|
248
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ e(I.Close, { asChild: !0, children: /* @__PURE__ */ e(
|
|
249
230
|
"button",
|
|
250
231
|
{
|
|
251
232
|
type: "button",
|
|
@@ -259,7 +240,7 @@ const M = I(
|
|
|
259
240
|
"ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)]",
|
|
260
241
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
261
242
|
].join(" "),
|
|
262
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ e(ls, { "aria-hidden": "true", className: "ds:size-4" })
|
|
263
244
|
}
|
|
264
245
|
) })
|
|
265
246
|
]
|
|
@@ -267,11 +248,11 @@ const M = I(
|
|
|
267
248
|
)
|
|
268
249
|
] }) })
|
|
269
250
|
}
|
|
270
|
-
) : /* @__PURE__ */
|
|
271
|
-
|
|
251
|
+
) : /* @__PURE__ */ e(
|
|
252
|
+
F.Provider,
|
|
272
253
|
{
|
|
273
|
-
value: { mode: h, density:
|
|
274
|
-
children: /* @__PURE__ */
|
|
254
|
+
value: { mode: h, density: i, transitionTo: p },
|
|
255
|
+
children: /* @__PURE__ */ e(S.Provider, { delayDuration: 300, children: /* @__PURE__ */ e(
|
|
275
256
|
"nav",
|
|
276
257
|
{
|
|
277
258
|
ref: x,
|
|
@@ -280,13 +261,13 @@ const M = I(
|
|
|
280
261
|
"data-component": "sidebar",
|
|
281
262
|
"data-component-id": l,
|
|
282
263
|
"data-mode": h,
|
|
283
|
-
"data-density":
|
|
264
|
+
"data-density": i,
|
|
284
265
|
className: [
|
|
285
|
-
M({ mode: h, density:
|
|
286
|
-
|
|
287
|
-
|
|
266
|
+
M({ mode: h, density: i }),
|
|
267
|
+
i === "compact" ? "ds:density-compact" : "",
|
|
268
|
+
n ?? ""
|
|
288
269
|
].filter(Boolean).join(" "),
|
|
289
|
-
...
|
|
270
|
+
...v,
|
|
290
271
|
children: m
|
|
291
272
|
}
|
|
292
273
|
) })
|
|
@@ -295,9 +276,9 @@ const M = I(
|
|
|
295
276
|
}
|
|
296
277
|
);
|
|
297
278
|
ys.displayName = "Sidebar";
|
|
298
|
-
const ws = b(({ className: s, ...
|
|
299
|
-
const { mode:
|
|
300
|
-
return /* @__PURE__ */
|
|
279
|
+
const ws = b(({ className: s, ...a }, r) => {
|
|
280
|
+
const { mode: i } = y();
|
|
281
|
+
return /* @__PURE__ */ e(
|
|
301
282
|
"div",
|
|
302
283
|
{
|
|
303
284
|
ref: r,
|
|
@@ -306,7 +287,7 @@ const ws = b(({ className: s, ...e }, r) => {
|
|
|
306
287
|
"ds:min-h-[var(--min-target-size)]",
|
|
307
288
|
// Icon-rail is 64px — shrink horizontal padding so a 44×44
|
|
308
289
|
// control fits centred inside the header.
|
|
309
|
-
|
|
290
|
+
i === "icon" ? "ds:justify-center ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]" : "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
310
291
|
"ds:py-[var(--spacing-sm)]",
|
|
311
292
|
// Hairline border + downward chrome shadow cast the header as a
|
|
312
293
|
// sticky top band above the scrolling body.
|
|
@@ -314,13 +295,13 @@ const ws = b(({ className: s, ...e }, r) => {
|
|
|
314
295
|
"ds:shadow-[var(--shadow-chrome-down)]",
|
|
315
296
|
s ?? ""
|
|
316
297
|
].filter(Boolean).join(" "),
|
|
317
|
-
...
|
|
298
|
+
...a
|
|
318
299
|
}
|
|
319
300
|
);
|
|
320
301
|
});
|
|
321
302
|
ws.displayName = "SidebarHeader";
|
|
322
303
|
const Ns = b(
|
|
323
|
-
({ className: s, ...
|
|
304
|
+
({ className: s, ...a }, r) => /* @__PURE__ */ e(
|
|
324
305
|
"div",
|
|
325
306
|
{
|
|
326
307
|
ref: r,
|
|
@@ -330,14 +311,14 @@ const Ns = b(
|
|
|
330
311
|
"ds:py-[var(--spacing-sm)]",
|
|
331
312
|
s ?? ""
|
|
332
313
|
].filter(Boolean).join(" "),
|
|
333
|
-
...
|
|
314
|
+
...a
|
|
334
315
|
}
|
|
335
316
|
)
|
|
336
317
|
);
|
|
337
318
|
Ns.displayName = "SidebarBody";
|
|
338
|
-
const Ss = b(({ className: s, ...
|
|
339
|
-
const { mode:
|
|
340
|
-
return /* @__PURE__ */
|
|
319
|
+
const Ss = b(({ className: s, ...a }, r) => {
|
|
320
|
+
const { mode: i } = y();
|
|
321
|
+
return /* @__PURE__ */ e(
|
|
341
322
|
"div",
|
|
342
323
|
{
|
|
343
324
|
ref: r,
|
|
@@ -345,7 +326,7 @@ const Ss = b(({ className: s, ...e }, r) => {
|
|
|
345
326
|
"ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
346
327
|
// Icon-rail is 64px — two 44×44 controls can't sit side-by-side,
|
|
347
328
|
// so switch to a vertical stack and let each row self-centre.
|
|
348
|
-
|
|
329
|
+
i === "icon" ? "ds:flex-col ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]" : "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
349
330
|
"ds:min-h-[var(--min-target-size)]",
|
|
350
331
|
"ds:py-[var(--spacing-sm)]",
|
|
351
332
|
// Hairline border + upward chrome shadow cast the footer as a
|
|
@@ -354,7 +335,7 @@ const Ss = b(({ className: s, ...e }, r) => {
|
|
|
354
335
|
"ds:shadow-[var(--shadow-chrome-up)]",
|
|
355
336
|
s ?? ""
|
|
356
337
|
].filter(Boolean).join(" "),
|
|
357
|
-
...
|
|
338
|
+
...a
|
|
358
339
|
}
|
|
359
340
|
);
|
|
360
341
|
});
|
|
@@ -369,24 +350,24 @@ const js = [
|
|
|
369
350
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
370
351
|
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
371
352
|
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
372
|
-
].join(" "),
|
|
353
|
+
].join(" "), O = [
|
|
373
354
|
"ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
|
|
374
355
|
"ds:size-4",
|
|
375
356
|
"ds:text-[var(--accent)]",
|
|
376
357
|
"ds:me-[var(--spacing-xs)]"
|
|
377
|
-
].join(" "),
|
|
358
|
+
].join(" "), J = b(
|
|
378
359
|
({
|
|
379
360
|
label: s,
|
|
380
|
-
icon:
|
|
361
|
+
icon: a,
|
|
381
362
|
collapsible: r = !0,
|
|
382
|
-
defaultOpen:
|
|
383
|
-
open:
|
|
384
|
-
onOpenChange:
|
|
363
|
+
defaultOpen: i = !0,
|
|
364
|
+
open: t,
|
|
365
|
+
onOpenChange: o,
|
|
385
366
|
className: u,
|
|
386
|
-
children:
|
|
367
|
+
children: n,
|
|
387
368
|
...m
|
|
388
369
|
}, l) => {
|
|
389
|
-
const { mode:
|
|
370
|
+
const { mode: v } = y(), x = v === "icon", w = r && !x && !!s, g = [
|
|
390
371
|
"ds:flex ds:flex-col",
|
|
391
372
|
"ds:gap-[var(--spacing-xs)]",
|
|
392
373
|
"ds:mt-[var(--spacing-sm)]",
|
|
@@ -394,7 +375,7 @@ const js = [
|
|
|
394
375
|
].filter(Boolean).join(" ");
|
|
395
376
|
if (!w)
|
|
396
377
|
return /* @__PURE__ */ f("div", { ref: l, className: g, ...m, children: [
|
|
397
|
-
!!s || !!
|
|
378
|
+
!!s || !!a ? /* @__PURE__ */ f(
|
|
398
379
|
"span",
|
|
399
380
|
{
|
|
400
381
|
className: [
|
|
@@ -403,31 +384,31 @@ const js = [
|
|
|
403
384
|
"ds:text-[var(--muted-foreground)]",
|
|
404
385
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
405
386
|
"ds:py-[var(--spacing-xs)]",
|
|
406
|
-
x && !
|
|
387
|
+
x && !a ? "ds:sr-only" : ""
|
|
407
388
|
].filter(Boolean).join(" "),
|
|
408
389
|
children: [
|
|
409
|
-
|
|
410
|
-
s ? /* @__PURE__ */
|
|
390
|
+
a ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: O, children: a }) : null,
|
|
391
|
+
s ? /* @__PURE__ */ e("span", { className: x ? "ds:sr-only" : "", children: s }) : null
|
|
411
392
|
]
|
|
412
393
|
}
|
|
413
394
|
) : null,
|
|
414
|
-
|
|
395
|
+
n
|
|
415
396
|
] });
|
|
416
|
-
const
|
|
417
|
-
return /* @__PURE__ */
|
|
418
|
-
|
|
397
|
+
const d = "section";
|
|
398
|
+
return /* @__PURE__ */ e(
|
|
399
|
+
A.Root,
|
|
419
400
|
{
|
|
420
401
|
type: "single",
|
|
421
402
|
collapsible: !0,
|
|
422
|
-
defaultValue:
|
|
423
|
-
value:
|
|
424
|
-
onValueChange:
|
|
403
|
+
defaultValue: t === void 0 && i ? d : void 0,
|
|
404
|
+
value: t === void 0 ? void 0 : t ? d : "",
|
|
405
|
+
onValueChange: o ? (N) => o(N === d) : void 0,
|
|
425
406
|
asChild: !0,
|
|
426
|
-
children: /* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
/* @__PURE__ */
|
|
407
|
+
children: /* @__PURE__ */ e("div", { ref: l, className: g, ...m, children: /* @__PURE__ */ f(A.Item, { value: d, children: [
|
|
408
|
+
/* @__PURE__ */ e(A.Header, { className: "ds:flex", children: /* @__PURE__ */ f(A.Trigger, { className: js, children: [
|
|
409
|
+
a ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: O, children: a }) : null,
|
|
410
|
+
/* @__PURE__ */ e("span", { className: "ds:flex-1 ds:text-start", children: s }),
|
|
411
|
+
/* @__PURE__ */ e(
|
|
431
412
|
_,
|
|
432
413
|
{
|
|
433
414
|
"aria-hidden": "true",
|
|
@@ -435,12 +416,12 @@ const js = [
|
|
|
435
416
|
}
|
|
436
417
|
)
|
|
437
418
|
] }) }),
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
|
|
419
|
+
/* @__PURE__ */ e(
|
|
420
|
+
ts,
|
|
440
421
|
{
|
|
441
422
|
"aria-label": s,
|
|
442
423
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:[&>div]:contents",
|
|
443
|
-
children:
|
|
424
|
+
children: n
|
|
444
425
|
}
|
|
445
426
|
)
|
|
446
427
|
] }) })
|
|
@@ -448,7 +429,7 @@ const js = [
|
|
|
448
429
|
);
|
|
449
430
|
}
|
|
450
431
|
);
|
|
451
|
-
|
|
432
|
+
J.displayName = "SidebarSection";
|
|
452
433
|
const zs = [
|
|
453
434
|
"ds:group ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
454
435
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -463,35 +444,35 @@ const zs = [
|
|
|
463
444
|
].join(" "), ks = b(
|
|
464
445
|
({
|
|
465
446
|
label: s,
|
|
466
|
-
icon:
|
|
447
|
+
icon: a,
|
|
467
448
|
children: r,
|
|
468
|
-
className:
|
|
469
|
-
defaultOpen:
|
|
470
|
-
open:
|
|
449
|
+
className: i,
|
|
450
|
+
defaultOpen: t,
|
|
451
|
+
open: o,
|
|
471
452
|
onOpenChange: u,
|
|
472
|
-
...
|
|
453
|
+
...n
|
|
473
454
|
}, m) => {
|
|
474
455
|
const { mode: l } = y();
|
|
475
456
|
return /* @__PURE__ */ f(
|
|
476
457
|
H.Root,
|
|
477
458
|
{
|
|
478
459
|
ref: m,
|
|
479
|
-
defaultOpen:
|
|
480
|
-
open:
|
|
460
|
+
defaultOpen: t,
|
|
461
|
+
open: o,
|
|
481
462
|
onOpenChange: u,
|
|
482
|
-
className:
|
|
483
|
-
...
|
|
463
|
+
className: i,
|
|
464
|
+
...n,
|
|
484
465
|
children: [
|
|
485
466
|
/* @__PURE__ */ f(H.Trigger, { className: zs, children: [
|
|
486
|
-
|
|
467
|
+
a ? /* @__PURE__ */ e(
|
|
487
468
|
"span",
|
|
488
469
|
{
|
|
489
470
|
"aria-hidden": "true",
|
|
490
471
|
className: "ds:inline-flex ds:items-center ds:text-[var(--accent)]",
|
|
491
|
-
children:
|
|
472
|
+
children: a
|
|
492
473
|
}
|
|
493
474
|
) : null,
|
|
494
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ e(
|
|
495
476
|
"span",
|
|
496
477
|
{
|
|
497
478
|
className: [
|
|
@@ -501,7 +482,7 @@ const zs = [
|
|
|
501
482
|
children: s
|
|
502
483
|
}
|
|
503
484
|
),
|
|
504
|
-
l !== "icon" ? /* @__PURE__ */
|
|
485
|
+
l !== "icon" ? /* @__PURE__ */ e(
|
|
505
486
|
_,
|
|
506
487
|
{
|
|
507
488
|
"aria-hidden": "true",
|
|
@@ -509,7 +490,7 @@ const zs = [
|
|
|
509
490
|
}
|
|
510
491
|
) : null
|
|
511
492
|
] }),
|
|
512
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ e(
|
|
513
494
|
H.Content,
|
|
514
495
|
{
|
|
515
496
|
className: [
|
|
@@ -527,7 +508,7 @@ const zs = [
|
|
|
527
508
|
}
|
|
528
509
|
);
|
|
529
510
|
ks.displayName = "SidebarGroup";
|
|
530
|
-
const Cs =
|
|
511
|
+
const Cs = B(
|
|
531
512
|
[
|
|
532
513
|
// Every row is a pin-hover parent so inline pin / reorder affordances can
|
|
533
514
|
// fade in on hover of the whole row — keep `group/item` on this selector.
|
|
@@ -591,26 +572,26 @@ const Cs = I(
|
|
|
591
572
|
), Q = b(
|
|
592
573
|
({
|
|
593
574
|
asChild: s = !1,
|
|
594
|
-
isActive:
|
|
575
|
+
isActive: a = !1,
|
|
595
576
|
isPinned: r = !1,
|
|
596
|
-
onPinChange:
|
|
597
|
-
pinLabel:
|
|
598
|
-
className:
|
|
577
|
+
onPinChange: i,
|
|
578
|
+
pinLabel: t,
|
|
579
|
+
className: o,
|
|
599
580
|
children: u,
|
|
600
|
-
"aria-label":
|
|
581
|
+
"aria-label": n,
|
|
601
582
|
...m
|
|
602
583
|
}, l) => {
|
|
603
|
-
const { mode:
|
|
584
|
+
const { mode: v, density: x } = y(), w = s ? ns : "a", g = i !== void 0 && v !== "icon", d = /* @__PURE__ */ e(
|
|
604
585
|
w,
|
|
605
586
|
{
|
|
606
587
|
ref: l,
|
|
607
|
-
"aria-current":
|
|
608
|
-
"aria-label":
|
|
588
|
+
"aria-current": a ? "page" : void 0,
|
|
589
|
+
"aria-label": n,
|
|
609
590
|
className: Cs({
|
|
610
|
-
mode:
|
|
591
|
+
mode: v,
|
|
611
592
|
density: x,
|
|
612
|
-
isActive:
|
|
613
|
-
className: g ? "ds:flex-1 ds:min-w-0" :
|
|
593
|
+
isActive: a,
|
|
594
|
+
className: g ? "ds:flex-1 ds:min-w-0" : o
|
|
614
595
|
}),
|
|
615
596
|
...m,
|
|
616
597
|
children: u
|
|
@@ -620,24 +601,24 @@ const Cs = I(
|
|
|
620
601
|
{
|
|
621
602
|
className: [
|
|
622
603
|
"ds:group/item ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
623
|
-
|
|
604
|
+
o ?? ""
|
|
624
605
|
].filter(Boolean).join(" "),
|
|
625
606
|
children: [
|
|
626
|
-
|
|
627
|
-
/* @__PURE__ */
|
|
607
|
+
d,
|
|
608
|
+
/* @__PURE__ */ e(
|
|
628
609
|
L,
|
|
629
610
|
{
|
|
630
611
|
isPinned: r,
|
|
631
|
-
label:
|
|
632
|
-
onPinChange:
|
|
612
|
+
label: t ?? n ?? "",
|
|
613
|
+
onPinChange: i
|
|
633
614
|
}
|
|
634
615
|
)
|
|
635
616
|
]
|
|
636
617
|
}
|
|
637
|
-
) :
|
|
638
|
-
return
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
-
/* @__PURE__ */
|
|
618
|
+
) : d;
|
|
619
|
+
return v === "icon" && n ? /* @__PURE__ */ f(S.Root, { children: [
|
|
620
|
+
/* @__PURE__ */ e(S.Trigger, { asChild: !0, children: N }),
|
|
621
|
+
/* @__PURE__ */ e(S.Portal, { children: /* @__PURE__ */ f(
|
|
641
622
|
S.Content,
|
|
642
623
|
{
|
|
643
624
|
side: "right",
|
|
@@ -650,8 +631,8 @@ const Cs = I(
|
|
|
650
631
|
"ds:animate-in ds:fade-in ds:zoom-in-95 ds:motion-reduce:animate-none"
|
|
651
632
|
].join(" "),
|
|
652
633
|
children: [
|
|
653
|
-
|
|
654
|
-
/* @__PURE__ */
|
|
634
|
+
n,
|
|
635
|
+
/* @__PURE__ */ e(S.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
655
636
|
]
|
|
656
637
|
}
|
|
657
638
|
) })
|
|
@@ -659,10 +640,10 @@ const Cs = I(
|
|
|
659
640
|
}
|
|
660
641
|
);
|
|
661
642
|
Q.displayName = "SidebarItem";
|
|
662
|
-
const Ts = b(({ className: s, children:
|
|
643
|
+
const Ts = b(({ className: s, children: a, ...r }, i) => /* @__PURE__ */ e(
|
|
663
644
|
"span",
|
|
664
645
|
{
|
|
665
|
-
ref:
|
|
646
|
+
ref: i,
|
|
666
647
|
"aria-hidden": "true",
|
|
667
648
|
className: [
|
|
668
649
|
"ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
|
|
@@ -677,40 +658,40 @@ const Ts = b(({ className: s, children: e, ...r }, d) => /* @__PURE__ */ a(
|
|
|
677
658
|
s ?? ""
|
|
678
659
|
].filter(Boolean).join(" "),
|
|
679
660
|
...r,
|
|
680
|
-
children:
|
|
661
|
+
children: a
|
|
681
662
|
}
|
|
682
663
|
));
|
|
683
664
|
Ts.displayName = "SidebarItemIcon";
|
|
684
|
-
const
|
|
685
|
-
const { mode:
|
|
686
|
-
return /* @__PURE__ */
|
|
665
|
+
const Bs = b(({ className: s, children: a, ...r }, i) => {
|
|
666
|
+
const { mode: t } = y();
|
|
667
|
+
return /* @__PURE__ */ e(
|
|
687
668
|
"span",
|
|
688
669
|
{
|
|
689
|
-
ref:
|
|
670
|
+
ref: i,
|
|
690
671
|
className: [
|
|
691
672
|
"ds:flex-1",
|
|
692
673
|
"ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap ds:break-normal",
|
|
693
674
|
"ds:text-start",
|
|
694
|
-
|
|
675
|
+
t === "icon" ? "ds:sr-only" : "",
|
|
695
676
|
s ?? ""
|
|
696
677
|
].filter(Boolean).join(" "),
|
|
697
678
|
...r,
|
|
698
|
-
children:
|
|
679
|
+
children: a
|
|
699
680
|
}
|
|
700
681
|
);
|
|
701
682
|
});
|
|
702
|
-
|
|
703
|
-
const
|
|
704
|
-
const { mode:
|
|
705
|
-
return /* @__PURE__ */
|
|
683
|
+
Bs.displayName = "SidebarItemLabel";
|
|
684
|
+
const Is = b(({ className: s, children: a, ...r }, i) => {
|
|
685
|
+
const { mode: t } = y(), o = t === "icon";
|
|
686
|
+
return /* @__PURE__ */ e(
|
|
706
687
|
"span",
|
|
707
688
|
{
|
|
708
|
-
ref:
|
|
709
|
-
"aria-hidden":
|
|
689
|
+
ref: i,
|
|
690
|
+
"aria-hidden": o ? "true" : void 0,
|
|
710
691
|
className: [
|
|
711
692
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
712
693
|
"ds:font-[var(--font-weight-semibold)]",
|
|
713
|
-
|
|
694
|
+
o ? [
|
|
714
695
|
"ds:absolute ds:top-[2px] ds:end-[2px]",
|
|
715
696
|
"ds:min-w-0 ds:size-[10px] ds:ps-0 ds:pe-0",
|
|
716
697
|
"ds:rounded-[var(--radius-full)]",
|
|
@@ -727,12 +708,12 @@ const Bs = b(({ className: s, children: e, ...r }, d) => {
|
|
|
727
708
|
s ?? ""
|
|
728
709
|
].filter(Boolean).join(" "),
|
|
729
710
|
...r,
|
|
730
|
-
children:
|
|
711
|
+
children: a
|
|
731
712
|
}
|
|
732
713
|
);
|
|
733
714
|
});
|
|
734
|
-
|
|
735
|
-
const Ds =
|
|
715
|
+
Is.displayName = "SidebarItemBadge";
|
|
716
|
+
const Ds = B(
|
|
736
717
|
[
|
|
737
718
|
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
738
719
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -745,18 +726,18 @@ const Ds = I(
|
|
|
745
726
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
746
727
|
"ds:no-underline"
|
|
747
728
|
].join(" ")
|
|
748
|
-
), As = b(({ logo: s, name:
|
|
749
|
-
const { mode: u } = y(),
|
|
729
|
+
), As = b(({ logo: s, name: a, showChevron: r = !0, className: i, ...t }, o) => {
|
|
730
|
+
const { mode: u } = y(), n = u !== "icon";
|
|
750
731
|
return /* @__PURE__ */ f(
|
|
751
732
|
"button",
|
|
752
733
|
{
|
|
753
|
-
ref:
|
|
734
|
+
ref: o,
|
|
754
735
|
type: "button",
|
|
755
|
-
"aria-label":
|
|
756
|
-
className: [Ds(),
|
|
757
|
-
...
|
|
736
|
+
"aria-label": a,
|
|
737
|
+
className: [Ds(), i].filter(Boolean).join(" "),
|
|
738
|
+
...t,
|
|
758
739
|
children: [
|
|
759
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ e(
|
|
760
741
|
"span",
|
|
761
742
|
{
|
|
762
743
|
"aria-hidden": "true",
|
|
@@ -764,9 +745,9 @@ const Ds = I(
|
|
|
764
745
|
children: s
|
|
765
746
|
}
|
|
766
747
|
),
|
|
767
|
-
|
|
768
|
-
/* @__PURE__ */
|
|
769
|
-
r ? /* @__PURE__ */
|
|
748
|
+
n ? /* @__PURE__ */ f($, { children: [
|
|
749
|
+
/* @__PURE__ */ e("span", { className: "ds:truncate ds:flex-1 ds:text-start ds:max-w-[var(--header-workspace-max-inline-size)]", children: a }),
|
|
750
|
+
r ? /* @__PURE__ */ e(
|
|
770
751
|
_,
|
|
771
752
|
{
|
|
772
753
|
"aria-hidden": "true",
|
|
@@ -779,7 +760,7 @@ const Ds = I(
|
|
|
779
760
|
);
|
|
780
761
|
});
|
|
781
762
|
As.displayName = "SidebarWorkspaceSwitcher";
|
|
782
|
-
const Rs =
|
|
763
|
+
const Rs = B(
|
|
783
764
|
[
|
|
784
765
|
"ds:flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
|
|
785
766
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -802,19 +783,19 @@ const Rs = I(
|
|
|
802
783
|
},
|
|
803
784
|
defaultVariants: { mode: "expanded" }
|
|
804
785
|
}
|
|
805
|
-
), Ps = b(({ icon: s, label:
|
|
806
|
-
const { mode: u } = y(),
|
|
786
|
+
), Ps = b(({ icon: s, label: a, shortcut: r, className: i, ...t }, o) => {
|
|
787
|
+
const { mode: u } = y(), n = u !== "icon";
|
|
807
788
|
return /* @__PURE__ */ f(
|
|
808
789
|
"button",
|
|
809
790
|
{
|
|
810
|
-
ref:
|
|
791
|
+
ref: o,
|
|
811
792
|
type: "button",
|
|
812
|
-
"aria-label":
|
|
793
|
+
"aria-label": a,
|
|
813
794
|
"aria-keyshortcuts": r,
|
|
814
|
-
className: [Rs({ mode: u }),
|
|
815
|
-
...
|
|
795
|
+
className: [Rs({ mode: u }), i].filter(Boolean).join(" "),
|
|
796
|
+
...t,
|
|
816
797
|
children: [
|
|
817
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ e(
|
|
818
799
|
"span",
|
|
819
800
|
{
|
|
820
801
|
"aria-hidden": "true",
|
|
@@ -822,9 +803,9 @@ const Rs = I(
|
|
|
822
803
|
children: s
|
|
823
804
|
}
|
|
824
805
|
),
|
|
825
|
-
|
|
826
|
-
/* @__PURE__ */
|
|
827
|
-
r ? /* @__PURE__ */
|
|
806
|
+
n ? /* @__PURE__ */ f($, { children: [
|
|
807
|
+
/* @__PURE__ */ e("span", { className: "ds:truncate", children: a }),
|
|
808
|
+
r ? /* @__PURE__ */ e("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
|
|
828
809
|
] }) : null
|
|
829
810
|
]
|
|
830
811
|
}
|
|
@@ -845,23 +826,23 @@ const Hs = [
|
|
|
845
826
|
"ds:transition-[color,opacity,background-color] ds:duration-[var(--animation-duration)]",
|
|
846
827
|
"ds:motion-reduce:transition-none"
|
|
847
828
|
].join(" "), L = b(
|
|
848
|
-
({ isPinned: s, onPinChange:
|
|
849
|
-
const { t:
|
|
829
|
+
({ isPinned: s, onPinChange: a, label: r, className: i, onClick: t, ...o }, u) => {
|
|
830
|
+
const { t: n } = D(), { mode: m } = y();
|
|
850
831
|
if (m === "icon") return null;
|
|
851
|
-
const l = s ?
|
|
852
|
-
return /* @__PURE__ */
|
|
832
|
+
const l = s ? n("navigation.sidebar.unpinItem", "Unpin {{label}}", { label: r }) : n("navigation.sidebar.pinItem", "Pin {{label}}", { label: r });
|
|
833
|
+
return /* @__PURE__ */ e(
|
|
853
834
|
"button",
|
|
854
835
|
{
|
|
855
836
|
ref: u,
|
|
856
837
|
type: "button",
|
|
857
838
|
"aria-label": l,
|
|
858
839
|
"aria-pressed": s,
|
|
859
|
-
className: [Hs,
|
|
860
|
-
onClick: (
|
|
861
|
-
|
|
840
|
+
className: [Hs, i].filter(Boolean).join(" "),
|
|
841
|
+
onClick: (v) => {
|
|
842
|
+
v.preventDefault(), v.stopPropagation(), a == null || a(!s), t == null || t(v);
|
|
862
843
|
},
|
|
863
|
-
...
|
|
864
|
-
children: /* @__PURE__ */
|
|
844
|
+
...o,
|
|
845
|
+
children: /* @__PURE__ */ e(
|
|
865
846
|
cs,
|
|
866
847
|
{
|
|
867
848
|
"aria-hidden": "true",
|
|
@@ -874,31 +855,31 @@ const Hs = [
|
|
|
874
855
|
}
|
|
875
856
|
);
|
|
876
857
|
L.displayName = "SidebarPinButton";
|
|
877
|
-
const Z =
|
|
878
|
-
({ heading: s, emptyMessage:
|
|
879
|
-
const { t:
|
|
858
|
+
const Z = X(null), Fs = () => W(Z), Es = b(
|
|
859
|
+
({ heading: s, emptyMessage: a, onReorder: r, className: i, children: t, ...o }, u) => {
|
|
860
|
+
const { t: n } = D(), m = s ?? n("navigation.sidebar.favorites", "Favourites"), l = Array.isArray(t) ? t.filter(Boolean) : t ? [t] : [], v = l.length, x = v > 0, [w, g] = R(null), [d, N] = R(""), h = U(!1), p = G((j) => {
|
|
880
861
|
h.current = !h.current, N(h.current ? j : `${j}`);
|
|
881
|
-
}, []), z =
|
|
882
|
-
() => ({ onReorder: r, count:
|
|
883
|
-
[r,
|
|
862
|
+
}, []), z = q(
|
|
863
|
+
() => ({ onReorder: r, count: v, dragSource: w, setDragSource: g, announce: p }),
|
|
864
|
+
[r, v, w, p]
|
|
884
865
|
);
|
|
885
|
-
return !x && !
|
|
886
|
-
|
|
866
|
+
return !x && !a ? null : /* @__PURE__ */ e(Z.Provider, { value: z, children: /* @__PURE__ */ f(
|
|
867
|
+
J,
|
|
887
868
|
{
|
|
888
869
|
ref: u,
|
|
889
870
|
label: m,
|
|
890
|
-
className:
|
|
891
|
-
...
|
|
871
|
+
className: i,
|
|
872
|
+
...o,
|
|
892
873
|
children: [
|
|
893
|
-
x ? l : /* @__PURE__ */
|
|
894
|
-
/* @__PURE__ */
|
|
874
|
+
x ? l : /* @__PURE__ */ e("p", { className: "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] type-meta ds:text-[color:var(--muted-foreground)]", children: a }),
|
|
875
|
+
/* @__PURE__ */ e("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: d })
|
|
895
876
|
]
|
|
896
877
|
}
|
|
897
878
|
) });
|
|
898
879
|
}
|
|
899
880
|
);
|
|
900
881
|
Es.displayName = "SidebarFavorites";
|
|
901
|
-
const
|
|
882
|
+
const _s = B(
|
|
902
883
|
[
|
|
903
884
|
"ds:group/item ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
904
885
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -917,7 +898,7 @@ const Vs = I(
|
|
|
917
898
|
},
|
|
918
899
|
defaultVariants: { dragging: !1, dropTarget: !1 }
|
|
919
900
|
}
|
|
920
|
-
),
|
|
901
|
+
), Ls = [
|
|
921
902
|
"ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
|
|
922
903
|
"ds:size-6 ds:rounded-[var(--radius-sm)]",
|
|
923
904
|
"ds:cursor-grab ds:active:cursor-grabbing",
|
|
@@ -931,73 +912,73 @@ const Vs = I(
|
|
|
931
912
|
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
932
913
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
933
914
|
"ds:transition-[color,opacity,background-color] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
934
|
-
].join(" "),
|
|
915
|
+
].join(" "), Vs = b(
|
|
935
916
|
({
|
|
936
917
|
index: s,
|
|
937
|
-
isActive:
|
|
918
|
+
isActive: a = !1,
|
|
938
919
|
asChild: r = !1,
|
|
939
|
-
reorderLabel:
|
|
940
|
-
isPinned:
|
|
941
|
-
onPinChange:
|
|
920
|
+
reorderLabel: i,
|
|
921
|
+
isPinned: t = !1,
|
|
922
|
+
onPinChange: o,
|
|
942
923
|
pinLabel: u,
|
|
943
|
-
"aria-label":
|
|
924
|
+
"aria-label": n,
|
|
944
925
|
className: m,
|
|
945
926
|
children: l,
|
|
946
|
-
...
|
|
927
|
+
...v
|
|
947
928
|
}, x) => {
|
|
948
|
-
const { t: w } =
|
|
949
|
-
if (!(
|
|
950
|
-
const P = Math.max(0, Math.min(
|
|
951
|
-
P !== c && (
|
|
929
|
+
const { t: w } = D(), { mode: g } = y(), d = Fs(), [N, h] = R(!1), p = !!(d != null && d.onReorder) && g !== "icon", z = i ?? n ?? "", j = is(), k = (c, T) => {
|
|
930
|
+
if (!(d != null && d.onReorder)) return;
|
|
931
|
+
const P = Math.max(0, Math.min(d.count - 1, T));
|
|
932
|
+
P !== c && (d.onReorder(c, P), d.announce(
|
|
952
933
|
w(
|
|
953
934
|
"navigation.sidebar.reorderAnnounce",
|
|
954
935
|
"{{label}} moved to position {{to}} of {{total}}",
|
|
955
|
-
{ label: z, to: P + 1, total:
|
|
936
|
+
{ label: z, to: P + 1, total: d.count }
|
|
956
937
|
)
|
|
957
938
|
));
|
|
958
939
|
}, C = (c) => {
|
|
959
|
-
|
|
940
|
+
p && (c.altKey && c.key === "ArrowUp" ? (c.preventDefault(), k(s, s - 1)) : c.altKey && c.key === "ArrowDown" ? (c.preventDefault(), k(s, s + 1)) : c.key === "Home" && c.altKey ? (c.preventDefault(), k(s, 0)) : c.key === "End" && c.altKey && (c.preventDefault(), k(s, d.count - 1)));
|
|
960
941
|
}, ss = (c) => {
|
|
961
|
-
|
|
942
|
+
p && (d == null || d.setDragSource(s), c.dataTransfer && (c.dataTransfer.effectAllowed = "move", c.dataTransfer.setData("ds:text/plain", String(s))));
|
|
962
943
|
}, es = () => {
|
|
963
|
-
|
|
944
|
+
d == null || d.setDragSource(null), h(!1);
|
|
964
945
|
}, as = (c) => {
|
|
965
|
-
!
|
|
966
|
-
}, rs = () => h(!1),
|
|
967
|
-
if (!
|
|
946
|
+
!p || (d == null ? void 0 : d.dragSource) === null || (c.preventDefault(), c.dataTransfer && (c.dataTransfer.dropEffect = "move"), h(!0));
|
|
947
|
+
}, rs = () => h(!1), ds = (c) => {
|
|
948
|
+
if (!p) return;
|
|
968
949
|
c.preventDefault();
|
|
969
|
-
const T =
|
|
950
|
+
const T = d == null ? void 0 : d.dragSource;
|
|
970
951
|
h(!1), !(T == null || T === s) && k(T, s);
|
|
971
|
-
},
|
|
952
|
+
}, V = (d == null ? void 0 : d.dragSource) === s;
|
|
972
953
|
return /* @__PURE__ */ f(
|
|
973
954
|
"div",
|
|
974
955
|
{
|
|
975
|
-
className:
|
|
976
|
-
dragging:
|
|
977
|
-
dropTarget: N && !
|
|
956
|
+
className: _s({
|
|
957
|
+
dragging: V,
|
|
958
|
+
dropTarget: N && !V
|
|
978
959
|
}),
|
|
979
|
-
draggable:
|
|
980
|
-
onDragStart:
|
|
981
|
-
onDragEnd:
|
|
960
|
+
draggable: p || void 0,
|
|
961
|
+
onDragStart: p ? ss : void 0,
|
|
962
|
+
onDragEnd: p ? es : void 0,
|
|
982
963
|
onDragOver: as,
|
|
983
964
|
onDragLeave: rs,
|
|
984
|
-
onDrop:
|
|
965
|
+
onDrop: ds,
|
|
985
966
|
children: [
|
|
986
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ e(
|
|
987
968
|
Q,
|
|
988
969
|
{
|
|
989
970
|
ref: x,
|
|
990
|
-
isActive:
|
|
971
|
+
isActive: a,
|
|
991
972
|
asChild: r,
|
|
992
|
-
"aria-label":
|
|
993
|
-
"aria-describedby":
|
|
994
|
-
draggable:
|
|
995
|
-
className: [
|
|
996
|
-
...
|
|
973
|
+
"aria-label": n,
|
|
974
|
+
"aria-describedby": p ? j : void 0,
|
|
975
|
+
draggable: p ? !1 : void 0,
|
|
976
|
+
className: [p ? "ds:flex-1 ds:min-w-0" : "", m ?? ""].filter(Boolean).join(" "),
|
|
977
|
+
...v,
|
|
997
978
|
children: l
|
|
998
979
|
}
|
|
999
980
|
),
|
|
1000
|
-
|
|
981
|
+
p ? /* @__PURE__ */ e(
|
|
1001
982
|
"button",
|
|
1002
983
|
{
|
|
1003
984
|
type: "button",
|
|
@@ -1007,17 +988,17 @@ const Vs = I(
|
|
|
1007
988
|
"Reorder {{label}}. Press Alt + Up or Alt + Down to move.",
|
|
1008
989
|
{ label: z }
|
|
1009
990
|
),
|
|
1010
|
-
className:
|
|
991
|
+
className: Ls,
|
|
1011
992
|
onKeyDown: C,
|
|
1012
|
-
children: /* @__PURE__ */
|
|
993
|
+
children: /* @__PURE__ */ e(ms, { "aria-hidden": "true", className: "ds:size-4" })
|
|
1013
994
|
}
|
|
1014
995
|
) : null,
|
|
1015
|
-
|
|
996
|
+
o && g !== "icon" ? /* @__PURE__ */ e(
|
|
1016
997
|
L,
|
|
1017
998
|
{
|
|
1018
|
-
isPinned:
|
|
1019
|
-
label: u ??
|
|
1020
|
-
onPinChange:
|
|
999
|
+
isPinned: t,
|
|
1000
|
+
label: u ?? n ?? "",
|
|
1001
|
+
onPinChange: o
|
|
1021
1002
|
}
|
|
1022
1003
|
) : null
|
|
1023
1004
|
]
|
|
@@ -1025,8 +1006,8 @@ const Vs = I(
|
|
|
1025
1006
|
);
|
|
1026
1007
|
}
|
|
1027
1008
|
);
|
|
1028
|
-
|
|
1029
|
-
const
|
|
1009
|
+
Vs.displayName = "SidebarFavoriteItem";
|
|
1010
|
+
const Ks = B(
|
|
1030
1011
|
[
|
|
1031
1012
|
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
1032
1013
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -1039,18 +1020,18 @@ const Os = I(
|
|
|
1039
1020
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
1040
1021
|
"ds:no-underline"
|
|
1041
1022
|
].join(" ")
|
|
1042
|
-
), Ms = b(({ avatar: s, name:
|
|
1043
|
-
const { mode:
|
|
1023
|
+
), Ms = b(({ avatar: s, name: a, subtitle: r, subtitleLabel: i, className: t, ...o }, u) => {
|
|
1024
|
+
const { mode: n } = y(), m = n !== "icon", l = typeof r == "string" ? r : i;
|
|
1044
1025
|
return /* @__PURE__ */ f(
|
|
1045
1026
|
"button",
|
|
1046
1027
|
{
|
|
1047
1028
|
ref: u,
|
|
1048
1029
|
type: "button",
|
|
1049
|
-
"aria-label": l ? `${
|
|
1050
|
-
className: [
|
|
1051
|
-
...
|
|
1030
|
+
"aria-label": l ? `${a}, ${l}` : a,
|
|
1031
|
+
className: [Ks(), t].filter(Boolean).join(" "),
|
|
1032
|
+
...o,
|
|
1052
1033
|
children: [
|
|
1053
|
-
/* @__PURE__ */
|
|
1034
|
+
/* @__PURE__ */ e(
|
|
1054
1035
|
"span",
|
|
1055
1036
|
{
|
|
1056
1037
|
"aria-hidden": "true",
|
|
@@ -1059,15 +1040,15 @@ const Os = I(
|
|
|
1059
1040
|
}
|
|
1060
1041
|
),
|
|
1061
1042
|
m ? /* @__PURE__ */ f("span", { className: "ds:flex-1 ds:min-w-0 ds:text-start", children: [
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
r ? typeof r == "string" ? /* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ e("span", { className: "ds:block ds:truncate type-label", children: a }),
|
|
1044
|
+
r ? typeof r == "string" ? /* @__PURE__ */ e("span", { className: "ds:block ds:truncate type-meta ds:text-[color:var(--muted-foreground)]", children: r }) : /* @__PURE__ */ e("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
|
|
1064
1045
|
] }) : null
|
|
1065
1046
|
]
|
|
1066
1047
|
}
|
|
1067
1048
|
);
|
|
1068
1049
|
});
|
|
1069
1050
|
Ms.displayName = "SidebarProfilePill";
|
|
1070
|
-
const
|
|
1051
|
+
const Os = [
|
|
1071
1052
|
"ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
|
|
1072
1053
|
"ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]",
|
|
1073
1054
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -1077,28 +1058,28 @@ const Ks = [
|
|
|
1077
1058
|
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1078
1059
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
1079
1060
|
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
1080
|
-
].join(" "), $s = b(({ className: s, "aria-label":
|
|
1081
|
-
const { t:
|
|
1061
|
+
].join(" "), $s = b(({ className: s, "aria-label": a, onClick: r, ...i }, t) => {
|
|
1062
|
+
const { t: o } = D(), { mode: u, transitionTo: n } = y();
|
|
1082
1063
|
if (u === "overlay") return null;
|
|
1083
|
-
const m = u === "expanded", l =
|
|
1064
|
+
const m = u === "expanded", l = a ?? (m ? o("navigation.sidebar.collapse", "Collapse sidebar") : o("navigation.sidebar.expand", "Expand sidebar")), v = /* @__PURE__ */ e(
|
|
1084
1065
|
"button",
|
|
1085
1066
|
{
|
|
1086
|
-
ref:
|
|
1067
|
+
ref: t,
|
|
1087
1068
|
type: "button",
|
|
1088
1069
|
"aria-label": l,
|
|
1089
1070
|
"aria-expanded": m,
|
|
1090
1071
|
onClick: (x) => {
|
|
1091
|
-
|
|
1072
|
+
n == null || n(m ? "icon" : "expanded"), r == null || r(x);
|
|
1092
1073
|
},
|
|
1093
|
-
className: [
|
|
1094
|
-
...
|
|
1095
|
-
children: m ? /* @__PURE__ */
|
|
1096
|
-
|
|
1074
|
+
className: [Os, s].filter(Boolean).join(" "),
|
|
1075
|
+
...i,
|
|
1076
|
+
children: m ? /* @__PURE__ */ e(
|
|
1077
|
+
vs,
|
|
1097
1078
|
{
|
|
1098
1079
|
"aria-hidden": "true",
|
|
1099
1080
|
className: "ds:size-4 ds:rtl:-scale-x-100"
|
|
1100
1081
|
}
|
|
1101
|
-
) : /* @__PURE__ */
|
|
1082
|
+
) : /* @__PURE__ */ e(
|
|
1102
1083
|
gs,
|
|
1103
1084
|
{
|
|
1104
1085
|
"aria-hidden": "true",
|
|
@@ -1108,8 +1089,8 @@ const Ks = [
|
|
|
1108
1089
|
}
|
|
1109
1090
|
);
|
|
1110
1091
|
return /* @__PURE__ */ f(S.Root, { children: [
|
|
1111
|
-
/* @__PURE__ */
|
|
1112
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ e(S.Trigger, { asChild: !0, children: v }),
|
|
1093
|
+
/* @__PURE__ */ e(S.Portal, { children: /* @__PURE__ */ f(
|
|
1113
1094
|
S.Content,
|
|
1114
1095
|
{
|
|
1115
1096
|
side: u === "icon" ? "right" : "top",
|
|
@@ -1123,7 +1104,7 @@ const Ks = [
|
|
|
1123
1104
|
].join(" "),
|
|
1124
1105
|
children: [
|
|
1125
1106
|
l,
|
|
1126
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ e(S.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
1127
1108
|
]
|
|
1128
1109
|
}
|
|
1129
1110
|
) })
|
|
@@ -1134,22 +1115,21 @@ export {
|
|
|
1134
1115
|
ys as S,
|
|
1135
1116
|
Ns as a,
|
|
1136
1117
|
$s as b,
|
|
1137
|
-
|
|
1118
|
+
Vs as c,
|
|
1138
1119
|
Es as d,
|
|
1139
1120
|
Ss as e,
|
|
1140
1121
|
ks as f,
|
|
1141
1122
|
ws as g,
|
|
1142
1123
|
Q as h,
|
|
1143
|
-
|
|
1124
|
+
Is as i,
|
|
1144
1125
|
Ts as j,
|
|
1145
|
-
|
|
1126
|
+
Bs as k,
|
|
1146
1127
|
L as l,
|
|
1147
1128
|
Ps as m,
|
|
1148
1129
|
Ms as n,
|
|
1149
|
-
|
|
1130
|
+
J as o,
|
|
1150
1131
|
As as p,
|
|
1151
|
-
y as q,
|
|
1152
1132
|
bs as s,
|
|
1153
|
-
|
|
1133
|
+
y as u
|
|
1154
1134
|
};
|
|
1155
|
-
//# sourceMappingURL=sidebar-
|
|
1135
|
+
//# sourceMappingURL=sidebar-BqzlRBvC.js.map
|