@timbal-ai/timbal-react 0.8.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +55 -2
- package/dist/app.cjs +484 -21
- package/dist/app.d.cts +4 -3
- package/dist/app.d.ts +4 -3
- package/dist/app.esm.js +24 -4
- package/dist/{button-ClSgD6OF.d.cts → button-BoyX5pM_.d.cts} +1 -1
- package/dist/{button-ClSgD6OF.d.ts → button-BoyX5pM_.d.ts} +1 -1
- package/dist/{chart-artifact-Bl67kre7.d.ts → chart-artifact-CBo9x8Ch.d.ts} +178 -3
- package/dist/{chart-artifact-BzcvblDe.d.cts → chart-artifact-DOkwSTjQ.d.cts} +178 -3
- package/dist/chat.cjs +23 -1
- package/dist/chat.esm.js +3 -3
- package/dist/{chunk-OISVICYF.esm.js → chunk-AYHOVAMI.esm.js} +1 -1
- package/dist/{chunk-VWHHKAHN.esm.js → chunk-C6IXFM4T.esm.js} +4 -4
- package/dist/{chunk-QVAUCVQA.esm.js → chunk-FOD67Z6G.esm.js} +42 -0
- package/dist/{chunk-6YVKCVEP.esm.js → chunk-GLPOVYEA.esm.js} +447 -27
- package/dist/{chunk-CFU3YDTV.esm.js → chunk-RZ6QC6RG.esm.js} +5 -5
- package/dist/{chunk-5ZKLPWVN.esm.js → chunk-SNLXVG7H.esm.js} +1 -3
- package/dist/chunk-YEFBANNF.esm.js +3485 -0
- package/dist/index.cjs +3745 -49
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.esm.js +407 -9
- package/dist/studio.cjs +23 -1
- package/dist/studio.esm.js +5 -5
- package/dist/styles.css +194 -0
- package/dist/ui.cjs +3354 -89
- package/dist/ui.d.cts +402 -6
- package/dist/ui.d.ts +402 -6
- package/dist/ui.esm.js +384 -6
- package/package.json +3 -1
- package/dist/chunk-P4SN7M67.esm.js +0 -435
|
@@ -0,0 +1,3485 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Dialog,
|
|
4
|
+
DialogContent,
|
|
5
|
+
DialogDescription,
|
|
6
|
+
DialogHeader,
|
|
7
|
+
DialogTitle,
|
|
8
|
+
TIMBAL_V2_ELEVATED_SURFACE,
|
|
9
|
+
TIMBAL_V2_MODAL_SURFACE,
|
|
10
|
+
TIMBAL_V2_SWITCH_THUMB,
|
|
11
|
+
TIMBAL_V2_SWITCH_TRACK_OFF,
|
|
12
|
+
buttonVariants,
|
|
13
|
+
cn,
|
|
14
|
+
controlClass,
|
|
15
|
+
controlSurfaceClass,
|
|
16
|
+
overlayItemClass,
|
|
17
|
+
overlayListPanelClass,
|
|
18
|
+
overlaySurfaceClass
|
|
19
|
+
} from "./chunk-FOD67Z6G.esm.js";
|
|
20
|
+
|
|
21
|
+
// src/ui/dropdown-menu.tsx
|
|
22
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
23
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
24
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
25
|
+
function DropdownMenu({
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
29
|
+
}
|
|
30
|
+
function DropdownMenuTrigger({
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
DropdownMenuPrimitive.Trigger,
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "dropdown-menu-trigger",
|
|
37
|
+
...props
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function DropdownMenuGroup({
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
44
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
45
|
+
}
|
|
46
|
+
function DropdownMenuContent({
|
|
47
|
+
className,
|
|
48
|
+
sideOffset = 4,
|
|
49
|
+
...props
|
|
50
|
+
}) {
|
|
51
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
52
|
+
DropdownMenuPrimitive.Content,
|
|
53
|
+
{
|
|
54
|
+
"data-slot": "dropdown-menu-content",
|
|
55
|
+
sideOffset,
|
|
56
|
+
className: cn(
|
|
57
|
+
overlayListPanelClass,
|
|
58
|
+
"max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-x-hidden overflow-y-auto p-1",
|
|
59
|
+
className
|
|
60
|
+
),
|
|
61
|
+
...props
|
|
62
|
+
}
|
|
63
|
+
) });
|
|
64
|
+
}
|
|
65
|
+
function DropdownMenuItem({
|
|
66
|
+
className,
|
|
67
|
+
inset,
|
|
68
|
+
variant = "default",
|
|
69
|
+
...props
|
|
70
|
+
}) {
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
72
|
+
DropdownMenuPrimitive.Item,
|
|
73
|
+
{
|
|
74
|
+
"data-slot": "dropdown-menu-item",
|
|
75
|
+
"data-inset": inset,
|
|
76
|
+
"data-variant": variant,
|
|
77
|
+
className: cn(
|
|
78
|
+
overlayItemClass,
|
|
79
|
+
"data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
|
|
80
|
+
className
|
|
81
|
+
),
|
|
82
|
+
...props
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function DropdownMenuCheckboxItem({
|
|
87
|
+
className,
|
|
88
|
+
children,
|
|
89
|
+
checked,
|
|
90
|
+
...props
|
|
91
|
+
}) {
|
|
92
|
+
return /* @__PURE__ */ jsxs(
|
|
93
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
94
|
+
{
|
|
95
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
96
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
97
|
+
checked,
|
|
98
|
+
...props,
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
101
|
+
children
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function DropdownMenuRadioGroup({
|
|
107
|
+
...props
|
|
108
|
+
}) {
|
|
109
|
+
return /* @__PURE__ */ jsx(
|
|
110
|
+
DropdownMenuPrimitive.RadioGroup,
|
|
111
|
+
{
|
|
112
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
113
|
+
...props
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function DropdownMenuRadioItem({
|
|
118
|
+
className,
|
|
119
|
+
children,
|
|
120
|
+
...props
|
|
121
|
+
}) {
|
|
122
|
+
return /* @__PURE__ */ jsxs(
|
|
123
|
+
DropdownMenuPrimitive.RadioItem,
|
|
124
|
+
{
|
|
125
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
126
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
127
|
+
...props,
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
130
|
+
children
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
function DropdownMenuLabel({
|
|
136
|
+
className,
|
|
137
|
+
inset,
|
|
138
|
+
...props
|
|
139
|
+
}) {
|
|
140
|
+
return /* @__PURE__ */ jsx(
|
|
141
|
+
DropdownMenuPrimitive.Label,
|
|
142
|
+
{
|
|
143
|
+
"data-slot": "dropdown-menu-label",
|
|
144
|
+
"data-inset": inset,
|
|
145
|
+
className: cn(
|
|
146
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
|
|
147
|
+
className
|
|
148
|
+
),
|
|
149
|
+
...props
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
function DropdownMenuSeparator({
|
|
154
|
+
className,
|
|
155
|
+
...props
|
|
156
|
+
}) {
|
|
157
|
+
return /* @__PURE__ */ jsx(
|
|
158
|
+
DropdownMenuPrimitive.Separator,
|
|
159
|
+
{
|
|
160
|
+
"data-slot": "dropdown-menu-separator",
|
|
161
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
162
|
+
...props
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
function DropdownMenuShortcut({
|
|
167
|
+
className,
|
|
168
|
+
...props
|
|
169
|
+
}) {
|
|
170
|
+
return /* @__PURE__ */ jsx(
|
|
171
|
+
"span",
|
|
172
|
+
{
|
|
173
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
174
|
+
className: cn(
|
|
175
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
176
|
+
className
|
|
177
|
+
),
|
|
178
|
+
...props
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
function DropdownMenuSub({
|
|
183
|
+
...props
|
|
184
|
+
}) {
|
|
185
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
186
|
+
}
|
|
187
|
+
function DropdownMenuSubTrigger({
|
|
188
|
+
className,
|
|
189
|
+
inset,
|
|
190
|
+
children,
|
|
191
|
+
...props
|
|
192
|
+
}) {
|
|
193
|
+
return /* @__PURE__ */ jsxs(
|
|
194
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
195
|
+
{
|
|
196
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
197
|
+
"data-inset": inset,
|
|
198
|
+
className: cn(
|
|
199
|
+
overlayItemClass,
|
|
200
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
201
|
+
className
|
|
202
|
+
),
|
|
203
|
+
...props,
|
|
204
|
+
children: [
|
|
205
|
+
children,
|
|
206
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
function DropdownMenuSubContent({
|
|
212
|
+
className,
|
|
213
|
+
...props
|
|
214
|
+
}) {
|
|
215
|
+
return /* @__PURE__ */ jsx(
|
|
216
|
+
DropdownMenuPrimitive.SubContent,
|
|
217
|
+
{
|
|
218
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
219
|
+
className: cn(
|
|
220
|
+
overlayListPanelClass,
|
|
221
|
+
"min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-hidden p-1",
|
|
222
|
+
className
|
|
223
|
+
),
|
|
224
|
+
...props
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// src/ui/popover.tsx
|
|
230
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
231
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
232
|
+
function Popover({
|
|
233
|
+
...props
|
|
234
|
+
}) {
|
|
235
|
+
return /* @__PURE__ */ jsx2(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
236
|
+
}
|
|
237
|
+
function PopoverTrigger({
|
|
238
|
+
...props
|
|
239
|
+
}) {
|
|
240
|
+
return /* @__PURE__ */ jsx2(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
241
|
+
}
|
|
242
|
+
function PopoverAnchor({
|
|
243
|
+
...props
|
|
244
|
+
}) {
|
|
245
|
+
return /* @__PURE__ */ jsx2(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
246
|
+
}
|
|
247
|
+
function PopoverContent({
|
|
248
|
+
className,
|
|
249
|
+
align = "center",
|
|
250
|
+
sideOffset = 4,
|
|
251
|
+
variant = "default",
|
|
252
|
+
...props
|
|
253
|
+
}) {
|
|
254
|
+
return /* @__PURE__ */ jsx2(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx2(
|
|
255
|
+
PopoverPrimitive.Content,
|
|
256
|
+
{
|
|
257
|
+
"data-slot": "popover-content",
|
|
258
|
+
"data-variant": variant,
|
|
259
|
+
align,
|
|
260
|
+
sideOffset,
|
|
261
|
+
className: cn(
|
|
262
|
+
variant === "list" ? cn(
|
|
263
|
+
overlayListPanelClass,
|
|
264
|
+
"min-w-[8rem] origin-[var(--radix-popover-content-transform-origin)]"
|
|
265
|
+
) : cn(
|
|
266
|
+
overlaySurfaceClass,
|
|
267
|
+
"w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-xl p-4 outline-hidden"
|
|
268
|
+
),
|
|
269
|
+
className
|
|
270
|
+
),
|
|
271
|
+
...props
|
|
272
|
+
}
|
|
273
|
+
) });
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// src/ui/select.tsx
|
|
277
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
278
|
+
import { CheckIcon as CheckIcon2, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
279
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
280
|
+
function Select({
|
|
281
|
+
...props
|
|
282
|
+
}) {
|
|
283
|
+
return /* @__PURE__ */ jsx3(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
284
|
+
}
|
|
285
|
+
function SelectGroup({
|
|
286
|
+
...props
|
|
287
|
+
}) {
|
|
288
|
+
return /* @__PURE__ */ jsx3(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
289
|
+
}
|
|
290
|
+
function SelectValue({
|
|
291
|
+
...props
|
|
292
|
+
}) {
|
|
293
|
+
return /* @__PURE__ */ jsx3(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
294
|
+
}
|
|
295
|
+
function SelectTrigger({
|
|
296
|
+
className,
|
|
297
|
+
size = "default",
|
|
298
|
+
children,
|
|
299
|
+
...props
|
|
300
|
+
}) {
|
|
301
|
+
return /* @__PURE__ */ jsxs2(
|
|
302
|
+
SelectPrimitive.Trigger,
|
|
303
|
+
{
|
|
304
|
+
"data-slot": "select-trigger",
|
|
305
|
+
"data-size": size,
|
|
306
|
+
className: cn(
|
|
307
|
+
controlClass({ size }),
|
|
308
|
+
"flex w-fit items-center justify-between gap-2 whitespace-nowrap *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
309
|
+
className
|
|
310
|
+
),
|
|
311
|
+
...props,
|
|
312
|
+
children: [
|
|
313
|
+
children,
|
|
314
|
+
/* @__PURE__ */ jsx3(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx3(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
function SelectContent({
|
|
320
|
+
className,
|
|
321
|
+
children,
|
|
322
|
+
position = "popper",
|
|
323
|
+
...props
|
|
324
|
+
}) {
|
|
325
|
+
return /* @__PURE__ */ jsx3(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs2(
|
|
326
|
+
SelectPrimitive.Content,
|
|
327
|
+
{
|
|
328
|
+
"data-slot": "select-content",
|
|
329
|
+
className: cn(
|
|
330
|
+
overlayListPanelClass,
|
|
331
|
+
"relative max-h-[var(--radix-select-content-available-height)] min-w-[8rem] origin-[var(--radix-select-content-transform-origin)] overflow-x-hidden overflow-y-auto",
|
|
332
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
333
|
+
className
|
|
334
|
+
),
|
|
335
|
+
position,
|
|
336
|
+
...props,
|
|
337
|
+
children: [
|
|
338
|
+
/* @__PURE__ */ jsx3(SelectScrollUpButton, {}),
|
|
339
|
+
/* @__PURE__ */ jsx3(
|
|
340
|
+
SelectPrimitive.Viewport,
|
|
341
|
+
{
|
|
342
|
+
className: cn(
|
|
343
|
+
"p-1",
|
|
344
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
345
|
+
),
|
|
346
|
+
children
|
|
347
|
+
}
|
|
348
|
+
),
|
|
349
|
+
/* @__PURE__ */ jsx3(SelectScrollDownButton, {})
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
) });
|
|
353
|
+
}
|
|
354
|
+
function SelectLabel({
|
|
355
|
+
className,
|
|
356
|
+
...props
|
|
357
|
+
}) {
|
|
358
|
+
return /* @__PURE__ */ jsx3(
|
|
359
|
+
SelectPrimitive.Label,
|
|
360
|
+
{
|
|
361
|
+
"data-slot": "select-label",
|
|
362
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className),
|
|
363
|
+
...props
|
|
364
|
+
}
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
function SelectItem({
|
|
368
|
+
className,
|
|
369
|
+
children,
|
|
370
|
+
...props
|
|
371
|
+
}) {
|
|
372
|
+
return /* @__PURE__ */ jsxs2(
|
|
373
|
+
SelectPrimitive.Item,
|
|
374
|
+
{
|
|
375
|
+
"data-slot": "select-item",
|
|
376
|
+
className: cn(
|
|
377
|
+
overlayItemClass,
|
|
378
|
+
"w-full py-1.5 pr-8 pl-2 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
379
|
+
className
|
|
380
|
+
),
|
|
381
|
+
...props,
|
|
382
|
+
children: [
|
|
383
|
+
/* @__PURE__ */ jsx3("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx3(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx3(CheckIcon2, { className: "size-4" }) }) }),
|
|
384
|
+
/* @__PURE__ */ jsx3(SelectPrimitive.ItemText, { children })
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
function SelectSeparator({
|
|
390
|
+
className,
|
|
391
|
+
...props
|
|
392
|
+
}) {
|
|
393
|
+
return /* @__PURE__ */ jsx3(
|
|
394
|
+
SelectPrimitive.Separator,
|
|
395
|
+
{
|
|
396
|
+
"data-slot": "select-separator",
|
|
397
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
398
|
+
...props
|
|
399
|
+
}
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
function SelectScrollUpButton({
|
|
403
|
+
className,
|
|
404
|
+
...props
|
|
405
|
+
}) {
|
|
406
|
+
return /* @__PURE__ */ jsx3(
|
|
407
|
+
SelectPrimitive.ScrollUpButton,
|
|
408
|
+
{
|
|
409
|
+
"data-slot": "select-scroll-up-button",
|
|
410
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
411
|
+
...props,
|
|
412
|
+
children: /* @__PURE__ */ jsx3(ChevronUpIcon, { className: "size-4" })
|
|
413
|
+
}
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
function SelectScrollDownButton({
|
|
417
|
+
className,
|
|
418
|
+
...props
|
|
419
|
+
}) {
|
|
420
|
+
return /* @__PURE__ */ jsx3(
|
|
421
|
+
SelectPrimitive.ScrollDownButton,
|
|
422
|
+
{
|
|
423
|
+
"data-slot": "select-scroll-down-button",
|
|
424
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
425
|
+
...props,
|
|
426
|
+
children: /* @__PURE__ */ jsx3(ChevronDownIcon, { className: "size-4" })
|
|
427
|
+
}
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// src/ui/input.tsx
|
|
432
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
433
|
+
function Input({
|
|
434
|
+
className,
|
|
435
|
+
type,
|
|
436
|
+
controlSize,
|
|
437
|
+
...props
|
|
438
|
+
}) {
|
|
439
|
+
return /* @__PURE__ */ jsx4(
|
|
440
|
+
"input",
|
|
441
|
+
{
|
|
442
|
+
type,
|
|
443
|
+
"data-slot": "input",
|
|
444
|
+
className: cn(
|
|
445
|
+
controlClass({ size: controlSize }),
|
|
446
|
+
"w-full file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
|
|
447
|
+
className
|
|
448
|
+
),
|
|
449
|
+
...props
|
|
450
|
+
}
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// src/ui/textarea.tsx
|
|
455
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
456
|
+
function Textarea({ className, ...props }) {
|
|
457
|
+
return /* @__PURE__ */ jsx5(
|
|
458
|
+
"textarea",
|
|
459
|
+
{
|
|
460
|
+
"data-slot": "textarea",
|
|
461
|
+
className: cn(
|
|
462
|
+
controlSurfaceClass,
|
|
463
|
+
"min-h-16 w-full resize-y rounded-lg px-3 py-2 leading-relaxed",
|
|
464
|
+
className
|
|
465
|
+
),
|
|
466
|
+
...props
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// src/ui/label.tsx
|
|
472
|
+
import { Label as LabelPrimitive } from "radix-ui";
|
|
473
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
474
|
+
function Label({
|
|
475
|
+
className,
|
|
476
|
+
...props
|
|
477
|
+
}) {
|
|
478
|
+
return /* @__PURE__ */ jsx6(
|
|
479
|
+
LabelPrimitive.Root,
|
|
480
|
+
{
|
|
481
|
+
"data-slot": "label",
|
|
482
|
+
className: cn(
|
|
483
|
+
"flex select-none items-center gap-2 text-sm font-medium text-foreground",
|
|
484
|
+
"group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
485
|
+
className
|
|
486
|
+
),
|
|
487
|
+
...props
|
|
488
|
+
}
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// src/ui/checkbox.tsx
|
|
493
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
494
|
+
import { CheckIcon as CheckIcon3 } from "lucide-react";
|
|
495
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
496
|
+
function Checkbox({
|
|
497
|
+
className,
|
|
498
|
+
...props
|
|
499
|
+
}) {
|
|
500
|
+
return /* @__PURE__ */ jsx7(
|
|
501
|
+
CheckboxPrimitive.Root,
|
|
502
|
+
{
|
|
503
|
+
"data-slot": "checkbox",
|
|
504
|
+
className: cn(
|
|
505
|
+
"peer size-4 shrink-0 rounded-[4px] border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card outline-none transition-[box-shadow,background-color,border-color]",
|
|
506
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
507
|
+
"data-[state=checked]:border-foreground/15 data-[state=checked]:from-primary-fill-from data-[state=checked]:to-primary-fill-to data-[state=checked]:text-primary-foreground",
|
|
508
|
+
className
|
|
509
|
+
),
|
|
510
|
+
...props,
|
|
511
|
+
children: /* @__PURE__ */ jsx7(
|
|
512
|
+
CheckboxPrimitive.Indicator,
|
|
513
|
+
{
|
|
514
|
+
"data-slot": "checkbox-indicator",
|
|
515
|
+
className: "flex items-center justify-center text-current transition-none",
|
|
516
|
+
children: /* @__PURE__ */ jsx7(CheckIcon3, { className: "size-3.5" })
|
|
517
|
+
}
|
|
518
|
+
)
|
|
519
|
+
}
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// src/ui/switch.tsx
|
|
524
|
+
import { Switch as SwitchPrimitive } from "radix-ui";
|
|
525
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
526
|
+
function Switch({
|
|
527
|
+
className,
|
|
528
|
+
...props
|
|
529
|
+
}) {
|
|
530
|
+
return /* @__PURE__ */ jsx8(
|
|
531
|
+
SwitchPrimitive.Root,
|
|
532
|
+
{
|
|
533
|
+
"data-slot": "switch",
|
|
534
|
+
className: cn(
|
|
535
|
+
"peer inline-flex h-5 w-9 shrink-0 items-center rounded-full outline-none transition-[background,box-shadow,border-color] duration-200",
|
|
536
|
+
TIMBAL_V2_SWITCH_TRACK_OFF,
|
|
537
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
538
|
+
"data-[state=checked]:border-foreground/15 data-[state=checked]:from-primary-fill-from data-[state=checked]:to-primary-fill-to data-[state=checked]:shadow-card",
|
|
539
|
+
className
|
|
540
|
+
),
|
|
541
|
+
...props,
|
|
542
|
+
children: /* @__PURE__ */ jsx8(
|
|
543
|
+
SwitchPrimitive.Thumb,
|
|
544
|
+
{
|
|
545
|
+
"data-slot": "switch-thumb",
|
|
546
|
+
className: cn(
|
|
547
|
+
TIMBAL_V2_SWITCH_THUMB,
|
|
548
|
+
"pointer-events-none block size-4 translate-x-0.5 rounded-full transition-transform data-[state=checked]:translate-x-4"
|
|
549
|
+
)
|
|
550
|
+
}
|
|
551
|
+
)
|
|
552
|
+
}
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// src/ui/radio-group.tsx
|
|
557
|
+
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
558
|
+
import { CircleIcon as CircleIcon2 } from "lucide-react";
|
|
559
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
560
|
+
function RadioGroup({
|
|
561
|
+
className,
|
|
562
|
+
...props
|
|
563
|
+
}) {
|
|
564
|
+
return /* @__PURE__ */ jsx9(
|
|
565
|
+
RadioGroupPrimitive.Root,
|
|
566
|
+
{
|
|
567
|
+
"data-slot": "radio-group",
|
|
568
|
+
className: cn("grid gap-2.5", className),
|
|
569
|
+
...props
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
function RadioGroupItem({
|
|
574
|
+
className,
|
|
575
|
+
...props
|
|
576
|
+
}) {
|
|
577
|
+
return /* @__PURE__ */ jsx9(
|
|
578
|
+
RadioGroupPrimitive.Item,
|
|
579
|
+
{
|
|
580
|
+
"data-slot": "radio-group-item",
|
|
581
|
+
className: cn(
|
|
582
|
+
"aspect-square size-4 shrink-0 rounded-full border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card outline-none transition-[box-shadow,border-color]",
|
|
583
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
584
|
+
"data-[state=checked]:border-foreground/30",
|
|
585
|
+
className
|
|
586
|
+
),
|
|
587
|
+
...props,
|
|
588
|
+
children: /* @__PURE__ */ jsx9(
|
|
589
|
+
RadioGroupPrimitive.Indicator,
|
|
590
|
+
{
|
|
591
|
+
"data-slot": "radio-group-indicator",
|
|
592
|
+
className: "flex items-center justify-center",
|
|
593
|
+
children: /* @__PURE__ */ jsx9(CircleIcon2, { className: "size-2 fill-foreground text-foreground" })
|
|
594
|
+
}
|
|
595
|
+
)
|
|
596
|
+
}
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// src/ui/form.tsx
|
|
601
|
+
import { Form as FormPrimitive } from "radix-ui";
|
|
602
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
603
|
+
function Form({ ...props }) {
|
|
604
|
+
return /* @__PURE__ */ jsx10(FormPrimitive.Root, { "data-slot": "form", ...props });
|
|
605
|
+
}
|
|
606
|
+
function FormField({
|
|
607
|
+
...props
|
|
608
|
+
}) {
|
|
609
|
+
return /* @__PURE__ */ jsx10(FormPrimitive.Field, { "data-slot": "form-field", ...props });
|
|
610
|
+
}
|
|
611
|
+
function FormItem({ className, ...props }) {
|
|
612
|
+
return /* @__PURE__ */ jsx10(
|
|
613
|
+
"div",
|
|
614
|
+
{
|
|
615
|
+
"data-slot": "form-item",
|
|
616
|
+
className: cn("grid gap-1.5", className),
|
|
617
|
+
...props
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
function FormLabel({
|
|
622
|
+
className,
|
|
623
|
+
...props
|
|
624
|
+
}) {
|
|
625
|
+
return /* @__PURE__ */ jsx10(FormPrimitive.Label, { asChild: true, children: /* @__PURE__ */ jsx10(Label, { "data-slot": "form-label", className, ...props }) });
|
|
626
|
+
}
|
|
627
|
+
function FormControl({
|
|
628
|
+
...props
|
|
629
|
+
}) {
|
|
630
|
+
return /* @__PURE__ */ jsx10(FormPrimitive.Control, { "data-slot": "form-control", ...props });
|
|
631
|
+
}
|
|
632
|
+
function FormMessage({
|
|
633
|
+
className,
|
|
634
|
+
...props
|
|
635
|
+
}) {
|
|
636
|
+
return /* @__PURE__ */ jsx10(
|
|
637
|
+
FormPrimitive.Message,
|
|
638
|
+
{
|
|
639
|
+
"data-slot": "form-message",
|
|
640
|
+
className: cn("text-xs text-destructive", className),
|
|
641
|
+
...props
|
|
642
|
+
}
|
|
643
|
+
);
|
|
644
|
+
}
|
|
645
|
+
function FormSubmit({
|
|
646
|
+
className,
|
|
647
|
+
...props
|
|
648
|
+
}) {
|
|
649
|
+
return /* @__PURE__ */ jsx10(
|
|
650
|
+
FormPrimitive.Submit,
|
|
651
|
+
{
|
|
652
|
+
"data-slot": "form-submit",
|
|
653
|
+
className,
|
|
654
|
+
...props
|
|
655
|
+
}
|
|
656
|
+
);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
// src/ui/aspect-ratio.tsx
|
|
660
|
+
import { AspectRatio as AspectRatioPrimitive } from "radix-ui";
|
|
661
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
662
|
+
function AspectRatio({
|
|
663
|
+
...props
|
|
664
|
+
}) {
|
|
665
|
+
return /* @__PURE__ */ jsx11(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
// src/ui/breadcrumb.tsx
|
|
669
|
+
import { ChevronRightIcon as ChevronRightIcon2, MoreHorizontalIcon } from "lucide-react";
|
|
670
|
+
import { Slot } from "radix-ui";
|
|
671
|
+
import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
672
|
+
function Breadcrumb({ ...props }) {
|
|
673
|
+
return /* @__PURE__ */ jsx12("nav", { "data-slot": "breadcrumb", "aria-label": "Breadcrumb", ...props });
|
|
674
|
+
}
|
|
675
|
+
function BreadcrumbList({ className, ...props }) {
|
|
676
|
+
return /* @__PURE__ */ jsx12(
|
|
677
|
+
"ol",
|
|
678
|
+
{
|
|
679
|
+
"data-slot": "breadcrumb-list",
|
|
680
|
+
className: cn(
|
|
681
|
+
"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground",
|
|
682
|
+
className
|
|
683
|
+
),
|
|
684
|
+
...props
|
|
685
|
+
}
|
|
686
|
+
);
|
|
687
|
+
}
|
|
688
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
689
|
+
return /* @__PURE__ */ jsx12(
|
|
690
|
+
"li",
|
|
691
|
+
{
|
|
692
|
+
"data-slot": "breadcrumb-item",
|
|
693
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
694
|
+
...props
|
|
695
|
+
}
|
|
696
|
+
);
|
|
697
|
+
}
|
|
698
|
+
function BreadcrumbLink({
|
|
699
|
+
className,
|
|
700
|
+
asChild,
|
|
701
|
+
...props
|
|
702
|
+
}) {
|
|
703
|
+
const Comp = asChild ? Slot.Root : "a";
|
|
704
|
+
return /* @__PURE__ */ jsx12(
|
|
705
|
+
Comp,
|
|
706
|
+
{
|
|
707
|
+
"data-slot": "breadcrumb-link",
|
|
708
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
709
|
+
...props
|
|
710
|
+
}
|
|
711
|
+
);
|
|
712
|
+
}
|
|
713
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
714
|
+
return /* @__PURE__ */ jsx12(
|
|
715
|
+
"span",
|
|
716
|
+
{
|
|
717
|
+
"data-slot": "breadcrumb-page",
|
|
718
|
+
role: "link",
|
|
719
|
+
"aria-disabled": "true",
|
|
720
|
+
"aria-current": "page",
|
|
721
|
+
className: cn("font-normal text-foreground", className),
|
|
722
|
+
...props
|
|
723
|
+
}
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
function BreadcrumbSeparator({
|
|
727
|
+
children,
|
|
728
|
+
className,
|
|
729
|
+
...props
|
|
730
|
+
}) {
|
|
731
|
+
return /* @__PURE__ */ jsx12(
|
|
732
|
+
"li",
|
|
733
|
+
{
|
|
734
|
+
"data-slot": "breadcrumb-separator",
|
|
735
|
+
role: "presentation",
|
|
736
|
+
"aria-hidden": "true",
|
|
737
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
738
|
+
...props,
|
|
739
|
+
children: children ?? /* @__PURE__ */ jsx12(ChevronRightIcon2, {})
|
|
740
|
+
}
|
|
741
|
+
);
|
|
742
|
+
}
|
|
743
|
+
function BreadcrumbEllipsis({
|
|
744
|
+
className,
|
|
745
|
+
...props
|
|
746
|
+
}) {
|
|
747
|
+
return /* @__PURE__ */ jsxs3(
|
|
748
|
+
"span",
|
|
749
|
+
{
|
|
750
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
751
|
+
role: "presentation",
|
|
752
|
+
"aria-hidden": "true",
|
|
753
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
754
|
+
...props,
|
|
755
|
+
children: [
|
|
756
|
+
/* @__PURE__ */ jsx12(MoreHorizontalIcon, { className: "size-4" }),
|
|
757
|
+
/* @__PURE__ */ jsx12("span", { className: "sr-only", children: "More" })
|
|
758
|
+
]
|
|
759
|
+
}
|
|
760
|
+
);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
// src/ui/pagination.tsx
|
|
764
|
+
import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon3, MoreHorizontalIcon as MoreHorizontalIcon2 } from "lucide-react";
|
|
765
|
+
import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
766
|
+
function Pagination({ className, ...props }) {
|
|
767
|
+
return /* @__PURE__ */ jsx13(
|
|
768
|
+
"nav",
|
|
769
|
+
{
|
|
770
|
+
"data-slot": "pagination",
|
|
771
|
+
role: "navigation",
|
|
772
|
+
"aria-label": "pagination",
|
|
773
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
774
|
+
...props
|
|
775
|
+
}
|
|
776
|
+
);
|
|
777
|
+
}
|
|
778
|
+
function PaginationContent({ className, ...props }) {
|
|
779
|
+
return /* @__PURE__ */ jsx13(
|
|
780
|
+
"ul",
|
|
781
|
+
{
|
|
782
|
+
"data-slot": "pagination-content",
|
|
783
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
784
|
+
...props
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
function PaginationItem({ ...props }) {
|
|
789
|
+
return /* @__PURE__ */ jsx13("li", { "data-slot": "pagination-item", ...props });
|
|
790
|
+
}
|
|
791
|
+
function PaginationLink({
|
|
792
|
+
className,
|
|
793
|
+
isActive,
|
|
794
|
+
size = "icon",
|
|
795
|
+
...props
|
|
796
|
+
}) {
|
|
797
|
+
return /* @__PURE__ */ jsx13(Button, { asChild: true, variant: isActive ? "outline" : "ghost", size, className, children: /* @__PURE__ */ jsx13(
|
|
798
|
+
"a",
|
|
799
|
+
{
|
|
800
|
+
"data-slot": "pagination-link",
|
|
801
|
+
"aria-current": isActive ? "page" : void 0,
|
|
802
|
+
...props
|
|
803
|
+
}
|
|
804
|
+
) });
|
|
805
|
+
}
|
|
806
|
+
function PaginationPrevious({
|
|
807
|
+
className,
|
|
808
|
+
...props
|
|
809
|
+
}) {
|
|
810
|
+
return /* @__PURE__ */ jsxs4(
|
|
811
|
+
PaginationLink,
|
|
812
|
+
{
|
|
813
|
+
"aria-label": "Go to previous page",
|
|
814
|
+
size: "default",
|
|
815
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
816
|
+
...props,
|
|
817
|
+
children: [
|
|
818
|
+
/* @__PURE__ */ jsx13(ChevronLeftIcon, { className: "size-4" }),
|
|
819
|
+
/* @__PURE__ */ jsx13("span", { className: "hidden sm:block", children: "Previous" })
|
|
820
|
+
]
|
|
821
|
+
}
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
function PaginationNext({
|
|
825
|
+
className,
|
|
826
|
+
...props
|
|
827
|
+
}) {
|
|
828
|
+
return /* @__PURE__ */ jsxs4(
|
|
829
|
+
PaginationLink,
|
|
830
|
+
{
|
|
831
|
+
"aria-label": "Go to next page",
|
|
832
|
+
size: "default",
|
|
833
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
834
|
+
...props,
|
|
835
|
+
children: [
|
|
836
|
+
/* @__PURE__ */ jsx13("span", { className: "hidden sm:block", children: "Next" }),
|
|
837
|
+
/* @__PURE__ */ jsx13(ChevronRightIcon3, { className: "size-4" })
|
|
838
|
+
]
|
|
839
|
+
}
|
|
840
|
+
);
|
|
841
|
+
}
|
|
842
|
+
function PaginationEllipsis({
|
|
843
|
+
className,
|
|
844
|
+
...props
|
|
845
|
+
}) {
|
|
846
|
+
return /* @__PURE__ */ jsxs4(
|
|
847
|
+
"span",
|
|
848
|
+
{
|
|
849
|
+
"data-slot": "pagination-ellipsis",
|
|
850
|
+
"aria-hidden": true,
|
|
851
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
852
|
+
...props,
|
|
853
|
+
children: [
|
|
854
|
+
/* @__PURE__ */ jsx13(MoreHorizontalIcon2, { className: "size-4" }),
|
|
855
|
+
/* @__PURE__ */ jsx13("span", { className: "sr-only", children: "More pages" })
|
|
856
|
+
]
|
|
857
|
+
}
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
// src/ui/toolbar.tsx
|
|
862
|
+
import { Toolbar as ToolbarPrimitive } from "radix-ui";
|
|
863
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
864
|
+
function Toolbar({
|
|
865
|
+
className,
|
|
866
|
+
...props
|
|
867
|
+
}) {
|
|
868
|
+
return /* @__PURE__ */ jsx14(
|
|
869
|
+
ToolbarPrimitive.Root,
|
|
870
|
+
{
|
|
871
|
+
"data-slot": "toolbar",
|
|
872
|
+
className: cn(
|
|
873
|
+
"flex items-center gap-1 rounded-lg border border-border bg-gradient-to-b from-elevated-from to-elevated-to p-1 shadow-card",
|
|
874
|
+
className
|
|
875
|
+
),
|
|
876
|
+
...props
|
|
877
|
+
}
|
|
878
|
+
);
|
|
879
|
+
}
|
|
880
|
+
function ToolbarButton({
|
|
881
|
+
className,
|
|
882
|
+
...props
|
|
883
|
+
}) {
|
|
884
|
+
return /* @__PURE__ */ jsx14(
|
|
885
|
+
ToolbarPrimitive.Button,
|
|
886
|
+
{
|
|
887
|
+
"data-slot": "toolbar-button",
|
|
888
|
+
className: cn(
|
|
889
|
+
"inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm font-medium text-foreground outline-none transition-colors",
|
|
890
|
+
"hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50",
|
|
891
|
+
className
|
|
892
|
+
),
|
|
893
|
+
...props
|
|
894
|
+
}
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
function ToolbarSeparator({
|
|
898
|
+
className,
|
|
899
|
+
...props
|
|
900
|
+
}) {
|
|
901
|
+
return /* @__PURE__ */ jsx14(
|
|
902
|
+
ToolbarPrimitive.Separator,
|
|
903
|
+
{
|
|
904
|
+
"data-slot": "toolbar-separator",
|
|
905
|
+
className: cn("mx-1 h-6 w-px bg-border", className),
|
|
906
|
+
...props
|
|
907
|
+
}
|
|
908
|
+
);
|
|
909
|
+
}
|
|
910
|
+
function ToolbarToggleGroup({
|
|
911
|
+
className,
|
|
912
|
+
...props
|
|
913
|
+
}) {
|
|
914
|
+
return /* @__PURE__ */ jsx14(
|
|
915
|
+
ToolbarPrimitive.ToggleGroup,
|
|
916
|
+
{
|
|
917
|
+
"data-slot": "toolbar-toggle-group",
|
|
918
|
+
className: cn("flex items-center gap-0.5", className),
|
|
919
|
+
...props
|
|
920
|
+
}
|
|
921
|
+
);
|
|
922
|
+
}
|
|
923
|
+
function ToolbarToggleItem({
|
|
924
|
+
className,
|
|
925
|
+
...props
|
|
926
|
+
}) {
|
|
927
|
+
return /* @__PURE__ */ jsx14(
|
|
928
|
+
ToolbarPrimitive.ToggleItem,
|
|
929
|
+
{
|
|
930
|
+
"data-slot": "toolbar-toggle-item",
|
|
931
|
+
className: cn(
|
|
932
|
+
"inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm outline-none transition-colors",
|
|
933
|
+
"hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
934
|
+
"data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
935
|
+
className
|
|
936
|
+
),
|
|
937
|
+
...props
|
|
938
|
+
}
|
|
939
|
+
);
|
|
940
|
+
}
|
|
941
|
+
function ToolbarLink({
|
|
942
|
+
className,
|
|
943
|
+
...props
|
|
944
|
+
}) {
|
|
945
|
+
return /* @__PURE__ */ jsx14(
|
|
946
|
+
ToolbarPrimitive.Link,
|
|
947
|
+
{
|
|
948
|
+
"data-slot": "toolbar-link",
|
|
949
|
+
className: cn(
|
|
950
|
+
"inline-flex h-8 items-center rounded-md px-2 text-sm text-foreground outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
951
|
+
className
|
|
952
|
+
),
|
|
953
|
+
...props
|
|
954
|
+
}
|
|
955
|
+
);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
// src/ui/menubar.tsx
|
|
959
|
+
import { Menubar as MenubarPrimitive } from "radix-ui";
|
|
960
|
+
import { CheckIcon as CheckIcon4, ChevronRightIcon as ChevronRightIcon4, CircleIcon as CircleIcon3 } from "lucide-react";
|
|
961
|
+
import { jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
962
|
+
function Menubar({
|
|
963
|
+
className,
|
|
964
|
+
...props
|
|
965
|
+
}) {
|
|
966
|
+
return /* @__PURE__ */ jsx15(
|
|
967
|
+
MenubarPrimitive.Root,
|
|
968
|
+
{
|
|
969
|
+
"data-slot": "menubar",
|
|
970
|
+
className: cn(
|
|
971
|
+
"flex h-9 items-center gap-1 rounded-lg border border-border bg-gradient-to-b from-elevated-from to-elevated-to p-1 shadow-card",
|
|
972
|
+
className
|
|
973
|
+
),
|
|
974
|
+
...props
|
|
975
|
+
}
|
|
976
|
+
);
|
|
977
|
+
}
|
|
978
|
+
function MenubarMenu({
|
|
979
|
+
...props
|
|
980
|
+
}) {
|
|
981
|
+
return /* @__PURE__ */ jsx15(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
982
|
+
}
|
|
983
|
+
function MenubarTrigger({
|
|
984
|
+
className,
|
|
985
|
+
...props
|
|
986
|
+
}) {
|
|
987
|
+
return /* @__PURE__ */ jsx15(
|
|
988
|
+
MenubarPrimitive.Trigger,
|
|
989
|
+
{
|
|
990
|
+
"data-slot": "menubar-trigger",
|
|
991
|
+
className: cn(
|
|
992
|
+
"flex cursor-default items-center rounded-md px-2 py-1 text-sm font-medium outline-none select-none",
|
|
993
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
994
|
+
className
|
|
995
|
+
),
|
|
996
|
+
...props
|
|
997
|
+
}
|
|
998
|
+
);
|
|
999
|
+
}
|
|
1000
|
+
function MenubarContent({
|
|
1001
|
+
className,
|
|
1002
|
+
align = "start",
|
|
1003
|
+
alignOffset = -4,
|
|
1004
|
+
sideOffset = 8,
|
|
1005
|
+
...props
|
|
1006
|
+
}) {
|
|
1007
|
+
return /* @__PURE__ */ jsx15(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx15(
|
|
1008
|
+
MenubarPrimitive.Content,
|
|
1009
|
+
{
|
|
1010
|
+
"data-slot": "menubar-content",
|
|
1011
|
+
align,
|
|
1012
|
+
alignOffset,
|
|
1013
|
+
sideOffset,
|
|
1014
|
+
className: cn(
|
|
1015
|
+
overlaySurfaceClass,
|
|
1016
|
+
"min-w-[12rem] origin-[var(--radix-menubar-content-transform-origin)] overflow-hidden rounded-lg p-1",
|
|
1017
|
+
className
|
|
1018
|
+
),
|
|
1019
|
+
...props
|
|
1020
|
+
}
|
|
1021
|
+
) });
|
|
1022
|
+
}
|
|
1023
|
+
function MenubarItem({
|
|
1024
|
+
className,
|
|
1025
|
+
inset,
|
|
1026
|
+
variant = "default",
|
|
1027
|
+
...props
|
|
1028
|
+
}) {
|
|
1029
|
+
return /* @__PURE__ */ jsx15(
|
|
1030
|
+
MenubarPrimitive.Item,
|
|
1031
|
+
{
|
|
1032
|
+
"data-slot": "menubar-item",
|
|
1033
|
+
"data-inset": inset,
|
|
1034
|
+
"data-variant": variant,
|
|
1035
|
+
className: cn(
|
|
1036
|
+
overlayItemClass,
|
|
1037
|
+
"data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
|
|
1038
|
+
className
|
|
1039
|
+
),
|
|
1040
|
+
...props
|
|
1041
|
+
}
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
1044
|
+
function MenubarCheckboxItem({
|
|
1045
|
+
className,
|
|
1046
|
+
children,
|
|
1047
|
+
checked,
|
|
1048
|
+
...props
|
|
1049
|
+
}) {
|
|
1050
|
+
return /* @__PURE__ */ jsxs5(
|
|
1051
|
+
MenubarPrimitive.CheckboxItem,
|
|
1052
|
+
{
|
|
1053
|
+
"data-slot": "menubar-checkbox-item",
|
|
1054
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
1055
|
+
checked,
|
|
1056
|
+
...props,
|
|
1057
|
+
children: [
|
|
1058
|
+
/* @__PURE__ */ jsx15("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx15(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(CheckIcon4, { className: "size-4" }) }) }),
|
|
1059
|
+
children
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
);
|
|
1063
|
+
}
|
|
1064
|
+
function MenubarRadioGroup({
|
|
1065
|
+
...props
|
|
1066
|
+
}) {
|
|
1067
|
+
return /* @__PURE__ */ jsx15(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
1068
|
+
}
|
|
1069
|
+
function MenubarRadioItem({
|
|
1070
|
+
className,
|
|
1071
|
+
children,
|
|
1072
|
+
...props
|
|
1073
|
+
}) {
|
|
1074
|
+
return /* @__PURE__ */ jsxs5(
|
|
1075
|
+
MenubarPrimitive.RadioItem,
|
|
1076
|
+
{
|
|
1077
|
+
"data-slot": "menubar-radio-item",
|
|
1078
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
1079
|
+
...props,
|
|
1080
|
+
children: [
|
|
1081
|
+
/* @__PURE__ */ jsx15("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx15(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(CircleIcon3, { className: "size-2 fill-current" }) }) }),
|
|
1082
|
+
children
|
|
1083
|
+
]
|
|
1084
|
+
}
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
function MenubarLabel({
|
|
1088
|
+
className,
|
|
1089
|
+
inset,
|
|
1090
|
+
...props
|
|
1091
|
+
}) {
|
|
1092
|
+
return /* @__PURE__ */ jsx15(
|
|
1093
|
+
MenubarPrimitive.Label,
|
|
1094
|
+
{
|
|
1095
|
+
"data-slot": "menubar-label",
|
|
1096
|
+
"data-inset": inset,
|
|
1097
|
+
className: cn(
|
|
1098
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
|
|
1099
|
+
className
|
|
1100
|
+
),
|
|
1101
|
+
...props
|
|
1102
|
+
}
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
function MenubarSeparator({
|
|
1106
|
+
className,
|
|
1107
|
+
...props
|
|
1108
|
+
}) {
|
|
1109
|
+
return /* @__PURE__ */ jsx15(
|
|
1110
|
+
MenubarPrimitive.Separator,
|
|
1111
|
+
{
|
|
1112
|
+
"data-slot": "menubar-separator",
|
|
1113
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1114
|
+
...props
|
|
1115
|
+
}
|
|
1116
|
+
);
|
|
1117
|
+
}
|
|
1118
|
+
function MenubarShortcut({
|
|
1119
|
+
className,
|
|
1120
|
+
...props
|
|
1121
|
+
}) {
|
|
1122
|
+
return /* @__PURE__ */ jsx15(
|
|
1123
|
+
"span",
|
|
1124
|
+
{
|
|
1125
|
+
"data-slot": "menubar-shortcut",
|
|
1126
|
+
className: cn(
|
|
1127
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1128
|
+
className
|
|
1129
|
+
),
|
|
1130
|
+
...props
|
|
1131
|
+
}
|
|
1132
|
+
);
|
|
1133
|
+
}
|
|
1134
|
+
function MenubarSub({
|
|
1135
|
+
...props
|
|
1136
|
+
}) {
|
|
1137
|
+
return /* @__PURE__ */ jsx15(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
1138
|
+
}
|
|
1139
|
+
function MenubarSubTrigger({
|
|
1140
|
+
className,
|
|
1141
|
+
inset,
|
|
1142
|
+
children,
|
|
1143
|
+
...props
|
|
1144
|
+
}) {
|
|
1145
|
+
return /* @__PURE__ */ jsxs5(
|
|
1146
|
+
MenubarPrimitive.SubTrigger,
|
|
1147
|
+
{
|
|
1148
|
+
"data-slot": "menubar-sub-trigger",
|
|
1149
|
+
"data-inset": inset,
|
|
1150
|
+
className: cn(
|
|
1151
|
+
overlayItemClass,
|
|
1152
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
1153
|
+
className
|
|
1154
|
+
),
|
|
1155
|
+
...props,
|
|
1156
|
+
children: [
|
|
1157
|
+
children,
|
|
1158
|
+
/* @__PURE__ */ jsx15(ChevronRightIcon4, { className: "ml-auto size-4" })
|
|
1159
|
+
]
|
|
1160
|
+
}
|
|
1161
|
+
);
|
|
1162
|
+
}
|
|
1163
|
+
function MenubarSubContent({
|
|
1164
|
+
className,
|
|
1165
|
+
...props
|
|
1166
|
+
}) {
|
|
1167
|
+
return /* @__PURE__ */ jsx15(
|
|
1168
|
+
MenubarPrimitive.SubContent,
|
|
1169
|
+
{
|
|
1170
|
+
"data-slot": "menubar-sub-content",
|
|
1171
|
+
className: cn(
|
|
1172
|
+
overlaySurfaceClass,
|
|
1173
|
+
"min-w-[8rem] origin-[var(--radix-menubar-content-transform-origin)] overflow-hidden rounded-lg p-1",
|
|
1174
|
+
className
|
|
1175
|
+
),
|
|
1176
|
+
...props
|
|
1177
|
+
}
|
|
1178
|
+
);
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
// src/ui/navigation-menu.tsx
|
|
1182
|
+
import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui";
|
|
1183
|
+
import { ChevronDownIcon as ChevronDownIcon2 } from "lucide-react";
|
|
1184
|
+
import { cva } from "class-variance-authority";
|
|
1185
|
+
import { jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1186
|
+
function NavigationMenu({
|
|
1187
|
+
className,
|
|
1188
|
+
children,
|
|
1189
|
+
viewport = true,
|
|
1190
|
+
...props
|
|
1191
|
+
}) {
|
|
1192
|
+
return /* @__PURE__ */ jsxs6(
|
|
1193
|
+
NavigationMenuPrimitive.Root,
|
|
1194
|
+
{
|
|
1195
|
+
"data-slot": "navigation-menu",
|
|
1196
|
+
"data-viewport": viewport,
|
|
1197
|
+
className: cn(
|
|
1198
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
1199
|
+
className
|
|
1200
|
+
),
|
|
1201
|
+
...props,
|
|
1202
|
+
children: [
|
|
1203
|
+
children,
|
|
1204
|
+
viewport ? /* @__PURE__ */ jsx16(NavigationMenuViewport, {}) : null
|
|
1205
|
+
]
|
|
1206
|
+
}
|
|
1207
|
+
);
|
|
1208
|
+
}
|
|
1209
|
+
function NavigationMenuList({
|
|
1210
|
+
className,
|
|
1211
|
+
...props
|
|
1212
|
+
}) {
|
|
1213
|
+
return /* @__PURE__ */ jsx16(
|
|
1214
|
+
NavigationMenuPrimitive.List,
|
|
1215
|
+
{
|
|
1216
|
+
"data-slot": "navigation-menu-list",
|
|
1217
|
+
className: cn(
|
|
1218
|
+
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
1219
|
+
className
|
|
1220
|
+
),
|
|
1221
|
+
...props
|
|
1222
|
+
}
|
|
1223
|
+
);
|
|
1224
|
+
}
|
|
1225
|
+
function NavigationMenuItem({
|
|
1226
|
+
...props
|
|
1227
|
+
}) {
|
|
1228
|
+
return /* @__PURE__ */ jsx16(NavigationMenuPrimitive.Item, { "data-slot": "navigation-menu-item", ...props });
|
|
1229
|
+
}
|
|
1230
|
+
var navigationMenuTriggerStyle = cva(
|
|
1231
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-lg bg-transparent px-4 py-2 text-sm font-medium transition-colors hover:bg-muted hover:text-foreground focus:bg-muted focus:text-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-muted/80 data-[state=open]:text-foreground"
|
|
1232
|
+
);
|
|
1233
|
+
function NavigationMenuTrigger({
|
|
1234
|
+
className,
|
|
1235
|
+
children,
|
|
1236
|
+
...props
|
|
1237
|
+
}) {
|
|
1238
|
+
return /* @__PURE__ */ jsxs6(
|
|
1239
|
+
NavigationMenuPrimitive.Trigger,
|
|
1240
|
+
{
|
|
1241
|
+
"data-slot": "navigation-menu-trigger",
|
|
1242
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
1243
|
+
...props,
|
|
1244
|
+
children: [
|
|
1245
|
+
children,
|
|
1246
|
+
" ",
|
|
1247
|
+
/* @__PURE__ */ jsx16(
|
|
1248
|
+
ChevronDownIcon2,
|
|
1249
|
+
{
|
|
1250
|
+
className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
1251
|
+
"aria-hidden": "true"
|
|
1252
|
+
}
|
|
1253
|
+
)
|
|
1254
|
+
]
|
|
1255
|
+
}
|
|
1256
|
+
);
|
|
1257
|
+
}
|
|
1258
|
+
function NavigationMenuContent({
|
|
1259
|
+
className,
|
|
1260
|
+
...props
|
|
1261
|
+
}) {
|
|
1262
|
+
return /* @__PURE__ */ jsx16(
|
|
1263
|
+
NavigationMenuPrimitive.Content,
|
|
1264
|
+
{
|
|
1265
|
+
"data-slot": "navigation-menu-content",
|
|
1266
|
+
className: cn(
|
|
1267
|
+
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
1268
|
+
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:border-border group-data-[viewport=false]/navigation-menu:shadow-card",
|
|
1269
|
+
className
|
|
1270
|
+
),
|
|
1271
|
+
...props
|
|
1272
|
+
}
|
|
1273
|
+
);
|
|
1274
|
+
}
|
|
1275
|
+
function NavigationMenuViewport({
|
|
1276
|
+
className,
|
|
1277
|
+
...props
|
|
1278
|
+
}) {
|
|
1279
|
+
return /* @__PURE__ */ jsx16("div", { className: cn("absolute top-full left-0 isolate z-[80] flex justify-center"), children: /* @__PURE__ */ jsx16(
|
|
1280
|
+
NavigationMenuPrimitive.Viewport,
|
|
1281
|
+
{
|
|
1282
|
+
"data-slot": "navigation-menu-viewport",
|
|
1283
|
+
className: cn(
|
|
1284
|
+
overlaySurfaceClass,
|
|
1285
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-lg md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
1286
|
+
className
|
|
1287
|
+
),
|
|
1288
|
+
...props
|
|
1289
|
+
}
|
|
1290
|
+
) });
|
|
1291
|
+
}
|
|
1292
|
+
function NavigationMenuLink({
|
|
1293
|
+
className,
|
|
1294
|
+
...props
|
|
1295
|
+
}) {
|
|
1296
|
+
return /* @__PURE__ */ jsx16(
|
|
1297
|
+
NavigationMenuPrimitive.Link,
|
|
1298
|
+
{
|
|
1299
|
+
"data-slot": "navigation-menu-link",
|
|
1300
|
+
className: cn(
|
|
1301
|
+
"flex flex-col gap-1 rounded-md p-2 text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
1302
|
+
className
|
|
1303
|
+
),
|
|
1304
|
+
...props
|
|
1305
|
+
}
|
|
1306
|
+
);
|
|
1307
|
+
}
|
|
1308
|
+
function NavigationMenuIndicator({
|
|
1309
|
+
className,
|
|
1310
|
+
...props
|
|
1311
|
+
}) {
|
|
1312
|
+
return /* @__PURE__ */ jsx16(
|
|
1313
|
+
NavigationMenuPrimitive.Indicator,
|
|
1314
|
+
{
|
|
1315
|
+
"data-slot": "navigation-menu-indicator",
|
|
1316
|
+
className: cn(
|
|
1317
|
+
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
|
|
1318
|
+
className
|
|
1319
|
+
),
|
|
1320
|
+
...props,
|
|
1321
|
+
children: /* @__PURE__ */ jsx16("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
1322
|
+
}
|
|
1323
|
+
);
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
// src/ui/command.tsx
|
|
1327
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
1328
|
+
import { SearchIcon } from "lucide-react";
|
|
1329
|
+
import { jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1330
|
+
function Command({
|
|
1331
|
+
className,
|
|
1332
|
+
...props
|
|
1333
|
+
}) {
|
|
1334
|
+
return /* @__PURE__ */ jsx17(
|
|
1335
|
+
CommandPrimitive,
|
|
1336
|
+
{
|
|
1337
|
+
"data-slot": "command",
|
|
1338
|
+
className: cn(
|
|
1339
|
+
"flex h-full w-full flex-col overflow-hidden bg-popover text-popover-foreground",
|
|
1340
|
+
className
|
|
1341
|
+
),
|
|
1342
|
+
...props
|
|
1343
|
+
}
|
|
1344
|
+
);
|
|
1345
|
+
}
|
|
1346
|
+
function CommandDialog({
|
|
1347
|
+
title = "Command palette",
|
|
1348
|
+
description = "Search for a command to run\u2026",
|
|
1349
|
+
children,
|
|
1350
|
+
className,
|
|
1351
|
+
showCloseButton = true,
|
|
1352
|
+
...props
|
|
1353
|
+
}) {
|
|
1354
|
+
return /* @__PURE__ */ jsxs7(Dialog, { ...props, children: [
|
|
1355
|
+
/* @__PURE__ */ jsxs7(DialogHeader, { className: "sr-only", children: [
|
|
1356
|
+
/* @__PURE__ */ jsx17(DialogTitle, { children: title }),
|
|
1357
|
+
/* @__PURE__ */ jsx17(DialogDescription, { children: description })
|
|
1358
|
+
] }),
|
|
1359
|
+
/* @__PURE__ */ jsx17(
|
|
1360
|
+
DialogContent,
|
|
1361
|
+
{
|
|
1362
|
+
className: cn("overflow-hidden p-0", className),
|
|
1363
|
+
showCloseButton,
|
|
1364
|
+
children: /* @__PURE__ */ jsx17(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-4 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:size-4", children })
|
|
1365
|
+
}
|
|
1366
|
+
)
|
|
1367
|
+
] });
|
|
1368
|
+
}
|
|
1369
|
+
function CommandInput({
|
|
1370
|
+
className,
|
|
1371
|
+
...props
|
|
1372
|
+
}) {
|
|
1373
|
+
return /* @__PURE__ */ jsxs7(
|
|
1374
|
+
"div",
|
|
1375
|
+
{
|
|
1376
|
+
"data-slot": "command-input-wrapper",
|
|
1377
|
+
className: "flex h-10 items-center gap-2 border-b border-border px-3",
|
|
1378
|
+
children: [
|
|
1379
|
+
/* @__PURE__ */ jsx17(SearchIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
1380
|
+
/* @__PURE__ */ jsx17(
|
|
1381
|
+
CommandPrimitive.Input,
|
|
1382
|
+
{
|
|
1383
|
+
"data-slot": "command-input",
|
|
1384
|
+
className: cn(
|
|
1385
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1386
|
+
className
|
|
1387
|
+
),
|
|
1388
|
+
...props
|
|
1389
|
+
}
|
|
1390
|
+
)
|
|
1391
|
+
]
|
|
1392
|
+
}
|
|
1393
|
+
);
|
|
1394
|
+
}
|
|
1395
|
+
function CommandList({
|
|
1396
|
+
className,
|
|
1397
|
+
...props
|
|
1398
|
+
}) {
|
|
1399
|
+
return /* @__PURE__ */ jsx17(
|
|
1400
|
+
CommandPrimitive.List,
|
|
1401
|
+
{
|
|
1402
|
+
"data-slot": "command-list",
|
|
1403
|
+
className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
1404
|
+
...props
|
|
1405
|
+
}
|
|
1406
|
+
);
|
|
1407
|
+
}
|
|
1408
|
+
function CommandEmpty({
|
|
1409
|
+
...props
|
|
1410
|
+
}) {
|
|
1411
|
+
return /* @__PURE__ */ jsx17(
|
|
1412
|
+
CommandPrimitive.Empty,
|
|
1413
|
+
{
|
|
1414
|
+
"data-slot": "command-empty",
|
|
1415
|
+
className: "py-6 text-center text-sm text-muted-foreground",
|
|
1416
|
+
...props
|
|
1417
|
+
}
|
|
1418
|
+
);
|
|
1419
|
+
}
|
|
1420
|
+
function CommandGroup({
|
|
1421
|
+
className,
|
|
1422
|
+
...props
|
|
1423
|
+
}) {
|
|
1424
|
+
return /* @__PURE__ */ jsx17(
|
|
1425
|
+
CommandPrimitive.Group,
|
|
1426
|
+
{
|
|
1427
|
+
"data-slot": "command-group",
|
|
1428
|
+
className: cn(
|
|
1429
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
1430
|
+
className
|
|
1431
|
+
),
|
|
1432
|
+
...props
|
|
1433
|
+
}
|
|
1434
|
+
);
|
|
1435
|
+
}
|
|
1436
|
+
function CommandSeparator({
|
|
1437
|
+
className,
|
|
1438
|
+
...props
|
|
1439
|
+
}) {
|
|
1440
|
+
return /* @__PURE__ */ jsx17(
|
|
1441
|
+
CommandPrimitive.Separator,
|
|
1442
|
+
{
|
|
1443
|
+
"data-slot": "command-separator",
|
|
1444
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
1445
|
+
...props
|
|
1446
|
+
}
|
|
1447
|
+
);
|
|
1448
|
+
}
|
|
1449
|
+
function CommandItem({
|
|
1450
|
+
className,
|
|
1451
|
+
...props
|
|
1452
|
+
}) {
|
|
1453
|
+
return /* @__PURE__ */ jsx17(
|
|
1454
|
+
CommandPrimitive.Item,
|
|
1455
|
+
{
|
|
1456
|
+
"data-slot": "command-item",
|
|
1457
|
+
className: cn(
|
|
1458
|
+
overlayItemClass,
|
|
1459
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",
|
|
1460
|
+
className
|
|
1461
|
+
),
|
|
1462
|
+
...props
|
|
1463
|
+
}
|
|
1464
|
+
);
|
|
1465
|
+
}
|
|
1466
|
+
function CommandShortcut({
|
|
1467
|
+
className,
|
|
1468
|
+
...props
|
|
1469
|
+
}) {
|
|
1470
|
+
return /* @__PURE__ */ jsx17(
|
|
1471
|
+
"span",
|
|
1472
|
+
{
|
|
1473
|
+
"data-slot": "command-shortcut",
|
|
1474
|
+
className: cn(
|
|
1475
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1476
|
+
className
|
|
1477
|
+
),
|
|
1478
|
+
...props
|
|
1479
|
+
}
|
|
1480
|
+
);
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
// src/ui/calendar.tsx
|
|
1484
|
+
import * as React from "react";
|
|
1485
|
+
import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon5 } from "lucide-react";
|
|
1486
|
+
import { DayPicker } from "react-day-picker";
|
|
1487
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1488
|
+
function Calendar({
|
|
1489
|
+
className,
|
|
1490
|
+
classNames,
|
|
1491
|
+
showOutsideDays = true,
|
|
1492
|
+
...props
|
|
1493
|
+
}) {
|
|
1494
|
+
return /* @__PURE__ */ jsx18(
|
|
1495
|
+
DayPicker,
|
|
1496
|
+
{
|
|
1497
|
+
showOutsideDays,
|
|
1498
|
+
className: cn("p-3", className),
|
|
1499
|
+
classNames: {
|
|
1500
|
+
months: "flex flex-col gap-4 sm:flex-row sm:gap-4",
|
|
1501
|
+
month: "flex flex-col gap-4",
|
|
1502
|
+
month_caption: "relative flex items-center justify-center pt-1",
|
|
1503
|
+
caption_label: "text-sm font-medium",
|
|
1504
|
+
nav: "flex items-center gap-1",
|
|
1505
|
+
button_previous: cn(
|
|
1506
|
+
buttonVariants({ variant: "outline" }),
|
|
1507
|
+
"absolute left-1 size-7 bg-transparent p-0 opacity-70 hover:opacity-100"
|
|
1508
|
+
),
|
|
1509
|
+
button_next: cn(
|
|
1510
|
+
buttonVariants({ variant: "outline" }),
|
|
1511
|
+
"absolute right-1 size-7 bg-transparent p-0 opacity-70 hover:opacity-100"
|
|
1512
|
+
),
|
|
1513
|
+
month_grid: "w-full border-collapse",
|
|
1514
|
+
weekdays: "flex",
|
|
1515
|
+
weekday: "w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground",
|
|
1516
|
+
week: "mt-2 flex w-full",
|
|
1517
|
+
day: cn(
|
|
1518
|
+
"relative size-9 p-0 text-center text-sm",
|
|
1519
|
+
"[&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
1520
|
+
"[&:has([aria-selected].day-outside)]:bg-accent/50",
|
|
1521
|
+
"[&:has([aria-selected])]:bg-accent",
|
|
1522
|
+
"first:[&:has([aria-selected])]:rounded-l-md",
|
|
1523
|
+
"last:[&:has([aria-selected])]:rounded-r-md",
|
|
1524
|
+
"focus-within:relative focus-within:z-10"
|
|
1525
|
+
),
|
|
1526
|
+
day_button: cn(
|
|
1527
|
+
buttonVariants({ variant: "ghost" }),
|
|
1528
|
+
"size-9 p-0 font-normal aria-selected:opacity-100"
|
|
1529
|
+
),
|
|
1530
|
+
range_start: "day-range-start rounded-l-md",
|
|
1531
|
+
range_middle: "day-range-middle aria-selected:bg-accent",
|
|
1532
|
+
range_end: "day-range-end rounded-r-md",
|
|
1533
|
+
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
1534
|
+
today: "bg-accent text-accent-foreground",
|
|
1535
|
+
outside: "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
|
|
1536
|
+
disabled: "text-muted-foreground opacity-50",
|
|
1537
|
+
hidden: "invisible",
|
|
1538
|
+
...classNames
|
|
1539
|
+
},
|
|
1540
|
+
components: {
|
|
1541
|
+
Chevron: ({ orientation, className: className2, ...chevronProps }) => {
|
|
1542
|
+
const Icon = orientation === "left" ? ChevronLeftIcon2 : ChevronRightIcon5;
|
|
1543
|
+
return /* @__PURE__ */ jsx18(Icon, { className: cn("size-4", className2), ...chevronProps });
|
|
1544
|
+
},
|
|
1545
|
+
DayButton: CalendarDayButton
|
|
1546
|
+
},
|
|
1547
|
+
...props
|
|
1548
|
+
}
|
|
1549
|
+
);
|
|
1550
|
+
}
|
|
1551
|
+
function CalendarDayButton({
|
|
1552
|
+
className,
|
|
1553
|
+
day,
|
|
1554
|
+
modifiers,
|
|
1555
|
+
...props
|
|
1556
|
+
}) {
|
|
1557
|
+
const ref = React.useRef(null);
|
|
1558
|
+
React.useEffect(() => {
|
|
1559
|
+
if (modifiers.focused) ref.current?.focus();
|
|
1560
|
+
}, [modifiers.focused]);
|
|
1561
|
+
return /* @__PURE__ */ jsx18(
|
|
1562
|
+
"button",
|
|
1563
|
+
{
|
|
1564
|
+
ref,
|
|
1565
|
+
type: "button",
|
|
1566
|
+
"data-day": day.date.toLocaleDateString(),
|
|
1567
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
1568
|
+
"data-range-start": modifiers.range_start,
|
|
1569
|
+
"data-range-end": modifiers.range_end,
|
|
1570
|
+
"data-range-middle": modifiers.range_middle,
|
|
1571
|
+
className: cn(
|
|
1572
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors",
|
|
1573
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
1574
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 focus-visible:outline-none",
|
|
1575
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
1576
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground",
|
|
1577
|
+
"data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground",
|
|
1578
|
+
"data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground",
|
|
1579
|
+
"data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground",
|
|
1580
|
+
className
|
|
1581
|
+
),
|
|
1582
|
+
...props
|
|
1583
|
+
}
|
|
1584
|
+
);
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
// src/ui/combobox.tsx
|
|
1588
|
+
import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
|
|
1589
|
+
import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1590
|
+
function Combobox({
|
|
1591
|
+
...props
|
|
1592
|
+
}) {
|
|
1593
|
+
return /* @__PURE__ */ jsx19(Popover, { "data-slot": "combobox", ...props });
|
|
1594
|
+
}
|
|
1595
|
+
function ComboboxTrigger({
|
|
1596
|
+
className,
|
|
1597
|
+
size = "default",
|
|
1598
|
+
children,
|
|
1599
|
+
...props
|
|
1600
|
+
}) {
|
|
1601
|
+
return /* @__PURE__ */ jsxs8(
|
|
1602
|
+
PopoverTrigger,
|
|
1603
|
+
{
|
|
1604
|
+
"data-slot": "combobox-trigger",
|
|
1605
|
+
className: cn(
|
|
1606
|
+
controlClass({ size }),
|
|
1607
|
+
"flex w-full items-center justify-between gap-2 whitespace-nowrap font-normal",
|
|
1608
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
1609
|
+
className
|
|
1610
|
+
),
|
|
1611
|
+
...props,
|
|
1612
|
+
children: [
|
|
1613
|
+
/* @__PURE__ */ jsx19("span", { className: "truncate", children }),
|
|
1614
|
+
/* @__PURE__ */ jsx19(ChevronDownIcon3, { className: "size-4 shrink-0 opacity-50" })
|
|
1615
|
+
]
|
|
1616
|
+
}
|
|
1617
|
+
);
|
|
1618
|
+
}
|
|
1619
|
+
function ComboboxAnchor({
|
|
1620
|
+
...props
|
|
1621
|
+
}) {
|
|
1622
|
+
return /* @__PURE__ */ jsx19(PopoverAnchor, { "data-slot": "combobox-anchor", ...props });
|
|
1623
|
+
}
|
|
1624
|
+
function ComboboxContent({
|
|
1625
|
+
className,
|
|
1626
|
+
align = "start",
|
|
1627
|
+
...props
|
|
1628
|
+
}) {
|
|
1629
|
+
return /* @__PURE__ */ jsx19(
|
|
1630
|
+
PopoverContent,
|
|
1631
|
+
{
|
|
1632
|
+
"data-slot": "combobox-content",
|
|
1633
|
+
variant: "list",
|
|
1634
|
+
align,
|
|
1635
|
+
className: cn(
|
|
1636
|
+
"w-[var(--radix-popover-trigger-width)] min-w-[8rem] p-0",
|
|
1637
|
+
className
|
|
1638
|
+
),
|
|
1639
|
+
...props
|
|
1640
|
+
}
|
|
1641
|
+
);
|
|
1642
|
+
}
|
|
1643
|
+
function ComboboxCommand({
|
|
1644
|
+
className,
|
|
1645
|
+
...props
|
|
1646
|
+
}) {
|
|
1647
|
+
return /* @__PURE__ */ jsx19(
|
|
1648
|
+
Command,
|
|
1649
|
+
{
|
|
1650
|
+
"data-slot": "combobox-command",
|
|
1651
|
+
className,
|
|
1652
|
+
...props
|
|
1653
|
+
}
|
|
1654
|
+
);
|
|
1655
|
+
}
|
|
1656
|
+
function ComboboxInput({
|
|
1657
|
+
...props
|
|
1658
|
+
}) {
|
|
1659
|
+
return /* @__PURE__ */ jsx19(CommandInput, { "data-slot": "combobox-input", ...props });
|
|
1660
|
+
}
|
|
1661
|
+
function ComboboxList({
|
|
1662
|
+
...props
|
|
1663
|
+
}) {
|
|
1664
|
+
return /* @__PURE__ */ jsx19(CommandList, { "data-slot": "combobox-list", ...props });
|
|
1665
|
+
}
|
|
1666
|
+
function ComboboxEmpty({
|
|
1667
|
+
...props
|
|
1668
|
+
}) {
|
|
1669
|
+
return /* @__PURE__ */ jsx19(CommandEmpty, { "data-slot": "combobox-empty", ...props });
|
|
1670
|
+
}
|
|
1671
|
+
function ComboboxGroup({
|
|
1672
|
+
...props
|
|
1673
|
+
}) {
|
|
1674
|
+
return /* @__PURE__ */ jsx19(CommandGroup, { "data-slot": "combobox-group", ...props });
|
|
1675
|
+
}
|
|
1676
|
+
function ComboboxItem({
|
|
1677
|
+
...props
|
|
1678
|
+
}) {
|
|
1679
|
+
return /* @__PURE__ */ jsx19(CommandItem, { "data-slot": "combobox-item", ...props });
|
|
1680
|
+
}
|
|
1681
|
+
function ComboboxSeparator({
|
|
1682
|
+
...props
|
|
1683
|
+
}) {
|
|
1684
|
+
return /* @__PURE__ */ jsx19(CommandSeparator, { "data-slot": "combobox-separator", ...props });
|
|
1685
|
+
}
|
|
1686
|
+
function ComboboxShortcut({
|
|
1687
|
+
...props
|
|
1688
|
+
}) {
|
|
1689
|
+
return /* @__PURE__ */ jsx19(CommandShortcut, { "data-slot": "combobox-shortcut", ...props });
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
// src/ui/date-picker.tsx
|
|
1693
|
+
import { CalendarIcon } from "lucide-react";
|
|
1694
|
+
import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1695
|
+
function DatePicker({
|
|
1696
|
+
...props
|
|
1697
|
+
}) {
|
|
1698
|
+
return /* @__PURE__ */ jsx20(Popover, { "data-slot": "date-picker", ...props });
|
|
1699
|
+
}
|
|
1700
|
+
function DatePickerTrigger({
|
|
1701
|
+
...props
|
|
1702
|
+
}) {
|
|
1703
|
+
return /* @__PURE__ */ jsx20(PopoverTrigger, { "data-slot": "date-picker-trigger", ...props });
|
|
1704
|
+
}
|
|
1705
|
+
function DatePickerContent({
|
|
1706
|
+
className,
|
|
1707
|
+
align = "start",
|
|
1708
|
+
...props
|
|
1709
|
+
}) {
|
|
1710
|
+
return /* @__PURE__ */ jsx20(
|
|
1711
|
+
PopoverContent,
|
|
1712
|
+
{
|
|
1713
|
+
"data-slot": "date-picker-content",
|
|
1714
|
+
align,
|
|
1715
|
+
className: cn("w-auto p-0", className),
|
|
1716
|
+
...props
|
|
1717
|
+
}
|
|
1718
|
+
);
|
|
1719
|
+
}
|
|
1720
|
+
function DatePickerCalendar({
|
|
1721
|
+
className,
|
|
1722
|
+
...props
|
|
1723
|
+
}) {
|
|
1724
|
+
return /* @__PURE__ */ jsx20(
|
|
1725
|
+
Calendar,
|
|
1726
|
+
{
|
|
1727
|
+
"data-slot": "date-picker-calendar",
|
|
1728
|
+
className: cn("rounded-lg border-0", className),
|
|
1729
|
+
...props
|
|
1730
|
+
}
|
|
1731
|
+
);
|
|
1732
|
+
}
|
|
1733
|
+
function formatPickerDate(date) {
|
|
1734
|
+
return date.toLocaleDateString(void 0, {
|
|
1735
|
+
month: "short",
|
|
1736
|
+
day: "numeric",
|
|
1737
|
+
year: "numeric"
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1740
|
+
function DatePickerButton({
|
|
1741
|
+
date,
|
|
1742
|
+
placeholder = "Pick a date",
|
|
1743
|
+
className,
|
|
1744
|
+
...props
|
|
1745
|
+
}) {
|
|
1746
|
+
return /* @__PURE__ */ jsxs9(
|
|
1747
|
+
"button",
|
|
1748
|
+
{
|
|
1749
|
+
type: "button",
|
|
1750
|
+
"data-slot": "date-picker-button",
|
|
1751
|
+
className: cn(
|
|
1752
|
+
controlClass(),
|
|
1753
|
+
"flex w-full items-center justify-start gap-2 text-left font-normal",
|
|
1754
|
+
!date && "text-muted-foreground",
|
|
1755
|
+
className
|
|
1756
|
+
),
|
|
1757
|
+
...props,
|
|
1758
|
+
children: [
|
|
1759
|
+
/* @__PURE__ */ jsx20(CalendarIcon, { className: "size-4 shrink-0 opacity-70" }),
|
|
1760
|
+
date ? formatPickerDate(date) : placeholder
|
|
1761
|
+
]
|
|
1762
|
+
}
|
|
1763
|
+
);
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
// src/ui/input-otp.tsx
|
|
1767
|
+
import { MinusIcon } from "lucide-react";
|
|
1768
|
+
import { unstable_OneTimePasswordField as OTPField } from "radix-ui";
|
|
1769
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1770
|
+
function InputOTP({
|
|
1771
|
+
className,
|
|
1772
|
+
containerClassName,
|
|
1773
|
+
children,
|
|
1774
|
+
...props
|
|
1775
|
+
}) {
|
|
1776
|
+
return /* @__PURE__ */ jsx21(
|
|
1777
|
+
OTPField.Root,
|
|
1778
|
+
{
|
|
1779
|
+
"data-slot": "input-otp",
|
|
1780
|
+
className: cn(
|
|
1781
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
1782
|
+
containerClassName,
|
|
1783
|
+
className
|
|
1784
|
+
),
|
|
1785
|
+
...props,
|
|
1786
|
+
children
|
|
1787
|
+
}
|
|
1788
|
+
);
|
|
1789
|
+
}
|
|
1790
|
+
function InputOTPGroup({
|
|
1791
|
+
className,
|
|
1792
|
+
...props
|
|
1793
|
+
}) {
|
|
1794
|
+
return /* @__PURE__ */ jsx21(
|
|
1795
|
+
"div",
|
|
1796
|
+
{
|
|
1797
|
+
"data-slot": "input-otp-group",
|
|
1798
|
+
className: cn("flex items-center", className),
|
|
1799
|
+
...props
|
|
1800
|
+
}
|
|
1801
|
+
);
|
|
1802
|
+
}
|
|
1803
|
+
function InputOTPSlot({
|
|
1804
|
+
className,
|
|
1805
|
+
...props
|
|
1806
|
+
}) {
|
|
1807
|
+
return /* @__PURE__ */ jsx21(
|
|
1808
|
+
OTPField.Input,
|
|
1809
|
+
{
|
|
1810
|
+
"data-slot": "input-otp-slot",
|
|
1811
|
+
className: cn(
|
|
1812
|
+
controlSurfaceClass,
|
|
1813
|
+
"relative size-9 rounded-none text-center text-sm tabular-nums",
|
|
1814
|
+
"-ms-px first:ms-0 first:rounded-s-lg last:rounded-e-lg",
|
|
1815
|
+
"focus-visible:z-10",
|
|
1816
|
+
className
|
|
1817
|
+
),
|
|
1818
|
+
...props
|
|
1819
|
+
}
|
|
1820
|
+
);
|
|
1821
|
+
}
|
|
1822
|
+
function InputOTPHiddenInput({
|
|
1823
|
+
...props
|
|
1824
|
+
}) {
|
|
1825
|
+
return /* @__PURE__ */ jsx21(OTPField.HiddenInput, { "data-slot": "input-otp-hidden-input", ...props });
|
|
1826
|
+
}
|
|
1827
|
+
function InputOTPSeparator({
|
|
1828
|
+
className,
|
|
1829
|
+
...props
|
|
1830
|
+
}) {
|
|
1831
|
+
return /* @__PURE__ */ jsx21(
|
|
1832
|
+
"div",
|
|
1833
|
+
{
|
|
1834
|
+
role: "separator",
|
|
1835
|
+
"data-slot": "input-otp-separator",
|
|
1836
|
+
"aria-hidden": true,
|
|
1837
|
+
className: cn("text-muted-foreground", className),
|
|
1838
|
+
...props,
|
|
1839
|
+
children: /* @__PURE__ */ jsx21(MinusIcon, { className: "size-4" })
|
|
1840
|
+
}
|
|
1841
|
+
);
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
// src/ui/kbd.tsx
|
|
1845
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1846
|
+
function Kbd({ className, ...props }) {
|
|
1847
|
+
return /* @__PURE__ */ jsx22(
|
|
1848
|
+
"kbd",
|
|
1849
|
+
{
|
|
1850
|
+
"data-slot": "kbd",
|
|
1851
|
+
className: cn(
|
|
1852
|
+
"pointer-events-none inline-flex h-5 min-w-5 items-center justify-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[0.625rem] font-medium text-muted-foreground",
|
|
1853
|
+
className
|
|
1854
|
+
),
|
|
1855
|
+
...props
|
|
1856
|
+
}
|
|
1857
|
+
);
|
|
1858
|
+
}
|
|
1859
|
+
function KbdGroup({ className, ...props }) {
|
|
1860
|
+
return /* @__PURE__ */ jsx22(
|
|
1861
|
+
"div",
|
|
1862
|
+
{
|
|
1863
|
+
"data-slot": "kbd-group",
|
|
1864
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
1865
|
+
...props
|
|
1866
|
+
}
|
|
1867
|
+
);
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
// src/ui/spinner.tsx
|
|
1871
|
+
import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1872
|
+
function Spinner({
|
|
1873
|
+
className,
|
|
1874
|
+
...props
|
|
1875
|
+
}) {
|
|
1876
|
+
return /* @__PURE__ */ jsxs10(
|
|
1877
|
+
"svg",
|
|
1878
|
+
{
|
|
1879
|
+
"data-slot": "spinner",
|
|
1880
|
+
role: "status",
|
|
1881
|
+
"aria-label": "Loading",
|
|
1882
|
+
viewBox: "0 0 24 24",
|
|
1883
|
+
fill: "none",
|
|
1884
|
+
className: cn("size-4 animate-spin text-muted-foreground", className),
|
|
1885
|
+
...props,
|
|
1886
|
+
children: [
|
|
1887
|
+
/* @__PURE__ */ jsx23(
|
|
1888
|
+
"circle",
|
|
1889
|
+
{
|
|
1890
|
+
className: "opacity-25",
|
|
1891
|
+
cx: "12",
|
|
1892
|
+
cy: "12",
|
|
1893
|
+
r: "10",
|
|
1894
|
+
stroke: "currentColor",
|
|
1895
|
+
strokeWidth: "3"
|
|
1896
|
+
}
|
|
1897
|
+
),
|
|
1898
|
+
/* @__PURE__ */ jsx23(
|
|
1899
|
+
"path",
|
|
1900
|
+
{
|
|
1901
|
+
className: "opacity-75",
|
|
1902
|
+
fill: "currentColor",
|
|
1903
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
1904
|
+
}
|
|
1905
|
+
)
|
|
1906
|
+
]
|
|
1907
|
+
}
|
|
1908
|
+
);
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
// src/ui/input-group.tsx
|
|
1912
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1913
|
+
function InputGroup({
|
|
1914
|
+
className,
|
|
1915
|
+
...props
|
|
1916
|
+
}) {
|
|
1917
|
+
return /* @__PURE__ */ jsx24(
|
|
1918
|
+
"div",
|
|
1919
|
+
{
|
|
1920
|
+
"data-slot": "input-group",
|
|
1921
|
+
className: cn(
|
|
1922
|
+
controlClass(),
|
|
1923
|
+
"flex w-full items-stretch overflow-hidden p-0",
|
|
1924
|
+
"has-[[data-slot=input-group-control]:disabled]:opacity-50",
|
|
1925
|
+
className
|
|
1926
|
+
),
|
|
1927
|
+
...props
|
|
1928
|
+
}
|
|
1929
|
+
);
|
|
1930
|
+
}
|
|
1931
|
+
function InputGroupAddon({
|
|
1932
|
+
className,
|
|
1933
|
+
align = "inline-start",
|
|
1934
|
+
...props
|
|
1935
|
+
}) {
|
|
1936
|
+
return /* @__PURE__ */ jsx24(
|
|
1937
|
+
"div",
|
|
1938
|
+
{
|
|
1939
|
+
"data-slot": "input-group-addon",
|
|
1940
|
+
"data-align": align,
|
|
1941
|
+
className: cn(
|
|
1942
|
+
"flex shrink-0 items-center bg-transparent px-3 text-sm text-muted-foreground",
|
|
1943
|
+
align === "inline-start" && "border-r border-border",
|
|
1944
|
+
align === "inline-end" && "border-l border-border",
|
|
1945
|
+
className
|
|
1946
|
+
),
|
|
1947
|
+
...props
|
|
1948
|
+
}
|
|
1949
|
+
);
|
|
1950
|
+
}
|
|
1951
|
+
function InputGroupInput({
|
|
1952
|
+
className,
|
|
1953
|
+
...props
|
|
1954
|
+
}) {
|
|
1955
|
+
return /* @__PURE__ */ jsx24(
|
|
1956
|
+
"input",
|
|
1957
|
+
{
|
|
1958
|
+
"data-slot": "input-group-control",
|
|
1959
|
+
className: cn(
|
|
1960
|
+
"min-w-0 flex-1 border-0 bg-transparent px-3 py-2 text-sm text-foreground shadow-none outline-none",
|
|
1961
|
+
"placeholder:text-muted-foreground/70 focus-visible:ring-0",
|
|
1962
|
+
className
|
|
1963
|
+
),
|
|
1964
|
+
...props
|
|
1965
|
+
}
|
|
1966
|
+
);
|
|
1967
|
+
}
|
|
1968
|
+
function InputGroupText({
|
|
1969
|
+
className,
|
|
1970
|
+
...props
|
|
1971
|
+
}) {
|
|
1972
|
+
return /* @__PURE__ */ jsx24(
|
|
1973
|
+
"span",
|
|
1974
|
+
{
|
|
1975
|
+
"data-slot": "input-group-text",
|
|
1976
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1977
|
+
...props
|
|
1978
|
+
}
|
|
1979
|
+
);
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
// src/ui/accordion.tsx
|
|
1983
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
1984
|
+
import { ChevronDownIcon as ChevronDownIcon4 } from "lucide-react";
|
|
1985
|
+
import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1986
|
+
function Accordion({
|
|
1987
|
+
...props
|
|
1988
|
+
}) {
|
|
1989
|
+
return /* @__PURE__ */ jsx25(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
1990
|
+
}
|
|
1991
|
+
function AccordionItem({
|
|
1992
|
+
className,
|
|
1993
|
+
...props
|
|
1994
|
+
}) {
|
|
1995
|
+
return /* @__PURE__ */ jsx25(
|
|
1996
|
+
AccordionPrimitive.Item,
|
|
1997
|
+
{
|
|
1998
|
+
"data-slot": "accordion-item",
|
|
1999
|
+
className: cn("border-b border-border last:border-b-0", className),
|
|
2000
|
+
...props
|
|
2001
|
+
}
|
|
2002
|
+
);
|
|
2003
|
+
}
|
|
2004
|
+
function AccordionTrigger({
|
|
2005
|
+
className,
|
|
2006
|
+
children,
|
|
2007
|
+
...props
|
|
2008
|
+
}) {
|
|
2009
|
+
return /* @__PURE__ */ jsx25(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs11(
|
|
2010
|
+
AccordionPrimitive.Trigger,
|
|
2011
|
+
{
|
|
2012
|
+
"data-slot": "accordion-trigger",
|
|
2013
|
+
className: cn(
|
|
2014
|
+
"flex flex-1 items-center justify-between gap-4 rounded-md py-4 text-left text-sm font-medium outline-none transition-all",
|
|
2015
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50",
|
|
2016
|
+
"hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
2017
|
+
className
|
|
2018
|
+
),
|
|
2019
|
+
...props,
|
|
2020
|
+
children: [
|
|
2021
|
+
children,
|
|
2022
|
+
/* @__PURE__ */ jsx25(ChevronDownIcon4, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
2023
|
+
]
|
|
2024
|
+
}
|
|
2025
|
+
) });
|
|
2026
|
+
}
|
|
2027
|
+
function AccordionContent({
|
|
2028
|
+
className,
|
|
2029
|
+
children,
|
|
2030
|
+
...props
|
|
2031
|
+
}) {
|
|
2032
|
+
return /* @__PURE__ */ jsx25(
|
|
2033
|
+
AccordionPrimitive.Content,
|
|
2034
|
+
{
|
|
2035
|
+
"data-slot": "accordion-content",
|
|
2036
|
+
className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
2037
|
+
...props,
|
|
2038
|
+
children: /* @__PURE__ */ jsx25("div", { className: cn("pt-0 pb-4", className), children })
|
|
2039
|
+
}
|
|
2040
|
+
);
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
// src/ui/separator.tsx
|
|
2044
|
+
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
2045
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2046
|
+
function Separator({
|
|
2047
|
+
className,
|
|
2048
|
+
orientation = "horizontal",
|
|
2049
|
+
decorative = true,
|
|
2050
|
+
...props
|
|
2051
|
+
}) {
|
|
2052
|
+
return /* @__PURE__ */ jsx26(
|
|
2053
|
+
SeparatorPrimitive.Root,
|
|
2054
|
+
{
|
|
2055
|
+
"data-slot": "separator",
|
|
2056
|
+
decorative,
|
|
2057
|
+
orientation,
|
|
2058
|
+
className: cn(
|
|
2059
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
2060
|
+
className
|
|
2061
|
+
),
|
|
2062
|
+
...props
|
|
2063
|
+
}
|
|
2064
|
+
);
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
// src/ui/slider.tsx
|
|
2068
|
+
import * as React2 from "react";
|
|
2069
|
+
import { Slider as SliderPrimitive } from "radix-ui";
|
|
2070
|
+
import { jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2071
|
+
function Slider({
|
|
2072
|
+
className,
|
|
2073
|
+
defaultValue,
|
|
2074
|
+
value,
|
|
2075
|
+
min = 0,
|
|
2076
|
+
max = 100,
|
|
2077
|
+
...props
|
|
2078
|
+
}) {
|
|
2079
|
+
const thumbs = React2.useMemo(() => {
|
|
2080
|
+
if (Array.isArray(value)) return value;
|
|
2081
|
+
if (Array.isArray(defaultValue)) return defaultValue;
|
|
2082
|
+
return [min];
|
|
2083
|
+
}, [value, defaultValue, min]);
|
|
2084
|
+
return /* @__PURE__ */ jsxs12(
|
|
2085
|
+
SliderPrimitive.Root,
|
|
2086
|
+
{
|
|
2087
|
+
"data-slot": "slider",
|
|
2088
|
+
defaultValue,
|
|
2089
|
+
value,
|
|
2090
|
+
min,
|
|
2091
|
+
max,
|
|
2092
|
+
className: cn(
|
|
2093
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50",
|
|
2094
|
+
"data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
2095
|
+
className
|
|
2096
|
+
),
|
|
2097
|
+
...props,
|
|
2098
|
+
children: [
|
|
2099
|
+
/* @__PURE__ */ jsx27(
|
|
2100
|
+
SliderPrimitive.Track,
|
|
2101
|
+
{
|
|
2102
|
+
"data-slot": "slider-track",
|
|
2103
|
+
className: "relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5",
|
|
2104
|
+
children: /* @__PURE__ */ jsx27(
|
|
2105
|
+
SliderPrimitive.Range,
|
|
2106
|
+
{
|
|
2107
|
+
"data-slot": "slider-range",
|
|
2108
|
+
className: "absolute bg-gradient-to-b from-primary-fill-from to-primary-fill-to data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
2109
|
+
}
|
|
2110
|
+
)
|
|
2111
|
+
}
|
|
2112
|
+
),
|
|
2113
|
+
Array.from({ length: thumbs.length }, (_, i) => /* @__PURE__ */ jsx27(
|
|
2114
|
+
SliderPrimitive.Thumb,
|
|
2115
|
+
{
|
|
2116
|
+
"data-slot": "slider-thumb",
|
|
2117
|
+
className: "block size-4 shrink-0 rounded-full border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card outline-none transition-[box-shadow] focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50"
|
|
2118
|
+
},
|
|
2119
|
+
i
|
|
2120
|
+
))
|
|
2121
|
+
]
|
|
2122
|
+
}
|
|
2123
|
+
);
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
// src/ui/progress.tsx
|
|
2127
|
+
import { Progress as ProgressPrimitive } from "radix-ui";
|
|
2128
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2129
|
+
function Progress({
|
|
2130
|
+
className,
|
|
2131
|
+
value,
|
|
2132
|
+
...props
|
|
2133
|
+
}) {
|
|
2134
|
+
return /* @__PURE__ */ jsx28(
|
|
2135
|
+
ProgressPrimitive.Root,
|
|
2136
|
+
{
|
|
2137
|
+
"data-slot": "progress",
|
|
2138
|
+
className: cn(
|
|
2139
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-muted",
|
|
2140
|
+
className
|
|
2141
|
+
),
|
|
2142
|
+
...props,
|
|
2143
|
+
children: /* @__PURE__ */ jsx28(
|
|
2144
|
+
ProgressPrimitive.Indicator,
|
|
2145
|
+
{
|
|
2146
|
+
"data-slot": "progress-indicator",
|
|
2147
|
+
className: "h-full w-full flex-1 bg-gradient-to-b from-primary-fill-from to-primary-fill-to transition-transform",
|
|
2148
|
+
style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
|
|
2149
|
+
}
|
|
2150
|
+
)
|
|
2151
|
+
}
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
// src/ui/badge.tsx
|
|
2156
|
+
import { Slot as Slot2 } from "radix-ui";
|
|
2157
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
2158
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2159
|
+
var badgeVariants = cva2(
|
|
2160
|
+
"inline-flex w-fit shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
2161
|
+
{
|
|
2162
|
+
variants: {
|
|
2163
|
+
variant: {
|
|
2164
|
+
default: "border-transparent bg-gradient-to-b from-primary-fill-from to-primary-fill-to text-primary-foreground",
|
|
2165
|
+
secondary: "border-border bg-gradient-to-b from-elevated-from to-elevated-to text-foreground shadow-card",
|
|
2166
|
+
destructive: "border-destructive/45 bg-destructive/10 text-destructive",
|
|
2167
|
+
outline: "border-border text-foreground"
|
|
2168
|
+
}
|
|
2169
|
+
},
|
|
2170
|
+
defaultVariants: {
|
|
2171
|
+
variant: "default"
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
);
|
|
2175
|
+
function Badge({
|
|
2176
|
+
className,
|
|
2177
|
+
variant,
|
|
2178
|
+
asChild = false,
|
|
2179
|
+
...props
|
|
2180
|
+
}) {
|
|
2181
|
+
const Comp = asChild ? Slot2.Root : "span";
|
|
2182
|
+
return /* @__PURE__ */ jsx29(
|
|
2183
|
+
Comp,
|
|
2184
|
+
{
|
|
2185
|
+
"data-slot": "badge",
|
|
2186
|
+
className: cn(badgeVariants({ variant }), className),
|
|
2187
|
+
...props
|
|
2188
|
+
}
|
|
2189
|
+
);
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
// src/ui/sheet.tsx
|
|
2193
|
+
import { XIcon } from "lucide-react";
|
|
2194
|
+
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
2195
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
2196
|
+
import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2197
|
+
function Sheet({ ...props }) {
|
|
2198
|
+
return /* @__PURE__ */ jsx30(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
2199
|
+
}
|
|
2200
|
+
function SheetTrigger({
|
|
2201
|
+
...props
|
|
2202
|
+
}) {
|
|
2203
|
+
return /* @__PURE__ */ jsx30(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
2204
|
+
}
|
|
2205
|
+
function SheetClose({
|
|
2206
|
+
...props
|
|
2207
|
+
}) {
|
|
2208
|
+
return /* @__PURE__ */ jsx30(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
2209
|
+
}
|
|
2210
|
+
function SheetPortal({
|
|
2211
|
+
...props
|
|
2212
|
+
}) {
|
|
2213
|
+
return /* @__PURE__ */ jsx30(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
2214
|
+
}
|
|
2215
|
+
function SheetOverlay({
|
|
2216
|
+
className,
|
|
2217
|
+
...props
|
|
2218
|
+
}) {
|
|
2219
|
+
return /* @__PURE__ */ jsx30(
|
|
2220
|
+
SheetPrimitive.Overlay,
|
|
2221
|
+
{
|
|
2222
|
+
"data-slot": "sheet-overlay",
|
|
2223
|
+
className: cn(
|
|
2224
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[70] bg-black/50",
|
|
2225
|
+
className
|
|
2226
|
+
),
|
|
2227
|
+
...props
|
|
2228
|
+
}
|
|
2229
|
+
);
|
|
2230
|
+
}
|
|
2231
|
+
var sheetContentVariants = cva3(
|
|
2232
|
+
cn(
|
|
2233
|
+
TIMBAL_V2_MODAL_SURFACE,
|
|
2234
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-[70] flex flex-col gap-4 shadow-card-elevated transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500"
|
|
2235
|
+
),
|
|
2236
|
+
{
|
|
2237
|
+
variants: {
|
|
2238
|
+
side: {
|
|
2239
|
+
top: "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b p-6",
|
|
2240
|
+
bottom: "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t p-6",
|
|
2241
|
+
left: "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r p-6 sm:max-w-sm",
|
|
2242
|
+
right: "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l p-6 sm:max-w-sm"
|
|
2243
|
+
}
|
|
2244
|
+
},
|
|
2245
|
+
defaultVariants: {
|
|
2246
|
+
side: "right"
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
);
|
|
2250
|
+
function SheetContent({
|
|
2251
|
+
className,
|
|
2252
|
+
children,
|
|
2253
|
+
side = "right",
|
|
2254
|
+
showCloseButton = true,
|
|
2255
|
+
...props
|
|
2256
|
+
}) {
|
|
2257
|
+
return /* @__PURE__ */ jsxs13(SheetPortal, { children: [
|
|
2258
|
+
/* @__PURE__ */ jsx30(SheetOverlay, {}),
|
|
2259
|
+
/* @__PURE__ */ jsxs13(
|
|
2260
|
+
SheetPrimitive.Content,
|
|
2261
|
+
{
|
|
2262
|
+
"data-slot": "sheet-content",
|
|
2263
|
+
className: cn(sheetContentVariants({ side }), className),
|
|
2264
|
+
...props,
|
|
2265
|
+
children: [
|
|
2266
|
+
children,
|
|
2267
|
+
showCloseButton ? /* @__PURE__ */ jsxs13(SheetPrimitive.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 transition-[opacity,background-color] hover:bg-ghost-fill-hover hover:opacity-100 focus:ring-2 focus:ring-foreground/10 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
2268
|
+
/* @__PURE__ */ jsx30(XIcon, { className: "size-4" }),
|
|
2269
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Close" })
|
|
2270
|
+
] }) : null
|
|
2271
|
+
]
|
|
2272
|
+
}
|
|
2273
|
+
)
|
|
2274
|
+
] });
|
|
2275
|
+
}
|
|
2276
|
+
function SheetHeader({ className, ...props }) {
|
|
2277
|
+
return /* @__PURE__ */ jsx30(
|
|
2278
|
+
"div",
|
|
2279
|
+
{
|
|
2280
|
+
"data-slot": "sheet-header",
|
|
2281
|
+
className: cn("flex flex-col gap-1.5 p-0", className),
|
|
2282
|
+
...props
|
|
2283
|
+
}
|
|
2284
|
+
);
|
|
2285
|
+
}
|
|
2286
|
+
function SheetFooter({ className, ...props }) {
|
|
2287
|
+
return /* @__PURE__ */ jsx30(
|
|
2288
|
+
"div",
|
|
2289
|
+
{
|
|
2290
|
+
"data-slot": "sheet-footer",
|
|
2291
|
+
className: cn("mt-auto flex flex-col gap-2 sm:flex-row sm:justify-end", className),
|
|
2292
|
+
...props
|
|
2293
|
+
}
|
|
2294
|
+
);
|
|
2295
|
+
}
|
|
2296
|
+
function SheetTitle({
|
|
2297
|
+
className,
|
|
2298
|
+
...props
|
|
2299
|
+
}) {
|
|
2300
|
+
return /* @__PURE__ */ jsx30(
|
|
2301
|
+
SheetPrimitive.Title,
|
|
2302
|
+
{
|
|
2303
|
+
"data-slot": "sheet-title",
|
|
2304
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
2305
|
+
...props
|
|
2306
|
+
}
|
|
2307
|
+
);
|
|
2308
|
+
}
|
|
2309
|
+
function SheetDescription({
|
|
2310
|
+
className,
|
|
2311
|
+
...props
|
|
2312
|
+
}) {
|
|
2313
|
+
return /* @__PURE__ */ jsx30(
|
|
2314
|
+
SheetPrimitive.Description,
|
|
2315
|
+
{
|
|
2316
|
+
"data-slot": "sheet-description",
|
|
2317
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2318
|
+
...props
|
|
2319
|
+
}
|
|
2320
|
+
);
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
// src/ui/alert-dialog.tsx
|
|
2324
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2325
|
+
import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2326
|
+
function AlertDialog({
|
|
2327
|
+
...props
|
|
2328
|
+
}) {
|
|
2329
|
+
return /* @__PURE__ */ jsx31(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
2330
|
+
}
|
|
2331
|
+
function AlertDialogTrigger({
|
|
2332
|
+
...props
|
|
2333
|
+
}) {
|
|
2334
|
+
return /* @__PURE__ */ jsx31(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
2335
|
+
}
|
|
2336
|
+
function AlertDialogPortal({
|
|
2337
|
+
...props
|
|
2338
|
+
}) {
|
|
2339
|
+
return /* @__PURE__ */ jsx31(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
2340
|
+
}
|
|
2341
|
+
function AlertDialogOverlay({
|
|
2342
|
+
className,
|
|
2343
|
+
...props
|
|
2344
|
+
}) {
|
|
2345
|
+
return /* @__PURE__ */ jsx31(
|
|
2346
|
+
AlertDialogPrimitive.Overlay,
|
|
2347
|
+
{
|
|
2348
|
+
"data-slot": "alert-dialog-overlay",
|
|
2349
|
+
className: cn(
|
|
2350
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[70] bg-black/50",
|
|
2351
|
+
className
|
|
2352
|
+
),
|
|
2353
|
+
...props
|
|
2354
|
+
}
|
|
2355
|
+
);
|
|
2356
|
+
}
|
|
2357
|
+
function AlertDialogContent({
|
|
2358
|
+
className,
|
|
2359
|
+
...props
|
|
2360
|
+
}) {
|
|
2361
|
+
return /* @__PURE__ */ jsxs14(AlertDialogPortal, { children: [
|
|
2362
|
+
/* @__PURE__ */ jsx31(AlertDialogOverlay, {}),
|
|
2363
|
+
/* @__PURE__ */ jsx31(
|
|
2364
|
+
AlertDialogPrimitive.Content,
|
|
2365
|
+
{
|
|
2366
|
+
"data-slot": "alert-dialog-content",
|
|
2367
|
+
className: cn(
|
|
2368
|
+
TIMBAL_V2_MODAL_SURFACE,
|
|
2369
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[70] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl p-6 duration-200 outline-none sm:max-w-lg",
|
|
2370
|
+
className
|
|
2371
|
+
),
|
|
2372
|
+
...props
|
|
2373
|
+
}
|
|
2374
|
+
)
|
|
2375
|
+
] });
|
|
2376
|
+
}
|
|
2377
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
2378
|
+
return /* @__PURE__ */ jsx31(
|
|
2379
|
+
"div",
|
|
2380
|
+
{
|
|
2381
|
+
"data-slot": "alert-dialog-header",
|
|
2382
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
2383
|
+
...props
|
|
2384
|
+
}
|
|
2385
|
+
);
|
|
2386
|
+
}
|
|
2387
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
2388
|
+
return /* @__PURE__ */ jsx31(
|
|
2389
|
+
"div",
|
|
2390
|
+
{
|
|
2391
|
+
"data-slot": "alert-dialog-footer",
|
|
2392
|
+
className: cn(
|
|
2393
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
2394
|
+
className
|
|
2395
|
+
),
|
|
2396
|
+
...props
|
|
2397
|
+
}
|
|
2398
|
+
);
|
|
2399
|
+
}
|
|
2400
|
+
function AlertDialogTitle({
|
|
2401
|
+
className,
|
|
2402
|
+
...props
|
|
2403
|
+
}) {
|
|
2404
|
+
return /* @__PURE__ */ jsx31(
|
|
2405
|
+
AlertDialogPrimitive.Title,
|
|
2406
|
+
{
|
|
2407
|
+
"data-slot": "alert-dialog-title",
|
|
2408
|
+
className: cn("text-lg font-semibold", className),
|
|
2409
|
+
...props
|
|
2410
|
+
}
|
|
2411
|
+
);
|
|
2412
|
+
}
|
|
2413
|
+
function AlertDialogDescription({
|
|
2414
|
+
className,
|
|
2415
|
+
...props
|
|
2416
|
+
}) {
|
|
2417
|
+
return /* @__PURE__ */ jsx31(
|
|
2418
|
+
AlertDialogPrimitive.Description,
|
|
2419
|
+
{
|
|
2420
|
+
"data-slot": "alert-dialog-description",
|
|
2421
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2422
|
+
...props
|
|
2423
|
+
}
|
|
2424
|
+
);
|
|
2425
|
+
}
|
|
2426
|
+
function AlertDialogAction({
|
|
2427
|
+
className,
|
|
2428
|
+
...props
|
|
2429
|
+
}) {
|
|
2430
|
+
return /* @__PURE__ */ jsx31(Button, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
2431
|
+
AlertDialogPrimitive.Action,
|
|
2432
|
+
{
|
|
2433
|
+
"data-slot": "alert-dialog-action",
|
|
2434
|
+
className,
|
|
2435
|
+
...props
|
|
2436
|
+
}
|
|
2437
|
+
) });
|
|
2438
|
+
}
|
|
2439
|
+
function AlertDialogCancel({
|
|
2440
|
+
className,
|
|
2441
|
+
...props
|
|
2442
|
+
}) {
|
|
2443
|
+
return /* @__PURE__ */ jsx31(Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ jsx31(
|
|
2444
|
+
AlertDialogPrimitive.Cancel,
|
|
2445
|
+
{
|
|
2446
|
+
"data-slot": "alert-dialog-cancel",
|
|
2447
|
+
className,
|
|
2448
|
+
...props
|
|
2449
|
+
}
|
|
2450
|
+
) });
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
// src/ui/collapsible.tsx
|
|
2454
|
+
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
2455
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2456
|
+
function Collapsible({
|
|
2457
|
+
...props
|
|
2458
|
+
}) {
|
|
2459
|
+
return /* @__PURE__ */ jsx32(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
2460
|
+
}
|
|
2461
|
+
function CollapsibleTrigger({
|
|
2462
|
+
...props
|
|
2463
|
+
}) {
|
|
2464
|
+
return /* @__PURE__ */ jsx32(CollapsiblePrimitive.Trigger, { "data-slot": "collapsible-trigger", ...props });
|
|
2465
|
+
}
|
|
2466
|
+
function CollapsibleContent({
|
|
2467
|
+
className,
|
|
2468
|
+
...props
|
|
2469
|
+
}) {
|
|
2470
|
+
return /* @__PURE__ */ jsx32(
|
|
2471
|
+
CollapsiblePrimitive.Content,
|
|
2472
|
+
{
|
|
2473
|
+
"data-slot": "collapsible-content",
|
|
2474
|
+
className: cn(
|
|
2475
|
+
"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
|
|
2476
|
+
className
|
|
2477
|
+
),
|
|
2478
|
+
...props
|
|
2479
|
+
}
|
|
2480
|
+
);
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
// src/ui/scroll-area.tsx
|
|
2484
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
2485
|
+
import { jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2486
|
+
function ScrollArea({
|
|
2487
|
+
className,
|
|
2488
|
+
children,
|
|
2489
|
+
...props
|
|
2490
|
+
}) {
|
|
2491
|
+
return /* @__PURE__ */ jsxs15(
|
|
2492
|
+
ScrollAreaPrimitive.Root,
|
|
2493
|
+
{
|
|
2494
|
+
"data-slot": "scroll-area",
|
|
2495
|
+
className: cn("relative overflow-hidden", className),
|
|
2496
|
+
...props,
|
|
2497
|
+
children: [
|
|
2498
|
+
/* @__PURE__ */ jsx33(
|
|
2499
|
+
ScrollAreaPrimitive.Viewport,
|
|
2500
|
+
{
|
|
2501
|
+
"data-slot": "scroll-area-viewport",
|
|
2502
|
+
className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
2503
|
+
children
|
|
2504
|
+
}
|
|
2505
|
+
),
|
|
2506
|
+
/* @__PURE__ */ jsx33(ScrollBar, {}),
|
|
2507
|
+
/* @__PURE__ */ jsx33(ScrollAreaPrimitive.Corner, {})
|
|
2508
|
+
]
|
|
2509
|
+
}
|
|
2510
|
+
);
|
|
2511
|
+
}
|
|
2512
|
+
function ScrollBar({
|
|
2513
|
+
className,
|
|
2514
|
+
orientation = "vertical",
|
|
2515
|
+
...props
|
|
2516
|
+
}) {
|
|
2517
|
+
return /* @__PURE__ */ jsx33(
|
|
2518
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2519
|
+
{
|
|
2520
|
+
"data-slot": "scroll-area-scrollbar",
|
|
2521
|
+
orientation,
|
|
2522
|
+
className: cn(
|
|
2523
|
+
"flex touch-none p-px transition-colors select-none",
|
|
2524
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
2525
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
2526
|
+
className
|
|
2527
|
+
),
|
|
2528
|
+
...props,
|
|
2529
|
+
children: /* @__PURE__ */ jsx33(
|
|
2530
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2531
|
+
{
|
|
2532
|
+
"data-slot": "scroll-area-thumb",
|
|
2533
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
2534
|
+
}
|
|
2535
|
+
)
|
|
2536
|
+
}
|
|
2537
|
+
);
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
// src/ui/toggle.tsx
|
|
2541
|
+
import { Toggle as TogglePrimitive } from "radix-ui";
|
|
2542
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
2543
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2544
|
+
var toggleVariants = cva4(
|
|
2545
|
+
"inline-flex items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap outline-none transition-[color,box-shadow,background-color,border-color] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
2546
|
+
{
|
|
2547
|
+
variants: {
|
|
2548
|
+
variant: {
|
|
2549
|
+
default: cn(
|
|
2550
|
+
"border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card",
|
|
2551
|
+
"hover:from-secondary-fill-hover-from hover:to-secondary-fill-hover-to",
|
|
2552
|
+
"data-[state=on]:border-foreground/15 data-[state=on]:from-primary-fill-from data-[state=on]:to-primary-fill-to data-[state=on]:text-primary-foreground",
|
|
2553
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10"
|
|
2554
|
+
),
|
|
2555
|
+
outline: cn(
|
|
2556
|
+
"border border-border bg-transparent",
|
|
2557
|
+
"hover:bg-muted hover:text-foreground",
|
|
2558
|
+
"data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
2559
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10"
|
|
2560
|
+
)
|
|
2561
|
+
},
|
|
2562
|
+
size: {
|
|
2563
|
+
default: "h-10 px-3 min-w-10",
|
|
2564
|
+
sm: "h-9 px-2.5 min-w-9",
|
|
2565
|
+
lg: "h-11 px-5 min-w-11"
|
|
2566
|
+
}
|
|
2567
|
+
},
|
|
2568
|
+
defaultVariants: {
|
|
2569
|
+
variant: "default",
|
|
2570
|
+
size: "default"
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
);
|
|
2574
|
+
function Toggle({
|
|
2575
|
+
className,
|
|
2576
|
+
variant,
|
|
2577
|
+
size,
|
|
2578
|
+
...props
|
|
2579
|
+
}) {
|
|
2580
|
+
return /* @__PURE__ */ jsx34(
|
|
2581
|
+
TogglePrimitive.Root,
|
|
2582
|
+
{
|
|
2583
|
+
"data-slot": "toggle",
|
|
2584
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
2585
|
+
...props
|
|
2586
|
+
}
|
|
2587
|
+
);
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
// src/ui/toggle-group.tsx
|
|
2591
|
+
import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
|
|
2592
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2593
|
+
function ToggleGroup({
|
|
2594
|
+
className,
|
|
2595
|
+
...props
|
|
2596
|
+
}) {
|
|
2597
|
+
return /* @__PURE__ */ jsx35(
|
|
2598
|
+
ToggleGroupPrimitive.Root,
|
|
2599
|
+
{
|
|
2600
|
+
"data-slot": "toggle-group",
|
|
2601
|
+
className: cn("flex items-center gap-1", className),
|
|
2602
|
+
...props
|
|
2603
|
+
}
|
|
2604
|
+
);
|
|
2605
|
+
}
|
|
2606
|
+
function ToggleGroupItem({
|
|
2607
|
+
className,
|
|
2608
|
+
...props
|
|
2609
|
+
}) {
|
|
2610
|
+
return /* @__PURE__ */ jsx35(
|
|
2611
|
+
ToggleGroupPrimitive.Item,
|
|
2612
|
+
{
|
|
2613
|
+
"data-slot": "toggle-group-item",
|
|
2614
|
+
className: cn(toggleVariants({ variant: "default", size: "default" }), className),
|
|
2615
|
+
...props
|
|
2616
|
+
}
|
|
2617
|
+
);
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
// src/ui/hover-card.tsx
|
|
2621
|
+
import { HoverCard as HoverCardPrimitive } from "radix-ui";
|
|
2622
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2623
|
+
function HoverCard({
|
|
2624
|
+
...props
|
|
2625
|
+
}) {
|
|
2626
|
+
return /* @__PURE__ */ jsx36(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
|
|
2627
|
+
}
|
|
2628
|
+
function HoverCardTrigger({
|
|
2629
|
+
...props
|
|
2630
|
+
}) {
|
|
2631
|
+
return /* @__PURE__ */ jsx36(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
2632
|
+
}
|
|
2633
|
+
function HoverCardContent({
|
|
2634
|
+
className,
|
|
2635
|
+
align = "center",
|
|
2636
|
+
sideOffset = 4,
|
|
2637
|
+
...props
|
|
2638
|
+
}) {
|
|
2639
|
+
return /* @__PURE__ */ jsx36(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsx36(
|
|
2640
|
+
HoverCardPrimitive.Content,
|
|
2641
|
+
{
|
|
2642
|
+
"data-slot": "hover-card-content",
|
|
2643
|
+
align,
|
|
2644
|
+
sideOffset,
|
|
2645
|
+
className: cn(
|
|
2646
|
+
overlaySurfaceClass,
|
|
2647
|
+
"w-64 origin-[var(--radix-hover-card-content-transform-origin)] rounded-xl p-4 outline-hidden",
|
|
2648
|
+
className
|
|
2649
|
+
),
|
|
2650
|
+
...props
|
|
2651
|
+
}
|
|
2652
|
+
) });
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
// src/ui/context-menu.tsx
|
|
2656
|
+
import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
2657
|
+
import { CheckIcon as CheckIcon5, ChevronRightIcon as ChevronRightIcon6, CircleIcon as CircleIcon4 } from "lucide-react";
|
|
2658
|
+
import { jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2659
|
+
function ContextMenu({
|
|
2660
|
+
...props
|
|
2661
|
+
}) {
|
|
2662
|
+
return /* @__PURE__ */ jsx37(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
2663
|
+
}
|
|
2664
|
+
function ContextMenuTrigger({
|
|
2665
|
+
...props
|
|
2666
|
+
}) {
|
|
2667
|
+
return /* @__PURE__ */ jsx37(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
2668
|
+
}
|
|
2669
|
+
function ContextMenuGroup({
|
|
2670
|
+
...props
|
|
2671
|
+
}) {
|
|
2672
|
+
return /* @__PURE__ */ jsx37(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
|
|
2673
|
+
}
|
|
2674
|
+
function ContextMenuContent({
|
|
2675
|
+
className,
|
|
2676
|
+
...props
|
|
2677
|
+
}) {
|
|
2678
|
+
return /* @__PURE__ */ jsx37(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx37(
|
|
2679
|
+
ContextMenuPrimitive.Content,
|
|
2680
|
+
{
|
|
2681
|
+
"data-slot": "context-menu-content",
|
|
2682
|
+
className: cn(
|
|
2683
|
+
overlaySurfaceClass,
|
|
2684
|
+
"max-h-[var(--radix-context-menu-content-available-height)] min-w-[8rem] origin-[var(--radix-context-menu-content-transform-origin)] overflow-x-hidden overflow-y-auto rounded-lg p-1",
|
|
2685
|
+
className
|
|
2686
|
+
),
|
|
2687
|
+
...props
|
|
2688
|
+
}
|
|
2689
|
+
) });
|
|
2690
|
+
}
|
|
2691
|
+
function ContextMenuItem({
|
|
2692
|
+
className,
|
|
2693
|
+
inset,
|
|
2694
|
+
variant = "default",
|
|
2695
|
+
...props
|
|
2696
|
+
}) {
|
|
2697
|
+
return /* @__PURE__ */ jsx37(
|
|
2698
|
+
ContextMenuPrimitive.Item,
|
|
2699
|
+
{
|
|
2700
|
+
"data-slot": "context-menu-item",
|
|
2701
|
+
"data-inset": inset,
|
|
2702
|
+
"data-variant": variant,
|
|
2703
|
+
className: cn(
|
|
2704
|
+
overlayItemClass,
|
|
2705
|
+
"data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
|
|
2706
|
+
className
|
|
2707
|
+
),
|
|
2708
|
+
...props
|
|
2709
|
+
}
|
|
2710
|
+
);
|
|
2711
|
+
}
|
|
2712
|
+
function ContextMenuCheckboxItem({
|
|
2713
|
+
className,
|
|
2714
|
+
children,
|
|
2715
|
+
checked,
|
|
2716
|
+
...props
|
|
2717
|
+
}) {
|
|
2718
|
+
return /* @__PURE__ */ jsxs16(
|
|
2719
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
2720
|
+
{
|
|
2721
|
+
"data-slot": "context-menu-checkbox-item",
|
|
2722
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
2723
|
+
checked,
|
|
2724
|
+
...props,
|
|
2725
|
+
children: [
|
|
2726
|
+
/* @__PURE__ */ jsx37("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx37(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx37(CheckIcon5, { className: "size-4" }) }) }),
|
|
2727
|
+
children
|
|
2728
|
+
]
|
|
2729
|
+
}
|
|
2730
|
+
);
|
|
2731
|
+
}
|
|
2732
|
+
function ContextMenuRadioGroup({
|
|
2733
|
+
...props
|
|
2734
|
+
}) {
|
|
2735
|
+
return /* @__PURE__ */ jsx37(
|
|
2736
|
+
ContextMenuPrimitive.RadioGroup,
|
|
2737
|
+
{
|
|
2738
|
+
"data-slot": "context-menu-radio-group",
|
|
2739
|
+
...props
|
|
2740
|
+
}
|
|
2741
|
+
);
|
|
2742
|
+
}
|
|
2743
|
+
function ContextMenuRadioItem({
|
|
2744
|
+
className,
|
|
2745
|
+
children,
|
|
2746
|
+
...props
|
|
2747
|
+
}) {
|
|
2748
|
+
return /* @__PURE__ */ jsxs16(
|
|
2749
|
+
ContextMenuPrimitive.RadioItem,
|
|
2750
|
+
{
|
|
2751
|
+
"data-slot": "context-menu-radio-item",
|
|
2752
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
2753
|
+
...props,
|
|
2754
|
+
children: [
|
|
2755
|
+
/* @__PURE__ */ jsx37("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx37(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx37(CircleIcon4, { className: "size-2 fill-current" }) }) }),
|
|
2756
|
+
children
|
|
2757
|
+
]
|
|
2758
|
+
}
|
|
2759
|
+
);
|
|
2760
|
+
}
|
|
2761
|
+
function ContextMenuLabel({
|
|
2762
|
+
className,
|
|
2763
|
+
inset,
|
|
2764
|
+
...props
|
|
2765
|
+
}) {
|
|
2766
|
+
return /* @__PURE__ */ jsx37(
|
|
2767
|
+
ContextMenuPrimitive.Label,
|
|
2768
|
+
{
|
|
2769
|
+
"data-slot": "context-menu-label",
|
|
2770
|
+
"data-inset": inset,
|
|
2771
|
+
className: cn(
|
|
2772
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
|
|
2773
|
+
className
|
|
2774
|
+
),
|
|
2775
|
+
...props
|
|
2776
|
+
}
|
|
2777
|
+
);
|
|
2778
|
+
}
|
|
2779
|
+
function ContextMenuSeparator({
|
|
2780
|
+
className,
|
|
2781
|
+
...props
|
|
2782
|
+
}) {
|
|
2783
|
+
return /* @__PURE__ */ jsx37(
|
|
2784
|
+
ContextMenuPrimitive.Separator,
|
|
2785
|
+
{
|
|
2786
|
+
"data-slot": "context-menu-separator",
|
|
2787
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
2788
|
+
...props
|
|
2789
|
+
}
|
|
2790
|
+
);
|
|
2791
|
+
}
|
|
2792
|
+
function ContextMenuShortcut({
|
|
2793
|
+
className,
|
|
2794
|
+
...props
|
|
2795
|
+
}) {
|
|
2796
|
+
return /* @__PURE__ */ jsx37(
|
|
2797
|
+
"span",
|
|
2798
|
+
{
|
|
2799
|
+
"data-slot": "context-menu-shortcut",
|
|
2800
|
+
className: cn(
|
|
2801
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
2802
|
+
className
|
|
2803
|
+
),
|
|
2804
|
+
...props
|
|
2805
|
+
}
|
|
2806
|
+
);
|
|
2807
|
+
}
|
|
2808
|
+
function ContextMenuSub({
|
|
2809
|
+
...props
|
|
2810
|
+
}) {
|
|
2811
|
+
return /* @__PURE__ */ jsx37(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
2812
|
+
}
|
|
2813
|
+
function ContextMenuSubTrigger({
|
|
2814
|
+
className,
|
|
2815
|
+
inset,
|
|
2816
|
+
children,
|
|
2817
|
+
...props
|
|
2818
|
+
}) {
|
|
2819
|
+
return /* @__PURE__ */ jsxs16(
|
|
2820
|
+
ContextMenuPrimitive.SubTrigger,
|
|
2821
|
+
{
|
|
2822
|
+
"data-slot": "context-menu-sub-trigger",
|
|
2823
|
+
"data-inset": inset,
|
|
2824
|
+
className: cn(
|
|
2825
|
+
overlayItemClass,
|
|
2826
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
2827
|
+
className
|
|
2828
|
+
),
|
|
2829
|
+
...props,
|
|
2830
|
+
children: [
|
|
2831
|
+
children,
|
|
2832
|
+
/* @__PURE__ */ jsx37(ChevronRightIcon6, { className: "ml-auto size-4" })
|
|
2833
|
+
]
|
|
2834
|
+
}
|
|
2835
|
+
);
|
|
2836
|
+
}
|
|
2837
|
+
function ContextMenuSubContent({
|
|
2838
|
+
className,
|
|
2839
|
+
...props
|
|
2840
|
+
}) {
|
|
2841
|
+
return /* @__PURE__ */ jsx37(
|
|
2842
|
+
ContextMenuPrimitive.SubContent,
|
|
2843
|
+
{
|
|
2844
|
+
"data-slot": "context-menu-sub-content",
|
|
2845
|
+
className: cn(
|
|
2846
|
+
overlaySurfaceClass,
|
|
2847
|
+
"min-w-[8rem] origin-[var(--radix-context-menu-content-transform-origin)] overflow-hidden rounded-lg p-1",
|
|
2848
|
+
className
|
|
2849
|
+
),
|
|
2850
|
+
...props
|
|
2851
|
+
}
|
|
2852
|
+
);
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2855
|
+
// src/ui/alert.tsx
|
|
2856
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
2857
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2858
|
+
var alertVariants = cva5(
|
|
2859
|
+
"relative grid w-full gap-1 rounded-xl border px-4 py-3 text-sm [&>svg]:absolute [&>svg]:top-3.5 [&>svg]:left-4 [&>svg]:size-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11",
|
|
2860
|
+
{
|
|
2861
|
+
variants: {
|
|
2862
|
+
variant: {
|
|
2863
|
+
default: "border-border bg-gradient-to-b from-elevated-from to-elevated-to text-foreground shadow-card",
|
|
2864
|
+
destructive: "border-destructive/45 bg-destructive/10 text-destructive [&>svg]:text-destructive"
|
|
2865
|
+
}
|
|
2866
|
+
},
|
|
2867
|
+
defaultVariants: {
|
|
2868
|
+
variant: "default"
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
);
|
|
2872
|
+
function Alert({
|
|
2873
|
+
className,
|
|
2874
|
+
variant,
|
|
2875
|
+
...props
|
|
2876
|
+
}) {
|
|
2877
|
+
return /* @__PURE__ */ jsx38(
|
|
2878
|
+
"div",
|
|
2879
|
+
{
|
|
2880
|
+
"data-slot": "alert",
|
|
2881
|
+
role: "alert",
|
|
2882
|
+
className: cn(alertVariants({ variant }), className),
|
|
2883
|
+
...props
|
|
2884
|
+
}
|
|
2885
|
+
);
|
|
2886
|
+
}
|
|
2887
|
+
function AlertTitle({ className, ...props }) {
|
|
2888
|
+
return /* @__PURE__ */ jsx38(
|
|
2889
|
+
"div",
|
|
2890
|
+
{
|
|
2891
|
+
"data-slot": "alert-title",
|
|
2892
|
+
className: cn("font-medium tracking-tight", className),
|
|
2893
|
+
...props
|
|
2894
|
+
}
|
|
2895
|
+
);
|
|
2896
|
+
}
|
|
2897
|
+
function AlertDescription({ className, ...props }) {
|
|
2898
|
+
return /* @__PURE__ */ jsx38(
|
|
2899
|
+
"div",
|
|
2900
|
+
{
|
|
2901
|
+
"data-slot": "alert-description",
|
|
2902
|
+
className: cn("text-sm text-muted-foreground [&_p]:leading-relaxed", className),
|
|
2903
|
+
...props
|
|
2904
|
+
}
|
|
2905
|
+
);
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
// src/ui/card.tsx
|
|
2909
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2910
|
+
function Card({ className, ...props }) {
|
|
2911
|
+
return /* @__PURE__ */ jsx39(
|
|
2912
|
+
"div",
|
|
2913
|
+
{
|
|
2914
|
+
"data-slot": "card",
|
|
2915
|
+
className: cn(
|
|
2916
|
+
TIMBAL_V2_ELEVATED_SURFACE,
|
|
2917
|
+
"flex flex-col gap-4 rounded-xl py-4 text-card-foreground",
|
|
2918
|
+
className
|
|
2919
|
+
),
|
|
2920
|
+
...props
|
|
2921
|
+
}
|
|
2922
|
+
);
|
|
2923
|
+
}
|
|
2924
|
+
function CardHeader({ className, ...props }) {
|
|
2925
|
+
return /* @__PURE__ */ jsx39(
|
|
2926
|
+
"div",
|
|
2927
|
+
{
|
|
2928
|
+
"data-slot": "card-header",
|
|
2929
|
+
className: cn("flex flex-col gap-1.5 px-4", className),
|
|
2930
|
+
...props
|
|
2931
|
+
}
|
|
2932
|
+
);
|
|
2933
|
+
}
|
|
2934
|
+
function CardTitle({ className, ...props }) {
|
|
2935
|
+
return /* @__PURE__ */ jsx39(
|
|
2936
|
+
"div",
|
|
2937
|
+
{
|
|
2938
|
+
"data-slot": "card-title",
|
|
2939
|
+
className: cn("text-base font-semibold leading-none", className),
|
|
2940
|
+
...props
|
|
2941
|
+
}
|
|
2942
|
+
);
|
|
2943
|
+
}
|
|
2944
|
+
function CardDescription({ className, ...props }) {
|
|
2945
|
+
return /* @__PURE__ */ jsx39(
|
|
2946
|
+
"div",
|
|
2947
|
+
{
|
|
2948
|
+
"data-slot": "card-description",
|
|
2949
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2950
|
+
...props
|
|
2951
|
+
}
|
|
2952
|
+
);
|
|
2953
|
+
}
|
|
2954
|
+
function CardContent({ className, ...props }) {
|
|
2955
|
+
return /* @__PURE__ */ jsx39("div", { "data-slot": "card-content", className: cn("px-4", className), ...props });
|
|
2956
|
+
}
|
|
2957
|
+
function CardFooter({ className, ...props }) {
|
|
2958
|
+
return /* @__PURE__ */ jsx39(
|
|
2959
|
+
"div",
|
|
2960
|
+
{
|
|
2961
|
+
"data-slot": "card-footer",
|
|
2962
|
+
className: cn("flex items-center px-4", className),
|
|
2963
|
+
...props
|
|
2964
|
+
}
|
|
2965
|
+
);
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
// src/ui/skeleton.tsx
|
|
2969
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2970
|
+
function Skeleton({ className, ...props }) {
|
|
2971
|
+
return /* @__PURE__ */ jsx40(
|
|
2972
|
+
"div",
|
|
2973
|
+
{
|
|
2974
|
+
"data-slot": "skeleton",
|
|
2975
|
+
className: cn("animate-pulse rounded-lg bg-muted", className),
|
|
2976
|
+
...props
|
|
2977
|
+
}
|
|
2978
|
+
);
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
// src/ui/table.tsx
|
|
2982
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2983
|
+
function Table({ className, ...props }) {
|
|
2984
|
+
return /* @__PURE__ */ jsx41("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx41(
|
|
2985
|
+
"table",
|
|
2986
|
+
{
|
|
2987
|
+
"data-slot": "table",
|
|
2988
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
2989
|
+
...props
|
|
2990
|
+
}
|
|
2991
|
+
) });
|
|
2992
|
+
}
|
|
2993
|
+
function TableHeader({ className, ...props }) {
|
|
2994
|
+
return /* @__PURE__ */ jsx41(
|
|
2995
|
+
"thead",
|
|
2996
|
+
{
|
|
2997
|
+
"data-slot": "table-header",
|
|
2998
|
+
className: cn("[&_tr]:border-b [&_tr]:border-border", className),
|
|
2999
|
+
...props
|
|
3000
|
+
}
|
|
3001
|
+
);
|
|
3002
|
+
}
|
|
3003
|
+
function TableBody({ className, ...props }) {
|
|
3004
|
+
return /* @__PURE__ */ jsx41(
|
|
3005
|
+
"tbody",
|
|
3006
|
+
{
|
|
3007
|
+
"data-slot": "table-body",
|
|
3008
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
3009
|
+
...props
|
|
3010
|
+
}
|
|
3011
|
+
);
|
|
3012
|
+
}
|
|
3013
|
+
function TableFooter({ className, ...props }) {
|
|
3014
|
+
return /* @__PURE__ */ jsx41(
|
|
3015
|
+
"tfoot",
|
|
3016
|
+
{
|
|
3017
|
+
"data-slot": "table-footer",
|
|
3018
|
+
className: cn(
|
|
3019
|
+
"border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
3020
|
+
className
|
|
3021
|
+
),
|
|
3022
|
+
...props
|
|
3023
|
+
}
|
|
3024
|
+
);
|
|
3025
|
+
}
|
|
3026
|
+
function TableRow({ className, ...props }) {
|
|
3027
|
+
return /* @__PURE__ */ jsx41(
|
|
3028
|
+
"tr",
|
|
3029
|
+
{
|
|
3030
|
+
"data-slot": "table-row",
|
|
3031
|
+
className: cn(
|
|
3032
|
+
"border-b border-border transition-colors hover:bg-muted/40 data-[state=selected]:bg-muted",
|
|
3033
|
+
className
|
|
3034
|
+
),
|
|
3035
|
+
...props
|
|
3036
|
+
}
|
|
3037
|
+
);
|
|
3038
|
+
}
|
|
3039
|
+
function TableHead({ className, ...props }) {
|
|
3040
|
+
return /* @__PURE__ */ jsx41(
|
|
3041
|
+
"th",
|
|
3042
|
+
{
|
|
3043
|
+
"data-slot": "table-head",
|
|
3044
|
+
className: cn(
|
|
3045
|
+
"h-10 px-3 text-left align-middle text-xs font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
3046
|
+
className
|
|
3047
|
+
),
|
|
3048
|
+
...props
|
|
3049
|
+
}
|
|
3050
|
+
);
|
|
3051
|
+
}
|
|
3052
|
+
function TableCell({ className, ...props }) {
|
|
3053
|
+
return /* @__PURE__ */ jsx41(
|
|
3054
|
+
"td",
|
|
3055
|
+
{
|
|
3056
|
+
"data-slot": "table-cell",
|
|
3057
|
+
className: cn(
|
|
3058
|
+
"p-3 align-middle text-sm [&:has([role=checkbox])]:pr-0",
|
|
3059
|
+
className
|
|
3060
|
+
),
|
|
3061
|
+
...props
|
|
3062
|
+
}
|
|
3063
|
+
);
|
|
3064
|
+
}
|
|
3065
|
+
function TableCaption({ className, ...props }) {
|
|
3066
|
+
return /* @__PURE__ */ jsx41(
|
|
3067
|
+
"caption",
|
|
3068
|
+
{
|
|
3069
|
+
"data-slot": "table-caption",
|
|
3070
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
3071
|
+
...props
|
|
3072
|
+
}
|
|
3073
|
+
);
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
// src/ui/toast.tsx
|
|
3077
|
+
import { Toast as ToastPrimitive } from "radix-ui";
|
|
3078
|
+
import { XIcon as XIcon2 } from "lucide-react";
|
|
3079
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3080
|
+
function ToastProvider({
|
|
3081
|
+
...props
|
|
3082
|
+
}) {
|
|
3083
|
+
return /* @__PURE__ */ jsx42(ToastPrimitive.Provider, { "data-slot": "toast-provider", ...props });
|
|
3084
|
+
}
|
|
3085
|
+
function ToastViewport({
|
|
3086
|
+
className,
|
|
3087
|
+
...props
|
|
3088
|
+
}) {
|
|
3089
|
+
return /* @__PURE__ */ jsx42(
|
|
3090
|
+
ToastPrimitive.Viewport,
|
|
3091
|
+
{
|
|
3092
|
+
"data-slot": "toast-viewport",
|
|
3093
|
+
className: cn(
|
|
3094
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:max-w-[420px] sm:flex-col",
|
|
3095
|
+
className
|
|
3096
|
+
),
|
|
3097
|
+
...props
|
|
3098
|
+
}
|
|
3099
|
+
);
|
|
3100
|
+
}
|
|
3101
|
+
function Toast({
|
|
3102
|
+
className,
|
|
3103
|
+
variant = "default",
|
|
3104
|
+
...props
|
|
3105
|
+
}) {
|
|
3106
|
+
return /* @__PURE__ */ jsx42(
|
|
3107
|
+
ToastPrimitive.Root,
|
|
3108
|
+
{
|
|
3109
|
+
"data-slot": "toast",
|
|
3110
|
+
className: cn(
|
|
3111
|
+
TIMBAL_V2_ELEVATED_SURFACE,
|
|
3112
|
+
"group pointer-events-auto relative flex w-full items-center justify-between gap-3 overflow-hidden rounded-xl p-4 pr-8 shadow-card-elevated transition-all",
|
|
3113
|
+
"data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full data-[state=closed]:slide-out-to-right-full",
|
|
3114
|
+
variant === "destructive" && "border-destructive/45 bg-destructive/10 text-destructive",
|
|
3115
|
+
className
|
|
3116
|
+
),
|
|
3117
|
+
...props
|
|
3118
|
+
}
|
|
3119
|
+
);
|
|
3120
|
+
}
|
|
3121
|
+
function ToastAction({
|
|
3122
|
+
className,
|
|
3123
|
+
...props
|
|
3124
|
+
}) {
|
|
3125
|
+
return /* @__PURE__ */ jsx42(
|
|
3126
|
+
ToastPrimitive.Action,
|
|
3127
|
+
{
|
|
3128
|
+
"data-slot": "toast-action",
|
|
3129
|
+
className: cn(
|
|
3130
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-lg border border-border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-muted focus:ring-2 focus:ring-foreground/10 focus:outline-hidden disabled:pointer-events-none disabled:opacity-50",
|
|
3131
|
+
className
|
|
3132
|
+
),
|
|
3133
|
+
...props
|
|
3134
|
+
}
|
|
3135
|
+
);
|
|
3136
|
+
}
|
|
3137
|
+
function ToastClose({
|
|
3138
|
+
className,
|
|
3139
|
+
...props
|
|
3140
|
+
}) {
|
|
3141
|
+
return /* @__PURE__ */ jsx42(
|
|
3142
|
+
ToastPrimitive.Close,
|
|
3143
|
+
{
|
|
3144
|
+
"data-slot": "toast-close",
|
|
3145
|
+
className: cn(
|
|
3146
|
+
"absolute top-3 right-3 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-foreground/10 focus:outline-hidden",
|
|
3147
|
+
className
|
|
3148
|
+
),
|
|
3149
|
+
"toast-close": "",
|
|
3150
|
+
...props,
|
|
3151
|
+
children: /* @__PURE__ */ jsx42(XIcon2, { className: "size-4" })
|
|
3152
|
+
}
|
|
3153
|
+
);
|
|
3154
|
+
}
|
|
3155
|
+
function ToastTitle({
|
|
3156
|
+
className,
|
|
3157
|
+
...props
|
|
3158
|
+
}) {
|
|
3159
|
+
return /* @__PURE__ */ jsx42(
|
|
3160
|
+
ToastPrimitive.Title,
|
|
3161
|
+
{
|
|
3162
|
+
"data-slot": "toast-title",
|
|
3163
|
+
className: cn("text-sm font-medium", className),
|
|
3164
|
+
...props
|
|
3165
|
+
}
|
|
3166
|
+
);
|
|
3167
|
+
}
|
|
3168
|
+
function ToastDescription({
|
|
3169
|
+
className,
|
|
3170
|
+
...props
|
|
3171
|
+
}) {
|
|
3172
|
+
return /* @__PURE__ */ jsx42(
|
|
3173
|
+
ToastPrimitive.Description,
|
|
3174
|
+
{
|
|
3175
|
+
"data-slot": "toast-description",
|
|
3176
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
3177
|
+
...props
|
|
3178
|
+
}
|
|
3179
|
+
);
|
|
3180
|
+
}
|
|
3181
|
+
|
|
3182
|
+
// src/ui/use-toast.ts
|
|
3183
|
+
import * as React3 from "react";
|
|
3184
|
+
var TOAST_LIMIT = 3;
|
|
3185
|
+
var TOAST_REMOVE_DELAY = 5e3;
|
|
3186
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
3187
|
+
var memoryState = {
|
|
3188
|
+
toasts: [],
|
|
3189
|
+
add: () => "",
|
|
3190
|
+
dismiss: () => {
|
|
3191
|
+
},
|
|
3192
|
+
remove: () => {
|
|
3193
|
+
}
|
|
3194
|
+
};
|
|
3195
|
+
function dispatch(partial) {
|
|
3196
|
+
memoryState = { ...memoryState, ...partial };
|
|
3197
|
+
for (const listener of listeners) listener(memoryState);
|
|
3198
|
+
}
|
|
3199
|
+
function genId() {
|
|
3200
|
+
return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
3201
|
+
}
|
|
3202
|
+
var removeTimeouts = /* @__PURE__ */ new Map();
|
|
3203
|
+
function scheduleRemove(id, delay = TOAST_REMOVE_DELAY) {
|
|
3204
|
+
if (removeTimeouts.has(id)) return;
|
|
3205
|
+
const timeout = setTimeout(() => {
|
|
3206
|
+
removeTimeouts.delete(id);
|
|
3207
|
+
dispatch({
|
|
3208
|
+
toasts: memoryState.toasts.filter((t) => t.id !== id)
|
|
3209
|
+
});
|
|
3210
|
+
}, delay);
|
|
3211
|
+
removeTimeouts.set(id, timeout);
|
|
3212
|
+
}
|
|
3213
|
+
function addToast(toastInput) {
|
|
3214
|
+
const id = genId();
|
|
3215
|
+
dispatch({
|
|
3216
|
+
toasts: [{ ...toastInput, id }, ...memoryState.toasts].slice(0, TOAST_LIMIT)
|
|
3217
|
+
});
|
|
3218
|
+
scheduleRemove(id, toastInput.duration ?? TOAST_REMOVE_DELAY);
|
|
3219
|
+
return id;
|
|
3220
|
+
}
|
|
3221
|
+
function dismissToast(id) {
|
|
3222
|
+
scheduleRemove(id, 300);
|
|
3223
|
+
}
|
|
3224
|
+
memoryState = {
|
|
3225
|
+
toasts: [],
|
|
3226
|
+
add: addToast,
|
|
3227
|
+
dismiss: dismissToast,
|
|
3228
|
+
remove: (id) => {
|
|
3229
|
+
dispatch({ toasts: memoryState.toasts.filter((t) => t.id !== id) });
|
|
3230
|
+
}
|
|
3231
|
+
};
|
|
3232
|
+
function toast(input) {
|
|
3233
|
+
return memoryState.add(input);
|
|
3234
|
+
}
|
|
3235
|
+
function useToast() {
|
|
3236
|
+
const [state, setState] = React3.useState(memoryState);
|
|
3237
|
+
React3.useEffect(() => {
|
|
3238
|
+
listeners.add(setState);
|
|
3239
|
+
return () => {
|
|
3240
|
+
listeners.delete(setState);
|
|
3241
|
+
};
|
|
3242
|
+
}, []);
|
|
3243
|
+
return {
|
|
3244
|
+
toasts: state.toasts,
|
|
3245
|
+
toast,
|
|
3246
|
+
dismiss: state.dismiss
|
|
3247
|
+
};
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
// src/ui/toaster.tsx
|
|
3251
|
+
import { jsx as jsx43, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3252
|
+
function Toaster() {
|
|
3253
|
+
const { toasts, dismiss } = useToast();
|
|
3254
|
+
return /* @__PURE__ */ jsxs17(ToastProvider, { children: [
|
|
3255
|
+
toasts.map(({ id, title, description, variant }) => /* @__PURE__ */ jsxs17(
|
|
3256
|
+
Toast,
|
|
3257
|
+
{
|
|
3258
|
+
variant,
|
|
3259
|
+
onOpenChange: (open) => !open && dismiss(id),
|
|
3260
|
+
children: [
|
|
3261
|
+
/* @__PURE__ */ jsxs17("div", { className: "grid gap-1", children: [
|
|
3262
|
+
title ? /* @__PURE__ */ jsx43(ToastTitle, { children: title }) : null,
|
|
3263
|
+
description ? /* @__PURE__ */ jsx43(ToastDescription, { children: description }) : null
|
|
3264
|
+
] }),
|
|
3265
|
+
/* @__PURE__ */ jsx43(ToastClose, {})
|
|
3266
|
+
]
|
|
3267
|
+
},
|
|
3268
|
+
id
|
|
3269
|
+
)),
|
|
3270
|
+
/* @__PURE__ */ jsx43(ToastViewport, {})
|
|
3271
|
+
] });
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
export {
|
|
3275
|
+
DropdownMenu,
|
|
3276
|
+
DropdownMenuTrigger,
|
|
3277
|
+
DropdownMenuGroup,
|
|
3278
|
+
DropdownMenuContent,
|
|
3279
|
+
DropdownMenuItem,
|
|
3280
|
+
DropdownMenuCheckboxItem,
|
|
3281
|
+
DropdownMenuRadioGroup,
|
|
3282
|
+
DropdownMenuRadioItem,
|
|
3283
|
+
DropdownMenuLabel,
|
|
3284
|
+
DropdownMenuSeparator,
|
|
3285
|
+
DropdownMenuShortcut,
|
|
3286
|
+
DropdownMenuSub,
|
|
3287
|
+
DropdownMenuSubTrigger,
|
|
3288
|
+
DropdownMenuSubContent,
|
|
3289
|
+
Popover,
|
|
3290
|
+
PopoverTrigger,
|
|
3291
|
+
PopoverAnchor,
|
|
3292
|
+
PopoverContent,
|
|
3293
|
+
Select,
|
|
3294
|
+
SelectGroup,
|
|
3295
|
+
SelectValue,
|
|
3296
|
+
SelectTrigger,
|
|
3297
|
+
SelectContent,
|
|
3298
|
+
SelectLabel,
|
|
3299
|
+
SelectItem,
|
|
3300
|
+
SelectSeparator,
|
|
3301
|
+
SelectScrollUpButton,
|
|
3302
|
+
SelectScrollDownButton,
|
|
3303
|
+
Input,
|
|
3304
|
+
Textarea,
|
|
3305
|
+
Label,
|
|
3306
|
+
Checkbox,
|
|
3307
|
+
Switch,
|
|
3308
|
+
RadioGroup,
|
|
3309
|
+
RadioGroupItem,
|
|
3310
|
+
Form,
|
|
3311
|
+
FormField,
|
|
3312
|
+
FormItem,
|
|
3313
|
+
FormLabel,
|
|
3314
|
+
FormControl,
|
|
3315
|
+
FormMessage,
|
|
3316
|
+
FormSubmit,
|
|
3317
|
+
AspectRatio,
|
|
3318
|
+
Breadcrumb,
|
|
3319
|
+
BreadcrumbList,
|
|
3320
|
+
BreadcrumbItem,
|
|
3321
|
+
BreadcrumbLink,
|
|
3322
|
+
BreadcrumbPage,
|
|
3323
|
+
BreadcrumbSeparator,
|
|
3324
|
+
BreadcrumbEllipsis,
|
|
3325
|
+
Pagination,
|
|
3326
|
+
PaginationContent,
|
|
3327
|
+
PaginationItem,
|
|
3328
|
+
PaginationLink,
|
|
3329
|
+
PaginationPrevious,
|
|
3330
|
+
PaginationNext,
|
|
3331
|
+
PaginationEllipsis,
|
|
3332
|
+
Toolbar,
|
|
3333
|
+
ToolbarButton,
|
|
3334
|
+
ToolbarSeparator,
|
|
3335
|
+
ToolbarToggleGroup,
|
|
3336
|
+
ToolbarToggleItem,
|
|
3337
|
+
ToolbarLink,
|
|
3338
|
+
Menubar,
|
|
3339
|
+
MenubarMenu,
|
|
3340
|
+
MenubarTrigger,
|
|
3341
|
+
MenubarContent,
|
|
3342
|
+
MenubarItem,
|
|
3343
|
+
MenubarCheckboxItem,
|
|
3344
|
+
MenubarRadioGroup,
|
|
3345
|
+
MenubarRadioItem,
|
|
3346
|
+
MenubarLabel,
|
|
3347
|
+
MenubarSeparator,
|
|
3348
|
+
MenubarShortcut,
|
|
3349
|
+
MenubarSub,
|
|
3350
|
+
MenubarSubTrigger,
|
|
3351
|
+
MenubarSubContent,
|
|
3352
|
+
NavigationMenu,
|
|
3353
|
+
NavigationMenuList,
|
|
3354
|
+
NavigationMenuItem,
|
|
3355
|
+
navigationMenuTriggerStyle,
|
|
3356
|
+
NavigationMenuTrigger,
|
|
3357
|
+
NavigationMenuContent,
|
|
3358
|
+
NavigationMenuViewport,
|
|
3359
|
+
NavigationMenuLink,
|
|
3360
|
+
NavigationMenuIndicator,
|
|
3361
|
+
Command,
|
|
3362
|
+
CommandDialog,
|
|
3363
|
+
CommandInput,
|
|
3364
|
+
CommandList,
|
|
3365
|
+
CommandEmpty,
|
|
3366
|
+
CommandGroup,
|
|
3367
|
+
CommandSeparator,
|
|
3368
|
+
CommandItem,
|
|
3369
|
+
CommandShortcut,
|
|
3370
|
+
Calendar,
|
|
3371
|
+
CalendarDayButton,
|
|
3372
|
+
Combobox,
|
|
3373
|
+
ComboboxTrigger,
|
|
3374
|
+
ComboboxAnchor,
|
|
3375
|
+
ComboboxContent,
|
|
3376
|
+
ComboboxCommand,
|
|
3377
|
+
ComboboxInput,
|
|
3378
|
+
ComboboxList,
|
|
3379
|
+
ComboboxEmpty,
|
|
3380
|
+
ComboboxGroup,
|
|
3381
|
+
ComboboxItem,
|
|
3382
|
+
ComboboxSeparator,
|
|
3383
|
+
ComboboxShortcut,
|
|
3384
|
+
DatePicker,
|
|
3385
|
+
DatePickerTrigger,
|
|
3386
|
+
DatePickerContent,
|
|
3387
|
+
DatePickerCalendar,
|
|
3388
|
+
formatPickerDate,
|
|
3389
|
+
DatePickerButton,
|
|
3390
|
+
InputOTP,
|
|
3391
|
+
InputOTPGroup,
|
|
3392
|
+
InputOTPSlot,
|
|
3393
|
+
InputOTPHiddenInput,
|
|
3394
|
+
InputOTPSeparator,
|
|
3395
|
+
Kbd,
|
|
3396
|
+
KbdGroup,
|
|
3397
|
+
Spinner,
|
|
3398
|
+
InputGroup,
|
|
3399
|
+
InputGroupAddon,
|
|
3400
|
+
InputGroupInput,
|
|
3401
|
+
InputGroupText,
|
|
3402
|
+
Accordion,
|
|
3403
|
+
AccordionItem,
|
|
3404
|
+
AccordionTrigger,
|
|
3405
|
+
AccordionContent,
|
|
3406
|
+
Separator,
|
|
3407
|
+
Slider,
|
|
3408
|
+
Progress,
|
|
3409
|
+
badgeVariants,
|
|
3410
|
+
Badge,
|
|
3411
|
+
Sheet,
|
|
3412
|
+
SheetTrigger,
|
|
3413
|
+
SheetClose,
|
|
3414
|
+
SheetContent,
|
|
3415
|
+
SheetHeader,
|
|
3416
|
+
SheetFooter,
|
|
3417
|
+
SheetTitle,
|
|
3418
|
+
SheetDescription,
|
|
3419
|
+
AlertDialog,
|
|
3420
|
+
AlertDialogTrigger,
|
|
3421
|
+
AlertDialogPortal,
|
|
3422
|
+
AlertDialogOverlay,
|
|
3423
|
+
AlertDialogContent,
|
|
3424
|
+
AlertDialogHeader,
|
|
3425
|
+
AlertDialogFooter,
|
|
3426
|
+
AlertDialogTitle,
|
|
3427
|
+
AlertDialogDescription,
|
|
3428
|
+
AlertDialogAction,
|
|
3429
|
+
AlertDialogCancel,
|
|
3430
|
+
Collapsible,
|
|
3431
|
+
CollapsibleTrigger,
|
|
3432
|
+
CollapsibleContent,
|
|
3433
|
+
ScrollArea,
|
|
3434
|
+
ScrollBar,
|
|
3435
|
+
toggleVariants,
|
|
3436
|
+
Toggle,
|
|
3437
|
+
ToggleGroup,
|
|
3438
|
+
ToggleGroupItem,
|
|
3439
|
+
HoverCard,
|
|
3440
|
+
HoverCardTrigger,
|
|
3441
|
+
HoverCardContent,
|
|
3442
|
+
ContextMenu,
|
|
3443
|
+
ContextMenuTrigger,
|
|
3444
|
+
ContextMenuGroup,
|
|
3445
|
+
ContextMenuContent,
|
|
3446
|
+
ContextMenuItem,
|
|
3447
|
+
ContextMenuCheckboxItem,
|
|
3448
|
+
ContextMenuRadioGroup,
|
|
3449
|
+
ContextMenuRadioItem,
|
|
3450
|
+
ContextMenuLabel,
|
|
3451
|
+
ContextMenuSeparator,
|
|
3452
|
+
ContextMenuShortcut,
|
|
3453
|
+
ContextMenuSub,
|
|
3454
|
+
ContextMenuSubTrigger,
|
|
3455
|
+
ContextMenuSubContent,
|
|
3456
|
+
alertVariants,
|
|
3457
|
+
Alert,
|
|
3458
|
+
AlertTitle,
|
|
3459
|
+
AlertDescription,
|
|
3460
|
+
Card,
|
|
3461
|
+
CardHeader,
|
|
3462
|
+
CardTitle,
|
|
3463
|
+
CardDescription,
|
|
3464
|
+
CardContent,
|
|
3465
|
+
CardFooter,
|
|
3466
|
+
Skeleton,
|
|
3467
|
+
Table,
|
|
3468
|
+
TableHeader,
|
|
3469
|
+
TableBody,
|
|
3470
|
+
TableFooter,
|
|
3471
|
+
TableRow,
|
|
3472
|
+
TableHead,
|
|
3473
|
+
TableCell,
|
|
3474
|
+
TableCaption,
|
|
3475
|
+
ToastProvider,
|
|
3476
|
+
ToastViewport,
|
|
3477
|
+
Toast,
|
|
3478
|
+
ToastAction,
|
|
3479
|
+
ToastClose,
|
|
3480
|
+
ToastTitle,
|
|
3481
|
+
ToastDescription,
|
|
3482
|
+
toast,
|
|
3483
|
+
useToast,
|
|
3484
|
+
Toaster
|
|
3485
|
+
};
|