@alexgorbatchev/shadcn 0.0.47 → 0.0.48
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/README.md +8 -2
- package/dist/{chunk-p1eqxz4v.js → chunk-a6mes7w0.js} +80 -80
- package/dist/{chunk-8wc2z7te.js → chunk-cfnkbp0y.js} +103 -75
- package/dist/{chunk-8rtm4y46.js → chunk-pj01ybcm.js} +6 -6
- package/dist/{chunk-0qgd06td.js → chunk-svr3r7pj.js} +754 -718
- package/dist/components/ActionsMenu.d.ts +21 -0
- package/dist/components/ConfirmationDialog.d.ts +3 -2
- package/dist/components/ContextMenu.d.ts +3 -16
- package/dist/components/DropdownMenu.d.ts +4 -23
- package/dist/components/FormDialog.d.ts +23 -0
- package/dist/components/InlineEdit.d.ts +4 -2
- package/dist/components/MenuParts.d.ts +24 -0
- package/dist/components/MenuPopup.d.ts +6 -0
- package/dist/components/Menubar.d.ts +4 -6
- package/dist/components/assistant-ui/elements/RegenerateMenu.js +2 -2
- package/dist/components/assistant-ui/index.js +2 -2
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/json-render/catalog.d.ts +1 -1
- package/dist/components/json-render/index.js +20 -20
- package/dist/index.d.ts +4 -0
- package/dist/index.js +70 -58
- package/dist/menu/types.d.ts +3 -0
- package/dist/prototype.js +1 -1
- package/llms/components/forms/InlineEdit.md +34 -1
- package/llms/components/navigation/ActionsMenu.md +143 -0
- package/llms/components/overlays/ConfirmationDialog.md +31 -1
- package/llms/components/overlays/FormDialog.md +102 -0
- package/llms/setup.md +8 -2
- package/llms.txt +2 -0
- package/package.json +1 -1
|
@@ -25,20 +25,49 @@ import {
|
|
|
25
25
|
Button2
|
|
26
26
|
} from "./chunk-38301e40.js";
|
|
27
27
|
import {
|
|
28
|
+
MenuPortal,
|
|
29
|
+
MenuPopup,
|
|
30
|
+
MenuGroup2,
|
|
31
|
+
MenuLabel2,
|
|
32
|
+
MenuItem2,
|
|
33
|
+
MenuSub2,
|
|
34
|
+
MenuSubTrigger2,
|
|
35
|
+
MenuSubContent2,
|
|
36
|
+
MenuRadioGroup2,
|
|
37
|
+
MenuSeparator2,
|
|
38
|
+
MenuShortcut2,
|
|
28
39
|
DropdownMenu2,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
DropdownMenuTrigger2
|
|
41
|
+
} from "./chunk-cfnkbp0y.js";
|
|
42
|
+
import {
|
|
43
|
+
Alert2,
|
|
44
|
+
AlertTitle2,
|
|
45
|
+
AlertDescription2
|
|
46
|
+
} from "./chunk-zdt8xxzy.js";
|
|
47
|
+
import {
|
|
48
|
+
Dialog2,
|
|
49
|
+
DialogClose2,
|
|
50
|
+
DialogContent2,
|
|
51
|
+
DialogHeader2,
|
|
52
|
+
DialogFooter2,
|
|
53
|
+
DialogTitle2,
|
|
54
|
+
DialogDescription2
|
|
55
|
+
} from "./chunk-jgdpa00w.js";
|
|
56
|
+
import {
|
|
57
|
+
ScrollArea2,
|
|
58
|
+
Combobox2,
|
|
59
|
+
ComboboxValue2,
|
|
60
|
+
ComboboxContent2,
|
|
61
|
+
ComboboxList2,
|
|
62
|
+
ComboboxItem2,
|
|
63
|
+
ComboboxGroup2,
|
|
64
|
+
ComboboxCollection2,
|
|
65
|
+
ComboboxEmpty2,
|
|
66
|
+
ComboboxChips2,
|
|
67
|
+
ComboboxChip2,
|
|
68
|
+
ComboboxChipsInput2,
|
|
69
|
+
useComboboxAnchor2
|
|
70
|
+
} from "./chunk-a6mes7w0.js";
|
|
42
71
|
import {
|
|
43
72
|
Skeleton2
|
|
44
73
|
} from "./chunk-d70rcwk7.js";
|
|
@@ -68,21 +97,6 @@ import {
|
|
|
68
97
|
CardContent2,
|
|
69
98
|
CardFooter2
|
|
70
99
|
} from "./chunk-bygq5yqf.js";
|
|
71
|
-
import {
|
|
72
|
-
Combobox2,
|
|
73
|
-
ComboboxValue2,
|
|
74
|
-
ComboboxContent2,
|
|
75
|
-
ComboboxList2,
|
|
76
|
-
ComboboxItem2,
|
|
77
|
-
ComboboxGroup2,
|
|
78
|
-
ComboboxCollection2,
|
|
79
|
-
ComboboxEmpty2,
|
|
80
|
-
ComboboxChips2,
|
|
81
|
-
ComboboxChip2,
|
|
82
|
-
ComboboxChipsInput2,
|
|
83
|
-
useComboboxAnchor2,
|
|
84
|
-
ScrollArea2
|
|
85
|
-
} from "./chunk-p1eqxz4v.js";
|
|
86
100
|
import {
|
|
87
101
|
Badge2
|
|
88
102
|
} from "./chunk-wjx6zf94.js";
|
|
@@ -99,11 +113,6 @@ import {
|
|
|
99
113
|
import {
|
|
100
114
|
useMediaQuery
|
|
101
115
|
} from "./chunk-k99h6evz.js";
|
|
102
|
-
import {
|
|
103
|
-
Alert2,
|
|
104
|
-
AlertTitle2,
|
|
105
|
-
AlertDescription2
|
|
106
|
-
} from "./chunk-zdt8xxzy.js";
|
|
107
116
|
import {
|
|
108
117
|
Avatar2,
|
|
109
118
|
AvatarImage2,
|
|
@@ -172,13 +181,235 @@ function ButtonLink2({
|
|
|
172
181
|
}
|
|
173
182
|
});
|
|
174
183
|
}
|
|
184
|
+
// src/components/ActionsMenu.tsx
|
|
185
|
+
import { createContext, use } from "react";
|
|
186
|
+
import { EllipsisIcon } from "lucide-react";
|
|
187
|
+
|
|
188
|
+
// src/components/ContextMenu.tsx
|
|
189
|
+
import { useDirection } from "@base-ui/react/direction-provider";
|
|
190
|
+
import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
|
|
191
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
192
|
+
function ContextMenu2({ analytics, ...props }) {
|
|
193
|
+
const trackedOnOpenChange = useAnalyticsCallback("ContextMenu", analytics, (open, _details) => ({ name: "ui.open-request", open }), props.onOpenChange);
|
|
194
|
+
return /* @__PURE__ */ jsx2(ContextMenuPrimitive.Root, {
|
|
195
|
+
"data-slot": "context-menu",
|
|
196
|
+
...props,
|
|
197
|
+
onOpenChange: trackedOnOpenChange
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
function ContextMenuPortal2({ container, ref, children, ...props }) {
|
|
201
|
+
const resolvedContainer = usePortalContainer2(container);
|
|
202
|
+
const portal = usePortalNode(ref);
|
|
203
|
+
return /* @__PURE__ */ jsx2(ContextMenuPrimitive.Portal, {
|
|
204
|
+
"data-slot": "context-menu-portal",
|
|
205
|
+
container: resolvedContainer,
|
|
206
|
+
ref: portal.ref,
|
|
207
|
+
...props,
|
|
208
|
+
children: /* @__PURE__ */ jsx2(PortalProvider2, {
|
|
209
|
+
container: portal.node,
|
|
210
|
+
children
|
|
211
|
+
})
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
function ContextMenuTrigger2({ density, className, ...props }) {
|
|
215
|
+
return /* @__PURE__ */ jsx2(ContextMenuPrimitive.Trigger, {
|
|
216
|
+
"data-density": density,
|
|
217
|
+
"data-slot": "context-menu-trigger",
|
|
218
|
+
className: (state) => cn2("select-none", typeof className === "function" ? className(state) : className),
|
|
219
|
+
...props
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function ContextMenuContent2({
|
|
223
|
+
density,
|
|
224
|
+
className,
|
|
225
|
+
align = "start",
|
|
226
|
+
alignOffset = 4,
|
|
227
|
+
side = "right",
|
|
228
|
+
sideOffset = 0,
|
|
229
|
+
...props
|
|
230
|
+
}) {
|
|
231
|
+
const resolvedDensity = useDensity(density);
|
|
232
|
+
const direction = useDirection();
|
|
233
|
+
return /* @__PURE__ */ jsx2(ContextMenuPortal2, {
|
|
234
|
+
children: /* @__PURE__ */ jsx2(ContextMenuPrimitive.Positioner, {
|
|
235
|
+
dir: direction,
|
|
236
|
+
className: "isolate outline-none",
|
|
237
|
+
align,
|
|
238
|
+
alignOffset,
|
|
239
|
+
side,
|
|
240
|
+
sideOffset,
|
|
241
|
+
children: /* @__PURE__ */ jsx2(ContextMenuPrimitive.Popup, {
|
|
242
|
+
dir: direction,
|
|
243
|
+
"data-density": resolvedDensity,
|
|
244
|
+
"data-slot": "context-menu-content",
|
|
245
|
+
className: (state) => cn2(" max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-sm bg-popover p-1 text-popover-foreground border border-frame-edge shadow-frame duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none ", typeof className === "function" ? className(state) : className),
|
|
246
|
+
...props
|
|
247
|
+
})
|
|
248
|
+
})
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// src/components/ActionsMenu.tsx
|
|
253
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
254
|
+
"use client";
|
|
255
|
+
var ActionsMenuContext = createContext(null);
|
|
256
|
+
function useActionsMenu() {
|
|
257
|
+
const context = use(ActionsMenuContext);
|
|
258
|
+
if (!context)
|
|
259
|
+
throw new Error("ActionsMenu parts require ActionsMenu.");
|
|
260
|
+
return context;
|
|
261
|
+
}
|
|
262
|
+
function ActionsMenu2({ children, contextTarget, ...props }) {
|
|
263
|
+
const content = children ?? /* @__PURE__ */ jsx3(ActionsMenuTrigger2, {});
|
|
264
|
+
return /* @__PURE__ */ jsx3(ActionsMenuContext, {
|
|
265
|
+
value: props,
|
|
266
|
+
children: /* @__PURE__ */ jsxs(ContextMenu2, {
|
|
267
|
+
disabled: props.disabled,
|
|
268
|
+
children: [
|
|
269
|
+
contextTarget ? /* @__PURE__ */ jsx3(ActionsMenuContextTarget2, {
|
|
270
|
+
render: contextTarget,
|
|
271
|
+
children: content
|
|
272
|
+
}) : content,
|
|
273
|
+
contextTarget && /* @__PURE__ */ jsx3(ActionsMenuContextContent2, {})
|
|
274
|
+
]
|
|
275
|
+
})
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
function ActionsMenuTrigger2({ children, render, ...props }) {
|
|
279
|
+
const menu = useActionsMenu();
|
|
280
|
+
return /* @__PURE__ */ jsxs(DropdownMenu2, {
|
|
281
|
+
disabled: menu.disabled,
|
|
282
|
+
children: [
|
|
283
|
+
/* @__PURE__ */ jsx3(DropdownMenuTrigger2, {
|
|
284
|
+
"aria-label": menu.label,
|
|
285
|
+
disabled: menu.disabled,
|
|
286
|
+
...props,
|
|
287
|
+
render: render ?? menu.trigger ?? /* @__PURE__ */ jsx3(Button2, {
|
|
288
|
+
variant: menu.variant ?? "ghost",
|
|
289
|
+
size: menu.size ?? "icon-xs"
|
|
290
|
+
}),
|
|
291
|
+
children: children ?? (menu.size === "sm" ? menu.label : /* @__PURE__ */ jsx3(EllipsisIcon, {}))
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ jsx3(MenuPopup, {
|
|
294
|
+
align: "end",
|
|
295
|
+
children: menu.items
|
|
296
|
+
})
|
|
297
|
+
]
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
function ActionsMenuContextTarget2(props) {
|
|
301
|
+
return /* @__PURE__ */ jsx3(ContextMenuTrigger2, {
|
|
302
|
+
...props
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
function ActionsMenuContextContent2() {
|
|
306
|
+
const menu = useActionsMenu();
|
|
307
|
+
return /* @__PURE__ */ jsx3(ContextMenuContent2, {
|
|
308
|
+
children: menu.items
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
// src/components/FormDialog.tsx
|
|
312
|
+
import { jsx as jsx4, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
|
|
313
|
+
function FormDialog2({
|
|
314
|
+
open,
|
|
315
|
+
onOpenChange,
|
|
316
|
+
title,
|
|
317
|
+
description,
|
|
318
|
+
size,
|
|
319
|
+
density,
|
|
320
|
+
isBusy = false,
|
|
321
|
+
onSubmit,
|
|
322
|
+
submitLabel,
|
|
323
|
+
submitVariant,
|
|
324
|
+
submitDisabled = false,
|
|
325
|
+
primaryAction,
|
|
326
|
+
cancelLabel = "Cancel",
|
|
327
|
+
error,
|
|
328
|
+
children
|
|
329
|
+
}) {
|
|
330
|
+
const body = /* @__PURE__ */ jsxs2(Fragment, {
|
|
331
|
+
children: [
|
|
332
|
+
/* @__PURE__ */ jsxs2(ScrollArea2, {
|
|
333
|
+
density,
|
|
334
|
+
children: [
|
|
335
|
+
children,
|
|
336
|
+
error && /* @__PURE__ */ jsx4(Alert2, {
|
|
337
|
+
variant: "destructive",
|
|
338
|
+
density,
|
|
339
|
+
children: /* @__PURE__ */ jsx4(AlertDescription2, {
|
|
340
|
+
children: error
|
|
341
|
+
})
|
|
342
|
+
})
|
|
343
|
+
]
|
|
344
|
+
}),
|
|
345
|
+
/* @__PURE__ */ jsxs2(DialogFooter2, {
|
|
346
|
+
density,
|
|
347
|
+
children: [
|
|
348
|
+
/* @__PURE__ */ jsx4(DialogClose2, {
|
|
349
|
+
render: /* @__PURE__ */ jsx4(Button2, {
|
|
350
|
+
variant: "outline",
|
|
351
|
+
density,
|
|
352
|
+
disabled: isBusy
|
|
353
|
+
}),
|
|
354
|
+
children: cancelLabel
|
|
355
|
+
}),
|
|
356
|
+
primaryAction ?? (submitLabel && /* @__PURE__ */ jsx4(Button2, {
|
|
357
|
+
type: "submit",
|
|
358
|
+
variant: submitVariant,
|
|
359
|
+
density,
|
|
360
|
+
disabled: isBusy || submitDisabled,
|
|
361
|
+
children: submitLabel
|
|
362
|
+
}))
|
|
363
|
+
]
|
|
364
|
+
})
|
|
365
|
+
]
|
|
366
|
+
});
|
|
367
|
+
return /* @__PURE__ */ jsx4(Dialog2, {
|
|
368
|
+
open,
|
|
369
|
+
onOpenChange: (next, details) => {
|
|
370
|
+
if (isBusy)
|
|
371
|
+
details.cancel();
|
|
372
|
+
else
|
|
373
|
+
onOpenChange(next);
|
|
374
|
+
},
|
|
375
|
+
children: /* @__PURE__ */ jsxs2(DialogContent2, {
|
|
376
|
+
"data-testid": "FormDialog",
|
|
377
|
+
size,
|
|
378
|
+
density,
|
|
379
|
+
showCloseButton: !isBusy,
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ jsxs2(DialogHeader2, {
|
|
382
|
+
density,
|
|
383
|
+
children: [
|
|
384
|
+
/* @__PURE__ */ jsx4(DialogTitle2, {
|
|
385
|
+
children: title
|
|
386
|
+
}),
|
|
387
|
+
description && /* @__PURE__ */ jsx4(DialogDescription2, {
|
|
388
|
+
children: description
|
|
389
|
+
})
|
|
390
|
+
]
|
|
391
|
+
}),
|
|
392
|
+
onSubmit ? /* @__PURE__ */ jsx4("form", {
|
|
393
|
+
className: "flex min-h-0 flex-col gap-panel",
|
|
394
|
+
onSubmit: (event) => {
|
|
395
|
+
if (isBusy)
|
|
396
|
+
event.preventDefault();
|
|
397
|
+
else
|
|
398
|
+
onSubmit(event);
|
|
399
|
+
},
|
|
400
|
+
children: body
|
|
401
|
+
}) : body
|
|
402
|
+
]
|
|
403
|
+
})
|
|
404
|
+
});
|
|
405
|
+
}
|
|
175
406
|
// src/components/Accordion.tsx
|
|
176
407
|
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
177
408
|
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
178
|
-
import { jsx as
|
|
409
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
179
410
|
function Accordion2({ analytics, density, className, ...props }) {
|
|
180
411
|
const trackedOnValueChange = useAnalyticsCallback("Accordion", analytics, { name: "ui.change-request" }, props.onValueChange);
|
|
181
|
-
return /* @__PURE__ */
|
|
412
|
+
return /* @__PURE__ */ jsx5(AccordionPrimitive.Root, {
|
|
182
413
|
"data-density": density,
|
|
183
414
|
"data-slot": "accordion",
|
|
184
415
|
className: (state) => cn2("flex w-full flex-col", typeof className === "function" ? className(state) : className),
|
|
@@ -187,7 +418,7 @@ function Accordion2({ analytics, density, className, ...props }) {
|
|
|
187
418
|
});
|
|
188
419
|
}
|
|
189
420
|
function AccordionItem2({ density, className, ...props }) {
|
|
190
|
-
return /* @__PURE__ */
|
|
421
|
+
return /* @__PURE__ */ jsx5(AccordionPrimitive.Item, {
|
|
191
422
|
"data-density": density,
|
|
192
423
|
"data-slot": "accordion-item",
|
|
193
424
|
className: (state) => cn2("not-last:border-b", typeof className === "function" ? className(state) : className),
|
|
@@ -195,20 +426,20 @@ function AccordionItem2({ density, className, ...props }) {
|
|
|
195
426
|
});
|
|
196
427
|
}
|
|
197
428
|
function AccordionTrigger2({ density, className, children, ...props }) {
|
|
198
|
-
return /* @__PURE__ */
|
|
429
|
+
return /* @__PURE__ */ jsx5(AccordionPrimitive.Header, {
|
|
199
430
|
className: "flex",
|
|
200
|
-
children: /* @__PURE__ */
|
|
431
|
+
children: /* @__PURE__ */ jsxs3(AccordionPrimitive.Trigger, {
|
|
201
432
|
"data-density": density,
|
|
202
433
|
"data-slot": "accordion-trigger",
|
|
203
434
|
className: (state) => cn2("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-sm border border-transparent py-2.5 text-start text-sm font-medium transition-colors outline-none hover:underline focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ms-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", typeof className === "function" ? className(state) : className),
|
|
204
435
|
...props,
|
|
205
436
|
children: [
|
|
206
437
|
children,
|
|
207
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ jsx5(ChevronDownIcon, {
|
|
208
439
|
"data-slot": "accordion-trigger-icon",
|
|
209
440
|
className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
|
|
210
441
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ jsx5(ChevronUpIcon, {
|
|
212
443
|
"data-slot": "accordion-trigger-icon",
|
|
213
444
|
className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
|
|
214
445
|
})
|
|
@@ -217,33 +448,33 @@ function AccordionTrigger2({ density, className, children, ...props }) {
|
|
|
217
448
|
});
|
|
218
449
|
}
|
|
219
450
|
function AccordionContent2({ density, className, children, ...props }) {
|
|
220
|
-
return /* @__PURE__ */
|
|
451
|
+
return /* @__PURE__ */ jsx5(AccordionPrimitive.Panel, {
|
|
221
452
|
"data-density": density,
|
|
222
453
|
"data-slot": "accordion-content",
|
|
223
454
|
className: (state) => cn2("h-(--accordion-panel-height) overflow-hidden text-sm transition-[height] duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0", typeof className === "function" ? className(state) : className),
|
|
224
455
|
...props,
|
|
225
|
-
children: /* @__PURE__ */
|
|
456
|
+
children: /* @__PURE__ */ jsx5("div", {
|
|
226
457
|
className: "pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
227
458
|
children
|
|
228
459
|
})
|
|
229
460
|
});
|
|
230
461
|
}
|
|
231
462
|
// src/components/EmptyState.tsx
|
|
232
|
-
import { jsx as
|
|
463
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
233
464
|
function EmptyState3({ title, description, children }) {
|
|
234
|
-
return /* @__PURE__ */
|
|
465
|
+
return /* @__PURE__ */ jsxs4(Empty2, {
|
|
235
466
|
children: [
|
|
236
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ jsxs4(EmptyHeader2, {
|
|
237
468
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ jsx6(EmptyTitle2, {
|
|
239
470
|
children: title
|
|
240
471
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ jsx6(EmptyDescription2, {
|
|
242
473
|
children: description
|
|
243
474
|
})
|
|
244
475
|
]
|
|
245
476
|
}),
|
|
246
|
-
children && /* @__PURE__ */
|
|
477
|
+
children && /* @__PURE__ */ jsx6(EmptyContent2, {
|
|
247
478
|
children
|
|
248
479
|
})
|
|
249
480
|
]
|
|
@@ -251,31 +482,31 @@ function EmptyState3({ title, description, children }) {
|
|
|
251
482
|
}
|
|
252
483
|
// src/components/PageMessage.tsx
|
|
253
484
|
import { useId } from "react";
|
|
254
|
-
import { jsx as
|
|
485
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
255
486
|
function PageMessage2({ title, description, children }) {
|
|
256
487
|
const titleId = useId();
|
|
257
488
|
const descriptionId = useId();
|
|
258
|
-
return /* @__PURE__ */
|
|
489
|
+
return /* @__PURE__ */ jsx7("main", {
|
|
259
490
|
"aria-labelledby": titleId,
|
|
260
491
|
"aria-describedby": description == null ? undefined : descriptionId,
|
|
261
492
|
className: "grid min-h-dvh w-full place-items-center bg-background text-foreground",
|
|
262
|
-
children: /* @__PURE__ */
|
|
493
|
+
children: /* @__PURE__ */ jsxs5(Empty2, {
|
|
263
494
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ jsxs5(EmptyHeader2, {
|
|
265
496
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
-
children: /* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ jsx7(EmptyTitle2, {
|
|
498
|
+
children: /* @__PURE__ */ jsx7("h1", {
|
|
268
499
|
id: titleId,
|
|
269
500
|
children: title
|
|
270
501
|
})
|
|
271
502
|
}),
|
|
272
|
-
description != null && /* @__PURE__ */
|
|
503
|
+
description != null && /* @__PURE__ */ jsx7(EmptyDescription2, {
|
|
273
504
|
id: descriptionId,
|
|
274
505
|
children: description
|
|
275
506
|
})
|
|
276
507
|
]
|
|
277
508
|
}),
|
|
278
|
-
children != null && /* @__PURE__ */
|
|
509
|
+
children != null && /* @__PURE__ */ jsx7(EmptyContent2, {
|
|
279
510
|
children
|
|
280
511
|
})
|
|
281
512
|
]
|
|
@@ -283,8 +514,8 @@ function PageMessage2({ title, description, children }) {
|
|
|
283
514
|
});
|
|
284
515
|
}
|
|
285
516
|
// src/components/DataViewer.tsx
|
|
286
|
-
import { Fragment } from "react";
|
|
287
|
-
import { jsx as
|
|
517
|
+
import { Fragment as Fragment2 } from "react";
|
|
518
|
+
import { jsx as jsx8, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
288
519
|
var ACRONYMS = new Map([
|
|
289
520
|
["api", "API"],
|
|
290
521
|
["http", "HTTP"],
|
|
@@ -307,7 +538,7 @@ function isNested(value) {
|
|
|
307
538
|
return Array.isArray(value) || isRecord(value);
|
|
308
539
|
}
|
|
309
540
|
function Placeholder({ children }) {
|
|
310
|
-
return /* @__PURE__ */
|
|
541
|
+
return /* @__PURE__ */ jsx8("span", {
|
|
311
542
|
className: "text-muted-foreground italic",
|
|
312
543
|
children
|
|
313
544
|
});
|
|
@@ -315,23 +546,23 @@ function Placeholder({ children }) {
|
|
|
315
546
|
function DataValue({ value, formatLabel }) {
|
|
316
547
|
if (Array.isArray(value)) {
|
|
317
548
|
if (value.length === 0)
|
|
318
|
-
return /* @__PURE__ */
|
|
549
|
+
return /* @__PURE__ */ jsx8(Placeholder, {
|
|
319
550
|
children: "None"
|
|
320
551
|
});
|
|
321
|
-
return value.some(isNested) ? /* @__PURE__ */
|
|
552
|
+
return value.some(isNested) ? /* @__PURE__ */ jsx8("ol", {
|
|
322
553
|
className: "flex list-decimal flex-col gap-2 pl-5 marker:text-muted-foreground",
|
|
323
|
-
children: value.map((item, index) => /* @__PURE__ */
|
|
554
|
+
children: value.map((item, index) => /* @__PURE__ */ jsx8("li", {
|
|
324
555
|
className: "min-w-0",
|
|
325
|
-
children: /* @__PURE__ */
|
|
556
|
+
children: /* @__PURE__ */ jsx8(DataValue, {
|
|
326
557
|
value: item,
|
|
327
558
|
formatLabel
|
|
328
559
|
})
|
|
329
560
|
}, index))
|
|
330
|
-
}) : /* @__PURE__ */
|
|
561
|
+
}) : /* @__PURE__ */ jsx8("ul", {
|
|
331
562
|
className: "flex flex-wrap gap-x-3 gap-y-1",
|
|
332
|
-
children: value.map((item, index) => /* @__PURE__ */
|
|
563
|
+
children: value.map((item, index) => /* @__PURE__ */ jsx8("li", {
|
|
333
564
|
className: "min-w-0 break-words",
|
|
334
|
-
children: /* @__PURE__ */
|
|
565
|
+
children: /* @__PURE__ */ jsx8(DataValue, {
|
|
335
566
|
value: item,
|
|
336
567
|
formatLabel
|
|
337
568
|
})
|
|
@@ -341,20 +572,20 @@ function DataValue({ value, formatLabel }) {
|
|
|
341
572
|
if (isRecord(value)) {
|
|
342
573
|
const entries = Object.entries(value);
|
|
343
574
|
if (entries.length === 0)
|
|
344
|
-
return /* @__PURE__ */
|
|
575
|
+
return /* @__PURE__ */ jsx8(Placeholder, {
|
|
345
576
|
children: "None"
|
|
346
577
|
});
|
|
347
|
-
return /* @__PURE__ */
|
|
578
|
+
return /* @__PURE__ */ jsx8("dl", {
|
|
348
579
|
className: "grid grid-cols-[minmax(0,max-content)_minmax(0,1fr)] gap-x-4 gap-y-1",
|
|
349
|
-
children: entries.map(([key, item]) => /* @__PURE__ */
|
|
580
|
+
children: entries.map(([key, item]) => /* @__PURE__ */ jsxs6(Fragment2, {
|
|
350
581
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ jsx8("dt", {
|
|
352
583
|
className: "min-w-0 break-words text-muted-foreground",
|
|
353
584
|
children: formatLabel(key)
|
|
354
585
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ jsx8("dd", {
|
|
356
587
|
className: cn2("min-w-0 break-words", isRecord(item) && "border-l border-border pl-3"),
|
|
357
|
-
children: /* @__PURE__ */
|
|
588
|
+
children: /* @__PURE__ */ jsx8(DataValue, {
|
|
358
589
|
value: item,
|
|
359
590
|
formatLabel
|
|
360
591
|
})
|
|
@@ -364,18 +595,18 @@ function DataValue({ value, formatLabel }) {
|
|
|
364
595
|
});
|
|
365
596
|
}
|
|
366
597
|
if (value === null || value === undefined)
|
|
367
|
-
return /* @__PURE__ */
|
|
598
|
+
return /* @__PURE__ */ jsx8(Placeholder, {
|
|
368
599
|
children: "None"
|
|
369
600
|
});
|
|
370
601
|
if (typeof value === "boolean")
|
|
371
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ jsx8(Fragment3, {
|
|
372
603
|
children: value ? "Yes" : "No"
|
|
373
604
|
});
|
|
374
605
|
if (value === "")
|
|
375
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ jsx8(Placeholder, {
|
|
376
607
|
children: "Empty"
|
|
377
608
|
});
|
|
378
|
-
return /* @__PURE__ */
|
|
609
|
+
return /* @__PURE__ */ jsx8(Fragment3, {
|
|
379
610
|
children: String(value)
|
|
380
611
|
});
|
|
381
612
|
}
|
|
@@ -387,22 +618,22 @@ function DataViewer2({
|
|
|
387
618
|
className,
|
|
388
619
|
...props
|
|
389
620
|
}) {
|
|
390
|
-
return /* @__PURE__ */
|
|
621
|
+
return /* @__PURE__ */ jsx8("section", {
|
|
391
622
|
"aria-label": label,
|
|
392
623
|
"data-density": density,
|
|
393
624
|
"data-slot": "data-viewer",
|
|
394
625
|
className: cn2("min-w-0 text-sm", className),
|
|
395
626
|
...props,
|
|
396
|
-
children: /* @__PURE__ */
|
|
627
|
+
children: /* @__PURE__ */ jsx8(DataValue, {
|
|
397
628
|
value,
|
|
398
629
|
formatLabel
|
|
399
630
|
})
|
|
400
631
|
});
|
|
401
632
|
}
|
|
402
633
|
// src/components/JsonViewer.tsx
|
|
403
|
-
import { jsx as
|
|
634
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
404
635
|
function JsonViewer2({ value, label = "JSON", rows = 12 }) {
|
|
405
|
-
return /* @__PURE__ */
|
|
636
|
+
return /* @__PURE__ */ jsx9(Textarea2, {
|
|
406
637
|
readOnly: true,
|
|
407
638
|
rows,
|
|
408
639
|
"aria-label": label,
|
|
@@ -411,22 +642,22 @@ function JsonViewer2({ value, label = "JSON", rows = 12 }) {
|
|
|
411
642
|
}
|
|
412
643
|
// src/components/AlertDialog.tsx
|
|
413
644
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
414
|
-
import { useDirection } from "@base-ui/react/direction-provider";
|
|
415
|
-
import { jsx as
|
|
645
|
+
import { useDirection as useDirection3 } from "@base-ui/react/direction-provider";
|
|
646
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
416
647
|
"use client";
|
|
417
648
|
function AlertDialog2({
|
|
418
649
|
analytics,
|
|
419
650
|
...props
|
|
420
651
|
}) {
|
|
421
652
|
const trackedOnOpenChange = useAnalyticsCallback("AlertDialog", analytics, (open, _details) => ({ name: "ui.open-request", open }), props.onOpenChange);
|
|
422
|
-
return /* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ jsx10(AlertDialogPrimitive.Root, {
|
|
423
654
|
"data-slot": "alert-dialog",
|
|
424
655
|
...props,
|
|
425
656
|
onOpenChange: trackedOnOpenChange
|
|
426
657
|
});
|
|
427
658
|
}
|
|
428
659
|
function AlertDialogTrigger2({ ...props }) {
|
|
429
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ jsx10(AlertDialogPrimitive.Trigger, {
|
|
430
661
|
"data-slot": "alert-dialog-trigger",
|
|
431
662
|
...props
|
|
432
663
|
});
|
|
@@ -434,12 +665,12 @@ function AlertDialogTrigger2({ ...props }) {
|
|
|
434
665
|
function AlertDialogPortal2({ container, ref, children, ...props }) {
|
|
435
666
|
const resolvedContainer = usePortalContainer2(container);
|
|
436
667
|
const portal = usePortalNode(ref);
|
|
437
|
-
return /* @__PURE__ */
|
|
668
|
+
return /* @__PURE__ */ jsx10(AlertDialogPrimitive.Portal, {
|
|
438
669
|
"data-slot": "alert-dialog-portal",
|
|
439
670
|
container: resolvedContainer,
|
|
440
671
|
ref: portal.ref,
|
|
441
672
|
...props,
|
|
442
|
-
children: /* @__PURE__ */
|
|
673
|
+
children: /* @__PURE__ */ jsx10(PortalProvider2, {
|
|
443
674
|
container: portal.node,
|
|
444
675
|
children
|
|
445
676
|
})
|
|
@@ -447,7 +678,7 @@ function AlertDialogPortal2({ container, ref, children, ...props }) {
|
|
|
447
678
|
}
|
|
448
679
|
function AlertDialogOverlay2({ density, className, ...props }) {
|
|
449
680
|
const resolvedDensity = useDensity(density);
|
|
450
|
-
return /* @__PURE__ */
|
|
681
|
+
return /* @__PURE__ */ jsx10(AlertDialogPrimitive.Backdrop, {
|
|
451
682
|
"data-density": resolvedDensity,
|
|
452
683
|
"data-slot": "alert-dialog-overlay",
|
|
453
684
|
className: (state) => cn2("fixed inset-0 isolate bg-backdrop duration-120 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none", typeof className === "function" ? className(state) : className),
|
|
@@ -456,40 +687,40 @@ function AlertDialogOverlay2({ density, className, ...props }) {
|
|
|
456
687
|
}
|
|
457
688
|
function AlertDialogContent2({ density, className, size = "default", ...props }) {
|
|
458
689
|
const resolvedDensity = useDensity(density);
|
|
459
|
-
const direction =
|
|
460
|
-
return /* @__PURE__ */
|
|
690
|
+
const direction = useDirection3();
|
|
691
|
+
return /* @__PURE__ */ jsxs7(AlertDialogPortal2, {
|
|
461
692
|
children: [
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ jsx10(AlertDialogOverlay2, {}),
|
|
694
|
+
/* @__PURE__ */ jsx10(AlertDialogPrimitive.Popup, {
|
|
464
695
|
dir: direction,
|
|
465
696
|
"data-density": resolvedDensity,
|
|
466
697
|
"data-slot": "alert-dialog-content",
|
|
467
698
|
"data-scroll": "none",
|
|
468
699
|
"data-size": size,
|
|
469
|
-
className: (state) => cn2("group/alert-dialog-content fixed top-1/2 left-1/2
|
|
700
|
+
className: (state) => cn2("group/alert-dialog-content fixed top-1/2 left-1/2 flex min-h-0 max-h-[calc(100dvh-2rem)] w-full flex-col -translate-x-1/2 -translate-y-1/2 gap-panel rounded-md bg-popover p-panel text-popover-foreground border border-frame-edge shadow-frame duration-120 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none", typeof className === "function" ? className(state) : className),
|
|
470
701
|
...props
|
|
471
702
|
})
|
|
472
703
|
]
|
|
473
704
|
});
|
|
474
705
|
}
|
|
475
706
|
function AlertDialogHeader2({ density, className, ...props }) {
|
|
476
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
477
708
|
"data-density": density,
|
|
478
709
|
"data-slot": "alert-dialog-header",
|
|
479
|
-
className: cn2("grid grid-rows-[auto_1fr] place-items-center gap-control-gap text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
710
|
+
className: cn2("grid shrink-0 grid-rows-[auto_1fr] place-items-center gap-control-gap text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
480
711
|
...props
|
|
481
712
|
});
|
|
482
713
|
}
|
|
483
714
|
function AlertDialogFooter2({ density, className, ...props }) {
|
|
484
|
-
return /* @__PURE__ */
|
|
715
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
485
716
|
"data-density": density,
|
|
486
717
|
"data-slot": "alert-dialog-footer",
|
|
487
|
-
className: cn2("-mx-panel -mb-panel flex flex-col-reverse gap-2 rounded-b-md border-t bg-muted/50 p-panel group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
718
|
+
className: cn2("-mx-panel -mb-panel flex shrink-0 flex-col-reverse gap-2 rounded-b-md border-t bg-muted/50 p-panel group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
488
719
|
...props
|
|
489
720
|
});
|
|
490
721
|
}
|
|
491
722
|
function AlertDialogMedia2({ density, className, ...props }) {
|
|
492
|
-
return /* @__PURE__ */
|
|
723
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
493
724
|
"data-density": density,
|
|
494
725
|
"data-slot": "alert-dialog-media",
|
|
495
726
|
className: cn2("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-control-xs", className),
|
|
@@ -497,7 +728,7 @@ function AlertDialogMedia2({ density, className, ...props }) {
|
|
|
497
728
|
});
|
|
498
729
|
}
|
|
499
730
|
function AlertDialogTitle2({ density, className, ...props }) {
|
|
500
|
-
return /* @__PURE__ */
|
|
731
|
+
return /* @__PURE__ */ jsx10(AlertDialogPrimitive.Title, {
|
|
501
732
|
"data-density": density,
|
|
502
733
|
"data-slot": "alert-dialog-title",
|
|
503
734
|
className: (state) => cn2("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", typeof className === "function" ? className(state) : className),
|
|
@@ -505,7 +736,7 @@ function AlertDialogTitle2({ density, className, ...props }) {
|
|
|
505
736
|
});
|
|
506
737
|
}
|
|
507
738
|
function AlertDialogDescription2({ density, className, ...props }) {
|
|
508
|
-
return /* @__PURE__ */
|
|
739
|
+
return /* @__PURE__ */ jsx10(AlertDialogPrimitive.Description, {
|
|
509
740
|
"data-density": density,
|
|
510
741
|
"data-slot": "alert-dialog-description",
|
|
511
742
|
className: (state) => cn2("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", typeof className === "function" ? className(state) : className),
|
|
@@ -513,7 +744,7 @@ function AlertDialogDescription2({ density, className, ...props }) {
|
|
|
513
744
|
});
|
|
514
745
|
}
|
|
515
746
|
function AlertDialogAction2({ density, className, ...props }) {
|
|
516
|
-
return /* @__PURE__ */
|
|
747
|
+
return /* @__PURE__ */ jsx10(Button2, {
|
|
517
748
|
"data-density": density,
|
|
518
749
|
"data-slot": "alert-dialog-action",
|
|
519
750
|
className,
|
|
@@ -527,11 +758,11 @@ function AlertDialogCancel2({
|
|
|
527
758
|
size = "default",
|
|
528
759
|
...props
|
|
529
760
|
}) {
|
|
530
|
-
return /* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ jsx10(AlertDialogPrimitive.Close, {
|
|
531
762
|
"data-density": density,
|
|
532
763
|
"data-slot": "alert-dialog-cancel",
|
|
533
764
|
className,
|
|
534
|
-
render: /* @__PURE__ */
|
|
765
|
+
render: /* @__PURE__ */ jsx10(Button2, {
|
|
535
766
|
variant,
|
|
536
767
|
size
|
|
537
768
|
}),
|
|
@@ -540,9 +771,9 @@ function AlertDialogCancel2({
|
|
|
540
771
|
}
|
|
541
772
|
// src/components/Select.tsx
|
|
542
773
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
543
|
-
import { useDirection as
|
|
774
|
+
import { useDirection as useDirection4 } from "@base-ui/react/direction-provider";
|
|
544
775
|
import { ChevronDownIcon as ChevronDownIcon2, CheckIcon, ChevronUpIcon as ChevronUpIcon2 } from "lucide-react";
|
|
545
|
-
import { jsx as
|
|
776
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
546
777
|
"use client";
|
|
547
778
|
function Select2({
|
|
548
779
|
analytics,
|
|
@@ -550,14 +781,14 @@ function Select2({
|
|
|
550
781
|
}) {
|
|
551
782
|
const onValueChange = useAnalyticsCallback("Select", analytics, { name: "ui.change-request" }, props.onValueChange);
|
|
552
783
|
const onOpenChange = useAnalyticsCallback("Select", analytics, (open, _details) => ({ name: "ui.open-request", open }), props.onOpenChange);
|
|
553
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ jsx11(SelectPrimitive.Root, {
|
|
554
785
|
...props,
|
|
555
786
|
onValueChange,
|
|
556
787
|
onOpenChange
|
|
557
788
|
});
|
|
558
789
|
}
|
|
559
790
|
function SelectGroup2({ density, className, ...props }) {
|
|
560
|
-
return /* @__PURE__ */
|
|
791
|
+
return /* @__PURE__ */ jsx11(SelectPrimitive.Group, {
|
|
561
792
|
"data-density": density,
|
|
562
793
|
"data-slot": "select-group",
|
|
563
794
|
className: (state) => cn2("scroll-my-1 p-1", typeof className === "function" ? className(state) : className),
|
|
@@ -565,7 +796,7 @@ function SelectGroup2({ density, className, ...props }) {
|
|
|
565
796
|
});
|
|
566
797
|
}
|
|
567
798
|
function SelectValue2({ density, className, ...props }) {
|
|
568
|
-
return /* @__PURE__ */
|
|
799
|
+
return /* @__PURE__ */ jsx11(SelectPrimitive.Value, {
|
|
569
800
|
"data-density": density,
|
|
570
801
|
"data-slot": "select-value",
|
|
571
802
|
className: (state) => cn2("flex flex-1 text-start", typeof className === "function" ? className(state) : className),
|
|
@@ -573,7 +804,7 @@ function SelectValue2({ density, className, ...props }) {
|
|
|
573
804
|
});
|
|
574
805
|
}
|
|
575
806
|
function SelectTrigger2({ density, className, size = "default", children, ...props }) {
|
|
576
|
-
return /* @__PURE__ */
|
|
807
|
+
return /* @__PURE__ */ jsxs8(SelectPrimitive.Trigger, {
|
|
577
808
|
"data-density": density,
|
|
578
809
|
"data-slot": "select-trigger",
|
|
579
810
|
"data-size": size,
|
|
@@ -581,8 +812,8 @@ function SelectTrigger2({ density, className, size = "default", children, ...pro
|
|
|
581
812
|
...props,
|
|
582
813
|
children: [
|
|
583
814
|
children,
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
render: /* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ jsx11(SelectPrimitive.Icon, {
|
|
816
|
+
render: /* @__PURE__ */ jsx11(ChevronDownIcon2, {
|
|
586
817
|
className: "pointer-events-none size-4 text-muted-foreground"
|
|
587
818
|
})
|
|
588
819
|
})
|
|
@@ -601,22 +832,22 @@ function SelectContent2({
|
|
|
601
832
|
...props
|
|
602
833
|
}) {
|
|
603
834
|
const resolvedDensity = useDensity(density);
|
|
604
|
-
const direction =
|
|
835
|
+
const direction = useDirection4();
|
|
605
836
|
const container = usePortalContainer2();
|
|
606
837
|
const portal = usePortalNode();
|
|
607
|
-
return /* @__PURE__ */
|
|
838
|
+
return /* @__PURE__ */ jsx11(SelectPrimitive.Portal, {
|
|
608
839
|
container,
|
|
609
840
|
ref: portal.ref,
|
|
610
|
-
children: /* @__PURE__ */
|
|
841
|
+
children: /* @__PURE__ */ jsx11(PortalProvider2, {
|
|
611
842
|
container: portal.node,
|
|
612
|
-
children: /* @__PURE__ */
|
|
843
|
+
children: /* @__PURE__ */ jsx11(SelectPrimitive.Positioner, {
|
|
613
844
|
side,
|
|
614
845
|
sideOffset,
|
|
615
846
|
align,
|
|
616
847
|
alignOffset,
|
|
617
848
|
alignItemWithTrigger,
|
|
618
849
|
className: "isolate ",
|
|
619
|
-
children: /* @__PURE__ */
|
|
850
|
+
children: /* @__PURE__ */ jsxs8(SelectPrimitive.Popup, {
|
|
620
851
|
dir: direction,
|
|
621
852
|
"data-density": resolvedDensity,
|
|
622
853
|
"data-slot": "select-content",
|
|
@@ -624,11 +855,11 @@ function SelectContent2({
|
|
|
624
855
|
className: (state) => cn2("relative isolate max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground border border-frame-edge shadow-frame duration-120 data-[align-trigger=true]:animate-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:animate-none", typeof className === "function" ? className(state) : className),
|
|
625
856
|
...props,
|
|
626
857
|
children: [
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ jsx11(SelectScrollUpButton2, {}),
|
|
859
|
+
/* @__PURE__ */ jsx11(SelectPrimitive.List, {
|
|
629
860
|
children
|
|
630
861
|
}),
|
|
631
|
-
/* @__PURE__ */
|
|
862
|
+
/* @__PURE__ */ jsx11(SelectScrollDownButton2, {})
|
|
632
863
|
]
|
|
633
864
|
})
|
|
634
865
|
})
|
|
@@ -636,7 +867,7 @@ function SelectContent2({
|
|
|
636
867
|
});
|
|
637
868
|
}
|
|
638
869
|
function SelectLabel2({ density, className, ...props }) {
|
|
639
|
-
return /* @__PURE__ */
|
|
870
|
+
return /* @__PURE__ */ jsx11(SelectPrimitive.GroupLabel, {
|
|
640
871
|
"data-density": density,
|
|
641
872
|
"data-slot": "select-label",
|
|
642
873
|
className: (state) => cn2("px-1.5 py-1 text-xs text-muted-foreground", typeof className === "function" ? className(state) : className),
|
|
@@ -644,21 +875,21 @@ function SelectLabel2({ density, className, ...props }) {
|
|
|
644
875
|
});
|
|
645
876
|
}
|
|
646
877
|
function SelectItem2({ density, className, children, ...props }) {
|
|
647
|
-
return /* @__PURE__ */
|
|
878
|
+
return /* @__PURE__ */ jsxs8(SelectPrimitive.Item, {
|
|
648
879
|
"data-density": density,
|
|
649
880
|
"data-slot": "select-item",
|
|
650
881
|
className: (state) => cn2("relative flex w-full cursor-default items-center gap-control-gap rounded-md py-1 pe-8 ps-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", typeof className === "function" ? className(state) : className),
|
|
651
882
|
...props,
|
|
652
883
|
children: [
|
|
653
|
-
/* @__PURE__ */
|
|
884
|
+
/* @__PURE__ */ jsx11(SelectPrimitive.ItemText, {
|
|
654
885
|
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
655
886
|
children
|
|
656
887
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
658
|
-
render: /* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ jsx11(SelectPrimitive.ItemIndicator, {
|
|
889
|
+
render: /* @__PURE__ */ jsx11("span", {
|
|
659
890
|
className: "pointer-events-none absolute end-2 flex size-4 items-center justify-center"
|
|
660
891
|
}),
|
|
661
|
-
children: /* @__PURE__ */
|
|
892
|
+
children: /* @__PURE__ */ jsx11(CheckIcon, {
|
|
662
893
|
className: "pointer-events-none"
|
|
663
894
|
})
|
|
664
895
|
})
|
|
@@ -666,7 +897,7 @@ function SelectItem2({ density, className, children, ...props }) {
|
|
|
666
897
|
});
|
|
667
898
|
}
|
|
668
899
|
function SelectSeparator2({ density, className, ...props }) {
|
|
669
|
-
return /* @__PURE__ */
|
|
900
|
+
return /* @__PURE__ */ jsx11(SelectPrimitive.Separator, {
|
|
670
901
|
"data-density": density,
|
|
671
902
|
"data-slot": "select-separator",
|
|
672
903
|
className: (state) => cn2("pointer-events-none -mx-1 my-1 h-px bg-border", typeof className === "function" ? className(state) : className),
|
|
@@ -674,27 +905,27 @@ function SelectSeparator2({ density, className, ...props }) {
|
|
|
674
905
|
});
|
|
675
906
|
}
|
|
676
907
|
function SelectScrollUpButton2({ density, className, ...props }) {
|
|
677
|
-
return /* @__PURE__ */
|
|
908
|
+
return /* @__PURE__ */ jsx11(SelectPrimitive.ScrollUpArrow, {
|
|
678
909
|
"data-density": density,
|
|
679
910
|
"data-slot": "select-scroll-up-button",
|
|
680
911
|
className: (state) => cn2("top-0 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
|
|
681
912
|
...props,
|
|
682
|
-
children: /* @__PURE__ */
|
|
913
|
+
children: /* @__PURE__ */ jsx11(ChevronUpIcon2, {})
|
|
683
914
|
});
|
|
684
915
|
}
|
|
685
916
|
function SelectScrollDownButton2({ density, className, ...props }) {
|
|
686
|
-
return /* @__PURE__ */
|
|
917
|
+
return /* @__PURE__ */ jsx11(SelectPrimitive.ScrollDownArrow, {
|
|
687
918
|
"data-density": density,
|
|
688
919
|
"data-slot": "select-scroll-down-button",
|
|
689
920
|
className: (state) => cn2("bottom-0 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
|
|
690
921
|
...props,
|
|
691
|
-
children: /* @__PURE__ */
|
|
922
|
+
children: /* @__PURE__ */ jsx11(ChevronDownIcon2, {})
|
|
692
923
|
});
|
|
693
924
|
}
|
|
694
925
|
// src/components/DensityProvider.tsx
|
|
695
926
|
import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
|
|
696
927
|
import { useRender as useRender2 } from "@base-ui/react/use-render";
|
|
697
|
-
import { jsx as
|
|
928
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
698
929
|
function DensityProvider2({
|
|
699
930
|
density = "comfortable",
|
|
700
931
|
className,
|
|
@@ -707,7 +938,7 @@ function DensityProvider2({
|
|
|
707
938
|
render,
|
|
708
939
|
state: { slot: "density-provider", density }
|
|
709
940
|
});
|
|
710
|
-
return /* @__PURE__ */
|
|
941
|
+
return /* @__PURE__ */ jsx12(DensityContext.Provider, {
|
|
711
942
|
value: density,
|
|
712
943
|
children: element
|
|
713
944
|
});
|
|
@@ -1020,7 +1251,7 @@ function ScrollGuard2({ ownerDocument }) {
|
|
|
1020
1251
|
}
|
|
1021
1252
|
|
|
1022
1253
|
// src/components/ThemeProvider.tsx
|
|
1023
|
-
import { jsx as
|
|
1254
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1024
1255
|
function StoredThemeProvider({
|
|
1025
1256
|
children,
|
|
1026
1257
|
defaultTheme = "system",
|
|
@@ -1031,7 +1262,7 @@ function StoredThemeProvider({
|
|
|
1031
1262
|
defaultValue: defaultTheme,
|
|
1032
1263
|
localStorageKey: storageKey
|
|
1033
1264
|
});
|
|
1034
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ jsx13(ThemePalette, {
|
|
1035
1266
|
theme: forcedTheme ?? ternaryDarkMode,
|
|
1036
1267
|
resolvedTheme: forcedTheme ?? (isDarkMode ? "dark" : "light"),
|
|
1037
1268
|
setTheme: setTernaryDarkMode,
|
|
@@ -1049,11 +1280,11 @@ function ThemePalette({
|
|
|
1049
1280
|
document.documentElement.style.colorScheme = resolvedTheme;
|
|
1050
1281
|
}, [resolvedTheme]);
|
|
1051
1282
|
const value = useMemo(() => ({ theme, resolvedTheme, setTheme }), [theme, resolvedTheme, setTheme]);
|
|
1052
|
-
return /* @__PURE__ */
|
|
1283
|
+
return /* @__PURE__ */ jsxs9(ThemeContext.Provider, {
|
|
1053
1284
|
value,
|
|
1054
1285
|
children: [
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1286
|
+
/* @__PURE__ */ jsx13(ScrollGuard2, {}),
|
|
1287
|
+
/* @__PURE__ */ jsx13(LayoutGuard2, {}),
|
|
1057
1288
|
children
|
|
1058
1289
|
]
|
|
1059
1290
|
});
|
|
@@ -1066,7 +1297,7 @@ function ControlledThemeProvider({
|
|
|
1066
1297
|
const isDark = useMediaQuery("(prefers-color-scheme: dark)");
|
|
1067
1298
|
const { theme, setTheme } = controlledTheme;
|
|
1068
1299
|
const resolvedTheme = forcedTheme ?? (theme === "system" ? isDark ? "dark" : "light" : theme);
|
|
1069
|
-
return /* @__PURE__ */
|
|
1300
|
+
return /* @__PURE__ */ jsx13(ThemePalette, {
|
|
1070
1301
|
theme: forcedTheme ?? theme,
|
|
1071
1302
|
resolvedTheme,
|
|
1072
1303
|
setTheme,
|
|
@@ -1075,18 +1306,18 @@ function ControlledThemeProvider({
|
|
|
1075
1306
|
}
|
|
1076
1307
|
function ThemeProvider2(props) {
|
|
1077
1308
|
if (props.controlledTheme)
|
|
1078
|
-
return /* @__PURE__ */
|
|
1309
|
+
return /* @__PURE__ */ jsx13(ControlledThemeProvider, {
|
|
1079
1310
|
...props,
|
|
1080
1311
|
controlledTheme: props.controlledTheme
|
|
1081
1312
|
});
|
|
1082
|
-
return /* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ jsx13(StoredThemeProvider, {
|
|
1083
1314
|
...props
|
|
1084
1315
|
});
|
|
1085
1316
|
}
|
|
1086
1317
|
// src/components/AspectRatio.tsx
|
|
1087
|
-
import { jsx as
|
|
1318
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1088
1319
|
function AspectRatio2({ ratio, className, style, ...props }) {
|
|
1089
|
-
return /* @__PURE__ */
|
|
1320
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
1090
1321
|
"data-slot": "aspect-ratio",
|
|
1091
1322
|
className: cn2("relative", className),
|
|
1092
1323
|
style: { aspectRatio: ratio, ...style },
|
|
@@ -1097,9 +1328,9 @@ function AspectRatio2({ ratio, className, style, ...props }) {
|
|
|
1097
1328
|
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
1098
1329
|
import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
|
|
1099
1330
|
import { useRender as useRender3 } from "@base-ui/react/use-render";
|
|
1100
|
-
import { jsx as
|
|
1331
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1101
1332
|
function Breadcrumb2({ density, className, ...props }) {
|
|
1102
|
-
return /* @__PURE__ */
|
|
1333
|
+
return /* @__PURE__ */ jsx15("nav", {
|
|
1103
1334
|
"aria-label": "breadcrumb",
|
|
1104
1335
|
"data-density": density,
|
|
1105
1336
|
"data-slot": "breadcrumb",
|
|
@@ -1108,7 +1339,7 @@ function Breadcrumb2({ density, className, ...props }) {
|
|
|
1108
1339
|
});
|
|
1109
1340
|
}
|
|
1110
1341
|
function BreadcrumbList2({ density, className, ...props }) {
|
|
1111
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ jsx15("ol", {
|
|
1112
1343
|
"data-density": density,
|
|
1113
1344
|
"data-slot": "breadcrumb-list",
|
|
1114
1345
|
className: cn2("flex flex-wrap items-center gap-control-gap text-sm wrap-break-word text-muted-foreground", className),
|
|
@@ -1116,7 +1347,7 @@ function BreadcrumbList2({ density, className, ...props }) {
|
|
|
1116
1347
|
});
|
|
1117
1348
|
}
|
|
1118
1349
|
function BreadcrumbItem2({ density, className, ...props }) {
|
|
1119
|
-
return /* @__PURE__ */
|
|
1350
|
+
return /* @__PURE__ */ jsx15("li", {
|
|
1120
1351
|
"data-density": density,
|
|
1121
1352
|
"data-slot": "breadcrumb-item",
|
|
1122
1353
|
className: cn2("inline-flex items-center gap-1", className),
|
|
@@ -1138,7 +1369,7 @@ function BreadcrumbLink2({ analytics, density, className, render, ...props }) {
|
|
|
1138
1369
|
});
|
|
1139
1370
|
}
|
|
1140
1371
|
function BreadcrumbPage2({ density, className, ...props }) {
|
|
1141
|
-
return /* @__PURE__ */
|
|
1372
|
+
return /* @__PURE__ */ jsx15("span", {
|
|
1142
1373
|
"data-density": density,
|
|
1143
1374
|
"data-slot": "breadcrumb-page",
|
|
1144
1375
|
role: "link",
|
|
@@ -1149,20 +1380,20 @@ function BreadcrumbPage2({ density, className, ...props }) {
|
|
|
1149
1380
|
});
|
|
1150
1381
|
}
|
|
1151
1382
|
function BreadcrumbSeparator2({ density, children, className, ...props }) {
|
|
1152
|
-
return /* @__PURE__ */
|
|
1383
|
+
return /* @__PURE__ */ jsx15("li", {
|
|
1153
1384
|
"data-density": density,
|
|
1154
1385
|
"data-slot": "breadcrumb-separator",
|
|
1155
1386
|
role: "presentation",
|
|
1156
1387
|
"aria-hidden": "true",
|
|
1157
1388
|
className: cn2("[&>svg]:size-3.5", className),
|
|
1158
1389
|
...props,
|
|
1159
|
-
children: children ?? /* @__PURE__ */
|
|
1390
|
+
children: children ?? /* @__PURE__ */ jsx15(ChevronRightIcon, {
|
|
1160
1391
|
className: "rtl:rotate-180"
|
|
1161
1392
|
})
|
|
1162
1393
|
});
|
|
1163
1394
|
}
|
|
1164
1395
|
function BreadcrumbEllipsis2({ density, className, ...props }) {
|
|
1165
|
-
return /* @__PURE__ */
|
|
1396
|
+
return /* @__PURE__ */ jsxs10("span", {
|
|
1166
1397
|
"data-density": density,
|
|
1167
1398
|
"data-slot": "breadcrumb-ellipsis",
|
|
1168
1399
|
role: "presentation",
|
|
@@ -1170,8 +1401,8 @@ function BreadcrumbEllipsis2({ density, className, ...props }) {
|
|
|
1170
1401
|
className: cn2("flex size-5 items-center justify-center [&>svg]:size-4", className),
|
|
1171
1402
|
...props,
|
|
1172
1403
|
children: [
|
|
1173
|
-
/* @__PURE__ */
|
|
1174
|
-
/* @__PURE__ */
|
|
1404
|
+
/* @__PURE__ */ jsx15(MoreHorizontalIcon, {}),
|
|
1405
|
+
/* @__PURE__ */ jsx15("span", {
|
|
1175
1406
|
className: "sr-only",
|
|
1176
1407
|
children: "More"
|
|
1177
1408
|
})
|
|
@@ -1182,7 +1413,7 @@ function BreadcrumbEllipsis2({ density, className, ...props }) {
|
|
|
1182
1413
|
import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
|
|
1183
1414
|
import { useRender as useRender4 } from "@base-ui/react/use-render";
|
|
1184
1415
|
import { cva } from "class-variance-authority";
|
|
1185
|
-
import { jsx as
|
|
1416
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1186
1417
|
var buttonGroupVariants2 = cva("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-sm [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
1187
1418
|
variants: {
|
|
1188
1419
|
layout: {
|
|
@@ -1205,7 +1436,7 @@ function ButtonGroup2({
|
|
|
1205
1436
|
layout = "content",
|
|
1206
1437
|
...props
|
|
1207
1438
|
}) {
|
|
1208
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ jsx16("div", {
|
|
1209
1440
|
role: "group",
|
|
1210
1441
|
"data-density": density,
|
|
1211
1442
|
"data-slot": "button-group",
|
|
@@ -1233,7 +1464,7 @@ function ButtonGroupSeparator2({
|
|
|
1233
1464
|
orientation = "vertical",
|
|
1234
1465
|
...props
|
|
1235
1466
|
}) {
|
|
1236
|
-
return /* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ jsx16(Separator2, {
|
|
1237
1468
|
"data-density": density,
|
|
1238
1469
|
"data-slot": "button-group-separator",
|
|
1239
1470
|
orientation,
|
|
@@ -1245,9 +1476,9 @@ function ButtonGroupSeparator2({
|
|
|
1245
1476
|
import { mergeProps as mergeProps5 } from "@base-ui/react/merge-props";
|
|
1246
1477
|
import { useRender as useRender5 } from "@base-ui/react/use-render";
|
|
1247
1478
|
import { cva as cva2 } from "class-variance-authority";
|
|
1248
|
-
import { jsx as
|
|
1479
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1249
1480
|
function ItemGroup2({ density, className, ...props }) {
|
|
1250
|
-
return /* @__PURE__ */
|
|
1481
|
+
return /* @__PURE__ */ jsx17("div", {
|
|
1251
1482
|
role: "list",
|
|
1252
1483
|
"data-density": density,
|
|
1253
1484
|
"data-slot": "item-group",
|
|
@@ -1256,7 +1487,7 @@ function ItemGroup2({ density, className, ...props }) {
|
|
|
1256
1487
|
});
|
|
1257
1488
|
}
|
|
1258
1489
|
function ItemSeparator2({ density, className, ...props }) {
|
|
1259
|
-
return /* @__PURE__ */
|
|
1490
|
+
return /* @__PURE__ */ jsx17(Separator2, {
|
|
1260
1491
|
"data-density": density,
|
|
1261
1492
|
"data-slot": "item-separator",
|
|
1262
1493
|
orientation: "horizontal",
|
|
@@ -1317,7 +1548,7 @@ var itemMediaVariants = cva2("flex shrink-0 items-center justify-center gap-2 gr
|
|
|
1317
1548
|
}
|
|
1318
1549
|
});
|
|
1319
1550
|
function ItemMedia2({ density, className, variant = "default", ...props }) {
|
|
1320
|
-
return /* @__PURE__ */
|
|
1551
|
+
return /* @__PURE__ */ jsx17("div", {
|
|
1321
1552
|
"data-density": density,
|
|
1322
1553
|
"data-slot": "item-media",
|
|
1323
1554
|
"data-variant": variant,
|
|
@@ -1326,7 +1557,7 @@ function ItemMedia2({ density, className, variant = "default", ...props }) {
|
|
|
1326
1557
|
});
|
|
1327
1558
|
}
|
|
1328
1559
|
function ItemContent2({ density, className, ...props }) {
|
|
1329
|
-
return /* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ jsx17("div", {
|
|
1330
1561
|
"data-density": density,
|
|
1331
1562
|
"data-slot": "item-content",
|
|
1332
1563
|
className: cn2("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
|
|
@@ -1334,7 +1565,7 @@ function ItemContent2({ density, className, ...props }) {
|
|
|
1334
1565
|
});
|
|
1335
1566
|
}
|
|
1336
1567
|
function ItemTitle2({ density, className, wrap = false, ...props }) {
|
|
1337
|
-
return /* @__PURE__ */
|
|
1568
|
+
return /* @__PURE__ */ jsx17("div", {
|
|
1338
1569
|
"data-density": density,
|
|
1339
1570
|
"data-slot": "item-title",
|
|
1340
1571
|
className: cn2(!wrap && "line-clamp-1", "flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", wrap && "min-w-0 max-w-full wrap-anywhere", className),
|
|
@@ -1342,7 +1573,7 @@ function ItemTitle2({ density, className, wrap = false, ...props }) {
|
|
|
1342
1573
|
});
|
|
1343
1574
|
}
|
|
1344
1575
|
function ItemDescription2({ density, className, ...props }) {
|
|
1345
|
-
return /* @__PURE__ */
|
|
1576
|
+
return /* @__PURE__ */ jsx17("p", {
|
|
1346
1577
|
"data-density": density,
|
|
1347
1578
|
"data-slot": "item-description",
|
|
1348
1579
|
className: cn2("line-clamp-2 text-start text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
@@ -1350,7 +1581,7 @@ function ItemDescription2({ density, className, ...props }) {
|
|
|
1350
1581
|
});
|
|
1351
1582
|
}
|
|
1352
1583
|
function ItemActions2({ density, className, ...props }) {
|
|
1353
|
-
return /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ jsx17("div", {
|
|
1354
1585
|
"data-density": density,
|
|
1355
1586
|
"data-slot": "item-actions",
|
|
1356
1587
|
className: cn2("flex items-center gap-2", className),
|
|
@@ -1358,7 +1589,7 @@ function ItemActions2({ density, className, ...props }) {
|
|
|
1358
1589
|
});
|
|
1359
1590
|
}
|
|
1360
1591
|
function ItemHeader2({ density, className, ...props }) {
|
|
1361
|
-
return /* @__PURE__ */
|
|
1592
|
+
return /* @__PURE__ */ jsx17("div", {
|
|
1362
1593
|
"data-density": density,
|
|
1363
1594
|
"data-slot": "item-header",
|
|
1364
1595
|
className: cn2("flex basis-full items-center justify-between gap-2", className),
|
|
@@ -1366,7 +1597,7 @@ function ItemHeader2({ density, className, ...props }) {
|
|
|
1366
1597
|
});
|
|
1367
1598
|
}
|
|
1368
1599
|
function ItemFooter2({ density, className, ...props }) {
|
|
1369
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ jsx17("div", {
|
|
1370
1601
|
"data-density": density,
|
|
1371
1602
|
"data-slot": "item-footer",
|
|
1372
1603
|
className: cn2("flex basis-full items-center justify-between gap-2", className),
|
|
@@ -1375,9 +1606,9 @@ function ItemFooter2({ density, className, ...props }) {
|
|
|
1375
1606
|
}
|
|
1376
1607
|
// src/components/Pagination.tsx
|
|
1377
1608
|
import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon2, MoreHorizontalIcon as MoreHorizontalIcon2 } from "lucide-react";
|
|
1378
|
-
import { jsx as
|
|
1609
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1379
1610
|
function Pagination2({ density, className, ...props }) {
|
|
1380
|
-
return /* @__PURE__ */
|
|
1611
|
+
return /* @__PURE__ */ jsx18("nav", {
|
|
1381
1612
|
role: "navigation",
|
|
1382
1613
|
"aria-label": "pagination",
|
|
1383
1614
|
"data-density": density,
|
|
@@ -1387,7 +1618,7 @@ function Pagination2({ density, className, ...props }) {
|
|
|
1387
1618
|
});
|
|
1388
1619
|
}
|
|
1389
1620
|
function PaginationContent2({ density, className, ...props }) {
|
|
1390
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ jsx18("ul", {
|
|
1391
1622
|
"data-density": density,
|
|
1392
1623
|
"data-slot": "pagination-content",
|
|
1393
1624
|
className: cn2("flex items-center gap-0.5", className),
|
|
@@ -1395,7 +1626,7 @@ function PaginationContent2({ density, className, ...props }) {
|
|
|
1395
1626
|
});
|
|
1396
1627
|
}
|
|
1397
1628
|
function PaginationItem2({ ...props }) {
|
|
1398
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ jsx18("li", {
|
|
1399
1630
|
"data-slot": "pagination-item",
|
|
1400
1631
|
...props
|
|
1401
1632
|
});
|
|
@@ -1408,7 +1639,7 @@ function PaginationLink2({
|
|
|
1408
1639
|
size = "icon",
|
|
1409
1640
|
...props
|
|
1410
1641
|
}) {
|
|
1411
|
-
return /* @__PURE__ */
|
|
1642
|
+
return /* @__PURE__ */ jsx18(AnalyticsLink, {
|
|
1412
1643
|
component: "PaginationLink",
|
|
1413
1644
|
analytics,
|
|
1414
1645
|
"data-density": density,
|
|
@@ -1425,18 +1656,18 @@ function PaginationPrevious2({
|
|
|
1425
1656
|
text = "Previous",
|
|
1426
1657
|
...props
|
|
1427
1658
|
}) {
|
|
1428
|
-
return /* @__PURE__ */
|
|
1659
|
+
return /* @__PURE__ */ jsxs11(PaginationLink2, {
|
|
1429
1660
|
density,
|
|
1430
1661
|
"aria-label": "Go to previous page",
|
|
1431
1662
|
size: "default",
|
|
1432
1663
|
className: cn2("ps-1.5!", className),
|
|
1433
1664
|
...props,
|
|
1434
1665
|
children: [
|
|
1435
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ jsx18(ChevronLeftIcon, {
|
|
1436
1667
|
"data-icon": "inline-start",
|
|
1437
1668
|
className: "rtl:rotate-180"
|
|
1438
1669
|
}),
|
|
1439
|
-
/* @__PURE__ */
|
|
1670
|
+
/* @__PURE__ */ jsx18("span", {
|
|
1440
1671
|
className: "hidden sm:block",
|
|
1441
1672
|
children: text
|
|
1442
1673
|
})
|
|
@@ -1444,18 +1675,18 @@ function PaginationPrevious2({
|
|
|
1444
1675
|
});
|
|
1445
1676
|
}
|
|
1446
1677
|
function PaginationNext2({ density, className, text = "Next", ...props }) {
|
|
1447
|
-
return /* @__PURE__ */
|
|
1678
|
+
return /* @__PURE__ */ jsxs11(PaginationLink2, {
|
|
1448
1679
|
density,
|
|
1449
1680
|
"aria-label": "Go to next page",
|
|
1450
1681
|
size: "default",
|
|
1451
1682
|
className: cn2("pe-1.5!", className),
|
|
1452
1683
|
...props,
|
|
1453
1684
|
children: [
|
|
1454
|
-
/* @__PURE__ */
|
|
1685
|
+
/* @__PURE__ */ jsx18("span", {
|
|
1455
1686
|
className: "hidden sm:block",
|
|
1456
1687
|
children: text
|
|
1457
1688
|
}),
|
|
1458
|
-
/* @__PURE__ */
|
|
1689
|
+
/* @__PURE__ */ jsx18(ChevronRightIcon2, {
|
|
1459
1690
|
"data-icon": "inline-end",
|
|
1460
1691
|
className: "rtl:rotate-180"
|
|
1461
1692
|
})
|
|
@@ -1463,15 +1694,15 @@ function PaginationNext2({ density, className, text = "Next", ...props }) {
|
|
|
1463
1694
|
});
|
|
1464
1695
|
}
|
|
1465
1696
|
function PaginationEllipsis2({ density, className, ...props }) {
|
|
1466
|
-
return /* @__PURE__ */
|
|
1697
|
+
return /* @__PURE__ */ jsxs11("span", {
|
|
1467
1698
|
"aria-hidden": true,
|
|
1468
1699
|
"data-density": density,
|
|
1469
1700
|
"data-slot": "pagination-ellipsis",
|
|
1470
1701
|
className: cn2("flex size-control items-center justify-center [&_svg:not([class*='size-'])]:size-4", className),
|
|
1471
1702
|
...props,
|
|
1472
1703
|
children: [
|
|
1473
|
-
/* @__PURE__ */
|
|
1474
|
-
/* @__PURE__ */
|
|
1704
|
+
/* @__PURE__ */ jsx18(MoreHorizontalIcon2, {}),
|
|
1705
|
+
/* @__PURE__ */ jsx18("span", {
|
|
1475
1706
|
className: "sr-only",
|
|
1476
1707
|
children: "More pages"
|
|
1477
1708
|
})
|
|
@@ -1482,8 +1713,8 @@ function PaginationEllipsis2({ density, className, ...props }) {
|
|
|
1482
1713
|
import { useMemo as useMemo2 } from "react";
|
|
1483
1714
|
|
|
1484
1715
|
// src/drawer/DrawerContext.ts
|
|
1485
|
-
import { createContext } from "react";
|
|
1486
|
-
var DrawerContext =
|
|
1716
|
+
import { createContext as createContext2 } from "react";
|
|
1717
|
+
var DrawerContext = createContext2(null);
|
|
1487
1718
|
|
|
1488
1719
|
// src/hooks/useDrawer.ts
|
|
1489
1720
|
import { useContext } from "react";
|
|
@@ -1497,7 +1728,7 @@ function useDrawer() {
|
|
|
1497
1728
|
|
|
1498
1729
|
// src/components/Drawer.tsx
|
|
1499
1730
|
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
1500
|
-
import { jsx as
|
|
1731
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1501
1732
|
function Drawer2({
|
|
1502
1733
|
analytics,
|
|
1503
1734
|
modal = true,
|
|
@@ -1509,9 +1740,9 @@ function Drawer2({
|
|
|
1509
1740
|
const trackedOnOpenChange = useAnalyticsCallback("Drawer", analytics, (open, _details) => ({ name: "ui.open-request", open }), props.onOpenChange);
|
|
1510
1741
|
const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
|
|
1511
1742
|
const contextValue = useMemo2(() => ({ hasSnapPoints, modal, showSwipeHandle, swipeDirection }), [hasSnapPoints, modal, showSwipeHandle, swipeDirection]);
|
|
1512
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ jsx19(DrawerContext.Provider, {
|
|
1513
1744
|
value: contextValue,
|
|
1514
|
-
children: /* @__PURE__ */
|
|
1745
|
+
children: /* @__PURE__ */ jsx19(DrawerPrimitive.Root, {
|
|
1515
1746
|
"data-slot": "drawer",
|
|
1516
1747
|
modal,
|
|
1517
1748
|
snapPoints,
|
|
@@ -1522,7 +1753,7 @@ function Drawer2({
|
|
|
1522
1753
|
});
|
|
1523
1754
|
}
|
|
1524
1755
|
function DrawerTrigger2({ ...props }) {
|
|
1525
|
-
return /* @__PURE__ */
|
|
1756
|
+
return /* @__PURE__ */ jsx19(DrawerPrimitive.Trigger, {
|
|
1526
1757
|
"data-slot": "drawer-trigger",
|
|
1527
1758
|
...props
|
|
1528
1759
|
});
|
|
@@ -1530,26 +1761,26 @@ function DrawerTrigger2({ ...props }) {
|
|
|
1530
1761
|
function DrawerPortal2({ container, ref, children, ...props }) {
|
|
1531
1762
|
const resolvedContainer = usePortalContainer2(container);
|
|
1532
1763
|
const portal = usePortalNode(ref);
|
|
1533
|
-
return /* @__PURE__ */
|
|
1764
|
+
return /* @__PURE__ */ jsx19(DrawerPrimitive.Portal, {
|
|
1534
1765
|
"data-slot": "drawer-portal",
|
|
1535
1766
|
container: resolvedContainer,
|
|
1536
1767
|
ref: portal.ref,
|
|
1537
1768
|
...props,
|
|
1538
|
-
children: /* @__PURE__ */
|
|
1769
|
+
children: /* @__PURE__ */ jsx19(PortalProvider2, {
|
|
1539
1770
|
container: portal.node,
|
|
1540
1771
|
children
|
|
1541
1772
|
})
|
|
1542
1773
|
});
|
|
1543
1774
|
}
|
|
1544
1775
|
function DrawerClose2({ ...props }) {
|
|
1545
|
-
return /* @__PURE__ */
|
|
1776
|
+
return /* @__PURE__ */ jsx19(DrawerPrimitive.Close, {
|
|
1546
1777
|
"data-slot": "drawer-close",
|
|
1547
1778
|
...props
|
|
1548
1779
|
});
|
|
1549
1780
|
}
|
|
1550
1781
|
function DrawerOverlay2({ density, className, ...props }) {
|
|
1551
1782
|
const resolvedDensity = useDensity(density);
|
|
1552
|
-
return /* @__PURE__ */
|
|
1783
|
+
return /* @__PURE__ */ jsx19(DrawerPrimitive.Backdrop, {
|
|
1553
1784
|
"data-density": resolvedDensity,
|
|
1554
1785
|
"data-slot": "drawer-overlay",
|
|
1555
1786
|
className: (state) => cn2("fixed inset-0 min-h-dvh bg-backdrop opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute", typeof className === "function" ? className(state) : className),
|
|
@@ -1557,7 +1788,7 @@ function DrawerOverlay2({ density, className, ...props }) {
|
|
|
1557
1788
|
});
|
|
1558
1789
|
}
|
|
1559
1790
|
function DrawerSwipeHandle2({ density, className, ...props }) {
|
|
1560
|
-
return /* @__PURE__ */
|
|
1791
|
+
return /* @__PURE__ */ jsx19("div", {
|
|
1561
1792
|
"data-density": density,
|
|
1562
1793
|
"data-slot": "drawer-swipe-handle",
|
|
1563
1794
|
"aria-hidden": "true",
|
|
@@ -1570,18 +1801,18 @@ function DrawerContent2({ density, className, children, ...props }) {
|
|
|
1570
1801
|
const direction = useDirection2();
|
|
1571
1802
|
const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useDrawer();
|
|
1572
1803
|
const swipeAxis = swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
|
|
1573
|
-
return /* @__PURE__ */
|
|
1804
|
+
return /* @__PURE__ */ jsxs12(DrawerPortal2, {
|
|
1574
1805
|
"data-slot": "drawer-portal",
|
|
1575
1806
|
children: [
|
|
1576
|
-
modal === true && /* @__PURE__ */
|
|
1807
|
+
modal === true && /* @__PURE__ */ jsx19(DrawerOverlay2, {
|
|
1577
1808
|
"data-snap-points": hasSnapPoints ? "" : undefined
|
|
1578
1809
|
}),
|
|
1579
|
-
/* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ jsx19(DrawerPrimitive.Viewport, {
|
|
1580
1811
|
dir: direction,
|
|
1581
1812
|
"data-slot": "drawer-viewport",
|
|
1582
1813
|
"data-modal": modal,
|
|
1583
1814
|
className: "pointer-events-none fixed inset-0 select-none data-[modal=true]:pointer-events-auto",
|
|
1584
|
-
children: /* @__PURE__ */
|
|
1815
|
+
children: /* @__PURE__ */ jsxs12(DrawerPrimitive.Popup, {
|
|
1585
1816
|
"data-density": resolvedDensity,
|
|
1586
1817
|
"data-slot": "drawer-popup",
|
|
1587
1818
|
"data-scroll": "none",
|
|
@@ -1590,8 +1821,8 @@ function DrawerContent2({ density, className, children, ...props }) {
|
|
|
1590
1821
|
className: (state) => cn2("group/drawer-popup pointer-events-auto fixed m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)] flex-col border border-frame-edge shadow-frame bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-md data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-md data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-md data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-md data-[swipe-direction=up]:border-b", "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95", "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full", "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]", "[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-shrink:0]", "data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]", "data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)", "data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row", "data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]", "data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]", "data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]", "data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]", typeof className === "function" ? className(state) : className),
|
|
1591
1822
|
...props,
|
|
1592
1823
|
children: [
|
|
1593
|
-
showSwipeHandle && /* @__PURE__ */
|
|
1594
|
-
/* @__PURE__ */
|
|
1824
|
+
showSwipeHandle && /* @__PURE__ */ jsx19(DrawerSwipeHandle2, {}),
|
|
1825
|
+
/* @__PURE__ */ jsx19(DrawerPrimitive.Content, {
|
|
1595
1826
|
"data-slot": "drawer-content",
|
|
1596
1827
|
"data-scroll": "none",
|
|
1597
1828
|
className: "flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-out select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none",
|
|
@@ -1604,7 +1835,7 @@ function DrawerContent2({ density, className, children, ...props }) {
|
|
|
1604
1835
|
});
|
|
1605
1836
|
}
|
|
1606
1837
|
function DrawerHeader2({ density, className, ...props }) {
|
|
1607
|
-
return /* @__PURE__ */
|
|
1838
|
+
return /* @__PURE__ */ jsx19("div", {
|
|
1608
1839
|
"data-density": density,
|
|
1609
1840
|
"data-slot": "drawer-header",
|
|
1610
1841
|
className: cn2("flex shrink-0 flex-col gap-0.5 p-panel pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-start md:group-data-[swipe-axis=y]/drawer-popup:text-start", className),
|
|
@@ -1612,7 +1843,7 @@ function DrawerHeader2({ density, className, ...props }) {
|
|
|
1612
1843
|
});
|
|
1613
1844
|
}
|
|
1614
1845
|
function DrawerFooter2({ density, className, ...props }) {
|
|
1615
|
-
return /* @__PURE__ */
|
|
1846
|
+
return /* @__PURE__ */ jsx19("div", {
|
|
1616
1847
|
"data-density": density,
|
|
1617
1848
|
"data-slot": "drawer-footer",
|
|
1618
1849
|
className: cn2("mt-auto flex shrink-0 flex-col gap-2 p-panel pt-0", className),
|
|
@@ -1620,7 +1851,7 @@ function DrawerFooter2({ density, className, ...props }) {
|
|
|
1620
1851
|
});
|
|
1621
1852
|
}
|
|
1622
1853
|
function DrawerTitle2({ density, className, ...props }) {
|
|
1623
|
-
return /* @__PURE__ */
|
|
1854
|
+
return /* @__PURE__ */ jsx19(DrawerPrimitive.Title, {
|
|
1624
1855
|
"data-density": density,
|
|
1625
1856
|
"data-slot": "drawer-title",
|
|
1626
1857
|
className: (state) => cn2(" text-base font-medium text-foreground", typeof className === "function" ? className(state) : className),
|
|
@@ -1628,226 +1859,20 @@ function DrawerTitle2({ density, className, ...props }) {
|
|
|
1628
1859
|
});
|
|
1629
1860
|
}
|
|
1630
1861
|
function DrawerDescription2({ density, className, ...props }) {
|
|
1631
|
-
return /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ jsx19(DrawerPrimitive.Description, {
|
|
1632
1863
|
"data-density": density,
|
|
1633
1864
|
"data-slot": "drawer-description",
|
|
1634
1865
|
className: (state) => cn2("text-sm text-balance text-muted-foreground", typeof className === "function" ? className(state) : className),
|
|
1635
1866
|
...props
|
|
1636
1867
|
});
|
|
1637
1868
|
}
|
|
1638
|
-
// src/components/ContextMenu.tsx
|
|
1639
|
-
import { ChevronRightIcon as ChevronRightIcon3, CheckIcon as CheckIcon2 } from "lucide-react";
|
|
1640
|
-
import { useDirection as useDirection4 } from "@base-ui/react/direction-provider";
|
|
1641
|
-
import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
|
|
1642
|
-
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1643
|
-
function ContextMenu2({ analytics, ...props }) {
|
|
1644
|
-
const trackedOnOpenChange = useAnalyticsCallback("ContextMenu", analytics, (open, _details) => ({ name: "ui.open-request", open }), props.onOpenChange);
|
|
1645
|
-
return /* @__PURE__ */ jsx17(ContextMenuPrimitive.Root, {
|
|
1646
|
-
"data-slot": "context-menu",
|
|
1647
|
-
...props,
|
|
1648
|
-
onOpenChange: trackedOnOpenChange
|
|
1649
|
-
});
|
|
1650
|
-
}
|
|
1651
|
-
function ContextMenuPortal2({ container, ref, children, ...props }) {
|
|
1652
|
-
const resolvedContainer = usePortalContainer2(container);
|
|
1653
|
-
const portal = usePortalNode(ref);
|
|
1654
|
-
return /* @__PURE__ */ jsx17(ContextMenuPrimitive.Portal, {
|
|
1655
|
-
"data-slot": "context-menu-portal",
|
|
1656
|
-
container: resolvedContainer,
|
|
1657
|
-
ref: portal.ref,
|
|
1658
|
-
...props,
|
|
1659
|
-
children: /* @__PURE__ */ jsx17(PortalProvider2, {
|
|
1660
|
-
container: portal.node,
|
|
1661
|
-
children
|
|
1662
|
-
})
|
|
1663
|
-
});
|
|
1664
|
-
}
|
|
1665
|
-
function ContextMenuTrigger2({ density, className, ...props }) {
|
|
1666
|
-
return /* @__PURE__ */ jsx17(ContextMenuPrimitive.Trigger, {
|
|
1667
|
-
"data-density": density,
|
|
1668
|
-
"data-slot": "context-menu-trigger",
|
|
1669
|
-
className: (state) => cn2("select-none", typeof className === "function" ? className(state) : className),
|
|
1670
|
-
...props
|
|
1671
|
-
});
|
|
1672
|
-
}
|
|
1673
|
-
function ContextMenuContent2({
|
|
1674
|
-
density,
|
|
1675
|
-
className,
|
|
1676
|
-
align = "start",
|
|
1677
|
-
alignOffset = 4,
|
|
1678
|
-
side = "right",
|
|
1679
|
-
sideOffset = 0,
|
|
1680
|
-
...props
|
|
1681
|
-
}) {
|
|
1682
|
-
const resolvedDensity = useDensity(density);
|
|
1683
|
-
const direction = useDirection4();
|
|
1684
|
-
return /* @__PURE__ */ jsx17(ContextMenuPortal2, {
|
|
1685
|
-
children: /* @__PURE__ */ jsx17(ContextMenuPrimitive.Positioner, {
|
|
1686
|
-
dir: direction,
|
|
1687
|
-
className: "isolate outline-none",
|
|
1688
|
-
align,
|
|
1689
|
-
alignOffset,
|
|
1690
|
-
side,
|
|
1691
|
-
sideOffset,
|
|
1692
|
-
children: /* @__PURE__ */ jsx17(ContextMenuPrimitive.Popup, {
|
|
1693
|
-
dir: direction,
|
|
1694
|
-
"data-density": resolvedDensity,
|
|
1695
|
-
"data-slot": "context-menu-content",
|
|
1696
|
-
className: (state) => cn2(" max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-sm bg-popover p-1 text-popover-foreground border border-frame-edge shadow-frame duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none ", typeof className === "function" ? className(state) : className),
|
|
1697
|
-
...props
|
|
1698
|
-
})
|
|
1699
|
-
})
|
|
1700
|
-
});
|
|
1701
|
-
}
|
|
1702
|
-
function ContextMenuGroup2({ ...props }) {
|
|
1703
|
-
return /* @__PURE__ */ jsx17(ContextMenuPrimitive.Group, {
|
|
1704
|
-
"data-slot": "context-menu-group",
|
|
1705
|
-
...props
|
|
1706
|
-
});
|
|
1707
|
-
}
|
|
1708
|
-
function ContextMenuLabel2({ density, className, inset, ...props }) {
|
|
1709
|
-
return /* @__PURE__ */ jsx17(ContextMenuPrimitive.GroupLabel, {
|
|
1710
|
-
"data-density": density,
|
|
1711
|
-
"data-slot": "context-menu-label",
|
|
1712
|
-
"data-inset": inset,
|
|
1713
|
-
className: (state) => cn2("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:ps-7", typeof className === "function" ? className(state) : className),
|
|
1714
|
-
...props
|
|
1715
|
-
});
|
|
1716
|
-
}
|
|
1717
|
-
function ContextMenuItem2({
|
|
1718
|
-
analytics,
|
|
1719
|
-
density,
|
|
1720
|
-
className,
|
|
1721
|
-
inset,
|
|
1722
|
-
variant = "default",
|
|
1723
|
-
...props
|
|
1724
|
-
}) {
|
|
1725
|
-
const trackedOnClick = useAnalyticsCallback("ContextMenuItem", analytics, { name: "ui.activate" }, props.onClick);
|
|
1726
|
-
return /* @__PURE__ */ jsx17(ContextMenuPrimitive.Item, {
|
|
1727
|
-
"data-density": density,
|
|
1728
|
-
"data-slot": "context-menu-item",
|
|
1729
|
-
"data-inset": inset,
|
|
1730
|
-
"data-variant": variant,
|
|
1731
|
-
className: (state) => cn2("group/context-menu-item relative flex cursor-default items-center gap-control-gap rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", typeof className === "function" ? className(state) : className),
|
|
1732
|
-
...props,
|
|
1733
|
-
onClick: trackedOnClick
|
|
1734
|
-
});
|
|
1735
|
-
}
|
|
1736
|
-
function ContextMenuSub2({
|
|
1737
|
-
analytics,
|
|
1738
|
-
...props
|
|
1739
|
-
}) {
|
|
1740
|
-
const trackedOnOpenChange = useAnalyticsCallback("ContextMenuSub", analytics, (open, _details) => ({ name: "ui.open-request", open }), props.onOpenChange);
|
|
1741
|
-
return /* @__PURE__ */ jsx17(ContextMenuPrimitive.SubmenuRoot, {
|
|
1742
|
-
"data-slot": "context-menu-sub",
|
|
1743
|
-
...props,
|
|
1744
|
-
onOpenChange: trackedOnOpenChange
|
|
1745
|
-
});
|
|
1746
|
-
}
|
|
1747
|
-
function ContextMenuSubTrigger2({ density, className, inset, children, ...props }) {
|
|
1748
|
-
return /* @__PURE__ */ jsxs11(ContextMenuPrimitive.SubmenuTrigger, {
|
|
1749
|
-
"data-density": density,
|
|
1750
|
-
"data-slot": "context-menu-sub-trigger",
|
|
1751
|
-
"data-inset": inset,
|
|
1752
|
-
className: (state) => cn2("flex cursor-default items-center gap-control-gap rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
|
|
1753
|
-
...props,
|
|
1754
|
-
children: [
|
|
1755
|
-
children,
|
|
1756
|
-
/* @__PURE__ */ jsx17(ChevronRightIcon3, {
|
|
1757
|
-
className: "rtl:rotate-180 ms-auto"
|
|
1758
|
-
})
|
|
1759
|
-
]
|
|
1760
|
-
});
|
|
1761
|
-
}
|
|
1762
|
-
function ContextMenuSubContent2({ ...props }) {
|
|
1763
|
-
return /* @__PURE__ */ jsx17(ContextMenuContent2, {
|
|
1764
|
-
"data-slot": "context-menu-sub-content",
|
|
1765
|
-
className: " shadow-frame border border-frame-edge",
|
|
1766
|
-
side: "inline-end",
|
|
1767
|
-
...props
|
|
1768
|
-
});
|
|
1769
|
-
}
|
|
1770
|
-
function ContextMenuCheckboxItem2({
|
|
1771
|
-
analytics,
|
|
1772
|
-
density,
|
|
1773
|
-
className,
|
|
1774
|
-
children,
|
|
1775
|
-
checked,
|
|
1776
|
-
inset,
|
|
1777
|
-
...props
|
|
1778
|
-
}) {
|
|
1779
|
-
const trackedOnCheckedChange = useAnalyticsCallback("ContextMenuCheckboxItem", analytics, { name: "ui.change-request" }, props.onCheckedChange);
|
|
1780
|
-
return /* @__PURE__ */ jsxs11(ContextMenuPrimitive.CheckboxItem, {
|
|
1781
|
-
"data-density": density,
|
|
1782
|
-
"data-slot": "context-menu-checkbox-item",
|
|
1783
|
-
"data-inset": inset,
|
|
1784
|
-
className: (state) => cn2("relative flex cursor-default items-center gap-control-gap rounded-md py-1 pe-8 ps-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
|
|
1785
|
-
checked,
|
|
1786
|
-
...props,
|
|
1787
|
-
onCheckedChange: trackedOnCheckedChange,
|
|
1788
|
-
children: [
|
|
1789
|
-
/* @__PURE__ */ jsx17("span", {
|
|
1790
|
-
className: "pointer-events-none absolute end-2",
|
|
1791
|
-
children: /* @__PURE__ */ jsx17(ContextMenuPrimitive.CheckboxItemIndicator, {
|
|
1792
|
-
children: /* @__PURE__ */ jsx17(CheckIcon2, {})
|
|
1793
|
-
})
|
|
1794
|
-
}),
|
|
1795
|
-
children
|
|
1796
|
-
]
|
|
1797
|
-
});
|
|
1798
|
-
}
|
|
1799
|
-
function ContextMenuRadioGroup2({
|
|
1800
|
-
analytics,
|
|
1801
|
-
...props
|
|
1802
|
-
}) {
|
|
1803
|
-
const trackedOnValueChange = useAnalyticsCallback("ContextMenuRadioGroup", analytics, { name: "ui.change-request" }, props.onValueChange);
|
|
1804
|
-
return /* @__PURE__ */ jsx17(ContextMenuPrimitive.RadioGroup, {
|
|
1805
|
-
"data-slot": "context-menu-radio-group",
|
|
1806
|
-
...props,
|
|
1807
|
-
onValueChange: trackedOnValueChange
|
|
1808
|
-
});
|
|
1809
|
-
}
|
|
1810
|
-
function ContextMenuRadioItem2({ density, className, children, inset, ...props }) {
|
|
1811
|
-
return /* @__PURE__ */ jsxs11(ContextMenuPrimitive.RadioItem, {
|
|
1812
|
-
"data-density": density,
|
|
1813
|
-
"data-slot": "context-menu-radio-item",
|
|
1814
|
-
"data-inset": inset,
|
|
1815
|
-
className: (state) => cn2("relative flex cursor-default items-center gap-control-gap rounded-md py-1 pe-8 ps-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
|
|
1816
|
-
...props,
|
|
1817
|
-
children: [
|
|
1818
|
-
/* @__PURE__ */ jsx17("span", {
|
|
1819
|
-
className: "pointer-events-none absolute end-2",
|
|
1820
|
-
children: /* @__PURE__ */ jsx17(ContextMenuPrimitive.RadioItemIndicator, {
|
|
1821
|
-
children: /* @__PURE__ */ jsx17(CheckIcon2, {})
|
|
1822
|
-
})
|
|
1823
|
-
}),
|
|
1824
|
-
children
|
|
1825
|
-
]
|
|
1826
|
-
});
|
|
1827
|
-
}
|
|
1828
|
-
function ContextMenuSeparator2({ density, className, ...props }) {
|
|
1829
|
-
return /* @__PURE__ */ jsx17(ContextMenuPrimitive.Separator, {
|
|
1830
|
-
"data-density": density,
|
|
1831
|
-
"data-slot": "context-menu-separator",
|
|
1832
|
-
className: (state) => cn2("-mx-1 my-1 h-px bg-border", typeof className === "function" ? className(state) : className),
|
|
1833
|
-
...props
|
|
1834
|
-
});
|
|
1835
|
-
}
|
|
1836
|
-
function ContextMenuShortcut2({ density, className, ...props }) {
|
|
1837
|
-
return /* @__PURE__ */ jsx17("span", {
|
|
1838
|
-
"data-density": density,
|
|
1839
|
-
"data-slot": "context-menu-shortcut",
|
|
1840
|
-
className: cn2("ms-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", className),
|
|
1841
|
-
...props
|
|
1842
|
-
});
|
|
1843
|
-
}
|
|
1844
1869
|
// src/components/Menubar.tsx
|
|
1845
|
-
import { CheckIcon as
|
|
1870
|
+
import { CheckIcon as CheckIcon2 } from "lucide-react";
|
|
1846
1871
|
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
1847
1872
|
import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
|
|
1848
|
-
import { jsx as
|
|
1873
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1849
1874
|
function Menubar2({ density, className, ...props }) {
|
|
1850
|
-
return /* @__PURE__ */
|
|
1875
|
+
return /* @__PURE__ */ jsx20(MenubarPrimitive, {
|
|
1851
1876
|
"data-density": density,
|
|
1852
1877
|
"data-slot": "menubar",
|
|
1853
1878
|
className: (state) => cn2("flex h-control items-center gap-0.5 rounded-sm border p-px", typeof className === "function" ? className(state) : className),
|
|
@@ -1859,26 +1884,26 @@ function MenubarMenu2({
|
|
|
1859
1884
|
...props
|
|
1860
1885
|
}) {
|
|
1861
1886
|
const trackedOnOpenChange = useAnalyticsCallback("MenubarMenu", analytics, (open, _details) => ({ name: "ui.open-request", open }), props.onOpenChange);
|
|
1862
|
-
return /* @__PURE__ */
|
|
1887
|
+
return /* @__PURE__ */ jsx20(DropdownMenu2, {
|
|
1863
1888
|
"data-slot": "menubar-menu",
|
|
1864
1889
|
...props,
|
|
1865
1890
|
onOpenChange: trackedOnOpenChange
|
|
1866
1891
|
});
|
|
1867
1892
|
}
|
|
1868
1893
|
function MenubarGroup2({ ...props }) {
|
|
1869
|
-
return /* @__PURE__ */
|
|
1894
|
+
return /* @__PURE__ */ jsx20(MenuGroup2, {
|
|
1870
1895
|
"data-slot": "menubar-group",
|
|
1871
1896
|
...props
|
|
1872
1897
|
});
|
|
1873
1898
|
}
|
|
1874
1899
|
function MenubarPortal2({ ...props }) {
|
|
1875
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ jsx20(MenuPortal, {
|
|
1876
1901
|
"data-slot": "menubar-portal",
|
|
1877
1902
|
...props
|
|
1878
1903
|
});
|
|
1879
1904
|
}
|
|
1880
1905
|
function MenubarTrigger2({ density, className, ...props }) {
|
|
1881
|
-
return /* @__PURE__ */
|
|
1906
|
+
return /* @__PURE__ */ jsx20(DropdownMenuTrigger2, {
|
|
1882
1907
|
"data-density": density,
|
|
1883
1908
|
"data-slot": "menubar-trigger",
|
|
1884
1909
|
className: (state) => cn2("flex h-full items-center rounded-sm px-control-x text-sm leading-none font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", typeof className === "function" ? className(state) : className),
|
|
@@ -1893,7 +1918,7 @@ function MenubarContent2({
|
|
|
1893
1918
|
sideOffset = 8,
|
|
1894
1919
|
...props
|
|
1895
1920
|
}) {
|
|
1896
|
-
return /* @__PURE__ */
|
|
1921
|
+
return /* @__PURE__ */ jsx20(MenuPopup, {
|
|
1897
1922
|
density,
|
|
1898
1923
|
"data-slot": "menubar-content",
|
|
1899
1924
|
align,
|
|
@@ -1912,7 +1937,7 @@ function MenubarItem2({
|
|
|
1912
1937
|
...props
|
|
1913
1938
|
}) {
|
|
1914
1939
|
const trackedOnClick = useAnalyticsCallback("MenubarItem", analytics, { name: "ui.activate" }, props.onClick);
|
|
1915
|
-
return /* @__PURE__ */
|
|
1940
|
+
return /* @__PURE__ */ jsx20(MenuItem2, {
|
|
1916
1941
|
density,
|
|
1917
1942
|
"data-slot": "menubar-item",
|
|
1918
1943
|
inset,
|
|
@@ -1932,7 +1957,7 @@ function MenubarCheckboxItem2({
|
|
|
1932
1957
|
...props
|
|
1933
1958
|
}) {
|
|
1934
1959
|
const trackedOnCheckedChange = useAnalyticsCallback("MenubarCheckboxItem", analytics, { name: "ui.change-request" }, props.onCheckedChange);
|
|
1935
|
-
return /* @__PURE__ */
|
|
1960
|
+
return /* @__PURE__ */ jsxs13(MenuPrimitive.CheckboxItem, {
|
|
1936
1961
|
"data-density": density,
|
|
1937
1962
|
"data-slot": "menubar-checkbox-item",
|
|
1938
1963
|
"data-inset": inset,
|
|
@@ -1941,10 +1966,10 @@ function MenubarCheckboxItem2({
|
|
|
1941
1966
|
...props,
|
|
1942
1967
|
onCheckedChange: trackedOnCheckedChange,
|
|
1943
1968
|
children: [
|
|
1944
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ jsx20("span", {
|
|
1945
1970
|
className: "pointer-events-none absolute start-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
1946
|
-
children: /* @__PURE__ */
|
|
1947
|
-
children: /* @__PURE__ */
|
|
1971
|
+
children: /* @__PURE__ */ jsx20(MenuPrimitive.CheckboxItemIndicator, {
|
|
1972
|
+
children: /* @__PURE__ */ jsx20(CheckIcon2, {})
|
|
1948
1973
|
})
|
|
1949
1974
|
}),
|
|
1950
1975
|
children
|
|
@@ -1952,23 +1977,23 @@ function MenubarCheckboxItem2({
|
|
|
1952
1977
|
});
|
|
1953
1978
|
}
|
|
1954
1979
|
function MenubarRadioGroup2({ ...props }) {
|
|
1955
|
-
return /* @__PURE__ */
|
|
1980
|
+
return /* @__PURE__ */ jsx20(MenuRadioGroup2, {
|
|
1956
1981
|
"data-slot": "menubar-radio-group",
|
|
1957
1982
|
...props
|
|
1958
1983
|
});
|
|
1959
1984
|
}
|
|
1960
1985
|
function MenubarRadioItem2({ density, className, children, inset, ...props }) {
|
|
1961
|
-
return /* @__PURE__ */
|
|
1986
|
+
return /* @__PURE__ */ jsxs13(MenuPrimitive.RadioItem, {
|
|
1962
1987
|
"data-density": density,
|
|
1963
1988
|
"data-slot": "menubar-radio-item",
|
|
1964
1989
|
"data-inset": inset,
|
|
1965
1990
|
className: (state) => cn2("relative flex cursor-default items-center gap-control-gap rounded-md py-1 pe-1.5 ps-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
|
|
1966
1991
|
...props,
|
|
1967
1992
|
children: [
|
|
1968
|
-
/* @__PURE__ */
|
|
1993
|
+
/* @__PURE__ */ jsx20("span", {
|
|
1969
1994
|
className: "pointer-events-none absolute start-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
1970
|
-
children: /* @__PURE__ */
|
|
1971
|
-
children: /* @__PURE__ */
|
|
1995
|
+
children: /* @__PURE__ */ jsx20(MenuPrimitive.RadioItemIndicator, {
|
|
1996
|
+
children: /* @__PURE__ */ jsx20(CheckIcon2, {})
|
|
1972
1997
|
})
|
|
1973
1998
|
}),
|
|
1974
1999
|
children
|
|
@@ -1976,7 +2001,7 @@ function MenubarRadioItem2({ density, className, children, inset, ...props }) {
|
|
|
1976
2001
|
});
|
|
1977
2002
|
}
|
|
1978
2003
|
function MenubarLabel2({ density, className, inset, ...props }) {
|
|
1979
|
-
return /* @__PURE__ */
|
|
2004
|
+
return /* @__PURE__ */ jsx20(MenuLabel2, {
|
|
1980
2005
|
density,
|
|
1981
2006
|
"data-slot": "menubar-label",
|
|
1982
2007
|
inset,
|
|
@@ -1985,7 +2010,7 @@ function MenubarLabel2({ density, className, inset, ...props }) {
|
|
|
1985
2010
|
});
|
|
1986
2011
|
}
|
|
1987
2012
|
function MenubarSeparator2({ density, className, ...props }) {
|
|
1988
|
-
return /* @__PURE__ */
|
|
2013
|
+
return /* @__PURE__ */ jsx20(MenuSeparator2, {
|
|
1989
2014
|
density,
|
|
1990
2015
|
"data-slot": "menubar-separator",
|
|
1991
2016
|
className: (state) => cn2("-mx-1 my-1 h-px bg-border", typeof className === "function" ? className(state) : className),
|
|
@@ -1993,7 +2018,7 @@ function MenubarSeparator2({ density, className, ...props }) {
|
|
|
1993
2018
|
});
|
|
1994
2019
|
}
|
|
1995
2020
|
function MenubarShortcut2({ density, className, ...props }) {
|
|
1996
|
-
return /* @__PURE__ */
|
|
2021
|
+
return /* @__PURE__ */ jsx20(MenuShortcut2, {
|
|
1997
2022
|
"data-density": density,
|
|
1998
2023
|
"data-slot": "menubar-shortcut",
|
|
1999
2024
|
className: cn2("ms-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
|
|
@@ -2001,13 +2026,13 @@ function MenubarShortcut2({ density, className, ...props }) {
|
|
|
2001
2026
|
});
|
|
2002
2027
|
}
|
|
2003
2028
|
function MenubarSub2({ ...props }) {
|
|
2004
|
-
return /* @__PURE__ */
|
|
2029
|
+
return /* @__PURE__ */ jsx20(MenuSub2, {
|
|
2005
2030
|
"data-slot": "menubar-sub",
|
|
2006
2031
|
...props
|
|
2007
2032
|
});
|
|
2008
2033
|
}
|
|
2009
2034
|
function MenubarSubTrigger2({ density, className, inset, ...props }) {
|
|
2010
|
-
return /* @__PURE__ */
|
|
2035
|
+
return /* @__PURE__ */ jsx20(MenuSubTrigger2, {
|
|
2011
2036
|
density,
|
|
2012
2037
|
"data-slot": "menubar-sub-trigger",
|
|
2013
2038
|
inset,
|
|
@@ -2016,7 +2041,7 @@ function MenubarSubTrigger2({ density, className, inset, ...props }) {
|
|
|
2016
2041
|
});
|
|
2017
2042
|
}
|
|
2018
2043
|
function MenubarSubContent2({ density, className, ...props }) {
|
|
2019
|
-
return /* @__PURE__ */
|
|
2044
|
+
return /* @__PURE__ */ jsx20(MenuSubContent2, {
|
|
2020
2045
|
density,
|
|
2021
2046
|
"data-slot": "menubar-sub-content",
|
|
2022
2047
|
className: (state) => cn2(" min-w-32 rounded-sm bg-popover p-1 text-popover-foreground shadow-frame border border-frame-edge border border-frame-edge shadow-frame duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 ", typeof className === "function" ? className(state) : className),
|
|
@@ -2027,7 +2052,7 @@ function MenubarSubContent2({ density, className, ...props }) {
|
|
|
2027
2052
|
import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
|
|
2028
2053
|
import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
|
|
2029
2054
|
import { cva as cva3 } from "class-variance-authority";
|
|
2030
|
-
import { jsx as
|
|
2055
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2031
2056
|
function NavigationMenu2({
|
|
2032
2057
|
analytics,
|
|
2033
2058
|
density,
|
|
@@ -2038,7 +2063,7 @@ function NavigationMenu2({
|
|
|
2038
2063
|
}) {
|
|
2039
2064
|
const trackedOnValueChange = useAnalyticsCallback("NavigationMenu", analytics, { name: "ui.change-request" }, props.onValueChange);
|
|
2040
2065
|
const resolvedDensity = useDensity(density);
|
|
2041
|
-
return /* @__PURE__ */
|
|
2066
|
+
return /* @__PURE__ */ jsxs14(NavigationMenuPrimitive.Root, {
|
|
2042
2067
|
"data-density": resolvedDensity,
|
|
2043
2068
|
"data-slot": "navigation-menu",
|
|
2044
2069
|
className: (state) => cn2("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", typeof className === "function" ? className(state) : className),
|
|
@@ -2046,7 +2071,7 @@ function NavigationMenu2({
|
|
|
2046
2071
|
onValueChange: trackedOnValueChange,
|
|
2047
2072
|
children: [
|
|
2048
2073
|
children,
|
|
2049
|
-
/* @__PURE__ */
|
|
2074
|
+
/* @__PURE__ */ jsx21(NavigationMenuPositioner2, {
|
|
2050
2075
|
density: resolvedDensity,
|
|
2051
2076
|
align
|
|
2052
2077
|
})
|
|
@@ -2054,7 +2079,7 @@ function NavigationMenu2({
|
|
|
2054
2079
|
});
|
|
2055
2080
|
}
|
|
2056
2081
|
function NavigationMenuList2({ density, className, ...props }) {
|
|
2057
|
-
return /* @__PURE__ */
|
|
2082
|
+
return /* @__PURE__ */ jsx21(NavigationMenuPrimitive.List, {
|
|
2058
2083
|
"data-density": density,
|
|
2059
2084
|
"data-slot": "navigation-menu-list",
|
|
2060
2085
|
className: (state) => cn2("group flex flex-1 list-none items-center justify-center gap-0", typeof className === "function" ? className(state) : className),
|
|
@@ -2062,7 +2087,7 @@ function NavigationMenuList2({ density, className, ...props }) {
|
|
|
2062
2087
|
});
|
|
2063
2088
|
}
|
|
2064
2089
|
function NavigationMenuItem2({ density, className, ...props }) {
|
|
2065
|
-
return /* @__PURE__ */
|
|
2090
|
+
return /* @__PURE__ */ jsx21(NavigationMenuPrimitive.Item, {
|
|
2066
2091
|
"data-density": density,
|
|
2067
2092
|
"data-slot": "navigation-menu-item",
|
|
2068
2093
|
className: (state) => cn2("relative", typeof className === "function" ? className(state) : className),
|
|
@@ -2071,7 +2096,7 @@ function NavigationMenuItem2({ density, className, ...props }) {
|
|
|
2071
2096
|
}
|
|
2072
2097
|
var navigationMenuTriggerStyle2 = cva3("group/navigation-menu-trigger inline-flex h-control-lg w-max items-center justify-center rounded-sm px-control-x py-1.5 text-sm font-medium transition-colors outline-none hover:bg-muted focus:bg-muted focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");
|
|
2073
2098
|
function NavigationMenuTrigger2({ density, className, children, ...props }) {
|
|
2074
|
-
return /* @__PURE__ */
|
|
2099
|
+
return /* @__PURE__ */ jsxs14(NavigationMenuPrimitive.Trigger, {
|
|
2075
2100
|
"data-density": density,
|
|
2076
2101
|
"data-slot": "navigation-menu-trigger",
|
|
2077
2102
|
className: (state) => cn2(navigationMenuTriggerStyle2(), "group", typeof className === "function" ? className(state) : className),
|
|
@@ -2079,12 +2104,12 @@ function NavigationMenuTrigger2({ density, className, children, ...props }) {
|
|
|
2079
2104
|
children: [
|
|
2080
2105
|
children,
|
|
2081
2106
|
" ",
|
|
2082
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ jsx21(NavigationMenuIndicator2, {})
|
|
2083
2108
|
]
|
|
2084
2109
|
});
|
|
2085
2110
|
}
|
|
2086
2111
|
function NavigationMenuContent2({ density, className, ...props }) {
|
|
2087
|
-
return /* @__PURE__ */
|
|
2112
|
+
return /* @__PURE__ */ jsx21(NavigationMenuPrimitive.Content, {
|
|
2088
2113
|
"data-density": density,
|
|
2089
2114
|
"data-slot": "navigation-menu-content",
|
|
2090
2115
|
className: (state) => cn2("data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-ending-style:opacity-0 data-starting-style:opacity-0 ", typeof className === "function" ? className(state) : className),
|
|
@@ -2104,12 +2129,12 @@ function NavigationMenuPositioner2({
|
|
|
2104
2129
|
const direction = useDirection2();
|
|
2105
2130
|
const container = usePortalContainer2();
|
|
2106
2131
|
const portal = usePortalNode();
|
|
2107
|
-
return /* @__PURE__ */
|
|
2132
|
+
return /* @__PURE__ */ jsx21(NavigationMenuPrimitive.Portal, {
|
|
2108
2133
|
container,
|
|
2109
2134
|
ref: portal.ref,
|
|
2110
|
-
children: /* @__PURE__ */
|
|
2135
|
+
children: /* @__PURE__ */ jsx21(PortalProvider2, {
|
|
2111
2136
|
container: portal.node,
|
|
2112
|
-
children: /* @__PURE__ */
|
|
2137
|
+
children: /* @__PURE__ */ jsx21(NavigationMenuPrimitive.Positioner, {
|
|
2113
2138
|
dir: direction,
|
|
2114
2139
|
side,
|
|
2115
2140
|
sideOffset,
|
|
@@ -2117,11 +2142,11 @@ function NavigationMenuPositioner2({
|
|
|
2117
2142
|
alignOffset,
|
|
2118
2143
|
className: (state) => cn2("isolate h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", typeof className === "function" ? className(state) : className),
|
|
2119
2144
|
...props,
|
|
2120
|
-
children: /* @__PURE__ */
|
|
2145
|
+
children: /* @__PURE__ */ jsx21(NavigationMenuPrimitive.Popup, {
|
|
2121
2146
|
"data-density": resolvedDensity,
|
|
2122
2147
|
"data-slot": "navigation-menu-popup",
|
|
2123
2148
|
className: "data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-sm bg-popover text-popover-foreground border border-frame-edge shadow-frame transition-[opacity,transform,width,height,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:opacity-0",
|
|
2124
|
-
children: /* @__PURE__ */
|
|
2149
|
+
children: /* @__PURE__ */ jsx21(NavigationMenuPrimitive.Viewport, {
|
|
2125
2150
|
className: "relative size-full overflow-hidden"
|
|
2126
2151
|
})
|
|
2127
2152
|
})
|
|
@@ -2131,7 +2156,7 @@ function NavigationMenuPositioner2({
|
|
|
2131
2156
|
}
|
|
2132
2157
|
function NavigationMenuLink2({ analytics, density, className, ...props }) {
|
|
2133
2158
|
const trackedOnClick = useAnalyticsCallback("NavigationMenuLink", analytics, { name: "ui.activate" }, props.onClick);
|
|
2134
|
-
return /* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ jsx21(NavigationMenuPrimitive.Link, {
|
|
2135
2160
|
"data-density": density,
|
|
2136
2161
|
"data-slot": "navigation-menu-link",
|
|
2137
2162
|
className: (state) => cn2("flex items-center gap-2 rounded-sm p-2 text-sm transition-colors outline-none hover:bg-muted focus:bg-muted focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
|
|
@@ -2145,32 +2170,32 @@ function NavigationMenuIndicator2({
|
|
|
2145
2170
|
children,
|
|
2146
2171
|
...props
|
|
2147
2172
|
}) {
|
|
2148
|
-
return /* @__PURE__ */
|
|
2173
|
+
return /* @__PURE__ */ jsx21(NavigationMenuPrimitive.Icon, {
|
|
2149
2174
|
"data-density": density,
|
|
2150
2175
|
"data-slot": "navigation-menu-indicator",
|
|
2151
2176
|
className: (state) => cn2("ms-1 inline-flex size-3 shrink-0 items-center justify-center transition-transform duration-120 data-popup-open:rotate-180 [&_svg]:size-full", typeof className === "function" ? className(state) : className),
|
|
2152
2177
|
...props,
|
|
2153
|
-
children: children ?? /* @__PURE__ */
|
|
2178
|
+
children: children ?? /* @__PURE__ */ jsx21(ChevronDownIcon3, {})
|
|
2154
2179
|
});
|
|
2155
2180
|
}
|
|
2156
2181
|
// src/components/Toast.tsx
|
|
2157
2182
|
import { Toast as ToastPrimitive } from "@base-ui/react/toast";
|
|
2158
2183
|
import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, LoaderCircleIcon, XIcon } from "lucide-react";
|
|
2159
|
-
import { jsx as
|
|
2184
|
+
import { jsx as jsx22, jsxs as jsxs15, Fragment as Fragment4 } from "react/jsx-runtime";
|
|
2160
2185
|
function ToastProvider2(props) {
|
|
2161
|
-
return /* @__PURE__ */
|
|
2186
|
+
return /* @__PURE__ */ jsx22(ToastPrimitive.Provider, {
|
|
2162
2187
|
...props
|
|
2163
2188
|
});
|
|
2164
2189
|
}
|
|
2165
2190
|
function ToastPortal2({ container, ref, children, ...props }) {
|
|
2166
2191
|
const resolvedContainer = usePortalContainer2(container);
|
|
2167
2192
|
const portal = usePortalNode(ref);
|
|
2168
|
-
return /* @__PURE__ */
|
|
2193
|
+
return /* @__PURE__ */ jsx22(ToastPrimitive.Portal, {
|
|
2169
2194
|
"data-slot": "toast-portal",
|
|
2170
2195
|
container: resolvedContainer,
|
|
2171
2196
|
ref: portal.ref,
|
|
2172
2197
|
...props,
|
|
2173
|
-
children: /* @__PURE__ */
|
|
2198
|
+
children: /* @__PURE__ */ jsx22(PortalProvider2, {
|
|
2174
2199
|
container: portal.node,
|
|
2175
2200
|
children
|
|
2176
2201
|
})
|
|
@@ -2179,7 +2204,7 @@ function ToastPortal2({ container, ref, children, ...props }) {
|
|
|
2179
2204
|
function ToastViewport2({ density, dir, className, ...props }) {
|
|
2180
2205
|
const resolvedDensity = useDensity(density);
|
|
2181
2206
|
const inheritedDirection = useDirection2();
|
|
2182
|
-
return /* @__PURE__ */
|
|
2207
|
+
return /* @__PURE__ */ jsx22(ToastPrimitive.Viewport, {
|
|
2183
2208
|
dir: dir ?? inheritedDirection,
|
|
2184
2209
|
"data-density": resolvedDensity,
|
|
2185
2210
|
"data-slot": "toast-viewport",
|
|
@@ -2188,7 +2213,7 @@ function ToastViewport2({ density, dir, className, ...props }) {
|
|
|
2188
2213
|
});
|
|
2189
2214
|
}
|
|
2190
2215
|
function Toast2({ density, className, ...props }) {
|
|
2191
|
-
return /* @__PURE__ */
|
|
2216
|
+
return /* @__PURE__ */ jsx22(ToastPrimitive.Root, {
|
|
2192
2217
|
"data-density": density,
|
|
2193
2218
|
"data-slot": "toast",
|
|
2194
2219
|
className: (state) => cn2("group/toast pointer-events-auto absolute right-0 bottom-0 w-full rounded-md border border-frame-edge bg-popover text-popover-foreground shadow-frame outline-none select-none focus-visible:ring-1 focus-visible:ring-ring [--offset-y:calc(var(--toast-offset-y)*-1-var(--toast-index)*var(--spacing-panel))] [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--offset-y)+var(--toast-swipe-movement-y)))] transition-[transform,opacity] duration-120 ease-out data-limited:opacity-0 data-starting-style:opacity-0 data-ending-style:opacity-0 motion-reduce:transition-none", typeof className === "function" ? className(state) : className),
|
|
@@ -2196,21 +2221,21 @@ function Toast2({ density, className, ...props }) {
|
|
|
2196
2221
|
});
|
|
2197
2222
|
}
|
|
2198
2223
|
function ToastContent2({ className, ...props }) {
|
|
2199
|
-
return /* @__PURE__ */
|
|
2224
|
+
return /* @__PURE__ */ jsx22(ToastPrimitive.Content, {
|
|
2200
2225
|
"data-slot": "toast-content",
|
|
2201
2226
|
className: (state) => cn2("flex items-center gap-control-gap p-panel", typeof className === "function" ? className(state) : className),
|
|
2202
2227
|
...props
|
|
2203
2228
|
});
|
|
2204
2229
|
}
|
|
2205
2230
|
function ToastTitle2({ className, ...props }) {
|
|
2206
|
-
return /* @__PURE__ */
|
|
2231
|
+
return /* @__PURE__ */ jsx22(ToastPrimitive.Title, {
|
|
2207
2232
|
"data-slot": "toast-title",
|
|
2208
2233
|
className: (state) => cn2("text-sm font-medium", typeof className === "function" ? className(state) : className),
|
|
2209
2234
|
...props
|
|
2210
2235
|
});
|
|
2211
2236
|
}
|
|
2212
2237
|
function ToastDescription2({ className, ...props }) {
|
|
2213
|
-
return /* @__PURE__ */
|
|
2238
|
+
return /* @__PURE__ */ jsx22(ToastPrimitive.Description, {
|
|
2214
2239
|
"data-slot": "toast-description",
|
|
2215
2240
|
className: (state) => cn2("text-sm text-muted-foreground", typeof className === "function" ? className(state) : className),
|
|
2216
2241
|
...props
|
|
@@ -2219,14 +2244,14 @@ function ToastDescription2({ className, ...props }) {
|
|
|
2219
2244
|
function ToastAction2({
|
|
2220
2245
|
analytics,
|
|
2221
2246
|
className,
|
|
2222
|
-
render = /* @__PURE__ */
|
|
2247
|
+
render = /* @__PURE__ */ jsx22(Button2, {
|
|
2223
2248
|
variant: "outline",
|
|
2224
2249
|
size: "sm"
|
|
2225
2250
|
}),
|
|
2226
2251
|
...props
|
|
2227
2252
|
}) {
|
|
2228
2253
|
const trackedOnClick = useAnalyticsCallback("ToastAction", analytics, { name: "ui.activate" }, props.onClick);
|
|
2229
|
-
return /* @__PURE__ */
|
|
2254
|
+
return /* @__PURE__ */ jsx22(ToastPrimitive.Action, {
|
|
2230
2255
|
"data-slot": "toast-action",
|
|
2231
2256
|
render,
|
|
2232
2257
|
className: (state) => cn2("shrink-0", typeof className === "function" ? className(state) : className),
|
|
@@ -2238,21 +2263,21 @@ function ToastClose2({
|
|
|
2238
2263
|
analytics,
|
|
2239
2264
|
className,
|
|
2240
2265
|
children,
|
|
2241
|
-
render = /* @__PURE__ */
|
|
2266
|
+
render = /* @__PURE__ */ jsx22(Button2, {
|
|
2242
2267
|
variant: "ghost",
|
|
2243
2268
|
size: "icon-sm"
|
|
2244
2269
|
}),
|
|
2245
2270
|
...props
|
|
2246
2271
|
}) {
|
|
2247
2272
|
const trackedOnClick = useAnalyticsCallback("ToastClose", analytics, { name: "ui.activate" }, props.onClick);
|
|
2248
|
-
return /* @__PURE__ */
|
|
2273
|
+
return /* @__PURE__ */ jsx22(ToastPrimitive.Close, {
|
|
2249
2274
|
"data-slot": "toast-close",
|
|
2250
2275
|
"aria-label": "Close toast",
|
|
2251
2276
|
render,
|
|
2252
2277
|
className: (state) => cn2("relative shrink-0 text-muted-foreground hover:text-foreground", typeof className === "function" ? className(state) : className),
|
|
2253
2278
|
...props,
|
|
2254
2279
|
onClick: trackedOnClick,
|
|
2255
|
-
children: children ?? /* @__PURE__ */
|
|
2280
|
+
children: children ?? /* @__PURE__ */ jsx22(XIcon, {
|
|
2256
2281
|
"aria-hidden": "true"
|
|
2257
2282
|
})
|
|
2258
2283
|
});
|
|
@@ -2260,24 +2285,24 @@ function ToastClose2({
|
|
|
2260
2285
|
function ToastIcon({ type }) {
|
|
2261
2286
|
switch (type) {
|
|
2262
2287
|
case "success":
|
|
2263
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ jsx22(CircleCheckIcon, {
|
|
2264
2289
|
"aria-hidden": "true"
|
|
2265
2290
|
});
|
|
2266
2291
|
case "info":
|
|
2267
|
-
return /* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ jsx22(InfoIcon, {
|
|
2268
2293
|
"aria-hidden": "true"
|
|
2269
2294
|
});
|
|
2270
2295
|
case "warning":
|
|
2271
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ jsx22(TriangleAlertIcon, {
|
|
2272
2297
|
"aria-hidden": "true"
|
|
2273
2298
|
});
|
|
2274
2299
|
case "error":
|
|
2275
|
-
return /* @__PURE__ */
|
|
2300
|
+
return /* @__PURE__ */ jsx22(OctagonXIcon, {
|
|
2276
2301
|
"aria-hidden": "true",
|
|
2277
2302
|
className: "text-destructive"
|
|
2278
2303
|
});
|
|
2279
2304
|
case "loading":
|
|
2280
|
-
return /* @__PURE__ */
|
|
2305
|
+
return /* @__PURE__ */ jsx22(LoaderCircleIcon, {
|
|
2281
2306
|
"aria-hidden": "true",
|
|
2282
2307
|
className: "animate-spin motion-reduce:animate-none"
|
|
2283
2308
|
});
|
|
@@ -2287,41 +2312,41 @@ function ToastIcon({ type }) {
|
|
|
2287
2312
|
}
|
|
2288
2313
|
function ToastList() {
|
|
2289
2314
|
const { toasts } = ToastPrimitive.useToastManager();
|
|
2290
|
-
return /* @__PURE__ */
|
|
2291
|
-
children: toasts.map((toastItem) => /* @__PURE__ */
|
|
2315
|
+
return /* @__PURE__ */ jsx22(Fragment4, {
|
|
2316
|
+
children: toasts.map((toastItem) => /* @__PURE__ */ jsx22(Toast2, {
|
|
2292
2317
|
toast: toastItem,
|
|
2293
|
-
children: /* @__PURE__ */
|
|
2318
|
+
children: /* @__PURE__ */ jsxs15(ToastContent2, {
|
|
2294
2319
|
children: [
|
|
2295
|
-
/* @__PURE__ */
|
|
2320
|
+
/* @__PURE__ */ jsx22("span", {
|
|
2296
2321
|
"data-slot": "toast-icon",
|
|
2297
2322
|
className: "shrink-0 empty:hidden [&_svg]:size-4",
|
|
2298
|
-
children: /* @__PURE__ */
|
|
2323
|
+
children: /* @__PURE__ */ jsx22(ToastIcon, {
|
|
2299
2324
|
type: toastItem.type
|
|
2300
2325
|
})
|
|
2301
2326
|
}),
|
|
2302
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ jsxs15("div", {
|
|
2303
2328
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
2304
2329
|
children: [
|
|
2305
|
-
/* @__PURE__ */
|
|
2306
|
-
/* @__PURE__ */
|
|
2330
|
+
/* @__PURE__ */ jsx22(ToastTitle2, {}),
|
|
2331
|
+
/* @__PURE__ */ jsx22(ToastDescription2, {})
|
|
2307
2332
|
]
|
|
2308
2333
|
}),
|
|
2309
|
-
/* @__PURE__ */
|
|
2310
|
-
/* @__PURE__ */
|
|
2334
|
+
/* @__PURE__ */ jsx22(ToastAction2, {}),
|
|
2335
|
+
/* @__PURE__ */ jsx22(ToastClose2, {})
|
|
2311
2336
|
]
|
|
2312
2337
|
})
|
|
2313
2338
|
}, toastItem.id))
|
|
2314
2339
|
});
|
|
2315
2340
|
}
|
|
2316
2341
|
function ToastToaster2({ children, density, ...props }) {
|
|
2317
|
-
return /* @__PURE__ */
|
|
2342
|
+
return /* @__PURE__ */ jsxs15(ToastProvider2, {
|
|
2318
2343
|
...props,
|
|
2319
2344
|
children: [
|
|
2320
2345
|
children,
|
|
2321
|
-
/* @__PURE__ */
|
|
2322
|
-
children: /* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ jsx22(ToastPortal2, {
|
|
2347
|
+
children: /* @__PURE__ */ jsx22(ToastViewport2, {
|
|
2323
2348
|
density,
|
|
2324
|
-
children: /* @__PURE__ */
|
|
2349
|
+
children: /* @__PURE__ */ jsx22(ToastList, {})
|
|
2325
2350
|
})
|
|
2326
2351
|
})
|
|
2327
2352
|
]
|
|
@@ -2337,7 +2362,7 @@ function useToastManager2() {
|
|
|
2337
2362
|
import { mergeProps as mergeProps6 } from "@base-ui/react/merge-props";
|
|
2338
2363
|
import { useRender as useRender6 } from "@base-ui/react/use-render";
|
|
2339
2364
|
import { cva as cva4 } from "class-variance-authority";
|
|
2340
|
-
import { jsx as
|
|
2365
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2341
2366
|
var markerVariants2 = cva4("group/marker relative flex min-h-4 w-full items-center gap-control-gap text-start text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground [&:is(a,button)]:outline-none [&:is(a,button)]:focus-visible:outline-1 [&:is(a,button)]:focus-visible:outline-ring", {
|
|
2342
2367
|
variants: {
|
|
2343
2368
|
variant: {
|
|
@@ -2356,7 +2381,7 @@ function Marker2({ density, className, variant = "default", render, ...props })
|
|
|
2356
2381
|
});
|
|
2357
2382
|
}
|
|
2358
2383
|
function MarkerIcon2({ density, className, ...props }) {
|
|
2359
|
-
return /* @__PURE__ */
|
|
2384
|
+
return /* @__PURE__ */ jsx23("span", {
|
|
2360
2385
|
"data-density": density,
|
|
2361
2386
|
"data-slot": "marker-icon",
|
|
2362
2387
|
"aria-hidden": "true",
|
|
@@ -2365,7 +2390,7 @@ function MarkerIcon2({ density, className, ...props }) {
|
|
|
2365
2390
|
});
|
|
2366
2391
|
}
|
|
2367
2392
|
function MarkerContent2({ density, className, ...props }) {
|
|
2368
|
-
return /* @__PURE__ */
|
|
2393
|
+
return /* @__PURE__ */ jsx23("span", {
|
|
2369
2394
|
"data-density": density,
|
|
2370
2395
|
"data-slot": "marker-content",
|
|
2371
2396
|
className: cn2("min-w-0 wrap-break-word group-data-[variant=separator]/marker:text-center [&>a]:underline [&>a]:underline-offset-3 [&>a:hover]:text-foreground", className),
|
|
@@ -2376,9 +2401,9 @@ function MarkerContent2({ density, className, ...props }) {
|
|
|
2376
2401
|
import { mergeProps as mergeProps7 } from "@base-ui/react/merge-props";
|
|
2377
2402
|
import { useRender as useRender7 } from "@base-ui/react/use-render";
|
|
2378
2403
|
import { cva as cva5 } from "class-variance-authority";
|
|
2379
|
-
import { jsx as
|
|
2404
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2380
2405
|
function BubbleGroup2({ density, className, ...props }) {
|
|
2381
|
-
return /* @__PURE__ */
|
|
2406
|
+
return /* @__PURE__ */ jsx24("div", {
|
|
2382
2407
|
"data-density": density,
|
|
2383
2408
|
"data-slot": "bubble-group",
|
|
2384
2409
|
className: cn2("flex min-w-0 flex-col gap-control-gap", className),
|
|
@@ -2400,7 +2425,7 @@ var bubbleVariants = cva5("group/bubble relative flex w-fit max-w-[80%] min-w-0
|
|
|
2400
2425
|
defaultVariants: { variant: "default" }
|
|
2401
2426
|
});
|
|
2402
2427
|
function Bubble2({ density, variant = "default", align = "start", className, ...props }) {
|
|
2403
|
-
return /* @__PURE__ */
|
|
2428
|
+
return /* @__PURE__ */ jsx24("div", {
|
|
2404
2429
|
"data-density": density,
|
|
2405
2430
|
"data-slot": "bubble",
|
|
2406
2431
|
"data-variant": variant,
|
|
@@ -2433,7 +2458,7 @@ function BubbleReactions2({
|
|
|
2433
2458
|
className,
|
|
2434
2459
|
...props
|
|
2435
2460
|
}) {
|
|
2436
|
-
return /* @__PURE__ */
|
|
2461
|
+
return /* @__PURE__ */ jsx24("div", {
|
|
2437
2462
|
"data-density": density,
|
|
2438
2463
|
"data-slot": "bubble-reactions",
|
|
2439
2464
|
"data-align": align,
|
|
@@ -2447,13 +2472,13 @@ import { useContext as useContext2, useLayoutEffect, useMemo as useMemo3, useRef
|
|
|
2447
2472
|
import { useRender as useRender8 } from "@base-ui/react/use-render";
|
|
2448
2473
|
|
|
2449
2474
|
// src/message/MessageContext.ts
|
|
2450
|
-
import { createContext as
|
|
2451
|
-
var MessageContext =
|
|
2475
|
+
import { createContext as createContext3 } from "react";
|
|
2476
|
+
var MessageContext = createContext3(null);
|
|
2452
2477
|
|
|
2453
2478
|
// src/components/Message.tsx
|
|
2454
|
-
import { jsx as
|
|
2479
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2455
2480
|
function MessageGroup2({ density, className, ...props }) {
|
|
2456
|
-
return /* @__PURE__ */
|
|
2481
|
+
return /* @__PURE__ */ jsx25("div", {
|
|
2457
2482
|
"data-density": density,
|
|
2458
2483
|
"data-slot": "message-group",
|
|
2459
2484
|
className: cn2("flex min-w-0 flex-col gap-control-gap", className),
|
|
@@ -2464,9 +2489,9 @@ function Message2({ density, className, align = "start", style, ...props }) {
|
|
|
2464
2489
|
const [footerOffset, setFooterOffset] = useState(0);
|
|
2465
2490
|
const context = useMemo3(() => ({ setFooterOffset }), []);
|
|
2466
2491
|
const messageStyle = { ...style, "--message-footer-offset": `${footerOffset}px` };
|
|
2467
|
-
return /* @__PURE__ */
|
|
2492
|
+
return /* @__PURE__ */ jsx25(MessageContext.Provider, {
|
|
2468
2493
|
value: context,
|
|
2469
|
-
children: /* @__PURE__ */
|
|
2494
|
+
children: /* @__PURE__ */ jsx25("div", {
|
|
2470
2495
|
"data-density": density,
|
|
2471
2496
|
"data-slot": "message",
|
|
2472
2497
|
"data-align": align,
|
|
@@ -2477,7 +2502,7 @@ function Message2({ density, className, align = "start", style, ...props }) {
|
|
|
2477
2502
|
});
|
|
2478
2503
|
}
|
|
2479
2504
|
function MessageAvatar2({ density, className, ...props }) {
|
|
2480
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ jsx25("div", {
|
|
2481
2506
|
"data-density": density,
|
|
2482
2507
|
"data-slot": "message-avatar",
|
|
2483
2508
|
className: cn2("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-(--message-footer-offset)", className),
|
|
@@ -2485,7 +2510,7 @@ function MessageAvatar2({ density, className, ...props }) {
|
|
|
2485
2510
|
});
|
|
2486
2511
|
}
|
|
2487
2512
|
function MessageContent2({ density, className, ...props }) {
|
|
2488
|
-
return /* @__PURE__ */
|
|
2513
|
+
return /* @__PURE__ */ jsx25("div", {
|
|
2489
2514
|
"data-density": density,
|
|
2490
2515
|
"data-slot": "message-content",
|
|
2491
2516
|
className: cn2("flex w-full min-w-0 flex-col gap-control-gap wrap-break-word group-data-[align=end]/message:[&>[data-slot]:not([data-slot=message-header])]:self-end", className),
|
|
@@ -2493,7 +2518,7 @@ function MessageContent2({ density, className, ...props }) {
|
|
|
2493
2518
|
});
|
|
2494
2519
|
}
|
|
2495
2520
|
function MessageHeader2({ density, className, ...props }) {
|
|
2496
|
-
return /* @__PURE__ */
|
|
2521
|
+
return /* @__PURE__ */ jsx25("div", {
|
|
2497
2522
|
"data-density": density,
|
|
2498
2523
|
"data-slot": "message-header",
|
|
2499
2524
|
className: cn2("flex max-w-full min-w-0 items-center px-control-x text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", className),
|
|
@@ -2535,7 +2560,7 @@ function MessageFooter2({ density, className, ...props }) {
|
|
|
2535
2560
|
import { mergeProps as mergeProps8 } from "@base-ui/react/merge-props";
|
|
2536
2561
|
import { useRender as useRender9 } from "@base-ui/react/use-render";
|
|
2537
2562
|
import { cva as cva6 } from "class-variance-authority";
|
|
2538
|
-
import { jsx as
|
|
2563
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2539
2564
|
var attachmentVariants = cva6("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-md border bg-card text-card-foreground transition-colors motion-reduce:transition-none focus-within:ring-1 focus-within:ring-ring has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive data-[state=idle]:border-dashed", {
|
|
2540
2565
|
variants: {
|
|
2541
2566
|
size: {
|
|
@@ -2557,7 +2582,7 @@ function Attachment2({
|
|
|
2557
2582
|
orientation = "horizontal",
|
|
2558
2583
|
...props
|
|
2559
2584
|
}) {
|
|
2560
|
-
return /* @__PURE__ */
|
|
2585
|
+
return /* @__PURE__ */ jsx26("div", {
|
|
2561
2586
|
"data-slot": "attachment",
|
|
2562
2587
|
"data-density": density,
|
|
2563
2588
|
"data-state": state,
|
|
@@ -2577,7 +2602,7 @@ var attachmentMediaVariants = cva6("relative flex aspect-square w-10 shrink-0 it
|
|
|
2577
2602
|
defaultVariants: { variant: "icon" }
|
|
2578
2603
|
});
|
|
2579
2604
|
function AttachmentMedia2({ density, className, variant = "icon", ...props }) {
|
|
2580
|
-
return /* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ jsx26("div", {
|
|
2581
2606
|
"data-slot": "attachment-media",
|
|
2582
2607
|
"data-density": density,
|
|
2583
2608
|
"data-variant": variant,
|
|
@@ -2586,7 +2611,7 @@ function AttachmentMedia2({ density, className, variant = "icon", ...props }) {
|
|
|
2586
2611
|
});
|
|
2587
2612
|
}
|
|
2588
2613
|
function AttachmentContent2({ density, className, ...props }) {
|
|
2589
|
-
return /* @__PURE__ */
|
|
2614
|
+
return /* @__PURE__ */ jsx26("div", {
|
|
2590
2615
|
"data-slot": "attachment-content",
|
|
2591
2616
|
"data-density": density,
|
|
2592
2617
|
className: cn2("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className),
|
|
@@ -2594,7 +2619,7 @@ function AttachmentContent2({ density, className, ...props }) {
|
|
|
2594
2619
|
});
|
|
2595
2620
|
}
|
|
2596
2621
|
function AttachmentTitle2({ density, className, ...props }) {
|
|
2597
|
-
return /* @__PURE__ */
|
|
2622
|
+
return /* @__PURE__ */ jsx26("span", {
|
|
2598
2623
|
"data-slot": "attachment-title",
|
|
2599
2624
|
"data-density": density,
|
|
2600
2625
|
className: cn2("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className),
|
|
@@ -2602,7 +2627,7 @@ function AttachmentTitle2({ density, className, ...props }) {
|
|
|
2602
2627
|
});
|
|
2603
2628
|
}
|
|
2604
2629
|
function AttachmentDescription2({ density, className, ...props }) {
|
|
2605
|
-
return /* @__PURE__ */
|
|
2630
|
+
return /* @__PURE__ */ jsx26("span", {
|
|
2606
2631
|
"data-slot": "attachment-description",
|
|
2607
2632
|
"data-density": density,
|
|
2608
2633
|
className: cn2("mt-0.5 block max-w-full min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive", className),
|
|
@@ -2610,7 +2635,7 @@ function AttachmentDescription2({ density, className, ...props }) {
|
|
|
2610
2635
|
});
|
|
2611
2636
|
}
|
|
2612
2637
|
function AttachmentActions2({ density, className, ...props }) {
|
|
2613
|
-
return /* @__PURE__ */
|
|
2638
|
+
return /* @__PURE__ */ jsx26("div", {
|
|
2614
2639
|
"data-slot": "attachment-actions",
|
|
2615
2640
|
"data-density": density,
|
|
2616
2641
|
className: cn2("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:end-3 group-data-[orientation=vertical]/attachment:gap-1", className),
|
|
@@ -2623,7 +2648,7 @@ function AttachmentAction2({
|
|
|
2623
2648
|
size = "icon-xs",
|
|
2624
2649
|
...props
|
|
2625
2650
|
}) {
|
|
2626
|
-
return /* @__PURE__ */
|
|
2651
|
+
return /* @__PURE__ */ jsx26(Button2, {
|
|
2627
2652
|
"data-slot": "attachment-action",
|
|
2628
2653
|
variant,
|
|
2629
2654
|
size,
|
|
@@ -2648,7 +2673,7 @@ function AttachmentTrigger2({
|
|
|
2648
2673
|
});
|
|
2649
2674
|
}
|
|
2650
2675
|
function AttachmentGroup2({ density, className, ...props }) {
|
|
2651
|
-
return /* @__PURE__ */
|
|
2676
|
+
return /* @__PURE__ */ jsx26("div", {
|
|
2652
2677
|
"data-slot": "attachment-group",
|
|
2653
2678
|
"data-density": density,
|
|
2654
2679
|
className: cn2("flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 no-scrollbar gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start", className),
|
|
@@ -2657,7 +2682,7 @@ function AttachmentGroup2({ density, className, ...props }) {
|
|
|
2657
2682
|
}
|
|
2658
2683
|
// src/components/InlineEdit.tsx
|
|
2659
2684
|
import { useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
|
|
2660
|
-
import { jsx as
|
|
2685
|
+
import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2661
2686
|
function InlineEdit2({
|
|
2662
2687
|
analytics,
|
|
2663
2688
|
label,
|
|
@@ -2665,6 +2690,8 @@ function InlineEdit2({
|
|
|
2665
2690
|
density,
|
|
2666
2691
|
isDisabled = false,
|
|
2667
2692
|
shouldSelectOnMount = true,
|
|
2693
|
+
hasChanges = true,
|
|
2694
|
+
renderError,
|
|
2668
2695
|
onValueChange,
|
|
2669
2696
|
onCommit,
|
|
2670
2697
|
onCancel
|
|
@@ -2674,7 +2701,7 @@ function InlineEdit2({
|
|
|
2674
2701
|
const isFinished = useRef2(false);
|
|
2675
2702
|
const shouldCancel = useRef2(false);
|
|
2676
2703
|
const [isSaving, setSaving] = useState2(false);
|
|
2677
|
-
const [error, setError] = useState2(
|
|
2704
|
+
const [error, setError] = useState2(null);
|
|
2678
2705
|
useEffect2(() => {
|
|
2679
2706
|
input.current?.focus();
|
|
2680
2707
|
if (shouldSelectOnMount)
|
|
@@ -2684,6 +2711,10 @@ function InlineEdit2({
|
|
|
2684
2711
|
if (isFinished.current || isDisabled)
|
|
2685
2712
|
return;
|
|
2686
2713
|
isFinished.current = true;
|
|
2714
|
+
if (!hasChanges) {
|
|
2715
|
+
onCancel();
|
|
2716
|
+
return;
|
|
2717
|
+
}
|
|
2687
2718
|
setSaving(true);
|
|
2688
2719
|
setError("");
|
|
2689
2720
|
try {
|
|
@@ -2691,19 +2722,19 @@ function InlineEdit2({
|
|
|
2691
2722
|
track({ name: "ui.commit" });
|
|
2692
2723
|
} catch (error) {
|
|
2693
2724
|
isFinished.current = false;
|
|
2694
|
-
setError(
|
|
2725
|
+
setError(renderError ? renderError(error) : "Could not save this edit.");
|
|
2695
2726
|
} finally {
|
|
2696
2727
|
setSaving(false);
|
|
2697
2728
|
}
|
|
2698
2729
|
};
|
|
2699
|
-
return /* @__PURE__ */
|
|
2730
|
+
return /* @__PURE__ */ jsxs16("form", {
|
|
2700
2731
|
className: "flex min-w-0 flex-col gap-1",
|
|
2701
2732
|
onSubmit: (event) => {
|
|
2702
2733
|
event.preventDefault();
|
|
2703
2734
|
save();
|
|
2704
2735
|
},
|
|
2705
2736
|
children: [
|
|
2706
|
-
/* @__PURE__ */
|
|
2737
|
+
/* @__PURE__ */ jsx27(Input2, {
|
|
2707
2738
|
analytics: false,
|
|
2708
2739
|
ref: input,
|
|
2709
2740
|
density,
|
|
@@ -2732,7 +2763,7 @@ function InlineEdit2({
|
|
|
2732
2763
|
}
|
|
2733
2764
|
}
|
|
2734
2765
|
}),
|
|
2735
|
-
error && /* @__PURE__ */
|
|
2766
|
+
error && /* @__PURE__ */ jsx27("p", {
|
|
2736
2767
|
role: "alert",
|
|
2737
2768
|
className: "text-xs text-destructive",
|
|
2738
2769
|
children: error
|
|
@@ -2743,7 +2774,7 @@ function InlineEdit2({
|
|
|
2743
2774
|
// src/components/StarRating.tsx
|
|
2744
2775
|
import { Radio } from "@base-ui/react/radio";
|
|
2745
2776
|
import { StarIcon, CircleOffIcon } from "lucide-react";
|
|
2746
|
-
import { jsx as
|
|
2777
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2747
2778
|
function StarRating2({
|
|
2748
2779
|
analytics,
|
|
2749
2780
|
label,
|
|
@@ -2752,7 +2783,7 @@ function StarRating2({
|
|
|
2752
2783
|
density,
|
|
2753
2784
|
onValueChange
|
|
2754
2785
|
}) {
|
|
2755
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ jsx28(RadioGroup2, {
|
|
2756
2787
|
analytics,
|
|
2757
2788
|
"aria-label": label,
|
|
2758
2789
|
value,
|
|
@@ -2760,20 +2791,20 @@ function StarRating2({
|
|
|
2760
2791
|
"data-density": density,
|
|
2761
2792
|
className: "inline-flex w-fit shrink-0 items-center gap-0.5",
|
|
2762
2793
|
onValueChange,
|
|
2763
|
-
children: [1, 2, 3, 4, 5, 0].map((star) => /* @__PURE__ */
|
|
2794
|
+
children: [1, 2, 3, 4, 5, 0].map((star) => /* @__PURE__ */ jsx28(Radio.Root, {
|
|
2764
2795
|
value: star,
|
|
2765
2796
|
nativeButton: true,
|
|
2766
|
-
render: /* @__PURE__ */
|
|
2797
|
+
render: /* @__PURE__ */ jsx28(AnalyticsButton, {
|
|
2767
2798
|
component: "StarRating",
|
|
2768
2799
|
type: "button"
|
|
2769
2800
|
}),
|
|
2770
2801
|
"aria-label": star === 0 ? "Unrated" : `${star} ${star === 1 ? "star" : "stars"}`,
|
|
2771
2802
|
title: star === 0 ? "Clear rating" : `${star} stars`,
|
|
2772
2803
|
className: "inline-flex size-5 shrink-0 items-center justify-center rounded-sm text-muted-foreground outline-none hover:text-primary focus-visible:ring-1 focus-visible:ring-ring data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
2773
|
-
children: star === 0 ? /* @__PURE__ */
|
|
2804
|
+
children: star === 0 ? /* @__PURE__ */ jsx28(CircleOffIcon, {
|
|
2774
2805
|
"aria-hidden": "true",
|
|
2775
2806
|
className: "size-3"
|
|
2776
|
-
}) : /* @__PURE__ */
|
|
2807
|
+
}) : /* @__PURE__ */ jsx28(StarIcon, {
|
|
2777
2808
|
"aria-hidden": "true",
|
|
2778
2809
|
className: star <= value ? "size-3.5 fill-primary text-primary" : "size-3.5"
|
|
2779
2810
|
})
|
|
@@ -2782,50 +2813,55 @@ function StarRating2({
|
|
|
2782
2813
|
}
|
|
2783
2814
|
// src/components/ConfirmationDialog.tsx
|
|
2784
2815
|
import { useState as useState3 } from "react";
|
|
2785
|
-
import { jsx as
|
|
2816
|
+
import { jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2786
2817
|
function ConfirmationDialog2({
|
|
2787
2818
|
open,
|
|
2788
2819
|
title,
|
|
2789
2820
|
description,
|
|
2790
2821
|
confirmLabel,
|
|
2791
2822
|
onOpenChange,
|
|
2792
|
-
onConfirm
|
|
2823
|
+
onConfirm,
|
|
2824
|
+
renderError
|
|
2793
2825
|
}) {
|
|
2794
2826
|
const [isPending, setPending] = useState3(false);
|
|
2795
|
-
const [error, setError] = useState3(
|
|
2796
|
-
return /* @__PURE__ */
|
|
2827
|
+
const [error, setError] = useState3(null);
|
|
2828
|
+
return /* @__PURE__ */ jsx29(AlertDialog2, {
|
|
2797
2829
|
open,
|
|
2798
|
-
onOpenChange: (next) => {
|
|
2799
|
-
if (
|
|
2830
|
+
onOpenChange: (next, details) => {
|
|
2831
|
+
if (isPending)
|
|
2832
|
+
details.cancel();
|
|
2833
|
+
else {
|
|
2800
2834
|
setError("");
|
|
2801
2835
|
onOpenChange(next);
|
|
2802
2836
|
}
|
|
2803
2837
|
},
|
|
2804
|
-
children: /* @__PURE__ */
|
|
2838
|
+
children: /* @__PURE__ */ jsxs17(AlertDialogContent2, {
|
|
2805
2839
|
children: [
|
|
2806
|
-
/* @__PURE__ */
|
|
2840
|
+
/* @__PURE__ */ jsx29(AlertDialogHeader2, {
|
|
2841
|
+
children: /* @__PURE__ */ jsx29(AlertDialogTitle2, {
|
|
2842
|
+
children: title
|
|
2843
|
+
})
|
|
2844
|
+
}),
|
|
2845
|
+
/* @__PURE__ */ jsxs17(ScrollArea2, {
|
|
2807
2846
|
children: [
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
children: title
|
|
2810
|
-
}),
|
|
2811
|
-
/* @__PURE__ */ jsx27(AlertDialogDescription2, {
|
|
2847
|
+
/* @__PURE__ */ jsx29(AlertDialogDescription2, {
|
|
2812
2848
|
children: description
|
|
2849
|
+
}),
|
|
2850
|
+
error && /* @__PURE__ */ jsx29(Alert2, {
|
|
2851
|
+
variant: "destructive",
|
|
2852
|
+
children: /* @__PURE__ */ jsx29(AlertDescription2, {
|
|
2853
|
+
children: error
|
|
2854
|
+
})
|
|
2813
2855
|
})
|
|
2814
2856
|
]
|
|
2815
2857
|
}),
|
|
2816
|
-
|
|
2817
|
-
variant: "destructive",
|
|
2818
|
-
children: /* @__PURE__ */ jsx27(AlertDescription2, {
|
|
2819
|
-
children: error
|
|
2820
|
-
})
|
|
2821
|
-
}),
|
|
2822
|
-
/* @__PURE__ */ jsxs16(AlertDialogFooter2, {
|
|
2858
|
+
/* @__PURE__ */ jsxs17(AlertDialogFooter2, {
|
|
2823
2859
|
children: [
|
|
2824
|
-
/* @__PURE__ */
|
|
2860
|
+
/* @__PURE__ */ jsx29(AlertDialogCancel2, {
|
|
2825
2861
|
disabled: isPending,
|
|
2826
2862
|
children: "Cancel"
|
|
2827
2863
|
}),
|
|
2828
|
-
/* @__PURE__ */
|
|
2864
|
+
/* @__PURE__ */ jsx29(Button2, {
|
|
2829
2865
|
variant: "destructive",
|
|
2830
2866
|
disabled: isPending,
|
|
2831
2867
|
onClick: async () => {
|
|
@@ -2835,7 +2871,7 @@ function ConfirmationDialog2({
|
|
|
2835
2871
|
await onConfirm();
|
|
2836
2872
|
onOpenChange(false);
|
|
2837
2873
|
} catch (error) {
|
|
2838
|
-
setError(
|
|
2874
|
+
setError(renderError ? renderError(error) : "The action could not be completed.");
|
|
2839
2875
|
} finally {
|
|
2840
2876
|
setPending(false);
|
|
2841
2877
|
}
|
|
@@ -2869,7 +2905,7 @@ function useObjectURL(file) {
|
|
|
2869
2905
|
}
|
|
2870
2906
|
|
|
2871
2907
|
// src/components/ImagePicker.tsx
|
|
2872
|
-
import { jsx as
|
|
2908
|
+
import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2873
2909
|
function ImagePicker2({
|
|
2874
2910
|
analytics,
|
|
2875
2911
|
src,
|
|
@@ -2883,27 +2919,27 @@ function ImagePicker2({
|
|
|
2883
2919
|
const input = useRef3(null);
|
|
2884
2920
|
const preview = useObjectURL(file);
|
|
2885
2921
|
const image = file === null ? undefined : preview ?? src;
|
|
2886
|
-
return /* @__PURE__ */
|
|
2922
|
+
return /* @__PURE__ */ jsxs18("figure", {
|
|
2887
2923
|
className: "flex min-w-0 flex-col items-center gap-3",
|
|
2888
2924
|
"aria-label": label,
|
|
2889
2925
|
children: [
|
|
2890
|
-
/* @__PURE__ */
|
|
2926
|
+
/* @__PURE__ */ jsxs18(Avatar2, {
|
|
2891
2927
|
size: "preview",
|
|
2892
2928
|
shape: "square",
|
|
2893
2929
|
children: [
|
|
2894
|
-
/* @__PURE__ */
|
|
2930
|
+
/* @__PURE__ */ jsx30(AvatarImage2, {
|
|
2895
2931
|
src: image,
|
|
2896
2932
|
alt: label
|
|
2897
2933
|
}),
|
|
2898
|
-
/* @__PURE__ */
|
|
2899
|
-
children: /* @__PURE__ */
|
|
2934
|
+
/* @__PURE__ */ jsx30(AvatarFallback2, {
|
|
2935
|
+
children: /* @__PURE__ */ jsx30(ImageIcon, {
|
|
2900
2936
|
className: "size-12",
|
|
2901
2937
|
"aria-hidden": "true"
|
|
2902
2938
|
})
|
|
2903
2939
|
})
|
|
2904
2940
|
]
|
|
2905
2941
|
}),
|
|
2906
|
-
/* @__PURE__ */
|
|
2942
|
+
/* @__PURE__ */ jsx30("input", {
|
|
2907
2943
|
ref: input,
|
|
2908
2944
|
hidden: true,
|
|
2909
2945
|
type: "file",
|
|
@@ -2919,22 +2955,22 @@ function ImagePicker2({
|
|
|
2919
2955
|
event.currentTarget.value = "";
|
|
2920
2956
|
}
|
|
2921
2957
|
}),
|
|
2922
|
-
/* @__PURE__ */
|
|
2958
|
+
/* @__PURE__ */ jsxs18("div", {
|
|
2923
2959
|
className: "flex flex-wrap justify-center gap-2",
|
|
2924
2960
|
children: [
|
|
2925
|
-
/* @__PURE__ */
|
|
2961
|
+
/* @__PURE__ */ jsxs18(Button2, {
|
|
2926
2962
|
type: "button",
|
|
2927
2963
|
variant: "outline",
|
|
2928
2964
|
disabled,
|
|
2929
2965
|
onClick: () => input.current?.click(),
|
|
2930
2966
|
children: [
|
|
2931
|
-
/* @__PURE__ */
|
|
2967
|
+
/* @__PURE__ */ jsx30(UploadIcon, {
|
|
2932
2968
|
"data-icon": "inline-start"
|
|
2933
2969
|
}),
|
|
2934
2970
|
"Upload image"
|
|
2935
2971
|
]
|
|
2936
2972
|
}),
|
|
2937
|
-
/* @__PURE__ */
|
|
2973
|
+
/* @__PURE__ */ jsx30(Button2, {
|
|
2938
2974
|
type: "button",
|
|
2939
2975
|
variant: "outline",
|
|
2940
2976
|
disabled: disabled || !image,
|
|
@@ -2948,9 +2984,9 @@ function ImagePicker2({
|
|
|
2948
2984
|
}
|
|
2949
2985
|
// src/components/Meter.tsx
|
|
2950
2986
|
import { Meter as MeterPrimitive } from "@base-ui/react/meter";
|
|
2951
|
-
import { jsx as
|
|
2987
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2952
2988
|
function Meter2({ density, className, ...props }) {
|
|
2953
|
-
return /* @__PURE__ */
|
|
2989
|
+
return /* @__PURE__ */ jsx31(MeterPrimitive.Root, {
|
|
2954
2990
|
"data-density": density,
|
|
2955
2991
|
"data-slot": "meter",
|
|
2956
2992
|
className: (state) => cn2("flex min-w-0 flex-wrap items-center gap-field-gap", typeof className === "function" ? className(state) : className),
|
|
@@ -2958,7 +2994,7 @@ function Meter2({ density, className, ...props }) {
|
|
|
2958
2994
|
});
|
|
2959
2995
|
}
|
|
2960
2996
|
function MeterLabel2({ density, className, ...props }) {
|
|
2961
|
-
return /* @__PURE__ */
|
|
2997
|
+
return /* @__PURE__ */ jsx31(MeterPrimitive.Label, {
|
|
2962
2998
|
"data-density": density,
|
|
2963
2999
|
"data-slot": "meter-label",
|
|
2964
3000
|
className: (state) => cn2("text-sm font-medium", typeof className === "function" ? className(state) : className),
|
|
@@ -2966,7 +3002,7 @@ function MeterLabel2({ density, className, ...props }) {
|
|
|
2966
3002
|
});
|
|
2967
3003
|
}
|
|
2968
3004
|
function MeterValue2({ density, className, ...props }) {
|
|
2969
|
-
return /* @__PURE__ */
|
|
3005
|
+
return /* @__PURE__ */ jsx31(MeterPrimitive.Value, {
|
|
2970
3006
|
"data-density": density,
|
|
2971
3007
|
"data-slot": "meter-value",
|
|
2972
3008
|
className: (state) => cn2("ms-auto text-sm text-muted-foreground tabular-nums", typeof className === "function" ? className(state) : className),
|
|
@@ -2974,7 +3010,7 @@ function MeterValue2({ density, className, ...props }) {
|
|
|
2974
3010
|
});
|
|
2975
3011
|
}
|
|
2976
3012
|
function MeterTrack2({ density, className, ...props }) {
|
|
2977
|
-
return /* @__PURE__ */
|
|
3013
|
+
return /* @__PURE__ */ jsx31(MeterPrimitive.Track, {
|
|
2978
3014
|
"data-density": density,
|
|
2979
3015
|
"data-slot": "meter-track",
|
|
2980
3016
|
className: (state) => cn2("h-1 w-full overflow-hidden rounded-sm bg-muted", typeof className === "function" ? className(state) : className),
|
|
@@ -2986,7 +3022,7 @@ function MeterIndicator2({
|
|
|
2986
3022
|
className,
|
|
2987
3023
|
...props
|
|
2988
3024
|
}) {
|
|
2989
|
-
return /* @__PURE__ */
|
|
3025
|
+
return /* @__PURE__ */ jsx31(MeterPrimitive.Indicator, {
|
|
2990
3026
|
"data-density": density,
|
|
2991
3027
|
"data-slot": "meter-indicator",
|
|
2992
3028
|
className: (state) => cn2("h-full bg-primary transition-[width] motion-reduce:transition-none", typeof className === "function" ? className(state) : className),
|
|
@@ -2995,10 +3031,10 @@ function MeterIndicator2({
|
|
|
2995
3031
|
}
|
|
2996
3032
|
// src/components/Stepper.tsx
|
|
2997
3033
|
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
2998
|
-
import { CheckIcon as
|
|
2999
|
-
import { jsx as
|
|
3034
|
+
import { CheckIcon as CheckIcon3 } from "lucide-react";
|
|
3035
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3000
3036
|
function Stepper2({ density, className, ...props }) {
|
|
3001
|
-
return /* @__PURE__ */
|
|
3037
|
+
return /* @__PURE__ */ jsx32(TabsPrimitive.Root, {
|
|
3002
3038
|
"data-density": density,
|
|
3003
3039
|
"data-slot": "stepper",
|
|
3004
3040
|
className: (state) => cn2("group/stepper flex min-w-0 flex-col gap-panel data-[orientation=vertical]:flex-row", typeof className === "function" ? className(state) : className),
|
|
@@ -3011,7 +3047,7 @@ function StepperList2({
|
|
|
3011
3047
|
activateOnFocus = false,
|
|
3012
3048
|
...props
|
|
3013
3049
|
}) {
|
|
3014
|
-
return /* @__PURE__ */
|
|
3050
|
+
return /* @__PURE__ */ jsx32(TabsPrimitive.List, {
|
|
3015
3051
|
"data-density": density,
|
|
3016
3052
|
"data-slot": "stepper-list",
|
|
3017
3053
|
activateOnFocus,
|
|
@@ -3020,7 +3056,7 @@ function StepperList2({
|
|
|
3020
3056
|
});
|
|
3021
3057
|
}
|
|
3022
3058
|
function StepperTrigger2({ density, className, ...props }) {
|
|
3023
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ jsx32(TabsPrimitive.Tab, {
|
|
3024
3060
|
"data-density": density,
|
|
3025
3061
|
"data-slot": "stepper-trigger",
|
|
3026
3062
|
className: (state) => cn2("group/step flex min-h-control items-center gap-control-gap rounded-sm text-sm text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring data-active:text-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:opacity-50", typeof className === "function" ? className(state) : className),
|
|
@@ -3028,17 +3064,17 @@ function StepperTrigger2({ density, className, ...props }) {
|
|
|
3028
3064
|
});
|
|
3029
3065
|
}
|
|
3030
3066
|
function StepperIndicator2({ completed = false, children, className, ...props }) {
|
|
3031
|
-
return /* @__PURE__ */
|
|
3067
|
+
return /* @__PURE__ */ jsx32("span", {
|
|
3032
3068
|
"aria-hidden": "true",
|
|
3033
3069
|
"data-slot": "stepper-indicator",
|
|
3034
3070
|
"data-completed": completed || undefined,
|
|
3035
3071
|
className: cn2("flex size-control shrink-0 items-center justify-center rounded-sm border border-input bg-secondary text-sm tabular-nums group-data-active/step:border-primary group-data-active/step:bg-primary group-data-active/step:text-primary-foreground data-completed:border-primary data-completed:text-primary [&_svg]:size-3.5", className),
|
|
3036
3072
|
...props,
|
|
3037
|
-
children: completed ? /* @__PURE__ */
|
|
3073
|
+
children: completed ? /* @__PURE__ */ jsx32(CheckIcon3, {}) : children
|
|
3038
3074
|
});
|
|
3039
3075
|
}
|
|
3040
3076
|
function StepperContent2({ density, className, ...props }) {
|
|
3041
|
-
return /* @__PURE__ */
|
|
3077
|
+
return /* @__PURE__ */ jsx32(TabsPrimitive.Panel, {
|
|
3042
3078
|
"data-density": density,
|
|
3043
3079
|
"data-slot": "stepper-content",
|
|
3044
3080
|
className: (state) => cn2("min-w-0 flex-1 outline-none focus-visible:ring-1 focus-visible:ring-ring", typeof className === "function" ? className(state) : className),
|
|
@@ -3046,7 +3082,7 @@ function StepperContent2({ density, className, ...props }) {
|
|
|
3046
3082
|
});
|
|
3047
3083
|
}
|
|
3048
3084
|
// src/components/AppShell.tsx
|
|
3049
|
-
import { jsx as
|
|
3085
|
+
import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3050
3086
|
function AppShell2({
|
|
3051
3087
|
navigation,
|
|
3052
3088
|
brand,
|
|
@@ -3059,28 +3095,28 @@ function AppShell2({
|
|
|
3059
3095
|
label = "Application",
|
|
3060
3096
|
density
|
|
3061
3097
|
}) {
|
|
3062
|
-
return /* @__PURE__ */
|
|
3098
|
+
return /* @__PURE__ */ jsxs19(SidebarProvider2, {
|
|
3063
3099
|
density,
|
|
3064
3100
|
defaultOpen: defaultSidebarOpen,
|
|
3065
3101
|
className: "relative min-h-0",
|
|
3066
3102
|
style: { height },
|
|
3067
3103
|
"data-scroll": "none",
|
|
3068
3104
|
children: [
|
|
3069
|
-
/* @__PURE__ */
|
|
3105
|
+
/* @__PURE__ */ jsxs19(Sidebar2, {
|
|
3070
3106
|
collapsible: "icon",
|
|
3071
3107
|
position: "container",
|
|
3072
3108
|
children: [
|
|
3073
|
-
/* @__PURE__ */
|
|
3109
|
+
/* @__PURE__ */ jsx33(SidebarHeader2, {
|
|
3074
3110
|
children: brand
|
|
3075
3111
|
}),
|
|
3076
|
-
/* @__PURE__ */
|
|
3077
|
-
children: /* @__PURE__ */
|
|
3112
|
+
/* @__PURE__ */ jsx33(SidebarContent2, {
|
|
3113
|
+
children: /* @__PURE__ */ jsx33("nav", {
|
|
3078
3114
|
"aria-label": "Primary navigation",
|
|
3079
|
-
children: /* @__PURE__ */
|
|
3080
|
-
children: /* @__PURE__ */
|
|
3081
|
-
children: navigation.map((item) => /* @__PURE__ */
|
|
3082
|
-
children: /* @__PURE__ */
|
|
3083
|
-
render: /* @__PURE__ */
|
|
3115
|
+
children: /* @__PURE__ */ jsx33(SidebarGroup2, {
|
|
3116
|
+
children: /* @__PURE__ */ jsx33(SidebarMenu2, {
|
|
3117
|
+
children: navigation.map((item) => /* @__PURE__ */ jsx33(SidebarMenuItem2, {
|
|
3118
|
+
children: /* @__PURE__ */ jsxs19(SidebarMenuButton2, {
|
|
3119
|
+
render: /* @__PURE__ */ jsx33(AnalyticsLink, {
|
|
3084
3120
|
component: "AppShell",
|
|
3085
3121
|
href: item.href,
|
|
3086
3122
|
"aria-current": item.active ? "page" : undefined
|
|
@@ -3089,7 +3125,7 @@ function AppShell2({
|
|
|
3089
3125
|
tooltip: item.label,
|
|
3090
3126
|
children: [
|
|
3091
3127
|
item.icon,
|
|
3092
|
-
/* @__PURE__ */
|
|
3128
|
+
/* @__PURE__ */ jsx33("span", {
|
|
3093
3129
|
children: item.label
|
|
3094
3130
|
})
|
|
3095
3131
|
]
|
|
@@ -3099,36 +3135,36 @@ function AppShell2({
|
|
|
3099
3135
|
})
|
|
3100
3136
|
})
|
|
3101
3137
|
}),
|
|
3102
|
-
sidebarFooter && /* @__PURE__ */
|
|
3138
|
+
sidebarFooter && /* @__PURE__ */ jsx33(SidebarFooter2, {
|
|
3103
3139
|
children: sidebarFooter
|
|
3104
3140
|
})
|
|
3105
3141
|
]
|
|
3106
3142
|
}),
|
|
3107
|
-
/* @__PURE__ */
|
|
3143
|
+
/* @__PURE__ */ jsxs19(SidebarInset2, {
|
|
3108
3144
|
"aria-label": label,
|
|
3109
3145
|
className: "min-h-0 min-w-0",
|
|
3110
3146
|
"data-scroll": "none",
|
|
3111
3147
|
children: [
|
|
3112
|
-
/* @__PURE__ */
|
|
3148
|
+
/* @__PURE__ */ jsxs19("header", {
|
|
3113
3149
|
"data-scroll": "none",
|
|
3114
3150
|
className: "flex shrink-0 items-center gap-control-gap border-b border-border p-panel",
|
|
3115
3151
|
children: [
|
|
3116
|
-
/* @__PURE__ */
|
|
3117
|
-
/* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ jsx33(SidebarTrigger2, {}),
|
|
3153
|
+
/* @__PURE__ */ jsx33(Separator2, {
|
|
3118
3154
|
orientation: "vertical",
|
|
3119
3155
|
className: "h-control"
|
|
3120
3156
|
}),
|
|
3121
3157
|
header
|
|
3122
3158
|
]
|
|
3123
3159
|
}),
|
|
3124
|
-
/* @__PURE__ */
|
|
3160
|
+
/* @__PURE__ */ jsx33(ScrollArea2, {
|
|
3125
3161
|
className: "min-h-0 flex-1",
|
|
3126
|
-
children: /* @__PURE__ */
|
|
3162
|
+
children: /* @__PURE__ */ jsx33("div", {
|
|
3127
3163
|
className: "flex min-w-0 flex-col gap-panel p-panel",
|
|
3128
3164
|
children
|
|
3129
3165
|
})
|
|
3130
3166
|
}),
|
|
3131
|
-
footer && /* @__PURE__ */
|
|
3167
|
+
footer && /* @__PURE__ */ jsx33("footer", {
|
|
3132
3168
|
className: "shrink-0 border-t border-border p-panel",
|
|
3133
3169
|
"data-scroll": "none",
|
|
3134
3170
|
children: footer
|
|
@@ -3139,36 +3175,36 @@ function AppShell2({
|
|
|
3139
3175
|
});
|
|
3140
3176
|
}
|
|
3141
3177
|
// src/components/PageHeader.tsx
|
|
3142
|
-
import { jsx as
|
|
3178
|
+
import { jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3143
3179
|
function PageHeader2({ title, eyebrow, description, breadcrumbs, actions, density }) {
|
|
3144
|
-
return /* @__PURE__ */
|
|
3180
|
+
return /* @__PURE__ */ jsxs20("header", {
|
|
3145
3181
|
"data-density": density,
|
|
3146
3182
|
"data-slot": "page-header",
|
|
3147
3183
|
"data-scroll": "none",
|
|
3148
3184
|
className: "flex min-w-0 flex-col gap-field-gap",
|
|
3149
3185
|
children: [
|
|
3150
3186
|
breadcrumbs,
|
|
3151
|
-
/* @__PURE__ */
|
|
3187
|
+
/* @__PURE__ */ jsxs20("div", {
|
|
3152
3188
|
className: "flex min-w-0 flex-wrap items-start justify-between gap-panel",
|
|
3153
3189
|
children: [
|
|
3154
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ jsxs20("div", {
|
|
3155
3191
|
className: "min-w-0",
|
|
3156
3192
|
children: [
|
|
3157
|
-
eyebrow != null && /* @__PURE__ */
|
|
3193
|
+
eyebrow != null && /* @__PURE__ */ jsx34("div", {
|
|
3158
3194
|
className: "mb-2 text-xs font-medium tracking-widest text-muted-foreground",
|
|
3159
3195
|
children: eyebrow
|
|
3160
3196
|
}),
|
|
3161
|
-
/* @__PURE__ */
|
|
3197
|
+
/* @__PURE__ */ jsx34("h1", {
|
|
3162
3198
|
className: "text-xl font-semibold text-foreground",
|
|
3163
3199
|
children: title
|
|
3164
3200
|
}),
|
|
3165
|
-
description && /* @__PURE__ */
|
|
3201
|
+
description && /* @__PURE__ */ jsx34("div", {
|
|
3166
3202
|
className: "mt-1 text-sm text-muted-foreground",
|
|
3167
3203
|
children: description
|
|
3168
3204
|
})
|
|
3169
3205
|
]
|
|
3170
3206
|
}),
|
|
3171
|
-
actions && /* @__PURE__ */
|
|
3207
|
+
actions && /* @__PURE__ */ jsx34("div", {
|
|
3172
3208
|
className: "flex min-w-0 max-w-full flex-wrap items-center gap-control-gap wrap-anywhere",
|
|
3173
3209
|
children: actions
|
|
3174
3210
|
})
|
|
@@ -3178,7 +3214,7 @@ function PageHeader2({ title, eyebrow, description, breadcrumbs, actions, densit
|
|
|
3178
3214
|
});
|
|
3179
3215
|
}
|
|
3180
3216
|
// src/components/WorkspaceSwitcher.tsx
|
|
3181
|
-
import { jsx as
|
|
3217
|
+
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3182
3218
|
function WorkspaceSwitcher2({
|
|
3183
3219
|
workspaces,
|
|
3184
3220
|
value,
|
|
@@ -3188,7 +3224,7 @@ function WorkspaceSwitcher2({
|
|
|
3188
3224
|
label = "Workspace",
|
|
3189
3225
|
density
|
|
3190
3226
|
}) {
|
|
3191
|
-
return /* @__PURE__ */
|
|
3227
|
+
return /* @__PURE__ */ jsxs21(Select2, {
|
|
3192
3228
|
items: workspaces,
|
|
3193
3229
|
value,
|
|
3194
3230
|
defaultValue: defaultValue ?? workspaces[0]?.value,
|
|
@@ -3198,15 +3234,15 @@ function WorkspaceSwitcher2({
|
|
|
3198
3234
|
},
|
|
3199
3235
|
disabled,
|
|
3200
3236
|
children: [
|
|
3201
|
-
/* @__PURE__ */
|
|
3237
|
+
/* @__PURE__ */ jsx35(SelectTrigger2, {
|
|
3202
3238
|
"aria-label": label,
|
|
3203
3239
|
density,
|
|
3204
|
-
children: /* @__PURE__ */
|
|
3240
|
+
children: /* @__PURE__ */ jsx35(SelectValue2, {})
|
|
3205
3241
|
}),
|
|
3206
|
-
/* @__PURE__ */
|
|
3242
|
+
/* @__PURE__ */ jsx35(SelectContent2, {
|
|
3207
3243
|
density,
|
|
3208
|
-
children: /* @__PURE__ */
|
|
3209
|
-
children: workspaces.map((workspace) => /* @__PURE__ */
|
|
3244
|
+
children: /* @__PURE__ */ jsx35(SelectGroup2, {
|
|
3245
|
+
children: workspaces.map((workspace) => /* @__PURE__ */ jsx35(SelectItem2, {
|
|
3210
3246
|
value: workspace.value,
|
|
3211
3247
|
children: workspace.label
|
|
3212
3248
|
}, workspace.value))
|
|
@@ -3216,52 +3252,52 @@ function WorkspaceSwitcher2({
|
|
|
3216
3252
|
});
|
|
3217
3253
|
}
|
|
3218
3254
|
// src/components/AccountMenu.tsx
|
|
3219
|
-
import { jsx as
|
|
3255
|
+
import { jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3220
3256
|
function AccountMenu2({ name, email, image, onAction, density }) {
|
|
3221
|
-
return /* @__PURE__ */
|
|
3257
|
+
return /* @__PURE__ */ jsxs22(DropdownMenu2, {
|
|
3222
3258
|
children: [
|
|
3223
|
-
/* @__PURE__ */
|
|
3224
|
-
render: /* @__PURE__ */
|
|
3259
|
+
/* @__PURE__ */ jsxs22(DropdownMenuTrigger2, {
|
|
3260
|
+
render: /* @__PURE__ */ jsx36(Button2, {
|
|
3225
3261
|
variant: "ghost",
|
|
3226
3262
|
density
|
|
3227
3263
|
}),
|
|
3228
3264
|
"aria-label": `Account menu for ${name}`,
|
|
3229
3265
|
children: [
|
|
3230
|
-
/* @__PURE__ */
|
|
3266
|
+
/* @__PURE__ */ jsxs22(Avatar2, {
|
|
3231
3267
|
className: "size-control",
|
|
3232
3268
|
children: [
|
|
3233
|
-
/* @__PURE__ */
|
|
3269
|
+
/* @__PURE__ */ jsx36(AvatarImage2, {
|
|
3234
3270
|
src: image,
|
|
3235
3271
|
alt: ""
|
|
3236
3272
|
}),
|
|
3237
|
-
/* @__PURE__ */
|
|
3273
|
+
/* @__PURE__ */ jsx36(AvatarFallback2, {
|
|
3238
3274
|
children: name.slice(0, 2).toUpperCase()
|
|
3239
3275
|
})
|
|
3240
3276
|
]
|
|
3241
3277
|
}),
|
|
3242
|
-
/* @__PURE__ */
|
|
3278
|
+
/* @__PURE__ */ jsx36("span", {
|
|
3243
3279
|
children: name
|
|
3244
3280
|
})
|
|
3245
3281
|
]
|
|
3246
3282
|
}),
|
|
3247
|
-
/* @__PURE__ */
|
|
3283
|
+
/* @__PURE__ */ jsx36(MenuPopup, {
|
|
3248
3284
|
density,
|
|
3249
3285
|
align: "end",
|
|
3250
|
-
children: /* @__PURE__ */
|
|
3286
|
+
children: /* @__PURE__ */ jsxs22(MenuGroup2, {
|
|
3251
3287
|
children: [
|
|
3252
|
-
/* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ jsx36(MenuLabel2, {
|
|
3253
3289
|
children: email ?? name
|
|
3254
3290
|
}),
|
|
3255
|
-
/* @__PURE__ */
|
|
3291
|
+
/* @__PURE__ */ jsx36(MenuItem2, {
|
|
3256
3292
|
onClick: () => onAction("profile"),
|
|
3257
3293
|
children: "Profile"
|
|
3258
3294
|
}),
|
|
3259
|
-
/* @__PURE__ */
|
|
3295
|
+
/* @__PURE__ */ jsx36(MenuItem2, {
|
|
3260
3296
|
onClick: () => onAction("settings"),
|
|
3261
3297
|
children: "Settings"
|
|
3262
3298
|
}),
|
|
3263
|
-
/* @__PURE__ */
|
|
3264
|
-
/* @__PURE__ */
|
|
3299
|
+
/* @__PURE__ */ jsx36(MenuSeparator2, {}),
|
|
3300
|
+
/* @__PURE__ */ jsx36(MenuItem2, {
|
|
3265
3301
|
onClick: () => onAction("sign-out"),
|
|
3266
3302
|
children: "Sign out"
|
|
3267
3303
|
})
|
|
@@ -3272,7 +3308,7 @@ function AccountMenu2({ name, email, image, onAction, density }) {
|
|
|
3272
3308
|
});
|
|
3273
3309
|
}
|
|
3274
3310
|
// src/components/StatCard.tsx
|
|
3275
|
-
import { jsx as
|
|
3311
|
+
import { jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3276
3312
|
function StatCard2({
|
|
3277
3313
|
label,
|
|
3278
3314
|
value,
|
|
@@ -3283,40 +3319,40 @@ function StatCard2({
|
|
|
3283
3319
|
loading = false,
|
|
3284
3320
|
density
|
|
3285
3321
|
}) {
|
|
3286
|
-
return /* @__PURE__ */
|
|
3322
|
+
return /* @__PURE__ */ jsxs23(Card2, {
|
|
3287
3323
|
density,
|
|
3288
3324
|
"aria-label": label,
|
|
3289
3325
|
"aria-busy": loading,
|
|
3290
3326
|
children: [
|
|
3291
|
-
/* @__PURE__ */
|
|
3327
|
+
/* @__PURE__ */ jsxs23(CardHeader2, {
|
|
3292
3328
|
children: [
|
|
3293
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx37(CardTitle2, {
|
|
3294
3330
|
children: label
|
|
3295
3331
|
}),
|
|
3296
|
-
description && /* @__PURE__ */
|
|
3332
|
+
description && /* @__PURE__ */ jsx37(CardDescription2, {
|
|
3297
3333
|
children: description
|
|
3298
3334
|
})
|
|
3299
3335
|
]
|
|
3300
3336
|
}),
|
|
3301
|
-
/* @__PURE__ */
|
|
3302
|
-
children: /* @__PURE__ */
|
|
3337
|
+
/* @__PURE__ */ jsx37(CardContent2, {
|
|
3338
|
+
children: /* @__PURE__ */ jsxs23("div", {
|
|
3303
3339
|
className: "flex flex-wrap items-center justify-between gap-control-gap",
|
|
3304
3340
|
children: [
|
|
3305
|
-
loading ? /* @__PURE__ */
|
|
3341
|
+
loading ? /* @__PURE__ */ jsx37(Skeleton2, {
|
|
3306
3342
|
className: "h-8 w-24",
|
|
3307
3343
|
"aria-label": `Loading ${label}`
|
|
3308
|
-
}) : /* @__PURE__ */
|
|
3344
|
+
}) : /* @__PURE__ */ jsx37("div", {
|
|
3309
3345
|
className: "text-2xl font-semibold tabular-nums",
|
|
3310
3346
|
children: value
|
|
3311
3347
|
}),
|
|
3312
|
-
change && /* @__PURE__ */
|
|
3348
|
+
change && /* @__PURE__ */ jsx37(Badge2, {
|
|
3313
3349
|
variant: changeIntent === "positive" ? "success" : changeIntent === "negative" ? "destructive" : "secondary",
|
|
3314
3350
|
children: change
|
|
3315
3351
|
})
|
|
3316
3352
|
]
|
|
3317
3353
|
})
|
|
3318
3354
|
}),
|
|
3319
|
-
children && /* @__PURE__ */
|
|
3355
|
+
children && /* @__PURE__ */ jsx37(CardFooter2, {
|
|
3320
3356
|
children
|
|
3321
3357
|
})
|
|
3322
3358
|
]
|
|
@@ -3324,7 +3360,7 @@ function StatCard2({
|
|
|
3324
3360
|
}
|
|
3325
3361
|
// src/components/AuthForm.tsx
|
|
3326
3362
|
import { useId as useId2, useState as useState5 } from "react";
|
|
3327
|
-
import { jsx as
|
|
3363
|
+
import { jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3328
3364
|
function AuthForm2({
|
|
3329
3365
|
mode = "sign-in",
|
|
3330
3366
|
onSubmit,
|
|
@@ -3354,33 +3390,33 @@ function AuthForm2({
|
|
|
3354
3390
|
setPending(false);
|
|
3355
3391
|
}
|
|
3356
3392
|
}
|
|
3357
|
-
return /* @__PURE__ */
|
|
3393
|
+
return /* @__PURE__ */ jsxs24(Card2, {
|
|
3358
3394
|
density,
|
|
3359
3395
|
children: [
|
|
3360
|
-
/* @__PURE__ */
|
|
3396
|
+
/* @__PURE__ */ jsxs24(CardHeader2, {
|
|
3361
3397
|
children: [
|
|
3362
|
-
/* @__PURE__ */
|
|
3398
|
+
/* @__PURE__ */ jsx38(CardTitle2, {
|
|
3363
3399
|
children: title
|
|
3364
3400
|
}),
|
|
3365
|
-
/* @__PURE__ */
|
|
3401
|
+
/* @__PURE__ */ jsx38(CardDescription2, {
|
|
3366
3402
|
children: mode === "reset-password" ? "Enter your email to request a password reset." : "Enter your details to continue."
|
|
3367
3403
|
})
|
|
3368
3404
|
]
|
|
3369
3405
|
}),
|
|
3370
|
-
/* @__PURE__ */
|
|
3371
|
-
children: /* @__PURE__ */
|
|
3406
|
+
/* @__PURE__ */ jsx38(CardContent2, {
|
|
3407
|
+
children: /* @__PURE__ */ jsx38("form", {
|
|
3372
3408
|
onSubmit: submit,
|
|
3373
3409
|
"aria-label": title,
|
|
3374
3410
|
"aria-busy": pending,
|
|
3375
|
-
children: /* @__PURE__ */
|
|
3411
|
+
children: /* @__PURE__ */ jsxs24(FieldGroup2, {
|
|
3376
3412
|
children: [
|
|
3377
|
-
mode === "sign-up" && /* @__PURE__ */
|
|
3413
|
+
mode === "sign-up" && /* @__PURE__ */ jsxs24(Field2, {
|
|
3378
3414
|
children: [
|
|
3379
|
-
/* @__PURE__ */
|
|
3415
|
+
/* @__PURE__ */ jsx38(FieldLabel2, {
|
|
3380
3416
|
htmlFor: id + "-name",
|
|
3381
3417
|
children: "Name"
|
|
3382
3418
|
}),
|
|
3383
|
-
/* @__PURE__ */
|
|
3419
|
+
/* @__PURE__ */ jsx38(Input2, {
|
|
3384
3420
|
id: id + "-name",
|
|
3385
3421
|
name: "name",
|
|
3386
3422
|
autoComplete: "name",
|
|
@@ -3389,13 +3425,13 @@ function AuthForm2({
|
|
|
3389
3425
|
})
|
|
3390
3426
|
]
|
|
3391
3427
|
}),
|
|
3392
|
-
/* @__PURE__ */
|
|
3428
|
+
/* @__PURE__ */ jsxs24(Field2, {
|
|
3393
3429
|
children: [
|
|
3394
|
-
/* @__PURE__ */
|
|
3430
|
+
/* @__PURE__ */ jsx38(FieldLabel2, {
|
|
3395
3431
|
htmlFor: id + "-email",
|
|
3396
3432
|
children: "Email"
|
|
3397
3433
|
}),
|
|
3398
|
-
/* @__PURE__ */
|
|
3434
|
+
/* @__PURE__ */ jsx38(Input2, {
|
|
3399
3435
|
id: id + "-email",
|
|
3400
3436
|
name: "email",
|
|
3401
3437
|
type: "email",
|
|
@@ -3405,13 +3441,13 @@ function AuthForm2({
|
|
|
3405
3441
|
})
|
|
3406
3442
|
]
|
|
3407
3443
|
}),
|
|
3408
|
-
mode !== "reset-password" && /* @__PURE__ */
|
|
3444
|
+
mode !== "reset-password" && /* @__PURE__ */ jsxs24(Field2, {
|
|
3409
3445
|
children: [
|
|
3410
|
-
/* @__PURE__ */
|
|
3446
|
+
/* @__PURE__ */ jsx38(FieldLabel2, {
|
|
3411
3447
|
htmlFor: id + "-password",
|
|
3412
3448
|
children: "Password"
|
|
3413
3449
|
}),
|
|
3414
|
-
/* @__PURE__ */
|
|
3450
|
+
/* @__PURE__ */ jsx38(Input2, {
|
|
3415
3451
|
id: id + "-password",
|
|
3416
3452
|
name: "password",
|
|
3417
3453
|
type: "password",
|
|
@@ -3420,27 +3456,27 @@ function AuthForm2({
|
|
|
3420
3456
|
required: true,
|
|
3421
3457
|
disabled: disabled || pending
|
|
3422
3458
|
}),
|
|
3423
|
-
mode === "sign-up" && /* @__PURE__ */
|
|
3459
|
+
mode === "sign-up" && /* @__PURE__ */ jsx38(FieldDescription2, {
|
|
3424
3460
|
children: "Use at least eight characters."
|
|
3425
3461
|
})
|
|
3426
3462
|
]
|
|
3427
3463
|
}),
|
|
3428
|
-
error && /* @__PURE__ */
|
|
3464
|
+
error && /* @__PURE__ */ jsxs24(Alert2, {
|
|
3429
3465
|
variant: "destructive",
|
|
3430
3466
|
children: [
|
|
3431
|
-
/* @__PURE__ */
|
|
3467
|
+
/* @__PURE__ */ jsx38(AlertTitle2, {
|
|
3432
3468
|
children: "Request failed"
|
|
3433
3469
|
}),
|
|
3434
|
-
/* @__PURE__ */
|
|
3470
|
+
/* @__PURE__ */ jsx38(AlertDescription2, {
|
|
3435
3471
|
children: error
|
|
3436
3472
|
})
|
|
3437
3473
|
]
|
|
3438
3474
|
}),
|
|
3439
|
-
/* @__PURE__ */
|
|
3475
|
+
/* @__PURE__ */ jsxs24(Button2, {
|
|
3440
3476
|
type: "submit",
|
|
3441
3477
|
disabled: disabled || pending,
|
|
3442
3478
|
children: [
|
|
3443
|
-
pending && /* @__PURE__ */
|
|
3479
|
+
pending && /* @__PURE__ */ jsx38(Spinner2, {
|
|
3444
3480
|
"data-icon": "inline-start"
|
|
3445
3481
|
}),
|
|
3446
3482
|
mode === "reset-password" ? "Send reset link" : title
|
|
@@ -3451,14 +3487,14 @@ function AuthForm2({
|
|
|
3451
3487
|
})
|
|
3452
3488
|
})
|
|
3453
3489
|
}),
|
|
3454
|
-
footer && /* @__PURE__ */
|
|
3490
|
+
footer && /* @__PURE__ */ jsx38(CardFooter2, {
|
|
3455
3491
|
children: footer
|
|
3456
3492
|
})
|
|
3457
3493
|
]
|
|
3458
3494
|
});
|
|
3459
3495
|
}
|
|
3460
3496
|
// src/components/SettingsSection.tsx
|
|
3461
|
-
import { jsx as
|
|
3497
|
+
import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3462
3498
|
function SettingsSection2({
|
|
3463
3499
|
title,
|
|
3464
3500
|
description,
|
|
@@ -3471,48 +3507,48 @@ function SettingsSection2({
|
|
|
3471
3507
|
destructive = false,
|
|
3472
3508
|
density
|
|
3473
3509
|
}) {
|
|
3474
|
-
return /* @__PURE__ */
|
|
3510
|
+
return /* @__PURE__ */ jsx39("form", {
|
|
3475
3511
|
"aria-label": title,
|
|
3476
3512
|
onSubmit,
|
|
3477
3513
|
"aria-busy": pending,
|
|
3478
|
-
children: /* @__PURE__ */
|
|
3514
|
+
children: /* @__PURE__ */ jsxs25(Card2, {
|
|
3479
3515
|
density,
|
|
3480
3516
|
children: [
|
|
3481
|
-
/* @__PURE__ */
|
|
3517
|
+
/* @__PURE__ */ jsxs25(CardHeader2, {
|
|
3482
3518
|
children: [
|
|
3483
|
-
/* @__PURE__ */
|
|
3519
|
+
/* @__PURE__ */ jsx39(CardTitle2, {
|
|
3484
3520
|
children: title
|
|
3485
3521
|
}),
|
|
3486
|
-
description && /* @__PURE__ */
|
|
3522
|
+
description && /* @__PURE__ */ jsx39(CardDescription2, {
|
|
3487
3523
|
children: description
|
|
3488
3524
|
})
|
|
3489
3525
|
]
|
|
3490
3526
|
}),
|
|
3491
|
-
/* @__PURE__ */
|
|
3492
|
-
children: /* @__PURE__ */
|
|
3527
|
+
/* @__PURE__ */ jsx39(CardContent2, {
|
|
3528
|
+
children: /* @__PURE__ */ jsxs25("fieldset", {
|
|
3493
3529
|
disabled: disabled || pending,
|
|
3494
3530
|
className: "min-w-0 border-0 p-0",
|
|
3495
3531
|
children: [
|
|
3496
|
-
/* @__PURE__ */
|
|
3532
|
+
/* @__PURE__ */ jsx39("legend", {
|
|
3497
3533
|
className: "sr-only",
|
|
3498
3534
|
children: title
|
|
3499
3535
|
}),
|
|
3500
|
-
/* @__PURE__ */
|
|
3536
|
+
/* @__PURE__ */ jsx39(FieldGroup2, {
|
|
3501
3537
|
children
|
|
3502
3538
|
})
|
|
3503
3539
|
]
|
|
3504
3540
|
})
|
|
3505
3541
|
}),
|
|
3506
|
-
/* @__PURE__ */
|
|
3542
|
+
/* @__PURE__ */ jsxs25(CardFooter2, {
|
|
3507
3543
|
className: "flex flex-wrap items-center justify-between gap-control-gap",
|
|
3508
3544
|
children: [
|
|
3509
3545
|
footer,
|
|
3510
|
-
/* @__PURE__ */
|
|
3546
|
+
/* @__PURE__ */ jsxs25(Button2, {
|
|
3511
3547
|
type: "submit",
|
|
3512
3548
|
variant: destructive ? "destructive" : "default",
|
|
3513
3549
|
disabled: disabled || pending,
|
|
3514
3550
|
children: [
|
|
3515
|
-
pending && /* @__PURE__ */
|
|
3551
|
+
pending && /* @__PURE__ */ jsx39(Spinner2, {
|
|
3516
3552
|
"data-icon": "inline-start"
|
|
3517
3553
|
}),
|
|
3518
3554
|
saveLabel
|
|
@@ -3525,7 +3561,7 @@ function SettingsSection2({
|
|
|
3525
3561
|
});
|
|
3526
3562
|
}
|
|
3527
3563
|
// src/components/TagInput.tsx
|
|
3528
|
-
import { jsx as
|
|
3564
|
+
import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3529
3565
|
function TagInput2({
|
|
3530
3566
|
label,
|
|
3531
3567
|
options,
|
|
@@ -3538,7 +3574,7 @@ function TagInput2({
|
|
|
3538
3574
|
density
|
|
3539
3575
|
}) {
|
|
3540
3576
|
const anchor = useComboboxAnchor2();
|
|
3541
|
-
return /* @__PURE__ */
|
|
3577
|
+
return /* @__PURE__ */ jsxs26(Combobox2, {
|
|
3542
3578
|
items: options,
|
|
3543
3579
|
multiple: true,
|
|
3544
3580
|
value,
|
|
@@ -3547,33 +3583,33 @@ function TagInput2({
|
|
|
3547
3583
|
disabled,
|
|
3548
3584
|
name,
|
|
3549
3585
|
children: [
|
|
3550
|
-
/* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ jsxs26(ComboboxChips2, {
|
|
3551
3587
|
ref: anchor,
|
|
3552
3588
|
density,
|
|
3553
3589
|
children: [
|
|
3554
|
-
/* @__PURE__ */
|
|
3555
|
-
children: (values) => values.map((item) => /* @__PURE__ */
|
|
3590
|
+
/* @__PURE__ */ jsx40(ComboboxValue2, {
|
|
3591
|
+
children: (values) => values.map((item) => /* @__PURE__ */ jsx40(ComboboxChip2, {
|
|
3556
3592
|
removeLabel: `Remove ${item}`,
|
|
3557
3593
|
children: item
|
|
3558
3594
|
}, item))
|
|
3559
3595
|
}),
|
|
3560
|
-
/* @__PURE__ */
|
|
3596
|
+
/* @__PURE__ */ jsx40(ComboboxChipsInput2, {
|
|
3561
3597
|
"aria-label": label,
|
|
3562
3598
|
placeholder
|
|
3563
3599
|
})
|
|
3564
3600
|
]
|
|
3565
3601
|
}),
|
|
3566
|
-
/* @__PURE__ */
|
|
3602
|
+
/* @__PURE__ */ jsxs26(ComboboxContent2, {
|
|
3567
3603
|
anchor,
|
|
3568
3604
|
density,
|
|
3569
3605
|
children: [
|
|
3570
|
-
/* @__PURE__ */
|
|
3606
|
+
/* @__PURE__ */ jsx40(ComboboxEmpty2, {
|
|
3571
3607
|
children: "No matching tags."
|
|
3572
3608
|
}),
|
|
3573
|
-
/* @__PURE__ */
|
|
3574
|
-
children: /* @__PURE__ */
|
|
3575
|
-
children: /* @__PURE__ */
|
|
3576
|
-
children: (item) => /* @__PURE__ */
|
|
3609
|
+
/* @__PURE__ */ jsx40(ComboboxList2, {
|
|
3610
|
+
children: /* @__PURE__ */ jsx40(ComboboxGroup2, {
|
|
3611
|
+
children: /* @__PURE__ */ jsx40(ComboboxCollection2, {
|
|
3612
|
+
children: (item) => /* @__PURE__ */ jsx40(ComboboxItem2, {
|
|
3577
3613
|
value: item,
|
|
3578
3614
|
children: item
|
|
3579
3615
|
}, item)
|
|
@@ -3586,7 +3622,7 @@ function TagInput2({
|
|
|
3586
3622
|
});
|
|
3587
3623
|
}
|
|
3588
3624
|
// src/components/FilterBar.tsx
|
|
3589
|
-
import { jsx as
|
|
3625
|
+
import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3590
3626
|
function FilterBar2({
|
|
3591
3627
|
label,
|
|
3592
3628
|
search,
|
|
@@ -3597,38 +3633,38 @@ function FilterBar2({
|
|
|
3597
3633
|
disabled,
|
|
3598
3634
|
density
|
|
3599
3635
|
}) {
|
|
3600
|
-
return /* @__PURE__ */
|
|
3636
|
+
return /* @__PURE__ */ jsxs27("fieldset", {
|
|
3601
3637
|
"aria-label": label,
|
|
3602
3638
|
disabled,
|
|
3603
3639
|
"data-density": density,
|
|
3604
3640
|
className: "flex min-w-0 flex-wrap items-center gap-2",
|
|
3605
3641
|
children: [
|
|
3606
|
-
/* @__PURE__ */
|
|
3642
|
+
/* @__PURE__ */ jsx41(Input2, {
|
|
3607
3643
|
"aria-label": `Search ${label}`,
|
|
3608
3644
|
type: "search",
|
|
3609
3645
|
value: search,
|
|
3610
3646
|
onChange: (event) => onSearchChange(event.target.value),
|
|
3611
3647
|
className: "min-w-40 flex-1"
|
|
3612
3648
|
}),
|
|
3613
|
-
filters.map((filter) => /* @__PURE__ */
|
|
3649
|
+
filters.map((filter) => /* @__PURE__ */ jsxs27(NativeSelect2, {
|
|
3614
3650
|
"aria-label": filter.label,
|
|
3615
3651
|
value: value[filter.id] ?? "",
|
|
3616
3652
|
onChange: (event) => onValueChange({ ...value, [filter.id]: event.target.value }),
|
|
3617
3653
|
children: [
|
|
3618
|
-
/* @__PURE__ */
|
|
3654
|
+
/* @__PURE__ */ jsxs27(NativeSelectOption2, {
|
|
3619
3655
|
value: "",
|
|
3620
3656
|
children: [
|
|
3621
3657
|
"All ",
|
|
3622
3658
|
filter.label.toLowerCase()
|
|
3623
3659
|
]
|
|
3624
3660
|
}),
|
|
3625
|
-
filter.options.map((option) => /* @__PURE__ */
|
|
3661
|
+
filter.options.map((option) => /* @__PURE__ */ jsx41(NativeSelectOption2, {
|
|
3626
3662
|
value: option.value,
|
|
3627
3663
|
children: option.label
|
|
3628
3664
|
}, option.value))
|
|
3629
3665
|
]
|
|
3630
3666
|
}, filter.id)),
|
|
3631
|
-
/* @__PURE__ */
|
|
3667
|
+
/* @__PURE__ */ jsx41(Button2, {
|
|
3632
3668
|
type: "button",
|
|
3633
3669
|
variant: "ghost",
|
|
3634
3670
|
disabled: !search && !Object.values(value).some(Boolean),
|
|
@@ -3642,7 +3678,7 @@ function FilterBar2({
|
|
|
3642
3678
|
});
|
|
3643
3679
|
}
|
|
3644
3680
|
// src/components/BarList.tsx
|
|
3645
|
-
import { jsx as
|
|
3681
|
+
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3646
3682
|
function BarList2({
|
|
3647
3683
|
label,
|
|
3648
3684
|
items,
|
|
@@ -3651,25 +3687,25 @@ function BarList2({
|
|
|
3651
3687
|
density
|
|
3652
3688
|
}) {
|
|
3653
3689
|
const max = Math.max(1, ...items.map((item) => item.value));
|
|
3654
|
-
return /* @__PURE__ */
|
|
3690
|
+
return /* @__PURE__ */ jsxs28("section", {
|
|
3655
3691
|
"aria-label": label,
|
|
3656
3692
|
"data-density": density,
|
|
3657
3693
|
children: [
|
|
3658
|
-
/* @__PURE__ */
|
|
3694
|
+
/* @__PURE__ */ jsx42("ul", {
|
|
3659
3695
|
className: "grid gap-3",
|
|
3660
|
-
children: items.map((item) => /* @__PURE__ */
|
|
3661
|
-
children: /* @__PURE__ */
|
|
3696
|
+
children: items.map((item) => /* @__PURE__ */ jsx42("li", {
|
|
3697
|
+
children: /* @__PURE__ */ jsxs28(Meter2, {
|
|
3662
3698
|
min: 0,
|
|
3663
3699
|
max,
|
|
3664
3700
|
value: item.value,
|
|
3665
3701
|
"aria-label": item.label,
|
|
3666
3702
|
format: { maximumFractionDigits: 2 },
|
|
3667
3703
|
children: [
|
|
3668
|
-
/* @__PURE__ */
|
|
3704
|
+
/* @__PURE__ */ jsxs28("div", {
|
|
3669
3705
|
className: "mb-1 flex items-center justify-between gap-3 text-sm",
|
|
3670
3706
|
children: [
|
|
3671
|
-
/* @__PURE__ */
|
|
3672
|
-
children: onItemSelect ? /* @__PURE__ */
|
|
3707
|
+
/* @__PURE__ */ jsx42(MeterLabel2, {
|
|
3708
|
+
children: onItemSelect ? /* @__PURE__ */ jsx42(Button2, {
|
|
3673
3709
|
type: "button",
|
|
3674
3710
|
variant: "link",
|
|
3675
3711
|
className: "h-auto p-0",
|
|
@@ -3677,19 +3713,19 @@ function BarList2({
|
|
|
3677
3713
|
children: item.label
|
|
3678
3714
|
}) : item.label
|
|
3679
3715
|
}),
|
|
3680
|
-
/* @__PURE__ */
|
|
3716
|
+
/* @__PURE__ */ jsx42(MeterValue2, {
|
|
3681
3717
|
children: () => valueFormatter(item.value)
|
|
3682
3718
|
})
|
|
3683
3719
|
]
|
|
3684
3720
|
}),
|
|
3685
|
-
/* @__PURE__ */
|
|
3686
|
-
children: /* @__PURE__ */
|
|
3721
|
+
/* @__PURE__ */ jsx42(MeterTrack2, {
|
|
3722
|
+
children: /* @__PURE__ */ jsx42(MeterIndicator2, {})
|
|
3687
3723
|
})
|
|
3688
3724
|
]
|
|
3689
3725
|
})
|
|
3690
3726
|
}, item.id))
|
|
3691
3727
|
}),
|
|
3692
|
-
!items.length && /* @__PURE__ */
|
|
3728
|
+
!items.length && /* @__PURE__ */ jsx42("p", {
|
|
3693
3729
|
role: "status",
|
|
3694
3730
|
className: "text-sm text-muted-foreground",
|
|
3695
3731
|
children: "No data available."
|
|
@@ -3698,23 +3734,23 @@ function BarList2({
|
|
|
3698
3734
|
});
|
|
3699
3735
|
}
|
|
3700
3736
|
// src/components/StatusTracker.tsx
|
|
3701
|
-
import { jsx as
|
|
3737
|
+
import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3702
3738
|
var statusClasses = { success: "bg-success", warning: "bg-warning", error: "bg-destructive", unknown: "bg-muted" };
|
|
3703
3739
|
function StatusTracker2({ label, items, onItemSelect, density }) {
|
|
3704
|
-
return /* @__PURE__ */
|
|
3705
|
-
children: /* @__PURE__ */
|
|
3740
|
+
return /* @__PURE__ */ jsx43(TooltipProvider2, {
|
|
3741
|
+
children: /* @__PURE__ */ jsx43("div", {
|
|
3706
3742
|
role: "group",
|
|
3707
3743
|
"aria-label": label,
|
|
3708
3744
|
"data-density": density,
|
|
3709
3745
|
className: "flex min-w-0 gap-1",
|
|
3710
|
-
children: items.map((item) => /* @__PURE__ */
|
|
3746
|
+
children: items.map((item) => /* @__PURE__ */ jsxs29(Tooltip2, {
|
|
3711
3747
|
children: [
|
|
3712
|
-
/* @__PURE__ */
|
|
3748
|
+
/* @__PURE__ */ jsx43(TooltipTrigger2, {
|
|
3713
3749
|
"aria-label": `${item.label}: ${item.status}`,
|
|
3714
3750
|
onClick: () => onItemSelect?.(item),
|
|
3715
3751
|
className: cn2("h-8 min-w-2 flex-1 rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring", statusClasses[item.status])
|
|
3716
3752
|
}),
|
|
3717
|
-
/* @__PURE__ */
|
|
3753
|
+
/* @__PURE__ */ jsxs29(TooltipContent2, {
|
|
3718
3754
|
children: [
|
|
3719
3755
|
item.label,
|
|
3720
3756
|
": ",
|
|
@@ -3727,7 +3763,7 @@ function StatusTracker2({ label, items, onItemSelect, density }) {
|
|
|
3727
3763
|
});
|
|
3728
3764
|
}
|
|
3729
3765
|
// src/components/DashboardLayout.tsx
|
|
3730
|
-
import { jsx as
|
|
3766
|
+
import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3731
3767
|
function DashboardLayout2({
|
|
3732
3768
|
title,
|
|
3733
3769
|
description,
|
|
@@ -3738,24 +3774,24 @@ function DashboardLayout2({
|
|
|
3738
3774
|
footer,
|
|
3739
3775
|
density
|
|
3740
3776
|
}) {
|
|
3741
|
-
return /* @__PURE__ */
|
|
3777
|
+
return /* @__PURE__ */ jsxs30("div", {
|
|
3742
3778
|
"data-density": density,
|
|
3743
3779
|
"data-scroll": "none",
|
|
3744
3780
|
className: "grid min-w-0 gap-6",
|
|
3745
3781
|
children: [
|
|
3746
|
-
/* @__PURE__ */
|
|
3782
|
+
/* @__PURE__ */ jsx44(PageHeader2, {
|
|
3747
3783
|
title,
|
|
3748
3784
|
description,
|
|
3749
3785
|
actions
|
|
3750
3786
|
}),
|
|
3751
3787
|
filters,
|
|
3752
|
-
stats.length > 0 && /* @__PURE__ */
|
|
3788
|
+
stats.length > 0 && /* @__PURE__ */ jsx44("div", {
|
|
3753
3789
|
className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
3754
|
-
children: stats.map(({ id, ...stat }) => /* @__PURE__ */
|
|
3790
|
+
children: stats.map(({ id, ...stat }) => /* @__PURE__ */ jsx44(StatCard2, {
|
|
3755
3791
|
...stat
|
|
3756
3792
|
}, id))
|
|
3757
3793
|
}),
|
|
3758
|
-
/* @__PURE__ */
|
|
3794
|
+
/* @__PURE__ */ jsx44("div", {
|
|
3759
3795
|
className: "grid min-w-0 gap-4",
|
|
3760
3796
|
children
|
|
3761
3797
|
}),
|
|
@@ -3764,18 +3800,18 @@ function DashboardLayout2({
|
|
|
3764
3800
|
});
|
|
3765
3801
|
}
|
|
3766
3802
|
// src/components/BillingUsage.tsx
|
|
3767
|
-
import { jsx as
|
|
3803
|
+
import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3768
3804
|
function BillingUsage2({ plan, price, period, metrics, onManage, pending, density }) {
|
|
3769
|
-
return /* @__PURE__ */
|
|
3805
|
+
return /* @__PURE__ */ jsxs31(Card2, {
|
|
3770
3806
|
density,
|
|
3771
3807
|
"aria-label": "Billing and usage",
|
|
3772
3808
|
children: [
|
|
3773
|
-
/* @__PURE__ */
|
|
3809
|
+
/* @__PURE__ */ jsxs31(CardHeader2, {
|
|
3774
3810
|
children: [
|
|
3775
|
-
/* @__PURE__ */
|
|
3811
|
+
/* @__PURE__ */ jsx45(CardTitle2, {
|
|
3776
3812
|
children: plan
|
|
3777
3813
|
}),
|
|
3778
|
-
/* @__PURE__ */
|
|
3814
|
+
/* @__PURE__ */ jsxs31(CardDescription2, {
|
|
3779
3815
|
children: [
|
|
3780
3816
|
price,
|
|
3781
3817
|
" · ",
|
|
@@ -3784,32 +3820,32 @@ function BillingUsage2({ plan, price, period, metrics, onManage, pending, densit
|
|
|
3784
3820
|
})
|
|
3785
3821
|
]
|
|
3786
3822
|
}),
|
|
3787
|
-
/* @__PURE__ */
|
|
3823
|
+
/* @__PURE__ */ jsx45(CardContent2, {
|
|
3788
3824
|
className: "grid gap-4",
|
|
3789
|
-
children: metrics.map((metric) => /* @__PURE__ */
|
|
3825
|
+
children: metrics.map((metric) => /* @__PURE__ */ jsxs31(Meter2, {
|
|
3790
3826
|
value: metric.used,
|
|
3791
3827
|
max: metric.limit,
|
|
3792
3828
|
"aria-label": metric.label,
|
|
3793
3829
|
children: [
|
|
3794
|
-
/* @__PURE__ */
|
|
3830
|
+
/* @__PURE__ */ jsxs31("div", {
|
|
3795
3831
|
className: "mb-2 flex items-center justify-between gap-3 text-sm",
|
|
3796
3832
|
children: [
|
|
3797
|
-
/* @__PURE__ */
|
|
3833
|
+
/* @__PURE__ */ jsx45(MeterLabel2, {
|
|
3798
3834
|
children: metric.label
|
|
3799
3835
|
}),
|
|
3800
|
-
/* @__PURE__ */
|
|
3836
|
+
/* @__PURE__ */ jsx45(MeterValue2, {
|
|
3801
3837
|
children: () => `${metric.used.toLocaleString()} / ${metric.limit.toLocaleString()}${metric.unit ? ` ${metric.unit}` : ""}`
|
|
3802
3838
|
})
|
|
3803
3839
|
]
|
|
3804
3840
|
}),
|
|
3805
|
-
/* @__PURE__ */
|
|
3806
|
-
children: /* @__PURE__ */
|
|
3841
|
+
/* @__PURE__ */ jsx45(MeterTrack2, {
|
|
3842
|
+
children: /* @__PURE__ */ jsx45(MeterIndicator2, {})
|
|
3807
3843
|
})
|
|
3808
3844
|
]
|
|
3809
3845
|
}, metric.id))
|
|
3810
3846
|
}),
|
|
3811
|
-
/* @__PURE__ */
|
|
3812
|
-
children: /* @__PURE__ */
|
|
3847
|
+
/* @__PURE__ */ jsx45(CardFooter2, {
|
|
3848
|
+
children: /* @__PURE__ */ jsx45(Button2, {
|
|
3813
3849
|
type: "button",
|
|
3814
3850
|
variant: "outline",
|
|
3815
3851
|
onClick: onManage,
|
|
@@ -3820,4 +3856,4 @@ function BillingUsage2({ plan, price, period, metrics, onManage, pending, densit
|
|
|
3820
3856
|
]
|
|
3821
3857
|
});
|
|
3822
3858
|
}
|
|
3823
|
-
export { ButtonLink2, Accordion2, AccordionItem2, AccordionTrigger2, AccordionContent2, EmptyState3, PageMessage2, formatDataLabel2, DataViewer2, JsonViewer2, AlertDialog2, AlertDialogTrigger2, AlertDialogPortal2, AlertDialogOverlay2, AlertDialogContent2, AlertDialogHeader2, AlertDialogFooter2, AlertDialogMedia2, AlertDialogTitle2, AlertDialogDescription2, AlertDialogAction2, AlertDialogCancel2, Select2, SelectGroup2, SelectValue2, SelectTrigger2, SelectContent2, SelectLabel2, SelectItem2, SelectSeparator2, SelectScrollUpButton2, SelectScrollDownButton2, DensityProvider2, collectLayoutViolations2, LayoutGuard2, ScrollGuard2, ThemeProvider2, AspectRatio2, Breadcrumb2, BreadcrumbList2, BreadcrumbItem2, BreadcrumbLink2, BreadcrumbPage2, BreadcrumbSeparator2, BreadcrumbEllipsis2, buttonGroupVariants2, ButtonGroup2, ButtonGroupText2, ButtonGroupSeparator2, ItemGroup2, ItemSeparator2, Item2, ItemMedia2, ItemContent2, ItemTitle2, ItemDescription2, ItemActions2, ItemHeader2, ItemFooter2, Pagination2, PaginationContent2, PaginationItem2, PaginationLink2, PaginationPrevious2, PaginationNext2, PaginationEllipsis2, Drawer2, DrawerTrigger2, DrawerPortal2, DrawerClose2, DrawerOverlay2, DrawerSwipeHandle2, DrawerContent2, DrawerHeader2, DrawerFooter2, DrawerTitle2, DrawerDescription2,
|
|
3859
|
+
export { ButtonLink2, ContextMenu2, ContextMenuPortal2, ContextMenuTrigger2, ContextMenuContent2, ActionsMenu2, ActionsMenuTrigger2, ActionsMenuContextTarget2, ActionsMenuContextContent2, FormDialog2, Accordion2, AccordionItem2, AccordionTrigger2, AccordionContent2, EmptyState3, PageMessage2, formatDataLabel2, DataViewer2, JsonViewer2, AlertDialog2, AlertDialogTrigger2, AlertDialogPortal2, AlertDialogOverlay2, AlertDialogContent2, AlertDialogHeader2, AlertDialogFooter2, AlertDialogMedia2, AlertDialogTitle2, AlertDialogDescription2, AlertDialogAction2, AlertDialogCancel2, Select2, SelectGroup2, SelectValue2, SelectTrigger2, SelectContent2, SelectLabel2, SelectItem2, SelectSeparator2, SelectScrollUpButton2, SelectScrollDownButton2, DensityProvider2, collectLayoutViolations2, LayoutGuard2, ScrollGuard2, ThemeProvider2, AspectRatio2, Breadcrumb2, BreadcrumbList2, BreadcrumbItem2, BreadcrumbLink2, BreadcrumbPage2, BreadcrumbSeparator2, BreadcrumbEllipsis2, buttonGroupVariants2, ButtonGroup2, ButtonGroupText2, ButtonGroupSeparator2, ItemGroup2, ItemSeparator2, Item2, ItemMedia2, ItemContent2, ItemTitle2, ItemDescription2, ItemActions2, ItemHeader2, ItemFooter2, Pagination2, PaginationContent2, PaginationItem2, PaginationLink2, PaginationPrevious2, PaginationNext2, PaginationEllipsis2, Drawer2, DrawerTrigger2, DrawerPortal2, DrawerClose2, DrawerOverlay2, DrawerSwipeHandle2, DrawerContent2, DrawerHeader2, DrawerFooter2, DrawerTitle2, DrawerDescription2, Menubar2, MenubarMenu2, MenubarGroup2, MenubarPortal2, MenubarTrigger2, MenubarContent2, MenubarItem2, MenubarCheckboxItem2, MenubarRadioGroup2, MenubarRadioItem2, MenubarLabel2, MenubarSeparator2, MenubarShortcut2, MenubarSub2, MenubarSubTrigger2, MenubarSubContent2, NavigationMenu2, NavigationMenuList2, NavigationMenuItem2, navigationMenuTriggerStyle2, NavigationMenuTrigger2, NavigationMenuContent2, NavigationMenuPositioner2, NavigationMenuLink2, NavigationMenuIndicator2, ToastProvider2, ToastPortal2, ToastViewport2, Toast2, ToastContent2, ToastTitle2, ToastDescription2, ToastAction2, ToastClose2, ToastToaster2, createToastManager2, useToastManager2, markerVariants2, Marker2, MarkerIcon2, MarkerContent2, BubbleGroup2, Bubble2, BubbleContent2, BubbleReactions2, MessageGroup2, Message2, MessageAvatar2, MessageContent2, MessageHeader2, MessageFooter2, Attachment2, AttachmentMedia2, AttachmentContent2, AttachmentTitle2, AttachmentDescription2, AttachmentActions2, AttachmentAction2, AttachmentTrigger2, AttachmentGroup2, InlineEdit2, StarRating2, ConfirmationDialog2, ImagePicker2, Meter2, MeterLabel2, MeterValue2, MeterTrack2, MeterIndicator2, Stepper2, StepperList2, StepperTrigger2, StepperIndicator2, StepperContent2, AppShell2, PageHeader2, WorkspaceSwitcher2, AccountMenu2, StatCard2, AuthForm2, SettingsSection2, TagInput2, FilterBar2, BarList2, StatusTracker2, DashboardLayout2, BillingUsage2 };
|