@timbal-ai/timbal-react 0.8.1 → 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 +40 -0
- package/README.md +69 -6
- package/dist/app.cjs +704 -56
- package/dist/app.d.cts +4 -3
- package/dist/app.d.ts +4 -3
- package/dist/app.esm.js +26 -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-DwfRtQWL.d.ts → chart-artifact-CBo9x8Ch.d.ts} +237 -13
- package/dist/{chart-artifact-DWkqIAK5.d.cts → chart-artifact-DOkwSTjQ.d.cts} +237 -13
- 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-GBBLAM3G.esm.js → chunk-GLPOVYEA.esm.js} +776 -172
- 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 +3965 -84
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.esm.js +409 -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
package/dist/index.cjs
CHANGED
|
@@ -33,7 +33,25 @@ __export(index_exports, {
|
|
|
33
33
|
APP_KIT_AGENT_INSTRUCTIONS: () => APP_KIT_AGENT_INSTRUCTIONS,
|
|
34
34
|
ARTIFACT_AGENT_INSTRUCTIONS: () => ARTIFACT_AGENT_INSTRUCTIONS,
|
|
35
35
|
ARTIFACT_FENCE_LANGUAGES: () => ARTIFACT_FENCE_LANGUAGES,
|
|
36
|
+
Accordion: () => Accordion,
|
|
37
|
+
AccordionContent: () => AccordionContent,
|
|
38
|
+
AccordionItem: () => AccordionItem,
|
|
39
|
+
AccordionTrigger: () => AccordionTrigger,
|
|
36
40
|
ActionBarPrimitive: () => import_react69.ActionBarPrimitive,
|
|
41
|
+
Alert: () => Alert,
|
|
42
|
+
AlertDescription: () => AlertDescription,
|
|
43
|
+
AlertDialog: () => AlertDialog,
|
|
44
|
+
AlertDialogAction: () => AlertDialogAction,
|
|
45
|
+
AlertDialogCancel: () => AlertDialogCancel,
|
|
46
|
+
AlertDialogContent: () => AlertDialogContent,
|
|
47
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
48
|
+
AlertDialogFooter: () => AlertDialogFooter,
|
|
49
|
+
AlertDialogHeader: () => AlertDialogHeader,
|
|
50
|
+
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
51
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
52
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
53
|
+
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
54
|
+
AlertTitle: () => AlertTitle,
|
|
37
55
|
AppChatPanel: () => AppChatPanel,
|
|
38
56
|
AppConfirmDialog: () => AppConfirmDialog,
|
|
39
57
|
AppCopilotProvider: () => AppCopilotProvider,
|
|
@@ -43,25 +61,88 @@ __export(index_exports, {
|
|
|
43
61
|
ArtifactCard: () => ArtifactCard,
|
|
44
62
|
ArtifactRegistryProvider: () => ArtifactRegistryProvider,
|
|
45
63
|
ArtifactView: () => ArtifactView,
|
|
64
|
+
AspectRatio: () => AspectRatio,
|
|
46
65
|
AssistantRuntimeProvider: () => import_react69.AssistantRuntimeProvider,
|
|
47
66
|
AuiIf: () => import_react69.AuiIf,
|
|
48
67
|
AuthGuard: () => AuthGuard,
|
|
49
68
|
Avatar: () => Avatar,
|
|
50
69
|
AvatarFallback: () => AvatarFallback,
|
|
51
70
|
AvatarImage: () => AvatarImage,
|
|
71
|
+
Badge: () => Badge,
|
|
72
|
+
Breadcrumb: () => Breadcrumb,
|
|
73
|
+
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
|
74
|
+
BreadcrumbItem: () => BreadcrumbItem,
|
|
75
|
+
BreadcrumbLink: () => BreadcrumbLink,
|
|
76
|
+
BreadcrumbList: () => BreadcrumbList,
|
|
77
|
+
BreadcrumbPage: () => BreadcrumbPage,
|
|
78
|
+
BreadcrumbSeparator: () => BreadcrumbSeparator,
|
|
52
79
|
Breadcrumbs: () => Breadcrumbs,
|
|
53
80
|
Button: () => Button,
|
|
54
81
|
CHART_PALETTE: () => CHART_PALETTE,
|
|
82
|
+
COLOR_UTILITY_PREFIXES: () => COLOR_UTILITY_PREFIXES,
|
|
83
|
+
CONTROL_SIZE: () => CONTROL_SIZE,
|
|
84
|
+
Calendar: () => Calendar,
|
|
85
|
+
CalendarDayButton: () => CalendarDayButton,
|
|
86
|
+
Card: () => Card,
|
|
87
|
+
CardContent: () => CardContent,
|
|
88
|
+
CardDescription: () => CardDescription,
|
|
89
|
+
CardFooter: () => CardFooter,
|
|
90
|
+
CardHeader: () => CardHeader,
|
|
91
|
+
CardTitle: () => CardTitle,
|
|
55
92
|
ChartArtifactView: () => ChartArtifactView,
|
|
56
93
|
ChartPanel: () => ChartPanel,
|
|
94
|
+
Checkbox: () => Checkbox,
|
|
95
|
+
Collapsible: () => Collapsible,
|
|
96
|
+
CollapsibleContent: () => CollapsibleContent,
|
|
97
|
+
CollapsibleTrigger: () => CollapsibleTrigger,
|
|
98
|
+
Combobox: () => Combobox,
|
|
99
|
+
ComboboxAnchor: () => ComboboxAnchor,
|
|
100
|
+
ComboboxCommand: () => ComboboxCommand,
|
|
101
|
+
ComboboxContent: () => ComboboxContent,
|
|
102
|
+
ComboboxEmpty: () => ComboboxEmpty,
|
|
103
|
+
ComboboxGroup: () => ComboboxGroup,
|
|
104
|
+
ComboboxInput: () => ComboboxInput,
|
|
105
|
+
ComboboxItem: () => ComboboxItem,
|
|
106
|
+
ComboboxList: () => ComboboxList,
|
|
107
|
+
ComboboxSeparator: () => ComboboxSeparator,
|
|
108
|
+
ComboboxShortcut: () => ComboboxShortcut,
|
|
109
|
+
ComboboxTrigger: () => ComboboxTrigger,
|
|
110
|
+
Command: () => Command,
|
|
111
|
+
CommandDialog: () => CommandDialog,
|
|
112
|
+
CommandEmpty: () => CommandEmpty,
|
|
113
|
+
CommandGroup: () => CommandGroup,
|
|
114
|
+
CommandInput: () => CommandInput,
|
|
115
|
+
CommandItem: () => CommandItem,
|
|
116
|
+
CommandList: () => CommandList,
|
|
117
|
+
CommandSeparator: () => CommandSeparator,
|
|
118
|
+
CommandShortcut: () => CommandShortcut,
|
|
57
119
|
Composer: () => Composer,
|
|
58
120
|
ComposerPrimitive: () => import_react69.ComposerPrimitive,
|
|
59
121
|
ConnectionRow: () => ConnectionRow,
|
|
60
122
|
ConnectionRowList: () => ConnectionRowList,
|
|
123
|
+
ContextMenu: () => ContextMenu,
|
|
124
|
+
ContextMenuCheckboxItem: () => ContextMenuCheckboxItem,
|
|
125
|
+
ContextMenuContent: () => ContextMenuContent,
|
|
126
|
+
ContextMenuGroup: () => ContextMenuGroup,
|
|
127
|
+
ContextMenuItem: () => ContextMenuItem,
|
|
128
|
+
ContextMenuLabel: () => ContextMenuLabel,
|
|
129
|
+
ContextMenuRadioGroup: () => ContextMenuRadioGroup,
|
|
130
|
+
ContextMenuRadioItem: () => ContextMenuRadioItem,
|
|
131
|
+
ContextMenuSeparator: () => ContextMenuSeparator,
|
|
132
|
+
ContextMenuShortcut: () => ContextMenuShortcut,
|
|
133
|
+
ContextMenuSub: () => ContextMenuSub,
|
|
134
|
+
ContextMenuSubContent: () => ContextMenuSubContent,
|
|
135
|
+
ContextMenuSubTrigger: () => ContextMenuSubTrigger,
|
|
136
|
+
ContextMenuTrigger: () => ContextMenuTrigger,
|
|
61
137
|
DEFAULT_UPLOAD_ACCEPT: () => DEFAULT_UPLOAD_ACCEPT,
|
|
62
138
|
DangerZone: () => DangerZone,
|
|
63
139
|
DangerZoneAction: () => DangerZoneAction,
|
|
64
140
|
DataTable: () => DataTable,
|
|
141
|
+
DatePicker: () => DatePicker,
|
|
142
|
+
DatePickerButton: () => DatePickerButton,
|
|
143
|
+
DatePickerCalendar: () => DatePickerCalendar,
|
|
144
|
+
DatePickerContent: () => DatePickerContent,
|
|
145
|
+
DatePickerTrigger: () => DatePickerTrigger,
|
|
65
146
|
DescriptionList: () => DescriptionList,
|
|
66
147
|
Dialog: () => Dialog,
|
|
67
148
|
DialogClose: () => DialogClose,
|
|
@@ -97,32 +178,93 @@ __export(index_exports, {
|
|
|
97
178
|
FieldTextarea: () => FieldTextarea,
|
|
98
179
|
FilterBar: () => FilterBar,
|
|
99
180
|
FloatingUnsavedChangesBar: () => FloatingUnsavedChangesBar,
|
|
181
|
+
Form: () => Form,
|
|
182
|
+
FormControl: () => FormControl,
|
|
183
|
+
FormField: () => FormField,
|
|
184
|
+
FormItem: () => FormItem,
|
|
185
|
+
FormLabel: () => FormLabel,
|
|
186
|
+
FormMessage: () => FormMessage,
|
|
100
187
|
FormSection: () => FormSection,
|
|
188
|
+
FormSubmit: () => FormSubmit,
|
|
189
|
+
HOUSE_RULES: () => HOUSE_RULES,
|
|
190
|
+
HoverCard: () => HoverCard,
|
|
191
|
+
HoverCardContent: () => HoverCardContent,
|
|
192
|
+
HoverCardTrigger: () => HoverCardTrigger,
|
|
101
193
|
HtmlArtifactView: () => HtmlArtifactView,
|
|
102
194
|
INTEGRATION_CATALOG_CARD_HEIGHT_CLASS: () => INTEGRATION_CATALOG_CARD_HEIGHT_CLASS,
|
|
103
195
|
InfoCard: () => InfoCard,
|
|
196
|
+
Input: () => Input,
|
|
197
|
+
InputGroup: () => InputGroup,
|
|
198
|
+
InputGroupAddon: () => InputGroupAddon,
|
|
199
|
+
InputGroupInput: () => InputGroupInput,
|
|
200
|
+
InputGroupText: () => InputGroupText,
|
|
201
|
+
InputOTP: () => InputOTP,
|
|
202
|
+
InputOTPGroup: () => InputOTPGroup,
|
|
203
|
+
InputOTPHiddenInput: () => InputOTPHiddenInput,
|
|
204
|
+
InputOTPSeparator: () => InputOTPSeparator,
|
|
205
|
+
InputOTPSlot: () => InputOTPSlot,
|
|
104
206
|
IntegrationCard: () => IntegrationCard,
|
|
105
207
|
IntegrationsEmptyState: () => IntegrationsEmptyState,
|
|
106
208
|
JsonArtifactView: () => JsonArtifactView,
|
|
209
|
+
Kbd: () => Kbd,
|
|
210
|
+
KbdGroup: () => KbdGroup,
|
|
211
|
+
Label: () => Label,
|
|
107
212
|
LineAreaChart: () => LineAreaChart,
|
|
108
213
|
MarkdownText: () => MarkdownText,
|
|
109
214
|
MemoPillSegmentedTabs: () => MemoPillSegmentedTabs,
|
|
215
|
+
Menubar: () => Menubar,
|
|
216
|
+
MenubarCheckboxItem: () => MenubarCheckboxItem,
|
|
217
|
+
MenubarContent: () => MenubarContent,
|
|
218
|
+
MenubarItem: () => MenubarItem,
|
|
219
|
+
MenubarLabel: () => MenubarLabel,
|
|
220
|
+
MenubarMenu: () => MenubarMenu,
|
|
221
|
+
MenubarRadioGroup: () => MenubarRadioGroup,
|
|
222
|
+
MenubarRadioItem: () => MenubarRadioItem,
|
|
223
|
+
MenubarSeparator: () => MenubarSeparator,
|
|
224
|
+
MenubarShortcut: () => MenubarShortcut,
|
|
225
|
+
MenubarSub: () => MenubarSub,
|
|
226
|
+
MenubarSubContent: () => MenubarSubContent,
|
|
227
|
+
MenubarSubTrigger: () => MenubarSubTrigger,
|
|
228
|
+
MenubarTrigger: () => MenubarTrigger,
|
|
110
229
|
MessagePrimitive: () => import_react69.MessagePrimitive,
|
|
111
230
|
MetricChartCard: () => MetricChartCard,
|
|
112
231
|
MetricRow: () => MetricRow,
|
|
113
232
|
MetricTile: () => MetricTile,
|
|
114
233
|
ModeToggle: () => ModeToggle,
|
|
234
|
+
NavigationMenu: () => NavigationMenu,
|
|
235
|
+
NavigationMenuContent: () => NavigationMenuContent,
|
|
236
|
+
NavigationMenuIndicator: () => NavigationMenuIndicator,
|
|
237
|
+
NavigationMenuItem: () => NavigationMenuItem,
|
|
238
|
+
NavigationMenuLink: () => NavigationMenuLink,
|
|
239
|
+
NavigationMenuList: () => NavigationMenuList,
|
|
240
|
+
NavigationMenuTrigger: () => NavigationMenuTrigger,
|
|
241
|
+
NavigationMenuViewport: () => NavigationMenuViewport,
|
|
115
242
|
Page: () => Page,
|
|
116
243
|
PageHeader: () => PageHeader,
|
|
244
|
+
Pagination: () => Pagination,
|
|
245
|
+
PaginationContent: () => PaginationContent,
|
|
246
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
247
|
+
PaginationItem: () => PaginationItem,
|
|
248
|
+
PaginationLink: () => PaginationLink,
|
|
249
|
+
PaginationNext: () => PaginationNext,
|
|
250
|
+
PaginationPrevious: () => PaginationPrevious,
|
|
117
251
|
PillSegmentedTabs: () => PillSegmentedTabs,
|
|
118
252
|
PlanBadge: () => PlanBadge,
|
|
119
253
|
Popover: () => Popover,
|
|
120
254
|
PopoverAnchor: () => PopoverAnchor,
|
|
121
255
|
PopoverContent: () => PopoverContent,
|
|
122
256
|
PopoverTrigger: () => PopoverTrigger,
|
|
257
|
+
Progress: () => Progress,
|
|
123
258
|
QuestionArtifactView: () => QuestionArtifactView,
|
|
259
|
+
RESERVED_GRADIENT_TOKENS: () => RESERVED_GRADIENT_TOKENS,
|
|
260
|
+
RadioGroup: () => RadioGroup,
|
|
261
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
124
262
|
ResourceCard: () => ResourceCard,
|
|
263
|
+
SEMANTIC_COLOR_TOKENS: () => SEMANTIC_COLOR_TOKENS,
|
|
264
|
+
SLOP_BUDGETS: () => SLOP_BUDGETS,
|
|
125
265
|
STUDIO_NAV_MODE: () => STUDIO_NAV_MODE,
|
|
266
|
+
ScrollArea: () => ScrollArea,
|
|
267
|
+
ScrollBar: () => ScrollBar,
|
|
126
268
|
SearchInput: () => SearchInput,
|
|
127
269
|
Section: () => Section,
|
|
128
270
|
Select: () => Select,
|
|
@@ -135,11 +277,23 @@ __export(index_exports, {
|
|
|
135
277
|
SelectSeparator: () => SelectSeparator,
|
|
136
278
|
SelectTrigger: () => SelectTrigger,
|
|
137
279
|
SelectValue: () => SelectValue,
|
|
280
|
+
Separator: () => Separator,
|
|
138
281
|
SessionProvider: () => SessionProvider,
|
|
139
282
|
SettingsSection: () => SettingsSection,
|
|
140
283
|
SettingsSectionHeader: () => SettingsSectionHeader,
|
|
284
|
+
Sheet: () => Sheet,
|
|
285
|
+
SheetClose: () => SheetClose,
|
|
286
|
+
SheetContent: () => SheetContent,
|
|
287
|
+
SheetDescription: () => SheetDescription,
|
|
288
|
+
SheetFooter: () => SheetFooter,
|
|
289
|
+
SheetHeader: () => SheetHeader,
|
|
290
|
+
SheetTitle: () => SheetTitle,
|
|
291
|
+
SheetTrigger: () => SheetTrigger,
|
|
141
292
|
Shimmer: () => Shimmer,
|
|
293
|
+
Skeleton: () => Skeleton,
|
|
294
|
+
Slider: () => Slider,
|
|
142
295
|
Sparkline: () => Sparkline,
|
|
296
|
+
Spinner: () => Spinner,
|
|
143
297
|
StatTile: () => StatTile,
|
|
144
298
|
StatusBadge: () => StatusBadge,
|
|
145
299
|
StatusDot: () => StatusDot,
|
|
@@ -149,10 +303,21 @@ __export(index_exports, {
|
|
|
149
303
|
SubNav: () => SubNav,
|
|
150
304
|
Suggestions: () => Suggestions,
|
|
151
305
|
SurfaceCard: () => SurfaceCard,
|
|
306
|
+
Switch: () => Switch,
|
|
307
|
+
TAILWIND_PALETTE_COLORS: () => TAILWIND_PALETTE_COLORS,
|
|
152
308
|
THEME_AGENT_INSTRUCTIONS: () => THEME_AGENT_INSTRUCTIONS,
|
|
153
309
|
THREAD_DEFAULT_MAX_WIDTH: () => THREAD_DEFAULT_MAX_WIDTH,
|
|
154
310
|
TIMBAL_THEME_PRESETS: () => TIMBAL_THEME_PRESETS,
|
|
311
|
+
Table: () => Table,
|
|
155
312
|
TableArtifactView: () => TableArtifactView,
|
|
313
|
+
TableBody: () => TableBody,
|
|
314
|
+
TableCaption: () => TableCaption,
|
|
315
|
+
TableCell: () => TableCell,
|
|
316
|
+
TableFooter: () => TableFooter,
|
|
317
|
+
TableHead: () => TableHead,
|
|
318
|
+
TableHeader: () => TableHeader,
|
|
319
|
+
TableRow: () => TableRow,
|
|
320
|
+
Textarea: () => Textarea,
|
|
156
321
|
ThemePresetGallery: () => ThemePresetGallery,
|
|
157
322
|
Thread: () => Thread,
|
|
158
323
|
ThreadPrimitive: () => import_react69.ThreadPrimitive,
|
|
@@ -162,33 +327,58 @@ __export(index_exports, {
|
|
|
162
327
|
TimbalRuntimeProvider: () => TimbalRuntimeProvider,
|
|
163
328
|
TimbalStudioShell: () => TimbalStudioShell,
|
|
164
329
|
TimbalThemeStyle: () => TimbalThemeStyle,
|
|
330
|
+
Toast: () => Toast,
|
|
331
|
+
ToastAction: () => ToastAction,
|
|
332
|
+
ToastClose: () => ToastClose,
|
|
333
|
+
ToastDescription: () => ToastDescription,
|
|
334
|
+
ToastProvider: () => ToastProvider,
|
|
335
|
+
ToastTitle: () => ToastTitle,
|
|
336
|
+
ToastViewport: () => ToastViewport,
|
|
337
|
+
Toaster: () => Toaster,
|
|
338
|
+
Toggle: () => Toggle,
|
|
339
|
+
ToggleGroup: () => ToggleGroup,
|
|
340
|
+
ToggleGroupItem: () => ToggleGroupItem,
|
|
165
341
|
ToolArtifactFallback: () => ToolArtifactFallback,
|
|
166
342
|
ToolFallback: () => ToolFallback,
|
|
343
|
+
Toolbar: () => Toolbar,
|
|
344
|
+
ToolbarButton: () => ToolbarButton,
|
|
345
|
+
ToolbarLink: () => ToolbarLink,
|
|
346
|
+
ToolbarSeparator: () => ToolbarSeparator,
|
|
347
|
+
ToolbarToggleGroup: () => ToolbarToggleGroup,
|
|
348
|
+
ToolbarToggleItem: () => ToolbarToggleItem,
|
|
167
349
|
Tooltip: () => Tooltip,
|
|
168
350
|
TooltipContent: () => TooltipContent,
|
|
169
351
|
TooltipIconButton: () => TooltipIconButton,
|
|
170
352
|
TooltipProvider: () => TooltipProvider,
|
|
171
353
|
TooltipTrigger: () => TooltipTrigger,
|
|
354
|
+
UI_REVIEW_AGENT_INSTRUCTIONS: () => UI_REVIEW_AGENT_INSTRUCTIONS,
|
|
172
355
|
UiArtifactView: () => UiArtifactView,
|
|
173
356
|
UiCustomNodeRegistryProvider: () => UiCustomNodeRegistryProvider,
|
|
174
357
|
UiEventProvider: () => UiEventProvider,
|
|
175
358
|
UiNodeView: () => UiNodeView,
|
|
176
359
|
WorkforceSelector: () => WorkforceSelector,
|
|
360
|
+
alertVariants: () => alertVariants,
|
|
177
361
|
applyThemePreset: () => applyThemePreset,
|
|
178
362
|
applyTimbalTheme: () => applyTimbalTheme,
|
|
179
363
|
assistantMessageContentClass: () => assistantMessageContentClass,
|
|
180
364
|
assistantMessageRootClass: () => assistantMessageRootClass,
|
|
181
365
|
authFetch: () => authFetch,
|
|
366
|
+
badgeVariants: () => badgeVariants,
|
|
182
367
|
clearTimbalTheme: () => clearTimbalTheme,
|
|
183
368
|
clearTokens: () => clearTokens,
|
|
184
369
|
cn: () => cn,
|
|
185
370
|
connectionRowListClass: () => connectionRowListClass,
|
|
371
|
+
controlClass: () => controlClass,
|
|
372
|
+
controlSurfaceClass: () => controlSurfaceClass,
|
|
186
373
|
createDefaultAttachmentAdapter: () => createDefaultAttachmentAdapter,
|
|
187
374
|
createTimbalTheme: () => createTimbalTheme,
|
|
188
375
|
createUploadAttachmentAdapter: () => createUploadAttachmentAdapter,
|
|
189
376
|
defaultArtifactRenderers: () => defaultArtifactRenderers,
|
|
377
|
+
ensureThemeFontLink: () => ensureThemeFontLink,
|
|
190
378
|
fetchCurrentUser: () => fetchCurrentUser,
|
|
191
379
|
findMarkdownArtifacts: () => findMarkdownArtifacts,
|
|
380
|
+
formatLintReport: () => formatLintReport,
|
|
381
|
+
formatPickerDate: () => formatPickerDate,
|
|
192
382
|
getAccessToken: () => getAccessToken,
|
|
193
383
|
getPath: () => getPath,
|
|
194
384
|
getRefreshToken: () => getRefreshToken,
|
|
@@ -197,17 +387,26 @@ __export(index_exports, {
|
|
|
197
387
|
isArtifact: () => isArtifact,
|
|
198
388
|
isArtifactFenceLanguage: () => isArtifactFenceLanguage,
|
|
199
389
|
isUiBinding: () => isUiBinding,
|
|
390
|
+
lintGeneratedUi: () => lintGeneratedUi,
|
|
391
|
+
navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
|
|
392
|
+
overlayAnimationClass: () => overlayAnimationClass,
|
|
393
|
+
overlayItemClass: () => overlayItemClass,
|
|
394
|
+
overlayListPanelClass: () => overlayListPanelClass,
|
|
395
|
+
overlaySurfaceClass: () => overlaySurfaceClass,
|
|
200
396
|
parseArtifactFromToolResult: () => parseArtifactFromToolResult,
|
|
201
397
|
parseSSELine: () => import_timbal_sdk2.parseSSELine,
|
|
202
398
|
refreshAccessToken: () => refreshAccessToken,
|
|
203
399
|
resolveAttachmentAdapter: () => resolveAttachmentAdapter,
|
|
204
400
|
resolveBindable: () => resolveBindable,
|
|
401
|
+
reviewGeneratedUi: () => reviewGeneratedUi,
|
|
205
402
|
setAccessToken: () => setAccessToken,
|
|
206
403
|
setPath: () => setPath,
|
|
207
404
|
setRefreshToken: () => setRefreshToken,
|
|
208
405
|
splitMarkdownByArtifacts: () => splitMarkdownByArtifacts,
|
|
209
406
|
themeToCss: () => themeToCss,
|
|
210
407
|
threadMessageColumnClass: () => threadMessageColumnClass,
|
|
408
|
+
toast: () => toast,
|
|
409
|
+
toggleVariants: () => toggleVariants,
|
|
211
410
|
useAppCopilotContext: () => useAppCopilotContext,
|
|
212
411
|
useAppShellChat: () => useAppShellChat,
|
|
213
412
|
useArtifactRegistry: () => useArtifactRegistry,
|
|
@@ -220,6 +419,7 @@ __export(index_exports, {
|
|
|
220
419
|
useThreadRuntime: () => import_react69.useThreadRuntime,
|
|
221
420
|
useTimbalRuntime: () => useTimbalRuntime,
|
|
222
421
|
useTimbalStream: () => useTimbalStream,
|
|
422
|
+
useToast: () => useToast,
|
|
223
423
|
useToolRunning: () => useToolRunning,
|
|
224
424
|
useUiCustomNodeRegistry: () => useUiCustomNodeRegistry,
|
|
225
425
|
useUiDispatch: () => useUiDispatch,
|
|
@@ -2754,7 +2954,7 @@ var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
|
2754
2954
|
var UiStateContext = (0, import_react12.createContext)({});
|
|
2755
2955
|
var UiDispatchContext = (0, import_react12.createContext)(() => {
|
|
2756
2956
|
});
|
|
2757
|
-
var UiStateProvider = ({ state, dispatch, children }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UiStateContext.Provider, { value: state, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UiDispatchContext.Provider, { value:
|
|
2957
|
+
var UiStateProvider = ({ state, dispatch: dispatch2, children }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UiStateContext.Provider, { value: state, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UiDispatchContext.Provider, { value: dispatch2, children }) });
|
|
2758
2958
|
function useUiState() {
|
|
2759
2959
|
return (0, import_react12.useContext)(UiStateContext);
|
|
2760
2960
|
}
|
|
@@ -2878,7 +3078,7 @@ var UiNodeView = ({ node }) => {
|
|
|
2878
3078
|
};
|
|
2879
3079
|
function useActionRunner() {
|
|
2880
3080
|
const state = useUiState();
|
|
2881
|
-
const
|
|
3081
|
+
const dispatch2 = useUiDispatch();
|
|
2882
3082
|
const runtime = (0, import_react15.useThreadRuntime)();
|
|
2883
3083
|
const emit = useUiEventEmitter();
|
|
2884
3084
|
return (0, import_react13.useCallback)(
|
|
@@ -2899,11 +3099,11 @@ function useActionRunner() {
|
|
|
2899
3099
|
}
|
|
2900
3100
|
case "set": {
|
|
2901
3101
|
const value = resolveBindable(action.value, state);
|
|
2902
|
-
|
|
3102
|
+
dispatch2({ type: "set", path: action.path, value });
|
|
2903
3103
|
break;
|
|
2904
3104
|
}
|
|
2905
3105
|
case "toggle": {
|
|
2906
|
-
|
|
3106
|
+
dispatch2({ type: "toggle", path: action.path });
|
|
2907
3107
|
break;
|
|
2908
3108
|
}
|
|
2909
3109
|
case "emit": {
|
|
@@ -2913,7 +3113,7 @@ function useActionRunner() {
|
|
|
2913
3113
|
}
|
|
2914
3114
|
}
|
|
2915
3115
|
},
|
|
2916
|
-
[state,
|
|
3116
|
+
[state, dispatch2, runtime, emit]
|
|
2917
3117
|
);
|
|
2918
3118
|
}
|
|
2919
3119
|
var ALIGN_CLS = {
|
|
@@ -3046,12 +3246,12 @@ var ButtonNode = ({ node }) => {
|
|
|
3046
3246
|
};
|
|
3047
3247
|
var ToggleNode = ({ node }) => {
|
|
3048
3248
|
const state = useUiState();
|
|
3049
|
-
const
|
|
3249
|
+
const dispatch2 = useUiDispatch();
|
|
3050
3250
|
const run = useActionRunner();
|
|
3051
3251
|
const value = Boolean(getPath(state, node.binding));
|
|
3052
3252
|
const label = node.label ? String(resolveBindable(node.label, state) ?? "") : null;
|
|
3053
3253
|
const onToggle = () => {
|
|
3054
|
-
|
|
3254
|
+
dispatch2({ type: "toggle", path: node.binding });
|
|
3055
3255
|
run(node.onChange);
|
|
3056
3256
|
};
|
|
3057
3257
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
@@ -3093,7 +3293,7 @@ var ToggleNode = ({ node }) => {
|
|
|
3093
3293
|
};
|
|
3094
3294
|
var SliderNode = ({ node }) => {
|
|
3095
3295
|
const state = useUiState();
|
|
3096
|
-
const
|
|
3296
|
+
const dispatch2 = useUiDispatch();
|
|
3097
3297
|
const run = useActionRunner();
|
|
3098
3298
|
const min = node.min ?? 0;
|
|
3099
3299
|
const max = node.max ?? 100;
|
|
@@ -3104,7 +3304,7 @@ var SliderNode = ({ node }) => {
|
|
|
3104
3304
|
const label = node.label ? String(resolveBindable(node.label, state) ?? "") : null;
|
|
3105
3305
|
const onChange = (e) => {
|
|
3106
3306
|
const next = Number(e.target.value);
|
|
3107
|
-
|
|
3307
|
+
dispatch2({ type: "set", path: node.binding, value: next });
|
|
3108
3308
|
};
|
|
3109
3309
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: cn("aui-ui-slider flex flex-col gap-1", node.className), children: [
|
|
3110
3310
|
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: [
|
|
@@ -3179,11 +3379,11 @@ function resolveProps(props, state) {
|
|
|
3179
3379
|
// src/artifacts/ui/ui-artifact.tsx
|
|
3180
3380
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3181
3381
|
var UiArtifactView = ({ artifact }) => {
|
|
3182
|
-
const [state,
|
|
3382
|
+
const [state, dispatch2] = (0, import_react16.useReducer)(
|
|
3183
3383
|
uiStateReducer,
|
|
3184
3384
|
artifact.initialState ?? {}
|
|
3185
3385
|
);
|
|
3186
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ArtifactCard, { title: artifact.title, kind: "ui", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(UiStateProvider, { state, dispatch, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "aui-ui-root p-3", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(UiNodeView, { node: artifact.root }) }) }) });
|
|
3386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ArtifactCard, { title: artifact.title, kind: "ui", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(UiStateProvider, { state, dispatch: dispatch2, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "aui-ui-root p-3", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(UiNodeView, { node: artifact.root }) }) }) });
|
|
3187
3387
|
};
|
|
3188
3388
|
|
|
3189
3389
|
// src/artifacts/registry.tsx
|
|
@@ -4665,6 +4865,41 @@ function TimbalChat({
|
|
|
4665
4865
|
|
|
4666
4866
|
// src/chat/workforce-selector.tsx
|
|
4667
4867
|
var import_lucide_react9 = require("lucide-react");
|
|
4868
|
+
|
|
4869
|
+
// src/design/control-surface.ts
|
|
4870
|
+
var CONTROL_SIZE = {
|
|
4871
|
+
sm: "h-9 px-3",
|
|
4872
|
+
default: "h-10 px-3"
|
|
4873
|
+
};
|
|
4874
|
+
var CONTROL_SHAPE = {
|
|
4875
|
+
field: "rounded-lg",
|
|
4876
|
+
pill: "rounded-full"
|
|
4877
|
+
};
|
|
4878
|
+
var controlSurfaceClass = cn(
|
|
4879
|
+
TIMBAL_V2_SECONDARY_CHROME,
|
|
4880
|
+
"text-sm text-foreground outline-none",
|
|
4881
|
+
"placeholder:text-muted-foreground/70",
|
|
4882
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
4883
|
+
"focus-within:ring-2 focus-within:ring-foreground/10",
|
|
4884
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
4885
|
+
"data-[placeholder]:text-muted-foreground"
|
|
4886
|
+
);
|
|
4887
|
+
function controlClass(options = {}, className) {
|
|
4888
|
+
const { size = "default", shape = "field" } = options;
|
|
4889
|
+
return cn(controlSurfaceClass, CONTROL_SIZE[size], CONTROL_SHAPE[shape], className);
|
|
4890
|
+
}
|
|
4891
|
+
var overlayAnimationClass = "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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
4892
|
+
var overlaySurfaceClass = cn(
|
|
4893
|
+
"z-[80] border border-border bg-popover text-popover-foreground shadow-card",
|
|
4894
|
+
overlayAnimationClass
|
|
4895
|
+
);
|
|
4896
|
+
var overlayListPanelClass = cn(
|
|
4897
|
+
overlaySurfaceClass,
|
|
4898
|
+
"overflow-hidden rounded-lg p-0 outline-hidden"
|
|
4899
|
+
);
|
|
4900
|
+
var overlayItemClass = "relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground";
|
|
4901
|
+
|
|
4902
|
+
// src/chat/workforce-selector.tsx
|
|
4668
4903
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4669
4904
|
var WorkforceSelector = ({
|
|
4670
4905
|
workforces,
|
|
@@ -4681,8 +4916,8 @@ var WorkforceSelector = ({
|
|
|
4681
4916
|
{
|
|
4682
4917
|
className: cn(
|
|
4683
4918
|
"aui-workforce-selector relative inline-flex items-center",
|
|
4919
|
+
controlSurfaceClass,
|
|
4684
4920
|
studioTopbarPillHeightClass,
|
|
4685
|
-
studioSecondaryChromeClass,
|
|
4686
4921
|
"rounded-full",
|
|
4687
4922
|
className
|
|
4688
4923
|
),
|
|
@@ -6475,7 +6710,191 @@ var StudioModeSwitch = (0, import_react53.memo)(
|
|
|
6475
6710
|
}
|
|
6476
6711
|
);
|
|
6477
6712
|
|
|
6713
|
+
// src/design/ui-vocabulary.ts
|
|
6714
|
+
var SEMANTIC_COLOR_TOKENS = [
|
|
6715
|
+
// shadcn-style base tokens
|
|
6716
|
+
"background",
|
|
6717
|
+
"foreground",
|
|
6718
|
+
"card",
|
|
6719
|
+
"card-foreground",
|
|
6720
|
+
"popover",
|
|
6721
|
+
"popover-foreground",
|
|
6722
|
+
"primary",
|
|
6723
|
+
"primary-foreground",
|
|
6724
|
+
"secondary",
|
|
6725
|
+
"secondary-foreground",
|
|
6726
|
+
"muted",
|
|
6727
|
+
"muted-foreground",
|
|
6728
|
+
"accent",
|
|
6729
|
+
"accent-foreground",
|
|
6730
|
+
"destructive",
|
|
6731
|
+
"destructive-foreground",
|
|
6732
|
+
"border",
|
|
6733
|
+
"input",
|
|
6734
|
+
"ring",
|
|
6735
|
+
// sidebar scope
|
|
6736
|
+
"sidebar",
|
|
6737
|
+
"sidebar-foreground",
|
|
6738
|
+
"sidebar-primary",
|
|
6739
|
+
"sidebar-primary-foreground",
|
|
6740
|
+
"sidebar-accent",
|
|
6741
|
+
"sidebar-accent-foreground",
|
|
6742
|
+
"sidebar-border",
|
|
6743
|
+
"sidebar-ring",
|
|
6744
|
+
// timbal chrome extensions
|
|
6745
|
+
"elevated-from",
|
|
6746
|
+
"elevated-to",
|
|
6747
|
+
"modal-from",
|
|
6748
|
+
"modal-to",
|
|
6749
|
+
"playground-from",
|
|
6750
|
+
"playground-via",
|
|
6751
|
+
"playground-to",
|
|
6752
|
+
"composer-bg",
|
|
6753
|
+
"composer-border",
|
|
6754
|
+
"composer-border-focus",
|
|
6755
|
+
"bubble-user",
|
|
6756
|
+
"bubble-user-foreground",
|
|
6757
|
+
"code-block-bg",
|
|
6758
|
+
"code-header-bg"
|
|
6759
|
+
];
|
|
6760
|
+
var RESERVED_GRADIENT_TOKENS = [
|
|
6761
|
+
"primary-fill-from",
|
|
6762
|
+
"primary-fill-to",
|
|
6763
|
+
"primary-fill-hover-from",
|
|
6764
|
+
"primary-fill-hover-to",
|
|
6765
|
+
"primary-fill-active-from",
|
|
6766
|
+
"primary-fill-active-to",
|
|
6767
|
+
"secondary-fill-hover-from",
|
|
6768
|
+
"secondary-fill-hover-to",
|
|
6769
|
+
"secondary-fill-active-from",
|
|
6770
|
+
"secondary-fill-active-to",
|
|
6771
|
+
"destructive-fill-hover-from",
|
|
6772
|
+
"destructive-fill-hover-to",
|
|
6773
|
+
"destructive-fill-active-from",
|
|
6774
|
+
"destructive-fill-active-to",
|
|
6775
|
+
"ghost-fill-hover",
|
|
6776
|
+
"ghost-fill-active",
|
|
6777
|
+
"elevated-from",
|
|
6778
|
+
"elevated-to",
|
|
6779
|
+
"modal-from",
|
|
6780
|
+
"modal-to",
|
|
6781
|
+
"playground-from",
|
|
6782
|
+
"playground-via",
|
|
6783
|
+
"playground-to"
|
|
6784
|
+
];
|
|
6785
|
+
var TAILWIND_PALETTE_COLORS = [
|
|
6786
|
+
"slate",
|
|
6787
|
+
"gray",
|
|
6788
|
+
"zinc",
|
|
6789
|
+
"neutral",
|
|
6790
|
+
"stone",
|
|
6791
|
+
"red",
|
|
6792
|
+
"orange",
|
|
6793
|
+
"amber",
|
|
6794
|
+
"yellow",
|
|
6795
|
+
"lime",
|
|
6796
|
+
"green",
|
|
6797
|
+
"emerald",
|
|
6798
|
+
"teal",
|
|
6799
|
+
"cyan",
|
|
6800
|
+
"sky",
|
|
6801
|
+
"blue",
|
|
6802
|
+
"indigo",
|
|
6803
|
+
"violet",
|
|
6804
|
+
"purple",
|
|
6805
|
+
"fuchsia",
|
|
6806
|
+
"pink",
|
|
6807
|
+
"rose"
|
|
6808
|
+
];
|
|
6809
|
+
var COLOR_UTILITY_PREFIXES = [
|
|
6810
|
+
"bg",
|
|
6811
|
+
"text",
|
|
6812
|
+
"border",
|
|
6813
|
+
"ring",
|
|
6814
|
+
"from",
|
|
6815
|
+
"via",
|
|
6816
|
+
"to",
|
|
6817
|
+
"fill",
|
|
6818
|
+
"stroke",
|
|
6819
|
+
"decoration",
|
|
6820
|
+
"outline",
|
|
6821
|
+
"shadow",
|
|
6822
|
+
"divide",
|
|
6823
|
+
"accent",
|
|
6824
|
+
"caret"
|
|
6825
|
+
];
|
|
6826
|
+
var SLOP_BUDGETS = {
|
|
6827
|
+
/** Max decorative/standalone icons rendered in a single generated file. */
|
|
6828
|
+
maxIconsPerView: 6,
|
|
6829
|
+
/** Max consecutive list rows separated by an explicit border/divider before
|
|
6830
|
+
* it reads as a "ruled table" — prefer spacing or zebra instead. */
|
|
6831
|
+
maxRowDividers: 2
|
|
6832
|
+
};
|
|
6833
|
+
var HOUSE_RULES = [
|
|
6834
|
+
{
|
|
6835
|
+
id: "semantic-color",
|
|
6836
|
+
rule: "Color only through semantic tokens \u2014 never a raw palette color, hex, or oklch literal.",
|
|
6837
|
+
why: "The theme generator owns every color; hardcoding breaks dark mode and rebranding.",
|
|
6838
|
+
slop: `<span className="text-blue-600 bg-green-50">`,
|
|
6839
|
+
good: `<span className="text-primary bg-muted">`
|
|
6840
|
+
},
|
|
6841
|
+
{
|
|
6842
|
+
id: "no-decorative-icons",
|
|
6843
|
+
rule: "Icons must earn their place (action, nav, or status). Never add an icon beside a label that already says the thing.",
|
|
6844
|
+
why: "An icon on every tile/card is the #1 tell of generated slop.",
|
|
6845
|
+
slop: `<StatTile label={<><BarChart2 /> Revenue</>} value="$95k" />`,
|
|
6846
|
+
good: `<StatTile label="Revenue" value="$95k" />`
|
|
6847
|
+
},
|
|
6848
|
+
{
|
|
6849
|
+
id: "neutral-trend",
|
|
6850
|
+
rule: "Don't put a colored trend pill on every metric. Use a trend only when the delta is the point, and keep it muted.",
|
|
6851
|
+
why: "Loud green/red pills everywhere are noise, not signal.",
|
|
6852
|
+
slop: `<MetricTile trend="+8%" className="text-green-500" />`,
|
|
6853
|
+
good: `<MetricTile label="Win rate" value="50%" />`
|
|
6854
|
+
},
|
|
6855
|
+
{
|
|
6856
|
+
id: "values-normal-weight",
|
|
6857
|
+
rule: "Metric values use normal font weight, not bold.",
|
|
6858
|
+
why: "Giant bold numbers read as a template; normal weight reads as a product.",
|
|
6859
|
+
slop: `<span className="text-3xl font-bold tabular-nums">$322k</span>`,
|
|
6860
|
+
good: `<span className="text-2xl font-normal tabular-nums">$322k</span>`
|
|
6861
|
+
},
|
|
6862
|
+
{
|
|
6863
|
+
id: "no-card-in-card",
|
|
6864
|
+
rule: "Don't nest a bordered card inside another bordered card. Group with spacing or a Section instead.",
|
|
6865
|
+
why: "Card-in-card doubles borders and shadows for no information gain."
|
|
6866
|
+
},
|
|
6867
|
+
{
|
|
6868
|
+
id: "no-row-dividers",
|
|
6869
|
+
rule: "Don't put a divider between every list row. Use spacing or zebra striping.",
|
|
6870
|
+
why: "A rule under every row turns a clean list into a dense ledger."
|
|
6871
|
+
},
|
|
6872
|
+
{
|
|
6873
|
+
id: "no-data-gradient",
|
|
6874
|
+
rule: "Gradients are reserved for chrome (composer, elevated surface, playground). Never on a data card, tile, or table.",
|
|
6875
|
+
why: "Gradient stat cards are the canonical 'AI dashboard' look."
|
|
6876
|
+
},
|
|
6877
|
+
{
|
|
6878
|
+
id: "compose-from-blocks",
|
|
6879
|
+
rule: "Build from premade blocks (MetricRow, MetricChartCard, DataTable, IntegrationCard). Drop to raw primitives only when no block fits.",
|
|
6880
|
+
why: "Slop appears the moment generation falls below the curated block layer."
|
|
6881
|
+
},
|
|
6882
|
+
{
|
|
6883
|
+
id: "use-kit-controls",
|
|
6884
|
+
rule: "Use the kit's controls (SearchInput, Select, DropdownMenu, FieldInput, FieldSelect) \u2014 never hand-roll an input/trigger surface (`border-input rounded-* bg-\u2026`).",
|
|
6885
|
+
why: "Hand-rolled controls drift from the shared control-surface skin and look foreign next to kit controls.",
|
|
6886
|
+
slop: `<button className="rounded-lg border border-input bg-transparent px-3 h-9">`,
|
|
6887
|
+
good: `<SelectTrigger><SelectValue /></SelectTrigger>`
|
|
6888
|
+
}
|
|
6889
|
+
];
|
|
6890
|
+
|
|
6478
6891
|
// src/app/agent-instructions.ts
|
|
6892
|
+
var ANTI_SLOP_CHECKLIST = HOUSE_RULES.map((r) => {
|
|
6893
|
+
const pair = r.slop && r.good ? `
|
|
6894
|
+
- slop: \`${r.slop}\`
|
|
6895
|
+
- good: \`${r.good}\`` : "";
|
|
6896
|
+
return `- **${r.id}** \u2014 ${r.rule} (${r.why})${pair}`;
|
|
6897
|
+
}).join("\n");
|
|
6479
6898
|
var APP_KIT_AGENT_INSTRUCTIONS = `
|
|
6480
6899
|
## App kit (@timbal-ai/timbal-react/app)
|
|
6481
6900
|
|
|
@@ -6523,7 +6942,15 @@ Theming helpers (import from the package root or \`/app\`): \`createTimbalTheme\
|
|
|
6523
6942
|
| **Modals** | Use \`AppConfirmDialog\` for destructive/export confirmations. |
|
|
6524
6943
|
| **Metrics** | Overview KPIs \u2192 \`MetricRow\` or \`MetricChartCard\` (not four separate heavy cards). Values use **normal** font weight, not bold. |
|
|
6525
6944
|
| **Integrations** | Catalog \u2192 \`IntegrationCard\` grid; connected list \u2192 \`ConnectionRow\` inside \`ConnectionRowList\`. Footer CTAs: \`Button variant="secondary"\`. |
|
|
6526
|
-
| **Anti-slop** | No loud green/red trend pills on every tile; no \`bg-card\` flat grids when platform chrome exists; avoid recycling demo names ("Operations", mock workforce lists). |
|
|
6945
|
+
| **Anti-slop** | Follow the **anti-slop checklist** below. No loud green/red trend pills on every tile; no \`bg-card\` flat grids when platform chrome exists; avoid recycling demo names ("Operations", mock workforce lists). |
|
|
6946
|
+
|
|
6947
|
+
### Anti-slop checklist (required \u2014 output is linted against this)
|
|
6948
|
+
|
|
6949
|
+
Generated UIs are checked by \`lintGeneratedUi\` and rejected on any error. Self-review against these before returning code (icon budget: ${SLOP_BUDGETS.maxIconsPerView} per view; at most ${SLOP_BUDGETS.maxRowDividers} ruled rows before it reads as a ledger):
|
|
6950
|
+
|
|
6951
|
+
${ANTI_SLOP_CHECKLIST}
|
|
6952
|
+
|
|
6953
|
+
The cause of slop is dropping **below** the curated block layer into raw primitives + free Tailwind. Stay on the blocks; reach for primitives only when no block fits, and even then keep colors on semantic tokens.
|
|
6527
6954
|
|
|
6528
6955
|
### Accessibility (required)
|
|
6529
6956
|
|
|
@@ -6549,7 +6976,8 @@ Theming helpers (import from the package root or \`/app\`): \`createTimbalTheme\
|
|
|
6549
6976
|
| \`useAppShellChat\` | Custom open/close trigger when \`hideChatTrigger\` on shell. |
|
|
6550
6977
|
| \`Page\` | Page title, description, \`breadcrumbs\`, \`actions\`, children. |
|
|
6551
6978
|
| \`Section\` | Titled block inside a page. |
|
|
6552
|
-
| \`SubNav\` |
|
|
6979
|
+
| \`SubNav\` | **Section switcher** (Overview / Reports pill bar): \`items\`, \`activeId\`, \`onChange\`. Never use Radix/shadcn \`Tabs\` \u2014 it is not in this package. Switch panels with state or the router. |
|
|
6980
|
+
| **Menus** | **Select** = short list, no search. **Combobox** = searchable (same trigger as Select). **Command** only inside \`PopoverContent variant="list"\` or Combobox \u2014 never padded default Popover. See \`examples/app-kit/src/recipes/primitives-catalog.ts\`. |
|
|
6553
6981
|
| \`Breadcrumbs\` | Trail: \`items: [{ label, href? }]\`. |
|
|
6554
6982
|
| \`Button\` | Actions \u2014 \`variant="secondary"\` for catalog/secondary CTAs; \`variant="default"\` for primary. |
|
|
6555
6983
|
| \`StatTile\` | Single KPI in its own card (grid of scattered stats). Prefer \`MetricRow\` for a unified overview strip. |
|
|
@@ -6605,19 +7033,36 @@ Theming helpers (import from the package root or \`/app\`): \`createTimbalTheme\
|
|
|
6605
7033
|
|
|
6606
7034
|
Studio chrome (\`StudioSidebar\`, \`ModeToggle\`, \u2026) lives in \`@timbal-ai/timbal-react/studio\` \u2014 optional, not required for every dashboard.
|
|
6607
7035
|
|
|
6608
|
-
###
|
|
7036
|
+
### Block recipes \u2014 compose these (don't clone wholesale)
|
|
7037
|
+
|
|
7038
|
+
Ready-made **section patterns** assembled from the components above. Each is a composition to rebuild in your own domain with your data \u2014 **not** an importable component. Reach for a block before dropping to raw primitives.
|
|
7039
|
+
|
|
7040
|
+
**Settings**
|
|
7041
|
+
- **Project settings** \u2014 General / Usage / Danger sections; the floating save bar appears on first edit. Compose \`SettingsSection\` + \`FieldInput\`/\`FieldSwitch\` + \`FieldRow\` + \`InfoCard\` + \`DangerZone\` + \`FloatingUnsavedChangesBar\`.
|
|
7042
|
+
- **Settings form** \u2014 compact stacked form for one concern (profile, billing). Compose \`FormSection\` + \`FieldInput\`/\`FieldSelect\`/\`FieldTextarea\`.
|
|
7043
|
+
|
|
7044
|
+
**Data & metrics**
|
|
7045
|
+
- **Metrics row** \u2014 KPI strip in one elevated card. Compose \`MetricRow\` + \`MetricTile\`.
|
|
7046
|
+
- **Analytics card** \u2014 selectable KPI tiles driving a shared chart. Compose \`MetricChartCard\` + \`LineAreaChart\`.
|
|
7047
|
+
- **Charts panel** \u2014 embedded chart artifact. Compose \`ChartPanel\` + \`ChartArtifactView\`.
|
|
7048
|
+
- **Table + filters** \u2014 \`FilterBar\` above a sortable \`DataTable\` (+ \`StatusBadge\` in cells).
|
|
6609
7049
|
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
7050
|
+
**Collections**
|
|
7051
|
+
- **Integrations grid** \u2014 connector catalog + connected list. Compose \`IntegrationCard\` + \`PlanBadge\` + \`ConnectionRowList\` (\`IntegrationsEmptyState\` when empty).
|
|
7052
|
+
- **Resource gallery** \u2014 project / agent / dataset cards. Compose \`ResourceCard\` + \`StatusDot\` + \`Sparkline\`.
|
|
7053
|
+
|
|
7054
|
+
**Overlays & flows** (animate automatically)
|
|
7055
|
+
- **Confirm & destructive** \u2014 confirm/cancel modal or destructive alert. Compose \`AppConfirmDialog\` (or \`AlertDialog\`) + \`Button\`; never hand-roll a \`Dialog\` for confirms.
|
|
7056
|
+
- **Detail sheet** \u2014 slide-over edit panel without leaving the list. Compose \`Sheet\` + \`Field*\` + \`Button\` + \`Separator\`.
|
|
7057
|
+
|
|
7058
|
+
**States & auth**
|
|
7059
|
+
- **Empty states** \u2014 no-data / no-results / first-run. Compose \`EmptyState\` + \`Card\` + \`Button\`.
|
|
7060
|
+
- **Sign-in card** \u2014 centered auth entry. Compose \`Card\` + \`Input\` + \`Label\` + \`Button\`.
|
|
7061
|
+
|
|
7062
|
+
**Shells & theming**
|
|
7063
|
+
- **Minimal shell** \u2014 \`AppShell\` + \`Page\` (no sidebar/chat).
|
|
7064
|
+
- **Copilot overlay** \u2014 \`AppShell\` + floating \`AppChatPanel\`.
|
|
7065
|
+
- **Theme presets** \u2014 \`ThemePresetGallery\` + \`applyTimbalTheme\` (never hand-author OKLCH).
|
|
6621
7066
|
|
|
6622
7067
|
### Typical compositions
|
|
6623
7068
|
|
|
@@ -6628,6 +7073,7 @@ Studio chrome (\`StudioSidebar\`, \`ModeToggle\`, \u2026) lives in \`@timbal-ai/
|
|
|
6628
7073
|
- **Integrations** \u2014 grid of \`IntegrationCard\`; \`ConnectionRowList\` for connected providers; \`IntegrationsEmptyState\` when empty.
|
|
6629
7074
|
- **Resource gallery** \u2014 grid of \`ResourceCard\`.
|
|
6630
7075
|
- **Copilot-assisted app** \u2014 \`AppCopilotProvider\` + \`AppShell\` with \`chat={<AppChatPanel workforceId="\u2026" />}\`.
|
|
7076
|
+
- **Motion is automatic** \u2014 Dialog, AlertDialog, Sheet, Popover, DropdownMenu, Select, Tooltip, Toast, and Accordion/Collapsible animate out of the box (fade/zoom/slide/height) via the engine inlined in \`styles.css\`. Do not add a separate animation library or hand-write \`@keyframes\`.
|
|
6631
7077
|
|
|
6632
7078
|
### Example imports
|
|
6633
7079
|
|
|
@@ -6663,6 +7109,211 @@ import {
|
|
|
6663
7109
|
- For rich in-chat widgets, use **artifacts** (\`ARTIFACT_AGENT_INSTRUCTIONS\`) \u2014 app kit is for the **host application shell**.
|
|
6664
7110
|
`.trim();
|
|
6665
7111
|
|
|
7112
|
+
// src/design/ui-lint.ts
|
|
7113
|
+
var PALETTE_GROUP = TAILWIND_PALETTE_COLORS.join("|");
|
|
7114
|
+
var PREFIX_GROUP = COLOR_UTILITY_PREFIXES.join("|");
|
|
7115
|
+
var RAW_COLOR_RE = new RegExp(
|
|
7116
|
+
`(?:^|[\\s"'\`:])(?:[a-z-]+:)*(?:${PREFIX_GROUP})-(?:${PALETTE_GROUP})-\\d{2,3}(?:/\\d{1,3})?`,
|
|
7117
|
+
"g"
|
|
7118
|
+
);
|
|
7119
|
+
var COLOR_LITERAL_RE = /#[0-9a-fA-F]{3,8}\b|\b(?:oklch|rgba?|hsla?)\s*\(/g;
|
|
7120
|
+
var INLINE_STYLE_COLOR_RE = /style=\{\{[^}]*\b(?:color|background|backgroundColor|borderColor|fill|stroke)\b/;
|
|
7121
|
+
var BOLD_VALUE_RE = /text-(?:xl|2xl|3xl|4xl|5xl|6xl)[^"'`]*\bfont-(?:bold|extrabold|black|semibold)|font-(?:bold|extrabold|black|semibold)[^"'`]*text-(?:xl|2xl|3xl|4xl|5xl|6xl)/;
|
|
7122
|
+
var GRADIENT_RE = /\bbg-(?:gradient|linear|radial|conic)-/;
|
|
7123
|
+
var GRADIENT_DIRECTIONS = /* @__PURE__ */ new Set([
|
|
7124
|
+
"t",
|
|
7125
|
+
"tr",
|
|
7126
|
+
"r",
|
|
7127
|
+
"br",
|
|
7128
|
+
"b",
|
|
7129
|
+
"bl",
|
|
7130
|
+
"l",
|
|
7131
|
+
"tl"
|
|
7132
|
+
]);
|
|
7133
|
+
var ICON_IMPORT_RE = /from\s+["']lucide-react["']/;
|
|
7134
|
+
var RAW_CONTROL_SURFACE_RE = /\bborder-input\b/;
|
|
7135
|
+
var RESERVED_GRADIENT_SET = new Set(RESERVED_GRADIENT_TOKENS);
|
|
7136
|
+
function stripVariants(util) {
|
|
7137
|
+
return util.replace(/^(?:[a-z-]+:)*/, "");
|
|
7138
|
+
}
|
|
7139
|
+
function isCommentOrImport(line) {
|
|
7140
|
+
const t = line.trim();
|
|
7141
|
+
return t.startsWith("//") || t.startsWith("*") || t.startsWith("/*") || t.startsWith("import ") || t.startsWith("export ");
|
|
7142
|
+
}
|
|
7143
|
+
function lintGeneratedUi(source, options = {}) {
|
|
7144
|
+
const maxIcons = options.maxIconsPerView ?? SLOP_BUDGETS.maxIconsPerView;
|
|
7145
|
+
const maxRowDividers = options.maxRowDividers ?? SLOP_BUDGETS.maxRowDividers;
|
|
7146
|
+
const findings = [];
|
|
7147
|
+
const lines = source.split("\n");
|
|
7148
|
+
let usesLucide = false;
|
|
7149
|
+
let iconUsageCount = 0;
|
|
7150
|
+
let dividerRunCount = 0;
|
|
7151
|
+
const lucideNames = /* @__PURE__ */ new Set();
|
|
7152
|
+
for (let i = 0; i < lines.length; i++) {
|
|
7153
|
+
const line = lines[i];
|
|
7154
|
+
const lineNo = i + 1;
|
|
7155
|
+
if (ICON_IMPORT_RE.test(line)) {
|
|
7156
|
+
usesLucide = true;
|
|
7157
|
+
const named = line.match(/\{([^}]*)\}/);
|
|
7158
|
+
if (named) {
|
|
7159
|
+
for (const raw of named[1].split(",")) {
|
|
7160
|
+
const name = raw.trim().split(/\s+as\s+/)[0].trim();
|
|
7161
|
+
if (name) lucideNames.add(name);
|
|
7162
|
+
}
|
|
7163
|
+
}
|
|
7164
|
+
continue;
|
|
7165
|
+
}
|
|
7166
|
+
if (isCommentOrImport(line)) continue;
|
|
7167
|
+
const rawColors = line.match(RAW_COLOR_RE);
|
|
7168
|
+
if (rawColors) {
|
|
7169
|
+
for (const m of rawColors) {
|
|
7170
|
+
findings.push({
|
|
7171
|
+
rule: "raw-color",
|
|
7172
|
+
severity: "error",
|
|
7173
|
+
line: lineNo,
|
|
7174
|
+
message: "Hardcoded palette color. Use a semantic token (text-primary, bg-muted, border-border, text-muted-foreground, \u2026) so dark mode and rebranding work.",
|
|
7175
|
+
snippet: m.trim().replace(/^["'`:\s]+/, "")
|
|
7176
|
+
});
|
|
7177
|
+
}
|
|
7178
|
+
}
|
|
7179
|
+
const literals = line.match(COLOR_LITERAL_RE);
|
|
7180
|
+
if (literals) {
|
|
7181
|
+
findings.push({
|
|
7182
|
+
rule: "color-literal",
|
|
7183
|
+
severity: "error",
|
|
7184
|
+
line: lineNo,
|
|
7185
|
+
message: "Hardcoded color literal. Colors must come from the theme generator (createTimbalTheme) and semantic tokens \u2014 never inline hex/oklch/rgb.",
|
|
7186
|
+
snippet: line.trim().slice(0, 120)
|
|
7187
|
+
});
|
|
7188
|
+
}
|
|
7189
|
+
if (INLINE_STYLE_COLOR_RE.test(line)) {
|
|
7190
|
+
findings.push({
|
|
7191
|
+
rule: "inline-style-color",
|
|
7192
|
+
severity: "error",
|
|
7193
|
+
line: lineNo,
|
|
7194
|
+
message: "Inline style color. Move color to a semantic Tailwind token on className.",
|
|
7195
|
+
snippet: line.trim().slice(0, 120)
|
|
7196
|
+
});
|
|
7197
|
+
}
|
|
7198
|
+
if (RAW_CONTROL_SURFACE_RE.test(line)) {
|
|
7199
|
+
findings.push({
|
|
7200
|
+
rule: "raw-control-surface",
|
|
7201
|
+
severity: "warn",
|
|
7202
|
+
line: lineNo,
|
|
7203
|
+
message: "Hand-rolled control surface (border-input). Use a kit control \u2014 SearchInput, Select, DropdownMenu, FieldInput, FieldSelect \u2014 so it matches every other control.",
|
|
7204
|
+
snippet: line.trim().slice(0, 120)
|
|
7205
|
+
});
|
|
7206
|
+
}
|
|
7207
|
+
if (BOLD_VALUE_RE.test(line)) {
|
|
7208
|
+
findings.push({
|
|
7209
|
+
rule: "bold-metric",
|
|
7210
|
+
severity: "warn",
|
|
7211
|
+
line: lineNo,
|
|
7212
|
+
message: "Bold large value. House style: metric values use font-normal, not bold \u2014 bold giant numbers read as a template.",
|
|
7213
|
+
snippet: line.trim().slice(0, 120)
|
|
7214
|
+
});
|
|
7215
|
+
}
|
|
7216
|
+
if (GRADIENT_RE.test(line)) {
|
|
7217
|
+
const fromTo = line.match(
|
|
7218
|
+
new RegExp(`(?:from|via|to)-([a-z-]+)`, "g")
|
|
7219
|
+
);
|
|
7220
|
+
const colorStops = (fromTo ?? []).map((u) => stripVariants(u).replace(/^(?:from|via|to)-/, "")).filter((token) => !GRADIENT_DIRECTIONS.has(token));
|
|
7221
|
+
const allReserved = colorStops.length > 0 && colorStops.every((token) => RESERVED_GRADIENT_SET.has(token));
|
|
7222
|
+
if (!allReserved) {
|
|
7223
|
+
findings.push({
|
|
7224
|
+
rule: "data-gradient",
|
|
7225
|
+
severity: "warn",
|
|
7226
|
+
line: lineNo,
|
|
7227
|
+
message: "Gradient outside chrome. Gradients are reserved for buttons / elevated / modal / playground \u2014 never a data card, tile, or table.",
|
|
7228
|
+
snippet: line.trim().slice(0, 120)
|
|
7229
|
+
});
|
|
7230
|
+
}
|
|
7231
|
+
}
|
|
7232
|
+
if (/\b(?:border-t|border-b|divide-y)\b/.test(line)) {
|
|
7233
|
+
dividerRunCount++;
|
|
7234
|
+
if (dividerRunCount === maxRowDividers + 1) {
|
|
7235
|
+
findings.push({
|
|
7236
|
+
rule: "row-divider",
|
|
7237
|
+
severity: "warn",
|
|
7238
|
+
line: lineNo,
|
|
7239
|
+
message: "Divider on every row. Prefer spacing (gap-*) or zebra striping over a rule under each list item.",
|
|
7240
|
+
snippet: line.trim().slice(0, 120)
|
|
7241
|
+
});
|
|
7242
|
+
}
|
|
7243
|
+
} else if (line.trim() !== "" && !line.includes("className")) {
|
|
7244
|
+
if (!/^\s*[)>}/]/.test(line)) dividerRunCount = 0;
|
|
7245
|
+
}
|
|
7246
|
+
if (usesLucide && lucideNames.size > 0) {
|
|
7247
|
+
for (const name of lucideNames) {
|
|
7248
|
+
const usage = new RegExp(`<${name}\\b`, "g");
|
|
7249
|
+
const hits = line.match(usage);
|
|
7250
|
+
if (hits) iconUsageCount += hits.length;
|
|
7251
|
+
}
|
|
7252
|
+
}
|
|
7253
|
+
}
|
|
7254
|
+
if (usesLucide && iconUsageCount > maxIcons) {
|
|
7255
|
+
findings.push({
|
|
7256
|
+
rule: "icon-spam",
|
|
7257
|
+
severity: "warn",
|
|
7258
|
+
line: 1,
|
|
7259
|
+
message: `Too many icons (${iconUsageCount} > ${maxIcons}). Icons should mark actions/nav/status \u2014 not decorate every label, tile, and card.`,
|
|
7260
|
+
snippet: `${iconUsageCount} lucide-react icon usages`
|
|
7261
|
+
});
|
|
7262
|
+
}
|
|
7263
|
+
const effectiveErrors = findings.filter(
|
|
7264
|
+
(f) => f.severity === "error" || options.strict && f.severity === "warn"
|
|
7265
|
+
).length;
|
|
7266
|
+
return {
|
|
7267
|
+
findings,
|
|
7268
|
+
errorCount: findings.filter((f) => f.severity === "error").length,
|
|
7269
|
+
warnCount: findings.filter((f) => f.severity === "warn").length,
|
|
7270
|
+
ok: effectiveErrors === 0
|
|
7271
|
+
};
|
|
7272
|
+
}
|
|
7273
|
+
function formatLintReport(findings) {
|
|
7274
|
+
if (findings.length === 0) return "";
|
|
7275
|
+
const lines = findings.slice().sort((a, b) => a.line - b.line).map((f) => {
|
|
7276
|
+
const tag = f.severity === "error" ? "ERROR" : "warn ";
|
|
7277
|
+
return ` ${tag} L${f.line} [${f.rule}] ${f.message}
|
|
7278
|
+
\u2192 ${f.snippet}`;
|
|
7279
|
+
});
|
|
7280
|
+
const errs = findings.filter((f) => f.severity === "error").length;
|
|
7281
|
+
const warns = findings.filter((f) => f.severity === "warn").length;
|
|
7282
|
+
return `Anti-slop review: ${errs} error(s), ${warns} warning(s)
|
|
7283
|
+
${lines.join("\n")}`;
|
|
7284
|
+
}
|
|
7285
|
+
|
|
7286
|
+
// src/design/ui-review.ts
|
|
7287
|
+
function reviewGeneratedUi(source, options = {}) {
|
|
7288
|
+
const lint = lintGeneratedUi(source, options);
|
|
7289
|
+
const report = formatLintReport(lint.findings);
|
|
7290
|
+
if (lint.ok) {
|
|
7291
|
+
return { lint, passed: true, report, revisionPrompt: null };
|
|
7292
|
+
}
|
|
7293
|
+
const revisionPrompt = [
|
|
7294
|
+
"The generated UI failed the Timbal anti-slop review. Fix every issue below, then return the corrected code only.",
|
|
7295
|
+
"",
|
|
7296
|
+
report,
|
|
7297
|
+
"",
|
|
7298
|
+
"Rules: colors come only from semantic tokens (text-primary, bg-muted, border-border, text-muted-foreground, \u2026) \u2014 never palette colors, hex, or oklch. Icons mark actions/nav/status, not decoration. Metric values use font-normal. No gradients on data surfaces. No divider under every row. Do not change anything that already passed."
|
|
7299
|
+
].join("\n");
|
|
7300
|
+
return { lint, passed: false, report, revisionPrompt };
|
|
7301
|
+
}
|
|
7302
|
+
var UI_REVIEW_AGENT_INSTRUCTIONS = `
|
|
7303
|
+
## Self-review before returning UI (anti-slop)
|
|
7304
|
+
|
|
7305
|
+
Before you output any generated UI code, silently re-read it and fix anything that matches the slop checklist \u2014 this is the same rubric an automated linter applies, so output that fails it will be rejected and sent back:
|
|
7306
|
+
|
|
7307
|
+
- **No hardcoded colors.** Every color is a semantic token (\`text-primary\`, \`bg-muted\`, \`border-border\`, \`text-muted-foreground\`, \`bg-destructive\`, \u2026). No \`text-blue-600\`, no \`#hex\`, no \`oklch(...)\`, no \`style={{ color }}\`.
|
|
7308
|
+
- **No decorative icons.** An icon must mark an action, nav target, or status. Remove icons that sit beside a label that already says the thing. Aim for very few icons per view.
|
|
7309
|
+
- **Muted, sparse trends.** No colored up/down pill on every metric. Show a trend only when the change is the point.
|
|
7310
|
+
- **Normal-weight values.** Metric numbers use \`font-normal\`, never \`font-bold\` at large sizes.
|
|
7311
|
+
- **No card-in-card, no per-row dividers, no gradients on data surfaces.** Group with spacing/Sections; reserve gradients for chrome.
|
|
7312
|
+
- **Compose from blocks.** Prefer \`MetricRow\` / \`MetricChartCard\` / \`DataTable\` / \`IntegrationCard\` over hand-assembled primitives.
|
|
7313
|
+
|
|
7314
|
+
If a check fails, fix it and re-read once more. Only return code that would pass clean.
|
|
7315
|
+
`.trim();
|
|
7316
|
+
|
|
6666
7317
|
// src/design/oklch.ts
|
|
6667
7318
|
var clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
6668
7319
|
var round2 = (n, digits) => {
|
|
@@ -6800,6 +7451,38 @@ function relativeLuminance(color) {
|
|
|
6800
7451
|
}
|
|
6801
7452
|
|
|
6802
7453
|
// src/design/theme.ts
|
|
7454
|
+
var SHADOW_PRESETS = {
|
|
7455
|
+
none: {
|
|
7456
|
+
lightCard: "none",
|
|
7457
|
+
lightElevated: "none",
|
|
7458
|
+
darkCard: "none",
|
|
7459
|
+
darkElevated: "none"
|
|
7460
|
+
},
|
|
7461
|
+
hairline: {
|
|
7462
|
+
lightCard: "0 0 0 1px rgba(15, 23, 42, 0.06)",
|
|
7463
|
+
lightElevated: "0 1px 2px rgba(15, 23, 42, 0.06)",
|
|
7464
|
+
darkCard: "0 0 0 1px rgba(255, 255, 255, 0.06)",
|
|
7465
|
+
darkElevated: "0 2px 8px rgba(0, 0, 0, 0.4)"
|
|
7466
|
+
},
|
|
7467
|
+
soft: {
|
|
7468
|
+
lightCard: "0 1px 2px rgba(15, 23, 42, 0.04)",
|
|
7469
|
+
lightElevated: "0 8px 30px rgba(15, 23, 42, 0.07)",
|
|
7470
|
+
darkCard: "0 1px 2px rgba(0, 0, 0, 0.3)",
|
|
7471
|
+
darkElevated: "0 10px 34px rgba(0, 0, 0, 0.45)"
|
|
7472
|
+
},
|
|
7473
|
+
medium: {
|
|
7474
|
+
lightCard: "0 1px 2px -0.5px rgba(0, 0, 0, 0.05)",
|
|
7475
|
+
lightElevated: "0 4px 24px rgba(0, 0, 0, 0.06)",
|
|
7476
|
+
darkCard: "0 1px 3px rgba(0, 0, 0, 0.22)",
|
|
7477
|
+
darkElevated: "0 4px 24px rgba(0, 0, 0, 0.35)"
|
|
7478
|
+
},
|
|
7479
|
+
strong: {
|
|
7480
|
+
lightCard: "0 2px 6px rgba(15, 23, 42, 0.10)",
|
|
7481
|
+
lightElevated: "0 16px 48px rgba(15, 23, 42, 0.16)",
|
|
7482
|
+
darkCard: "0 2px 6px rgba(0, 0, 0, 0.4)",
|
|
7483
|
+
darkElevated: "0 18px 50px rgba(0, 0, 0, 0.6)"
|
|
7484
|
+
}
|
|
7485
|
+
};
|
|
6803
7486
|
function primaryForMode(brand, mode) {
|
|
6804
7487
|
if (mode === "light") {
|
|
6805
7488
|
return { ...brand, l: Math.min(Math.max(brand.l, 0.42), 0.68) };
|
|
@@ -6835,8 +7518,26 @@ function createTimbalTheme(intent) {
|
|
|
6835
7518
|
const light = {};
|
|
6836
7519
|
const dark = {};
|
|
6837
7520
|
const root = {};
|
|
7521
|
+
let fontFamily;
|
|
7522
|
+
let fontImportUrl;
|
|
6838
7523
|
if (typeof intent.radius === "number") {
|
|
6839
7524
|
root["--radius"] = `${intent.radius}rem`;
|
|
7525
|
+
root["--radius-2xl"] = `${Math.max(intent.radius + 0.25, 0)}rem`;
|
|
7526
|
+
}
|
|
7527
|
+
if (intent.typography) {
|
|
7528
|
+
const { sans, display, mono, importUrl } = intent.typography;
|
|
7529
|
+
root["--font-sans"] = sans;
|
|
7530
|
+
if (display) root["--font-display"] = display;
|
|
7531
|
+
if (mono) root["--font-mono"] = mono;
|
|
7532
|
+
fontFamily = sans;
|
|
7533
|
+
fontImportUrl = importUrl;
|
|
7534
|
+
}
|
|
7535
|
+
if (intent.shadow) {
|
|
7536
|
+
const s = SHADOW_PRESETS[intent.shadow];
|
|
7537
|
+
light["--shadow-card-value"] = s.lightCard;
|
|
7538
|
+
light["--shadow-card-elevated-value"] = s.lightElevated;
|
|
7539
|
+
dark["--shadow-card-value"] = s.darkCard;
|
|
7540
|
+
dark["--shadow-card-elevated-value"] = s.darkElevated;
|
|
6840
7541
|
}
|
|
6841
7542
|
const primaryLight = primaryForMode(brand, "light");
|
|
6842
7543
|
const primaryDark = primaryForMode(brand, "dark");
|
|
@@ -6934,7 +7635,7 @@ function createTimbalTheme(intent) {
|
|
|
6934
7635
|
);
|
|
6935
7636
|
}
|
|
6936
7637
|
}
|
|
6937
|
-
return { light, dark, root };
|
|
7638
|
+
return { light, dark, root, fontFamily, fontImportUrl };
|
|
6938
7639
|
}
|
|
6939
7640
|
function declarations(map, indent) {
|
|
6940
7641
|
return Object.entries(map).map(([name, value]) => `${indent}${name}: ${value};`).join("\n");
|
|
@@ -6957,6 +7658,11 @@ ${declarations(theme.dark, indent)}
|
|
|
6957
7658
|
}`
|
|
6958
7659
|
);
|
|
6959
7660
|
}
|
|
7661
|
+
if (theme.fontFamily) {
|
|
7662
|
+
blocks.push(`${sel} {
|
|
7663
|
+
${indent}font-family: var(--font-sans);
|
|
7664
|
+
}`);
|
|
7665
|
+
}
|
|
6960
7666
|
} else {
|
|
6961
7667
|
if (Object.keys(lightVars).length) {
|
|
6962
7668
|
blocks.push(`:root {
|
|
@@ -6966,15 +7672,45 @@ ${declarations(lightVars, indent)}
|
|
|
6966
7672
|
if (Object.keys(theme.dark).length) {
|
|
6967
7673
|
blocks.push(`.dark {
|
|
6968
7674
|
${declarations(theme.dark, indent)}
|
|
7675
|
+
}`);
|
|
7676
|
+
}
|
|
7677
|
+
if (theme.fontFamily) {
|
|
7678
|
+
blocks.push(`:root,
|
|
7679
|
+
body {
|
|
7680
|
+
${indent}font-family: var(--font-sans);
|
|
6969
7681
|
}`);
|
|
6970
7682
|
}
|
|
6971
7683
|
}
|
|
6972
|
-
|
|
7684
|
+
const css = blocks.join("\n\n");
|
|
7685
|
+
if (options.includeFontImport && theme.fontImportUrl) {
|
|
7686
|
+
return `@import url("${theme.fontImportUrl}");
|
|
7687
|
+
|
|
7688
|
+
${css}`;
|
|
7689
|
+
}
|
|
7690
|
+
return css;
|
|
6973
7691
|
}
|
|
6974
7692
|
var RUNTIME_STYLE_ID = "timbal-theme-runtime";
|
|
7693
|
+
var FONT_LINK_ATTR = "data-timbal-theme-font";
|
|
7694
|
+
function ensureThemeFontLink(url) {
|
|
7695
|
+
if (typeof document === "undefined") return;
|
|
7696
|
+
const existing = document.head.querySelector(
|
|
7697
|
+
`link[${FONT_LINK_ATTR}]`
|
|
7698
|
+
);
|
|
7699
|
+
if (!url) {
|
|
7700
|
+
existing?.remove();
|
|
7701
|
+
return;
|
|
7702
|
+
}
|
|
7703
|
+
if (existing?.getAttribute("href") === url) return;
|
|
7704
|
+
const link = existing ?? document.createElement("link");
|
|
7705
|
+
link.rel = "stylesheet";
|
|
7706
|
+
link.href = url;
|
|
7707
|
+
link.setAttribute(FONT_LINK_ATTR, "");
|
|
7708
|
+
if (!existing) document.head.appendChild(link);
|
|
7709
|
+
}
|
|
6975
7710
|
function applyTimbalTheme(theme) {
|
|
6976
7711
|
if (typeof document === "undefined") return () => {
|
|
6977
7712
|
};
|
|
7713
|
+
ensureThemeFontLink(theme.fontImportUrl);
|
|
6978
7714
|
let el = document.getElementById(RUNTIME_STYLE_ID);
|
|
6979
7715
|
if (!el) {
|
|
6980
7716
|
el = document.createElement("style");
|
|
@@ -6985,11 +7721,13 @@ function applyTimbalTheme(theme) {
|
|
|
6985
7721
|
el.textContent = themeToCss(theme);
|
|
6986
7722
|
return () => {
|
|
6987
7723
|
el?.parentNode?.removeChild(el);
|
|
7724
|
+
ensureThemeFontLink(void 0);
|
|
6988
7725
|
};
|
|
6989
7726
|
}
|
|
6990
7727
|
function clearTimbalTheme() {
|
|
6991
7728
|
if (typeof document === "undefined") return;
|
|
6992
7729
|
document.getElementById(RUNTIME_STYLE_ID)?.remove();
|
|
7730
|
+
ensureThemeFontLink(void 0);
|
|
6993
7731
|
}
|
|
6994
7732
|
function isDev2() {
|
|
6995
7733
|
if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") {
|
|
@@ -7000,48 +7738,122 @@ function isDev2() {
|
|
|
7000
7738
|
|
|
7001
7739
|
// src/design/theme-presets.ts
|
|
7002
7740
|
var EMPTY_TOKENS = { light: {}, dark: {}, root: {} };
|
|
7741
|
+
var FONT_URL = {
|
|
7742
|
+
geist: "https://fonts.googleapis.com/css2?family=Geist:wght@400..600&display=swap",
|
|
7743
|
+
sora: "https://fonts.googleapis.com/css2?family=Sora:wght@400..600&display=swap",
|
|
7744
|
+
lexend: "https://fonts.googleapis.com/css2?family=Lexend:wght@400..600&display=swap",
|
|
7745
|
+
inter: "https://fonts.googleapis.com/css2?family=Inter:wght@400..600&display=swap",
|
|
7746
|
+
fraunces: "https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&display=swap",
|
|
7747
|
+
jetbrains: "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400..600&display=swap"
|
|
7748
|
+
};
|
|
7749
|
+
var STACK = {
|
|
7750
|
+
geist: '"Geist", ui-sans-serif, system-ui, sans-serif',
|
|
7751
|
+
sora: '"Sora", ui-sans-serif, system-ui, sans-serif',
|
|
7752
|
+
lexend: '"Lexend", ui-sans-serif, system-ui, sans-serif',
|
|
7753
|
+
inter: '"Inter", ui-sans-serif, system-ui, sans-serif',
|
|
7754
|
+
fraunces: '"Fraunces", ui-serif, Georgia, "Times New Roman", serif',
|
|
7755
|
+
jetbrains: '"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace'
|
|
7756
|
+
};
|
|
7003
7757
|
var TIMBAL_THEME_PRESETS = [
|
|
7004
7758
|
{
|
|
7005
7759
|
id: "platform",
|
|
7006
7760
|
label: "Platform",
|
|
7007
|
-
description: "Shipped neutral monochrome \u2014 the Timbal Platform default. Calm, brand-agnostic.",
|
|
7761
|
+
description: "Shipped neutral monochrome \u2014 the Timbal Platform default. Calm, brand-agnostic, system font.",
|
|
7008
7762
|
swatch: "oklch(0.205 0 0)",
|
|
7763
|
+
font: null,
|
|
7009
7764
|
tokens: EMPTY_TOKENS
|
|
7010
7765
|
},
|
|
7011
7766
|
{
|
|
7012
7767
|
id: "indigo",
|
|
7013
7768
|
label: "Indigo",
|
|
7014
|
-
description: "Cool, trustworthy blue-violet \u2014
|
|
7769
|
+
description: "Cool, trustworthy blue-violet, Geist type, generous radius, soft shadows \u2014 analytics & ops dashboards.",
|
|
7015
7770
|
swatch: "#4f46e5",
|
|
7016
|
-
|
|
7771
|
+
font: "Geist",
|
|
7772
|
+
tokens: createTimbalTheme({
|
|
7773
|
+
brand: "#4f46e5",
|
|
7774
|
+
radius: 0.875,
|
|
7775
|
+
shadow: "soft",
|
|
7776
|
+
typography: { sans: STACK.geist, importUrl: FONT_URL.geist }
|
|
7777
|
+
})
|
|
7017
7778
|
},
|
|
7018
7779
|
{
|
|
7019
7780
|
id: "violet",
|
|
7020
7781
|
label: "Violet",
|
|
7021
|
-
description: "Vivid purple \u2014 expressive
|
|
7782
|
+
description: "Vivid purple, Sora type, rounded, soft shadows \u2014 expressive product / marketing surfaces.",
|
|
7022
7783
|
swatch: "#7c3aed",
|
|
7023
|
-
|
|
7784
|
+
font: "Sora",
|
|
7785
|
+
tokens: createTimbalTheme({
|
|
7786
|
+
brand: "#7c3aed",
|
|
7787
|
+
radius: 1,
|
|
7788
|
+
shadow: "soft",
|
|
7789
|
+
typography: { sans: STACK.sora, importUrl: FONT_URL.sora }
|
|
7790
|
+
})
|
|
7024
7791
|
},
|
|
7025
7792
|
{
|
|
7026
7793
|
id: "forest",
|
|
7027
7794
|
label: "Forest",
|
|
7028
|
-
description: "Grounded green \u2014 finance, sustainability, status-positive apps.",
|
|
7795
|
+
description: "Grounded green, Lexend type, compact radius \u2014 finance, sustainability, status-positive apps.",
|
|
7029
7796
|
swatch: "#16a34a",
|
|
7030
|
-
|
|
7797
|
+
font: "Lexend",
|
|
7798
|
+
tokens: createTimbalTheme({
|
|
7799
|
+
brand: "#16a34a",
|
|
7800
|
+
radius: 0.625,
|
|
7801
|
+
shadow: "soft",
|
|
7802
|
+
typography: { sans: STACK.lexend, importUrl: FONT_URL.lexend }
|
|
7803
|
+
})
|
|
7031
7804
|
},
|
|
7032
7805
|
{
|
|
7033
7806
|
id: "warm",
|
|
7034
7807
|
label: "Warm",
|
|
7035
|
-
description: "Energetic orange \u2014 consumer, creative, high-engagement tools.",
|
|
7808
|
+
description: "Energetic orange, Lexend type, friendly radius \u2014 consumer, creative, high-engagement tools.",
|
|
7036
7809
|
swatch: "#ea580c",
|
|
7037
|
-
|
|
7810
|
+
font: "Lexend",
|
|
7811
|
+
tokens: createTimbalTheme({
|
|
7812
|
+
brand: "#ea580c",
|
|
7813
|
+
radius: 0.875,
|
|
7814
|
+
shadow: "soft",
|
|
7815
|
+
typography: { sans: STACK.lexend, importUrl: FONT_URL.lexend }
|
|
7816
|
+
})
|
|
7038
7817
|
},
|
|
7039
7818
|
{
|
|
7040
7819
|
id: "slate",
|
|
7041
7820
|
label: "Slate",
|
|
7042
|
-
description: "Muted
|
|
7821
|
+
description: "Muted enterprise gray-blue, Inter type, tight radius, hairline shadows, tinted neutrals.",
|
|
7043
7822
|
swatch: "#475569",
|
|
7044
|
-
|
|
7823
|
+
font: "Inter",
|
|
7824
|
+
tokens: createTimbalTheme({
|
|
7825
|
+
brand: "#475569",
|
|
7826
|
+
radius: 0.5,
|
|
7827
|
+
shadow: "hairline",
|
|
7828
|
+
tintNeutrals: true,
|
|
7829
|
+
typography: { sans: STACK.inter, importUrl: FONT_URL.inter }
|
|
7830
|
+
})
|
|
7831
|
+
},
|
|
7832
|
+
{
|
|
7833
|
+
id: "folio",
|
|
7834
|
+
label: "Folio",
|
|
7835
|
+
description: "Editorial serif (Fraunces), near-sharp corners, hairline shadows \u2014 content / docs / reports.",
|
|
7836
|
+
swatch: "#9a3412",
|
|
7837
|
+
font: "Fraunces",
|
|
7838
|
+
tokens: createTimbalTheme({
|
|
7839
|
+
brand: "#9a3412",
|
|
7840
|
+
radius: 0.25,
|
|
7841
|
+
shadow: "hairline",
|
|
7842
|
+
typography: { sans: STACK.fraunces, importUrl: FONT_URL.fraunces }
|
|
7843
|
+
})
|
|
7844
|
+
},
|
|
7845
|
+
{
|
|
7846
|
+
id: "carbon",
|
|
7847
|
+
label: "Carbon",
|
|
7848
|
+
description: "Terminal monospace (JetBrains Mono), crisp corners, green accent \u2014 developer / infra tools.",
|
|
7849
|
+
swatch: "#15803d",
|
|
7850
|
+
font: "JetBrains Mono",
|
|
7851
|
+
tokens: createTimbalTheme({
|
|
7852
|
+
brand: "#15803d",
|
|
7853
|
+
radius: 0.375,
|
|
7854
|
+
shadow: "hairline",
|
|
7855
|
+
typography: { sans: STACK.jetbrains, importUrl: FONT_URL.jetbrains }
|
|
7856
|
+
})
|
|
7045
7857
|
}
|
|
7046
7858
|
];
|
|
7047
7859
|
var PRESET_BY_ID = new Map(
|
|
@@ -7082,18 +7894,29 @@ The package ships a complete light + dark token system (\`styles.css\`). Compone
|
|
|
7082
7894
|
|
|
7083
7895
|
**Never write \`oklch(...)\` / hex literals or hand-author paired \`:root\` + \`.dark\` blocks.** Express intent and let the package derive a complete, contrast-correct, paired palette.
|
|
7084
7896
|
|
|
7085
|
-
###
|
|
7897
|
+
### Generate a full personality (color + roundness + fonts + shadows)
|
|
7086
7898
|
|
|
7087
7899
|
\`\`\`ts
|
|
7088
7900
|
import { createTimbalTheme, themeToCss } from "@timbal-ai/timbal-react";
|
|
7089
7901
|
|
|
7090
|
-
const theme = createTimbalTheme({
|
|
7091
|
-
|
|
7092
|
-
|
|
7902
|
+
const theme = createTimbalTheme({
|
|
7903
|
+
brand: "#4f46e5",
|
|
7904
|
+
radius: 0.875, // corner roundness in rem (sets --radius + --radius-2xl)
|
|
7905
|
+
shadow: "soft", // "none" | "hairline" | "soft" | "medium" | "strong"
|
|
7906
|
+
tintNeutrals: false, // tint background/border toward the brand hue
|
|
7907
|
+
accent: "#10b981", // optional secondary accent
|
|
7908
|
+
typography: { // optional \u2014 re-skins every component's font
|
|
7909
|
+
sans: '"Geist", ui-sans-serif, system-ui, sans-serif',
|
|
7910
|
+
importUrl: "https://fonts.googleapis.com/css2?family=Geist:wght@400..600&display=swap",
|
|
7911
|
+
// display?, mono? also supported
|
|
7912
|
+
},
|
|
7913
|
+
});
|
|
7914
|
+
const css = themeToCss(theme); // paired light + dark, guaranteed in sync
|
|
7093
7915
|
\`\`\`
|
|
7094
7916
|
|
|
7095
|
-
-
|
|
7096
|
-
-
|
|
7917
|
+
- \`createTimbalTheme\` derives \`--primary\`, its foreground, ring, the full button gradient, and a soft playground tint from \`brand\`. \`radius\` sets roundness, \`shadow\` sets card depth, \`typography\` sets fonts. You only supply intent \u2014 never raw OKLCH.
|
|
7918
|
+
- For a real company, look up the actual brand hex first (brandfetch / "<company> brand color hex").
|
|
7919
|
+
- **Web fonts must be loaded.** \`applyTimbalTheme\` / \`TimbalThemeStyle\` inject the \`<link>\` for \`typography.importUrl\` automatically. For build-time \`themeToCss\`, add the \`<link rel="stylesheet" href="\u2026">\` to your \`index.html\` yourself (or pass \`themeToCss(theme, { includeFontImport: true })\` when the result is a standalone stylesheet).
|
|
7097
7920
|
|
|
7098
7921
|
### Apply a theme
|
|
7099
7922
|
|
|
@@ -7110,14 +7933,18 @@ import { TIMBAL_THEME_PRESETS, applyThemePreset } from "@timbal-ai/timbal-react"
|
|
|
7110
7933
|
// TIMBAL_THEME_PRESETS: { id, label, description, swatch, tokens }[]
|
|
7111
7934
|
\`\`\`
|
|
7112
7935
|
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
|
7116
|
-
|
|
7117
|
-
| \`
|
|
7118
|
-
| \`
|
|
7119
|
-
| \`
|
|
7120
|
-
| \`
|
|
7936
|
+
Each preset is a **full personality** (color + radius + shadows + font), not just a color:
|
|
7937
|
+
|
|
7938
|
+
| Preset id | Personality |
|
|
7939
|
+
|-----------|-------------|
|
|
7940
|
+
| \`platform\` | Neutral monochrome, system font (the default \u2014 no brand) |
|
|
7941
|
+
| \`indigo\` | Blue-violet, Geist, generous radius, soft shadows \u2014 analytics / ops |
|
|
7942
|
+
| \`violet\` | Purple, Sora, rounded \u2014 product / marketing |
|
|
7943
|
+
| \`forest\` | Green, Lexend, compact \u2014 finance / sustainability |
|
|
7944
|
+
| \`warm\` | Orange, Lexend, friendly \u2014 consumer / creative |
|
|
7945
|
+
| \`slate\` | Enterprise gray-blue, Inter, tight radius, hairline shadows |
|
|
7946
|
+
| \`folio\` | Editorial serif (Fraunces), near-sharp corners \u2014 content / docs |
|
|
7947
|
+
| \`carbon\` | Terminal monospace (JetBrains Mono), green accent \u2014 dev / infra |
|
|
7121
7948
|
|
|
7122
7949
|
- To present options visually, render \`<ThemePresetGallery value={id} onSelect={setId} />\` \u2014 each swatch previews real components (Button + metric tile) scoped via \`data-timbal-theme\`, so the live app doesn't change until the user picks.
|
|
7123
7950
|
- On selection, call \`applyThemePreset(id)\` (persists to \`localStorage\` and restores on reload).
|
|
@@ -7141,14 +7968,17 @@ var TimbalThemeStyle = ({
|
|
|
7141
7968
|
if (!tokens) return null;
|
|
7142
7969
|
const css = themeToCss(tokens, scope ? { scope } : void 0);
|
|
7143
7970
|
if (!css) return null;
|
|
7144
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.
|
|
7145
|
-
"
|
|
7146
|
-
|
|
7147
|
-
"
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7972
|
+
tokens.fontImportUrl ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("link", { rel: "stylesheet", href: tokens.fontImportUrl }) : null,
|
|
7973
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7974
|
+
"style",
|
|
7975
|
+
{
|
|
7976
|
+
"data-timbal-theme-style": scope ?? "root",
|
|
7977
|
+
nonce,
|
|
7978
|
+
dangerouslySetInnerHTML: { __html: css }
|
|
7979
|
+
}
|
|
7980
|
+
)
|
|
7981
|
+
] });
|
|
7152
7982
|
};
|
|
7153
7983
|
|
|
7154
7984
|
// src/app/data/metrics-shared.tsx
|
|
@@ -7314,6 +8144,10 @@ var ThemePresetGallery = ({
|
|
|
7314
8144
|
selected ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-xs font-medium text-primary", children: "Selected" }) : null
|
|
7315
8145
|
] }),
|
|
7316
8146
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-xs leading-snug text-muted-foreground", children: preset.description }),
|
|
8147
|
+
preset.font ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: [
|
|
8148
|
+
"Aa \xB7 ",
|
|
8149
|
+
preset.font
|
|
8150
|
+
] }) : null,
|
|
7317
8151
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 rounded-lg border border-border bg-background p-2", children: [
|
|
7318
8152
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
7319
8153
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { size: "xs", className: "pointer-events-none", children: "Primary" }),
|
|
@@ -7375,18 +8209,13 @@ var appFilterBarClass = cn(
|
|
|
7375
8209
|
"flex flex-wrap items-center gap-2",
|
|
7376
8210
|
studioTopbarPillHeightClass
|
|
7377
8211
|
);
|
|
7378
|
-
var appSearchInputClass =
|
|
8212
|
+
var appSearchInputClass = controlClass({}, "inline-flex items-center gap-2");
|
|
7379
8213
|
var appBreadcrumbsClass = "flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground";
|
|
7380
8214
|
var appBreadcrumbLinkClass = "transition-colors hover:text-foreground";
|
|
7381
8215
|
var appFieldClass = "flex flex-col gap-1.5";
|
|
7382
8216
|
var appFieldLabelClass = "text-sm font-medium text-foreground";
|
|
7383
8217
|
var appFieldHintClass = "text-xs text-muted-foreground";
|
|
7384
|
-
var appInputClass =
|
|
7385
|
-
studioSecondaryChromeClass,
|
|
7386
|
-
"h-10 w-full rounded-lg px-3 text-sm text-foreground outline-none",
|
|
7387
|
-
"placeholder:text-muted-foreground/70",
|
|
7388
|
-
"focus-visible:ring-2 focus-visible:ring-foreground/10"
|
|
7389
|
-
);
|
|
8218
|
+
var appInputClass = controlClass({}, "w-full");
|
|
7390
8219
|
var appEmptyStateClass = cn(
|
|
7391
8220
|
appSurfaceCardClass,
|
|
7392
8221
|
"flex flex-col items-center justify-center gap-2 py-12 text-center"
|
|
@@ -9433,7 +10262,8 @@ function DropdownMenuContent({
|
|
|
9433
10262
|
"data-slot": "dropdown-menu-content",
|
|
9434
10263
|
sideOffset,
|
|
9435
10264
|
className: cn(
|
|
9436
|
-
|
|
10265
|
+
overlayListPanelClass,
|
|
10266
|
+
"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",
|
|
9437
10267
|
className
|
|
9438
10268
|
),
|
|
9439
10269
|
...props
|
|
@@ -9453,7 +10283,8 @@ function DropdownMenuItem({
|
|
|
9453
10283
|
"data-inset": inset,
|
|
9454
10284
|
"data-variant": variant,
|
|
9455
10285
|
className: cn(
|
|
9456
|
-
|
|
10286
|
+
overlayItemClass,
|
|
10287
|
+
"data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
|
|
9457
10288
|
className
|
|
9458
10289
|
),
|
|
9459
10290
|
...props
|
|
@@ -9470,10 +10301,7 @@ function DropdownMenuCheckboxItem({
|
|
|
9470
10301
|
import_radix_ui5.DropdownMenu.CheckboxItem,
|
|
9471
10302
|
{
|
|
9472
10303
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
9473
|
-
className: cn(
|
|
9474
|
-
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9475
|
-
className
|
|
9476
|
-
),
|
|
10304
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
9477
10305
|
checked,
|
|
9478
10306
|
...props,
|
|
9479
10307
|
children: [
|
|
@@ -9503,10 +10331,7 @@ function DropdownMenuRadioItem({
|
|
|
9503
10331
|
import_radix_ui5.DropdownMenu.RadioItem,
|
|
9504
10332
|
{
|
|
9505
10333
|
"data-slot": "dropdown-menu-radio-item",
|
|
9506
|
-
className: cn(
|
|
9507
|
-
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9508
|
-
className
|
|
9509
|
-
),
|
|
10334
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
9510
10335
|
...props,
|
|
9511
10336
|
children: [
|
|
9512
10337
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react20.CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
@@ -9579,7 +10404,8 @@ function DropdownMenuSubTrigger({
|
|
|
9579
10404
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
9580
10405
|
"data-inset": inset,
|
|
9581
10406
|
className: cn(
|
|
9582
|
-
|
|
10407
|
+
overlayItemClass,
|
|
10408
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
9583
10409
|
className
|
|
9584
10410
|
),
|
|
9585
10411
|
...props,
|
|
@@ -9599,7 +10425,8 @@ function DropdownMenuSubContent({
|
|
|
9599
10425
|
{
|
|
9600
10426
|
"data-slot": "dropdown-menu-sub-content",
|
|
9601
10427
|
className: cn(
|
|
9602
|
-
|
|
10428
|
+
overlayListPanelClass,
|
|
10429
|
+
"min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-hidden p-1",
|
|
9603
10430
|
className
|
|
9604
10431
|
),
|
|
9605
10432
|
...props
|
|
@@ -9629,16 +10456,24 @@ function PopoverContent({
|
|
|
9629
10456
|
className,
|
|
9630
10457
|
align = "center",
|
|
9631
10458
|
sideOffset = 4,
|
|
10459
|
+
variant = "default",
|
|
9632
10460
|
...props
|
|
9633
10461
|
}) {
|
|
9634
10462
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_radix_ui6.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9635
10463
|
import_radix_ui6.Popover.Content,
|
|
9636
10464
|
{
|
|
9637
10465
|
"data-slot": "popover-content",
|
|
10466
|
+
"data-variant": variant,
|
|
9638
10467
|
align,
|
|
9639
10468
|
sideOffset,
|
|
9640
10469
|
className: cn(
|
|
9641
|
-
|
|
10470
|
+
variant === "list" ? cn(
|
|
10471
|
+
overlayListPanelClass,
|
|
10472
|
+
"min-w-[8rem] origin-[var(--radix-popover-content-transform-origin)]"
|
|
10473
|
+
) : cn(
|
|
10474
|
+
overlaySurfaceClass,
|
|
10475
|
+
"w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-xl p-4 outline-hidden"
|
|
10476
|
+
),
|
|
9642
10477
|
className
|
|
9643
10478
|
),
|
|
9644
10479
|
...props
|
|
@@ -9677,7 +10512,8 @@ function SelectTrigger({
|
|
|
9677
10512
|
"data-slot": "select-trigger",
|
|
9678
10513
|
"data-size": size,
|
|
9679
10514
|
className: cn(
|
|
9680
|
-
|
|
10515
|
+
controlClass({ size }),
|
|
10516
|
+
"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",
|
|
9681
10517
|
className
|
|
9682
10518
|
),
|
|
9683
10519
|
...props,
|
|
@@ -9699,7 +10535,8 @@ function SelectContent({
|
|
|
9699
10535
|
{
|
|
9700
10536
|
"data-slot": "select-content",
|
|
9701
10537
|
className: cn(
|
|
9702
|
-
|
|
10538
|
+
overlayListPanelClass,
|
|
10539
|
+
"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",
|
|
9703
10540
|
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",
|
|
9704
10541
|
className
|
|
9705
10542
|
),
|
|
@@ -9745,7 +10582,8 @@ function SelectItem({
|
|
|
9745
10582
|
{
|
|
9746
10583
|
"data-slot": "select-item",
|
|
9747
10584
|
className: cn(
|
|
9748
|
-
|
|
10585
|
+
overlayItemClass,
|
|
10586
|
+
"w-full py-1.5 pr-8 pl-2 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
9749
10587
|
className
|
|
9750
10588
|
),
|
|
9751
10589
|
...props,
|
|
@@ -9797,12 +10635,2873 @@ function SelectScrollDownButton({
|
|
|
9797
10635
|
}
|
|
9798
10636
|
);
|
|
9799
10637
|
}
|
|
10638
|
+
|
|
10639
|
+
// src/ui/input.tsx
|
|
10640
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
10641
|
+
function Input({
|
|
10642
|
+
className,
|
|
10643
|
+
type,
|
|
10644
|
+
controlSize,
|
|
10645
|
+
...props
|
|
10646
|
+
}) {
|
|
10647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
10648
|
+
"input",
|
|
10649
|
+
{
|
|
10650
|
+
type,
|
|
10651
|
+
"data-slot": "input",
|
|
10652
|
+
className: cn(
|
|
10653
|
+
controlClass({ size: controlSize }),
|
|
10654
|
+
"w-full file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
|
|
10655
|
+
className
|
|
10656
|
+
),
|
|
10657
|
+
...props
|
|
10658
|
+
}
|
|
10659
|
+
);
|
|
10660
|
+
}
|
|
10661
|
+
|
|
10662
|
+
// src/ui/textarea.tsx
|
|
10663
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
10664
|
+
function Textarea({ className, ...props }) {
|
|
10665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
10666
|
+
"textarea",
|
|
10667
|
+
{
|
|
10668
|
+
"data-slot": "textarea",
|
|
10669
|
+
className: cn(
|
|
10670
|
+
controlSurfaceClass,
|
|
10671
|
+
"min-h-16 w-full resize-y rounded-lg px-3 py-2 leading-relaxed",
|
|
10672
|
+
className
|
|
10673
|
+
),
|
|
10674
|
+
...props
|
|
10675
|
+
}
|
|
10676
|
+
);
|
|
10677
|
+
}
|
|
10678
|
+
|
|
10679
|
+
// src/ui/label.tsx
|
|
10680
|
+
var import_radix_ui8 = require("radix-ui");
|
|
10681
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
10682
|
+
function Label({
|
|
10683
|
+
className,
|
|
10684
|
+
...props
|
|
10685
|
+
}) {
|
|
10686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
10687
|
+
import_radix_ui8.Label.Root,
|
|
10688
|
+
{
|
|
10689
|
+
"data-slot": "label",
|
|
10690
|
+
className: cn(
|
|
10691
|
+
"flex select-none items-center gap-2 text-sm font-medium text-foreground",
|
|
10692
|
+
"group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
10693
|
+
className
|
|
10694
|
+
),
|
|
10695
|
+
...props
|
|
10696
|
+
}
|
|
10697
|
+
);
|
|
10698
|
+
}
|
|
10699
|
+
|
|
10700
|
+
// src/ui/checkbox.tsx
|
|
10701
|
+
var import_radix_ui9 = require("radix-ui");
|
|
10702
|
+
var import_lucide_react22 = require("lucide-react");
|
|
10703
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
10704
|
+
function Checkbox({
|
|
10705
|
+
className,
|
|
10706
|
+
...props
|
|
10707
|
+
}) {
|
|
10708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
10709
|
+
import_radix_ui9.Checkbox.Root,
|
|
10710
|
+
{
|
|
10711
|
+
"data-slot": "checkbox",
|
|
10712
|
+
className: cn(
|
|
10713
|
+
"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]",
|
|
10714
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10715
|
+
"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",
|
|
10716
|
+
className
|
|
10717
|
+
),
|
|
10718
|
+
...props,
|
|
10719
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
10720
|
+
import_radix_ui9.Checkbox.Indicator,
|
|
10721
|
+
{
|
|
10722
|
+
"data-slot": "checkbox-indicator",
|
|
10723
|
+
className: "flex items-center justify-center text-current transition-none",
|
|
10724
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react22.CheckIcon, { className: "size-3.5" })
|
|
10725
|
+
}
|
|
10726
|
+
)
|
|
10727
|
+
}
|
|
10728
|
+
);
|
|
10729
|
+
}
|
|
10730
|
+
|
|
10731
|
+
// src/ui/switch.tsx
|
|
10732
|
+
var import_radix_ui10 = require("radix-ui");
|
|
10733
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
10734
|
+
function Switch({
|
|
10735
|
+
className,
|
|
10736
|
+
...props
|
|
10737
|
+
}) {
|
|
10738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10739
|
+
import_radix_ui10.Switch.Root,
|
|
10740
|
+
{
|
|
10741
|
+
"data-slot": "switch",
|
|
10742
|
+
className: cn(
|
|
10743
|
+
"peer inline-flex h-5 w-9 shrink-0 items-center rounded-full outline-none transition-[background,box-shadow,border-color] duration-200",
|
|
10744
|
+
TIMBAL_V2_SWITCH_TRACK_OFF,
|
|
10745
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10746
|
+
"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",
|
|
10747
|
+
className
|
|
10748
|
+
),
|
|
10749
|
+
...props,
|
|
10750
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10751
|
+
import_radix_ui10.Switch.Thumb,
|
|
10752
|
+
{
|
|
10753
|
+
"data-slot": "switch-thumb",
|
|
10754
|
+
className: cn(
|
|
10755
|
+
TIMBAL_V2_SWITCH_THUMB,
|
|
10756
|
+
"pointer-events-none block size-4 translate-x-0.5 rounded-full transition-transform data-[state=checked]:translate-x-4"
|
|
10757
|
+
)
|
|
10758
|
+
}
|
|
10759
|
+
)
|
|
10760
|
+
}
|
|
10761
|
+
);
|
|
10762
|
+
}
|
|
10763
|
+
|
|
10764
|
+
// src/ui/radio-group.tsx
|
|
10765
|
+
var import_radix_ui11 = require("radix-ui");
|
|
10766
|
+
var import_lucide_react23 = require("lucide-react");
|
|
10767
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
10768
|
+
function RadioGroup({
|
|
10769
|
+
className,
|
|
10770
|
+
...props
|
|
10771
|
+
}) {
|
|
10772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10773
|
+
import_radix_ui11.RadioGroup.Root,
|
|
10774
|
+
{
|
|
10775
|
+
"data-slot": "radio-group",
|
|
10776
|
+
className: cn("grid gap-2.5", className),
|
|
10777
|
+
...props
|
|
10778
|
+
}
|
|
10779
|
+
);
|
|
10780
|
+
}
|
|
10781
|
+
function RadioGroupItem({
|
|
10782
|
+
className,
|
|
10783
|
+
...props
|
|
10784
|
+
}) {
|
|
10785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10786
|
+
import_radix_ui11.RadioGroup.Item,
|
|
10787
|
+
{
|
|
10788
|
+
"data-slot": "radio-group-item",
|
|
10789
|
+
className: cn(
|
|
10790
|
+
"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]",
|
|
10791
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10792
|
+
"data-[state=checked]:border-foreground/30",
|
|
10793
|
+
className
|
|
10794
|
+
),
|
|
10795
|
+
...props,
|
|
10796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10797
|
+
import_radix_ui11.RadioGroup.Indicator,
|
|
10798
|
+
{
|
|
10799
|
+
"data-slot": "radio-group-indicator",
|
|
10800
|
+
className: "flex items-center justify-center",
|
|
10801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react23.CircleIcon, { className: "size-2 fill-foreground text-foreground" })
|
|
10802
|
+
}
|
|
10803
|
+
)
|
|
10804
|
+
}
|
|
10805
|
+
);
|
|
10806
|
+
}
|
|
10807
|
+
|
|
10808
|
+
// src/ui/form.tsx
|
|
10809
|
+
var import_radix_ui12 = require("radix-ui");
|
|
10810
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
10811
|
+
function Form({ ...props }) {
|
|
10812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_radix_ui12.Form.Root, { "data-slot": "form", ...props });
|
|
10813
|
+
}
|
|
10814
|
+
function FormField({
|
|
10815
|
+
...props
|
|
10816
|
+
}) {
|
|
10817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_radix_ui12.Form.Field, { "data-slot": "form-field", ...props });
|
|
10818
|
+
}
|
|
10819
|
+
function FormItem({ className, ...props }) {
|
|
10820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10821
|
+
"div",
|
|
10822
|
+
{
|
|
10823
|
+
"data-slot": "form-item",
|
|
10824
|
+
className: cn("grid gap-1.5", className),
|
|
10825
|
+
...props
|
|
10826
|
+
}
|
|
10827
|
+
);
|
|
10828
|
+
}
|
|
10829
|
+
function FormLabel({
|
|
10830
|
+
className,
|
|
10831
|
+
...props
|
|
10832
|
+
}) {
|
|
10833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_radix_ui12.Form.Label, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Label, { "data-slot": "form-label", className, ...props }) });
|
|
10834
|
+
}
|
|
10835
|
+
function FormControl({
|
|
10836
|
+
...props
|
|
10837
|
+
}) {
|
|
10838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_radix_ui12.Form.Control, { "data-slot": "form-control", ...props });
|
|
10839
|
+
}
|
|
10840
|
+
function FormMessage({
|
|
10841
|
+
className,
|
|
10842
|
+
...props
|
|
10843
|
+
}) {
|
|
10844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10845
|
+
import_radix_ui12.Form.Message,
|
|
10846
|
+
{
|
|
10847
|
+
"data-slot": "form-message",
|
|
10848
|
+
className: cn("text-xs text-destructive", className),
|
|
10849
|
+
...props
|
|
10850
|
+
}
|
|
10851
|
+
);
|
|
10852
|
+
}
|
|
10853
|
+
function FormSubmit({
|
|
10854
|
+
className,
|
|
10855
|
+
...props
|
|
10856
|
+
}) {
|
|
10857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10858
|
+
import_radix_ui12.Form.Submit,
|
|
10859
|
+
{
|
|
10860
|
+
"data-slot": "form-submit",
|
|
10861
|
+
className,
|
|
10862
|
+
...props
|
|
10863
|
+
}
|
|
10864
|
+
);
|
|
10865
|
+
}
|
|
10866
|
+
|
|
10867
|
+
// src/ui/aspect-ratio.tsx
|
|
10868
|
+
var import_radix_ui13 = require("radix-ui");
|
|
10869
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
10870
|
+
function AspectRatio({
|
|
10871
|
+
...props
|
|
10872
|
+
}) {
|
|
10873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_radix_ui13.AspectRatio.Root, { "data-slot": "aspect-ratio", ...props });
|
|
10874
|
+
}
|
|
10875
|
+
|
|
10876
|
+
// src/ui/breadcrumb.tsx
|
|
10877
|
+
var import_lucide_react24 = require("lucide-react");
|
|
10878
|
+
var import_radix_ui14 = require("radix-ui");
|
|
10879
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
10880
|
+
function Breadcrumb({ ...props }) {
|
|
10881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("nav", { "data-slot": "breadcrumb", "aria-label": "Breadcrumb", ...props });
|
|
10882
|
+
}
|
|
10883
|
+
function BreadcrumbList({ className, ...props }) {
|
|
10884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10885
|
+
"ol",
|
|
10886
|
+
{
|
|
10887
|
+
"data-slot": "breadcrumb-list",
|
|
10888
|
+
className: cn(
|
|
10889
|
+
"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground",
|
|
10890
|
+
className
|
|
10891
|
+
),
|
|
10892
|
+
...props
|
|
10893
|
+
}
|
|
10894
|
+
);
|
|
10895
|
+
}
|
|
10896
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
10897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10898
|
+
"li",
|
|
10899
|
+
{
|
|
10900
|
+
"data-slot": "breadcrumb-item",
|
|
10901
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
10902
|
+
...props
|
|
10903
|
+
}
|
|
10904
|
+
);
|
|
10905
|
+
}
|
|
10906
|
+
function BreadcrumbLink({
|
|
10907
|
+
className,
|
|
10908
|
+
asChild,
|
|
10909
|
+
...props
|
|
10910
|
+
}) {
|
|
10911
|
+
const Comp = asChild ? import_radix_ui14.Slot.Root : "a";
|
|
10912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10913
|
+
Comp,
|
|
10914
|
+
{
|
|
10915
|
+
"data-slot": "breadcrumb-link",
|
|
10916
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
10917
|
+
...props
|
|
10918
|
+
}
|
|
10919
|
+
);
|
|
10920
|
+
}
|
|
10921
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
10922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10923
|
+
"span",
|
|
10924
|
+
{
|
|
10925
|
+
"data-slot": "breadcrumb-page",
|
|
10926
|
+
role: "link",
|
|
10927
|
+
"aria-disabled": "true",
|
|
10928
|
+
"aria-current": "page",
|
|
10929
|
+
className: cn("font-normal text-foreground", className),
|
|
10930
|
+
...props
|
|
10931
|
+
}
|
|
10932
|
+
);
|
|
10933
|
+
}
|
|
10934
|
+
function BreadcrumbSeparator({
|
|
10935
|
+
children,
|
|
10936
|
+
className,
|
|
10937
|
+
...props
|
|
10938
|
+
}) {
|
|
10939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10940
|
+
"li",
|
|
10941
|
+
{
|
|
10942
|
+
"data-slot": "breadcrumb-separator",
|
|
10943
|
+
role: "presentation",
|
|
10944
|
+
"aria-hidden": "true",
|
|
10945
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
10946
|
+
...props,
|
|
10947
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react24.ChevronRightIcon, {})
|
|
10948
|
+
}
|
|
10949
|
+
);
|
|
10950
|
+
}
|
|
10951
|
+
function BreadcrumbEllipsis({
|
|
10952
|
+
className,
|
|
10953
|
+
...props
|
|
10954
|
+
}) {
|
|
10955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
10956
|
+
"span",
|
|
10957
|
+
{
|
|
10958
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
10959
|
+
role: "presentation",
|
|
10960
|
+
"aria-hidden": "true",
|
|
10961
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
10962
|
+
...props,
|
|
10963
|
+
children: [
|
|
10964
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react24.MoreHorizontalIcon, { className: "size-4" }),
|
|
10965
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "sr-only", children: "More" })
|
|
10966
|
+
]
|
|
10967
|
+
}
|
|
10968
|
+
);
|
|
10969
|
+
}
|
|
10970
|
+
|
|
10971
|
+
// src/ui/pagination.tsx
|
|
10972
|
+
var import_lucide_react25 = require("lucide-react");
|
|
10973
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
10974
|
+
function Pagination({ className, ...props }) {
|
|
10975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10976
|
+
"nav",
|
|
10977
|
+
{
|
|
10978
|
+
"data-slot": "pagination",
|
|
10979
|
+
role: "navigation",
|
|
10980
|
+
"aria-label": "pagination",
|
|
10981
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
10982
|
+
...props
|
|
10983
|
+
}
|
|
10984
|
+
);
|
|
10985
|
+
}
|
|
10986
|
+
function PaginationContent({ className, ...props }) {
|
|
10987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10988
|
+
"ul",
|
|
10989
|
+
{
|
|
10990
|
+
"data-slot": "pagination-content",
|
|
10991
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
10992
|
+
...props
|
|
10993
|
+
}
|
|
10994
|
+
);
|
|
10995
|
+
}
|
|
10996
|
+
function PaginationItem({ ...props }) {
|
|
10997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
10998
|
+
}
|
|
10999
|
+
function PaginationLink({
|
|
11000
|
+
className,
|
|
11001
|
+
isActive,
|
|
11002
|
+
size = "icon",
|
|
11003
|
+
...props
|
|
11004
|
+
}) {
|
|
11005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Button, { asChild: true, variant: isActive ? "outline" : "ghost", size, className, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
11006
|
+
"a",
|
|
11007
|
+
{
|
|
11008
|
+
"data-slot": "pagination-link",
|
|
11009
|
+
"aria-current": isActive ? "page" : void 0,
|
|
11010
|
+
...props
|
|
11011
|
+
}
|
|
11012
|
+
) });
|
|
11013
|
+
}
|
|
11014
|
+
function PaginationPrevious({
|
|
11015
|
+
className,
|
|
11016
|
+
...props
|
|
11017
|
+
}) {
|
|
11018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
11019
|
+
PaginationLink,
|
|
11020
|
+
{
|
|
11021
|
+
"aria-label": "Go to previous page",
|
|
11022
|
+
size: "default",
|
|
11023
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
11024
|
+
...props,
|
|
11025
|
+
children: [
|
|
11026
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react25.ChevronLeftIcon, { className: "size-4" }),
|
|
11027
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "hidden sm:block", children: "Previous" })
|
|
11028
|
+
]
|
|
11029
|
+
}
|
|
11030
|
+
);
|
|
11031
|
+
}
|
|
11032
|
+
function PaginationNext({
|
|
11033
|
+
className,
|
|
11034
|
+
...props
|
|
11035
|
+
}) {
|
|
11036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
11037
|
+
PaginationLink,
|
|
11038
|
+
{
|
|
11039
|
+
"aria-label": "Go to next page",
|
|
11040
|
+
size: "default",
|
|
11041
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
11042
|
+
...props,
|
|
11043
|
+
children: [
|
|
11044
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "hidden sm:block", children: "Next" }),
|
|
11045
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react25.ChevronRightIcon, { className: "size-4" })
|
|
11046
|
+
]
|
|
11047
|
+
}
|
|
11048
|
+
);
|
|
11049
|
+
}
|
|
11050
|
+
function PaginationEllipsis({
|
|
11051
|
+
className,
|
|
11052
|
+
...props
|
|
11053
|
+
}) {
|
|
11054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
11055
|
+
"span",
|
|
11056
|
+
{
|
|
11057
|
+
"data-slot": "pagination-ellipsis",
|
|
11058
|
+
"aria-hidden": true,
|
|
11059
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
11060
|
+
...props,
|
|
11061
|
+
children: [
|
|
11062
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react25.MoreHorizontalIcon, { className: "size-4" }),
|
|
11063
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
11064
|
+
]
|
|
11065
|
+
}
|
|
11066
|
+
);
|
|
11067
|
+
}
|
|
11068
|
+
|
|
11069
|
+
// src/ui/toolbar.tsx
|
|
11070
|
+
var import_radix_ui15 = require("radix-ui");
|
|
11071
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
11072
|
+
function Toolbar({
|
|
11073
|
+
className,
|
|
11074
|
+
...props
|
|
11075
|
+
}) {
|
|
11076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11077
|
+
import_radix_ui15.Toolbar.Root,
|
|
11078
|
+
{
|
|
11079
|
+
"data-slot": "toolbar",
|
|
11080
|
+
className: cn(
|
|
11081
|
+
"flex items-center gap-1 rounded-lg border border-border bg-gradient-to-b from-elevated-from to-elevated-to p-1 shadow-card",
|
|
11082
|
+
className
|
|
11083
|
+
),
|
|
11084
|
+
...props
|
|
11085
|
+
}
|
|
11086
|
+
);
|
|
11087
|
+
}
|
|
11088
|
+
function ToolbarButton({
|
|
11089
|
+
className,
|
|
11090
|
+
...props
|
|
11091
|
+
}) {
|
|
11092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11093
|
+
import_radix_ui15.Toolbar.Button,
|
|
11094
|
+
{
|
|
11095
|
+
"data-slot": "toolbar-button",
|
|
11096
|
+
className: cn(
|
|
11097
|
+
"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",
|
|
11098
|
+
"hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50",
|
|
11099
|
+
className
|
|
11100
|
+
),
|
|
11101
|
+
...props
|
|
11102
|
+
}
|
|
11103
|
+
);
|
|
11104
|
+
}
|
|
11105
|
+
function ToolbarSeparator({
|
|
11106
|
+
className,
|
|
11107
|
+
...props
|
|
11108
|
+
}) {
|
|
11109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11110
|
+
import_radix_ui15.Toolbar.Separator,
|
|
11111
|
+
{
|
|
11112
|
+
"data-slot": "toolbar-separator",
|
|
11113
|
+
className: cn("mx-1 h-6 w-px bg-border", className),
|
|
11114
|
+
...props
|
|
11115
|
+
}
|
|
11116
|
+
);
|
|
11117
|
+
}
|
|
11118
|
+
function ToolbarToggleGroup({
|
|
11119
|
+
className,
|
|
11120
|
+
...props
|
|
11121
|
+
}) {
|
|
11122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11123
|
+
import_radix_ui15.Toolbar.ToggleGroup,
|
|
11124
|
+
{
|
|
11125
|
+
"data-slot": "toolbar-toggle-group",
|
|
11126
|
+
className: cn("flex items-center gap-0.5", className),
|
|
11127
|
+
...props
|
|
11128
|
+
}
|
|
11129
|
+
);
|
|
11130
|
+
}
|
|
11131
|
+
function ToolbarToggleItem({
|
|
11132
|
+
className,
|
|
11133
|
+
...props
|
|
11134
|
+
}) {
|
|
11135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11136
|
+
import_radix_ui15.Toolbar.ToggleItem,
|
|
11137
|
+
{
|
|
11138
|
+
"data-slot": "toolbar-toggle-item",
|
|
11139
|
+
className: cn(
|
|
11140
|
+
"inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm outline-none transition-colors",
|
|
11141
|
+
"hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
11142
|
+
"data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
11143
|
+
className
|
|
11144
|
+
),
|
|
11145
|
+
...props
|
|
11146
|
+
}
|
|
11147
|
+
);
|
|
11148
|
+
}
|
|
11149
|
+
function ToolbarLink({
|
|
11150
|
+
className,
|
|
11151
|
+
...props
|
|
11152
|
+
}) {
|
|
11153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11154
|
+
import_radix_ui15.Toolbar.Link,
|
|
11155
|
+
{
|
|
11156
|
+
"data-slot": "toolbar-link",
|
|
11157
|
+
className: cn(
|
|
11158
|
+
"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",
|
|
11159
|
+
className
|
|
11160
|
+
),
|
|
11161
|
+
...props
|
|
11162
|
+
}
|
|
11163
|
+
);
|
|
11164
|
+
}
|
|
11165
|
+
|
|
11166
|
+
// src/ui/menubar.tsx
|
|
11167
|
+
var import_radix_ui16 = require("radix-ui");
|
|
11168
|
+
var import_lucide_react26 = require("lucide-react");
|
|
11169
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
11170
|
+
function Menubar({
|
|
11171
|
+
className,
|
|
11172
|
+
...props
|
|
11173
|
+
}) {
|
|
11174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11175
|
+
import_radix_ui16.Menubar.Root,
|
|
11176
|
+
{
|
|
11177
|
+
"data-slot": "menubar",
|
|
11178
|
+
className: cn(
|
|
11179
|
+
"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",
|
|
11180
|
+
className
|
|
11181
|
+
),
|
|
11182
|
+
...props
|
|
11183
|
+
}
|
|
11184
|
+
);
|
|
11185
|
+
}
|
|
11186
|
+
function MenubarMenu({
|
|
11187
|
+
...props
|
|
11188
|
+
}) {
|
|
11189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_radix_ui16.Menubar.Menu, { "data-slot": "menubar-menu", ...props });
|
|
11190
|
+
}
|
|
11191
|
+
function MenubarTrigger({
|
|
11192
|
+
className,
|
|
11193
|
+
...props
|
|
11194
|
+
}) {
|
|
11195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11196
|
+
import_radix_ui16.Menubar.Trigger,
|
|
11197
|
+
{
|
|
11198
|
+
"data-slot": "menubar-trigger",
|
|
11199
|
+
className: cn(
|
|
11200
|
+
"flex cursor-default items-center rounded-md px-2 py-1 text-sm font-medium outline-none select-none",
|
|
11201
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
11202
|
+
className
|
|
11203
|
+
),
|
|
11204
|
+
...props
|
|
11205
|
+
}
|
|
11206
|
+
);
|
|
11207
|
+
}
|
|
11208
|
+
function MenubarContent({
|
|
11209
|
+
className,
|
|
11210
|
+
align = "start",
|
|
11211
|
+
alignOffset = -4,
|
|
11212
|
+
sideOffset = 8,
|
|
11213
|
+
...props
|
|
11214
|
+
}) {
|
|
11215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_radix_ui16.Menubar.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11216
|
+
import_radix_ui16.Menubar.Content,
|
|
11217
|
+
{
|
|
11218
|
+
"data-slot": "menubar-content",
|
|
11219
|
+
align,
|
|
11220
|
+
alignOffset,
|
|
11221
|
+
sideOffset,
|
|
11222
|
+
className: cn(
|
|
11223
|
+
overlaySurfaceClass,
|
|
11224
|
+
"min-w-[12rem] origin-[var(--radix-menubar-content-transform-origin)] overflow-hidden rounded-lg p-1",
|
|
11225
|
+
className
|
|
11226
|
+
),
|
|
11227
|
+
...props
|
|
11228
|
+
}
|
|
11229
|
+
) });
|
|
11230
|
+
}
|
|
11231
|
+
function MenubarItem({
|
|
11232
|
+
className,
|
|
11233
|
+
inset,
|
|
11234
|
+
variant = "default",
|
|
11235
|
+
...props
|
|
11236
|
+
}) {
|
|
11237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11238
|
+
import_radix_ui16.Menubar.Item,
|
|
11239
|
+
{
|
|
11240
|
+
"data-slot": "menubar-item",
|
|
11241
|
+
"data-inset": inset,
|
|
11242
|
+
"data-variant": variant,
|
|
11243
|
+
className: cn(
|
|
11244
|
+
overlayItemClass,
|
|
11245
|
+
"data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
|
|
11246
|
+
className
|
|
11247
|
+
),
|
|
11248
|
+
...props
|
|
11249
|
+
}
|
|
11250
|
+
);
|
|
11251
|
+
}
|
|
11252
|
+
function MenubarCheckboxItem({
|
|
11253
|
+
className,
|
|
11254
|
+
children,
|
|
11255
|
+
checked,
|
|
11256
|
+
...props
|
|
11257
|
+
}) {
|
|
11258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
11259
|
+
import_radix_ui16.Menubar.CheckboxItem,
|
|
11260
|
+
{
|
|
11261
|
+
"data-slot": "menubar-checkbox-item",
|
|
11262
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
11263
|
+
checked,
|
|
11264
|
+
...props,
|
|
11265
|
+
children: [
|
|
11266
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_radix_ui16.Menubar.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react26.CheckIcon, { className: "size-4" }) }) }),
|
|
11267
|
+
children
|
|
11268
|
+
]
|
|
11269
|
+
}
|
|
11270
|
+
);
|
|
11271
|
+
}
|
|
11272
|
+
function MenubarRadioGroup({
|
|
11273
|
+
...props
|
|
11274
|
+
}) {
|
|
11275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_radix_ui16.Menubar.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
11276
|
+
}
|
|
11277
|
+
function MenubarRadioItem({
|
|
11278
|
+
className,
|
|
11279
|
+
children,
|
|
11280
|
+
...props
|
|
11281
|
+
}) {
|
|
11282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
11283
|
+
import_radix_ui16.Menubar.RadioItem,
|
|
11284
|
+
{
|
|
11285
|
+
"data-slot": "menubar-radio-item",
|
|
11286
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
11287
|
+
...props,
|
|
11288
|
+
children: [
|
|
11289
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_radix_ui16.Menubar.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react26.CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
11290
|
+
children
|
|
11291
|
+
]
|
|
11292
|
+
}
|
|
11293
|
+
);
|
|
11294
|
+
}
|
|
11295
|
+
function MenubarLabel({
|
|
11296
|
+
className,
|
|
11297
|
+
inset,
|
|
11298
|
+
...props
|
|
11299
|
+
}) {
|
|
11300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11301
|
+
import_radix_ui16.Menubar.Label,
|
|
11302
|
+
{
|
|
11303
|
+
"data-slot": "menubar-label",
|
|
11304
|
+
"data-inset": inset,
|
|
11305
|
+
className: cn(
|
|
11306
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
|
|
11307
|
+
className
|
|
11308
|
+
),
|
|
11309
|
+
...props
|
|
11310
|
+
}
|
|
11311
|
+
);
|
|
11312
|
+
}
|
|
11313
|
+
function MenubarSeparator({
|
|
11314
|
+
className,
|
|
11315
|
+
...props
|
|
11316
|
+
}) {
|
|
11317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11318
|
+
import_radix_ui16.Menubar.Separator,
|
|
11319
|
+
{
|
|
11320
|
+
"data-slot": "menubar-separator",
|
|
11321
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
11322
|
+
...props
|
|
11323
|
+
}
|
|
11324
|
+
);
|
|
11325
|
+
}
|
|
11326
|
+
function MenubarShortcut({
|
|
11327
|
+
className,
|
|
11328
|
+
...props
|
|
11329
|
+
}) {
|
|
11330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11331
|
+
"span",
|
|
11332
|
+
{
|
|
11333
|
+
"data-slot": "menubar-shortcut",
|
|
11334
|
+
className: cn(
|
|
11335
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
11336
|
+
className
|
|
11337
|
+
),
|
|
11338
|
+
...props
|
|
11339
|
+
}
|
|
11340
|
+
);
|
|
11341
|
+
}
|
|
11342
|
+
function MenubarSub({
|
|
11343
|
+
...props
|
|
11344
|
+
}) {
|
|
11345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_radix_ui16.Menubar.Sub, { "data-slot": "menubar-sub", ...props });
|
|
11346
|
+
}
|
|
11347
|
+
function MenubarSubTrigger({
|
|
11348
|
+
className,
|
|
11349
|
+
inset,
|
|
11350
|
+
children,
|
|
11351
|
+
...props
|
|
11352
|
+
}) {
|
|
11353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
11354
|
+
import_radix_ui16.Menubar.SubTrigger,
|
|
11355
|
+
{
|
|
11356
|
+
"data-slot": "menubar-sub-trigger",
|
|
11357
|
+
"data-inset": inset,
|
|
11358
|
+
className: cn(
|
|
11359
|
+
overlayItemClass,
|
|
11360
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
11361
|
+
className
|
|
11362
|
+
),
|
|
11363
|
+
...props,
|
|
11364
|
+
children: [
|
|
11365
|
+
children,
|
|
11366
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react26.ChevronRightIcon, { className: "ml-auto size-4" })
|
|
11367
|
+
]
|
|
11368
|
+
}
|
|
11369
|
+
);
|
|
11370
|
+
}
|
|
11371
|
+
function MenubarSubContent({
|
|
11372
|
+
className,
|
|
11373
|
+
...props
|
|
11374
|
+
}) {
|
|
11375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11376
|
+
import_radix_ui16.Menubar.SubContent,
|
|
11377
|
+
{
|
|
11378
|
+
"data-slot": "menubar-sub-content",
|
|
11379
|
+
className: cn(
|
|
11380
|
+
overlaySurfaceClass,
|
|
11381
|
+
"min-w-[8rem] origin-[var(--radix-menubar-content-transform-origin)] overflow-hidden rounded-lg p-1",
|
|
11382
|
+
className
|
|
11383
|
+
),
|
|
11384
|
+
...props
|
|
11385
|
+
}
|
|
11386
|
+
);
|
|
11387
|
+
}
|
|
11388
|
+
|
|
11389
|
+
// src/ui/navigation-menu.tsx
|
|
11390
|
+
var import_radix_ui17 = require("radix-ui");
|
|
11391
|
+
var import_lucide_react27 = require("lucide-react");
|
|
11392
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
11393
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
11394
|
+
function NavigationMenu({
|
|
11395
|
+
className,
|
|
11396
|
+
children,
|
|
11397
|
+
viewport = true,
|
|
11398
|
+
...props
|
|
11399
|
+
}) {
|
|
11400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
11401
|
+
import_radix_ui17.NavigationMenu.Root,
|
|
11402
|
+
{
|
|
11403
|
+
"data-slot": "navigation-menu",
|
|
11404
|
+
"data-viewport": viewport,
|
|
11405
|
+
className: cn(
|
|
11406
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
11407
|
+
className
|
|
11408
|
+
),
|
|
11409
|
+
...props,
|
|
11410
|
+
children: [
|
|
11411
|
+
children,
|
|
11412
|
+
viewport ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(NavigationMenuViewport, {}) : null
|
|
11413
|
+
]
|
|
11414
|
+
}
|
|
11415
|
+
);
|
|
11416
|
+
}
|
|
11417
|
+
function NavigationMenuList({
|
|
11418
|
+
className,
|
|
11419
|
+
...props
|
|
11420
|
+
}) {
|
|
11421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
11422
|
+
import_radix_ui17.NavigationMenu.List,
|
|
11423
|
+
{
|
|
11424
|
+
"data-slot": "navigation-menu-list",
|
|
11425
|
+
className: cn(
|
|
11426
|
+
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
11427
|
+
className
|
|
11428
|
+
),
|
|
11429
|
+
...props
|
|
11430
|
+
}
|
|
11431
|
+
);
|
|
11432
|
+
}
|
|
11433
|
+
function NavigationMenuItem({
|
|
11434
|
+
...props
|
|
11435
|
+
}) {
|
|
11436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_radix_ui17.NavigationMenu.Item, { "data-slot": "navigation-menu-item", ...props });
|
|
11437
|
+
}
|
|
11438
|
+
var navigationMenuTriggerStyle = (0, import_class_variance_authority2.cva)(
|
|
11439
|
+
"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"
|
|
11440
|
+
);
|
|
11441
|
+
function NavigationMenuTrigger({
|
|
11442
|
+
className,
|
|
11443
|
+
children,
|
|
11444
|
+
...props
|
|
11445
|
+
}) {
|
|
11446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
11447
|
+
import_radix_ui17.NavigationMenu.Trigger,
|
|
11448
|
+
{
|
|
11449
|
+
"data-slot": "navigation-menu-trigger",
|
|
11450
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
11451
|
+
...props,
|
|
11452
|
+
children: [
|
|
11453
|
+
children,
|
|
11454
|
+
" ",
|
|
11455
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
11456
|
+
import_lucide_react27.ChevronDownIcon,
|
|
11457
|
+
{
|
|
11458
|
+
className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
11459
|
+
"aria-hidden": "true"
|
|
11460
|
+
}
|
|
11461
|
+
)
|
|
11462
|
+
]
|
|
11463
|
+
}
|
|
11464
|
+
);
|
|
11465
|
+
}
|
|
11466
|
+
function NavigationMenuContent({
|
|
11467
|
+
className,
|
|
11468
|
+
...props
|
|
11469
|
+
}) {
|
|
11470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
11471
|
+
import_radix_ui17.NavigationMenu.Content,
|
|
11472
|
+
{
|
|
11473
|
+
"data-slot": "navigation-menu-content",
|
|
11474
|
+
className: cn(
|
|
11475
|
+
"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",
|
|
11476
|
+
"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",
|
|
11477
|
+
className
|
|
11478
|
+
),
|
|
11479
|
+
...props
|
|
11480
|
+
}
|
|
11481
|
+
);
|
|
11482
|
+
}
|
|
11483
|
+
function NavigationMenuViewport({
|
|
11484
|
+
className,
|
|
11485
|
+
...props
|
|
11486
|
+
}) {
|
|
11487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn("absolute top-full left-0 isolate z-[80] flex justify-center"), children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
11488
|
+
import_radix_ui17.NavigationMenu.Viewport,
|
|
11489
|
+
{
|
|
11490
|
+
"data-slot": "navigation-menu-viewport",
|
|
11491
|
+
className: cn(
|
|
11492
|
+
overlaySurfaceClass,
|
|
11493
|
+
"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)]",
|
|
11494
|
+
className
|
|
11495
|
+
),
|
|
11496
|
+
...props
|
|
11497
|
+
}
|
|
11498
|
+
) });
|
|
11499
|
+
}
|
|
11500
|
+
function NavigationMenuLink({
|
|
11501
|
+
className,
|
|
11502
|
+
...props
|
|
11503
|
+
}) {
|
|
11504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
11505
|
+
import_radix_ui17.NavigationMenu.Link,
|
|
11506
|
+
{
|
|
11507
|
+
"data-slot": "navigation-menu-link",
|
|
11508
|
+
className: cn(
|
|
11509
|
+
"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",
|
|
11510
|
+
className
|
|
11511
|
+
),
|
|
11512
|
+
...props
|
|
11513
|
+
}
|
|
11514
|
+
);
|
|
11515
|
+
}
|
|
11516
|
+
function NavigationMenuIndicator({
|
|
11517
|
+
className,
|
|
11518
|
+
...props
|
|
11519
|
+
}) {
|
|
11520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
11521
|
+
import_radix_ui17.NavigationMenu.Indicator,
|
|
11522
|
+
{
|
|
11523
|
+
"data-slot": "navigation-menu-indicator",
|
|
11524
|
+
className: cn(
|
|
11525
|
+
"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",
|
|
11526
|
+
className
|
|
11527
|
+
),
|
|
11528
|
+
...props,
|
|
11529
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
11530
|
+
}
|
|
11531
|
+
);
|
|
11532
|
+
}
|
|
11533
|
+
|
|
11534
|
+
// src/ui/command.tsx
|
|
11535
|
+
var import_cmdk = require("cmdk");
|
|
11536
|
+
var import_lucide_react28 = require("lucide-react");
|
|
11537
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
11538
|
+
function Command({
|
|
11539
|
+
className,
|
|
11540
|
+
...props
|
|
11541
|
+
}) {
|
|
11542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11543
|
+
import_cmdk.Command,
|
|
11544
|
+
{
|
|
11545
|
+
"data-slot": "command",
|
|
11546
|
+
className: cn(
|
|
11547
|
+
"flex h-full w-full flex-col overflow-hidden bg-popover text-popover-foreground",
|
|
11548
|
+
className
|
|
11549
|
+
),
|
|
11550
|
+
...props
|
|
11551
|
+
}
|
|
11552
|
+
);
|
|
11553
|
+
}
|
|
11554
|
+
function CommandDialog({
|
|
11555
|
+
title = "Command palette",
|
|
11556
|
+
description = "Search for a command to run\u2026",
|
|
11557
|
+
children,
|
|
11558
|
+
className,
|
|
11559
|
+
showCloseButton = true,
|
|
11560
|
+
...props
|
|
11561
|
+
}) {
|
|
11562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Dialog, { ...props, children: [
|
|
11563
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(DialogHeader, { className: "sr-only", children: [
|
|
11564
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(DialogTitle, { children: title }),
|
|
11565
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(DialogDescription, { children: description })
|
|
11566
|
+
] }),
|
|
11567
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11568
|
+
DialogContent,
|
|
11569
|
+
{
|
|
11570
|
+
className: cn("overflow-hidden p-0", className),
|
|
11571
|
+
showCloseButton,
|
|
11572
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(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 })
|
|
11573
|
+
}
|
|
11574
|
+
)
|
|
11575
|
+
] });
|
|
11576
|
+
}
|
|
11577
|
+
function CommandInput({
|
|
11578
|
+
className,
|
|
11579
|
+
...props
|
|
11580
|
+
}) {
|
|
11581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
11582
|
+
"div",
|
|
11583
|
+
{
|
|
11584
|
+
"data-slot": "command-input-wrapper",
|
|
11585
|
+
className: "flex h-10 items-center gap-2 border-b border-border px-3",
|
|
11586
|
+
children: [
|
|
11587
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_lucide_react28.SearchIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
11588
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11589
|
+
import_cmdk.Command.Input,
|
|
11590
|
+
{
|
|
11591
|
+
"data-slot": "command-input",
|
|
11592
|
+
className: cn(
|
|
11593
|
+
"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",
|
|
11594
|
+
className
|
|
11595
|
+
),
|
|
11596
|
+
...props
|
|
11597
|
+
}
|
|
11598
|
+
)
|
|
11599
|
+
]
|
|
11600
|
+
}
|
|
11601
|
+
);
|
|
11602
|
+
}
|
|
11603
|
+
function CommandList({
|
|
11604
|
+
className,
|
|
11605
|
+
...props
|
|
11606
|
+
}) {
|
|
11607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11608
|
+
import_cmdk.Command.List,
|
|
11609
|
+
{
|
|
11610
|
+
"data-slot": "command-list",
|
|
11611
|
+
className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
11612
|
+
...props
|
|
11613
|
+
}
|
|
11614
|
+
);
|
|
11615
|
+
}
|
|
11616
|
+
function CommandEmpty({
|
|
11617
|
+
...props
|
|
11618
|
+
}) {
|
|
11619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11620
|
+
import_cmdk.Command.Empty,
|
|
11621
|
+
{
|
|
11622
|
+
"data-slot": "command-empty",
|
|
11623
|
+
className: "py-6 text-center text-sm text-muted-foreground",
|
|
11624
|
+
...props
|
|
11625
|
+
}
|
|
11626
|
+
);
|
|
11627
|
+
}
|
|
11628
|
+
function CommandGroup({
|
|
11629
|
+
className,
|
|
11630
|
+
...props
|
|
11631
|
+
}) {
|
|
11632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11633
|
+
import_cmdk.Command.Group,
|
|
11634
|
+
{
|
|
11635
|
+
"data-slot": "command-group",
|
|
11636
|
+
className: cn(
|
|
11637
|
+
"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",
|
|
11638
|
+
className
|
|
11639
|
+
),
|
|
11640
|
+
...props
|
|
11641
|
+
}
|
|
11642
|
+
);
|
|
11643
|
+
}
|
|
11644
|
+
function CommandSeparator({
|
|
11645
|
+
className,
|
|
11646
|
+
...props
|
|
11647
|
+
}) {
|
|
11648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11649
|
+
import_cmdk.Command.Separator,
|
|
11650
|
+
{
|
|
11651
|
+
"data-slot": "command-separator",
|
|
11652
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
11653
|
+
...props
|
|
11654
|
+
}
|
|
11655
|
+
);
|
|
11656
|
+
}
|
|
11657
|
+
function CommandItem({
|
|
11658
|
+
className,
|
|
11659
|
+
...props
|
|
11660
|
+
}) {
|
|
11661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11662
|
+
import_cmdk.Command.Item,
|
|
11663
|
+
{
|
|
11664
|
+
"data-slot": "command-item",
|
|
11665
|
+
className: cn(
|
|
11666
|
+
overlayItemClass,
|
|
11667
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",
|
|
11668
|
+
className
|
|
11669
|
+
),
|
|
11670
|
+
...props
|
|
11671
|
+
}
|
|
11672
|
+
);
|
|
11673
|
+
}
|
|
11674
|
+
function CommandShortcut({
|
|
11675
|
+
className,
|
|
11676
|
+
...props
|
|
11677
|
+
}) {
|
|
11678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11679
|
+
"span",
|
|
11680
|
+
{
|
|
11681
|
+
"data-slot": "command-shortcut",
|
|
11682
|
+
className: cn(
|
|
11683
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
11684
|
+
className
|
|
11685
|
+
),
|
|
11686
|
+
...props
|
|
11687
|
+
}
|
|
11688
|
+
);
|
|
11689
|
+
}
|
|
11690
|
+
|
|
11691
|
+
// src/ui/calendar.tsx
|
|
11692
|
+
var React3 = __toESM(require("react"), 1);
|
|
11693
|
+
var import_lucide_react29 = require("lucide-react");
|
|
11694
|
+
var import_react_day_picker = require("react-day-picker");
|
|
11695
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
11696
|
+
function Calendar({
|
|
11697
|
+
className,
|
|
11698
|
+
classNames,
|
|
11699
|
+
showOutsideDays = true,
|
|
11700
|
+
...props
|
|
11701
|
+
}) {
|
|
11702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
11703
|
+
import_react_day_picker.DayPicker,
|
|
11704
|
+
{
|
|
11705
|
+
showOutsideDays,
|
|
11706
|
+
className: cn("p-3", className),
|
|
11707
|
+
classNames: {
|
|
11708
|
+
months: "flex flex-col gap-4 sm:flex-row sm:gap-4",
|
|
11709
|
+
month: "flex flex-col gap-4",
|
|
11710
|
+
month_caption: "relative flex items-center justify-center pt-1",
|
|
11711
|
+
caption_label: "text-sm font-medium",
|
|
11712
|
+
nav: "flex items-center gap-1",
|
|
11713
|
+
button_previous: cn(
|
|
11714
|
+
buttonVariants({ variant: "outline" }),
|
|
11715
|
+
"absolute left-1 size-7 bg-transparent p-0 opacity-70 hover:opacity-100"
|
|
11716
|
+
),
|
|
11717
|
+
button_next: cn(
|
|
11718
|
+
buttonVariants({ variant: "outline" }),
|
|
11719
|
+
"absolute right-1 size-7 bg-transparent p-0 opacity-70 hover:opacity-100"
|
|
11720
|
+
),
|
|
11721
|
+
month_grid: "w-full border-collapse",
|
|
11722
|
+
weekdays: "flex",
|
|
11723
|
+
weekday: "w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground",
|
|
11724
|
+
week: "mt-2 flex w-full",
|
|
11725
|
+
day: cn(
|
|
11726
|
+
"relative size-9 p-0 text-center text-sm",
|
|
11727
|
+
"[&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
11728
|
+
"[&:has([aria-selected].day-outside)]:bg-accent/50",
|
|
11729
|
+
"[&:has([aria-selected])]:bg-accent",
|
|
11730
|
+
"first:[&:has([aria-selected])]:rounded-l-md",
|
|
11731
|
+
"last:[&:has([aria-selected])]:rounded-r-md",
|
|
11732
|
+
"focus-within:relative focus-within:z-10"
|
|
11733
|
+
),
|
|
11734
|
+
day_button: cn(
|
|
11735
|
+
buttonVariants({ variant: "ghost" }),
|
|
11736
|
+
"size-9 p-0 font-normal aria-selected:opacity-100"
|
|
11737
|
+
),
|
|
11738
|
+
range_start: "day-range-start rounded-l-md",
|
|
11739
|
+
range_middle: "day-range-middle aria-selected:bg-accent",
|
|
11740
|
+
range_end: "day-range-end rounded-r-md",
|
|
11741
|
+
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
11742
|
+
today: "bg-accent text-accent-foreground",
|
|
11743
|
+
outside: "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
|
|
11744
|
+
disabled: "text-muted-foreground opacity-50",
|
|
11745
|
+
hidden: "invisible",
|
|
11746
|
+
...classNames
|
|
11747
|
+
},
|
|
11748
|
+
components: {
|
|
11749
|
+
Chevron: ({ orientation, className: className2, ...chevronProps }) => {
|
|
11750
|
+
const Icon = orientation === "left" ? import_lucide_react29.ChevronLeftIcon : import_lucide_react29.ChevronRightIcon;
|
|
11751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Icon, { className: cn("size-4", className2), ...chevronProps });
|
|
11752
|
+
},
|
|
11753
|
+
DayButton: CalendarDayButton
|
|
11754
|
+
},
|
|
11755
|
+
...props
|
|
11756
|
+
}
|
|
11757
|
+
);
|
|
11758
|
+
}
|
|
11759
|
+
function CalendarDayButton({
|
|
11760
|
+
className,
|
|
11761
|
+
day,
|
|
11762
|
+
modifiers,
|
|
11763
|
+
...props
|
|
11764
|
+
}) {
|
|
11765
|
+
const ref = React3.useRef(null);
|
|
11766
|
+
React3.useEffect(() => {
|
|
11767
|
+
if (modifiers.focused) ref.current?.focus();
|
|
11768
|
+
}, [modifiers.focused]);
|
|
11769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
11770
|
+
"button",
|
|
11771
|
+
{
|
|
11772
|
+
ref,
|
|
11773
|
+
type: "button",
|
|
11774
|
+
"data-day": day.date.toLocaleDateString(),
|
|
11775
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
11776
|
+
"data-range-start": modifiers.range_start,
|
|
11777
|
+
"data-range-end": modifiers.range_end,
|
|
11778
|
+
"data-range-middle": modifiers.range_middle,
|
|
11779
|
+
className: cn(
|
|
11780
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors",
|
|
11781
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
11782
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 focus-visible:outline-none",
|
|
11783
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
11784
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground",
|
|
11785
|
+
"data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground",
|
|
11786
|
+
"data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground",
|
|
11787
|
+
"data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground",
|
|
11788
|
+
className
|
|
11789
|
+
),
|
|
11790
|
+
...props
|
|
11791
|
+
}
|
|
11792
|
+
);
|
|
11793
|
+
}
|
|
11794
|
+
|
|
11795
|
+
// src/ui/combobox.tsx
|
|
11796
|
+
var import_lucide_react30 = require("lucide-react");
|
|
11797
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
11798
|
+
function Combobox({
|
|
11799
|
+
...props
|
|
11800
|
+
}) {
|
|
11801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Popover, { "data-slot": "combobox", ...props });
|
|
11802
|
+
}
|
|
11803
|
+
function ComboboxTrigger({
|
|
11804
|
+
className,
|
|
11805
|
+
size = "default",
|
|
11806
|
+
children,
|
|
11807
|
+
...props
|
|
11808
|
+
}) {
|
|
11809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
11810
|
+
PopoverTrigger,
|
|
11811
|
+
{
|
|
11812
|
+
"data-slot": "combobox-trigger",
|
|
11813
|
+
className: cn(
|
|
11814
|
+
controlClass({ size }),
|
|
11815
|
+
"flex w-full items-center justify-between gap-2 whitespace-nowrap font-normal",
|
|
11816
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
11817
|
+
className
|
|
11818
|
+
),
|
|
11819
|
+
...props,
|
|
11820
|
+
children: [
|
|
11821
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "truncate", children }),
|
|
11822
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react30.ChevronDownIcon, { className: "size-4 shrink-0 opacity-50" })
|
|
11823
|
+
]
|
|
11824
|
+
}
|
|
11825
|
+
);
|
|
11826
|
+
}
|
|
11827
|
+
function ComboboxAnchor({
|
|
11828
|
+
...props
|
|
11829
|
+
}) {
|
|
11830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(PopoverAnchor, { "data-slot": "combobox-anchor", ...props });
|
|
11831
|
+
}
|
|
11832
|
+
function ComboboxContent({
|
|
11833
|
+
className,
|
|
11834
|
+
align = "start",
|
|
11835
|
+
...props
|
|
11836
|
+
}) {
|
|
11837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
11838
|
+
PopoverContent,
|
|
11839
|
+
{
|
|
11840
|
+
"data-slot": "combobox-content",
|
|
11841
|
+
variant: "list",
|
|
11842
|
+
align,
|
|
11843
|
+
className: cn(
|
|
11844
|
+
"w-[var(--radix-popover-trigger-width)] min-w-[8rem] p-0",
|
|
11845
|
+
className
|
|
11846
|
+
),
|
|
11847
|
+
...props
|
|
11848
|
+
}
|
|
11849
|
+
);
|
|
11850
|
+
}
|
|
11851
|
+
function ComboboxCommand({
|
|
11852
|
+
className,
|
|
11853
|
+
...props
|
|
11854
|
+
}) {
|
|
11855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
11856
|
+
Command,
|
|
11857
|
+
{
|
|
11858
|
+
"data-slot": "combobox-command",
|
|
11859
|
+
className,
|
|
11860
|
+
...props
|
|
11861
|
+
}
|
|
11862
|
+
);
|
|
11863
|
+
}
|
|
11864
|
+
function ComboboxInput({
|
|
11865
|
+
...props
|
|
11866
|
+
}) {
|
|
11867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(CommandInput, { "data-slot": "combobox-input", ...props });
|
|
11868
|
+
}
|
|
11869
|
+
function ComboboxList({
|
|
11870
|
+
...props
|
|
11871
|
+
}) {
|
|
11872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(CommandList, { "data-slot": "combobox-list", ...props });
|
|
11873
|
+
}
|
|
11874
|
+
function ComboboxEmpty({
|
|
11875
|
+
...props
|
|
11876
|
+
}) {
|
|
11877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(CommandEmpty, { "data-slot": "combobox-empty", ...props });
|
|
11878
|
+
}
|
|
11879
|
+
function ComboboxGroup({
|
|
11880
|
+
...props
|
|
11881
|
+
}) {
|
|
11882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(CommandGroup, { "data-slot": "combobox-group", ...props });
|
|
11883
|
+
}
|
|
11884
|
+
function ComboboxItem({
|
|
11885
|
+
...props
|
|
11886
|
+
}) {
|
|
11887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(CommandItem, { "data-slot": "combobox-item", ...props });
|
|
11888
|
+
}
|
|
11889
|
+
function ComboboxSeparator({
|
|
11890
|
+
...props
|
|
11891
|
+
}) {
|
|
11892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(CommandSeparator, { "data-slot": "combobox-separator", ...props });
|
|
11893
|
+
}
|
|
11894
|
+
function ComboboxShortcut({
|
|
11895
|
+
...props
|
|
11896
|
+
}) {
|
|
11897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(CommandShortcut, { "data-slot": "combobox-shortcut", ...props });
|
|
11898
|
+
}
|
|
11899
|
+
|
|
11900
|
+
// src/ui/date-picker.tsx
|
|
11901
|
+
var import_lucide_react31 = require("lucide-react");
|
|
11902
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
11903
|
+
function DatePicker({
|
|
11904
|
+
...props
|
|
11905
|
+
}) {
|
|
11906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Popover, { "data-slot": "date-picker", ...props });
|
|
11907
|
+
}
|
|
11908
|
+
function DatePickerTrigger({
|
|
11909
|
+
...props
|
|
11910
|
+
}) {
|
|
11911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(PopoverTrigger, { "data-slot": "date-picker-trigger", ...props });
|
|
11912
|
+
}
|
|
11913
|
+
function DatePickerContent({
|
|
11914
|
+
className,
|
|
11915
|
+
align = "start",
|
|
11916
|
+
...props
|
|
11917
|
+
}) {
|
|
11918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
11919
|
+
PopoverContent,
|
|
11920
|
+
{
|
|
11921
|
+
"data-slot": "date-picker-content",
|
|
11922
|
+
align,
|
|
11923
|
+
className: cn("w-auto p-0", className),
|
|
11924
|
+
...props
|
|
11925
|
+
}
|
|
11926
|
+
);
|
|
11927
|
+
}
|
|
11928
|
+
function DatePickerCalendar({
|
|
11929
|
+
className,
|
|
11930
|
+
...props
|
|
11931
|
+
}) {
|
|
11932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
11933
|
+
Calendar,
|
|
11934
|
+
{
|
|
11935
|
+
"data-slot": "date-picker-calendar",
|
|
11936
|
+
className: cn("rounded-lg border-0", className),
|
|
11937
|
+
...props
|
|
11938
|
+
}
|
|
11939
|
+
);
|
|
11940
|
+
}
|
|
11941
|
+
function formatPickerDate(date) {
|
|
11942
|
+
return date.toLocaleDateString(void 0, {
|
|
11943
|
+
month: "short",
|
|
11944
|
+
day: "numeric",
|
|
11945
|
+
year: "numeric"
|
|
11946
|
+
});
|
|
11947
|
+
}
|
|
11948
|
+
function DatePickerButton({
|
|
11949
|
+
date,
|
|
11950
|
+
placeholder = "Pick a date",
|
|
11951
|
+
className,
|
|
11952
|
+
...props
|
|
11953
|
+
}) {
|
|
11954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
11955
|
+
"button",
|
|
11956
|
+
{
|
|
11957
|
+
type: "button",
|
|
11958
|
+
"data-slot": "date-picker-button",
|
|
11959
|
+
className: cn(
|
|
11960
|
+
controlClass(),
|
|
11961
|
+
"flex w-full items-center justify-start gap-2 text-left font-normal",
|
|
11962
|
+
!date && "text-muted-foreground",
|
|
11963
|
+
className
|
|
11964
|
+
),
|
|
11965
|
+
...props,
|
|
11966
|
+
children: [
|
|
11967
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_lucide_react31.CalendarIcon, { className: "size-4 shrink-0 opacity-70" }),
|
|
11968
|
+
date ? formatPickerDate(date) : placeholder
|
|
11969
|
+
]
|
|
11970
|
+
}
|
|
11971
|
+
);
|
|
11972
|
+
}
|
|
11973
|
+
|
|
11974
|
+
// src/ui/input-otp.tsx
|
|
11975
|
+
var import_lucide_react32 = require("lucide-react");
|
|
11976
|
+
var import_radix_ui18 = require("radix-ui");
|
|
11977
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
11978
|
+
function InputOTP({
|
|
11979
|
+
className,
|
|
11980
|
+
containerClassName,
|
|
11981
|
+
children,
|
|
11982
|
+
...props
|
|
11983
|
+
}) {
|
|
11984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
11985
|
+
import_radix_ui18.unstable_OneTimePasswordField.Root,
|
|
11986
|
+
{
|
|
11987
|
+
"data-slot": "input-otp",
|
|
11988
|
+
className: cn(
|
|
11989
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
11990
|
+
containerClassName,
|
|
11991
|
+
className
|
|
11992
|
+
),
|
|
11993
|
+
...props,
|
|
11994
|
+
children
|
|
11995
|
+
}
|
|
11996
|
+
);
|
|
11997
|
+
}
|
|
11998
|
+
function InputOTPGroup({
|
|
11999
|
+
className,
|
|
12000
|
+
...props
|
|
12001
|
+
}) {
|
|
12002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
12003
|
+
"div",
|
|
12004
|
+
{
|
|
12005
|
+
"data-slot": "input-otp-group",
|
|
12006
|
+
className: cn("flex items-center", className),
|
|
12007
|
+
...props
|
|
12008
|
+
}
|
|
12009
|
+
);
|
|
12010
|
+
}
|
|
12011
|
+
function InputOTPSlot({
|
|
12012
|
+
className,
|
|
12013
|
+
...props
|
|
12014
|
+
}) {
|
|
12015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
12016
|
+
import_radix_ui18.unstable_OneTimePasswordField.Input,
|
|
12017
|
+
{
|
|
12018
|
+
"data-slot": "input-otp-slot",
|
|
12019
|
+
className: cn(
|
|
12020
|
+
controlSurfaceClass,
|
|
12021
|
+
"relative size-9 rounded-none text-center text-sm tabular-nums",
|
|
12022
|
+
"-ms-px first:ms-0 first:rounded-s-lg last:rounded-e-lg",
|
|
12023
|
+
"focus-visible:z-10",
|
|
12024
|
+
className
|
|
12025
|
+
),
|
|
12026
|
+
...props
|
|
12027
|
+
}
|
|
12028
|
+
);
|
|
12029
|
+
}
|
|
12030
|
+
function InputOTPHiddenInput({
|
|
12031
|
+
...props
|
|
12032
|
+
}) {
|
|
12033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_radix_ui18.unstable_OneTimePasswordField.HiddenInput, { "data-slot": "input-otp-hidden-input", ...props });
|
|
12034
|
+
}
|
|
12035
|
+
function InputOTPSeparator({
|
|
12036
|
+
className,
|
|
12037
|
+
...props
|
|
12038
|
+
}) {
|
|
12039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
12040
|
+
"div",
|
|
12041
|
+
{
|
|
12042
|
+
role: "separator",
|
|
12043
|
+
"data-slot": "input-otp-separator",
|
|
12044
|
+
"aria-hidden": true,
|
|
12045
|
+
className: cn("text-muted-foreground", className),
|
|
12046
|
+
...props,
|
|
12047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react32.MinusIcon, { className: "size-4" })
|
|
12048
|
+
}
|
|
12049
|
+
);
|
|
12050
|
+
}
|
|
12051
|
+
|
|
12052
|
+
// src/ui/kbd.tsx
|
|
12053
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
12054
|
+
function Kbd({ className, ...props }) {
|
|
12055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
12056
|
+
"kbd",
|
|
12057
|
+
{
|
|
12058
|
+
"data-slot": "kbd",
|
|
12059
|
+
className: cn(
|
|
12060
|
+
"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",
|
|
12061
|
+
className
|
|
12062
|
+
),
|
|
12063
|
+
...props
|
|
12064
|
+
}
|
|
12065
|
+
);
|
|
12066
|
+
}
|
|
12067
|
+
function KbdGroup({ className, ...props }) {
|
|
12068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
12069
|
+
"div",
|
|
12070
|
+
{
|
|
12071
|
+
"data-slot": "kbd-group",
|
|
12072
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
12073
|
+
...props
|
|
12074
|
+
}
|
|
12075
|
+
);
|
|
12076
|
+
}
|
|
12077
|
+
|
|
12078
|
+
// src/ui/spinner.tsx
|
|
12079
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
12080
|
+
function Spinner({
|
|
12081
|
+
className,
|
|
12082
|
+
...props
|
|
12083
|
+
}) {
|
|
12084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
12085
|
+
"svg",
|
|
12086
|
+
{
|
|
12087
|
+
"data-slot": "spinner",
|
|
12088
|
+
role: "status",
|
|
12089
|
+
"aria-label": "Loading",
|
|
12090
|
+
viewBox: "0 0 24 24",
|
|
12091
|
+
fill: "none",
|
|
12092
|
+
className: cn("size-4 animate-spin text-muted-foreground", className),
|
|
12093
|
+
...props,
|
|
12094
|
+
children: [
|
|
12095
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
12096
|
+
"circle",
|
|
12097
|
+
{
|
|
12098
|
+
className: "opacity-25",
|
|
12099
|
+
cx: "12",
|
|
12100
|
+
cy: "12",
|
|
12101
|
+
r: "10",
|
|
12102
|
+
stroke: "currentColor",
|
|
12103
|
+
strokeWidth: "3"
|
|
12104
|
+
}
|
|
12105
|
+
),
|
|
12106
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
12107
|
+
"path",
|
|
12108
|
+
{
|
|
12109
|
+
className: "opacity-75",
|
|
12110
|
+
fill: "currentColor",
|
|
12111
|
+
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"
|
|
12112
|
+
}
|
|
12113
|
+
)
|
|
12114
|
+
]
|
|
12115
|
+
}
|
|
12116
|
+
);
|
|
12117
|
+
}
|
|
12118
|
+
|
|
12119
|
+
// src/ui/input-group.tsx
|
|
12120
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
12121
|
+
function InputGroup({
|
|
12122
|
+
className,
|
|
12123
|
+
...props
|
|
12124
|
+
}) {
|
|
12125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12126
|
+
"div",
|
|
12127
|
+
{
|
|
12128
|
+
"data-slot": "input-group",
|
|
12129
|
+
className: cn(
|
|
12130
|
+
controlClass(),
|
|
12131
|
+
"flex w-full items-stretch overflow-hidden p-0",
|
|
12132
|
+
"has-[[data-slot=input-group-control]:disabled]:opacity-50",
|
|
12133
|
+
className
|
|
12134
|
+
),
|
|
12135
|
+
...props
|
|
12136
|
+
}
|
|
12137
|
+
);
|
|
12138
|
+
}
|
|
12139
|
+
function InputGroupAddon({
|
|
12140
|
+
className,
|
|
12141
|
+
align = "inline-start",
|
|
12142
|
+
...props
|
|
12143
|
+
}) {
|
|
12144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12145
|
+
"div",
|
|
12146
|
+
{
|
|
12147
|
+
"data-slot": "input-group-addon",
|
|
12148
|
+
"data-align": align,
|
|
12149
|
+
className: cn(
|
|
12150
|
+
"flex shrink-0 items-center bg-transparent px-3 text-sm text-muted-foreground",
|
|
12151
|
+
align === "inline-start" && "border-r border-border",
|
|
12152
|
+
align === "inline-end" && "border-l border-border",
|
|
12153
|
+
className
|
|
12154
|
+
),
|
|
12155
|
+
...props
|
|
12156
|
+
}
|
|
12157
|
+
);
|
|
12158
|
+
}
|
|
12159
|
+
function InputGroupInput({
|
|
12160
|
+
className,
|
|
12161
|
+
...props
|
|
12162
|
+
}) {
|
|
12163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12164
|
+
"input",
|
|
12165
|
+
{
|
|
12166
|
+
"data-slot": "input-group-control",
|
|
12167
|
+
className: cn(
|
|
12168
|
+
"min-w-0 flex-1 border-0 bg-transparent px-3 py-2 text-sm text-foreground shadow-none outline-none",
|
|
12169
|
+
"placeholder:text-muted-foreground/70 focus-visible:ring-0",
|
|
12170
|
+
className
|
|
12171
|
+
),
|
|
12172
|
+
...props
|
|
12173
|
+
}
|
|
12174
|
+
);
|
|
12175
|
+
}
|
|
12176
|
+
function InputGroupText({
|
|
12177
|
+
className,
|
|
12178
|
+
...props
|
|
12179
|
+
}) {
|
|
12180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12181
|
+
"span",
|
|
12182
|
+
{
|
|
12183
|
+
"data-slot": "input-group-text",
|
|
12184
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
12185
|
+
...props
|
|
12186
|
+
}
|
|
12187
|
+
);
|
|
12188
|
+
}
|
|
12189
|
+
|
|
12190
|
+
// src/ui/accordion.tsx
|
|
12191
|
+
var import_radix_ui19 = require("radix-ui");
|
|
12192
|
+
var import_lucide_react33 = require("lucide-react");
|
|
12193
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
12194
|
+
function Accordion({
|
|
12195
|
+
...props
|
|
12196
|
+
}) {
|
|
12197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_radix_ui19.Accordion.Root, { "data-slot": "accordion", ...props });
|
|
12198
|
+
}
|
|
12199
|
+
function AccordionItem({
|
|
12200
|
+
className,
|
|
12201
|
+
...props
|
|
12202
|
+
}) {
|
|
12203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
12204
|
+
import_radix_ui19.Accordion.Item,
|
|
12205
|
+
{
|
|
12206
|
+
"data-slot": "accordion-item",
|
|
12207
|
+
className: cn("border-b border-border last:border-b-0", className),
|
|
12208
|
+
...props
|
|
12209
|
+
}
|
|
12210
|
+
);
|
|
12211
|
+
}
|
|
12212
|
+
function AccordionTrigger({
|
|
12213
|
+
className,
|
|
12214
|
+
children,
|
|
12215
|
+
...props
|
|
12216
|
+
}) {
|
|
12217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_radix_ui19.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
12218
|
+
import_radix_ui19.Accordion.Trigger,
|
|
12219
|
+
{
|
|
12220
|
+
"data-slot": "accordion-trigger",
|
|
12221
|
+
className: cn(
|
|
12222
|
+
"flex flex-1 items-center justify-between gap-4 rounded-md py-4 text-left text-sm font-medium outline-none transition-all",
|
|
12223
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50",
|
|
12224
|
+
"hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
12225
|
+
className
|
|
12226
|
+
),
|
|
12227
|
+
...props,
|
|
12228
|
+
children: [
|
|
12229
|
+
children,
|
|
12230
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react33.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
12231
|
+
]
|
|
12232
|
+
}
|
|
12233
|
+
) });
|
|
12234
|
+
}
|
|
12235
|
+
function AccordionContent({
|
|
12236
|
+
className,
|
|
12237
|
+
children,
|
|
12238
|
+
...props
|
|
12239
|
+
}) {
|
|
12240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
12241
|
+
import_radix_ui19.Accordion.Content,
|
|
12242
|
+
{
|
|
12243
|
+
"data-slot": "accordion-content",
|
|
12244
|
+
className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
12245
|
+
...props,
|
|
12246
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: cn("pt-0 pb-4", className), children })
|
|
12247
|
+
}
|
|
12248
|
+
);
|
|
12249
|
+
}
|
|
12250
|
+
|
|
12251
|
+
// src/ui/separator.tsx
|
|
12252
|
+
var import_radix_ui20 = require("radix-ui");
|
|
12253
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
12254
|
+
function Separator({
|
|
12255
|
+
className,
|
|
12256
|
+
orientation = "horizontal",
|
|
12257
|
+
decorative = true,
|
|
12258
|
+
...props
|
|
12259
|
+
}) {
|
|
12260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
12261
|
+
import_radix_ui20.Separator.Root,
|
|
12262
|
+
{
|
|
12263
|
+
"data-slot": "separator",
|
|
12264
|
+
decorative,
|
|
12265
|
+
orientation,
|
|
12266
|
+
className: cn(
|
|
12267
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
12268
|
+
className
|
|
12269
|
+
),
|
|
12270
|
+
...props
|
|
12271
|
+
}
|
|
12272
|
+
);
|
|
12273
|
+
}
|
|
12274
|
+
|
|
12275
|
+
// src/ui/slider.tsx
|
|
12276
|
+
var React4 = __toESM(require("react"), 1);
|
|
12277
|
+
var import_radix_ui21 = require("radix-ui");
|
|
12278
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
12279
|
+
function Slider({
|
|
12280
|
+
className,
|
|
12281
|
+
defaultValue,
|
|
12282
|
+
value,
|
|
12283
|
+
min = 0,
|
|
12284
|
+
max = 100,
|
|
12285
|
+
...props
|
|
12286
|
+
}) {
|
|
12287
|
+
const thumbs = React4.useMemo(() => {
|
|
12288
|
+
if (Array.isArray(value)) return value;
|
|
12289
|
+
if (Array.isArray(defaultValue)) return defaultValue;
|
|
12290
|
+
return [min];
|
|
12291
|
+
}, [value, defaultValue, min]);
|
|
12292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
12293
|
+
import_radix_ui21.Slider.Root,
|
|
12294
|
+
{
|
|
12295
|
+
"data-slot": "slider",
|
|
12296
|
+
defaultValue,
|
|
12297
|
+
value,
|
|
12298
|
+
min,
|
|
12299
|
+
max,
|
|
12300
|
+
className: cn(
|
|
12301
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50",
|
|
12302
|
+
"data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
12303
|
+
className
|
|
12304
|
+
),
|
|
12305
|
+
...props,
|
|
12306
|
+
children: [
|
|
12307
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12308
|
+
import_radix_ui21.Slider.Track,
|
|
12309
|
+
{
|
|
12310
|
+
"data-slot": "slider-track",
|
|
12311
|
+
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",
|
|
12312
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12313
|
+
import_radix_ui21.Slider.Range,
|
|
12314
|
+
{
|
|
12315
|
+
"data-slot": "slider-range",
|
|
12316
|
+
className: "absolute bg-gradient-to-b from-primary-fill-from to-primary-fill-to data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
12317
|
+
}
|
|
12318
|
+
)
|
|
12319
|
+
}
|
|
12320
|
+
),
|
|
12321
|
+
Array.from({ length: thumbs.length }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12322
|
+
import_radix_ui21.Slider.Thumb,
|
|
12323
|
+
{
|
|
12324
|
+
"data-slot": "slider-thumb",
|
|
12325
|
+
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"
|
|
12326
|
+
},
|
|
12327
|
+
i
|
|
12328
|
+
))
|
|
12329
|
+
]
|
|
12330
|
+
}
|
|
12331
|
+
);
|
|
12332
|
+
}
|
|
12333
|
+
|
|
12334
|
+
// src/ui/progress.tsx
|
|
12335
|
+
var import_radix_ui22 = require("radix-ui");
|
|
12336
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
12337
|
+
function Progress({
|
|
12338
|
+
className,
|
|
12339
|
+
value,
|
|
12340
|
+
...props
|
|
12341
|
+
}) {
|
|
12342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12343
|
+
import_radix_ui22.Progress.Root,
|
|
12344
|
+
{
|
|
12345
|
+
"data-slot": "progress",
|
|
12346
|
+
className: cn(
|
|
12347
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-muted",
|
|
12348
|
+
className
|
|
12349
|
+
),
|
|
12350
|
+
...props,
|
|
12351
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12352
|
+
import_radix_ui22.Progress.Indicator,
|
|
12353
|
+
{
|
|
12354
|
+
"data-slot": "progress-indicator",
|
|
12355
|
+
className: "h-full w-full flex-1 bg-gradient-to-b from-primary-fill-from to-primary-fill-to transition-transform",
|
|
12356
|
+
style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
|
|
12357
|
+
}
|
|
12358
|
+
)
|
|
12359
|
+
}
|
|
12360
|
+
);
|
|
12361
|
+
}
|
|
12362
|
+
|
|
12363
|
+
// src/ui/badge.tsx
|
|
12364
|
+
var import_radix_ui23 = require("radix-ui");
|
|
12365
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
12366
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
12367
|
+
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
12368
|
+
"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",
|
|
12369
|
+
{
|
|
12370
|
+
variants: {
|
|
12371
|
+
variant: {
|
|
12372
|
+
default: "border-transparent bg-gradient-to-b from-primary-fill-from to-primary-fill-to text-primary-foreground",
|
|
12373
|
+
secondary: "border-border bg-gradient-to-b from-elevated-from to-elevated-to text-foreground shadow-card",
|
|
12374
|
+
destructive: "border-destructive/45 bg-destructive/10 text-destructive",
|
|
12375
|
+
outline: "border-border text-foreground"
|
|
12376
|
+
}
|
|
12377
|
+
},
|
|
12378
|
+
defaultVariants: {
|
|
12379
|
+
variant: "default"
|
|
12380
|
+
}
|
|
12381
|
+
}
|
|
12382
|
+
);
|
|
12383
|
+
function Badge({
|
|
12384
|
+
className,
|
|
12385
|
+
variant,
|
|
12386
|
+
asChild = false,
|
|
12387
|
+
...props
|
|
12388
|
+
}) {
|
|
12389
|
+
const Comp = asChild ? import_radix_ui23.Slot.Root : "span";
|
|
12390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
12391
|
+
Comp,
|
|
12392
|
+
{
|
|
12393
|
+
"data-slot": "badge",
|
|
12394
|
+
className: cn(badgeVariants({ variant }), className),
|
|
12395
|
+
...props
|
|
12396
|
+
}
|
|
12397
|
+
);
|
|
12398
|
+
}
|
|
12399
|
+
|
|
12400
|
+
// src/ui/sheet.tsx
|
|
12401
|
+
var import_lucide_react34 = require("lucide-react");
|
|
12402
|
+
var import_radix_ui24 = require("radix-ui");
|
|
12403
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
12404
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
12405
|
+
function Sheet({ ...props }) {
|
|
12406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_radix_ui24.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
12407
|
+
}
|
|
12408
|
+
function SheetTrigger({
|
|
12409
|
+
...props
|
|
12410
|
+
}) {
|
|
12411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_radix_ui24.Dialog.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
12412
|
+
}
|
|
12413
|
+
function SheetClose({
|
|
12414
|
+
...props
|
|
12415
|
+
}) {
|
|
12416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_radix_ui24.Dialog.Close, { "data-slot": "sheet-close", ...props });
|
|
12417
|
+
}
|
|
12418
|
+
function SheetPortal({
|
|
12419
|
+
...props
|
|
12420
|
+
}) {
|
|
12421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_radix_ui24.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
12422
|
+
}
|
|
12423
|
+
function SheetOverlay({
|
|
12424
|
+
className,
|
|
12425
|
+
...props
|
|
12426
|
+
}) {
|
|
12427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12428
|
+
import_radix_ui24.Dialog.Overlay,
|
|
12429
|
+
{
|
|
12430
|
+
"data-slot": "sheet-overlay",
|
|
12431
|
+
className: cn(
|
|
12432
|
+
"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",
|
|
12433
|
+
className
|
|
12434
|
+
),
|
|
12435
|
+
...props
|
|
12436
|
+
}
|
|
12437
|
+
);
|
|
12438
|
+
}
|
|
12439
|
+
var sheetContentVariants = (0, import_class_variance_authority4.cva)(
|
|
12440
|
+
cn(
|
|
12441
|
+
TIMBAL_V2_MODAL_SURFACE,
|
|
12442
|
+
"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"
|
|
12443
|
+
),
|
|
12444
|
+
{
|
|
12445
|
+
variants: {
|
|
12446
|
+
side: {
|
|
12447
|
+
top: "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b p-6",
|
|
12448
|
+
bottom: "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t p-6",
|
|
12449
|
+
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",
|
|
12450
|
+
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"
|
|
12451
|
+
}
|
|
12452
|
+
},
|
|
12453
|
+
defaultVariants: {
|
|
12454
|
+
side: "right"
|
|
12455
|
+
}
|
|
12456
|
+
}
|
|
12457
|
+
);
|
|
12458
|
+
function SheetContent({
|
|
12459
|
+
className,
|
|
12460
|
+
children,
|
|
12461
|
+
side = "right",
|
|
12462
|
+
showCloseButton = true,
|
|
12463
|
+
...props
|
|
12464
|
+
}) {
|
|
12465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(SheetPortal, { children: [
|
|
12466
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(SheetOverlay, {}),
|
|
12467
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
12468
|
+
import_radix_ui24.Dialog.Content,
|
|
12469
|
+
{
|
|
12470
|
+
"data-slot": "sheet-content",
|
|
12471
|
+
className: cn(sheetContentVariants({ side }), className),
|
|
12472
|
+
...props,
|
|
12473
|
+
children: [
|
|
12474
|
+
children,
|
|
12475
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_radix_ui24.Dialog.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: [
|
|
12476
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react34.XIcon, { className: "size-4" }),
|
|
12477
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "sr-only", children: "Close" })
|
|
12478
|
+
] }) : null
|
|
12479
|
+
]
|
|
12480
|
+
}
|
|
12481
|
+
)
|
|
12482
|
+
] });
|
|
12483
|
+
}
|
|
12484
|
+
function SheetHeader({ className, ...props }) {
|
|
12485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12486
|
+
"div",
|
|
12487
|
+
{
|
|
12488
|
+
"data-slot": "sheet-header",
|
|
12489
|
+
className: cn("flex flex-col gap-1.5 p-0", className),
|
|
12490
|
+
...props
|
|
12491
|
+
}
|
|
12492
|
+
);
|
|
12493
|
+
}
|
|
12494
|
+
function SheetFooter({ className, ...props }) {
|
|
12495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12496
|
+
"div",
|
|
12497
|
+
{
|
|
12498
|
+
"data-slot": "sheet-footer",
|
|
12499
|
+
className: cn("mt-auto flex flex-col gap-2 sm:flex-row sm:justify-end", className),
|
|
12500
|
+
...props
|
|
12501
|
+
}
|
|
12502
|
+
);
|
|
12503
|
+
}
|
|
12504
|
+
function SheetTitle({
|
|
12505
|
+
className,
|
|
12506
|
+
...props
|
|
12507
|
+
}) {
|
|
12508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12509
|
+
import_radix_ui24.Dialog.Title,
|
|
12510
|
+
{
|
|
12511
|
+
"data-slot": "sheet-title",
|
|
12512
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
12513
|
+
...props
|
|
12514
|
+
}
|
|
12515
|
+
);
|
|
12516
|
+
}
|
|
12517
|
+
function SheetDescription({
|
|
12518
|
+
className,
|
|
12519
|
+
...props
|
|
12520
|
+
}) {
|
|
12521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12522
|
+
import_radix_ui24.Dialog.Description,
|
|
12523
|
+
{
|
|
12524
|
+
"data-slot": "sheet-description",
|
|
12525
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
12526
|
+
...props
|
|
12527
|
+
}
|
|
12528
|
+
);
|
|
12529
|
+
}
|
|
12530
|
+
|
|
12531
|
+
// src/ui/alert-dialog.tsx
|
|
12532
|
+
var import_radix_ui25 = require("radix-ui");
|
|
12533
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
12534
|
+
function AlertDialog({
|
|
12535
|
+
...props
|
|
12536
|
+
}) {
|
|
12537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_radix_ui25.AlertDialog.Root, { "data-slot": "alert-dialog", ...props });
|
|
12538
|
+
}
|
|
12539
|
+
function AlertDialogTrigger({
|
|
12540
|
+
...props
|
|
12541
|
+
}) {
|
|
12542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_radix_ui25.AlertDialog.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
12543
|
+
}
|
|
12544
|
+
function AlertDialogPortal({
|
|
12545
|
+
...props
|
|
12546
|
+
}) {
|
|
12547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_radix_ui25.AlertDialog.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
12548
|
+
}
|
|
12549
|
+
function AlertDialogOverlay({
|
|
12550
|
+
className,
|
|
12551
|
+
...props
|
|
12552
|
+
}) {
|
|
12553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12554
|
+
import_radix_ui25.AlertDialog.Overlay,
|
|
12555
|
+
{
|
|
12556
|
+
"data-slot": "alert-dialog-overlay",
|
|
12557
|
+
className: cn(
|
|
12558
|
+
"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",
|
|
12559
|
+
className
|
|
12560
|
+
),
|
|
12561
|
+
...props
|
|
12562
|
+
}
|
|
12563
|
+
);
|
|
12564
|
+
}
|
|
12565
|
+
function AlertDialogContent({
|
|
12566
|
+
className,
|
|
12567
|
+
...props
|
|
12568
|
+
}) {
|
|
12569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(AlertDialogPortal, { children: [
|
|
12570
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(AlertDialogOverlay, {}),
|
|
12571
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12572
|
+
import_radix_ui25.AlertDialog.Content,
|
|
12573
|
+
{
|
|
12574
|
+
"data-slot": "alert-dialog-content",
|
|
12575
|
+
className: cn(
|
|
12576
|
+
TIMBAL_V2_MODAL_SURFACE,
|
|
12577
|
+
"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",
|
|
12578
|
+
className
|
|
12579
|
+
),
|
|
12580
|
+
...props
|
|
12581
|
+
}
|
|
12582
|
+
)
|
|
12583
|
+
] });
|
|
12584
|
+
}
|
|
12585
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
12586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12587
|
+
"div",
|
|
12588
|
+
{
|
|
12589
|
+
"data-slot": "alert-dialog-header",
|
|
12590
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
12591
|
+
...props
|
|
12592
|
+
}
|
|
12593
|
+
);
|
|
12594
|
+
}
|
|
12595
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
12596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12597
|
+
"div",
|
|
12598
|
+
{
|
|
12599
|
+
"data-slot": "alert-dialog-footer",
|
|
12600
|
+
className: cn(
|
|
12601
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
12602
|
+
className
|
|
12603
|
+
),
|
|
12604
|
+
...props
|
|
12605
|
+
}
|
|
12606
|
+
);
|
|
12607
|
+
}
|
|
12608
|
+
function AlertDialogTitle({
|
|
12609
|
+
className,
|
|
12610
|
+
...props
|
|
12611
|
+
}) {
|
|
12612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12613
|
+
import_radix_ui25.AlertDialog.Title,
|
|
12614
|
+
{
|
|
12615
|
+
"data-slot": "alert-dialog-title",
|
|
12616
|
+
className: cn("text-lg font-semibold", className),
|
|
12617
|
+
...props
|
|
12618
|
+
}
|
|
12619
|
+
);
|
|
12620
|
+
}
|
|
12621
|
+
function AlertDialogDescription({
|
|
12622
|
+
className,
|
|
12623
|
+
...props
|
|
12624
|
+
}) {
|
|
12625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12626
|
+
import_radix_ui25.AlertDialog.Description,
|
|
12627
|
+
{
|
|
12628
|
+
"data-slot": "alert-dialog-description",
|
|
12629
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
12630
|
+
...props
|
|
12631
|
+
}
|
|
12632
|
+
);
|
|
12633
|
+
}
|
|
12634
|
+
function AlertDialogAction({
|
|
12635
|
+
className,
|
|
12636
|
+
...props
|
|
12637
|
+
}) {
|
|
12638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12639
|
+
import_radix_ui25.AlertDialog.Action,
|
|
12640
|
+
{
|
|
12641
|
+
"data-slot": "alert-dialog-action",
|
|
12642
|
+
className,
|
|
12643
|
+
...props
|
|
12644
|
+
}
|
|
12645
|
+
) });
|
|
12646
|
+
}
|
|
12647
|
+
function AlertDialogCancel({
|
|
12648
|
+
className,
|
|
12649
|
+
...props
|
|
12650
|
+
}) {
|
|
12651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12652
|
+
import_radix_ui25.AlertDialog.Cancel,
|
|
12653
|
+
{
|
|
12654
|
+
"data-slot": "alert-dialog-cancel",
|
|
12655
|
+
className,
|
|
12656
|
+
...props
|
|
12657
|
+
}
|
|
12658
|
+
) });
|
|
12659
|
+
}
|
|
12660
|
+
|
|
12661
|
+
// src/ui/collapsible.tsx
|
|
12662
|
+
var import_radix_ui26 = require("radix-ui");
|
|
12663
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
12664
|
+
function Collapsible({
|
|
12665
|
+
...props
|
|
12666
|
+
}) {
|
|
12667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_radix_ui26.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
12668
|
+
}
|
|
12669
|
+
function CollapsibleTrigger({
|
|
12670
|
+
...props
|
|
12671
|
+
}) {
|
|
12672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_radix_ui26.Collapsible.Trigger, { "data-slot": "collapsible-trigger", ...props });
|
|
12673
|
+
}
|
|
12674
|
+
function CollapsibleContent({
|
|
12675
|
+
className,
|
|
12676
|
+
...props
|
|
12677
|
+
}) {
|
|
12678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
12679
|
+
import_radix_ui26.Collapsible.Content,
|
|
12680
|
+
{
|
|
12681
|
+
"data-slot": "collapsible-content",
|
|
12682
|
+
className: cn(
|
|
12683
|
+
"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
|
|
12684
|
+
className
|
|
12685
|
+
),
|
|
12686
|
+
...props
|
|
12687
|
+
}
|
|
12688
|
+
);
|
|
12689
|
+
}
|
|
12690
|
+
|
|
12691
|
+
// src/ui/scroll-area.tsx
|
|
12692
|
+
var import_radix_ui27 = require("radix-ui");
|
|
12693
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
12694
|
+
function ScrollArea({
|
|
12695
|
+
className,
|
|
12696
|
+
children,
|
|
12697
|
+
...props
|
|
12698
|
+
}) {
|
|
12699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
12700
|
+
import_radix_ui27.ScrollArea.Root,
|
|
12701
|
+
{
|
|
12702
|
+
"data-slot": "scroll-area",
|
|
12703
|
+
className: cn("relative overflow-hidden", className),
|
|
12704
|
+
...props,
|
|
12705
|
+
children: [
|
|
12706
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
12707
|
+
import_radix_ui27.ScrollArea.Viewport,
|
|
12708
|
+
{
|
|
12709
|
+
"data-slot": "scroll-area-viewport",
|
|
12710
|
+
className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
12711
|
+
children
|
|
12712
|
+
}
|
|
12713
|
+
),
|
|
12714
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ScrollBar, {}),
|
|
12715
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_radix_ui27.ScrollArea.Corner, {})
|
|
12716
|
+
]
|
|
12717
|
+
}
|
|
12718
|
+
);
|
|
12719
|
+
}
|
|
12720
|
+
function ScrollBar({
|
|
12721
|
+
className,
|
|
12722
|
+
orientation = "vertical",
|
|
12723
|
+
...props
|
|
12724
|
+
}) {
|
|
12725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
12726
|
+
import_radix_ui27.ScrollArea.ScrollAreaScrollbar,
|
|
12727
|
+
{
|
|
12728
|
+
"data-slot": "scroll-area-scrollbar",
|
|
12729
|
+
orientation,
|
|
12730
|
+
className: cn(
|
|
12731
|
+
"flex touch-none p-px transition-colors select-none",
|
|
12732
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
12733
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
12734
|
+
className
|
|
12735
|
+
),
|
|
12736
|
+
...props,
|
|
12737
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
12738
|
+
import_radix_ui27.ScrollArea.ScrollAreaThumb,
|
|
12739
|
+
{
|
|
12740
|
+
"data-slot": "scroll-area-thumb",
|
|
12741
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
12742
|
+
}
|
|
12743
|
+
)
|
|
12744
|
+
}
|
|
12745
|
+
);
|
|
12746
|
+
}
|
|
12747
|
+
|
|
12748
|
+
// src/ui/toggle.tsx
|
|
12749
|
+
var import_radix_ui28 = require("radix-ui");
|
|
12750
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
12751
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
12752
|
+
var toggleVariants = (0, import_class_variance_authority5.cva)(
|
|
12753
|
+
"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",
|
|
12754
|
+
{
|
|
12755
|
+
variants: {
|
|
12756
|
+
variant: {
|
|
12757
|
+
default: cn(
|
|
12758
|
+
"border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card",
|
|
12759
|
+
"hover:from-secondary-fill-hover-from hover:to-secondary-fill-hover-to",
|
|
12760
|
+
"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",
|
|
12761
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10"
|
|
12762
|
+
),
|
|
12763
|
+
outline: cn(
|
|
12764
|
+
"border border-border bg-transparent",
|
|
12765
|
+
"hover:bg-muted hover:text-foreground",
|
|
12766
|
+
"data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
12767
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10"
|
|
12768
|
+
)
|
|
12769
|
+
},
|
|
12770
|
+
size: {
|
|
12771
|
+
default: "h-10 px-3 min-w-10",
|
|
12772
|
+
sm: "h-9 px-2.5 min-w-9",
|
|
12773
|
+
lg: "h-11 px-5 min-w-11"
|
|
12774
|
+
}
|
|
12775
|
+
},
|
|
12776
|
+
defaultVariants: {
|
|
12777
|
+
variant: "default",
|
|
12778
|
+
size: "default"
|
|
12779
|
+
}
|
|
12780
|
+
}
|
|
12781
|
+
);
|
|
12782
|
+
function Toggle({
|
|
12783
|
+
className,
|
|
12784
|
+
variant,
|
|
12785
|
+
size,
|
|
12786
|
+
...props
|
|
12787
|
+
}) {
|
|
12788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
12789
|
+
import_radix_ui28.Toggle.Root,
|
|
12790
|
+
{
|
|
12791
|
+
"data-slot": "toggle",
|
|
12792
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
12793
|
+
...props
|
|
12794
|
+
}
|
|
12795
|
+
);
|
|
12796
|
+
}
|
|
12797
|
+
|
|
12798
|
+
// src/ui/toggle-group.tsx
|
|
12799
|
+
var import_radix_ui29 = require("radix-ui");
|
|
12800
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
12801
|
+
function ToggleGroup({
|
|
12802
|
+
className,
|
|
12803
|
+
...props
|
|
12804
|
+
}) {
|
|
12805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12806
|
+
import_radix_ui29.ToggleGroup.Root,
|
|
12807
|
+
{
|
|
12808
|
+
"data-slot": "toggle-group",
|
|
12809
|
+
className: cn("flex items-center gap-1", className),
|
|
12810
|
+
...props
|
|
12811
|
+
}
|
|
12812
|
+
);
|
|
12813
|
+
}
|
|
12814
|
+
function ToggleGroupItem({
|
|
12815
|
+
className,
|
|
12816
|
+
...props
|
|
12817
|
+
}) {
|
|
12818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12819
|
+
import_radix_ui29.ToggleGroup.Item,
|
|
12820
|
+
{
|
|
12821
|
+
"data-slot": "toggle-group-item",
|
|
12822
|
+
className: cn(toggleVariants({ variant: "default", size: "default" }), className),
|
|
12823
|
+
...props
|
|
12824
|
+
}
|
|
12825
|
+
);
|
|
12826
|
+
}
|
|
12827
|
+
|
|
12828
|
+
// src/ui/hover-card.tsx
|
|
12829
|
+
var import_radix_ui30 = require("radix-ui");
|
|
12830
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
12831
|
+
function HoverCard({
|
|
12832
|
+
...props
|
|
12833
|
+
}) {
|
|
12834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_radix_ui30.HoverCard.Root, { "data-slot": "hover-card", ...props });
|
|
12835
|
+
}
|
|
12836
|
+
function HoverCardTrigger({
|
|
12837
|
+
...props
|
|
12838
|
+
}) {
|
|
12839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_radix_ui30.HoverCard.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
12840
|
+
}
|
|
12841
|
+
function HoverCardContent({
|
|
12842
|
+
className,
|
|
12843
|
+
align = "center",
|
|
12844
|
+
sideOffset = 4,
|
|
12845
|
+
...props
|
|
12846
|
+
}) {
|
|
12847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_radix_ui30.HoverCard.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
12848
|
+
import_radix_ui30.HoverCard.Content,
|
|
12849
|
+
{
|
|
12850
|
+
"data-slot": "hover-card-content",
|
|
12851
|
+
align,
|
|
12852
|
+
sideOffset,
|
|
12853
|
+
className: cn(
|
|
12854
|
+
overlaySurfaceClass,
|
|
12855
|
+
"w-64 origin-[var(--radix-hover-card-content-transform-origin)] rounded-xl p-4 outline-hidden",
|
|
12856
|
+
className
|
|
12857
|
+
),
|
|
12858
|
+
...props
|
|
12859
|
+
}
|
|
12860
|
+
) });
|
|
12861
|
+
}
|
|
12862
|
+
|
|
12863
|
+
// src/ui/context-menu.tsx
|
|
12864
|
+
var import_radix_ui31 = require("radix-ui");
|
|
12865
|
+
var import_lucide_react35 = require("lucide-react");
|
|
12866
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
12867
|
+
function ContextMenu({
|
|
12868
|
+
...props
|
|
12869
|
+
}) {
|
|
12870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_radix_ui31.ContextMenu.Root, { "data-slot": "context-menu", ...props });
|
|
12871
|
+
}
|
|
12872
|
+
function ContextMenuTrigger({
|
|
12873
|
+
...props
|
|
12874
|
+
}) {
|
|
12875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_radix_ui31.ContextMenu.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
12876
|
+
}
|
|
12877
|
+
function ContextMenuGroup({
|
|
12878
|
+
...props
|
|
12879
|
+
}) {
|
|
12880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_radix_ui31.ContextMenu.Group, { "data-slot": "context-menu-group", ...props });
|
|
12881
|
+
}
|
|
12882
|
+
function ContextMenuContent({
|
|
12883
|
+
className,
|
|
12884
|
+
...props
|
|
12885
|
+
}) {
|
|
12886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_radix_ui31.ContextMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
12887
|
+
import_radix_ui31.ContextMenu.Content,
|
|
12888
|
+
{
|
|
12889
|
+
"data-slot": "context-menu-content",
|
|
12890
|
+
className: cn(
|
|
12891
|
+
overlaySurfaceClass,
|
|
12892
|
+
"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",
|
|
12893
|
+
className
|
|
12894
|
+
),
|
|
12895
|
+
...props
|
|
12896
|
+
}
|
|
12897
|
+
) });
|
|
12898
|
+
}
|
|
12899
|
+
function ContextMenuItem({
|
|
12900
|
+
className,
|
|
12901
|
+
inset,
|
|
12902
|
+
variant = "default",
|
|
12903
|
+
...props
|
|
12904
|
+
}) {
|
|
12905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
12906
|
+
import_radix_ui31.ContextMenu.Item,
|
|
12907
|
+
{
|
|
12908
|
+
"data-slot": "context-menu-item",
|
|
12909
|
+
"data-inset": inset,
|
|
12910
|
+
"data-variant": variant,
|
|
12911
|
+
className: cn(
|
|
12912
|
+
overlayItemClass,
|
|
12913
|
+
"data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
|
|
12914
|
+
className
|
|
12915
|
+
),
|
|
12916
|
+
...props
|
|
12917
|
+
}
|
|
12918
|
+
);
|
|
12919
|
+
}
|
|
12920
|
+
function ContextMenuCheckboxItem({
|
|
12921
|
+
className,
|
|
12922
|
+
children,
|
|
12923
|
+
checked,
|
|
12924
|
+
...props
|
|
12925
|
+
}) {
|
|
12926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
12927
|
+
import_radix_ui31.ContextMenu.CheckboxItem,
|
|
12928
|
+
{
|
|
12929
|
+
"data-slot": "context-menu-checkbox-item",
|
|
12930
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
12931
|
+
checked,
|
|
12932
|
+
...props,
|
|
12933
|
+
children: [
|
|
12934
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_radix_ui31.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_lucide_react35.CheckIcon, { className: "size-4" }) }) }),
|
|
12935
|
+
children
|
|
12936
|
+
]
|
|
12937
|
+
}
|
|
12938
|
+
);
|
|
12939
|
+
}
|
|
12940
|
+
function ContextMenuRadioGroup({
|
|
12941
|
+
...props
|
|
12942
|
+
}) {
|
|
12943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
12944
|
+
import_radix_ui31.ContextMenu.RadioGroup,
|
|
12945
|
+
{
|
|
12946
|
+
"data-slot": "context-menu-radio-group",
|
|
12947
|
+
...props
|
|
12948
|
+
}
|
|
12949
|
+
);
|
|
12950
|
+
}
|
|
12951
|
+
function ContextMenuRadioItem({
|
|
12952
|
+
className,
|
|
12953
|
+
children,
|
|
12954
|
+
...props
|
|
12955
|
+
}) {
|
|
12956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
12957
|
+
import_radix_ui31.ContextMenu.RadioItem,
|
|
12958
|
+
{
|
|
12959
|
+
"data-slot": "context-menu-radio-item",
|
|
12960
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
12961
|
+
...props,
|
|
12962
|
+
children: [
|
|
12963
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_radix_ui31.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_lucide_react35.CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
12964
|
+
children
|
|
12965
|
+
]
|
|
12966
|
+
}
|
|
12967
|
+
);
|
|
12968
|
+
}
|
|
12969
|
+
function ContextMenuLabel({
|
|
12970
|
+
className,
|
|
12971
|
+
inset,
|
|
12972
|
+
...props
|
|
12973
|
+
}) {
|
|
12974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
12975
|
+
import_radix_ui31.ContextMenu.Label,
|
|
12976
|
+
{
|
|
12977
|
+
"data-slot": "context-menu-label",
|
|
12978
|
+
"data-inset": inset,
|
|
12979
|
+
className: cn(
|
|
12980
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
|
|
12981
|
+
className
|
|
12982
|
+
),
|
|
12983
|
+
...props
|
|
12984
|
+
}
|
|
12985
|
+
);
|
|
12986
|
+
}
|
|
12987
|
+
function ContextMenuSeparator({
|
|
12988
|
+
className,
|
|
12989
|
+
...props
|
|
12990
|
+
}) {
|
|
12991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
12992
|
+
import_radix_ui31.ContextMenu.Separator,
|
|
12993
|
+
{
|
|
12994
|
+
"data-slot": "context-menu-separator",
|
|
12995
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
12996
|
+
...props
|
|
12997
|
+
}
|
|
12998
|
+
);
|
|
12999
|
+
}
|
|
13000
|
+
function ContextMenuShortcut({
|
|
13001
|
+
className,
|
|
13002
|
+
...props
|
|
13003
|
+
}) {
|
|
13004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
13005
|
+
"span",
|
|
13006
|
+
{
|
|
13007
|
+
"data-slot": "context-menu-shortcut",
|
|
13008
|
+
className: cn(
|
|
13009
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
13010
|
+
className
|
|
13011
|
+
),
|
|
13012
|
+
...props
|
|
13013
|
+
}
|
|
13014
|
+
);
|
|
13015
|
+
}
|
|
13016
|
+
function ContextMenuSub({
|
|
13017
|
+
...props
|
|
13018
|
+
}) {
|
|
13019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_radix_ui31.ContextMenu.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
13020
|
+
}
|
|
13021
|
+
function ContextMenuSubTrigger({
|
|
13022
|
+
className,
|
|
13023
|
+
inset,
|
|
13024
|
+
children,
|
|
13025
|
+
...props
|
|
13026
|
+
}) {
|
|
13027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
13028
|
+
import_radix_ui31.ContextMenu.SubTrigger,
|
|
13029
|
+
{
|
|
13030
|
+
"data-slot": "context-menu-sub-trigger",
|
|
13031
|
+
"data-inset": inset,
|
|
13032
|
+
className: cn(
|
|
13033
|
+
overlayItemClass,
|
|
13034
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
13035
|
+
className
|
|
13036
|
+
),
|
|
13037
|
+
...props,
|
|
13038
|
+
children: [
|
|
13039
|
+
children,
|
|
13040
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_lucide_react35.ChevronRightIcon, { className: "ml-auto size-4" })
|
|
13041
|
+
]
|
|
13042
|
+
}
|
|
13043
|
+
);
|
|
13044
|
+
}
|
|
13045
|
+
function ContextMenuSubContent({
|
|
13046
|
+
className,
|
|
13047
|
+
...props
|
|
13048
|
+
}) {
|
|
13049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
13050
|
+
import_radix_ui31.ContextMenu.SubContent,
|
|
13051
|
+
{
|
|
13052
|
+
"data-slot": "context-menu-sub-content",
|
|
13053
|
+
className: cn(
|
|
13054
|
+
overlaySurfaceClass,
|
|
13055
|
+
"min-w-[8rem] origin-[var(--radix-context-menu-content-transform-origin)] overflow-hidden rounded-lg p-1",
|
|
13056
|
+
className
|
|
13057
|
+
),
|
|
13058
|
+
...props
|
|
13059
|
+
}
|
|
13060
|
+
);
|
|
13061
|
+
}
|
|
13062
|
+
|
|
13063
|
+
// src/ui/alert.tsx
|
|
13064
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
13065
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
13066
|
+
var alertVariants = (0, import_class_variance_authority6.cva)(
|
|
13067
|
+
"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",
|
|
13068
|
+
{
|
|
13069
|
+
variants: {
|
|
13070
|
+
variant: {
|
|
13071
|
+
default: "border-border bg-gradient-to-b from-elevated-from to-elevated-to text-foreground shadow-card",
|
|
13072
|
+
destructive: "border-destructive/45 bg-destructive/10 text-destructive [&>svg]:text-destructive"
|
|
13073
|
+
}
|
|
13074
|
+
},
|
|
13075
|
+
defaultVariants: {
|
|
13076
|
+
variant: "default"
|
|
13077
|
+
}
|
|
13078
|
+
}
|
|
13079
|
+
);
|
|
13080
|
+
function Alert({
|
|
13081
|
+
className,
|
|
13082
|
+
variant,
|
|
13083
|
+
...props
|
|
13084
|
+
}) {
|
|
13085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
13086
|
+
"div",
|
|
13087
|
+
{
|
|
13088
|
+
"data-slot": "alert",
|
|
13089
|
+
role: "alert",
|
|
13090
|
+
className: cn(alertVariants({ variant }), className),
|
|
13091
|
+
...props
|
|
13092
|
+
}
|
|
13093
|
+
);
|
|
13094
|
+
}
|
|
13095
|
+
function AlertTitle({ className, ...props }) {
|
|
13096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
13097
|
+
"div",
|
|
13098
|
+
{
|
|
13099
|
+
"data-slot": "alert-title",
|
|
13100
|
+
className: cn("font-medium tracking-tight", className),
|
|
13101
|
+
...props
|
|
13102
|
+
}
|
|
13103
|
+
);
|
|
13104
|
+
}
|
|
13105
|
+
function AlertDescription({ className, ...props }) {
|
|
13106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
13107
|
+
"div",
|
|
13108
|
+
{
|
|
13109
|
+
"data-slot": "alert-description",
|
|
13110
|
+
className: cn("text-sm text-muted-foreground [&_p]:leading-relaxed", className),
|
|
13111
|
+
...props
|
|
13112
|
+
}
|
|
13113
|
+
);
|
|
13114
|
+
}
|
|
13115
|
+
|
|
13116
|
+
// src/ui/card.tsx
|
|
13117
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
13118
|
+
function Card({ className, ...props }) {
|
|
13119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
13120
|
+
"div",
|
|
13121
|
+
{
|
|
13122
|
+
"data-slot": "card",
|
|
13123
|
+
className: cn(
|
|
13124
|
+
TIMBAL_V2_ELEVATED_SURFACE,
|
|
13125
|
+
"flex flex-col gap-4 rounded-xl py-4 text-card-foreground",
|
|
13126
|
+
className
|
|
13127
|
+
),
|
|
13128
|
+
...props
|
|
13129
|
+
}
|
|
13130
|
+
);
|
|
13131
|
+
}
|
|
13132
|
+
function CardHeader({ className, ...props }) {
|
|
13133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
13134
|
+
"div",
|
|
13135
|
+
{
|
|
13136
|
+
"data-slot": "card-header",
|
|
13137
|
+
className: cn("flex flex-col gap-1.5 px-4", className),
|
|
13138
|
+
...props
|
|
13139
|
+
}
|
|
13140
|
+
);
|
|
13141
|
+
}
|
|
13142
|
+
function CardTitle({ className, ...props }) {
|
|
13143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
13144
|
+
"div",
|
|
13145
|
+
{
|
|
13146
|
+
"data-slot": "card-title",
|
|
13147
|
+
className: cn("text-base font-semibold leading-none", className),
|
|
13148
|
+
...props
|
|
13149
|
+
}
|
|
13150
|
+
);
|
|
13151
|
+
}
|
|
13152
|
+
function CardDescription({ className, ...props }) {
|
|
13153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
13154
|
+
"div",
|
|
13155
|
+
{
|
|
13156
|
+
"data-slot": "card-description",
|
|
13157
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
13158
|
+
...props
|
|
13159
|
+
}
|
|
13160
|
+
);
|
|
13161
|
+
}
|
|
13162
|
+
function CardContent({ className, ...props }) {
|
|
13163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { "data-slot": "card-content", className: cn("px-4", className), ...props });
|
|
13164
|
+
}
|
|
13165
|
+
function CardFooter({ className, ...props }) {
|
|
13166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
13167
|
+
"div",
|
|
13168
|
+
{
|
|
13169
|
+
"data-slot": "card-footer",
|
|
13170
|
+
className: cn("flex items-center px-4", className),
|
|
13171
|
+
...props
|
|
13172
|
+
}
|
|
13173
|
+
);
|
|
13174
|
+
}
|
|
13175
|
+
|
|
13176
|
+
// src/ui/skeleton.tsx
|
|
13177
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
13178
|
+
function Skeleton({ className, ...props }) {
|
|
13179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
13180
|
+
"div",
|
|
13181
|
+
{
|
|
13182
|
+
"data-slot": "skeleton",
|
|
13183
|
+
className: cn("animate-pulse rounded-lg bg-muted", className),
|
|
13184
|
+
...props
|
|
13185
|
+
}
|
|
13186
|
+
);
|
|
13187
|
+
}
|
|
13188
|
+
|
|
13189
|
+
// src/ui/table.tsx
|
|
13190
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
13191
|
+
function Table({ className, ...props }) {
|
|
13192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
13193
|
+
"table",
|
|
13194
|
+
{
|
|
13195
|
+
"data-slot": "table",
|
|
13196
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
13197
|
+
...props
|
|
13198
|
+
}
|
|
13199
|
+
) });
|
|
13200
|
+
}
|
|
13201
|
+
function TableHeader({ className, ...props }) {
|
|
13202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
13203
|
+
"thead",
|
|
13204
|
+
{
|
|
13205
|
+
"data-slot": "table-header",
|
|
13206
|
+
className: cn("[&_tr]:border-b [&_tr]:border-border", className),
|
|
13207
|
+
...props
|
|
13208
|
+
}
|
|
13209
|
+
);
|
|
13210
|
+
}
|
|
13211
|
+
function TableBody({ className, ...props }) {
|
|
13212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
13213
|
+
"tbody",
|
|
13214
|
+
{
|
|
13215
|
+
"data-slot": "table-body",
|
|
13216
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
13217
|
+
...props
|
|
13218
|
+
}
|
|
13219
|
+
);
|
|
13220
|
+
}
|
|
13221
|
+
function TableFooter({ className, ...props }) {
|
|
13222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
13223
|
+
"tfoot",
|
|
13224
|
+
{
|
|
13225
|
+
"data-slot": "table-footer",
|
|
13226
|
+
className: cn(
|
|
13227
|
+
"border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
13228
|
+
className
|
|
13229
|
+
),
|
|
13230
|
+
...props
|
|
13231
|
+
}
|
|
13232
|
+
);
|
|
13233
|
+
}
|
|
13234
|
+
function TableRow({ className, ...props }) {
|
|
13235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
13236
|
+
"tr",
|
|
13237
|
+
{
|
|
13238
|
+
"data-slot": "table-row",
|
|
13239
|
+
className: cn(
|
|
13240
|
+
"border-b border-border transition-colors hover:bg-muted/40 data-[state=selected]:bg-muted",
|
|
13241
|
+
className
|
|
13242
|
+
),
|
|
13243
|
+
...props
|
|
13244
|
+
}
|
|
13245
|
+
);
|
|
13246
|
+
}
|
|
13247
|
+
function TableHead({ className, ...props }) {
|
|
13248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
13249
|
+
"th",
|
|
13250
|
+
{
|
|
13251
|
+
"data-slot": "table-head",
|
|
13252
|
+
className: cn(
|
|
13253
|
+
"h-10 px-3 text-left align-middle text-xs font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
13254
|
+
className
|
|
13255
|
+
),
|
|
13256
|
+
...props
|
|
13257
|
+
}
|
|
13258
|
+
);
|
|
13259
|
+
}
|
|
13260
|
+
function TableCell({ className, ...props }) {
|
|
13261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
13262
|
+
"td",
|
|
13263
|
+
{
|
|
13264
|
+
"data-slot": "table-cell",
|
|
13265
|
+
className: cn(
|
|
13266
|
+
"p-3 align-middle text-sm [&:has([role=checkbox])]:pr-0",
|
|
13267
|
+
className
|
|
13268
|
+
),
|
|
13269
|
+
...props
|
|
13270
|
+
}
|
|
13271
|
+
);
|
|
13272
|
+
}
|
|
13273
|
+
function TableCaption({ className, ...props }) {
|
|
13274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
13275
|
+
"caption",
|
|
13276
|
+
{
|
|
13277
|
+
"data-slot": "table-caption",
|
|
13278
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
13279
|
+
...props
|
|
13280
|
+
}
|
|
13281
|
+
);
|
|
13282
|
+
}
|
|
13283
|
+
|
|
13284
|
+
// src/ui/toast.tsx
|
|
13285
|
+
var import_radix_ui32 = require("radix-ui");
|
|
13286
|
+
var import_lucide_react36 = require("lucide-react");
|
|
13287
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
13288
|
+
function ToastProvider({
|
|
13289
|
+
...props
|
|
13290
|
+
}) {
|
|
13291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_radix_ui32.Toast.Provider, { "data-slot": "toast-provider", ...props });
|
|
13292
|
+
}
|
|
13293
|
+
function ToastViewport({
|
|
13294
|
+
className,
|
|
13295
|
+
...props
|
|
13296
|
+
}) {
|
|
13297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
13298
|
+
import_radix_ui32.Toast.Viewport,
|
|
13299
|
+
{
|
|
13300
|
+
"data-slot": "toast-viewport",
|
|
13301
|
+
className: cn(
|
|
13302
|
+
"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",
|
|
13303
|
+
className
|
|
13304
|
+
),
|
|
13305
|
+
...props
|
|
13306
|
+
}
|
|
13307
|
+
);
|
|
13308
|
+
}
|
|
13309
|
+
function Toast({
|
|
13310
|
+
className,
|
|
13311
|
+
variant = "default",
|
|
13312
|
+
...props
|
|
13313
|
+
}) {
|
|
13314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
13315
|
+
import_radix_ui32.Toast.Root,
|
|
13316
|
+
{
|
|
13317
|
+
"data-slot": "toast",
|
|
13318
|
+
className: cn(
|
|
13319
|
+
TIMBAL_V2_ELEVATED_SURFACE,
|
|
13320
|
+
"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",
|
|
13321
|
+
"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",
|
|
13322
|
+
variant === "destructive" && "border-destructive/45 bg-destructive/10 text-destructive",
|
|
13323
|
+
className
|
|
13324
|
+
),
|
|
13325
|
+
...props
|
|
13326
|
+
}
|
|
13327
|
+
);
|
|
13328
|
+
}
|
|
13329
|
+
function ToastAction({
|
|
13330
|
+
className,
|
|
13331
|
+
...props
|
|
13332
|
+
}) {
|
|
13333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
13334
|
+
import_radix_ui32.Toast.Action,
|
|
13335
|
+
{
|
|
13336
|
+
"data-slot": "toast-action",
|
|
13337
|
+
className: cn(
|
|
13338
|
+
"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",
|
|
13339
|
+
className
|
|
13340
|
+
),
|
|
13341
|
+
...props
|
|
13342
|
+
}
|
|
13343
|
+
);
|
|
13344
|
+
}
|
|
13345
|
+
function ToastClose({
|
|
13346
|
+
className,
|
|
13347
|
+
...props
|
|
13348
|
+
}) {
|
|
13349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
13350
|
+
import_radix_ui32.Toast.Close,
|
|
13351
|
+
{
|
|
13352
|
+
"data-slot": "toast-close",
|
|
13353
|
+
className: cn(
|
|
13354
|
+
"absolute top-3 right-3 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-foreground/10 focus:outline-hidden",
|
|
13355
|
+
className
|
|
13356
|
+
),
|
|
13357
|
+
"toast-close": "",
|
|
13358
|
+
...props,
|
|
13359
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react36.XIcon, { className: "size-4" })
|
|
13360
|
+
}
|
|
13361
|
+
);
|
|
13362
|
+
}
|
|
13363
|
+
function ToastTitle({
|
|
13364
|
+
className,
|
|
13365
|
+
...props
|
|
13366
|
+
}) {
|
|
13367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
13368
|
+
import_radix_ui32.Toast.Title,
|
|
13369
|
+
{
|
|
13370
|
+
"data-slot": "toast-title",
|
|
13371
|
+
className: cn("text-sm font-medium", className),
|
|
13372
|
+
...props
|
|
13373
|
+
}
|
|
13374
|
+
);
|
|
13375
|
+
}
|
|
13376
|
+
function ToastDescription({
|
|
13377
|
+
className,
|
|
13378
|
+
...props
|
|
13379
|
+
}) {
|
|
13380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
13381
|
+
import_radix_ui32.Toast.Description,
|
|
13382
|
+
{
|
|
13383
|
+
"data-slot": "toast-description",
|
|
13384
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
13385
|
+
...props
|
|
13386
|
+
}
|
|
13387
|
+
);
|
|
13388
|
+
}
|
|
13389
|
+
|
|
13390
|
+
// src/ui/use-toast.ts
|
|
13391
|
+
var React5 = __toESM(require("react"), 1);
|
|
13392
|
+
var TOAST_LIMIT = 3;
|
|
13393
|
+
var TOAST_REMOVE_DELAY = 5e3;
|
|
13394
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
13395
|
+
var memoryState = {
|
|
13396
|
+
toasts: [],
|
|
13397
|
+
add: () => "",
|
|
13398
|
+
dismiss: () => {
|
|
13399
|
+
},
|
|
13400
|
+
remove: () => {
|
|
13401
|
+
}
|
|
13402
|
+
};
|
|
13403
|
+
function dispatch(partial) {
|
|
13404
|
+
memoryState = { ...memoryState, ...partial };
|
|
13405
|
+
for (const listener of listeners) listener(memoryState);
|
|
13406
|
+
}
|
|
13407
|
+
function genId() {
|
|
13408
|
+
return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
13409
|
+
}
|
|
13410
|
+
var removeTimeouts = /* @__PURE__ */ new Map();
|
|
13411
|
+
function scheduleRemove(id, delay = TOAST_REMOVE_DELAY) {
|
|
13412
|
+
if (removeTimeouts.has(id)) return;
|
|
13413
|
+
const timeout = setTimeout(() => {
|
|
13414
|
+
removeTimeouts.delete(id);
|
|
13415
|
+
dispatch({
|
|
13416
|
+
toasts: memoryState.toasts.filter((t) => t.id !== id)
|
|
13417
|
+
});
|
|
13418
|
+
}, delay);
|
|
13419
|
+
removeTimeouts.set(id, timeout);
|
|
13420
|
+
}
|
|
13421
|
+
function addToast(toastInput) {
|
|
13422
|
+
const id = genId();
|
|
13423
|
+
dispatch({
|
|
13424
|
+
toasts: [{ ...toastInput, id }, ...memoryState.toasts].slice(0, TOAST_LIMIT)
|
|
13425
|
+
});
|
|
13426
|
+
scheduleRemove(id, toastInput.duration ?? TOAST_REMOVE_DELAY);
|
|
13427
|
+
return id;
|
|
13428
|
+
}
|
|
13429
|
+
function dismissToast(id) {
|
|
13430
|
+
scheduleRemove(id, 300);
|
|
13431
|
+
}
|
|
13432
|
+
memoryState = {
|
|
13433
|
+
toasts: [],
|
|
13434
|
+
add: addToast,
|
|
13435
|
+
dismiss: dismissToast,
|
|
13436
|
+
remove: (id) => {
|
|
13437
|
+
dispatch({ toasts: memoryState.toasts.filter((t) => t.id !== id) });
|
|
13438
|
+
}
|
|
13439
|
+
};
|
|
13440
|
+
function toast(input) {
|
|
13441
|
+
return memoryState.add(input);
|
|
13442
|
+
}
|
|
13443
|
+
function useToast() {
|
|
13444
|
+
const [state, setState] = React5.useState(memoryState);
|
|
13445
|
+
React5.useEffect(() => {
|
|
13446
|
+
listeners.add(setState);
|
|
13447
|
+
return () => {
|
|
13448
|
+
listeners.delete(setState);
|
|
13449
|
+
};
|
|
13450
|
+
}, []);
|
|
13451
|
+
return {
|
|
13452
|
+
toasts: state.toasts,
|
|
13453
|
+
toast,
|
|
13454
|
+
dismiss: state.dismiss
|
|
13455
|
+
};
|
|
13456
|
+
}
|
|
13457
|
+
|
|
13458
|
+
// src/ui/toaster.tsx
|
|
13459
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
13460
|
+
function Toaster() {
|
|
13461
|
+
const { toasts, dismiss } = useToast();
|
|
13462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(ToastProvider, { children: [
|
|
13463
|
+
toasts.map(({ id, title, description, variant }) => /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
13464
|
+
Toast,
|
|
13465
|
+
{
|
|
13466
|
+
variant,
|
|
13467
|
+
onOpenChange: (open) => !open && dismiss(id),
|
|
13468
|
+
children: [
|
|
13469
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "grid gap-1", children: [
|
|
13470
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToastTitle, { children: title }) : null,
|
|
13471
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToastDescription, { children: description }) : null
|
|
13472
|
+
] }),
|
|
13473
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToastClose, {})
|
|
13474
|
+
]
|
|
13475
|
+
},
|
|
13476
|
+
id
|
|
13477
|
+
)),
|
|
13478
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToastViewport, {})
|
|
13479
|
+
] });
|
|
13480
|
+
}
|
|
9800
13481
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9801
13482
|
0 && (module.exports = {
|
|
9802
13483
|
APP_KIT_AGENT_INSTRUCTIONS,
|
|
9803
13484
|
ARTIFACT_AGENT_INSTRUCTIONS,
|
|
9804
13485
|
ARTIFACT_FENCE_LANGUAGES,
|
|
13486
|
+
Accordion,
|
|
13487
|
+
AccordionContent,
|
|
13488
|
+
AccordionItem,
|
|
13489
|
+
AccordionTrigger,
|
|
9805
13490
|
ActionBarPrimitive,
|
|
13491
|
+
Alert,
|
|
13492
|
+
AlertDescription,
|
|
13493
|
+
AlertDialog,
|
|
13494
|
+
AlertDialogAction,
|
|
13495
|
+
AlertDialogCancel,
|
|
13496
|
+
AlertDialogContent,
|
|
13497
|
+
AlertDialogDescription,
|
|
13498
|
+
AlertDialogFooter,
|
|
13499
|
+
AlertDialogHeader,
|
|
13500
|
+
AlertDialogOverlay,
|
|
13501
|
+
AlertDialogPortal,
|
|
13502
|
+
AlertDialogTitle,
|
|
13503
|
+
AlertDialogTrigger,
|
|
13504
|
+
AlertTitle,
|
|
9806
13505
|
AppChatPanel,
|
|
9807
13506
|
AppConfirmDialog,
|
|
9808
13507
|
AppCopilotProvider,
|
|
@@ -9812,25 +13511,88 @@ function SelectScrollDownButton({
|
|
|
9812
13511
|
ArtifactCard,
|
|
9813
13512
|
ArtifactRegistryProvider,
|
|
9814
13513
|
ArtifactView,
|
|
13514
|
+
AspectRatio,
|
|
9815
13515
|
AssistantRuntimeProvider,
|
|
9816
13516
|
AuiIf,
|
|
9817
13517
|
AuthGuard,
|
|
9818
13518
|
Avatar,
|
|
9819
13519
|
AvatarFallback,
|
|
9820
13520
|
AvatarImage,
|
|
13521
|
+
Badge,
|
|
13522
|
+
Breadcrumb,
|
|
13523
|
+
BreadcrumbEllipsis,
|
|
13524
|
+
BreadcrumbItem,
|
|
13525
|
+
BreadcrumbLink,
|
|
13526
|
+
BreadcrumbList,
|
|
13527
|
+
BreadcrumbPage,
|
|
13528
|
+
BreadcrumbSeparator,
|
|
9821
13529
|
Breadcrumbs,
|
|
9822
13530
|
Button,
|
|
9823
13531
|
CHART_PALETTE,
|
|
13532
|
+
COLOR_UTILITY_PREFIXES,
|
|
13533
|
+
CONTROL_SIZE,
|
|
13534
|
+
Calendar,
|
|
13535
|
+
CalendarDayButton,
|
|
13536
|
+
Card,
|
|
13537
|
+
CardContent,
|
|
13538
|
+
CardDescription,
|
|
13539
|
+
CardFooter,
|
|
13540
|
+
CardHeader,
|
|
13541
|
+
CardTitle,
|
|
9824
13542
|
ChartArtifactView,
|
|
9825
13543
|
ChartPanel,
|
|
13544
|
+
Checkbox,
|
|
13545
|
+
Collapsible,
|
|
13546
|
+
CollapsibleContent,
|
|
13547
|
+
CollapsibleTrigger,
|
|
13548
|
+
Combobox,
|
|
13549
|
+
ComboboxAnchor,
|
|
13550
|
+
ComboboxCommand,
|
|
13551
|
+
ComboboxContent,
|
|
13552
|
+
ComboboxEmpty,
|
|
13553
|
+
ComboboxGroup,
|
|
13554
|
+
ComboboxInput,
|
|
13555
|
+
ComboboxItem,
|
|
13556
|
+
ComboboxList,
|
|
13557
|
+
ComboboxSeparator,
|
|
13558
|
+
ComboboxShortcut,
|
|
13559
|
+
ComboboxTrigger,
|
|
13560
|
+
Command,
|
|
13561
|
+
CommandDialog,
|
|
13562
|
+
CommandEmpty,
|
|
13563
|
+
CommandGroup,
|
|
13564
|
+
CommandInput,
|
|
13565
|
+
CommandItem,
|
|
13566
|
+
CommandList,
|
|
13567
|
+
CommandSeparator,
|
|
13568
|
+
CommandShortcut,
|
|
9826
13569
|
Composer,
|
|
9827
13570
|
ComposerPrimitive,
|
|
9828
13571
|
ConnectionRow,
|
|
9829
13572
|
ConnectionRowList,
|
|
13573
|
+
ContextMenu,
|
|
13574
|
+
ContextMenuCheckboxItem,
|
|
13575
|
+
ContextMenuContent,
|
|
13576
|
+
ContextMenuGroup,
|
|
13577
|
+
ContextMenuItem,
|
|
13578
|
+
ContextMenuLabel,
|
|
13579
|
+
ContextMenuRadioGroup,
|
|
13580
|
+
ContextMenuRadioItem,
|
|
13581
|
+
ContextMenuSeparator,
|
|
13582
|
+
ContextMenuShortcut,
|
|
13583
|
+
ContextMenuSub,
|
|
13584
|
+
ContextMenuSubContent,
|
|
13585
|
+
ContextMenuSubTrigger,
|
|
13586
|
+
ContextMenuTrigger,
|
|
9830
13587
|
DEFAULT_UPLOAD_ACCEPT,
|
|
9831
13588
|
DangerZone,
|
|
9832
13589
|
DangerZoneAction,
|
|
9833
13590
|
DataTable,
|
|
13591
|
+
DatePicker,
|
|
13592
|
+
DatePickerButton,
|
|
13593
|
+
DatePickerCalendar,
|
|
13594
|
+
DatePickerContent,
|
|
13595
|
+
DatePickerTrigger,
|
|
9834
13596
|
DescriptionList,
|
|
9835
13597
|
Dialog,
|
|
9836
13598
|
DialogClose,
|
|
@@ -9866,32 +13628,93 @@ function SelectScrollDownButton({
|
|
|
9866
13628
|
FieldTextarea,
|
|
9867
13629
|
FilterBar,
|
|
9868
13630
|
FloatingUnsavedChangesBar,
|
|
13631
|
+
Form,
|
|
13632
|
+
FormControl,
|
|
13633
|
+
FormField,
|
|
13634
|
+
FormItem,
|
|
13635
|
+
FormLabel,
|
|
13636
|
+
FormMessage,
|
|
9869
13637
|
FormSection,
|
|
13638
|
+
FormSubmit,
|
|
13639
|
+
HOUSE_RULES,
|
|
13640
|
+
HoverCard,
|
|
13641
|
+
HoverCardContent,
|
|
13642
|
+
HoverCardTrigger,
|
|
9870
13643
|
HtmlArtifactView,
|
|
9871
13644
|
INTEGRATION_CATALOG_CARD_HEIGHT_CLASS,
|
|
9872
13645
|
InfoCard,
|
|
13646
|
+
Input,
|
|
13647
|
+
InputGroup,
|
|
13648
|
+
InputGroupAddon,
|
|
13649
|
+
InputGroupInput,
|
|
13650
|
+
InputGroupText,
|
|
13651
|
+
InputOTP,
|
|
13652
|
+
InputOTPGroup,
|
|
13653
|
+
InputOTPHiddenInput,
|
|
13654
|
+
InputOTPSeparator,
|
|
13655
|
+
InputOTPSlot,
|
|
9873
13656
|
IntegrationCard,
|
|
9874
13657
|
IntegrationsEmptyState,
|
|
9875
13658
|
JsonArtifactView,
|
|
13659
|
+
Kbd,
|
|
13660
|
+
KbdGroup,
|
|
13661
|
+
Label,
|
|
9876
13662
|
LineAreaChart,
|
|
9877
13663
|
MarkdownText,
|
|
9878
13664
|
MemoPillSegmentedTabs,
|
|
13665
|
+
Menubar,
|
|
13666
|
+
MenubarCheckboxItem,
|
|
13667
|
+
MenubarContent,
|
|
13668
|
+
MenubarItem,
|
|
13669
|
+
MenubarLabel,
|
|
13670
|
+
MenubarMenu,
|
|
13671
|
+
MenubarRadioGroup,
|
|
13672
|
+
MenubarRadioItem,
|
|
13673
|
+
MenubarSeparator,
|
|
13674
|
+
MenubarShortcut,
|
|
13675
|
+
MenubarSub,
|
|
13676
|
+
MenubarSubContent,
|
|
13677
|
+
MenubarSubTrigger,
|
|
13678
|
+
MenubarTrigger,
|
|
9879
13679
|
MessagePrimitive,
|
|
9880
13680
|
MetricChartCard,
|
|
9881
13681
|
MetricRow,
|
|
9882
13682
|
MetricTile,
|
|
9883
13683
|
ModeToggle,
|
|
13684
|
+
NavigationMenu,
|
|
13685
|
+
NavigationMenuContent,
|
|
13686
|
+
NavigationMenuIndicator,
|
|
13687
|
+
NavigationMenuItem,
|
|
13688
|
+
NavigationMenuLink,
|
|
13689
|
+
NavigationMenuList,
|
|
13690
|
+
NavigationMenuTrigger,
|
|
13691
|
+
NavigationMenuViewport,
|
|
9884
13692
|
Page,
|
|
9885
13693
|
PageHeader,
|
|
13694
|
+
Pagination,
|
|
13695
|
+
PaginationContent,
|
|
13696
|
+
PaginationEllipsis,
|
|
13697
|
+
PaginationItem,
|
|
13698
|
+
PaginationLink,
|
|
13699
|
+
PaginationNext,
|
|
13700
|
+
PaginationPrevious,
|
|
9886
13701
|
PillSegmentedTabs,
|
|
9887
13702
|
PlanBadge,
|
|
9888
13703
|
Popover,
|
|
9889
13704
|
PopoverAnchor,
|
|
9890
13705
|
PopoverContent,
|
|
9891
13706
|
PopoverTrigger,
|
|
13707
|
+
Progress,
|
|
9892
13708
|
QuestionArtifactView,
|
|
13709
|
+
RESERVED_GRADIENT_TOKENS,
|
|
13710
|
+
RadioGroup,
|
|
13711
|
+
RadioGroupItem,
|
|
9893
13712
|
ResourceCard,
|
|
13713
|
+
SEMANTIC_COLOR_TOKENS,
|
|
13714
|
+
SLOP_BUDGETS,
|
|
9894
13715
|
STUDIO_NAV_MODE,
|
|
13716
|
+
ScrollArea,
|
|
13717
|
+
ScrollBar,
|
|
9895
13718
|
SearchInput,
|
|
9896
13719
|
Section,
|
|
9897
13720
|
Select,
|
|
@@ -9904,11 +13727,23 @@ function SelectScrollDownButton({
|
|
|
9904
13727
|
SelectSeparator,
|
|
9905
13728
|
SelectTrigger,
|
|
9906
13729
|
SelectValue,
|
|
13730
|
+
Separator,
|
|
9907
13731
|
SessionProvider,
|
|
9908
13732
|
SettingsSection,
|
|
9909
13733
|
SettingsSectionHeader,
|
|
13734
|
+
Sheet,
|
|
13735
|
+
SheetClose,
|
|
13736
|
+
SheetContent,
|
|
13737
|
+
SheetDescription,
|
|
13738
|
+
SheetFooter,
|
|
13739
|
+
SheetHeader,
|
|
13740
|
+
SheetTitle,
|
|
13741
|
+
SheetTrigger,
|
|
9910
13742
|
Shimmer,
|
|
13743
|
+
Skeleton,
|
|
13744
|
+
Slider,
|
|
9911
13745
|
Sparkline,
|
|
13746
|
+
Spinner,
|
|
9912
13747
|
StatTile,
|
|
9913
13748
|
StatusBadge,
|
|
9914
13749
|
StatusDot,
|
|
@@ -9918,10 +13753,21 @@ function SelectScrollDownButton({
|
|
|
9918
13753
|
SubNav,
|
|
9919
13754
|
Suggestions,
|
|
9920
13755
|
SurfaceCard,
|
|
13756
|
+
Switch,
|
|
13757
|
+
TAILWIND_PALETTE_COLORS,
|
|
9921
13758
|
THEME_AGENT_INSTRUCTIONS,
|
|
9922
13759
|
THREAD_DEFAULT_MAX_WIDTH,
|
|
9923
13760
|
TIMBAL_THEME_PRESETS,
|
|
13761
|
+
Table,
|
|
9924
13762
|
TableArtifactView,
|
|
13763
|
+
TableBody,
|
|
13764
|
+
TableCaption,
|
|
13765
|
+
TableCell,
|
|
13766
|
+
TableFooter,
|
|
13767
|
+
TableHead,
|
|
13768
|
+
TableHeader,
|
|
13769
|
+
TableRow,
|
|
13770
|
+
Textarea,
|
|
9925
13771
|
ThemePresetGallery,
|
|
9926
13772
|
Thread,
|
|
9927
13773
|
ThreadPrimitive,
|
|
@@ -9931,33 +13777,58 @@ function SelectScrollDownButton({
|
|
|
9931
13777
|
TimbalRuntimeProvider,
|
|
9932
13778
|
TimbalStudioShell,
|
|
9933
13779
|
TimbalThemeStyle,
|
|
13780
|
+
Toast,
|
|
13781
|
+
ToastAction,
|
|
13782
|
+
ToastClose,
|
|
13783
|
+
ToastDescription,
|
|
13784
|
+
ToastProvider,
|
|
13785
|
+
ToastTitle,
|
|
13786
|
+
ToastViewport,
|
|
13787
|
+
Toaster,
|
|
13788
|
+
Toggle,
|
|
13789
|
+
ToggleGroup,
|
|
13790
|
+
ToggleGroupItem,
|
|
9934
13791
|
ToolArtifactFallback,
|
|
9935
13792
|
ToolFallback,
|
|
13793
|
+
Toolbar,
|
|
13794
|
+
ToolbarButton,
|
|
13795
|
+
ToolbarLink,
|
|
13796
|
+
ToolbarSeparator,
|
|
13797
|
+
ToolbarToggleGroup,
|
|
13798
|
+
ToolbarToggleItem,
|
|
9936
13799
|
Tooltip,
|
|
9937
13800
|
TooltipContent,
|
|
9938
13801
|
TooltipIconButton,
|
|
9939
13802
|
TooltipProvider,
|
|
9940
13803
|
TooltipTrigger,
|
|
13804
|
+
UI_REVIEW_AGENT_INSTRUCTIONS,
|
|
9941
13805
|
UiArtifactView,
|
|
9942
13806
|
UiCustomNodeRegistryProvider,
|
|
9943
13807
|
UiEventProvider,
|
|
9944
13808
|
UiNodeView,
|
|
9945
13809
|
WorkforceSelector,
|
|
13810
|
+
alertVariants,
|
|
9946
13811
|
applyThemePreset,
|
|
9947
13812
|
applyTimbalTheme,
|
|
9948
13813
|
assistantMessageContentClass,
|
|
9949
13814
|
assistantMessageRootClass,
|
|
9950
13815
|
authFetch,
|
|
13816
|
+
badgeVariants,
|
|
9951
13817
|
clearTimbalTheme,
|
|
9952
13818
|
clearTokens,
|
|
9953
13819
|
cn,
|
|
9954
13820
|
connectionRowListClass,
|
|
13821
|
+
controlClass,
|
|
13822
|
+
controlSurfaceClass,
|
|
9955
13823
|
createDefaultAttachmentAdapter,
|
|
9956
13824
|
createTimbalTheme,
|
|
9957
13825
|
createUploadAttachmentAdapter,
|
|
9958
13826
|
defaultArtifactRenderers,
|
|
13827
|
+
ensureThemeFontLink,
|
|
9959
13828
|
fetchCurrentUser,
|
|
9960
13829
|
findMarkdownArtifacts,
|
|
13830
|
+
formatLintReport,
|
|
13831
|
+
formatPickerDate,
|
|
9961
13832
|
getAccessToken,
|
|
9962
13833
|
getPath,
|
|
9963
13834
|
getRefreshToken,
|
|
@@ -9966,17 +13837,26 @@ function SelectScrollDownButton({
|
|
|
9966
13837
|
isArtifact,
|
|
9967
13838
|
isArtifactFenceLanguage,
|
|
9968
13839
|
isUiBinding,
|
|
13840
|
+
lintGeneratedUi,
|
|
13841
|
+
navigationMenuTriggerStyle,
|
|
13842
|
+
overlayAnimationClass,
|
|
13843
|
+
overlayItemClass,
|
|
13844
|
+
overlayListPanelClass,
|
|
13845
|
+
overlaySurfaceClass,
|
|
9969
13846
|
parseArtifactFromToolResult,
|
|
9970
13847
|
parseSSELine,
|
|
9971
13848
|
refreshAccessToken,
|
|
9972
13849
|
resolveAttachmentAdapter,
|
|
9973
13850
|
resolveBindable,
|
|
13851
|
+
reviewGeneratedUi,
|
|
9974
13852
|
setAccessToken,
|
|
9975
13853
|
setPath,
|
|
9976
13854
|
setRefreshToken,
|
|
9977
13855
|
splitMarkdownByArtifacts,
|
|
9978
13856
|
themeToCss,
|
|
9979
13857
|
threadMessageColumnClass,
|
|
13858
|
+
toast,
|
|
13859
|
+
toggleVariants,
|
|
9980
13860
|
useAppCopilotContext,
|
|
9981
13861
|
useAppShellChat,
|
|
9982
13862
|
useArtifactRegistry,
|
|
@@ -9989,6 +13869,7 @@ function SelectScrollDownButton({
|
|
|
9989
13869
|
useThreadRuntime,
|
|
9990
13870
|
useTimbalRuntime,
|
|
9991
13871
|
useTimbalStream,
|
|
13872
|
+
useToast,
|
|
9992
13873
|
useToolRunning,
|
|
9993
13874
|
useUiCustomNodeRegistry,
|
|
9994
13875
|
useUiDispatch,
|