@alexgorbatchev/shadcn 0.0.31 → 0.0.32

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.
Files changed (68) hide show
  1. package/README.md +1 -0
  2. package/THIRD_PARTY_NOTICES.md +4 -0
  3. package/dist/{chunk-0ewzb2ax.js → chunk-0kyfh857.js} +1 -1
  4. package/dist/{chunk-8wfy03bp.js → chunk-6kwf9644.js} +1 -1
  5. package/dist/{chunk-82e7fbmq.js → chunk-9vyg3854.js} +2 -1
  6. package/dist/chunk-c6g2rbhv.js +3940 -0
  7. package/dist/chunk-dzvsjw59.js +200 -0
  8. package/dist/chunk-tch86q2w.js +6050 -0
  9. package/dist/{chunk-53q730zs.js → chunk-zdt8xxzy.js} +3 -0
  10. package/dist/components/Alert.d.ts +1 -1
  11. package/dist/components/assistant-ui/elements/Chart.js +2 -2
  12. package/dist/components/assistant-ui/elements/GuardrailNotice.js +2 -2
  13. package/dist/components/assistant-ui/index.js +4 -4
  14. package/dist/components/assistant-ui/native/Sources.d.ts +1 -1
  15. package/dist/components/carousel/index.js +15 -204
  16. package/dist/components/chart/AnalyticsChart.d.ts +3 -2
  17. package/dist/components/chart/Chart.d.ts +1 -1
  18. package/dist/components/chart/index.js +24 -10
  19. package/dist/components/chart/types.d.ts +1 -0
  20. package/dist/components/json-render/JsonAccordion.d.ts +3 -0
  21. package/dist/components/json-render/JsonAlert.d.ts +3 -0
  22. package/dist/components/json-render/JsonAvatar.d.ts +3 -0
  23. package/dist/components/json-render/JsonBadge.d.ts +3 -0
  24. package/dist/components/json-render/JsonButton.d.ts +3 -0
  25. package/dist/components/json-render/JsonButtonGroup.d.ts +3 -0
  26. package/dist/components/json-render/JsonCard.d.ts +3 -0
  27. package/dist/components/json-render/JsonCarousel.d.ts +3 -0
  28. package/dist/components/json-render/JsonCheckbox.d.ts +3 -0
  29. package/dist/components/json-render/JsonCollapsible.d.ts +3 -0
  30. package/dist/components/json-render/JsonDialog.d.ts +3 -0
  31. package/dist/components/json-render/JsonDrawer.d.ts +3 -0
  32. package/dist/components/json-render/JsonDropdownMenu.d.ts +3 -0
  33. package/dist/components/json-render/JsonGrid.d.ts +3 -0
  34. package/dist/components/json-render/JsonHeading.d.ts +3 -0
  35. package/dist/components/json-render/JsonImage.d.ts +3 -0
  36. package/dist/components/json-render/JsonInput.d.ts +3 -0
  37. package/dist/components/json-render/JsonLink.d.ts +3 -0
  38. package/dist/components/json-render/JsonPagination.d.ts +3 -0
  39. package/dist/components/json-render/JsonPopover.d.ts +3 -0
  40. package/dist/components/json-render/JsonProgress.d.ts +3 -0
  41. package/dist/components/json-render/JsonRadio.d.ts +3 -0
  42. package/dist/components/json-render/JsonSelect.d.ts +3 -0
  43. package/dist/components/json-render/JsonSeparator.d.ts +3 -0
  44. package/dist/components/json-render/JsonSkeleton.d.ts +3 -0
  45. package/dist/components/json-render/JsonSlider.d.ts +3 -0
  46. package/dist/components/json-render/JsonSpinner.d.ts +3 -0
  47. package/dist/components/json-render/JsonStack.d.ts +3 -0
  48. package/dist/components/json-render/JsonSwitch.d.ts +3 -0
  49. package/dist/components/json-render/JsonTable.d.ts +3 -0
  50. package/dist/components/json-render/JsonTabs.d.ts +3 -0
  51. package/dist/components/json-render/JsonText.d.ts +3 -0
  52. package/dist/components/json-render/JsonTextarea.d.ts +3 -0
  53. package/dist/components/json-render/JsonToggle.d.ts +3 -0
  54. package/dist/components/json-render/JsonToggleGroup.d.ts +3 -0
  55. package/dist/components/json-render/JsonTooltip.d.ts +3 -0
  56. package/dist/components/json-render/catalog.d.ts +548 -0
  57. package/dist/components/json-render/catalog.js +6 -0
  58. package/dist/components/json-render/getPaginationRange.d.ts +1 -0
  59. package/dist/components/json-render/index.d.ts +39 -0
  60. package/dist/components/json-render/index.js +1254 -0
  61. package/dist/index.js +569 -4191
  62. package/licenses/json-render-APACHE-2.0.txt +201 -0
  63. package/llms/components/data-display/AnalyticsChart.md +34 -0
  64. package/llms/components/data-display/JsonRender.md +476 -0
  65. package/llms/components/feedback/Alert.md +20 -4
  66. package/llms/setup.md +1 -0
  67. package/llms.txt +1 -0
  68. package/package.json +19 -1
package/dist/index.js CHANGED
@@ -1,25 +1,238 @@
1
1
  import {
2
- cn2
3
- } from "./chunk-cp2m7y7v.js";
4
- import {
5
- buttonVariants2,
6
- Button2
7
- } from "./chunk-q7p28b89.js";
2
+ ButtonLink2,
3
+ Accordion2,
4
+ AccordionItem2,
5
+ AccordionTrigger2,
6
+ AccordionContent2,
7
+ Combobox2,
8
+ ComboboxValue2,
9
+ ComboboxTrigger2,
10
+ ComboboxInput2,
11
+ ComboboxContent2,
12
+ ComboboxList2,
13
+ ComboboxItem2,
14
+ ComboboxGroup2,
15
+ ComboboxLabel2,
16
+ ComboboxCollection2,
17
+ ComboboxEmpty2,
18
+ ComboboxSeparator2,
19
+ ComboboxChips2,
20
+ ComboboxChip2,
21
+ ComboboxChipsInput2,
22
+ EmptyState3,
23
+ PageMessage2,
24
+ JsonViewer2,
25
+ AlertDialog2,
26
+ AlertDialogTrigger2,
27
+ AlertDialogPortal2,
28
+ AlertDialogOverlay2,
29
+ AlertDialogContent2,
30
+ AlertDialogHeader2,
31
+ AlertDialogFooter2,
32
+ AlertDialogMedia2,
33
+ AlertDialogTitle2,
34
+ AlertDialogDescription2,
35
+ AlertDialogAction2,
36
+ AlertDialogCancel2,
37
+ Select2,
38
+ SelectGroup2,
39
+ SelectValue2,
40
+ SelectTrigger2,
41
+ SelectContent2,
42
+ SelectLabel2,
43
+ SelectItem2,
44
+ SelectSeparator2,
45
+ SelectScrollUpButton2,
46
+ SelectScrollDownButton2,
47
+ DensityProvider2,
48
+ collectLayoutViolations2,
49
+ LayoutGuard2,
50
+ ScrollGuard2,
51
+ ThemeProvider2,
52
+ useComboboxAnchor2,
53
+ AspectRatio2,
54
+ Breadcrumb2,
55
+ BreadcrumbList2,
56
+ BreadcrumbItem2,
57
+ BreadcrumbLink2,
58
+ BreadcrumbPage2,
59
+ BreadcrumbSeparator2,
60
+ BreadcrumbEllipsis2,
61
+ buttonGroupVariants2,
62
+ ButtonGroup2,
63
+ ButtonGroupText2,
64
+ ButtonGroupSeparator2,
65
+ ItemGroup2,
66
+ ItemSeparator2,
67
+ Item2,
68
+ ItemMedia2,
69
+ ItemContent2,
70
+ ItemTitle2,
71
+ ItemDescription2,
72
+ ItemActions2,
73
+ ItemHeader2,
74
+ ItemFooter2,
75
+ Pagination2,
76
+ PaginationContent2,
77
+ PaginationItem2,
78
+ PaginationLink2,
79
+ PaginationPrevious2,
80
+ PaginationNext2,
81
+ PaginationEllipsis2,
82
+ ScrollArea2,
83
+ ScrollBar2,
84
+ Drawer2,
85
+ DrawerTrigger2,
86
+ DrawerPortal2,
87
+ DrawerClose2,
88
+ DrawerOverlay2,
89
+ DrawerSwipeHandle2,
90
+ DrawerContent2,
91
+ DrawerHeader2,
92
+ DrawerFooter2,
93
+ DrawerTitle2,
94
+ DrawerDescription2,
95
+ ContextMenu2,
96
+ ContextMenuPortal2,
97
+ ContextMenuTrigger2,
98
+ ContextMenuContent2,
99
+ ContextMenuGroup2,
100
+ ContextMenuLabel2,
101
+ ContextMenuItem2,
102
+ ContextMenuSub2,
103
+ ContextMenuSubTrigger2,
104
+ ContextMenuSubContent2,
105
+ ContextMenuCheckboxItem2,
106
+ ContextMenuRadioGroup2,
107
+ ContextMenuRadioItem2,
108
+ ContextMenuSeparator2,
109
+ ContextMenuShortcut2,
110
+ Menubar2,
111
+ MenubarMenu2,
112
+ MenubarGroup2,
113
+ MenubarPortal2,
114
+ MenubarTrigger2,
115
+ MenubarContent2,
116
+ MenubarItem2,
117
+ MenubarCheckboxItem2,
118
+ MenubarRadioGroup2,
119
+ MenubarRadioItem2,
120
+ MenubarLabel2,
121
+ MenubarSeparator2,
122
+ MenubarShortcut2,
123
+ MenubarSub2,
124
+ MenubarSubTrigger2,
125
+ MenubarSubContent2,
126
+ NavigationMenu2,
127
+ NavigationMenuList2,
128
+ NavigationMenuItem2,
129
+ navigationMenuTriggerStyle2,
130
+ NavigationMenuTrigger2,
131
+ NavigationMenuContent2,
132
+ NavigationMenuPositioner2,
133
+ NavigationMenuLink2,
134
+ NavigationMenuIndicator2,
135
+ ToastProvider2,
136
+ ToastPortal2,
137
+ ToastViewport2,
138
+ Toast2,
139
+ ToastContent2,
140
+ ToastTitle2,
141
+ ToastDescription2,
142
+ ToastAction2,
143
+ ToastClose2,
144
+ ToastToaster2,
145
+ createToastManager2,
146
+ useToastManager2,
147
+ markerVariants2,
148
+ Marker2,
149
+ MarkerIcon2,
150
+ MarkerContent2,
151
+ BubbleGroup2,
152
+ Bubble2,
153
+ BubbleContent2,
154
+ BubbleReactions2,
155
+ MessageGroup2,
156
+ Message2,
157
+ MessageAvatar2,
158
+ MessageContent2,
159
+ MessageHeader2,
160
+ MessageFooter2,
161
+ Attachment2,
162
+ AttachmentMedia2,
163
+ AttachmentContent2,
164
+ AttachmentTitle2,
165
+ AttachmentDescription2,
166
+ AttachmentActions2,
167
+ AttachmentAction2,
168
+ AttachmentTrigger2,
169
+ AttachmentGroup2,
170
+ InlineEdit2,
171
+ StarRating2,
172
+ ConfirmationDialog2,
173
+ ImagePicker2,
174
+ NumberField2,
175
+ NumberFieldGroup2,
176
+ NumberFieldInput2,
177
+ NumberFieldDecrement2,
178
+ NumberFieldIncrement2,
179
+ NumberFieldScrubArea2,
180
+ NumberFieldScrubAreaCursor2,
181
+ Meter2,
182
+ MeterLabel2,
183
+ MeterValue2,
184
+ MeterTrack2,
185
+ MeterIndicator2,
186
+ Stepper2,
187
+ StepperList2,
188
+ StepperTrigger2,
189
+ StepperIndicator2,
190
+ StepperContent2,
191
+ AppShell2,
192
+ PageHeader2,
193
+ WorkspaceSwitcher2,
194
+ AccountMenu2,
195
+ StatCard2,
196
+ AuthForm2,
197
+ SettingsSection2,
198
+ TagInput2,
199
+ FilterBar2,
200
+ BarList2,
201
+ StatusTracker2,
202
+ DashboardLayout2,
203
+ BillingUsage2
204
+ } from "./chunk-c6g2rbhv.js";
8
205
  import {
9
- DensityContext,
10
- useDensity
11
- } from "./chunk-e6hk39ev.js";
206
+ Tabs2,
207
+ tabsListVariants2,
208
+ TabsList2,
209
+ TabsTrigger2,
210
+ TabsContent2,
211
+ DragDropPreview2,
212
+ DragDropProvider2,
213
+ useDragDrop2,
214
+ useDragSource2,
215
+ DragSource2,
216
+ useDropTarget2,
217
+ DropTarget2,
218
+ Kanban2
219
+ } from "./chunk-6grcm62s.js";
12
220
  import {
13
- usePortalContainer2
14
- } from "./chunk-j89xg1ak.js";
221
+ Toolbar2,
222
+ ToolbarButton2,
223
+ ToolbarLink2,
224
+ ToolbarInput2,
225
+ ToolbarGroup2,
226
+ ToolbarSeparator2
227
+ } from "./chunk-83zjj4jd.js";
15
228
  import {
16
- usePortalNode,
17
- PortalProvider2
18
- } from "./chunk-aa7m22zj.js";
229
+ NativeSelect2,
230
+ NativeSelectOption2,
231
+ NativeSelectOptGroup2
232
+ } from "./chunk-r9qrb6b6.js";
19
233
  import {
20
- DirectionProvider2,
21
- useDirection2
22
- } from "./chunk-jpvw9xqy.js";
234
+ Slider2
235
+ } from "./chunk-644cnngf.js";
23
236
  import {
24
237
  DropdownMenu2,
25
238
  DropdownMenuPortal2,
@@ -38,25 +251,35 @@ import {
38
251
  DropdownMenuShortcut2
39
252
  } from "./chunk-d4bm5rzy.js";
40
253
  import {
41
- Popover2,
42
- PopoverTrigger2,
43
- PopoverContent2,
44
- PopoverHeader2,
45
- PopoverTitle2,
46
- PopoverDescription2
47
- } from "./chunk-4djw71cv.js";
48
- import {
49
- Skeleton2
50
- } from "./chunk-d70rcwk7.js";
254
+ Empty2,
255
+ EmptyHeader2,
256
+ EmptyMedia2,
257
+ EmptyTitle2,
258
+ EmptyDescription2,
259
+ EmptyContent2
260
+ } from "./chunk-9de1htr5.js";
51
261
  import {
52
- Input2
53
- } from "./chunk-59p19t57.js";
262
+ Table2,
263
+ TableHeader2,
264
+ TableBody2,
265
+ TableFooter2,
266
+ TableRow2,
267
+ TableHead2,
268
+ TableCell2,
269
+ TableColumnGroup2,
270
+ TableColumn2,
271
+ TableCaption2
272
+ } from "./chunk-zte6pw69.js";
54
273
  import {
55
- Label2
56
- } from "./chunk-jcxxjkqx.js";
274
+ Alert2,
275
+ AlertTitle2,
276
+ AlertDescription2,
277
+ AlertAction2
278
+ } from "./chunk-zdt8xxzy.js";
57
279
  import {
58
- Separator2
59
- } from "./chunk-rajgnfbr.js";
280
+ RadioGroup2,
281
+ RadioGroupItem2
282
+ } from "./chunk-wndqbss9.js";
60
283
  import {
61
284
  FieldSet2,
62
285
  FieldLegend2,
@@ -69,91 +292,6 @@ import {
69
292
  FieldSeparator2,
70
293
  FieldError2
71
294
  } from "./chunk-6jpz5geq.js";
72
- import {
73
- Dialog2,
74
- DialogTrigger2,
75
- DialogPortal2,
76
- DialogClose2,
77
- DialogOverlay2,
78
- DialogContent2,
79
- DialogHeader2,
80
- DialogFooter2,
81
- DialogTitle2,
82
- DialogDescription2
83
- } from "./chunk-ex1zk6ta.js";
84
- import {
85
- Slider2
86
- } from "./chunk-644cnngf.js";
87
- import {
88
- Switch2
89
- } from "./chunk-8ye0k6z7.js";
90
- import {
91
- Textarea2
92
- } from "./chunk-hz9azhzx.js";
93
- import {
94
- TooltipProvider2,
95
- Tooltip2,
96
- TooltipTrigger2,
97
- TooltipContent2
98
- } from "./chunk-mz3e810d.js";
99
- import {
100
- RadioGroup2,
101
- RadioGroupItem2
102
- } from "./chunk-wndqbss9.js";
103
- import {
104
- Card2,
105
- CardHeader2,
106
- CardTitle2,
107
- CardDescription2,
108
- CardAction2,
109
- CardContent2,
110
- CardFooter2
111
- } from "./chunk-bygq5yqf.js";
112
- import {
113
- InputGroup2,
114
- InputGroupAddon2,
115
- InputGroupButton2,
116
- InputGroupText2,
117
- InputGroupInput2,
118
- InputGroupTextarea2
119
- } from "./chunk-57jj9v64.js";
120
- import {
121
- Tabs2,
122
- tabsListVariants2,
123
- TabsList2,
124
- TabsTrigger2,
125
- TabsContent2,
126
- DragDropPreview2,
127
- DragDropProvider2,
128
- useDragDrop2,
129
- useDragSource2,
130
- DragSource2,
131
- useDropTarget2,
132
- DropTarget2,
133
- Kanban2
134
- } from "./chunk-6grcm62s.js";
135
- import {
136
- badgeVariants2,
137
- Badge2
138
- } from "./chunk-wjx6zf94.js";
139
- import {
140
- Empty2,
141
- EmptyHeader2,
142
- EmptyMedia2,
143
- EmptyTitle2,
144
- EmptyDescription2,
145
- EmptyContent2
146
- } from "./chunk-9de1htr5.js";
147
- import {
148
- Checkbox2
149
- } from "./chunk-tnnf8ydf.js";
150
- import {
151
- ThemeContext,
152
- useTheme2
153
- } from "./chunk-1j2hz3w9.js";
154
- import {
155
- useMediaQuery
156
- } from "./chunk-k99h6evz.js";
157
295
  import {
158
296
  toggleVariants2,
159
297
  Toggle2,
@@ -161,19 +299,18 @@ import {
161
299
  ToggleGroupItem2
162
300
  } from "./chunk-aexby8h3.js";
163
301
  import {
164
- Alert2,
165
- AlertTitle2,
166
- AlertDescription2,
167
- AlertAction2
168
- } from "./chunk-53q730zs.js";
302
+ Spinner2
303
+ } from "./chunk-1xncv9gb.js";
169
304
  import {
170
- Avatar2,
171
- AvatarImage2,
172
- AvatarFallback2,
173
- AvatarBadge2,
174
- AvatarGroup2,
175
- AvatarGroupCount2
176
- } from "./chunk-hyq4nwg2.js";
305
+ Checkbox2
306
+ } from "./chunk-tnnf8ydf.js";
307
+ import {
308
+ Kbd2,
309
+ KbdGroup2
310
+ } from "./chunk-vyve5wf3.js";
311
+ import {
312
+ Switch2
313
+ } from "./chunk-8ye0k6z7.js";
177
314
  import {
178
315
  Progress2,
179
316
  ProgressTrack2,
@@ -182,39 +319,14 @@ import {
182
319
  ProgressValue2
183
320
  } from "./chunk-5j39rehg.js";
184
321
  import {
185
- Collapsible2,
186
- CollapsibleTrigger2,
187
- CollapsibleContent2
188
- } from "./chunk-24d68cjp.js";
189
- import {
190
- Spinner2
191
- } from "./chunk-1xncv9gb.js";
192
- import {
193
- Table2,
194
- TableHeader2,
195
- TableBody2,
196
- TableFooter2,
197
- TableRow2,
198
- TableHead2,
199
- TableCell2,
200
- TableColumnGroup2,
201
- TableColumn2,
202
- TableCaption2
203
- } from "./chunk-zte6pw69.js";
204
- import {
205
- NativeSelect2,
206
- NativeSelectOption2,
207
- NativeSelectOptGroup2
208
- } from "./chunk-r9qrb6b6.js";
209
- import {
210
- Kbd2,
211
- KbdGroup2
212
- } from "./chunk-vyve5wf3.js";
213
- import {
214
- HoverCard2,
215
- HoverCardTrigger2,
216
- HoverCardContent2
217
- } from "./chunk-hh43wg05.js";
322
+ Card2,
323
+ CardHeader2,
324
+ CardTitle2,
325
+ CardDescription2,
326
+ CardAction2,
327
+ CardContent2,
328
+ CardFooter2
329
+ } from "./chunk-bygq5yqf.js";
218
330
  import {
219
331
  Sheet2,
220
332
  SheetTrigger2,
@@ -250,3866 +362,132 @@ import {
250
362
  SidebarMenuSubButton2
251
363
  } from "./chunk-8vfh3ez0.js";
252
364
  import {
253
- Toolbar2,
254
- ToolbarButton2,
255
- ToolbarLink2,
256
- ToolbarInput2,
257
- ToolbarGroup2,
258
- ToolbarSeparator2
259
- } from "./chunk-83zjj4jd.js";
260
- // src/components/ButtonLink.tsx
261
- import { mergeProps } from "@base-ui/react/merge-props";
262
- import { useRender } from "@base-ui/react/use-render";
263
- import { jsx } from "react/jsx-runtime";
264
- function ButtonLink({
265
- density,
266
- className,
267
- variant = "default",
268
- size = "default",
269
- align = "center",
270
- truncate = false,
271
- fullWidth = false,
272
- render,
273
- children,
274
- ...props
275
- }) {
276
- return useRender({
277
- defaultTagName: "a",
278
- props: mergeProps({
279
- className: cn2(buttonVariants2({ variant, size, align, truncate, fullWidth }), className),
280
- children: truncate ? /* @__PURE__ */ jsx("span", {
281
- className: "min-w-0 truncate",
282
- children
283
- }) : children
284
- }, props),
285
- render,
286
- state: {
287
- slot: "button-link",
288
- density
289
- }
290
- });
291
- }
292
- // src/components/Accordion.tsx
293
- import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
294
- import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
295
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
296
- function Accordion({ density, className, ...props }) {
297
- return /* @__PURE__ */ jsx2(AccordionPrimitive.Root, {
298
- "data-density": density,
299
- "data-slot": "accordion",
300
- className: (state) => cn2("flex w-full flex-col", typeof className === "function" ? className(state) : className),
301
- ...props
302
- });
303
- }
304
- function AccordionItem({ density, className, ...props }) {
305
- return /* @__PURE__ */ jsx2(AccordionPrimitive.Item, {
306
- "data-density": density,
307
- "data-slot": "accordion-item",
308
- className: (state) => cn2("not-last:border-b", typeof className === "function" ? className(state) : className),
309
- ...props
310
- });
311
- }
312
- function AccordionTrigger({ density, className, children, ...props }) {
313
- return /* @__PURE__ */ jsx2(AccordionPrimitive.Header, {
314
- className: "flex",
315
- children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, {
316
- "data-density": density,
317
- "data-slot": "accordion-trigger",
318
- 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),
319
- ...props,
320
- children: [
321
- children,
322
- /* @__PURE__ */ jsx2(ChevronDownIcon, {
323
- "data-slot": "accordion-trigger-icon",
324
- className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
325
- }),
326
- /* @__PURE__ */ jsx2(ChevronUpIcon, {
327
- "data-slot": "accordion-trigger-icon",
328
- className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
329
- })
330
- ]
331
- })
332
- });
333
- }
334
- function AccordionContent({ density, className, children, ...props }) {
335
- return /* @__PURE__ */ jsx2(AccordionPrimitive.Panel, {
336
- "data-density": density,
337
- "data-slot": "accordion-content",
338
- 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),
339
- ...props,
340
- children: /* @__PURE__ */ jsx2("div", {
341
- className: "pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
342
- children
343
- })
344
- });
345
- }
346
- // src/components/Combobox.tsx
347
- import { useDirection } from "@base-ui/react/direction-provider";
348
- import { Combobox as ComboboxPrimitive } from "@base-ui/react/combobox";
349
- import { ChevronDownIcon as ChevronDownIcon2, XIcon, CheckIcon } from "lucide-react";
350
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
351
- var Combobox = ComboboxPrimitive.Root;
352
- function ComboboxValue({ ...props }) {
353
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.Value, {
354
- ...props
355
- });
356
- }
357
- function ComboboxTrigger({ density, className, children, ...props }) {
358
- return /* @__PURE__ */ jsxs2(ComboboxPrimitive.Trigger, {
359
- "data-density": density,
360
- "data-slot": "combobox-trigger",
361
- className: (state) => cn2("[&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
362
- ...props,
363
- children: [
364
- children,
365
- /* @__PURE__ */ jsx3(ChevronDownIcon2, {
366
- className: "pointer-events-none size-4 text-muted-foreground"
367
- })
368
- ]
369
- });
370
- }
371
- function ComboboxClear({ density, className, ...props }) {
372
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.Clear, {
373
- "data-density": density,
374
- "data-slot": "combobox-clear",
375
- render: /* @__PURE__ */ jsx3(InputGroupButton2, {
376
- variant: "ghost",
377
- size: "icon-xs"
378
- }),
379
- className: (state) => cn2(typeof className === "function" ? className(state) : className),
380
- ...props,
381
- children: /* @__PURE__ */ jsx3(XIcon, {
382
- className: "pointer-events-none"
383
- })
384
- });
385
- }
386
- function ComboboxInput({
387
- density,
388
- className,
389
- children,
390
- disabled = false,
391
- showTrigger = true,
392
- showClear = false,
393
- frameClassName,
394
- triggerLabel = "Open popup",
395
- clearLabel = "Clear selection",
396
- ...props
397
- }) {
398
- return /* @__PURE__ */ jsxs2(InputGroup2, {
399
- density,
400
- className: cn2("w-auto", frameClassName),
401
- children: [
402
- /* @__PURE__ */ jsx3(ComboboxPrimitive.Input, {
403
- disabled,
404
- className,
405
- render: /* @__PURE__ */ jsx3(InputGroupInput2, {}),
406
- ...props
407
- }),
408
- /* @__PURE__ */ jsxs2(InputGroupAddon2, {
409
- align: "inline-end",
410
- children: [
411
- showTrigger && /* @__PURE__ */ jsx3(InputGroupButton2, {
412
- size: "icon-xs",
413
- variant: "ghost",
414
- render: /* @__PURE__ */ jsx3(ComboboxTrigger, {}),
415
- "aria-label": triggerLabel,
416
- "data-density": density,
417
- "data-slot": "input-group-button",
418
- className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
419
- disabled
420
- }),
421
- showClear && /* @__PURE__ */ jsx3(ComboboxClear, {
422
- disabled,
423
- "aria-label": clearLabel
424
- })
425
- ]
426
- }),
427
- children
428
- ]
429
- });
430
- }
431
- function ComboboxContent({
432
- density,
433
- className,
434
- side = "bottom",
435
- sideOffset = 6,
436
- align = "start",
437
- alignOffset = 0,
438
- anchor,
439
- ...props
440
- }) {
441
- const resolvedDensity = useDensity(density);
442
- const direction = useDirection();
443
- const container = usePortalContainer2();
444
- const portal = usePortalNode();
445
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.Portal, {
446
- container,
447
- ref: portal.ref,
448
- children: /* @__PURE__ */ jsx3(PortalProvider2, {
449
- container: portal.node,
450
- children: /* @__PURE__ */ jsx3(ComboboxPrimitive.Positioner, {
451
- side,
452
- sideOffset,
453
- align,
454
- alignOffset,
455
- anchor,
456
- className: "isolate ",
457
- children: /* @__PURE__ */ jsx3(ComboboxPrimitive.Popup, {
458
- dir: direction,
459
- "data-density": resolvedDensity,
460
- "data-slot": "combobox-content",
461
- "data-chips": !!anchor,
462
- className: (state) => cn2("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground border border-frame-edge shadow-frame duration-120 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-control *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-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),
463
- ...props
464
- })
465
- })
466
- })
467
- });
468
- }
469
- function ComboboxList({ density, className, ...props }) {
470
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.List, {
471
- "data-density": density,
472
- "data-slot": "combobox-list",
473
- className: (state) => cn2("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", typeof className === "function" ? className(state) : className),
474
- ...props
475
- });
476
- }
477
- function ComboboxItem({ density, className, children, ...props }) {
478
- return /* @__PURE__ */ jsxs2(ComboboxPrimitive.Item, {
479
- "data-density": density,
480
- "data-slot": "combobox-item",
481
- className: (state) => cn2("relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pe-8 ps-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**: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", typeof className === "function" ? className(state) : className),
482
- ...props,
483
- children: [
484
- children,
485
- /* @__PURE__ */ jsx3(ComboboxPrimitive.ItemIndicator, {
486
- render: /* @__PURE__ */ jsx3("span", {
487
- className: "pointer-events-none absolute end-2 flex size-4 items-center justify-center"
488
- }),
489
- children: /* @__PURE__ */ jsx3(CheckIcon, {
490
- className: "pointer-events-none"
491
- })
492
- })
493
- ]
494
- });
495
- }
496
- function ComboboxGroup({ density, className, ...props }) {
497
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.Group, {
498
- "data-density": density,
499
- "data-slot": "combobox-group",
500
- className: (state) => cn2(typeof className === "function" ? className(state) : className),
501
- ...props
502
- });
503
- }
504
- function ComboboxLabel({ density, className, ...props }) {
505
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.GroupLabel, {
506
- "data-density": density,
507
- "data-slot": "combobox-label",
508
- className: (state) => cn2("px-2 py-1.5 text-xs text-muted-foreground", typeof className === "function" ? className(state) : className),
509
- ...props
510
- });
511
- }
512
- function ComboboxCollection({ ...props }) {
513
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.Collection, {
514
- ...props
515
- });
516
- }
517
- function ComboboxEmpty({ density, className, ...props }) {
518
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.Empty, {
519
- "data-density": density,
520
- "data-slot": "combobox-empty",
521
- className: (state) => cn2("flex w-full justify-center py-2 empty:p-0 text-center text-sm text-muted-foreground", typeof className === "function" ? className(state) : className),
522
- ...props
523
- });
524
- }
525
- function ComboboxSeparator({ density, className, ...props }) {
526
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.Separator, {
527
- "data-density": density,
528
- "data-slot": "combobox-separator",
529
- className: (state) => cn2("-mx-1 my-1 h-px bg-border", typeof className === "function" ? className(state) : className),
530
- ...props
531
- });
532
- }
533
- function ComboboxChips({ density, className, ...props }) {
534
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.Chips, {
535
- "data-density": density,
536
- "data-slot": "combobox-chips",
537
- className: (state) => cn2("flex min-h-control flex-wrap items-center gap-1 rounded-sm border border-input bg-transparent bg-clip-padding px-control-x py-px text-sm transition-colors focus-within:border-ring focus-within:ring-1 focus-within:ring-ring has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive has-data-[slot=combobox-chip]:px-1", typeof className === "function" ? className(state) : className),
538
- ...props
539
- });
540
- }
541
- function ComboboxChip({
542
- density,
543
- className,
544
- children,
545
- showRemove = true,
546
- removeLabel = "Remove item",
547
- ...props
548
- }) {
549
- return /* @__PURE__ */ jsxs2(ComboboxPrimitive.Chip, {
550
- "data-density": density,
551
- "data-slot": "combobox-chip",
552
- className: (state) => cn2("flex h-tag w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0", typeof className === "function" ? className(state) : className),
553
- ...props,
554
- children: [
555
- children,
556
- showRemove && /* @__PURE__ */ jsx3(ComboboxPrimitive.ChipRemove, {
557
- render: /* @__PURE__ */ jsx3(Button2, {
558
- variant: "ghost",
559
- size: "icon-xs"
560
- }),
561
- className: "size-tag -ms-1 opacity-50 hover:opacity-100",
562
- "data-slot": "combobox-chip-remove",
563
- "aria-label": removeLabel,
564
- children: /* @__PURE__ */ jsx3(XIcon, {
565
- className: "pointer-events-none"
566
- })
567
- })
568
- ]
569
- });
570
- }
571
- function ComboboxChipsInput({ density, className, ...props }) {
572
- return /* @__PURE__ */ jsx3(ComboboxPrimitive.Input, {
573
- "data-density": density,
574
- "data-slot": "combobox-chip-input",
575
- className: (state) => cn2("h-tag min-w-16 flex-1 py-0 text-sm leading-none outline-none", typeof className === "function" ? className(state) : className),
576
- ...props
577
- });
578
- }
579
- // src/components/EmptyState.tsx
580
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
581
- function EmptyState({ title, description, children }) {
582
- return /* @__PURE__ */ jsxs3(Empty2, {
583
- children: [
584
- /* @__PURE__ */ jsxs3(EmptyHeader2, {
585
- children: [
586
- /* @__PURE__ */ jsx4(EmptyTitle2, {
587
- children: title
588
- }),
589
- /* @__PURE__ */ jsx4(EmptyDescription2, {
590
- children: description
591
- })
592
- ]
593
- }),
594
- children && /* @__PURE__ */ jsx4(EmptyContent2, {
595
- children
596
- })
597
- ]
598
- });
599
- }
600
- // src/components/PageMessage.tsx
601
- import { useId } from "react";
602
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
603
- function PageMessage({ title, description, children }) {
604
- const titleId = useId();
605
- const descriptionId = useId();
606
- return /* @__PURE__ */ jsx5("main", {
607
- "aria-labelledby": titleId,
608
- "aria-describedby": description == null ? undefined : descriptionId,
609
- className: "grid min-h-dvh w-full place-items-center bg-background text-foreground",
610
- children: /* @__PURE__ */ jsxs4(Empty2, {
611
- children: [
612
- /* @__PURE__ */ jsxs4(EmptyHeader2, {
613
- children: [
614
- /* @__PURE__ */ jsx5(EmptyTitle2, {
615
- children: /* @__PURE__ */ jsx5("h1", {
616
- id: titleId,
617
- children: title
618
- })
619
- }),
620
- description != null && /* @__PURE__ */ jsx5(EmptyDescription2, {
621
- id: descriptionId,
622
- children: description
623
- })
624
- ]
625
- }),
626
- children != null && /* @__PURE__ */ jsx5(EmptyContent2, {
627
- children
628
- })
629
- ]
630
- })
631
- });
632
- }
633
- // src/components/JsonViewer.tsx
634
- import { jsx as jsx6 } from "react/jsx-runtime";
635
- function JsonViewer({ value, label = "JSON", rows = 12 }) {
636
- return /* @__PURE__ */ jsx6(Textarea2, {
637
- readOnly: true,
638
- rows,
639
- "aria-label": label,
640
- value: JSON.stringify(value ?? null, null, 2) ?? "null"
641
- });
642
- }
643
- // src/components/AlertDialog.tsx
644
- import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
645
- import { useDirection as useDirection3 } from "@base-ui/react/direction-provider";
646
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
647
- "use client";
648
- function AlertDialog({ ...props }) {
649
- return /* @__PURE__ */ jsx7(AlertDialogPrimitive.Root, {
650
- "data-slot": "alert-dialog",
651
- ...props
652
- });
653
- }
654
- function AlertDialogTrigger({ ...props }) {
655
- return /* @__PURE__ */ jsx7(AlertDialogPrimitive.Trigger, {
656
- "data-slot": "alert-dialog-trigger",
657
- ...props
658
- });
659
- }
660
- function AlertDialogPortal({ container, ref, children, ...props }) {
661
- const resolvedContainer = usePortalContainer2(container);
662
- const portal = usePortalNode(ref);
663
- return /* @__PURE__ */ jsx7(AlertDialogPrimitive.Portal, {
664
- "data-slot": "alert-dialog-portal",
665
- container: resolvedContainer,
666
- ref: portal.ref,
667
- ...props,
668
- children: /* @__PURE__ */ jsx7(PortalProvider2, {
669
- container: portal.node,
670
- children
671
- })
672
- });
673
- }
674
- function AlertDialogOverlay({ density, className, ...props }) {
675
- const resolvedDensity = useDensity(density);
676
- return /* @__PURE__ */ jsx7(AlertDialogPrimitive.Backdrop, {
677
- "data-density": resolvedDensity,
678
- "data-slot": "alert-dialog-overlay",
679
- 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),
680
- ...props
681
- });
682
- }
683
- function AlertDialogContent({ density, className, size = "default", ...props }) {
684
- const resolvedDensity = useDensity(density);
685
- const direction = useDirection3();
686
- return /* @__PURE__ */ jsxs5(AlertDialogPortal, {
687
- children: [
688
- /* @__PURE__ */ jsx7(AlertDialogOverlay, {}),
689
- /* @__PURE__ */ jsx7(AlertDialogPrimitive.Popup, {
690
- dir: direction,
691
- "data-density": resolvedDensity,
692
- "data-slot": "alert-dialog-content",
693
- "data-scroll": "none",
694
- "data-size": size,
695
- className: (state) => cn2("group/alert-dialog-content fixed top-1/2 left-1/2 grid w-full -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),
696
- ...props
697
- })
698
- ]
699
- });
700
- }
701
- function AlertDialogHeader({ density, className, ...props }) {
702
- return /* @__PURE__ */ jsx7("div", {
703
- "data-density": density,
704
- "data-slot": "alert-dialog-header",
705
- 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),
706
- ...props
707
- });
708
- }
709
- function AlertDialogFooter({ density, className, ...props }) {
710
- return /* @__PURE__ */ jsx7("div", {
711
- "data-density": density,
712
- "data-slot": "alert-dialog-footer",
713
- 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),
714
- ...props
715
- });
716
- }
717
- function AlertDialogMedia({ density, className, ...props }) {
718
- return /* @__PURE__ */ jsx7("div", {
719
- "data-density": density,
720
- "data-slot": "alert-dialog-media",
721
- 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),
722
- ...props
723
- });
724
- }
725
- function AlertDialogTitle({ density, className, ...props }) {
726
- return /* @__PURE__ */ jsx7(AlertDialogPrimitive.Title, {
727
- "data-density": density,
728
- "data-slot": "alert-dialog-title",
729
- 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),
730
- ...props
731
- });
732
- }
733
- function AlertDialogDescription({ density, className, ...props }) {
734
- return /* @__PURE__ */ jsx7(AlertDialogPrimitive.Description, {
735
- "data-density": density,
736
- "data-slot": "alert-dialog-description",
737
- 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),
738
- ...props
739
- });
740
- }
741
- function AlertDialogAction({ density, className, ...props }) {
742
- return /* @__PURE__ */ jsx7(Button2, {
743
- "data-density": density,
744
- "data-slot": "alert-dialog-action",
745
- className,
746
- ...props
747
- });
748
- }
749
- function AlertDialogCancel({
750
- density,
751
- className,
752
- variant = "outline",
753
- size = "default",
754
- ...props
755
- }) {
756
- return /* @__PURE__ */ jsx7(AlertDialogPrimitive.Close, {
757
- "data-density": density,
758
- "data-slot": "alert-dialog-cancel",
759
- className,
760
- render: /* @__PURE__ */ jsx7(Button2, {
761
- variant,
762
- size
763
- }),
764
- ...props
765
- });
766
- }
767
- // src/components/Select.tsx
768
- import { Select as SelectPrimitive } from "@base-ui/react/select";
769
- import { useDirection as useDirection4 } from "@base-ui/react/direction-provider";
770
- import { ChevronDownIcon as ChevronDownIcon3, CheckIcon as CheckIcon2, ChevronUpIcon as ChevronUpIcon2 } from "lucide-react";
771
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
772
- "use client";
773
- var Select = SelectPrimitive.Root;
774
- function SelectGroup({ density, className, ...props }) {
775
- return /* @__PURE__ */ jsx8(SelectPrimitive.Group, {
776
- "data-density": density,
777
- "data-slot": "select-group",
778
- className: (state) => cn2("scroll-my-1 p-1", typeof className === "function" ? className(state) : className),
779
- ...props
780
- });
781
- }
782
- function SelectValue({ density, className, ...props }) {
783
- return /* @__PURE__ */ jsx8(SelectPrimitive.Value, {
784
- "data-density": density,
785
- "data-slot": "select-value",
786
- className: (state) => cn2("flex flex-1 text-start", typeof className === "function" ? className(state) : className),
787
- ...props
788
- });
789
- }
790
- function SelectTrigger({ density, className, size = "default", children, ...props }) {
791
- return /* @__PURE__ */ jsxs6(SelectPrimitive.Trigger, {
792
- "data-density": density,
793
- "data-slot": "select-trigger",
794
- "data-size": size,
795
- className: (state) => cn2("flex w-fit items-center justify-between gap-control-gap rounded-sm border border-input bg-transparent py-2 pe-2 ps-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive data-placeholder:text-muted-foreground data-[size=default]:h-control data-[size=sm]:h-control-sm data-[size=sm]:rounded-sm *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-control-gap [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
796
- ...props,
797
- children: [
798
- children,
799
- /* @__PURE__ */ jsx8(SelectPrimitive.Icon, {
800
- render: /* @__PURE__ */ jsx8(ChevronDownIcon3, {
801
- className: "pointer-events-none size-4 text-muted-foreground"
802
- })
803
- })
804
- ]
805
- });
806
- }
807
- function SelectContent({
808
- density,
809
- className,
810
- children,
811
- side = "bottom",
812
- sideOffset = 4,
813
- align = "center",
814
- alignOffset = 0,
815
- alignItemWithTrigger = true,
816
- ...props
817
- }) {
818
- const resolvedDensity = useDensity(density);
819
- const direction = useDirection4();
820
- const container = usePortalContainer2();
821
- const portal = usePortalNode();
822
- return /* @__PURE__ */ jsx8(SelectPrimitive.Portal, {
823
- container,
824
- ref: portal.ref,
825
- children: /* @__PURE__ */ jsx8(PortalProvider2, {
826
- container: portal.node,
827
- children: /* @__PURE__ */ jsx8(SelectPrimitive.Positioner, {
828
- side,
829
- sideOffset,
830
- align,
831
- alignOffset,
832
- alignItemWithTrigger,
833
- className: "isolate ",
834
- children: /* @__PURE__ */ jsxs6(SelectPrimitive.Popup, {
835
- dir: direction,
836
- "data-density": resolvedDensity,
837
- "data-slot": "select-content",
838
- "data-align-trigger": alignItemWithTrigger,
839
- 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),
840
- ...props,
841
- children: [
842
- /* @__PURE__ */ jsx8(SelectScrollUpButton, {}),
843
- /* @__PURE__ */ jsx8(SelectPrimitive.List, {
844
- children
845
- }),
846
- /* @__PURE__ */ jsx8(SelectScrollDownButton, {})
847
- ]
848
- })
849
- })
850
- })
851
- });
852
- }
853
- function SelectLabel({ density, className, ...props }) {
854
- return /* @__PURE__ */ jsx8(SelectPrimitive.GroupLabel, {
855
- "data-density": density,
856
- "data-slot": "select-label",
857
- className: (state) => cn2("px-1.5 py-1 text-xs text-muted-foreground", typeof className === "function" ? className(state) : className),
858
- ...props
859
- });
860
- }
861
- function SelectItem({ density, className, children, ...props }) {
862
- return /* @__PURE__ */ jsxs6(SelectPrimitive.Item, {
863
- "data-density": density,
864
- "data-slot": "select-item",
865
- 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),
866
- ...props,
867
- children: [
868
- /* @__PURE__ */ jsx8(SelectPrimitive.ItemText, {
869
- className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
870
- children
871
- }),
872
- /* @__PURE__ */ jsx8(SelectPrimitive.ItemIndicator, {
873
- render: /* @__PURE__ */ jsx8("span", {
874
- className: "pointer-events-none absolute end-2 flex size-4 items-center justify-center"
875
- }),
876
- children: /* @__PURE__ */ jsx8(CheckIcon2, {
877
- className: "pointer-events-none"
878
- })
879
- })
880
- ]
881
- });
882
- }
883
- function SelectSeparator({ density, className, ...props }) {
884
- return /* @__PURE__ */ jsx8(SelectPrimitive.Separator, {
885
- "data-density": density,
886
- "data-slot": "select-separator",
887
- className: (state) => cn2("pointer-events-none -mx-1 my-1 h-px bg-border", typeof className === "function" ? className(state) : className),
888
- ...props
889
- });
890
- }
891
- function SelectScrollUpButton({ density, className, ...props }) {
892
- return /* @__PURE__ */ jsx8(SelectPrimitive.ScrollUpArrow, {
893
- "data-density": density,
894
- "data-slot": "select-scroll-up-button",
895
- 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),
896
- ...props,
897
- children: /* @__PURE__ */ jsx8(ChevronUpIcon2, {})
898
- });
899
- }
900
- function SelectScrollDownButton({ density, className, ...props }) {
901
- return /* @__PURE__ */ jsx8(SelectPrimitive.ScrollDownArrow, {
902
- "data-density": density,
903
- "data-slot": "select-scroll-down-button",
904
- 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),
905
- ...props,
906
- children: /* @__PURE__ */ jsx8(ChevronDownIcon3, {})
907
- });
908
- }
909
- // src/components/DensityProvider.tsx
910
- import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
911
- import { useRender as useRender2 } from "@base-ui/react/use-render";
912
- import { jsx as jsx9 } from "react/jsx-runtime";
913
- function DensityProvider({
914
- density = "comfortable",
915
- className,
916
- render,
917
- ...props
918
- }) {
919
- const element = useRender2({
920
- defaultTagName: "div",
921
- props: mergeProps2({ className: cn2("font-sans text-base leading-(--ag-leading)", className) }, props),
922
- render,
923
- state: { slot: "density-provider", density }
924
- });
925
- return /* @__PURE__ */ jsx9(DensityContext.Provider, {
926
- value: density,
927
- children: element
928
- });
929
- }
930
- // src/hooks/useDocumentGuard.ts
931
- import { useEffect } from "react";
932
- var registrations = new WeakMap;
933
- function useDocumentGuard(observe, ownerDocument) {
934
- useEffect(() => {
935
- if (process.env.NODE_ENV === "production")
936
- return;
937
- const target = ownerDocument ?? document;
938
- let observers = registrations.get(target);
939
- if (!observers) {
940
- observers = new Map;
941
- registrations.set(target, observers);
942
- }
943
- let registration = observers.get(observe);
944
- if (!registration) {
945
- registration = { users: 0, disconnect: observe(target) };
946
- observers.set(observe, registration);
947
- }
948
- registration.users++;
949
- return () => {
950
- registration.users--;
951
- if (!registration.users) {
952
- registration.disconnect();
953
- observers.delete(observe);
954
- if (!observers.size)
955
- registrations.delete(target);
956
- }
957
- };
958
- }, [observe, ownerDocument]);
959
- }
960
-
961
- // src/utils/getLayoutAnimations.ts
962
- function getLayoutAnimations(root) {
963
- const document2 = root.ownerDocument ?? root;
964
- const view = document2.defaultView;
965
- if (!view)
966
- return [];
967
- const boundaries = [...root.querySelectorAll("[data-layout-boundary]")];
968
- if (root instanceof view.Element && root.hasAttribute("data-layout-boundary"))
969
- boundaries.push(root);
970
- return document2.getAnimations().filter((animation) => {
971
- if (animation.playState !== "running" || animation.effect?.getComputedTiming().iterations === Infinity)
972
- return false;
973
- const target = animation.effect instanceof view.KeyframeEffect ? animation.effect.target : null;
974
- return target instanceof view.Element && boundaries.some((boundary) => boundary.contains(target) || target.contains(boundary));
975
- });
976
- }
977
-
978
- // src/utils/collectLayoutViolations.ts
979
- function identify(element) {
980
- const slot = element.getAttribute("data-slot");
981
- const name = element.getAttribute("aria-label") ?? element.textContent?.trim().slice(0, 60);
982
- return `${element.localName}${element.id ? `#${element.id}` : slot ? `[data-slot="${slot}"]` : ""}${name ? ` "${name}"` : ""}`;
983
- }
984
- function isHidden(element, view) {
985
- if (element.closest('[inert], [data-layout-exclude]:not([data-layout-exclude=""])'))
986
- return true;
987
- if (!element.checkVisibility({ visibilityProperty: true, opacityProperty: true }))
988
- return true;
989
- const style = view.getComputedStyle(element);
990
- return style.clip === "rect(0px, 0px, 0px, 0px)" || style.clipPath === "inset(50%)";
991
- }
992
- function collectLayoutViolations(root, tolerance = 1) {
993
- const document2 = root.nodeType === Node.DOCUMENT_NODE ? root : root.ownerDocument;
994
- const view = document2.defaultView;
995
- if (!view)
996
- return [];
997
- const boundaries = [...root.querySelectorAll("[data-layout-boundary]")];
998
- if (root instanceof view.Element && root.hasAttribute("data-layout-boundary"))
999
- boundaries.unshift(root);
1000
- const violations = [];
1001
- for (const boundary of boundaries) {
1002
- if (isHidden(boundary, view))
1003
- continue;
1004
- const bounds = boundary.getBoundingClientRect();
1005
- const axis = boundary.getAttribute("data-layout-boundary");
1006
- for (const element of [boundary, ...boundary.querySelectorAll("*")]) {
1007
- if (isHidden(element, view) || element.parentElement?.closest("svg"))
1008
- continue;
1009
- let checkX = axis !== "y";
1010
- let checkY = axis !== "x";
1011
- const isControl = element.matches("button, a[href], input, select, textarea, [tabindex], [role=button]");
1012
- const elementBounds = element.getBoundingClientRect();
1013
- const limits = { left: bounds.left, right: bounds.right, top: bounds.top, bottom: bounds.bottom };
1014
- if (isControl) {
1015
- limits.left = Math.max(limits.left, elementBounds.left);
1016
- limits.right = Math.min(limits.right, elementBounds.right);
1017
- limits.top = Math.max(limits.top, elementBounds.top);
1018
- limits.bottom = Math.min(limits.bottom, elementBounds.bottom);
1019
- }
1020
- let ancestor = element === boundary ? null : element.parentElement;
1021
- let hidden = false;
1022
- while (ancestor && ancestor !== boundary) {
1023
- if (isHidden(ancestor, view)) {
1024
- hidden = true;
1025
- break;
1026
- }
1027
- const style = view.getComputedStyle(ancestor);
1028
- if (isControl) {
1029
- const clip = ancestor.getBoundingClientRect();
1030
- if (["hidden", "clip"].includes(style.overflowX)) {
1031
- limits.left = Math.max(limits.left, clip.left);
1032
- limits.right = Math.min(limits.right, clip.right);
1033
- }
1034
- if (["hidden", "clip"].includes(style.overflowY)) {
1035
- limits.top = Math.max(limits.top, clip.top);
1036
- limits.bottom = Math.min(limits.bottom, clip.bottom);
1037
- }
1038
- }
1039
- if (["auto", "scroll"].includes(style.overflowX))
1040
- checkX = false;
1041
- if (["auto", "scroll"].includes(style.overflowY))
1042
- checkY = false;
1043
- ancestor = ancestor.parentElement;
1044
- }
1045
- if (hidden)
1046
- continue;
1047
- const rectangles = [...element.getClientRects()];
1048
- const style = view.getComputedStyle(element);
1049
- if (style.textOverflow !== "ellipsis") {
1050
- for (const child of element.childNodes) {
1051
- if (child.nodeType !== Node.TEXT_NODE || !child.textContent?.trim())
1052
- continue;
1053
- const range = document2.createRange();
1054
- range.selectNodeContents(child);
1055
- rectangles.push(...range.getClientRects());
1056
- }
1057
- }
1058
- for (const edge of ["left", "right", "top", "bottom"]) {
1059
- if (edge === "left" || edge === "right" ? !checkX : !checkY)
1060
- continue;
1061
- const overflow = Math.max(0, ...rectangles.map((rect) => edge === "left" || edge === "top" ? limits[edge] - rect[edge] : rect[edge] - limits[edge]));
1062
- if (overflow <= tolerance)
1063
- continue;
1064
- violations.push({
1065
- boundary,
1066
- element,
1067
- edge,
1068
- overflow,
1069
- message: `${identify(element)} exceeds ${identify(boundary)} ${edge} edge by ${Math.round(overflow * 100) / 100}px`
1070
- });
1071
- }
1072
- }
1073
- }
1074
- return violations;
1075
- }
1076
-
1077
- // src/utils/observeLayoutChanges.ts
1078
- function observeLayoutChanges(ownerDocument, selector, checkLayout) {
1079
- const view = ownerDocument.defaultView;
1080
- if (!view)
1081
- return () => {};
1082
- let isConnected = true;
1083
- let frame;
1084
- let needsRefresh = true;
1085
- let guarded = [];
1086
- const observed = new Set;
1087
- const schedule = () => {
1088
- if (!isConnected)
1089
- return;
1090
- frame ??= view.requestAnimationFrame(check);
1091
- };
1092
- const resizeObserver = new view.ResizeObserver(schedule);
1093
- const refresh = () => {
1094
- guarded = [...ownerDocument.querySelectorAll(selector)];
1095
- const targets = new Set(guarded.flatMap((element) => [element, ...element.querySelectorAll("*")]));
1096
- for (const element of observed) {
1097
- if (!targets.has(element)) {
1098
- resizeObserver.unobserve(element);
1099
- observed.delete(element);
1100
- }
1101
- }
1102
- for (const element of targets) {
1103
- if (!observed.has(element)) {
1104
- resizeObserver.observe(element);
1105
- observed.add(element);
1106
- }
1107
- }
1108
- needsRefresh = false;
1109
- };
1110
- const check = () => {
1111
- frame = undefined;
1112
- if (needsRefresh)
1113
- refresh();
1114
- checkLayout(guarded, schedule);
1115
- };
1116
- const mutations = new view.MutationObserver((records) => {
1117
- needsRefresh ||= records.some((record) => record.type === "childList" || record.type === "attributes");
1118
- schedule();
1119
- });
1120
- mutations.observe(ownerDocument.documentElement, {
1121
- subtree: true,
1122
- childList: true,
1123
- characterData: true,
1124
- attributes: true
1125
- });
1126
- view.addEventListener("resize", schedule);
1127
- ownerDocument.addEventListener("scroll", schedule, true);
1128
- ownerDocument.addEventListener("load", schedule, true);
1129
- ownerDocument.addEventListener("transitionend", schedule, true);
1130
- ownerDocument.addEventListener("animationend", schedule, true);
1131
- ownerDocument.fonts.addEventListener("loadingdone", schedule);
1132
- schedule();
1133
- return () => {
1134
- isConnected = false;
1135
- mutations.disconnect();
1136
- resizeObserver.disconnect();
1137
- if (frame !== undefined)
1138
- view.cancelAnimationFrame(frame);
1139
- view.removeEventListener("resize", schedule);
1140
- ownerDocument.removeEventListener("scroll", schedule, true);
1141
- ownerDocument.removeEventListener("load", schedule, true);
1142
- ownerDocument.removeEventListener("transitionend", schedule, true);
1143
- ownerDocument.removeEventListener("animationend", schedule, true);
1144
- ownerDocument.fonts.removeEventListener("loadingdone", schedule);
1145
- };
1146
- }
1147
-
1148
- // src/utils/observeLayoutGuards.ts
1149
- function throwViolation(error) {
1150
- throw error;
1151
- }
1152
- function observeLayoutGuards(document2, report = throwViolation) {
1153
- const pending = new WeakSet;
1154
- let previous = "";
1155
- return observeLayoutChanges(document2, "[data-layout-boundary]", (_elements, schedule) => {
1156
- const animations = getLayoutAnimations(document2);
1157
- for (const animation of animations) {
1158
- if (pending.has(animation))
1159
- continue;
1160
- pending.add(animation);
1161
- const settled = () => {
1162
- pending.delete(animation);
1163
- schedule();
1164
- };
1165
- animation.finished.then(settled, settled);
1166
- }
1167
- if (animations.length)
1168
- return;
1169
- const message = collectLayoutViolations(document2).map((violation) => violation.message).join("; ");
1170
- const hasChanged = message !== previous;
1171
- previous = message;
1172
- if (message && hasChanged)
1173
- report(new Error(`[shadcn] Layout containment: ${message}`));
1174
- });
1175
- }
1176
-
1177
- // src/components/LayoutGuard.tsx
1178
- "use client";
1179
- function LayoutGuard({ ownerDocument }) {
1180
- useDocumentGuard(observeLayoutGuards, ownerDocument);
1181
- return null;
1182
- }
1183
-
1184
- // src/components/ThemeProvider.tsx
1185
- import { useMemo } from "react";
1186
- import { useIsomorphicLayoutEffect, useTernaryDarkMode } from "usehooks-ts";
1187
-
1188
- // src/utils/observeScrollGuards.ts
1189
- function throwViolation2(error) {
1190
- throw error;
1191
- }
1192
- function getViolation(element, view) {
1193
- if (!element.getClientRects().length)
1194
- return;
1195
- const style = view.getComputedStyle(element);
1196
- if (style.visibility !== "visible")
1197
- return;
1198
- const axes = [];
1199
- if (["auto", "scroll"].includes(style.overflowX) && element.scrollWidth > element.clientWidth) {
1200
- axes.push(`horizontal: ${element.scrollWidth}px > ${element.clientWidth}px`);
1201
- }
1202
- if (["auto", "scroll"].includes(style.overflowY) && element.scrollHeight > element.clientHeight) {
1203
- axes.push(`vertical: ${element.scrollHeight}px > ${element.clientHeight}px`);
1204
- }
1205
- if (!axes.length)
1206
- return;
1207
- const slot = element.getAttribute("data-slot");
1208
- const identity = element.id ? ` id="${element.id}"` : slot ? ` data-slot="${slot}"` : "";
1209
- return `<${element.localName}${identity}> (${axes.join(", ")})`;
1210
- }
1211
- function observeScrollGuards(ownerDocument, reportViolation = throwViolation2) {
1212
- const reported = new WeakSet;
1213
- return observeLayoutChanges(ownerDocument, '[data-scroll="none"]', (guarded) => {
1214
- const view = ownerDocument.defaultView;
1215
- const violations = [];
1216
- for (const element of guarded) {
1217
- const violation = getViolation(element, view);
1218
- if (!violation)
1219
- reported.delete(element);
1220
- else if (!reported.has(element)) {
1221
- reported.add(element);
1222
- violations.push(violation);
1223
- }
1224
- }
1225
- if (violations.length)
1226
- reportViolation(new Error('[shadcn] Scrolling is forbidden by data-scroll="none": ' + violations.join("; ") + ". " + "Move scrolling content into a nested ScrollArea or another explicit scroll viewport."));
1227
- });
1228
- }
1229
-
1230
- // src/components/ScrollGuard.tsx
1231
- "use client";
1232
- function ScrollGuard({ ownerDocument }) {
1233
- useDocumentGuard(observeScrollGuards, ownerDocument);
1234
- return null;
1235
- }
1236
-
1237
- // src/components/ThemeProvider.tsx
1238
- import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
1239
- function StoredThemeProvider({
1240
- children,
1241
- defaultTheme = "system",
1242
- storageKey = "shadcn-alexgorbatchev-theme",
1243
- forcedTheme
1244
- }) {
1245
- const { isDarkMode, ternaryDarkMode, setTernaryDarkMode } = useTernaryDarkMode({
1246
- defaultValue: defaultTheme,
1247
- localStorageKey: storageKey
1248
- });
1249
- return /* @__PURE__ */ jsx10(ThemePalette, {
1250
- theme: forcedTheme ?? ternaryDarkMode,
1251
- resolvedTheme: forcedTheme ?? (isDarkMode ? "dark" : "light"),
1252
- setTheme: setTernaryDarkMode,
1253
- children
1254
- });
1255
- }
1256
- function ThemePalette({
1257
- children,
1258
- theme,
1259
- resolvedTheme,
1260
- setTheme
1261
- }) {
1262
- useIsomorphicLayoutEffect(() => {
1263
- document.documentElement.dataset.theme = resolvedTheme;
1264
- document.documentElement.style.colorScheme = resolvedTheme;
1265
- }, [resolvedTheme]);
1266
- const value = useMemo(() => ({ theme, resolvedTheme, setTheme }), [theme, resolvedTheme, setTheme]);
1267
- return /* @__PURE__ */ jsxs7(ThemeContext.Provider, {
1268
- value,
1269
- children: [
1270
- /* @__PURE__ */ jsx10(ScrollGuard, {}),
1271
- /* @__PURE__ */ jsx10(LayoutGuard, {}),
1272
- children
1273
- ]
1274
- });
1275
- }
1276
- function ControlledThemeProvider({
1277
- children,
1278
- controlledTheme,
1279
- forcedTheme
1280
- }) {
1281
- const isDark = useMediaQuery("(prefers-color-scheme: dark)");
1282
- const { theme, setTheme } = controlledTheme;
1283
- const resolvedTheme = forcedTheme ?? (theme === "system" ? isDark ? "dark" : "light" : theme);
1284
- return /* @__PURE__ */ jsx10(ThemePalette, {
1285
- theme: forcedTheme ?? theme,
1286
- resolvedTheme,
1287
- setTheme,
1288
- children
1289
- });
1290
- }
1291
- function ThemeProvider(props) {
1292
- if (props.controlledTheme)
1293
- return /* @__PURE__ */ jsx10(ControlledThemeProvider, {
1294
- ...props,
1295
- controlledTheme: props.controlledTheme
1296
- });
1297
- return /* @__PURE__ */ jsx10(StoredThemeProvider, {
1298
- ...props
1299
- });
1300
- }
1301
- // src/hooks/useComboboxAnchor.ts
1302
- import { useRef } from "react";
1303
- function useComboboxAnchor() {
1304
- return useRef(null);
1305
- }
1306
- // src/components/AspectRatio.tsx
1307
- import { jsx as jsx11 } from "react/jsx-runtime";
1308
- function AspectRatio({ ratio, className, style, ...props }) {
1309
- return /* @__PURE__ */ jsx11("div", {
1310
- "data-slot": "aspect-ratio",
1311
- className: cn2("relative", className),
1312
- style: { aspectRatio: ratio, ...style },
1313
- ...props
1314
- });
1315
- }
1316
- // src/components/Breadcrumb.tsx
1317
- import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
1318
- import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
1319
- import { useRender as useRender3 } from "@base-ui/react/use-render";
1320
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
1321
- function Breadcrumb({ density, className, ...props }) {
1322
- return /* @__PURE__ */ jsx12("nav", {
1323
- "aria-label": "breadcrumb",
1324
- "data-density": density,
1325
- "data-slot": "breadcrumb",
1326
- className: cn2(className),
1327
- ...props
1328
- });
1329
- }
1330
- function BreadcrumbList({ density, className, ...props }) {
1331
- return /* @__PURE__ */ jsx12("ol", {
1332
- "data-density": density,
1333
- "data-slot": "breadcrumb-list",
1334
- className: cn2("flex flex-wrap items-center gap-control-gap text-sm wrap-break-word text-muted-foreground", className),
1335
- ...props
1336
- });
1337
- }
1338
- function BreadcrumbItem({ density, className, ...props }) {
1339
- return /* @__PURE__ */ jsx12("li", {
1340
- "data-density": density,
1341
- "data-slot": "breadcrumb-item",
1342
- className: cn2("inline-flex items-center gap-1", className),
1343
- ...props
1344
- });
1345
- }
1346
- function BreadcrumbLink({ density, className, render, ...props }) {
1347
- return useRender3({
1348
- defaultTagName: "a",
1349
- props: mergeProps3({
1350
- className: cn2("transition-colors hover:text-foreground", className)
1351
- }, props),
1352
- render,
1353
- state: {
1354
- density,
1355
- slot: "breadcrumb-link"
1356
- }
1357
- });
1358
- }
1359
- function BreadcrumbPage({ density, className, ...props }) {
1360
- return /* @__PURE__ */ jsx12("span", {
1361
- "data-density": density,
1362
- "data-slot": "breadcrumb-page",
1363
- role: "link",
1364
- "aria-disabled": "true",
1365
- "aria-current": "page",
1366
- className: cn2("font-normal text-foreground", className),
1367
- ...props
1368
- });
1369
- }
1370
- function BreadcrumbSeparator({ density, children, className, ...props }) {
1371
- return /* @__PURE__ */ jsx12("li", {
1372
- "data-density": density,
1373
- "data-slot": "breadcrumb-separator",
1374
- role: "presentation",
1375
- "aria-hidden": "true",
1376
- className: cn2("[&>svg]:size-3.5", className),
1377
- ...props,
1378
- children: children ?? /* @__PURE__ */ jsx12(ChevronRightIcon, {
1379
- className: "rtl:rotate-180"
1380
- })
1381
- });
1382
- }
1383
- function BreadcrumbEllipsis({ density, className, ...props }) {
1384
- return /* @__PURE__ */ jsxs8("span", {
1385
- "data-density": density,
1386
- "data-slot": "breadcrumb-ellipsis",
1387
- role: "presentation",
1388
- "aria-hidden": "true",
1389
- className: cn2("flex size-5 items-center justify-center [&>svg]:size-4", className),
1390
- ...props,
1391
- children: [
1392
- /* @__PURE__ */ jsx12(MoreHorizontalIcon, {}),
1393
- /* @__PURE__ */ jsx12("span", {
1394
- className: "sr-only",
1395
- children: "More"
1396
- })
1397
- ]
1398
- });
1399
- }
1400
- // src/components/ButtonGroup.tsx
1401
- import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
1402
- import { useRender as useRender4 } from "@base-ui/react/use-render";
1403
- import { cva } from "class-variance-authority";
1404
- import { jsx as jsx13 } from "react/jsx-runtime";
1405
- var buttonGroupVariants = 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", {
1406
- variants: {
1407
- layout: {
1408
- content: "",
1409
- equal: "grid w-full grid-flow-col auto-cols-fr data-[orientation=vertical]:grid-flow-row"
1410
- },
1411
- orientation: {
1412
- horizontal: "*:data-slot:rounded-e-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-sm! [&>[data-slot]~[data-slot]]:rounded-s-none [&>[data-slot]~[data-slot]]:border-s-0",
1413
- vertical: "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-sm! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
1414
- }
1415
- },
1416
- defaultVariants: {
1417
- orientation: "horizontal"
1418
- }
1419
- });
1420
- function ButtonGroup({
1421
- density,
1422
- className,
1423
- orientation,
1424
- layout = "content",
1425
- ...props
1426
- }) {
1427
- return /* @__PURE__ */ jsx13("div", {
1428
- role: "group",
1429
- "data-density": density,
1430
- "data-slot": "button-group",
1431
- "data-orientation": orientation,
1432
- className: cn2(buttonGroupVariants({ orientation, layout }), className),
1433
- ...props
1434
- });
1435
- }
1436
- function ButtonGroupText({ density, className, render, ...props }) {
1437
- return useRender4({
1438
- defaultTagName: "div",
1439
- props: mergeProps4({
1440
- className: cn2("flex items-center gap-2 rounded-sm border bg-muted px-control-x text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className)
1441
- }, props),
1442
- render,
1443
- state: {
1444
- density,
1445
- slot: "button-group-text"
1446
- }
1447
- });
1448
- }
1449
- function ButtonGroupSeparator({
1450
- density,
1451
- className,
1452
- orientation = "vertical",
1453
- ...props
1454
- }) {
1455
- return /* @__PURE__ */ jsx13(Separator2, {
1456
- "data-density": density,
1457
- "data-slot": "button-group-separator",
1458
- orientation,
1459
- className: (state) => cn2("relative self-stretch bg-input data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto", typeof className === "function" ? className(state) : className),
1460
- ...props
1461
- });
1462
- }
1463
- // src/components/Item.tsx
1464
- import { mergeProps as mergeProps5 } from "@base-ui/react/merge-props";
1465
- import { useRender as useRender5 } from "@base-ui/react/use-render";
1466
- import { cva as cva2 } from "class-variance-authority";
1467
- import { jsx as jsx14 } from "react/jsx-runtime";
1468
- function ItemGroup({ density, className, ...props }) {
1469
- return /* @__PURE__ */ jsx14("div", {
1470
- role: "list",
1471
- "data-density": density,
1472
- "data-slot": "item-group",
1473
- className: cn2("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
1474
- ...props
1475
- });
1476
- }
1477
- function ItemSeparator({ density, className, ...props }) {
1478
- return /* @__PURE__ */ jsx14(Separator2, {
1479
- "data-density": density,
1480
- "data-slot": "item-separator",
1481
- orientation: "horizontal",
1482
- className: (state) => cn2("my-2", typeof className === "function" ? className(state) : className),
1483
- ...props
1484
- });
1485
- }
1486
- var itemVariants = cva2("group/item flex w-full flex-wrap items-center rounded-sm border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring [a]:transition-colors [a]:hover:bg-muted", {
1487
- variants: {
1488
- variant: {
1489
- default: "border-transparent",
1490
- outline: "border-border",
1491
- muted: "border-transparent bg-muted/50"
1492
- },
1493
- size: {
1494
- default: "gap-panel p-panel",
1495
- sm: "gap-panel p-panel",
1496
- xs: "gap-2 px-control-x py-2 in-data-[slot=dropdown-menu-content]:p-0"
1497
- }
1498
- },
1499
- defaultVariants: {
1500
- variant: "default",
1501
- size: "default"
1502
- }
1503
- });
1504
- function Item({
1505
- density,
1506
- className,
1507
- variant = "default",
1508
- size = "default",
1509
- render,
1510
- ...props
1511
- }) {
1512
- return useRender5({
1513
- defaultTagName: "div",
1514
- props: mergeProps5({
1515
- className: cn2(itemVariants({ variant, size, className }))
1516
- }, props),
1517
- render,
1518
- state: {
1519
- density,
1520
- slot: "item",
1521
- variant,
1522
- size
1523
- }
1524
- });
1525
- }
1526
- var itemMediaVariants = cva2("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
1527
- variants: {
1528
- variant: {
1529
- default: "bg-transparent",
1530
- icon: "[&_svg:not([class*='size-'])]:size-4",
1531
- image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
1532
- }
1533
- },
1534
- defaultVariants: {
1535
- variant: "default"
1536
- }
1537
- });
1538
- function ItemMedia({ density, className, variant = "default", ...props }) {
1539
- return /* @__PURE__ */ jsx14("div", {
1540
- "data-density": density,
1541
- "data-slot": "item-media",
1542
- "data-variant": variant,
1543
- className: cn2(itemMediaVariants({ variant, className })),
1544
- ...props
1545
- });
1546
- }
1547
- function ItemContent({ density, className, ...props }) {
1548
- return /* @__PURE__ */ jsx14("div", {
1549
- "data-density": density,
1550
- "data-slot": "item-content",
1551
- className: cn2("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
1552
- ...props
1553
- });
1554
- }
1555
- function ItemTitle({ density, className, ...props }) {
1556
- return /* @__PURE__ */ jsx14("div", {
1557
- "data-density": density,
1558
- "data-slot": "item-title",
1559
- className: cn2("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
1560
- ...props
1561
- });
1562
- }
1563
- function ItemDescription({ density, className, ...props }) {
1564
- return /* @__PURE__ */ jsx14("p", {
1565
- "data-density": density,
1566
- "data-slot": "item-description",
1567
- 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),
1568
- ...props
1569
- });
1570
- }
1571
- function ItemActions({ density, className, ...props }) {
1572
- return /* @__PURE__ */ jsx14("div", {
1573
- "data-density": density,
1574
- "data-slot": "item-actions",
1575
- className: cn2("flex items-center gap-2", className),
1576
- ...props
1577
- });
1578
- }
1579
- function ItemHeader({ density, className, ...props }) {
1580
- return /* @__PURE__ */ jsx14("div", {
1581
- "data-density": density,
1582
- "data-slot": "item-header",
1583
- className: cn2("flex basis-full items-center justify-between gap-2", className),
1584
- ...props
1585
- });
1586
- }
1587
- function ItemFooter({ density, className, ...props }) {
1588
- return /* @__PURE__ */ jsx14("div", {
1589
- "data-density": density,
1590
- "data-slot": "item-footer",
1591
- className: cn2("flex basis-full items-center justify-between gap-2", className),
1592
- ...props
1593
- });
1594
- }
1595
- // src/components/Pagination.tsx
1596
- import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon2, MoreHorizontalIcon as MoreHorizontalIcon2 } from "lucide-react";
1597
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
1598
- function Pagination({ density, className, ...props }) {
1599
- return /* @__PURE__ */ jsx15("nav", {
1600
- role: "navigation",
1601
- "aria-label": "pagination",
1602
- "data-density": density,
1603
- "data-slot": "pagination",
1604
- className: cn2("mx-auto flex w-full justify-center", className),
1605
- ...props
1606
- });
1607
- }
1608
- function PaginationContent({ density, className, ...props }) {
1609
- return /* @__PURE__ */ jsx15("ul", {
1610
- "data-density": density,
1611
- "data-slot": "pagination-content",
1612
- className: cn2("flex items-center gap-0.5", className),
1613
- ...props
1614
- });
1615
- }
1616
- function PaginationItem({ ...props }) {
1617
- return /* @__PURE__ */ jsx15("li", {
1618
- "data-slot": "pagination-item",
1619
- ...props
1620
- });
1621
- }
1622
- function PaginationLink({
1623
- density,
1624
- className,
1625
- isActive,
1626
- size = "icon",
1627
- ...props
1628
- }) {
1629
- return /* @__PURE__ */ jsx15("a", {
1630
- "data-density": density,
1631
- className: cn2(buttonVariants2({ variant: isActive ? "outline" : "ghost", size }), className),
1632
- "aria-current": isActive ? "page" : undefined,
1633
- "data-slot": "pagination-link",
1634
- "data-active": isActive,
1635
- ...props
1636
- });
1637
- }
1638
- function PaginationPrevious({
1639
- density,
1640
- className,
1641
- text = "Previous",
1642
- ...props
1643
- }) {
1644
- return /* @__PURE__ */ jsxs9(PaginationLink, {
1645
- density,
1646
- "aria-label": "Go to previous page",
1647
- size: "default",
1648
- className: cn2("ps-1.5!", className),
1649
- ...props,
1650
- children: [
1651
- /* @__PURE__ */ jsx15(ChevronLeftIcon, {
1652
- "data-icon": "inline-start",
1653
- className: "rtl:rotate-180"
1654
- }),
1655
- /* @__PURE__ */ jsx15("span", {
1656
- className: "hidden sm:block",
1657
- children: text
1658
- })
1659
- ]
1660
- });
1661
- }
1662
- function PaginationNext({ density, className, text = "Next", ...props }) {
1663
- return /* @__PURE__ */ jsxs9(PaginationLink, {
1664
- density,
1665
- "aria-label": "Go to next page",
1666
- size: "default",
1667
- className: cn2("pe-1.5!", className),
1668
- ...props,
1669
- children: [
1670
- /* @__PURE__ */ jsx15("span", {
1671
- className: "hidden sm:block",
1672
- children: text
1673
- }),
1674
- /* @__PURE__ */ jsx15(ChevronRightIcon2, {
1675
- "data-icon": "inline-end",
1676
- className: "rtl:rotate-180"
1677
- })
1678
- ]
1679
- });
1680
- }
1681
- function PaginationEllipsis({ density, className, ...props }) {
1682
- return /* @__PURE__ */ jsxs9("span", {
1683
- "aria-hidden": true,
1684
- "data-density": density,
1685
- "data-slot": "pagination-ellipsis",
1686
- className: cn2("flex size-control items-center justify-center [&_svg:not([class*='size-'])]:size-4", className),
1687
- ...props,
1688
- children: [
1689
- /* @__PURE__ */ jsx15(MoreHorizontalIcon2, {}),
1690
- /* @__PURE__ */ jsx15("span", {
1691
- className: "sr-only",
1692
- children: "More pages"
1693
- })
1694
- ]
1695
- });
1696
- }
1697
- // src/components/ScrollArea.tsx
1698
- import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
1699
- import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
1700
- function ScrollArea({
1701
- density,
1702
- className,
1703
- children,
1704
- scrollbars = /* @__PURE__ */ jsx16(ScrollBar, {}),
1705
- ...props
1706
- }) {
1707
- return /* @__PURE__ */ jsxs10(ScrollAreaPrimitive.Root, {
1708
- "data-density": density,
1709
- "data-slot": "scroll-area",
1710
- className: (state) => cn2("relative flex min-h-0 flex-col", typeof className === "function" ? className(state) : className),
1711
- ...props,
1712
- children: [
1713
- /* @__PURE__ */ jsx16(ScrollAreaPrimitive.Viewport, {
1714
- "data-slot": "scroll-area-viewport",
1715
- className: "size-full min-h-0 flex-1 rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-1",
1716
- children
1717
- }),
1718
- scrollbars,
1719
- /* @__PURE__ */ jsx16(ScrollAreaPrimitive.Corner, {})
1720
- ]
1721
- });
1722
- }
1723
- function ScrollBar({ density, className, orientation = "vertical", ...props }) {
1724
- return /* @__PURE__ */ jsx16(ScrollAreaPrimitive.Scrollbar, {
1725
- "data-density": density,
1726
- "data-slot": "scroll-area-scrollbar",
1727
- "data-orientation": orientation,
1728
- orientation,
1729
- className: (state) => cn2("flex touch-none p-px transition-colors select-none data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:w-2.5 data-[orientation=vertical]:border-s data-[orientation=vertical]:border-s-transparent", typeof className === "function" ? className(state) : className),
1730
- ...props,
1731
- children: /* @__PURE__ */ jsx16(ScrollAreaPrimitive.Thumb, {
1732
- "data-slot": "scroll-area-thumb",
1733
- className: "relative flex-1 rounded-full bg-border"
1734
- })
1735
- });
1736
- }
1737
- // src/components/Drawer.tsx
1738
- import { useMemo as useMemo2 } from "react";
1739
-
1740
- // src/drawer/DrawerContext.ts
1741
- import { createContext } from "react";
1742
- var DrawerContext = createContext(null);
1743
-
1744
- // src/hooks/useDrawer.ts
1745
- import { useContext } from "react";
1746
- function useDrawer() {
1747
- const context = useContext(DrawerContext);
1748
- if (!context) {
1749
- throw new Error("useDrawer must be used within a Drawer.");
1750
- }
1751
- return context;
1752
- }
1753
-
1754
- // src/components/Drawer.tsx
1755
- import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
1756
- import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
1757
- function Drawer({
1758
- modal = true,
1759
- showSwipeHandle = false,
1760
- snapPoints,
1761
- swipeDirection = "down",
1762
- ...props
1763
- }) {
1764
- const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
1765
- const contextValue = useMemo2(() => ({ hasSnapPoints, modal, showSwipeHandle, swipeDirection }), [hasSnapPoints, modal, showSwipeHandle, swipeDirection]);
1766
- return /* @__PURE__ */ jsx17(DrawerContext.Provider, {
1767
- value: contextValue,
1768
- children: /* @__PURE__ */ jsx17(DrawerPrimitive.Root, {
1769
- "data-slot": "drawer",
1770
- modal,
1771
- snapPoints,
1772
- swipeDirection,
1773
- ...props
1774
- })
1775
- });
1776
- }
1777
- function DrawerTrigger({ ...props }) {
1778
- return /* @__PURE__ */ jsx17(DrawerPrimitive.Trigger, {
1779
- "data-slot": "drawer-trigger",
1780
- ...props
1781
- });
1782
- }
1783
- function DrawerPortal({ container, ref, children, ...props }) {
1784
- const resolvedContainer = usePortalContainer2(container);
1785
- const portal = usePortalNode(ref);
1786
- return /* @__PURE__ */ jsx17(DrawerPrimitive.Portal, {
1787
- "data-slot": "drawer-portal",
1788
- container: resolvedContainer,
1789
- ref: portal.ref,
1790
- ...props,
1791
- children: /* @__PURE__ */ jsx17(PortalProvider2, {
1792
- container: portal.node,
1793
- children
1794
- })
1795
- });
1796
- }
1797
- function DrawerClose({ ...props }) {
1798
- return /* @__PURE__ */ jsx17(DrawerPrimitive.Close, {
1799
- "data-slot": "drawer-close",
1800
- ...props
1801
- });
1802
- }
1803
- function DrawerOverlay({ density, className, ...props }) {
1804
- const resolvedDensity = useDensity(density);
1805
- return /* @__PURE__ */ jsx17(DrawerPrimitive.Backdrop, {
1806
- "data-density": resolvedDensity,
1807
- "data-slot": "drawer-overlay",
1808
- 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),
1809
- ...props
1810
- });
1811
- }
1812
- function DrawerSwipeHandle({ density, className, ...props }) {
1813
- return /* @__PURE__ */ jsx17("div", {
1814
- "data-density": density,
1815
- "data-slot": "drawer-swipe-handle",
1816
- "aria-hidden": "true",
1817
- className: cn2("relative flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing", className),
1818
- ...props
1819
- });
1820
- }
1821
- function DrawerContent({ density, className, children, ...props }) {
1822
- const resolvedDensity = useDensity(density);
1823
- const direction = useDirection2();
1824
- const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useDrawer();
1825
- const swipeAxis = swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
1826
- return /* @__PURE__ */ jsxs11(DrawerPortal, {
1827
- "data-slot": "drawer-portal",
1828
- children: [
1829
- modal === true && /* @__PURE__ */ jsx17(DrawerOverlay, {
1830
- "data-snap-points": hasSnapPoints ? "" : undefined
1831
- }),
1832
- /* @__PURE__ */ jsx17(DrawerPrimitive.Viewport, {
1833
- dir: direction,
1834
- "data-slot": "drawer-viewport",
1835
- "data-modal": modal,
1836
- className: "pointer-events-none fixed inset-0 select-none data-[modal=true]:pointer-events-auto",
1837
- children: /* @__PURE__ */ jsxs11(DrawerPrimitive.Popup, {
1838
- "data-density": resolvedDensity,
1839
- "data-slot": "drawer-popup",
1840
- "data-scroll": "none",
1841
- "data-swipe-axis": swipeAxis,
1842
- "data-snap-points": hasSnapPoints ? "" : undefined,
1843
- 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),
1844
- ...props,
1845
- children: [
1846
- showSwipeHandle && /* @__PURE__ */ jsx17(DrawerSwipeHandle, {}),
1847
- /* @__PURE__ */ jsx17(DrawerPrimitive.Content, {
1848
- "data-slot": "drawer-content",
1849
- "data-scroll": "none",
1850
- 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",
1851
- children
1852
- })
1853
- ]
1854
- })
1855
- })
1856
- ]
1857
- });
1858
- }
1859
- function DrawerHeader({ density, className, ...props }) {
1860
- return /* @__PURE__ */ jsx17("div", {
1861
- "data-density": density,
1862
- "data-slot": "drawer-header",
1863
- 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),
1864
- ...props
1865
- });
1866
- }
1867
- function DrawerFooter({ density, className, ...props }) {
1868
- return /* @__PURE__ */ jsx17("div", {
1869
- "data-density": density,
1870
- "data-slot": "drawer-footer",
1871
- className: cn2("mt-auto flex shrink-0 flex-col gap-2 p-panel pt-0", className),
1872
- ...props
1873
- });
1874
- }
1875
- function DrawerTitle({ density, className, ...props }) {
1876
- return /* @__PURE__ */ jsx17(DrawerPrimitive.Title, {
1877
- "data-density": density,
1878
- "data-slot": "drawer-title",
1879
- className: (state) => cn2(" text-base font-medium text-foreground", typeof className === "function" ? className(state) : className),
1880
- ...props
1881
- });
1882
- }
1883
- function DrawerDescription({ density, className, ...props }) {
1884
- return /* @__PURE__ */ jsx17(DrawerPrimitive.Description, {
1885
- "data-density": density,
1886
- "data-slot": "drawer-description",
1887
- className: (state) => cn2("text-sm text-balance text-muted-foreground", typeof className === "function" ? className(state) : className),
1888
- ...props
1889
- });
1890
- }
1891
- // src/components/ContextMenu.tsx
1892
- import { ChevronRightIcon as ChevronRightIcon3, CheckIcon as CheckIcon3 } from "lucide-react";
1893
- import { useDirection as useDirection5 } from "@base-ui/react/direction-provider";
1894
- import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
1895
- import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
1896
- function ContextMenu({ ...props }) {
1897
- return /* @__PURE__ */ jsx18(ContextMenuPrimitive.Root, {
1898
- "data-slot": "context-menu",
1899
- ...props
1900
- });
1901
- }
1902
- function ContextMenuPortal({ container, ref, children, ...props }) {
1903
- const resolvedContainer = usePortalContainer2(container);
1904
- const portal = usePortalNode(ref);
1905
- return /* @__PURE__ */ jsx18(ContextMenuPrimitive.Portal, {
1906
- "data-slot": "context-menu-portal",
1907
- container: resolvedContainer,
1908
- ref: portal.ref,
1909
- ...props,
1910
- children: /* @__PURE__ */ jsx18(PortalProvider2, {
1911
- container: portal.node,
1912
- children
1913
- })
1914
- });
1915
- }
1916
- function ContextMenuTrigger({ density, className, ...props }) {
1917
- return /* @__PURE__ */ jsx18(ContextMenuPrimitive.Trigger, {
1918
- "data-density": density,
1919
- "data-slot": "context-menu-trigger",
1920
- className: (state) => cn2("select-none", typeof className === "function" ? className(state) : className),
1921
- ...props
1922
- });
1923
- }
1924
- function ContextMenuContent({
1925
- density,
1926
- className,
1927
- align = "start",
1928
- alignOffset = 4,
1929
- side = "right",
1930
- sideOffset = 0,
1931
- ...props
1932
- }) {
1933
- const resolvedDensity = useDensity(density);
1934
- const direction = useDirection5();
1935
- return /* @__PURE__ */ jsx18(ContextMenuPortal, {
1936
- children: /* @__PURE__ */ jsx18(ContextMenuPrimitive.Positioner, {
1937
- dir: direction,
1938
- className: "isolate outline-none",
1939
- align,
1940
- alignOffset,
1941
- side,
1942
- sideOffset,
1943
- children: /* @__PURE__ */ jsx18(ContextMenuPrimitive.Popup, {
1944
- dir: direction,
1945
- "data-density": resolvedDensity,
1946
- "data-slot": "context-menu-content",
1947
- 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),
1948
- ...props
1949
- })
1950
- })
1951
- });
1952
- }
1953
- function ContextMenuGroup({ ...props }) {
1954
- return /* @__PURE__ */ jsx18(ContextMenuPrimitive.Group, {
1955
- "data-slot": "context-menu-group",
1956
- ...props
1957
- });
1958
- }
1959
- function ContextMenuLabel({ density, className, inset, ...props }) {
1960
- return /* @__PURE__ */ jsx18(ContextMenuPrimitive.GroupLabel, {
1961
- "data-density": density,
1962
- "data-slot": "context-menu-label",
1963
- "data-inset": inset,
1964
- 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),
1965
- ...props
1966
- });
1967
- }
1968
- function ContextMenuItem({ density, className, inset, variant = "default", ...props }) {
1969
- return /* @__PURE__ */ jsx18(ContextMenuPrimitive.Item, {
1970
- "data-density": density,
1971
- "data-slot": "context-menu-item",
1972
- "data-inset": inset,
1973
- "data-variant": variant,
1974
- 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),
1975
- ...props
1976
- });
1977
- }
1978
- function ContextMenuSub({ ...props }) {
1979
- return /* @__PURE__ */ jsx18(ContextMenuPrimitive.SubmenuRoot, {
1980
- "data-slot": "context-menu-sub",
1981
- ...props
1982
- });
1983
- }
1984
- function ContextMenuSubTrigger({ density, className, inset, children, ...props }) {
1985
- return /* @__PURE__ */ jsxs12(ContextMenuPrimitive.SubmenuTrigger, {
1986
- "data-density": density,
1987
- "data-slot": "context-menu-sub-trigger",
1988
- "data-inset": inset,
1989
- 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),
1990
- ...props,
1991
- children: [
1992
- children,
1993
- /* @__PURE__ */ jsx18(ChevronRightIcon3, {
1994
- className: "rtl:rotate-180 ms-auto"
1995
- })
1996
- ]
1997
- });
1998
- }
1999
- function ContextMenuSubContent({ ...props }) {
2000
- return /* @__PURE__ */ jsx18(ContextMenuContent, {
2001
- "data-slot": "context-menu-sub-content",
2002
- className: " shadow-frame border border-frame-edge",
2003
- side: "inline-end",
2004
- ...props
2005
- });
2006
- }
2007
- function ContextMenuCheckboxItem({
2008
- density,
2009
- className,
2010
- children,
2011
- checked,
2012
- inset,
2013
- ...props
2014
- }) {
2015
- return /* @__PURE__ */ jsxs12(ContextMenuPrimitive.CheckboxItem, {
2016
- "data-density": density,
2017
- "data-slot": "context-menu-checkbox-item",
2018
- "data-inset": inset,
2019
- 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),
2020
- checked,
2021
- ...props,
2022
- children: [
2023
- /* @__PURE__ */ jsx18("span", {
2024
- className: "pointer-events-none absolute end-2",
2025
- children: /* @__PURE__ */ jsx18(ContextMenuPrimitive.CheckboxItemIndicator, {
2026
- children: /* @__PURE__ */ jsx18(CheckIcon3, {})
2027
- })
2028
- }),
2029
- children
2030
- ]
2031
- });
2032
- }
2033
- function ContextMenuRadioGroup({ ...props }) {
2034
- return /* @__PURE__ */ jsx18(ContextMenuPrimitive.RadioGroup, {
2035
- "data-slot": "context-menu-radio-group",
2036
- ...props
2037
- });
2038
- }
2039
- function ContextMenuRadioItem({ density, className, children, inset, ...props }) {
2040
- return /* @__PURE__ */ jsxs12(ContextMenuPrimitive.RadioItem, {
2041
- "data-density": density,
2042
- "data-slot": "context-menu-radio-item",
2043
- "data-inset": inset,
2044
- 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),
2045
- ...props,
2046
- children: [
2047
- /* @__PURE__ */ jsx18("span", {
2048
- className: "pointer-events-none absolute end-2",
2049
- children: /* @__PURE__ */ jsx18(ContextMenuPrimitive.RadioItemIndicator, {
2050
- children: /* @__PURE__ */ jsx18(CheckIcon3, {})
2051
- })
2052
- }),
2053
- children
2054
- ]
2055
- });
2056
- }
2057
- function ContextMenuSeparator({ density, className, ...props }) {
2058
- return /* @__PURE__ */ jsx18(ContextMenuPrimitive.Separator, {
2059
- "data-density": density,
2060
- "data-slot": "context-menu-separator",
2061
- className: (state) => cn2("-mx-1 my-1 h-px bg-border", typeof className === "function" ? className(state) : className),
2062
- ...props
2063
- });
2064
- }
2065
- function ContextMenuShortcut({ density, className, ...props }) {
2066
- return /* @__PURE__ */ jsx18("span", {
2067
- "data-density": density,
2068
- "data-slot": "context-menu-shortcut",
2069
- className: cn2("ms-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", className),
2070
- ...props
2071
- });
2072
- }
2073
- // src/components/Menubar.tsx
2074
- import { CheckIcon as CheckIcon4 } from "lucide-react";
2075
- import { Menu as MenuPrimitive } from "@base-ui/react/menu";
2076
- import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
2077
- import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
2078
- function Menubar({ density, className, ...props }) {
2079
- return /* @__PURE__ */ jsx19(MenubarPrimitive, {
2080
- "data-density": density,
2081
- "data-slot": "menubar",
2082
- className: (state) => cn2("flex h-control items-center gap-0.5 rounded-sm border p-px", typeof className === "function" ? className(state) : className),
2083
- ...props
2084
- });
2085
- }
2086
- function MenubarMenu({ ...props }) {
2087
- return /* @__PURE__ */ jsx19(DropdownMenu2, {
2088
- "data-slot": "menubar-menu",
2089
- ...props
2090
- });
2091
- }
2092
- function MenubarGroup({ ...props }) {
2093
- return /* @__PURE__ */ jsx19(DropdownMenuGroup2, {
2094
- "data-slot": "menubar-group",
2095
- ...props
2096
- });
2097
- }
2098
- function MenubarPortal({ ...props }) {
2099
- return /* @__PURE__ */ jsx19(DropdownMenuPortal2, {
2100
- "data-slot": "menubar-portal",
2101
- ...props
2102
- });
2103
- }
2104
- function MenubarTrigger({ density, className, ...props }) {
2105
- return /* @__PURE__ */ jsx19(DropdownMenuTrigger2, {
2106
- "data-density": density,
2107
- "data-slot": "menubar-trigger",
2108
- 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),
2109
- ...props
2110
- });
2111
- }
2112
- function MenubarContent({
2113
- density,
2114
- className,
2115
- align = "start",
2116
- alignOffset = -4,
2117
- sideOffset = 8,
2118
- ...props
2119
- }) {
2120
- return /* @__PURE__ */ jsx19(DropdownMenuContent2, {
2121
- density,
2122
- "data-slot": "menubar-content",
2123
- align,
2124
- alignOffset,
2125
- sideOffset,
2126
- className: (state) => cn2(" min-w-36 rounded-sm bg-popover p-1 text-popover-foreground border border-frame-edge shadow-frame duration-100 data-open:animate-in data-open:fade-in-0 ", typeof className === "function" ? className(state) : className),
2127
- ...props
2128
- });
2129
- }
2130
- function MenubarItem({ density, className, inset, variant = "default", ...props }) {
2131
- return /* @__PURE__ */ jsx19(DropdownMenuItem2, {
2132
- density,
2133
- "data-slot": "menubar-item",
2134
- inset,
2135
- variant,
2136
- className: (state) => cn2("group/menubar-item gap-control-gap rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]: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:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", typeof className === "function" ? className(state) : className),
2137
- ...props
2138
- });
2139
- }
2140
- function MenubarCheckboxItem({
2141
- density,
2142
- className,
2143
- children,
2144
- checked,
2145
- inset,
2146
- ...props
2147
- }) {
2148
- return /* @__PURE__ */ jsxs13(MenuPrimitive.CheckboxItem, {
2149
- "data-density": density,
2150
- "data-slot": "menubar-checkbox-item",
2151
- "data-inset": inset,
2152
- 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", typeof className === "function" ? className(state) : className),
2153
- checked,
2154
- ...props,
2155
- children: [
2156
- /* @__PURE__ */ jsx19("span", {
2157
- className: "pointer-events-none absolute start-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
2158
- children: /* @__PURE__ */ jsx19(MenuPrimitive.CheckboxItemIndicator, {
2159
- children: /* @__PURE__ */ jsx19(CheckIcon4, {})
2160
- })
2161
- }),
2162
- children
2163
- ]
2164
- });
2165
- }
2166
- function MenubarRadioGroup({ ...props }) {
2167
- return /* @__PURE__ */ jsx19(DropdownMenuRadioGroup2, {
2168
- "data-slot": "menubar-radio-group",
2169
- ...props
2170
- });
2171
- }
2172
- function MenubarRadioItem({ density, className, children, inset, ...props }) {
2173
- return /* @__PURE__ */ jsxs13(MenuPrimitive.RadioItem, {
2174
- "data-density": density,
2175
- "data-slot": "menubar-radio-item",
2176
- "data-inset": inset,
2177
- 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),
2178
- ...props,
2179
- children: [
2180
- /* @__PURE__ */ jsx19("span", {
2181
- className: "pointer-events-none absolute start-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
2182
- children: /* @__PURE__ */ jsx19(MenuPrimitive.RadioItemIndicator, {
2183
- children: /* @__PURE__ */ jsx19(CheckIcon4, {})
2184
- })
2185
- }),
2186
- children
2187
- ]
2188
- });
2189
- }
2190
- function MenubarLabel({ density, className, inset, ...props }) {
2191
- return /* @__PURE__ */ jsx19(DropdownMenuLabel2, {
2192
- density,
2193
- "data-slot": "menubar-label",
2194
- inset,
2195
- className: (state) => cn2("px-1.5 py-1 text-sm font-medium data-inset:ps-7", typeof className === "function" ? className(state) : className),
2196
- ...props
2197
- });
2198
- }
2199
- function MenubarSeparator({ density, className, ...props }) {
2200
- return /* @__PURE__ */ jsx19(DropdownMenuSeparator2, {
2201
- density,
2202
- "data-slot": "menubar-separator",
2203
- className: (state) => cn2("-mx-1 my-1 h-px bg-border", typeof className === "function" ? className(state) : className),
2204
- ...props
2205
- });
2206
- }
2207
- function MenubarShortcut({ density, className, ...props }) {
2208
- return /* @__PURE__ */ jsx19(DropdownMenuShortcut2, {
2209
- "data-density": density,
2210
- "data-slot": "menubar-shortcut",
2211
- className: cn2("ms-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
2212
- ...props
2213
- });
2214
- }
2215
- function MenubarSub({ ...props }) {
2216
- return /* @__PURE__ */ jsx19(DropdownMenuSub2, {
2217
- "data-slot": "menubar-sub",
2218
- ...props
2219
- });
2220
- }
2221
- function MenubarSubTrigger({ density, className, inset, ...props }) {
2222
- return /* @__PURE__ */ jsx19(DropdownMenuSubTrigger2, {
2223
- density,
2224
- "data-slot": "menubar-sub-trigger",
2225
- inset,
2226
- className: (state) => cn2("gap-control-gap rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-inset:ps-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", typeof className === "function" ? className(state) : className),
2227
- ...props
2228
- });
2229
- }
2230
- function MenubarSubContent({ density, className, ...props }) {
2231
- return /* @__PURE__ */ jsx19(DropdownMenuSubContent2, {
2232
- density,
2233
- "data-slot": "menubar-sub-content",
2234
- 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),
2235
- ...props
2236
- });
2237
- }
2238
- // src/components/NavigationMenu.tsx
2239
- import { ChevronDownIcon as ChevronDownIcon4 } from "lucide-react";
2240
- import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
2241
- import { cva as cva3 } from "class-variance-authority";
2242
- import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
2243
- function NavigationMenu({
2244
- density,
2245
- align = "start",
2246
- className,
2247
- children,
2248
- ...props
2249
- }) {
2250
- const resolvedDensity = useDensity(density);
2251
- return /* @__PURE__ */ jsxs14(NavigationMenuPrimitive.Root, {
2252
- "data-density": resolvedDensity,
2253
- "data-slot": "navigation-menu",
2254
- className: (state) => cn2("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", typeof className === "function" ? className(state) : className),
2255
- ...props,
2256
- children: [
2257
- children,
2258
- /* @__PURE__ */ jsx20(NavigationMenuPositioner, {
2259
- density: resolvedDensity,
2260
- align
2261
- })
2262
- ]
2263
- });
2264
- }
2265
- function NavigationMenuList({ density, className, ...props }) {
2266
- return /* @__PURE__ */ jsx20(NavigationMenuPrimitive.List, {
2267
- "data-density": density,
2268
- "data-slot": "navigation-menu-list",
2269
- className: (state) => cn2("group flex flex-1 list-none items-center justify-center gap-0", typeof className === "function" ? className(state) : className),
2270
- ...props
2271
- });
2272
- }
2273
- function NavigationMenuItem({ density, className, ...props }) {
2274
- return /* @__PURE__ */ jsx20(NavigationMenuPrimitive.Item, {
2275
- "data-density": density,
2276
- "data-slot": "navigation-menu-item",
2277
- className: (state) => cn2("relative", typeof className === "function" ? className(state) : className),
2278
- ...props
2279
- });
2280
- }
2281
- var navigationMenuTriggerStyle = 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");
2282
- function NavigationMenuTrigger({ density, className, children, ...props }) {
2283
- return /* @__PURE__ */ jsxs14(NavigationMenuPrimitive.Trigger, {
2284
- "data-density": density,
2285
- "data-slot": "navigation-menu-trigger",
2286
- className: (state) => cn2(navigationMenuTriggerStyle(), "group", typeof className === "function" ? className(state) : className),
2287
- ...props,
2288
- children: [
2289
- children,
2290
- " ",
2291
- /* @__PURE__ */ jsx20(NavigationMenuIndicator, {})
2292
- ]
2293
- });
2294
- }
2295
- function NavigationMenuContent({ density, className, ...props }) {
2296
- return /* @__PURE__ */ jsx20(NavigationMenuPrimitive.Content, {
2297
- "data-density": density,
2298
- "data-slot": "navigation-menu-content",
2299
- 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),
2300
- ...props
2301
- });
2302
- }
2303
- function NavigationMenuPositioner({
2304
- density,
2305
- className,
2306
- side = "bottom",
2307
- sideOffset = 8,
2308
- align = "start",
2309
- alignOffset = 0,
2310
- ...props
2311
- }) {
2312
- const resolvedDensity = useDensity(density);
2313
- const direction = useDirection2();
2314
- const container = usePortalContainer2();
2315
- const portal = usePortalNode();
2316
- return /* @__PURE__ */ jsx20(NavigationMenuPrimitive.Portal, {
2317
- container,
2318
- ref: portal.ref,
2319
- children: /* @__PURE__ */ jsx20(PortalProvider2, {
2320
- container: portal.node,
2321
- children: /* @__PURE__ */ jsx20(NavigationMenuPrimitive.Positioner, {
2322
- dir: direction,
2323
- side,
2324
- sideOffset,
2325
- align,
2326
- alignOffset,
2327
- 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),
2328
- ...props,
2329
- children: /* @__PURE__ */ jsx20(NavigationMenuPrimitive.Popup, {
2330
- "data-density": resolvedDensity,
2331
- "data-slot": "navigation-menu-popup",
2332
- 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",
2333
- children: /* @__PURE__ */ jsx20(NavigationMenuPrimitive.Viewport, {
2334
- className: "relative size-full overflow-hidden"
2335
- })
2336
- })
2337
- })
2338
- })
2339
- });
2340
- }
2341
- function NavigationMenuLink({ density, className, ...props }) {
2342
- return /* @__PURE__ */ jsx20(NavigationMenuPrimitive.Link, {
2343
- "data-density": density,
2344
- "data-slot": "navigation-menu-link",
2345
- 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),
2346
- ...props
2347
- });
2348
- }
2349
- function NavigationMenuIndicator({
2350
- density,
2351
- className,
2352
- children,
2353
- ...props
2354
- }) {
2355
- return /* @__PURE__ */ jsx20(NavigationMenuPrimitive.Icon, {
2356
- "data-density": density,
2357
- "data-slot": "navigation-menu-indicator",
2358
- 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),
2359
- ...props,
2360
- children: children ?? /* @__PURE__ */ jsx20(ChevronDownIcon4, {})
2361
- });
2362
- }
2363
- // src/components/Toast.tsx
2364
- import { Toast as ToastPrimitive } from "@base-ui/react/toast";
2365
- import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, LoaderCircleIcon, XIcon as XIcon2 } from "lucide-react";
2366
- import { jsx as jsx21, jsxs as jsxs15, Fragment } from "react/jsx-runtime";
2367
- function ToastProvider(props) {
2368
- return /* @__PURE__ */ jsx21(ToastPrimitive.Provider, {
2369
- ...props
2370
- });
2371
- }
2372
- function ToastPortal({ container, ref, children, ...props }) {
2373
- const resolvedContainer = usePortalContainer2(container);
2374
- const portal = usePortalNode(ref);
2375
- return /* @__PURE__ */ jsx21(ToastPrimitive.Portal, {
2376
- "data-slot": "toast-portal",
2377
- container: resolvedContainer,
2378
- ref: portal.ref,
2379
- ...props,
2380
- children: /* @__PURE__ */ jsx21(PortalProvider2, {
2381
- container: portal.node,
2382
- children
2383
- })
2384
- });
2385
- }
2386
- function ToastViewport({ density, dir, className, ...props }) {
2387
- const resolvedDensity = useDensity(density);
2388
- const inheritedDirection = useDirection2();
2389
- return /* @__PURE__ */ jsx21(ToastPrimitive.Viewport, {
2390
- dir: dir ?? inheritedDirection,
2391
- "data-density": resolvedDensity,
2392
- "data-slot": "toast-viewport",
2393
- className: (state) => cn2("pointer-events-none fixed inset-x-4 bottom-4 isolate mx-auto max-w-sm outline-none sm:right-4 sm:left-auto sm:mx-0 sm:w-full", typeof className === "function" ? className(state) : className),
2394
- ...props
2395
- });
2396
- }
2397
- function Toast({ density, className, ...props }) {
2398
- return /* @__PURE__ */ jsx21(ToastPrimitive.Root, {
2399
- "data-density": density,
2400
- "data-slot": "toast",
2401
- 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),
2402
- ...props
2403
- });
2404
- }
2405
- function ToastContent({ className, ...props }) {
2406
- return /* @__PURE__ */ jsx21(ToastPrimitive.Content, {
2407
- "data-slot": "toast-content",
2408
- className: (state) => cn2("flex items-center gap-control-gap p-panel", typeof className === "function" ? className(state) : className),
2409
- ...props
2410
- });
2411
- }
2412
- function ToastTitle({ className, ...props }) {
2413
- return /* @__PURE__ */ jsx21(ToastPrimitive.Title, {
2414
- "data-slot": "toast-title",
2415
- className: (state) => cn2("text-sm font-medium", typeof className === "function" ? className(state) : className),
2416
- ...props
2417
- });
2418
- }
2419
- function ToastDescription({ className, ...props }) {
2420
- return /* @__PURE__ */ jsx21(ToastPrimitive.Description, {
2421
- "data-slot": "toast-description",
2422
- className: (state) => cn2("text-sm text-muted-foreground", typeof className === "function" ? className(state) : className),
2423
- ...props
2424
- });
2425
- }
2426
- function ToastAction({
2427
- className,
2428
- render = /* @__PURE__ */ jsx21(Button2, {
2429
- variant: "outline",
2430
- size: "sm"
2431
- }),
2432
- ...props
2433
- }) {
2434
- return /* @__PURE__ */ jsx21(ToastPrimitive.Action, {
2435
- "data-slot": "toast-action",
2436
- render,
2437
- className: (state) => cn2("shrink-0", typeof className === "function" ? className(state) : className),
2438
- ...props
2439
- });
2440
- }
2441
- function ToastClose({
2442
- className,
2443
- children,
2444
- render = /* @__PURE__ */ jsx21(Button2, {
2445
- variant: "ghost",
2446
- size: "icon-sm"
2447
- }),
2448
- ...props
2449
- }) {
2450
- return /* @__PURE__ */ jsx21(ToastPrimitive.Close, {
2451
- "data-slot": "toast-close",
2452
- "aria-label": "Close toast",
2453
- render,
2454
- className: (state) => cn2("relative shrink-0 text-muted-foreground hover:text-foreground", typeof className === "function" ? className(state) : className),
2455
- ...props,
2456
- children: children ?? /* @__PURE__ */ jsx21(XIcon2, {
2457
- "aria-hidden": "true"
2458
- })
2459
- });
2460
- }
2461
- function ToastIcon({ type }) {
2462
- switch (type) {
2463
- case "success":
2464
- return /* @__PURE__ */ jsx21(CircleCheckIcon, {
2465
- "aria-hidden": "true"
2466
- });
2467
- case "info":
2468
- return /* @__PURE__ */ jsx21(InfoIcon, {
2469
- "aria-hidden": "true"
2470
- });
2471
- case "warning":
2472
- return /* @__PURE__ */ jsx21(TriangleAlertIcon, {
2473
- "aria-hidden": "true"
2474
- });
2475
- case "error":
2476
- return /* @__PURE__ */ jsx21(OctagonXIcon, {
2477
- "aria-hidden": "true",
2478
- className: "text-destructive"
2479
- });
2480
- case "loading":
2481
- return /* @__PURE__ */ jsx21(LoaderCircleIcon, {
2482
- "aria-hidden": "true",
2483
- className: "animate-spin motion-reduce:animate-none"
2484
- });
2485
- default:
2486
- return null;
2487
- }
2488
- }
2489
- function ToastList() {
2490
- const { toasts } = ToastPrimitive.useToastManager();
2491
- return /* @__PURE__ */ jsx21(Fragment, {
2492
- children: toasts.map((toastItem) => /* @__PURE__ */ jsx21(Toast, {
2493
- toast: toastItem,
2494
- children: /* @__PURE__ */ jsxs15(ToastContent, {
2495
- children: [
2496
- /* @__PURE__ */ jsx21("span", {
2497
- "data-slot": "toast-icon",
2498
- className: "shrink-0 empty:hidden [&_svg]:size-4",
2499
- children: /* @__PURE__ */ jsx21(ToastIcon, {
2500
- type: toastItem.type
2501
- })
2502
- }),
2503
- /* @__PURE__ */ jsxs15("div", {
2504
- className: "flex min-w-0 flex-1 flex-col gap-1",
2505
- children: [
2506
- /* @__PURE__ */ jsx21(ToastTitle, {}),
2507
- /* @__PURE__ */ jsx21(ToastDescription, {})
2508
- ]
2509
- }),
2510
- /* @__PURE__ */ jsx21(ToastAction, {}),
2511
- /* @__PURE__ */ jsx21(ToastClose, {})
2512
- ]
2513
- })
2514
- }, toastItem.id))
2515
- });
2516
- }
2517
- function ToastToaster({ children, density, ...props }) {
2518
- return /* @__PURE__ */ jsxs15(ToastProvider, {
2519
- ...props,
2520
- children: [
2521
- children,
2522
- /* @__PURE__ */ jsx21(ToastPortal, {
2523
- children: /* @__PURE__ */ jsx21(ToastViewport, {
2524
- density,
2525
- children: /* @__PURE__ */ jsx21(ToastList, {})
2526
- })
2527
- })
2528
- ]
2529
- });
2530
- }
2531
- var createToastManager = ToastPrimitive.createToastManager;
2532
- // src/hooks/useToastManager.ts
2533
- import { Toast as Toast2 } from "@base-ui/react/toast";
2534
- function useToastManager() {
2535
- return Toast2.useToastManager();
2536
- }
2537
- // src/components/Marker.tsx
2538
- import { mergeProps as mergeProps6 } from "@base-ui/react/merge-props";
2539
- import { useRender as useRender6 } from "@base-ui/react/use-render";
2540
- import { cva as cva4 } from "class-variance-authority";
2541
- import { jsx as jsx22 } from "react/jsx-runtime";
2542
- var markerVariants = 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", {
2543
- variants: {
2544
- variant: {
2545
- default: "",
2546
- separator: "before:me-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ms-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
2547
- border: "border-b border-border pb-control-gap"
2548
- }
2549
- }
2550
- });
2551
- function Marker({ density, className, variant = "default", render, ...props }) {
2552
- return useRender6({
2553
- defaultTagName: "div",
2554
- props: mergeProps6({ className: cn2(markerVariants({ variant, className })) }, props),
2555
- render,
2556
- state: { slot: "marker", variant, density }
2557
- });
2558
- }
2559
- function MarkerIcon({ density, className, ...props }) {
2560
- return /* @__PURE__ */ jsx22("span", {
2561
- "data-density": density,
2562
- "data-slot": "marker-icon",
2563
- "aria-hidden": "true",
2564
- className: cn2("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2565
- ...props
2566
- });
2567
- }
2568
- function MarkerContent({ density, className, ...props }) {
2569
- return /* @__PURE__ */ jsx22("span", {
2570
- "data-density": density,
2571
- "data-slot": "marker-content",
2572
- 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),
2573
- ...props
2574
- });
2575
- }
2576
- // src/components/Bubble.tsx
2577
- import { mergeProps as mergeProps7 } from "@base-ui/react/merge-props";
2578
- import { useRender as useRender7 } from "@base-ui/react/use-render";
2579
- import { cva as cva5 } from "class-variance-authority";
2580
- import { jsx as jsx23 } from "react/jsx-runtime";
2581
- function BubbleGroup({ density, className, ...props }) {
2582
- return /* @__PURE__ */ jsx23("div", {
2583
- "data-density": density,
2584
- "data-slot": "bubble-group",
2585
- className: cn2("flex min-w-0 flex-col gap-control-gap", className),
2586
- ...props
2587
- });
2588
- }
2589
- var bubbleVariants = cva5("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
2590
- variants: {
2591
- variant: {
2592
- default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
2593
- secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
2594
- muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
2595
- tinted: "*:data-[slot=bubble-content]:bg-primary/10 *:data-[slot=bubble-content]:text-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/20",
2596
- outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground",
2597
- ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground",
2598
- destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20"
2599
- }
2600
- },
2601
- defaultVariants: { variant: "default" }
2602
- });
2603
- function Bubble({ density, variant = "default", align = "start", className, ...props }) {
2604
- return /* @__PURE__ */ jsx23("div", {
2605
- "data-density": density,
2606
- "data-slot": "bubble",
2607
- "data-variant": variant,
2608
- "data-align": align,
2609
- className: cn2(bubbleVariants({ variant }), className),
2610
- ...props
2611
- });
2612
- }
2613
- function BubbleContent({ density, className, render, ...props }) {
2614
- return useRender7({
2615
- defaultTagName: "div",
2616
- props: mergeProps7({
2617
- className: cn2("w-fit max-w-full min-w-0 overflow-hidden rounded-sm border border-transparent px-control-x py-control-gap text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [&:is(button)]:text-start [&:is(button,a)]:transition-colors motion-reduce:transition-none [&:is(button,a)]:outline-none [&:is(button,a)]:focus-visible:border-ring [&:is(button,a)]:focus-visible:ring-1 [&:is(button,a)]:focus-visible:ring-ring", className)
2618
- }, props),
2619
- render,
2620
- state: { slot: "bubble-content", density }
2621
- });
2622
- }
2623
- var bubbleReactionsVariants = cva5("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-sm border border-border bg-muted px-1.5 py-0.5 text-sm ring-2 ring-card has-[button]:p-0", {
2624
- variants: {
2625
- side: { top: "top-0 -translate-y-3/4", bottom: "bottom-0 translate-y-3/4" },
2626
- align: { start: "start-3", end: "end-3" }
2627
- },
2628
- defaultVariants: { side: "bottom", align: "end" }
2629
- });
2630
- function BubbleReactions({
2631
- density,
2632
- side = "bottom",
2633
- align = "end",
2634
- className,
2635
- ...props
2636
- }) {
2637
- return /* @__PURE__ */ jsx23("div", {
2638
- "data-density": density,
2639
- "data-slot": "bubble-reactions",
2640
- "data-align": align,
2641
- "data-side": side,
2642
- className: cn2(bubbleReactionsVariants({ side, align }), className),
2643
- ...props
2644
- });
2645
- }
2646
- // src/components/Message.tsx
2647
- import { useContext as useContext2, useLayoutEffect, useMemo as useMemo3, useRef as useRef2, useState } from "react";
2648
- import { useRender as useRender8 } from "@base-ui/react/use-render";
2649
-
2650
- // src/message/MessageContext.ts
2651
- import { createContext as createContext2 } from "react";
2652
- var MessageContext = createContext2(null);
2653
-
2654
- // src/components/Message.tsx
2655
- import { jsx as jsx24 } from "react/jsx-runtime";
2656
- function MessageGroup({ density, className, ...props }) {
2657
- return /* @__PURE__ */ jsx24("div", {
2658
- "data-density": density,
2659
- "data-slot": "message-group",
2660
- className: cn2("flex min-w-0 flex-col gap-control-gap", className),
2661
- ...props
2662
- });
2663
- }
2664
- function Message({ density, className, align = "start", style, ...props }) {
2665
- const [footerOffset, setFooterOffset] = useState(0);
2666
- const context = useMemo3(() => ({ setFooterOffset }), []);
2667
- const messageStyle = { ...style, "--message-footer-offset": `${footerOffset}px` };
2668
- return /* @__PURE__ */ jsx24(MessageContext.Provider, {
2669
- value: context,
2670
- children: /* @__PURE__ */ jsx24("div", {
2671
- "data-density": density,
2672
- "data-slot": "message",
2673
- "data-align": align,
2674
- style: messageStyle,
2675
- className: cn2("group/message relative flex w-full min-w-0 items-end gap-control-gap text-sm data-[align=end]:flex-row-reverse", className),
2676
- ...props
2677
- })
2678
- });
2679
- }
2680
- function MessageAvatar({ density, className, ...props }) {
2681
- return /* @__PURE__ */ jsx24("div", {
2682
- "data-density": density,
2683
- "data-slot": "message-avatar",
2684
- 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),
2685
- ...props
2686
- });
2687
- }
2688
- function MessageContent({ density, className, ...props }) {
2689
- return /* @__PURE__ */ jsx24("div", {
2690
- "data-density": density,
2691
- "data-slot": "message-content",
2692
- 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),
2693
- ...props
2694
- });
2695
- }
2696
- function MessageHeader({ density, className, ...props }) {
2697
- return /* @__PURE__ */ jsx24("div", {
2698
- "data-density": density,
2699
- "data-slot": "message-header",
2700
- 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),
2701
- ...props
2702
- });
2703
- }
2704
- function MessageFooter({ density, className, ...props }) {
2705
- const context = useContext2(MessageContext);
2706
- const footerRef = useRef2(null);
2707
- useLayoutEffect(() => {
2708
- const footer = footerRef.current;
2709
- const content = footer?.parentElement;
2710
- if (!context || !footer || !content)
2711
- return;
2712
- const measure = () => {
2713
- const surface = footer.previousElementSibling;
2714
- context.setFooterOffset(surface ? content.getBoundingClientRect().bottom - surface.getBoundingClientRect().bottom : 0);
2715
- };
2716
- measure();
2717
- const observer = new ResizeObserver(measure);
2718
- observer.observe(footer, { box: "border-box" });
2719
- observer.observe(content, { box: "border-box" });
2720
- return () => {
2721
- observer.disconnect();
2722
- context.setFooterOffset(0);
2723
- };
2724
- }, [context]);
2725
- return useRender8({
2726
- defaultTagName: "div",
2727
- ref: footerRef,
2728
- state: { slot: "message-footer", density },
2729
- props: {
2730
- ...props,
2731
- 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 group-data-[align=end]/message:justify-end", className)
2732
- }
2733
- });
2734
- }
2735
- // src/components/Attachment.tsx
2736
- import { mergeProps as mergeProps8 } from "@base-ui/react/merge-props";
2737
- import { useRender as useRender9 } from "@base-ui/react/use-render";
2738
- import { cva as cva6 } from "class-variance-authority";
2739
- import { jsx as jsx25 } from "react/jsx-runtime";
2740
- 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", {
2741
- variants: {
2742
- size: {
2743
- default: "gap-control-gap text-sm has-data-[slot=attachment-content]:px-control-x has-data-[slot=attachment-content]:py-control-gap has-data-[slot=attachment-media]:p-control-gap",
2744
- sm: "gap-control-gap text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
2745
- xs: "gap-1.5 text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1"
2746
- },
2747
- orientation: {
2748
- horizontal: "min-w-40 items-center",
2749
- vertical: "w-24 flex-col has-data-[slot=attachment-content]:w-30"
2750
- }
2751
- }
2752
- });
2753
- function Attachment({
2754
- density,
2755
- className,
2756
- state = "done",
2757
- size = "default",
2758
- orientation = "horizontal",
2759
- ...props
2760
- }) {
2761
- return /* @__PURE__ */ jsx25("div", {
2762
- "data-slot": "attachment",
2763
- "data-density": density,
2764
- "data-state": state,
2765
- "data-size": size,
2766
- "data-orientation": orientation,
2767
- className: cn2(attachmentVariants({ size, orientation }), className),
2768
- ...props
2769
- });
2770
- }
2771
- var attachmentMediaVariants = cva6("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-sm bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[orientation=horizontal]/attachment:group-data-[size=sm]/attachment:w-8 group-data-[orientation=horizontal]/attachment:group-data-[size=xs]/attachment:w-7 group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
2772
- variants: {
2773
- variant: {
2774
- icon: "",
2775
- image: "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
2776
- }
2777
- },
2778
- defaultVariants: { variant: "icon" }
2779
- });
2780
- function AttachmentMedia({ density, className, variant = "icon", ...props }) {
2781
- return /* @__PURE__ */ jsx25("div", {
2782
- "data-slot": "attachment-media",
2783
- "data-density": density,
2784
- "data-variant": variant,
2785
- className: cn2(attachmentMediaVariants({ variant }), className),
2786
- ...props
2787
- });
2788
- }
2789
- function AttachmentContent({ density, className, ...props }) {
2790
- return /* @__PURE__ */ jsx25("div", {
2791
- "data-slot": "attachment-content",
2792
- "data-density": density,
2793
- className: cn2("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className),
2794
- ...props
2795
- });
2796
- }
2797
- function AttachmentTitle({ density, className, ...props }) {
2798
- return /* @__PURE__ */ jsx25("span", {
2799
- "data-slot": "attachment-title",
2800
- "data-density": density,
2801
- 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),
2802
- ...props
2803
- });
2804
- }
2805
- function AttachmentDescription({ density, className, ...props }) {
2806
- return /* @__PURE__ */ jsx25("span", {
2807
- "data-slot": "attachment-description",
2808
- "data-density": density,
2809
- 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),
2810
- ...props
2811
- });
2812
- }
2813
- function AttachmentActions({ density, className, ...props }) {
2814
- return /* @__PURE__ */ jsx25("div", {
2815
- "data-slot": "attachment-actions",
2816
- "data-density": density,
2817
- 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),
2818
- ...props
2819
- });
2820
- }
2821
- function AttachmentAction({
2822
- className,
2823
- variant = "ghost",
2824
- size = "icon-xs",
2825
- ...props
2826
- }) {
2827
- return /* @__PURE__ */ jsx25(Button2, {
2828
- "data-slot": "attachment-action",
2829
- variant,
2830
- size,
2831
- className,
2832
- ...props
2833
- });
2834
- }
2835
- function AttachmentTrigger({ density, className, render, type, ...props }) {
2836
- return useRender9({
2837
- defaultTagName: "button",
2838
- props: mergeProps8({ type: render ? type : type ?? "button", className: cn2("absolute inset-0 z-10 outline-none", className) }, props),
2839
- render,
2840
- state: { slot: "attachment-trigger", density }
2841
- });
2842
- }
2843
- function AttachmentGroup({ density, className, ...props }) {
2844
- return /* @__PURE__ */ jsx25("div", {
2845
- "data-slot": "attachment-group",
2846
- "data-density": density,
2847
- 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),
2848
- ...props
2849
- });
2850
- }
2851
- // src/components/InlineEdit.tsx
2852
- import { useEffect as useEffect2, useRef as useRef3, useState as useState2 } from "react";
2853
- import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
2854
- function InlineEdit({
2855
- label,
2856
- value,
2857
- density,
2858
- isDisabled = false,
2859
- shouldSelectOnMount = true,
2860
- onValueChange,
2861
- onCommit,
2862
- onCancel
2863
- }) {
2864
- const input = useRef3(null);
2865
- const isFinished = useRef3(false);
2866
- const shouldCancel = useRef3(false);
2867
- const [isSaving, setSaving] = useState2(false);
2868
- const [error, setError] = useState2("");
2869
- useEffect2(() => {
2870
- input.current?.focus();
2871
- if (shouldSelectOnMount)
2872
- input.current?.select();
2873
- }, [shouldSelectOnMount]);
2874
- const save = async () => {
2875
- if (isFinished.current || isDisabled)
2876
- return;
2877
- isFinished.current = true;
2878
- setSaving(true);
2879
- setError("");
2880
- try {
2881
- await onCommit(value);
2882
- } catch (error) {
2883
- isFinished.current = false;
2884
- setError(error instanceof Error ? error.message : "Could not save this edit.");
2885
- } finally {
2886
- setSaving(false);
2887
- }
2888
- };
2889
- return /* @__PURE__ */ jsxs16("form", {
2890
- className: "flex min-w-0 flex-col gap-1",
2891
- onSubmit: (event) => {
2892
- event.preventDefault();
2893
- save();
2894
- },
2895
- children: [
2896
- /* @__PURE__ */ jsx26(Input2, {
2897
- ref: input,
2898
- density,
2899
- "aria-label": label,
2900
- "aria-invalid": Boolean(error),
2901
- "aria-description": "Enter saves. Escape cancels.",
2902
- value,
2903
- disabled: isDisabled || isSaving,
2904
- onChange: (event) => onValueChange(event.target.value),
2905
- onBlur: () => {
2906
- if (shouldCancel.current && !isFinished.current) {
2907
- isFinished.current = true;
2908
- onCancel();
2909
- } else
2910
- save();
2911
- },
2912
- onKeyDown: (event) => {
2913
- if (event.key === "Escape") {
2914
- event.preventDefault();
2915
- event.stopPropagation();
2916
- shouldCancel.current = true;
2917
- event.currentTarget.blur();
2918
- } else if (event.key === "Enter") {
2919
- event.preventDefault();
2920
- event.currentTarget.blur();
2921
- }
2922
- }
2923
- }),
2924
- error && /* @__PURE__ */ jsx26("p", {
2925
- role: "alert",
2926
- className: "text-xs text-destructive",
2927
- children: error
2928
- })
2929
- ]
2930
- });
2931
- }
2932
- // src/components/StarRating.tsx
2933
- import { Radio } from "@base-ui/react/radio";
2934
- import { RadioGroup } from "@base-ui/react/radio-group";
2935
- import { StarIcon, CircleOffIcon } from "lucide-react";
2936
- import { jsx as jsx27 } from "react/jsx-runtime";
2937
- function StarRating({ label, value, disabled, density, onValueChange }) {
2938
- return /* @__PURE__ */ jsx27(RadioGroup, {
2939
- "aria-label": label,
2940
- value,
2941
- disabled,
2942
- "data-density": density,
2943
- className: "inline-flex w-fit shrink-0 items-center gap-0.5",
2944
- onValueChange,
2945
- children: [1, 2, 3, 4, 5, 0].map((star) => /* @__PURE__ */ jsx27(Radio.Root, {
2946
- value: star,
2947
- nativeButton: true,
2948
- render: /* @__PURE__ */ jsx27("button", {
2949
- type: "button"
2950
- }),
2951
- "aria-label": star === 0 ? "Unrated" : `${star} ${star === 1 ? "star" : "stars"}`,
2952
- title: star === 0 ? "Clear rating" : `${star} stars`,
2953
- 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",
2954
- children: star === 0 ? /* @__PURE__ */ jsx27(CircleOffIcon, {
2955
- "aria-hidden": "true",
2956
- className: "size-3"
2957
- }) : /* @__PURE__ */ jsx27(StarIcon, {
2958
- "aria-hidden": "true",
2959
- className: star <= value ? "size-3.5 fill-primary text-primary" : "size-3.5"
2960
- })
2961
- }, star))
2962
- });
2963
- }
2964
- // src/components/ConfirmationDialog.tsx
2965
- import { useState as useState3 } from "react";
2966
- import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2967
- function ConfirmationDialog({
2968
- open,
2969
- title,
2970
- description,
2971
- confirmLabel,
2972
- onOpenChange,
2973
- onConfirm
2974
- }) {
2975
- const [isPending, setPending] = useState3(false);
2976
- const [error, setError] = useState3("");
2977
- return /* @__PURE__ */ jsx28(AlertDialog, {
2978
- open,
2979
- onOpenChange: (next) => {
2980
- if (!isPending) {
2981
- setError("");
2982
- onOpenChange(next);
2983
- }
2984
- },
2985
- children: /* @__PURE__ */ jsxs17(AlertDialogContent, {
2986
- children: [
2987
- /* @__PURE__ */ jsxs17(AlertDialogHeader, {
2988
- children: [
2989
- /* @__PURE__ */ jsx28(AlertDialogTitle, {
2990
- children: title
2991
- }),
2992
- /* @__PURE__ */ jsx28(AlertDialogDescription, {
2993
- children: description
2994
- })
2995
- ]
2996
- }),
2997
- error && /* @__PURE__ */ jsx28(Alert2, {
2998
- variant: "destructive",
2999
- children: /* @__PURE__ */ jsx28(AlertDescription2, {
3000
- children: error
3001
- })
3002
- }),
3003
- /* @__PURE__ */ jsxs17(AlertDialogFooter, {
3004
- children: [
3005
- /* @__PURE__ */ jsx28(AlertDialogCancel, {
3006
- disabled: isPending,
3007
- children: "Cancel"
3008
- }),
3009
- /* @__PURE__ */ jsx28(Button2, {
3010
- variant: "destructive",
3011
- disabled: isPending,
3012
- onClick: async () => {
3013
- setPending(true);
3014
- setError("");
3015
- try {
3016
- await onConfirm();
3017
- onOpenChange(false);
3018
- } catch (error) {
3019
- setError(error instanceof Error ? error.message : "The action could not be completed.");
3020
- } finally {
3021
- setPending(false);
3022
- }
3023
- },
3024
- children: isPending ? "Working…" : confirmLabel
3025
- })
3026
- ]
3027
- })
3028
- ]
3029
- })
3030
- });
3031
- }
3032
- // src/components/ImagePicker.tsx
3033
- import { useRef as useRef4 } from "react";
3034
- import { ImageIcon, UploadIcon } from "lucide-react";
3035
-
3036
- // src/hooks/useObjectURL.ts
3037
- import { useEffect as useEffect3, useState as useState4 } from "react";
3038
- function useObjectURL(file) {
3039
- const [url, setURL] = useState4();
3040
- useEffect3(() => {
3041
- if (!file) {
3042
- setURL(undefined);
3043
- return;
3044
- }
3045
- const next = URL.createObjectURL(file);
3046
- setURL(next);
3047
- return () => URL.revokeObjectURL(next);
3048
- }, [file]);
3049
- return url;
3050
- }
3051
-
3052
- // src/components/ImagePicker.tsx
3053
- import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
3054
- function ImagePicker({ src, file, label, disabled, onFileChange, onClear }) {
3055
- const input = useRef4(null);
3056
- const preview = useObjectURL(file);
3057
- const image = file === null ? undefined : preview ?? src;
3058
- return /* @__PURE__ */ jsxs18("figure", {
3059
- className: "flex min-w-0 flex-col items-center gap-3",
3060
- "aria-label": label,
3061
- children: [
3062
- /* @__PURE__ */ jsxs18(Avatar2, {
3063
- size: "preview",
3064
- shape: "square",
3065
- children: [
3066
- /* @__PURE__ */ jsx29(AvatarImage2, {
3067
- src: image,
3068
- alt: label
3069
- }),
3070
- /* @__PURE__ */ jsx29(AvatarFallback2, {
3071
- children: /* @__PURE__ */ jsx29(ImageIcon, {
3072
- className: "size-12",
3073
- "aria-hidden": "true"
3074
- })
3075
- })
3076
- ]
3077
- }),
3078
- /* @__PURE__ */ jsx29("input", {
3079
- ref: input,
3080
- hidden: true,
3081
- type: "file",
3082
- accept: "image/png,image/jpeg,image/gif",
3083
- "aria-label": "Choose image file",
3084
- disabled,
3085
- onChange: (event) => {
3086
- const selected = event.currentTarget.files?.[0];
3087
- if (selected)
3088
- onFileChange(selected);
3089
- event.currentTarget.value = "";
3090
- }
3091
- }),
3092
- /* @__PURE__ */ jsxs18("div", {
3093
- className: "flex flex-wrap justify-center gap-2",
3094
- children: [
3095
- /* @__PURE__ */ jsxs18(Button2, {
3096
- type: "button",
3097
- variant: "outline",
3098
- disabled,
3099
- onClick: () => input.current?.click(),
3100
- children: [
3101
- /* @__PURE__ */ jsx29(UploadIcon, {
3102
- "data-icon": "inline-start"
3103
- }),
3104
- "Upload image"
3105
- ]
3106
- }),
3107
- /* @__PURE__ */ jsx29(Button2, {
3108
- type: "button",
3109
- variant: "outline",
3110
- disabled: disabled || !image,
3111
- onClick: onClear,
3112
- children: "Unset image"
3113
- })
3114
- ]
3115
- })
3116
- ]
3117
- });
3118
- }
3119
- // src/components/NumberField.tsx
3120
- import { NumberField as NumberFieldPrimitive } from "@base-ui/react/number-field";
3121
- import { MinusIcon, PlusIcon, MoveHorizontalIcon } from "lucide-react";
3122
- import { jsx as jsx30 } from "react/jsx-runtime";
3123
- function NumberField({ density, className, ...props }) {
3124
- return /* @__PURE__ */ jsx30(NumberFieldPrimitive.Root, {
3125
- "data-density": density,
3126
- "data-slot": "number-field",
3127
- className: (state) => cn2("flex min-w-0 flex-col gap-field-gap", typeof className === "function" ? className(state) : className),
3128
- ...props
3129
- });
3130
- }
3131
- function NumberFieldGroup({
3132
- density,
3133
- className,
3134
- ...props
3135
- }) {
3136
- return /* @__PURE__ */ jsx30(NumberFieldPrimitive.Group, {
3137
- "data-density": density,
3138
- "data-slot": "number-field-group",
3139
- className: (state) => cn2("flex h-control min-w-0 items-stretch rounded-sm border border-input bg-secondary text-foreground transition-colors focus-within:border-ring focus-within:ring-1 focus-within:ring-ring data-disabled:opacity-50 motion-reduce:transition-none", typeof className === "function" ? className(state) : className),
3140
- ...props
3141
- });
3142
- }
3143
- function NumberFieldInput({
3144
- density,
3145
- className,
3146
- ...props
3147
- }) {
3148
- return /* @__PURE__ */ jsx30(NumberFieldPrimitive.Input, {
3149
- "data-density": density,
3150
- "data-slot": "number-field-input",
3151
- className: (state) => cn2("min-w-0 flex-1 bg-transparent px-control-x text-center text-sm tabular-nums outline-none disabled:cursor-not-allowed", typeof className === "function" ? className(state) : className),
3152
- ...props
3153
- });
3154
- }
3155
- function NumberFieldDecrement({
3156
- density,
3157
- className,
3158
- children = /* @__PURE__ */ jsx30(MinusIcon, {}),
3159
- ...props
3160
- }) {
3161
- return /* @__PURE__ */ jsx30(NumberFieldPrimitive.Decrement, {
3162
- "data-density": density,
3163
- "data-slot": "number-field-decrement",
3164
- className: (state) => cn2("flex w-control shrink-0 items-center justify-center rounded-s-sm outline-none hover:bg-muted focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-3.5", typeof className === "function" ? className(state) : className),
3165
- ...props,
3166
- children
3167
- });
3168
- }
3169
- function NumberFieldIncrement({
3170
- density,
3171
- className,
3172
- children = /* @__PURE__ */ jsx30(PlusIcon, {}),
3173
- ...props
3174
- }) {
3175
- return /* @__PURE__ */ jsx30(NumberFieldPrimitive.Increment, {
3176
- "data-density": density,
3177
- "data-slot": "number-field-increment",
3178
- className: (state) => cn2("flex w-control shrink-0 items-center justify-center rounded-e-sm outline-none hover:bg-muted focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-3.5", typeof className === "function" ? className(state) : className),
3179
- ...props,
3180
- children
3181
- });
3182
- }
3183
- function NumberFieldScrubArea({
3184
- density,
3185
- className,
3186
- ...props
3187
- }) {
3188
- return /* @__PURE__ */ jsx30(NumberFieldPrimitive.ScrubArea, {
3189
- "data-density": density,
3190
- "data-slot": "number-field-scrub-area",
3191
- className: (state) => cn2("flex w-fit cursor-ew-resize items-center gap-control-gap text-sm font-medium", typeof className === "function" ? className(state) : className),
3192
- ...props
3193
- });
3194
- }
3195
- function NumberFieldScrubAreaCursor({
3196
- density,
3197
- className,
3198
- children = /* @__PURE__ */ jsx30(MoveHorizontalIcon, {}),
3199
- ...props
3200
- }) {
3201
- const resolvedDensity = useDensity(density);
3202
- return /* @__PURE__ */ jsx30(NumberFieldPrimitive.ScrubAreaCursor, {
3203
- "data-density": resolvedDensity,
3204
- "data-slot": "number-field-scrub-area-cursor",
3205
- className: (state) => cn2("z-50 font-sans text-sm text-foreground [&_svg]:size-5", typeof className === "function" ? className(state) : className),
3206
- ...props,
3207
- children
3208
- });
3209
- }
3210
- // src/components/Meter.tsx
3211
- import { Meter as MeterPrimitive } from "@base-ui/react/meter";
3212
- import { jsx as jsx31 } from "react/jsx-runtime";
3213
- function Meter({ density, className, ...props }) {
3214
- return /* @__PURE__ */ jsx31(MeterPrimitive.Root, {
3215
- "data-density": density,
3216
- "data-slot": "meter",
3217
- className: (state) => cn2("flex min-w-0 flex-wrap items-center gap-field-gap", typeof className === "function" ? className(state) : className),
3218
- ...props
3219
- });
3220
- }
3221
- function MeterLabel({ density, className, ...props }) {
3222
- return /* @__PURE__ */ jsx31(MeterPrimitive.Label, {
3223
- "data-density": density,
3224
- "data-slot": "meter-label",
3225
- className: (state) => cn2("text-sm font-medium", typeof className === "function" ? className(state) : className),
3226
- ...props
3227
- });
3228
- }
3229
- function MeterValue({ density, className, ...props }) {
3230
- return /* @__PURE__ */ jsx31(MeterPrimitive.Value, {
3231
- "data-density": density,
3232
- "data-slot": "meter-value",
3233
- className: (state) => cn2("ms-auto text-sm text-muted-foreground tabular-nums", typeof className === "function" ? className(state) : className),
3234
- ...props
3235
- });
3236
- }
3237
- function MeterTrack({ density, className, ...props }) {
3238
- return /* @__PURE__ */ jsx31(MeterPrimitive.Track, {
3239
- "data-density": density,
3240
- "data-slot": "meter-track",
3241
- className: (state) => cn2("h-1 w-full overflow-hidden rounded-sm bg-muted", typeof className === "function" ? className(state) : className),
3242
- ...props
3243
- });
3244
- }
3245
- function MeterIndicator({
3246
- density,
3247
- className,
3248
- ...props
3249
- }) {
3250
- return /* @__PURE__ */ jsx31(MeterPrimitive.Indicator, {
3251
- "data-density": density,
3252
- "data-slot": "meter-indicator",
3253
- className: (state) => cn2("h-full bg-primary transition-[width] motion-reduce:transition-none", typeof className === "function" ? className(state) : className),
3254
- ...props
3255
- });
3256
- }
3257
- // src/components/Stepper.tsx
3258
- import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
3259
- import { CheckIcon as CheckIcon5 } from "lucide-react";
3260
- import { jsx as jsx32 } from "react/jsx-runtime";
3261
- function Stepper({ density, className, ...props }) {
3262
- return /* @__PURE__ */ jsx32(TabsPrimitive.Root, {
3263
- "data-density": density,
3264
- "data-slot": "stepper",
3265
- className: (state) => cn2("group/stepper flex min-w-0 flex-col gap-panel data-[orientation=vertical]:flex-row", typeof className === "function" ? className(state) : className),
3266
- ...props
3267
- });
3268
- }
3269
- function StepperList({
3270
- density,
3271
- className,
3272
- activateOnFocus = false,
3273
- ...props
3274
- }) {
3275
- return /* @__PURE__ */ jsx32(TabsPrimitive.List, {
3276
- "data-density": density,
3277
- "data-slot": "stepper-list",
3278
- activateOnFocus,
3279
- className: (state) => cn2("flex min-w-0 gap-panel group-data-[orientation=vertical]/stepper:flex-col", typeof className === "function" ? className(state) : className),
3280
- ...props
3281
- });
3282
- }
3283
- function StepperTrigger({ density, className, ...props }) {
3284
- return /* @__PURE__ */ jsx32(TabsPrimitive.Tab, {
3285
- "data-density": density,
3286
- "data-slot": "stepper-trigger",
3287
- 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),
3288
- ...props
3289
- });
3290
- }
3291
- function StepperIndicator({ completed = false, children, className, ...props }) {
3292
- return /* @__PURE__ */ jsx32("span", {
3293
- "aria-hidden": "true",
3294
- "data-slot": "stepper-indicator",
3295
- "data-completed": completed || undefined,
3296
- 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),
3297
- ...props,
3298
- children: completed ? /* @__PURE__ */ jsx32(CheckIcon5, {}) : children
3299
- });
3300
- }
3301
- function StepperContent({ density, className, ...props }) {
3302
- return /* @__PURE__ */ jsx32(TabsPrimitive.Panel, {
3303
- "data-density": density,
3304
- "data-slot": "stepper-content",
3305
- className: (state) => cn2("min-w-0 flex-1 outline-none focus-visible:ring-1 focus-visible:ring-ring", typeof className === "function" ? className(state) : className),
3306
- ...props
3307
- });
3308
- }
3309
- // src/components/AppShell.tsx
3310
- import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
3311
- function AppShell({
3312
- navigation,
3313
- brand,
3314
- children,
3315
- header,
3316
- sidebarFooter,
3317
- footer,
3318
- height = "100dvh",
3319
- defaultSidebarOpen = true,
3320
- label = "Application",
3321
- density
3322
- }) {
3323
- return /* @__PURE__ */ jsxs19(SidebarProvider2, {
3324
- density,
3325
- defaultOpen: defaultSidebarOpen,
3326
- className: "relative min-h-0",
3327
- style: { height },
3328
- "data-scroll": "none",
3329
- children: [
3330
- /* @__PURE__ */ jsxs19(Sidebar2, {
3331
- collapsible: "icon",
3332
- position: "container",
3333
- children: [
3334
- /* @__PURE__ */ jsx33(SidebarHeader2, {
3335
- children: brand
3336
- }),
3337
- /* @__PURE__ */ jsx33(SidebarContent2, {
3338
- children: /* @__PURE__ */ jsx33("nav", {
3339
- "aria-label": "Primary navigation",
3340
- children: /* @__PURE__ */ jsx33(SidebarGroup2, {
3341
- children: /* @__PURE__ */ jsx33(SidebarMenu2, {
3342
- children: navigation.map((item) => /* @__PURE__ */ jsx33(SidebarMenuItem2, {
3343
- children: /* @__PURE__ */ jsxs19(SidebarMenuButton2, {
3344
- render: /* @__PURE__ */ jsx33("a", {
3345
- href: item.href,
3346
- "aria-current": item.active ? "page" : undefined
3347
- }),
3348
- isActive: item.active,
3349
- tooltip: item.label,
3350
- children: [
3351
- item.icon,
3352
- /* @__PURE__ */ jsx33("span", {
3353
- children: item.label
3354
- })
3355
- ]
3356
- })
3357
- }, item.id))
3358
- })
3359
- })
3360
- })
3361
- }),
3362
- sidebarFooter && /* @__PURE__ */ jsx33(SidebarFooter2, {
3363
- children: sidebarFooter
3364
- })
3365
- ]
3366
- }),
3367
- /* @__PURE__ */ jsxs19(SidebarInset2, {
3368
- "aria-label": label,
3369
- className: "min-h-0 min-w-0",
3370
- "data-scroll": "none",
3371
- children: [
3372
- /* @__PURE__ */ jsxs19("header", {
3373
- "data-scroll": "none",
3374
- className: "flex shrink-0 items-center gap-control-gap border-b border-border p-panel",
3375
- children: [
3376
- /* @__PURE__ */ jsx33(SidebarTrigger2, {}),
3377
- /* @__PURE__ */ jsx33(Separator2, {
3378
- orientation: "vertical",
3379
- className: "h-control"
3380
- }),
3381
- header
3382
- ]
3383
- }),
3384
- /* @__PURE__ */ jsx33(ScrollArea, {
3385
- className: "min-h-0 flex-1",
3386
- children: /* @__PURE__ */ jsx33("div", {
3387
- className: "flex min-w-0 flex-col gap-panel p-panel",
3388
- children
3389
- })
3390
- }),
3391
- footer && /* @__PURE__ */ jsx33("footer", {
3392
- className: "shrink-0 border-t border-border p-panel",
3393
- "data-scroll": "none",
3394
- children: footer
3395
- })
3396
- ]
3397
- })
3398
- ]
3399
- });
3400
- }
3401
- // src/components/PageHeader.tsx
3402
- import { jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
3403
- function PageHeader({ title, description, breadcrumbs, actions, density }) {
3404
- return /* @__PURE__ */ jsxs20("header", {
3405
- "data-density": density,
3406
- "data-slot": "page-header",
3407
- "data-scroll": "none",
3408
- className: "flex min-w-0 flex-col gap-field-gap",
3409
- children: [
3410
- breadcrumbs,
3411
- /* @__PURE__ */ jsxs20("div", {
3412
- className: "flex min-w-0 flex-wrap items-start justify-between gap-panel",
3413
- children: [
3414
- /* @__PURE__ */ jsxs20("div", {
3415
- className: "min-w-0",
3416
- children: [
3417
- /* @__PURE__ */ jsx34("h1", {
3418
- className: "text-xl font-semibold text-foreground",
3419
- children: title
3420
- }),
3421
- description && /* @__PURE__ */ jsx34("div", {
3422
- className: "mt-1 text-sm text-muted-foreground",
3423
- children: description
3424
- })
3425
- ]
3426
- }),
3427
- actions && /* @__PURE__ */ jsx34("div", {
3428
- className: "flex shrink-0 flex-wrap items-center gap-control-gap",
3429
- children: actions
3430
- })
3431
- ]
3432
- })
3433
- ]
3434
- });
3435
- }
3436
- // src/components/WorkspaceSwitcher.tsx
3437
- import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
3438
- function WorkspaceSwitcher({
3439
- workspaces,
3440
- value,
3441
- defaultValue,
3442
- onValueChange,
3443
- disabled,
3444
- label = "Workspace",
3445
- density
3446
- }) {
3447
- return /* @__PURE__ */ jsxs21(Select, {
3448
- items: workspaces,
3449
- value,
3450
- defaultValue: defaultValue ?? workspaces[0]?.value,
3451
- onValueChange: (next) => {
3452
- if (next !== null)
3453
- onValueChange?.(next);
3454
- },
3455
- disabled,
3456
- children: [
3457
- /* @__PURE__ */ jsx35(SelectTrigger, {
3458
- "aria-label": label,
3459
- density,
3460
- children: /* @__PURE__ */ jsx35(SelectValue, {})
3461
- }),
3462
- /* @__PURE__ */ jsx35(SelectContent, {
3463
- density,
3464
- children: /* @__PURE__ */ jsx35(SelectGroup, {
3465
- children: workspaces.map((workspace) => /* @__PURE__ */ jsx35(SelectItem, {
3466
- value: workspace.value,
3467
- children: workspace.label
3468
- }, workspace.value))
3469
- })
3470
- })
3471
- ]
3472
- });
3473
- }
3474
- // src/components/AccountMenu.tsx
3475
- import { jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
3476
- function AccountMenu({ name, email, image, onAction, density }) {
3477
- return /* @__PURE__ */ jsxs22(DropdownMenu2, {
3478
- children: [
3479
- /* @__PURE__ */ jsxs22(DropdownMenuTrigger2, {
3480
- render: /* @__PURE__ */ jsx36(Button2, {
3481
- variant: "ghost",
3482
- density
3483
- }),
3484
- "aria-label": `Account menu for ${name}`,
3485
- children: [
3486
- /* @__PURE__ */ jsxs22(Avatar2, {
3487
- className: "size-control",
3488
- children: [
3489
- /* @__PURE__ */ jsx36(AvatarImage2, {
3490
- src: image,
3491
- alt: ""
3492
- }),
3493
- /* @__PURE__ */ jsx36(AvatarFallback2, {
3494
- children: name.slice(0, 2).toUpperCase()
3495
- })
3496
- ]
3497
- }),
3498
- /* @__PURE__ */ jsx36("span", {
3499
- children: name
3500
- })
3501
- ]
3502
- }),
3503
- /* @__PURE__ */ jsx36(DropdownMenuContent2, {
3504
- density,
3505
- align: "end",
3506
- children: /* @__PURE__ */ jsxs22(DropdownMenuGroup2, {
3507
- children: [
3508
- /* @__PURE__ */ jsx36(DropdownMenuLabel2, {
3509
- children: email ?? name
3510
- }),
3511
- /* @__PURE__ */ jsx36(DropdownMenuItem2, {
3512
- onClick: () => onAction("profile"),
3513
- children: "Profile"
3514
- }),
3515
- /* @__PURE__ */ jsx36(DropdownMenuItem2, {
3516
- onClick: () => onAction("settings"),
3517
- children: "Settings"
3518
- }),
3519
- /* @__PURE__ */ jsx36(DropdownMenuSeparator2, {}),
3520
- /* @__PURE__ */ jsx36(DropdownMenuItem2, {
3521
- onClick: () => onAction("sign-out"),
3522
- children: "Sign out"
3523
- })
3524
- ]
3525
- })
3526
- })
3527
- ]
3528
- });
3529
- }
3530
- // src/components/StatCard.tsx
3531
- import { jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
3532
- function StatCard({
3533
- label,
3534
- value,
3535
- change,
3536
- changeIntent = "neutral",
3537
- description,
3538
- children,
3539
- loading = false,
3540
- density
3541
- }) {
3542
- return /* @__PURE__ */ jsxs23(Card2, {
3543
- density,
3544
- "aria-label": label,
3545
- "aria-busy": loading,
3546
- children: [
3547
- /* @__PURE__ */ jsxs23(CardHeader2, {
3548
- children: [
3549
- /* @__PURE__ */ jsx37(CardTitle2, {
3550
- children: label
3551
- }),
3552
- description && /* @__PURE__ */ jsx37(CardDescription2, {
3553
- children: description
3554
- })
3555
- ]
3556
- }),
3557
- /* @__PURE__ */ jsx37(CardContent2, {
3558
- children: /* @__PURE__ */ jsxs23("div", {
3559
- className: "flex flex-wrap items-center justify-between gap-control-gap",
3560
- children: [
3561
- loading ? /* @__PURE__ */ jsx37(Skeleton2, {
3562
- className: "h-8 w-24",
3563
- "aria-label": `Loading ${label}`
3564
- }) : /* @__PURE__ */ jsx37("div", {
3565
- className: "text-2xl font-semibold tabular-nums",
3566
- children: value
3567
- }),
3568
- change && /* @__PURE__ */ jsx37(Badge2, {
3569
- variant: changeIntent === "positive" ? "success" : changeIntent === "negative" ? "destructive" : "secondary",
3570
- children: change
3571
- })
3572
- ]
3573
- })
3574
- }),
3575
- children && /* @__PURE__ */ jsx37(CardFooter2, {
3576
- children
3577
- })
3578
- ]
3579
- });
3580
- }
3581
- // src/components/AuthForm.tsx
3582
- import { useId as useId2, useState as useState5 } from "react";
3583
- import { jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
3584
- function AuthForm({
3585
- mode = "sign-in",
3586
- onSubmit,
3587
- footer,
3588
- alternativeActions,
3589
- disabled = false,
3590
- density
3591
- }) {
3592
- const id = useId2();
3593
- const [pending, setPending] = useState5(false);
3594
- const [error, setError] = useState5("");
3595
- const title = mode === "sign-up" ? "Create an account" : mode === "reset-password" ? "Reset your password" : "Sign in";
3596
- async function submit(event) {
3597
- event.preventDefault();
3598
- const data = new FormData(event.currentTarget);
3599
- setError("");
3600
- setPending(true);
3601
- try {
3602
- await onSubmit({
3603
- email: String(data.get("email") ?? ""),
3604
- password: String(data.get("password") ?? ""),
3605
- name: String(data.get("name") ?? "")
3606
- });
3607
- } catch (error) {
3608
- setError(error instanceof Error ? error.message : "Unable to submit. Please try again.");
3609
- } finally {
3610
- setPending(false);
3611
- }
3612
- }
3613
- return /* @__PURE__ */ jsxs24(Card2, {
3614
- density,
3615
- children: [
3616
- /* @__PURE__ */ jsxs24(CardHeader2, {
3617
- children: [
3618
- /* @__PURE__ */ jsx38(CardTitle2, {
3619
- children: title
3620
- }),
3621
- /* @__PURE__ */ jsx38(CardDescription2, {
3622
- children: mode === "reset-password" ? "Enter your email to request a password reset." : "Enter your details to continue."
3623
- })
3624
- ]
3625
- }),
3626
- /* @__PURE__ */ jsx38(CardContent2, {
3627
- children: /* @__PURE__ */ jsx38("form", {
3628
- onSubmit: submit,
3629
- "aria-label": title,
3630
- "aria-busy": pending,
3631
- children: /* @__PURE__ */ jsxs24(FieldGroup2, {
3632
- children: [
3633
- mode === "sign-up" && /* @__PURE__ */ jsxs24(Field2, {
3634
- children: [
3635
- /* @__PURE__ */ jsx38(FieldLabel2, {
3636
- htmlFor: id + "-name",
3637
- children: "Name"
3638
- }),
3639
- /* @__PURE__ */ jsx38(Input2, {
3640
- id: id + "-name",
3641
- name: "name",
3642
- autoComplete: "name",
3643
- required: true,
3644
- disabled: disabled || pending
3645
- })
3646
- ]
3647
- }),
3648
- /* @__PURE__ */ jsxs24(Field2, {
3649
- children: [
3650
- /* @__PURE__ */ jsx38(FieldLabel2, {
3651
- htmlFor: id + "-email",
3652
- children: "Email"
3653
- }),
3654
- /* @__PURE__ */ jsx38(Input2, {
3655
- id: id + "-email",
3656
- name: "email",
3657
- type: "email",
3658
- autoComplete: "email",
3659
- required: true,
3660
- disabled: disabled || pending
3661
- })
3662
- ]
3663
- }),
3664
- mode !== "reset-password" && /* @__PURE__ */ jsxs24(Field2, {
3665
- children: [
3666
- /* @__PURE__ */ jsx38(FieldLabel2, {
3667
- htmlFor: id + "-password",
3668
- children: "Password"
3669
- }),
3670
- /* @__PURE__ */ jsx38(Input2, {
3671
- id: id + "-password",
3672
- name: "password",
3673
- type: "password",
3674
- autoComplete: mode === "sign-up" ? "new-password" : "current-password",
3675
- minLength: mode === "sign-up" ? 8 : undefined,
3676
- required: true,
3677
- disabled: disabled || pending
3678
- }),
3679
- mode === "sign-up" && /* @__PURE__ */ jsx38(FieldDescription2, {
3680
- children: "Use at least eight characters."
3681
- })
3682
- ]
3683
- }),
3684
- error && /* @__PURE__ */ jsxs24(Alert2, {
3685
- variant: "destructive",
3686
- children: [
3687
- /* @__PURE__ */ jsx38(AlertTitle2, {
3688
- children: "Request failed"
3689
- }),
3690
- /* @__PURE__ */ jsx38(AlertDescription2, {
3691
- children: error
3692
- })
3693
- ]
3694
- }),
3695
- /* @__PURE__ */ jsxs24(Button2, {
3696
- type: "submit",
3697
- disabled: disabled || pending,
3698
- children: [
3699
- pending && /* @__PURE__ */ jsx38(Spinner2, {
3700
- "data-icon": "inline-start"
3701
- }),
3702
- mode === "reset-password" ? "Send reset link" : title
3703
- ]
3704
- }),
3705
- alternativeActions
3706
- ]
3707
- })
3708
- })
3709
- }),
3710
- footer && /* @__PURE__ */ jsx38(CardFooter2, {
3711
- children: footer
3712
- })
3713
- ]
3714
- });
3715
- }
3716
- // src/components/SettingsSection.tsx
3717
- import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
3718
- function SettingsSection({
3719
- title,
3720
- description,
3721
- children,
3722
- onSubmit,
3723
- saveLabel = "Save changes",
3724
- pending = false,
3725
- disabled = false,
3726
- footer,
3727
- destructive = false,
3728
- density
3729
- }) {
3730
- return /* @__PURE__ */ jsx39("form", {
3731
- "aria-label": title,
3732
- onSubmit,
3733
- "aria-busy": pending,
3734
- children: /* @__PURE__ */ jsxs25(Card2, {
3735
- density,
3736
- children: [
3737
- /* @__PURE__ */ jsxs25(CardHeader2, {
3738
- children: [
3739
- /* @__PURE__ */ jsx39(CardTitle2, {
3740
- children: title
3741
- }),
3742
- description && /* @__PURE__ */ jsx39(CardDescription2, {
3743
- children: description
3744
- })
3745
- ]
3746
- }),
3747
- /* @__PURE__ */ jsx39(CardContent2, {
3748
- children: /* @__PURE__ */ jsxs25("fieldset", {
3749
- disabled: disabled || pending,
3750
- className: "min-w-0 border-0 p-0",
3751
- children: [
3752
- /* @__PURE__ */ jsx39("legend", {
3753
- className: "sr-only",
3754
- children: title
3755
- }),
3756
- /* @__PURE__ */ jsx39(FieldGroup2, {
3757
- children
3758
- })
3759
- ]
3760
- })
3761
- }),
3762
- /* @__PURE__ */ jsxs25(CardFooter2, {
3763
- className: "flex flex-wrap items-center justify-between gap-control-gap",
3764
- children: [
3765
- footer,
3766
- /* @__PURE__ */ jsxs25(Button2, {
3767
- type: "submit",
3768
- variant: destructive ? "destructive" : "default",
3769
- disabled: disabled || pending,
3770
- children: [
3771
- pending && /* @__PURE__ */ jsx39(Spinner2, {
3772
- "data-icon": "inline-start"
3773
- }),
3774
- saveLabel
3775
- ]
3776
- })
3777
- ]
3778
- })
3779
- ]
3780
- })
3781
- });
3782
- }
3783
- // src/components/TagInput.tsx
3784
- import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
3785
- function TagInput({
3786
- label,
3787
- options,
3788
- value,
3789
- defaultValue,
3790
- onValueChange,
3791
- disabled,
3792
- name,
3793
- placeholder = "Add tags",
3794
- density
3795
- }) {
3796
- const anchor = useComboboxAnchor();
3797
- return /* @__PURE__ */ jsxs26(Combobox, {
3798
- items: options,
3799
- multiple: true,
3800
- value,
3801
- defaultValue,
3802
- onValueChange,
3803
- disabled,
3804
- name,
3805
- children: [
3806
- /* @__PURE__ */ jsxs26(ComboboxChips, {
3807
- ref: anchor,
3808
- density,
3809
- children: [
3810
- /* @__PURE__ */ jsx40(ComboboxValue, {
3811
- children: (values) => values.map((item) => /* @__PURE__ */ jsx40(ComboboxChip, {
3812
- removeLabel: `Remove ${item}`,
3813
- children: item
3814
- }, item))
3815
- }),
3816
- /* @__PURE__ */ jsx40(ComboboxChipsInput, {
3817
- "aria-label": label,
3818
- placeholder
3819
- })
3820
- ]
3821
- }),
3822
- /* @__PURE__ */ jsxs26(ComboboxContent, {
3823
- anchor,
3824
- density,
3825
- children: [
3826
- /* @__PURE__ */ jsx40(ComboboxEmpty, {
3827
- children: "No matching tags."
3828
- }),
3829
- /* @__PURE__ */ jsx40(ComboboxList, {
3830
- children: /* @__PURE__ */ jsx40(ComboboxGroup, {
3831
- children: /* @__PURE__ */ jsx40(ComboboxCollection, {
3832
- children: (item) => /* @__PURE__ */ jsx40(ComboboxItem, {
3833
- value: item,
3834
- children: item
3835
- }, item)
3836
- })
3837
- })
3838
- })
3839
- ]
3840
- })
3841
- ]
3842
- });
3843
- }
3844
- // src/components/FilterBar.tsx
3845
- import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
3846
- function FilterBar({
3847
- label,
3848
- search,
3849
- onSearchChange,
3850
- filters,
3851
- value,
3852
- onValueChange,
3853
- disabled,
3854
- density
3855
- }) {
3856
- return /* @__PURE__ */ jsxs27("fieldset", {
3857
- "aria-label": label,
3858
- disabled,
3859
- "data-density": density,
3860
- className: "flex min-w-0 flex-wrap items-center gap-2",
3861
- children: [
3862
- /* @__PURE__ */ jsx41(Input2, {
3863
- "aria-label": `Search ${label}`,
3864
- type: "search",
3865
- value: search,
3866
- onChange: (event) => onSearchChange(event.target.value),
3867
- className: "min-w-40 flex-1"
3868
- }),
3869
- filters.map((filter) => /* @__PURE__ */ jsxs27(NativeSelect2, {
3870
- "aria-label": filter.label,
3871
- value: value[filter.id] ?? "",
3872
- onChange: (event) => onValueChange({ ...value, [filter.id]: event.target.value }),
3873
- children: [
3874
- /* @__PURE__ */ jsxs27(NativeSelectOption2, {
3875
- value: "",
3876
- children: [
3877
- "All ",
3878
- filter.label.toLowerCase()
3879
- ]
3880
- }),
3881
- filter.options.map((option) => /* @__PURE__ */ jsx41(NativeSelectOption2, {
3882
- value: option.value,
3883
- children: option.label
3884
- }, option.value))
3885
- ]
3886
- }, filter.id)),
3887
- /* @__PURE__ */ jsx41(Button2, {
3888
- type: "button",
3889
- variant: "ghost",
3890
- disabled: !search && !Object.values(value).some(Boolean),
3891
- onClick: () => {
3892
- onSearchChange("");
3893
- onValueChange({});
3894
- },
3895
- children: "Clear filters"
3896
- })
3897
- ]
3898
- });
3899
- }
3900
- // src/components/BarList.tsx
3901
- import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
3902
- function BarList({
3903
- label,
3904
- items,
3905
- onItemSelect,
3906
- valueFormatter = (value) => value.toLocaleString(),
3907
- density
3908
- }) {
3909
- const max = Math.max(1, ...items.map((item) => item.value));
3910
- return /* @__PURE__ */ jsxs28("section", {
3911
- "aria-label": label,
3912
- "data-density": density,
3913
- children: [
3914
- /* @__PURE__ */ jsx42("ul", {
3915
- className: "grid gap-3",
3916
- children: items.map((item) => /* @__PURE__ */ jsx42("li", {
3917
- children: /* @__PURE__ */ jsxs28(Meter, {
3918
- min: 0,
3919
- max,
3920
- value: item.value,
3921
- "aria-label": item.label,
3922
- format: { maximumFractionDigits: 2 },
3923
- children: [
3924
- /* @__PURE__ */ jsxs28("div", {
3925
- className: "mb-1 flex items-center justify-between gap-3 text-sm",
3926
- children: [
3927
- /* @__PURE__ */ jsx42(MeterLabel, {
3928
- children: onItemSelect ? /* @__PURE__ */ jsx42(Button2, {
3929
- type: "button",
3930
- variant: "link",
3931
- className: "h-auto p-0",
3932
- onClick: () => onItemSelect(item),
3933
- children: item.label
3934
- }) : item.label
3935
- }),
3936
- /* @__PURE__ */ jsx42(MeterValue, {
3937
- children: () => valueFormatter(item.value)
3938
- })
3939
- ]
3940
- }),
3941
- /* @__PURE__ */ jsx42(MeterTrack, {
3942
- children: /* @__PURE__ */ jsx42(MeterIndicator, {})
3943
- })
3944
- ]
3945
- })
3946
- }, item.id))
3947
- }),
3948
- !items.length && /* @__PURE__ */ jsx42("p", {
3949
- role: "status",
3950
- className: "text-sm text-muted-foreground",
3951
- children: "No data available."
3952
- })
3953
- ]
3954
- });
3955
- }
3956
- // src/components/StatusTracker.tsx
3957
- import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
3958
- var statusClasses = { success: "bg-success", warning: "bg-warning", error: "bg-destructive", unknown: "bg-muted" };
3959
- function StatusTracker({ label, items, onItemSelect, density }) {
3960
- return /* @__PURE__ */ jsx43(TooltipProvider2, {
3961
- children: /* @__PURE__ */ jsx43("div", {
3962
- role: "group",
3963
- "aria-label": label,
3964
- "data-density": density,
3965
- className: "flex min-w-0 gap-1",
3966
- children: items.map((item) => /* @__PURE__ */ jsxs29(Tooltip2, {
3967
- children: [
3968
- /* @__PURE__ */ jsx43(TooltipTrigger2, {
3969
- "aria-label": `${item.label}: ${item.status}`,
3970
- onClick: () => onItemSelect?.(item),
3971
- className: cn2("h-8 min-w-2 flex-1 rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring", statusClasses[item.status])
3972
- }),
3973
- /* @__PURE__ */ jsxs29(TooltipContent2, {
3974
- children: [
3975
- item.label,
3976
- ": ",
3977
- item.description ?? item.status
3978
- ]
3979
- })
3980
- ]
3981
- }, item.id))
3982
- })
3983
- });
3984
- }
3985
- // src/components/DashboardLayout.tsx
3986
- import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
3987
- function DashboardLayout({
3988
- title,
3989
- description,
3990
- actions,
3991
- filters,
3992
- stats,
3993
- children,
3994
- footer,
3995
- density
3996
- }) {
3997
- return /* @__PURE__ */ jsxs30("div", {
3998
- "data-density": density,
3999
- "data-scroll": "none",
4000
- className: "grid min-w-0 gap-6",
4001
- children: [
4002
- /* @__PURE__ */ jsx44(PageHeader, {
4003
- title,
4004
- description,
4005
- actions
4006
- }),
4007
- filters,
4008
- stats.length > 0 && /* @__PURE__ */ jsx44("div", {
4009
- className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-4",
4010
- children: stats.map(({ id, ...stat }) => /* @__PURE__ */ jsx44(StatCard, {
4011
- ...stat
4012
- }, id))
4013
- }),
4014
- /* @__PURE__ */ jsx44("div", {
4015
- className: "grid min-w-0 gap-4",
4016
- children
4017
- }),
4018
- footer
4019
- ]
4020
- });
4021
- }
4022
- // src/components/BillingUsage.tsx
4023
- import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
4024
- function BillingUsage({ plan, price, period, metrics, onManage, pending, density }) {
4025
- return /* @__PURE__ */ jsxs31(Card2, {
4026
- density,
4027
- "aria-label": "Billing and usage",
4028
- children: [
4029
- /* @__PURE__ */ jsxs31(CardHeader2, {
4030
- children: [
4031
- /* @__PURE__ */ jsx45(CardTitle2, {
4032
- children: plan
4033
- }),
4034
- /* @__PURE__ */ jsxs31(CardDescription2, {
4035
- children: [
4036
- price,
4037
- " · ",
4038
- period
4039
- ]
4040
- })
4041
- ]
4042
- }),
4043
- /* @__PURE__ */ jsx45(CardContent2, {
4044
- className: "grid gap-4",
4045
- children: metrics.map((metric) => /* @__PURE__ */ jsxs31(Meter, {
4046
- value: metric.used,
4047
- max: metric.limit,
4048
- "aria-label": metric.label,
4049
- children: [
4050
- /* @__PURE__ */ jsxs31("div", {
4051
- className: "mb-2 flex items-center justify-between gap-3 text-sm",
4052
- children: [
4053
- /* @__PURE__ */ jsx45(MeterLabel, {
4054
- children: metric.label
4055
- }),
4056
- /* @__PURE__ */ jsx45(MeterValue, {
4057
- children: () => `${metric.used.toLocaleString()} / ${metric.limit.toLocaleString()}${metric.unit ? ` ${metric.unit}` : ""}`
4058
- })
4059
- ]
4060
- }),
4061
- /* @__PURE__ */ jsx45(MeterTrack, {
4062
- children: /* @__PURE__ */ jsx45(MeterIndicator, {})
4063
- })
4064
- ]
4065
- }, metric.id))
4066
- }),
4067
- /* @__PURE__ */ jsx45(CardFooter2, {
4068
- children: /* @__PURE__ */ jsx45(Button2, {
4069
- type: "button",
4070
- variant: "outline",
4071
- onClick: onManage,
4072
- disabled: pending,
4073
- children: "Manage billing"
4074
- })
4075
- })
4076
- ]
4077
- });
4078
- }
365
+ Avatar2,
366
+ AvatarImage2,
367
+ AvatarFallback2,
368
+ AvatarBadge2,
369
+ AvatarGroup2,
370
+ AvatarGroupCount2
371
+ } from "./chunk-hyq4nwg2.js";
372
+ import {
373
+ TooltipProvider2,
374
+ Tooltip2,
375
+ TooltipTrigger2,
376
+ TooltipContent2
377
+ } from "./chunk-mz3e810d.js";
378
+ import {
379
+ HoverCard2,
380
+ HoverCardTrigger2,
381
+ HoverCardContent2
382
+ } from "./chunk-hh43wg05.js";
383
+ import {
384
+ Skeleton2
385
+ } from "./chunk-d70rcwk7.js";
386
+ import {
387
+ Label2
388
+ } from "./chunk-jcxxjkqx.js";
389
+ import {
390
+ badgeVariants2,
391
+ Badge2
392
+ } from "./chunk-wjx6zf94.js";
393
+ import {
394
+ Collapsible2,
395
+ CollapsibleTrigger2,
396
+ CollapsibleContent2
397
+ } from "./chunk-24d68cjp.js";
398
+ import {
399
+ DirectionProvider2,
400
+ useDirection2
401
+ } from "./chunk-jpvw9xqy.js";
402
+ import {
403
+ Popover2,
404
+ PopoverTrigger2,
405
+ PopoverContent2,
406
+ PopoverHeader2,
407
+ PopoverTitle2,
408
+ PopoverDescription2
409
+ } from "./chunk-4djw71cv.js";
410
+ import {
411
+ Dialog2,
412
+ DialogTrigger2,
413
+ DialogPortal2,
414
+ DialogClose2,
415
+ DialogOverlay2,
416
+ DialogContent2,
417
+ DialogHeader2,
418
+ DialogFooter2,
419
+ DialogTitle2,
420
+ DialogDescription2
421
+ } from "./chunk-ex1zk6ta.js";
422
+ import {
423
+ InputGroup2,
424
+ InputGroupAddon2,
425
+ InputGroupButton2,
426
+ InputGroupText2,
427
+ InputGroupInput2,
428
+ InputGroupTextarea2
429
+ } from "./chunk-57jj9v64.js";
430
+ import {
431
+ Input2
432
+ } from "./chunk-59p19t57.js";
433
+ import {
434
+ Textarea2
435
+ } from "./chunk-hz9azhzx.js";
436
+ import {
437
+ PortalProvider2
438
+ } from "./chunk-aa7m22zj.js";
439
+ import {
440
+ usePortalContainer2
441
+ } from "./chunk-j89xg1ak.js";
442
+ import"./chunk-k99h6evz.js";
443
+ import {
444
+ Separator2
445
+ } from "./chunk-rajgnfbr.js";
446
+ import {
447
+ useTheme2
448
+ } from "./chunk-1j2hz3w9.js";
449
+ import"./chunk-e6hk39ev.js";
450
+ import {
451
+ buttonVariants2,
452
+ Button2
453
+ } from "./chunk-q7p28b89.js";
454
+ import {
455
+ cn2
456
+ } from "./chunk-cp2m7y7v.js";
4079
457
  export {
4080
- Accordion,
4081
- AccordionContent,
4082
- AccordionItem,
4083
- AccordionTrigger,
4084
- AccountMenu,
458
+ Accordion2 as Accordion,
459
+ AccordionContent2 as AccordionContent,
460
+ AccordionItem2 as AccordionItem,
461
+ AccordionTrigger2 as AccordionTrigger,
462
+ AccountMenu2 as AccountMenu,
4085
463
  Alert2 as Alert,
4086
464
  AlertAction2 as AlertAction,
4087
465
  AlertDescription2 as AlertDescription,
4088
- AlertDialog,
4089
- AlertDialogAction,
4090
- AlertDialogCancel,
4091
- AlertDialogContent,
4092
- AlertDialogDescription,
4093
- AlertDialogFooter,
4094
- AlertDialogHeader,
4095
- AlertDialogMedia,
4096
- AlertDialogOverlay,
4097
- AlertDialogPortal,
4098
- AlertDialogTitle,
4099
- AlertDialogTrigger,
466
+ AlertDialog2 as AlertDialog,
467
+ AlertDialogAction2 as AlertDialogAction,
468
+ AlertDialogCancel2 as AlertDialogCancel,
469
+ AlertDialogContent2 as AlertDialogContent,
470
+ AlertDialogDescription2 as AlertDialogDescription,
471
+ AlertDialogFooter2 as AlertDialogFooter,
472
+ AlertDialogHeader2 as AlertDialogHeader,
473
+ AlertDialogMedia2 as AlertDialogMedia,
474
+ AlertDialogOverlay2 as AlertDialogOverlay,
475
+ AlertDialogPortal2 as AlertDialogPortal,
476
+ AlertDialogTitle2 as AlertDialogTitle,
477
+ AlertDialogTrigger2 as AlertDialogTrigger,
4100
478
  AlertTitle2 as AlertTitle,
4101
- AppShell,
4102
- AspectRatio,
4103
- Attachment,
4104
- AttachmentAction,
4105
- AttachmentActions,
4106
- AttachmentContent,
4107
- AttachmentDescription,
4108
- AttachmentGroup,
4109
- AttachmentMedia,
4110
- AttachmentTitle,
4111
- AttachmentTrigger,
4112
- AuthForm,
479
+ AppShell2 as AppShell,
480
+ AspectRatio2 as AspectRatio,
481
+ Attachment2 as Attachment,
482
+ AttachmentAction2 as AttachmentAction,
483
+ AttachmentActions2 as AttachmentActions,
484
+ AttachmentContent2 as AttachmentContent,
485
+ AttachmentDescription2 as AttachmentDescription,
486
+ AttachmentGroup2 as AttachmentGroup,
487
+ AttachmentMedia2 as AttachmentMedia,
488
+ AttachmentTitle2 as AttachmentTitle,
489
+ AttachmentTrigger2 as AttachmentTrigger,
490
+ AuthForm2 as AuthForm,
4113
491
  Avatar2 as Avatar,
4114
492
  AvatarBadge2 as AvatarBadge,
4115
493
  AvatarFallback2 as AvatarFallback,
@@ -4117,24 +495,24 @@ export {
4117
495
  AvatarGroupCount2 as AvatarGroupCount,
4118
496
  AvatarImage2 as AvatarImage,
4119
497
  Badge2 as Badge,
4120
- BarList,
4121
- BillingUsage,
4122
- Breadcrumb,
4123
- BreadcrumbEllipsis,
4124
- BreadcrumbItem,
4125
- BreadcrumbLink,
4126
- BreadcrumbList,
4127
- BreadcrumbPage,
4128
- BreadcrumbSeparator,
4129
- Bubble,
4130
- BubbleContent,
4131
- BubbleGroup,
4132
- BubbleReactions,
498
+ BarList2 as BarList,
499
+ BillingUsage2 as BillingUsage,
500
+ Breadcrumb2 as Breadcrumb,
501
+ BreadcrumbEllipsis2 as BreadcrumbEllipsis,
502
+ BreadcrumbItem2 as BreadcrumbItem,
503
+ BreadcrumbLink2 as BreadcrumbLink,
504
+ BreadcrumbList2 as BreadcrumbList,
505
+ BreadcrumbPage2 as BreadcrumbPage,
506
+ BreadcrumbSeparator2 as BreadcrumbSeparator,
507
+ Bubble2 as Bubble,
508
+ BubbleContent2 as BubbleContent,
509
+ BubbleGroup2 as BubbleGroup,
510
+ BubbleReactions2 as BubbleReactions,
4133
511
  Button2 as Button,
4134
- ButtonGroup,
4135
- ButtonGroupSeparator,
4136
- ButtonGroupText,
4137
- ButtonLink,
512
+ ButtonGroup2 as ButtonGroup,
513
+ ButtonGroupSeparator2 as ButtonGroupSeparator,
514
+ ButtonGroupText2 as ButtonGroupText,
515
+ ButtonLink2 as ButtonLink,
4138
516
  Card2 as Card,
4139
517
  CardAction2 as CardAction,
4140
518
  CardContent2 as CardContent,
@@ -4146,39 +524,39 @@ export {
4146
524
  Collapsible2 as Collapsible,
4147
525
  CollapsibleContent2 as CollapsibleContent,
4148
526
  CollapsibleTrigger2 as CollapsibleTrigger,
4149
- Combobox,
4150
- ComboboxChip,
4151
- ComboboxChips,
4152
- ComboboxChipsInput,
4153
- ComboboxCollection,
4154
- ComboboxContent,
4155
- ComboboxEmpty,
4156
- ComboboxGroup,
4157
- ComboboxInput,
4158
- ComboboxItem,
4159
- ComboboxLabel,
4160
- ComboboxList,
4161
- ComboboxSeparator,
4162
- ComboboxTrigger,
4163
- ComboboxValue,
4164
- ConfirmationDialog,
4165
- ContextMenu,
4166
- ContextMenuCheckboxItem,
4167
- ContextMenuContent,
4168
- ContextMenuGroup,
4169
- ContextMenuItem,
4170
- ContextMenuLabel,
4171
- ContextMenuPortal,
4172
- ContextMenuRadioGroup,
4173
- ContextMenuRadioItem,
4174
- ContextMenuSeparator,
4175
- ContextMenuShortcut,
4176
- ContextMenuSub,
4177
- ContextMenuSubContent,
4178
- ContextMenuSubTrigger,
4179
- ContextMenuTrigger,
4180
- DashboardLayout,
4181
- DensityProvider,
527
+ Combobox2 as Combobox,
528
+ ComboboxChip2 as ComboboxChip,
529
+ ComboboxChips2 as ComboboxChips,
530
+ ComboboxChipsInput2 as ComboboxChipsInput,
531
+ ComboboxCollection2 as ComboboxCollection,
532
+ ComboboxContent2 as ComboboxContent,
533
+ ComboboxEmpty2 as ComboboxEmpty,
534
+ ComboboxGroup2 as ComboboxGroup,
535
+ ComboboxInput2 as ComboboxInput,
536
+ ComboboxItem2 as ComboboxItem,
537
+ ComboboxLabel2 as ComboboxLabel,
538
+ ComboboxList2 as ComboboxList,
539
+ ComboboxSeparator2 as ComboboxSeparator,
540
+ ComboboxTrigger2 as ComboboxTrigger,
541
+ ComboboxValue2 as ComboboxValue,
542
+ ConfirmationDialog2 as ConfirmationDialog,
543
+ ContextMenu2 as ContextMenu,
544
+ ContextMenuCheckboxItem2 as ContextMenuCheckboxItem,
545
+ ContextMenuContent2 as ContextMenuContent,
546
+ ContextMenuGroup2 as ContextMenuGroup,
547
+ ContextMenuItem2 as ContextMenuItem,
548
+ ContextMenuLabel2 as ContextMenuLabel,
549
+ ContextMenuPortal2 as ContextMenuPortal,
550
+ ContextMenuRadioGroup2 as ContextMenuRadioGroup,
551
+ ContextMenuRadioItem2 as ContextMenuRadioItem,
552
+ ContextMenuSeparator2 as ContextMenuSeparator,
553
+ ContextMenuShortcut2 as ContextMenuShortcut,
554
+ ContextMenuSub2 as ContextMenuSub,
555
+ ContextMenuSubContent2 as ContextMenuSubContent,
556
+ ContextMenuSubTrigger2 as ContextMenuSubTrigger,
557
+ ContextMenuTrigger2 as ContextMenuTrigger,
558
+ DashboardLayout2 as DashboardLayout,
559
+ DensityProvider2 as DensityProvider,
4182
560
  Dialog2 as Dialog,
4183
561
  DialogClose2 as DialogClose,
4184
562
  DialogContent2 as DialogContent,
@@ -4193,17 +571,17 @@ export {
4193
571
  DragDropPreview2 as DragDropPreview,
4194
572
  DragDropProvider2 as DragDropProvider,
4195
573
  DragSource2 as DragSource,
4196
- Drawer,
4197
- DrawerClose,
4198
- DrawerContent,
4199
- DrawerDescription,
4200
- DrawerFooter,
4201
- DrawerHeader,
4202
- DrawerOverlay,
4203
- DrawerPortal,
4204
- DrawerSwipeHandle,
4205
- DrawerTitle,
4206
- DrawerTrigger,
574
+ Drawer2 as Drawer,
575
+ DrawerClose2 as DrawerClose,
576
+ DrawerContent2 as DrawerContent,
577
+ DrawerDescription2 as DrawerDescription,
578
+ DrawerFooter2 as DrawerFooter,
579
+ DrawerHeader2 as DrawerHeader,
580
+ DrawerOverlay2 as DrawerOverlay,
581
+ DrawerPortal2 as DrawerPortal,
582
+ DrawerSwipeHandle2 as DrawerSwipeHandle,
583
+ DrawerTitle2 as DrawerTitle,
584
+ DrawerTrigger2 as DrawerTrigger,
4207
585
  DropTarget2 as DropTarget,
4208
586
  DropdownMenu2 as DropdownMenu,
4209
587
  DropdownMenuCheckboxItem2 as DropdownMenuCheckboxItem,
@@ -4225,7 +603,7 @@ export {
4225
603
  EmptyDescription2 as EmptyDescription,
4226
604
  EmptyHeader2 as EmptyHeader,
4227
605
  EmptyMedia2 as EmptyMedia,
4228
- EmptyState,
606
+ EmptyState3 as EmptyState,
4229
607
  EmptyTitle2 as EmptyTitle,
4230
608
  Field2 as Field,
4231
609
  FieldContent2 as FieldContent,
@@ -4237,12 +615,12 @@ export {
4237
615
  FieldSeparator2 as FieldSeparator,
4238
616
  FieldSet2 as FieldSet,
4239
617
  FieldTitle2 as FieldTitle,
4240
- FilterBar,
618
+ FilterBar2 as FilterBar,
4241
619
  HoverCard2 as HoverCard,
4242
620
  HoverCardContent2 as HoverCardContent,
4243
621
  HoverCardTrigger2 as HoverCardTrigger,
4244
- ImagePicker,
4245
- InlineEdit,
622
+ ImagePicker2 as ImagePicker,
623
+ InlineEdit2 as InlineEdit,
4246
624
  Input2 as Input,
4247
625
  InputGroup2 as InputGroup,
4248
626
  InputGroupAddon2 as InputGroupAddon,
@@ -4250,79 +628,79 @@ export {
4250
628
  InputGroupInput2 as InputGroupInput,
4251
629
  InputGroupText2 as InputGroupText,
4252
630
  InputGroupTextarea2 as InputGroupTextarea,
4253
- Item,
4254
- ItemActions,
4255
- ItemContent,
4256
- ItemDescription,
4257
- ItemFooter,
4258
- ItemGroup,
4259
- ItemHeader,
4260
- ItemMedia,
4261
- ItemSeparator,
4262
- ItemTitle,
4263
- JsonViewer,
631
+ Item2 as Item,
632
+ ItemActions2 as ItemActions,
633
+ ItemContent2 as ItemContent,
634
+ ItemDescription2 as ItemDescription,
635
+ ItemFooter2 as ItemFooter,
636
+ ItemGroup2 as ItemGroup,
637
+ ItemHeader2 as ItemHeader,
638
+ ItemMedia2 as ItemMedia,
639
+ ItemSeparator2 as ItemSeparator,
640
+ ItemTitle2 as ItemTitle,
641
+ JsonViewer2 as JsonViewer,
4264
642
  Kanban2 as Kanban,
4265
643
  Kbd2 as Kbd,
4266
644
  KbdGroup2 as KbdGroup,
4267
645
  Label2 as Label,
4268
- LayoutGuard,
4269
- Marker,
4270
- MarkerContent,
4271
- MarkerIcon,
4272
- Menubar,
4273
- MenubarCheckboxItem,
4274
- MenubarContent,
4275
- MenubarGroup,
4276
- MenubarItem,
4277
- MenubarLabel,
4278
- MenubarMenu,
4279
- MenubarPortal,
4280
- MenubarRadioGroup,
4281
- MenubarRadioItem,
4282
- MenubarSeparator,
4283
- MenubarShortcut,
4284
- MenubarSub,
4285
- MenubarSubContent,
4286
- MenubarSubTrigger,
4287
- MenubarTrigger,
4288
- Message,
4289
- MessageAvatar,
4290
- MessageContent,
4291
- MessageFooter,
4292
- MessageGroup,
4293
- MessageHeader,
4294
- Meter,
4295
- MeterIndicator,
4296
- MeterLabel,
4297
- MeterTrack,
4298
- MeterValue,
646
+ LayoutGuard2 as LayoutGuard,
647
+ Marker2 as Marker,
648
+ MarkerContent2 as MarkerContent,
649
+ MarkerIcon2 as MarkerIcon,
650
+ Menubar2 as Menubar,
651
+ MenubarCheckboxItem2 as MenubarCheckboxItem,
652
+ MenubarContent2 as MenubarContent,
653
+ MenubarGroup2 as MenubarGroup,
654
+ MenubarItem2 as MenubarItem,
655
+ MenubarLabel2 as MenubarLabel,
656
+ MenubarMenu2 as MenubarMenu,
657
+ MenubarPortal2 as MenubarPortal,
658
+ MenubarRadioGroup2 as MenubarRadioGroup,
659
+ MenubarRadioItem2 as MenubarRadioItem,
660
+ MenubarSeparator2 as MenubarSeparator,
661
+ MenubarShortcut2 as MenubarShortcut,
662
+ MenubarSub2 as MenubarSub,
663
+ MenubarSubContent2 as MenubarSubContent,
664
+ MenubarSubTrigger2 as MenubarSubTrigger,
665
+ MenubarTrigger2 as MenubarTrigger,
666
+ Message2 as Message,
667
+ MessageAvatar2 as MessageAvatar,
668
+ MessageContent2 as MessageContent,
669
+ MessageFooter2 as MessageFooter,
670
+ MessageGroup2 as MessageGroup,
671
+ MessageHeader2 as MessageHeader,
672
+ Meter2 as Meter,
673
+ MeterIndicator2 as MeterIndicator,
674
+ MeterLabel2 as MeterLabel,
675
+ MeterTrack2 as MeterTrack,
676
+ MeterValue2 as MeterValue,
4299
677
  NativeSelect2 as NativeSelect,
4300
678
  NativeSelectOptGroup2 as NativeSelectOptGroup,
4301
679
  NativeSelectOption2 as NativeSelectOption,
4302
- NavigationMenu,
4303
- NavigationMenuContent,
4304
- NavigationMenuIndicator,
4305
- NavigationMenuItem,
4306
- NavigationMenuLink,
4307
- NavigationMenuList,
4308
- NavigationMenuPositioner,
4309
- NavigationMenuTrigger,
4310
- NumberField,
4311
- NumberFieldDecrement,
4312
- NumberFieldGroup,
4313
- NumberFieldIncrement,
4314
- NumberFieldInput,
4315
- NumberFieldScrubArea,
4316
- NumberFieldScrubAreaCursor,
4317
- PageHeader,
4318
- PageMessage,
4319
- Pagination,
4320
- PaginationContent,
4321
- PaginationEllipsis,
4322
- PaginationItem,
4323
- PaginationLink,
4324
- PaginationNext,
4325
- PaginationPrevious,
680
+ NavigationMenu2 as NavigationMenu,
681
+ NavigationMenuContent2 as NavigationMenuContent,
682
+ NavigationMenuIndicator2 as NavigationMenuIndicator,
683
+ NavigationMenuItem2 as NavigationMenuItem,
684
+ NavigationMenuLink2 as NavigationMenuLink,
685
+ NavigationMenuList2 as NavigationMenuList,
686
+ NavigationMenuPositioner2 as NavigationMenuPositioner,
687
+ NavigationMenuTrigger2 as NavigationMenuTrigger,
688
+ NumberField2 as NumberField,
689
+ NumberFieldDecrement2 as NumberFieldDecrement,
690
+ NumberFieldGroup2 as NumberFieldGroup,
691
+ NumberFieldIncrement2 as NumberFieldIncrement,
692
+ NumberFieldInput2 as NumberFieldInput,
693
+ NumberFieldScrubArea2 as NumberFieldScrubArea,
694
+ NumberFieldScrubAreaCursor2 as NumberFieldScrubAreaCursor,
695
+ PageHeader2 as PageHeader,
696
+ PageMessage2 as PageMessage,
697
+ Pagination2 as Pagination,
698
+ PaginationContent2 as PaginationContent,
699
+ PaginationEllipsis2 as PaginationEllipsis,
700
+ PaginationItem2 as PaginationItem,
701
+ PaginationLink2 as PaginationLink,
702
+ PaginationNext2 as PaginationNext,
703
+ PaginationPrevious2 as PaginationPrevious,
4326
704
  Popover2 as Popover,
4327
705
  PopoverContent2 as PopoverContent,
4328
706
  PopoverDescription2 as PopoverDescription,
@@ -4337,21 +715,21 @@ export {
4337
715
  ProgressValue2 as ProgressValue,
4338
716
  RadioGroup2 as RadioGroup,
4339
717
  RadioGroupItem2 as RadioGroupItem,
4340
- ScrollArea,
4341
- ScrollBar,
4342
- ScrollGuard,
4343
- Select,
4344
- SelectContent,
4345
- SelectGroup,
4346
- SelectItem,
4347
- SelectLabel,
4348
- SelectScrollDownButton,
4349
- SelectScrollUpButton,
4350
- SelectSeparator,
4351
- SelectTrigger,
4352
- SelectValue,
718
+ ScrollArea2 as ScrollArea,
719
+ ScrollBar2 as ScrollBar,
720
+ ScrollGuard2 as ScrollGuard,
721
+ Select2 as Select,
722
+ SelectContent2 as SelectContent,
723
+ SelectGroup2 as SelectGroup,
724
+ SelectItem2 as SelectItem,
725
+ SelectLabel2 as SelectLabel,
726
+ SelectScrollDownButton2 as SelectScrollDownButton,
727
+ SelectScrollUpButton2 as SelectScrollUpButton,
728
+ SelectSeparator2 as SelectSeparator,
729
+ SelectTrigger2 as SelectTrigger,
730
+ SelectValue2 as SelectValue,
4353
731
  Separator2 as Separator,
4354
- SettingsSection,
732
+ SettingsSection2 as SettingsSection,
4355
733
  Sheet2 as Sheet,
4356
734
  SheetClose2 as SheetClose,
4357
735
  SheetContent2 as SheetContent,
@@ -4386,14 +764,14 @@ export {
4386
764
  Skeleton2 as Skeleton,
4387
765
  Slider2 as Slider,
4388
766
  Spinner2 as Spinner,
4389
- StarRating,
4390
- StatCard,
4391
- StatusTracker,
4392
- Stepper,
4393
- StepperContent,
4394
- StepperIndicator,
4395
- StepperList,
4396
- StepperTrigger,
767
+ StarRating2 as StarRating,
768
+ StatCard2 as StatCard,
769
+ StatusTracker2 as StatusTracker,
770
+ Stepper2 as Stepper,
771
+ StepperContent2 as StepperContent,
772
+ StepperIndicator2 as StepperIndicator,
773
+ StepperList2 as StepperList,
774
+ StepperTrigger2 as StepperTrigger,
4397
775
  Switch2 as Switch,
4398
776
  Table2 as Table,
4399
777
  TableBody2 as TableBody,
@@ -4409,19 +787,19 @@ export {
4409
787
  TabsContent2 as TabsContent,
4410
788
  TabsList2 as TabsList,
4411
789
  TabsTrigger2 as TabsTrigger,
4412
- TagInput,
790
+ TagInput2 as TagInput,
4413
791
  Textarea2 as Textarea,
4414
- ThemeProvider,
4415
- Toast,
4416
- ToastAction,
4417
- ToastClose,
4418
- ToastContent,
4419
- ToastDescription,
4420
- ToastPortal,
4421
- ToastProvider,
4422
- ToastTitle,
4423
- ToastToaster,
4424
- ToastViewport,
792
+ ThemeProvider2 as ThemeProvider,
793
+ Toast2 as Toast,
794
+ ToastAction2 as ToastAction,
795
+ ToastClose2 as ToastClose,
796
+ ToastContent2 as ToastContent,
797
+ ToastDescription2 as ToastDescription,
798
+ ToastPortal2 as ToastPortal,
799
+ ToastProvider2 as ToastProvider,
800
+ ToastTitle2 as ToastTitle,
801
+ ToastToaster2 as ToastToaster,
802
+ ToastViewport2 as ToastViewport,
4425
803
  Toggle2 as Toggle,
4426
804
  ToggleGroup2 as ToggleGroup,
4427
805
  ToggleGroupItem2 as ToggleGroupItem,
@@ -4435,18 +813,18 @@ export {
4435
813
  TooltipContent2 as TooltipContent,
4436
814
  TooltipProvider2 as TooltipProvider,
4437
815
  TooltipTrigger2 as TooltipTrigger,
4438
- WorkspaceSwitcher,
816
+ WorkspaceSwitcher2 as WorkspaceSwitcher,
4439
817
  badgeVariants2 as badgeVariants,
4440
- buttonGroupVariants,
818
+ buttonGroupVariants2 as buttonGroupVariants,
4441
819
  buttonVariants2 as buttonVariants,
4442
820
  cn2 as cn,
4443
- collectLayoutViolations,
4444
- createToastManager,
4445
- markerVariants,
4446
- navigationMenuTriggerStyle,
821
+ collectLayoutViolations2 as collectLayoutViolations,
822
+ createToastManager2 as createToastManager,
823
+ markerVariants2 as markerVariants,
824
+ navigationMenuTriggerStyle2 as navigationMenuTriggerStyle,
4447
825
  tabsListVariants2 as tabsListVariants,
4448
826
  toggleVariants2 as toggleVariants,
4449
- useComboboxAnchor,
827
+ useComboboxAnchor2 as useComboboxAnchor,
4450
828
  useDirection2 as useDirection,
4451
829
  useDragDrop2 as useDragDrop,
4452
830
  useDragSource2 as useDragSource,
@@ -4454,5 +832,5 @@ export {
4454
832
  usePortalContainer2 as usePortalContainer,
4455
833
  useSidebar2 as useSidebar,
4456
834
  useTheme2 as useTheme,
4457
- useToastManager
835
+ useToastManager2 as useToastManager
4458
836
  };