@wealthx/shadcn 0.0.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/.turbo/turbo-build.log +160 -0
- package/CHANGELOG.md +13 -0
- package/CHANGES.md +345 -0
- package/dist/chunk-2WZVSBAY.mjs +232 -0
- package/dist/chunk-2Y7YJKPE.mjs +47 -0
- package/dist/chunk-3U7SD3MS.mjs +55 -0
- package/dist/chunk-3VQNJ235.mjs +114 -0
- package/dist/chunk-55CEW76V.mjs +35 -0
- package/dist/chunk-6AFMNC42.mjs +146 -0
- package/dist/chunk-6OJF6XRN.mjs +117 -0
- package/dist/chunk-7LDIMXGM.mjs +181 -0
- package/dist/chunk-AMJ23O53.mjs +122 -0
- package/dist/chunk-BBJBJSXQ.mjs +44 -0
- package/dist/chunk-BGP2N52Z.mjs +126 -0
- package/dist/chunk-BMFN37JH.mjs +41 -0
- package/dist/chunk-CGOKTPXU.mjs +79 -0
- package/dist/chunk-CZ3BW5GL.mjs +81 -0
- package/dist/chunk-DBHJ5KC3.mjs +55 -0
- package/dist/chunk-DDPA2XXS.mjs +97 -0
- package/dist/chunk-DS2AMHN2.mjs +30 -0
- package/dist/chunk-E3K6O4FZ.mjs +57 -0
- package/dist/chunk-FWCSY2DS.mjs +37 -0
- package/dist/chunk-GPRJQ24C.mjs +28 -0
- package/dist/chunk-HS7TFG7V.mjs +24 -0
- package/dist/chunk-HUVTPUV2.mjs +256 -0
- package/dist/chunk-IAOOZCUY.mjs +90 -0
- package/dist/chunk-JF4PHPD5.mjs +111 -0
- package/dist/chunk-JU2RUWHF.mjs +123 -0
- package/dist/chunk-KKHTJNMM.mjs +86 -0
- package/dist/chunk-MJIEMGRD.mjs +266 -0
- package/dist/chunk-MKFL5MNH.mjs +372 -0
- package/dist/chunk-MQ72DIBH.mjs +105 -0
- package/dist/chunk-NGYG2EA6.mjs +148 -0
- package/dist/chunk-NWZ46DJL.mjs +213 -0
- package/dist/chunk-OXQQNQZI.mjs +75 -0
- package/dist/chunk-PMKODV6M.mjs +161 -0
- package/dist/chunk-QOJ2DQD6.mjs +57 -0
- package/dist/chunk-RL772EH7.mjs +126 -0
- package/dist/chunk-SLWCCURD.mjs +99 -0
- package/dist/chunk-V7CNWJT3.mjs +10 -0
- package/dist/chunk-VG6UF6UT.mjs +68 -0
- package/dist/chunk-VYMHBV6D.mjs +123 -0
- package/dist/chunk-VZ2NR7L3.mjs +195 -0
- package/dist/chunk-YN5SYTOO.mjs +117 -0
- package/dist/chunk-Z3MK2KKZ.mjs +83 -0
- package/dist/chunk-ZN2QKLF6.mjs +187 -0
- package/dist/chunk-ZZV5JVNW.mjs +34 -0
- package/dist/components/ui/accordion.js +142 -0
- package/dist/components/ui/accordion.mjs +14 -0
- package/dist/components/ui/alert-dialog.js +413 -0
- package/dist/components/ui/alert-dialog.mjs +34 -0
- package/dist/components/ui/alert.js +134 -0
- package/dist/components/ui/alert.mjs +12 -0
- package/dist/components/ui/avatar.js +173 -0
- package/dist/components/ui/avatar.mjs +18 -0
- package/dist/components/ui/badge.js +163 -0
- package/dist/components/ui/badge.mjs +11 -0
- package/dist/components/ui/button.js +198 -0
- package/dist/components/ui/button.mjs +11 -0
- package/dist/components/ui/calendar.js +408 -0
- package/dist/components/ui/calendar.mjs +12 -0
- package/dist/components/ui/card.js +156 -0
- package/dist/components/ui/card.mjs +20 -0
- package/dist/components/ui/checkbox.js +166 -0
- package/dist/components/ui/checkbox.mjs +11 -0
- package/dist/components/ui/chip.js +199 -0
- package/dist/components/ui/chip.mjs +10 -0
- package/dist/components/ui/data-table.js +925 -0
- package/dist/components/ui/data-table.mjs +29 -0
- package/dist/components/ui/date-picker.js +561 -0
- package/dist/components/ui/date-picker.mjs +15 -0
- package/dist/components/ui/dialog.js +378 -0
- package/dist/components/ui/dialog.mjs +30 -0
- package/dist/components/ui/drawer.js +213 -0
- package/dist/components/ui/drawer.mjs +28 -0
- package/dist/components/ui/dropdown-menu.js +338 -0
- package/dist/components/ui/dropdown-menu.mjs +38 -0
- package/dist/components/ui/empty.js +173 -0
- package/dist/components/ui/empty.mjs +18 -0
- package/dist/components/ui/field.js +359 -0
- package/dist/components/ui/field.mjs +28 -0
- package/dist/components/ui/input-group.js +406 -0
- package/dist/components/ui/input-group.mjs +22 -0
- package/dist/components/ui/input-otp.js +149 -0
- package/dist/components/ui/input-otp.mjs +14 -0
- package/dist/components/ui/input.js +81 -0
- package/dist/components/ui/input.mjs +8 -0
- package/dist/components/ui/label.js +85 -0
- package/dist/components/ui/label.mjs +8 -0
- package/dist/components/ui/pagination.js +333 -0
- package/dist/components/ui/pagination.mjs +22 -0
- package/dist/components/ui/popover.js +167 -0
- package/dist/components/ui/popover.mjs +22 -0
- package/dist/components/ui/progress.js +97 -0
- package/dist/components/ui/progress.mjs +8 -0
- package/dist/components/ui/radio-group.js +178 -0
- package/dist/components/ui/radio-group.mjs +12 -0
- package/dist/components/ui/select.js +262 -0
- package/dist/components/ui/select.mjs +28 -0
- package/dist/components/ui/separator.js +86 -0
- package/dist/components/ui/separator.mjs +8 -0
- package/dist/components/ui/sheet.js +227 -0
- package/dist/components/ui/sheet.mjs +26 -0
- package/dist/components/ui/skeleton.js +75 -0
- package/dist/components/ui/skeleton.mjs +8 -0
- package/dist/components/ui/sonner.js +86 -0
- package/dist/components/ui/sonner.mjs +7 -0
- package/dist/components/ui/spinner.js +93 -0
- package/dist/components/ui/spinner.mjs +10 -0
- package/dist/components/ui/switch.js +178 -0
- package/dist/components/ui/switch.mjs +11 -0
- package/dist/components/ui/table.js +184 -0
- package/dist/components/ui/table.mjs +22 -0
- package/dist/components/ui/tabs.js +181 -0
- package/dist/components/ui/tabs.mjs +16 -0
- package/dist/components/ui/textarea.js +79 -0
- package/dist/components/ui/textarea.mjs +8 -0
- package/dist/components/ui/toggle-group.js +184 -0
- package/dist/components/ui/toggle-group.mjs +12 -0
- package/dist/components/ui/toggle.js +108 -0
- package/dist/components/ui/toggle.mjs +11 -0
- package/dist/components/ui/tooltip.js +140 -0
- package/dist/components/ui/tooltip.mjs +16 -0
- package/dist/index.js +4409 -0
- package/dist/index.mjs +462 -0
- package/dist/lib/colors.js +84 -0
- package/dist/lib/colors.mjs +13 -0
- package/dist/lib/theme-provider.js +150 -0
- package/dist/lib/theme-provider.mjs +13 -0
- package/dist/lib/typography.js +157 -0
- package/dist/lib/typography.mjs +25 -0
- package/dist/lib/utils.js +34 -0
- package/dist/lib/utils.mjs +7 -0
- package/dist/styles.css +2 -0
- package/package.json +228 -11
- package/scripts/build-css.ts +15 -9
- package/src/components/index.tsx +443 -0
- package/src/components/ui/accordion.tsx +99 -0
- package/src/components/ui/alert-dialog.tsx +239 -0
- package/src/components/ui/alert.tsx +81 -0
- package/src/components/ui/avatar.tsx +130 -0
- package/src/components/ui/badge.tsx +57 -0
- package/src/components/ui/button.tsx +69 -37
- package/src/components/ui/calendar.tsx +252 -0
- package/src/components/ui/card.tsx +106 -0
- package/src/components/ui/checkbox.tsx +111 -0
- package/src/components/ui/chip.tsx +65 -0
- package/src/components/ui/data-table.tsx +490 -0
- package/src/components/ui/date-picker.tsx +133 -0
- package/src/components/ui/dialog.tsx +195 -0
- package/src/components/ui/drawer.tsx +169 -0
- package/src/components/ui/dropdown-menu.tsx +315 -0
- package/src/components/ui/empty.tsx +128 -0
- package/src/components/ui/field.tsx +273 -0
- package/src/components/ui/input-group.tsx +190 -0
- package/src/components/ui/input-otp.tsx +90 -0
- package/src/components/ui/input.tsx +28 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/pagination.tsx +148 -0
- package/src/components/ui/popover.tsx +112 -0
- package/src/components/ui/progress.tsx +40 -0
- package/src/components/ui/radio-group.tsx +129 -0
- package/src/components/ui/select.tsx +201 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +182 -0
- package/src/components/ui/skeleton.tsx +22 -0
- package/src/components/ui/sonner.tsx +48 -0
- package/src/components/ui/spinner.tsx +41 -0
- package/src/components/ui/switch.tsx +126 -0
- package/src/components/ui/table.tsx +143 -0
- package/src/components/ui/tabs.tsx +119 -0
- package/src/components/ui/textarea.tsx +28 -0
- package/src/components/ui/toggle-group.tsx +94 -0
- package/src/components/ui/toggle.tsx +59 -0
- package/src/components/ui/tooltip.tsx +80 -0
- package/src/index.ts +15 -3
- package/src/lib/colors.ts +74 -0
- package/src/lib/slot.tsx +68 -0
- package/src/lib/theme-provider.tsx +134 -0
- package/src/lib/typography.ts +153 -0
- package/src/lib/utils.ts +1 -1
- package/src/styles/globals.css +377 -107
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +48 -2
- package/src/provider/ShadcnProvider.tsx +0 -89
- package/src/provider/index.ts +0 -2
package/dist/index.js
ADDED
|
@@ -0,0 +1,4409 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
|
|
59
|
+
// src/index.ts
|
|
60
|
+
var index_exports = {};
|
|
61
|
+
__export(index_exports, {
|
|
62
|
+
Accordion: () => Accordion,
|
|
63
|
+
AccordionContent: () => AccordionContent,
|
|
64
|
+
AccordionItem: () => AccordionItem,
|
|
65
|
+
AccordionTrigger: () => AccordionTrigger,
|
|
66
|
+
Alert: () => Alert,
|
|
67
|
+
AlertDescription: () => AlertDescription,
|
|
68
|
+
AlertDialog: () => AlertDialog,
|
|
69
|
+
AlertDialogAction: () => AlertDialogAction,
|
|
70
|
+
AlertDialogCancel: () => AlertDialogCancel,
|
|
71
|
+
AlertDialogContent: () => AlertDialogContent,
|
|
72
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
73
|
+
AlertDialogFooter: () => AlertDialogFooter,
|
|
74
|
+
AlertDialogHeader: () => AlertDialogHeader,
|
|
75
|
+
AlertDialogMedia: () => AlertDialogMedia,
|
|
76
|
+
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
77
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
78
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
79
|
+
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
80
|
+
AlertTitle: () => AlertTitle,
|
|
81
|
+
Avatar: () => Avatar,
|
|
82
|
+
AvatarBadge: () => AvatarBadge,
|
|
83
|
+
AvatarFallback: () => AvatarFallback,
|
|
84
|
+
AvatarGroup: () => AvatarGroup,
|
|
85
|
+
AvatarGroupCount: () => AvatarGroupCount,
|
|
86
|
+
AvatarImage: () => AvatarImage,
|
|
87
|
+
Badge: () => Badge,
|
|
88
|
+
Button: () => Button,
|
|
89
|
+
Calendar: () => Calendar,
|
|
90
|
+
CalendarDayButton: () => CalendarDayButton,
|
|
91
|
+
Card: () => Card,
|
|
92
|
+
CardAction: () => CardAction,
|
|
93
|
+
CardContent: () => CardContent,
|
|
94
|
+
CardDescription: () => CardDescription,
|
|
95
|
+
CardFooter: () => CardFooter,
|
|
96
|
+
CardHeader: () => CardHeader,
|
|
97
|
+
CardTitle: () => CardTitle,
|
|
98
|
+
Checkbox: () => Checkbox,
|
|
99
|
+
CheckboxCard: () => CheckboxCard,
|
|
100
|
+
Chip: () => Chip,
|
|
101
|
+
DataTable: () => DataTable,
|
|
102
|
+
DataTableColumnHeader: () => DataTableColumnHeader,
|
|
103
|
+
DataTablePagination: () => DataTablePagination,
|
|
104
|
+
DataTableSkeleton: () => DataTableSkeleton,
|
|
105
|
+
DataTableToolbar: () => DataTableToolbar,
|
|
106
|
+
DatePicker: () => DatePicker,
|
|
107
|
+
Dialog: () => Dialog,
|
|
108
|
+
DialogClose: () => DialogClose,
|
|
109
|
+
DialogContent: () => DialogContent,
|
|
110
|
+
DialogDescription: () => DialogDescription,
|
|
111
|
+
DialogFooter: () => DialogFooter,
|
|
112
|
+
DialogHeader: () => DialogHeader,
|
|
113
|
+
DialogOverlay: () => DialogOverlay,
|
|
114
|
+
DialogPortal: () => DialogPortal,
|
|
115
|
+
DialogTitle: () => DialogTitle,
|
|
116
|
+
DialogTrigger: () => DialogTrigger,
|
|
117
|
+
Drawer: () => Drawer,
|
|
118
|
+
DrawerClose: () => DrawerClose,
|
|
119
|
+
DrawerContent: () => DrawerContent,
|
|
120
|
+
DrawerDescription: () => DrawerDescription,
|
|
121
|
+
DrawerFooter: () => DrawerFooter,
|
|
122
|
+
DrawerHeader: () => DrawerHeader,
|
|
123
|
+
DrawerOverlay: () => DrawerOverlay,
|
|
124
|
+
DrawerPortal: () => DrawerPortal,
|
|
125
|
+
DrawerTitle: () => DrawerTitle,
|
|
126
|
+
DrawerTrigger: () => DrawerTrigger,
|
|
127
|
+
DropdownMenu: () => DropdownMenu,
|
|
128
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
129
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
130
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
131
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
132
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
133
|
+
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
134
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
135
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
136
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
137
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
138
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
139
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
140
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
141
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
142
|
+
Empty: () => Empty,
|
|
143
|
+
EmptyContent: () => EmptyContent,
|
|
144
|
+
EmptyDescription: () => EmptyDescription,
|
|
145
|
+
EmptyHeader: () => EmptyHeader,
|
|
146
|
+
EmptyMedia: () => EmptyMedia,
|
|
147
|
+
EmptyTitle: () => EmptyTitle,
|
|
148
|
+
FONT_FAMILY_SANS: () => FONT_FAMILY_SANS,
|
|
149
|
+
Field: () => Field,
|
|
150
|
+
FieldContent: () => FieldContent,
|
|
151
|
+
FieldDescription: () => FieldDescription,
|
|
152
|
+
FieldError: () => FieldError,
|
|
153
|
+
FieldGroup: () => FieldGroup,
|
|
154
|
+
FieldLabel: () => FieldLabel,
|
|
155
|
+
FieldLegend: () => FieldLegend,
|
|
156
|
+
FieldSeparator: () => FieldSeparator,
|
|
157
|
+
FieldSet: () => FieldSet,
|
|
158
|
+
FieldTitle: () => FieldTitle,
|
|
159
|
+
Input: () => Input,
|
|
160
|
+
InputGroup: () => InputGroup,
|
|
161
|
+
InputGroupAddon: () => InputGroupAddon,
|
|
162
|
+
InputGroupButton: () => InputGroupButton,
|
|
163
|
+
InputGroupInput: () => InputGroupInput,
|
|
164
|
+
InputGroupText: () => InputGroupText,
|
|
165
|
+
InputGroupTextarea: () => InputGroupTextarea,
|
|
166
|
+
InputOTP: () => InputOTP,
|
|
167
|
+
InputOTPGroup: () => InputOTPGroup,
|
|
168
|
+
InputOTPSeparator: () => InputOTPSeparator,
|
|
169
|
+
InputOTPSlot: () => InputOTPSlot,
|
|
170
|
+
Label: () => Label,
|
|
171
|
+
Pagination: () => Pagination,
|
|
172
|
+
PaginationContent: () => PaginationContent,
|
|
173
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
174
|
+
PaginationItem: () => PaginationItem,
|
|
175
|
+
PaginationLink: () => PaginationLink,
|
|
176
|
+
PaginationNext: () => PaginationNext,
|
|
177
|
+
PaginationPrevious: () => PaginationPrevious,
|
|
178
|
+
Popover: () => Popover,
|
|
179
|
+
PopoverAnchor: () => PopoverAnchor,
|
|
180
|
+
PopoverContent: () => PopoverContent,
|
|
181
|
+
PopoverDescription: () => PopoverDescription,
|
|
182
|
+
PopoverHeader: () => PopoverHeader,
|
|
183
|
+
PopoverTitle: () => PopoverTitle,
|
|
184
|
+
PopoverTrigger: () => PopoverTrigger,
|
|
185
|
+
Progress: () => Progress,
|
|
186
|
+
RadioGroup: () => RadioGroup,
|
|
187
|
+
RadioGroupCard: () => RadioGroupCard,
|
|
188
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
189
|
+
Select: () => Select,
|
|
190
|
+
SelectContent: () => SelectContent,
|
|
191
|
+
SelectGroup: () => SelectGroup,
|
|
192
|
+
SelectItem: () => SelectItem,
|
|
193
|
+
SelectLabel: () => SelectLabel,
|
|
194
|
+
SelectScrollDownButton: () => SelectScrollDownButton,
|
|
195
|
+
SelectScrollUpButton: () => SelectScrollUpButton,
|
|
196
|
+
SelectSeparator: () => SelectSeparator,
|
|
197
|
+
SelectTrigger: () => SelectTrigger,
|
|
198
|
+
SelectValue: () => SelectValue,
|
|
199
|
+
Separator: () => Separator,
|
|
200
|
+
Sheet: () => Sheet,
|
|
201
|
+
SheetClose: () => SheetClose,
|
|
202
|
+
SheetContent: () => SheetContent,
|
|
203
|
+
SheetDescription: () => SheetDescription,
|
|
204
|
+
SheetFooter: () => SheetFooter,
|
|
205
|
+
SheetHeader: () => SheetHeader,
|
|
206
|
+
SheetPortal: () => SheetPortal,
|
|
207
|
+
SheetTitle: () => SheetTitle,
|
|
208
|
+
SheetTrigger: () => SheetTrigger,
|
|
209
|
+
Skeleton: () => Skeleton,
|
|
210
|
+
Spinner: () => Spinner,
|
|
211
|
+
Switch: () => Switch,
|
|
212
|
+
SwitchCard: () => SwitchCard,
|
|
213
|
+
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
214
|
+
TYPOGRAPHY_BODY: () => TYPOGRAPHY_BODY,
|
|
215
|
+
TYPOGRAPHY_DISPLAY: () => TYPOGRAPHY_DISPLAY,
|
|
216
|
+
TYPOGRAPHY_HEADING: () => TYPOGRAPHY_HEADING,
|
|
217
|
+
TYPOGRAPHY_LABEL: () => TYPOGRAPHY_LABEL,
|
|
218
|
+
TYPOGRAPHY_RESPONSIVE: () => TYPOGRAPHY_RESPONSIVE,
|
|
219
|
+
TYPOGRAPHY_UTILITY: () => TYPOGRAPHY_UTILITY,
|
|
220
|
+
Table: () => Table,
|
|
221
|
+
TableBody: () => TableBody,
|
|
222
|
+
TableCaption: () => TableCaption,
|
|
223
|
+
TableCell: () => TableCell,
|
|
224
|
+
TableFooter: () => TableFooter,
|
|
225
|
+
TableHead: () => TableHead,
|
|
226
|
+
TableHeader: () => TableHeader,
|
|
227
|
+
TableRow: () => TableRow,
|
|
228
|
+
Tabs: () => Tabs,
|
|
229
|
+
TabsContent: () => TabsContent,
|
|
230
|
+
TabsList: () => TabsList,
|
|
231
|
+
TabsTrigger: () => TabsTrigger,
|
|
232
|
+
Textarea: () => Textarea,
|
|
233
|
+
Toaster: () => Toaster,
|
|
234
|
+
Toggle: () => Toggle,
|
|
235
|
+
ToggleGroup: () => ToggleGroup,
|
|
236
|
+
ToggleGroupItem: () => ToggleGroupItem,
|
|
237
|
+
Tooltip: () => Tooltip,
|
|
238
|
+
TooltipContent: () => TooltipContent,
|
|
239
|
+
TooltipProvider: () => TooltipProvider,
|
|
240
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
241
|
+
badgeVariants: () => badgeVariants,
|
|
242
|
+
buttonVariants: () => buttonVariants,
|
|
243
|
+
cn: () => cn,
|
|
244
|
+
getResponsiveTypographyCssVars: () => getResponsiveTypographyCssVars,
|
|
245
|
+
getSelectionColumn: () => getSelectionColumn,
|
|
246
|
+
getTypographyCssVars: () => getTypographyCssVars,
|
|
247
|
+
spinnerVariants: () => spinnerVariants,
|
|
248
|
+
tabsListVariants: () => tabsListVariants,
|
|
249
|
+
toggleVariants: () => toggleVariants
|
|
250
|
+
});
|
|
251
|
+
module.exports = __toCommonJS(index_exports);
|
|
252
|
+
|
|
253
|
+
// src/lib/utils.ts
|
|
254
|
+
var import_clsx = require("clsx");
|
|
255
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
256
|
+
function cn(...inputs) {
|
|
257
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// src/lib/typography.ts
|
|
261
|
+
var FONT_FAMILY_SANS = '"Figtree", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';
|
|
262
|
+
function style(weight, size, lineHeight, extra) {
|
|
263
|
+
return __spreadValues({ fontWeight: weight, fontSize: size, lineHeight }, extra);
|
|
264
|
+
}
|
|
265
|
+
var TYPOGRAPHY_DISPLAY = {
|
|
266
|
+
large: style(700, "4rem", "4.5rem", { letterSpacing: "-0.03125rem" }),
|
|
267
|
+
medium: style(700, "3rem", "3.5rem"),
|
|
268
|
+
small: style(600, "2.125rem", "2.625rem")
|
|
269
|
+
};
|
|
270
|
+
var TYPOGRAPHY_HEADING = {
|
|
271
|
+
h1: style(700, "2rem", "2.5rem"),
|
|
272
|
+
h2: style(600, "1.75rem", "2.25rem"),
|
|
273
|
+
h3: style(600, "1.5rem", "2rem"),
|
|
274
|
+
h4: style(600, "1.3125rem", "1.75rem"),
|
|
275
|
+
h5: style(600, "1.125rem", "1.5rem"),
|
|
276
|
+
h6: style(600, "1rem", "1.375rem")
|
|
277
|
+
};
|
|
278
|
+
var TYPOGRAPHY_BODY = {
|
|
279
|
+
large: style(400, "1.125rem", "1.75rem"),
|
|
280
|
+
medium: style(400, "1rem", "1.5rem"),
|
|
281
|
+
small: style(400, "0.875rem", "1.25rem")
|
|
282
|
+
};
|
|
283
|
+
var TYPOGRAPHY_LABEL = {
|
|
284
|
+
large: style(600, "1rem", "1.25rem"),
|
|
285
|
+
medium: style(600, "0.875rem", "1.125rem"),
|
|
286
|
+
small: style(600, "0.75rem", "1rem", { letterSpacing: "0.03125rem" })
|
|
287
|
+
};
|
|
288
|
+
var TYPOGRAPHY_UTILITY = {
|
|
289
|
+
caption: style(400, "0.75rem", "1rem"),
|
|
290
|
+
overline: style(600, "0.625rem", "0.875rem", {
|
|
291
|
+
letterSpacing: "0.09375rem",
|
|
292
|
+
textTransform: "uppercase"
|
|
293
|
+
}),
|
|
294
|
+
code: style(400, "0.875rem", "1.25rem")
|
|
295
|
+
};
|
|
296
|
+
var TYPOGRAPHY = {
|
|
297
|
+
display: TYPOGRAPHY_DISPLAY,
|
|
298
|
+
heading: TYPOGRAPHY_HEADING,
|
|
299
|
+
body: TYPOGRAPHY_BODY,
|
|
300
|
+
label: TYPOGRAPHY_LABEL,
|
|
301
|
+
utility: TYPOGRAPHY_UTILITY
|
|
302
|
+
};
|
|
303
|
+
var TYPOGRAPHY_RESPONSIVE = {
|
|
304
|
+
tablet: {
|
|
305
|
+
"display-large": style(700, "3.6rem", "4.05rem", {
|
|
306
|
+
letterSpacing: "-0.03125rem"
|
|
307
|
+
}),
|
|
308
|
+
"display-medium": style(700, "2.7rem", "3.15rem"),
|
|
309
|
+
"display-small": style(600, "1.9125rem", "2.3625rem")
|
|
310
|
+
},
|
|
311
|
+
mobile: {
|
|
312
|
+
"display-large": style(700, "2.5rem", "2.8125rem", {
|
|
313
|
+
letterSpacing: "-0.03125rem"
|
|
314
|
+
}),
|
|
315
|
+
"display-medium": style(700, "2rem", "2.334rem"),
|
|
316
|
+
h1: style(700, "1.75rem", "2.1875rem"),
|
|
317
|
+
h2: style(600, "1.5rem", "1.93rem")
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
function getTypographyCssVars(fontFamily = FONT_FAMILY_SANS) {
|
|
321
|
+
const vars = {};
|
|
322
|
+
vars["--font-family-sans"] = fontFamily;
|
|
323
|
+
const allGroups = [
|
|
324
|
+
[
|
|
325
|
+
"display",
|
|
326
|
+
TYPOGRAPHY_DISPLAY
|
|
327
|
+
],
|
|
328
|
+
["", TYPOGRAPHY_HEADING],
|
|
329
|
+
["body", TYPOGRAPHY_BODY],
|
|
330
|
+
["label", TYPOGRAPHY_LABEL],
|
|
331
|
+
["", TYPOGRAPHY_UTILITY]
|
|
332
|
+
];
|
|
333
|
+
for (const [prefix, group] of allGroups) {
|
|
334
|
+
for (const [key, s] of Object.entries(group)) {
|
|
335
|
+
const token = prefix ? `${prefix}-${key}` : key;
|
|
336
|
+
vars[`--typography-${token}-size`] = s.fontSize;
|
|
337
|
+
vars[`--typography-${token}-leading`] = s.lineHeight;
|
|
338
|
+
vars[`--typography-${token}-weight`] = String(s.fontWeight);
|
|
339
|
+
if (s.letterSpacing)
|
|
340
|
+
vars[`--typography-${token}-tracking`] = s.letterSpacing;
|
|
341
|
+
if (s.textTransform)
|
|
342
|
+
vars[`--typography-${token}-transform`] = s.textTransform;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return vars;
|
|
346
|
+
}
|
|
347
|
+
function getResponsiveTypographyCssVars(breakpoint) {
|
|
348
|
+
const vars = {};
|
|
349
|
+
for (const [key, s] of Object.entries(TYPOGRAPHY_RESPONSIVE[breakpoint])) {
|
|
350
|
+
vars[`--typography-${key}-size`] = s.fontSize;
|
|
351
|
+
vars[`--typography-${key}-leading`] = s.lineHeight;
|
|
352
|
+
vars[`--typography-${key}-weight`] = String(s.fontWeight);
|
|
353
|
+
if (s.letterSpacing) vars[`--typography-${key}-tracking`] = s.letterSpacing;
|
|
354
|
+
}
|
|
355
|
+
return vars;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// src/components/ui/accordion.tsx
|
|
359
|
+
var import_lucide_react = require("lucide-react");
|
|
360
|
+
var import_accordion = require("@base-ui/react/accordion");
|
|
361
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
362
|
+
function Accordion(props) {
|
|
363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_accordion.Accordion.Root, __spreadValues({ "data-slot": "accordion" }, props));
|
|
364
|
+
}
|
|
365
|
+
function AccordionItem(_a) {
|
|
366
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
368
|
+
import_accordion.Accordion.Item,
|
|
369
|
+
__spreadValues({
|
|
370
|
+
className: cn("border-b", className),
|
|
371
|
+
"data-slot": "accordion-item"
|
|
372
|
+
}, props)
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
function AccordionTrigger(_a) {
|
|
376
|
+
var _b = _a, {
|
|
377
|
+
className,
|
|
378
|
+
children
|
|
379
|
+
} = _b, props = __objRest(_b, [
|
|
380
|
+
"className",
|
|
381
|
+
"children"
|
|
382
|
+
]);
|
|
383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
384
|
+
import_accordion.Accordion.Trigger,
|
|
385
|
+
__spreadProps(__spreadValues({
|
|
386
|
+
className: cn(
|
|
387
|
+
// layout
|
|
388
|
+
"flex flex-1 items-center justify-between gap-4 py-4 text-left",
|
|
389
|
+
// typography
|
|
390
|
+
"text-sm font-medium",
|
|
391
|
+
// base
|
|
392
|
+
"rounded-none outline-none transition-[color,opacity]",
|
|
393
|
+
// interactive states
|
|
394
|
+
"hover:underline",
|
|
395
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/30",
|
|
396
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
397
|
+
// chevron rotation when open
|
|
398
|
+
"[&[data-panel-open]>svg]:rotate-180",
|
|
399
|
+
className
|
|
400
|
+
),
|
|
401
|
+
"data-slot": "accordion-trigger"
|
|
402
|
+
}, props), {
|
|
403
|
+
children: [
|
|
404
|
+
children,
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
406
|
+
]
|
|
407
|
+
})
|
|
408
|
+
) });
|
|
409
|
+
}
|
|
410
|
+
function AccordionContent(_a) {
|
|
411
|
+
var _b = _a, {
|
|
412
|
+
className,
|
|
413
|
+
children
|
|
414
|
+
} = _b, props = __objRest(_b, [
|
|
415
|
+
"className",
|
|
416
|
+
"children"
|
|
417
|
+
]);
|
|
418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
419
|
+
import_accordion.Accordion.Panel,
|
|
420
|
+
__spreadProps(__spreadValues({
|
|
421
|
+
className: "overflow-hidden text-sm h-(--accordion-panel-height) transition-[height] duration-200 ease-out data-starting-style:h-0 data-ending-style:h-0",
|
|
422
|
+
"data-slot": "accordion-content"
|
|
423
|
+
}, props), {
|
|
424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cn("pb-4 text-muted-foreground", className), children })
|
|
425
|
+
})
|
|
426
|
+
);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
// src/components/ui/alert-dialog.tsx
|
|
430
|
+
var import_alert_dialog = require("@base-ui/react/alert-dialog");
|
|
431
|
+
|
|
432
|
+
// src/lib/theme-provider.tsx
|
|
433
|
+
var import_react = require("react");
|
|
434
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
435
|
+
var ThemeVarsContext = (0, import_react.createContext)({});
|
|
436
|
+
function useThemeVars() {
|
|
437
|
+
return (0, import_react.useContext)(ThemeVarsContext);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// src/components/ui/button.tsx
|
|
441
|
+
var import_react2 = require("react");
|
|
442
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
443
|
+
var import_lucide_react2 = require("lucide-react");
|
|
444
|
+
|
|
445
|
+
// src/lib/slot.tsx
|
|
446
|
+
var React2 = __toESM(require("react"));
|
|
447
|
+
function mergeRefs(...refs) {
|
|
448
|
+
return (value) => {
|
|
449
|
+
for (const ref of refs) {
|
|
450
|
+
if (typeof ref === "function") ref(value);
|
|
451
|
+
else if (ref !== null)
|
|
452
|
+
ref.current = value;
|
|
453
|
+
}
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
var Slot = React2.forwardRef(
|
|
457
|
+
(_a, forwardedRef) => {
|
|
458
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
459
|
+
const child = React2.Children.only(children);
|
|
460
|
+
if (!React2.isValidElement(child)) return null;
|
|
461
|
+
const childProps = child.props;
|
|
462
|
+
const merged = __spreadValues({}, props);
|
|
463
|
+
for (const key of Object.keys(childProps)) {
|
|
464
|
+
if (key === "className") {
|
|
465
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
466
|
+
} else if (key === "style") {
|
|
467
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
468
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
469
|
+
const parentHandler = props[key];
|
|
470
|
+
if (typeof parentHandler === "function") {
|
|
471
|
+
merged[key] = (...args) => {
|
|
472
|
+
childProps[key](...args);
|
|
473
|
+
parentHandler(...args);
|
|
474
|
+
};
|
|
475
|
+
} else {
|
|
476
|
+
merged[key] = childProps[key];
|
|
477
|
+
}
|
|
478
|
+
} else {
|
|
479
|
+
merged[key] = childProps[key];
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
const childRef = child.ref;
|
|
483
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
484
|
+
return React2.cloneElement(
|
|
485
|
+
child,
|
|
486
|
+
merged
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
);
|
|
490
|
+
Slot.displayName = "Slot";
|
|
491
|
+
|
|
492
|
+
// src/components/ui/button.tsx
|
|
493
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
494
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
495
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 font-sans text-sm font-medium whitespace-nowrap transition-all active:scale-[0.98] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
496
|
+
{
|
|
497
|
+
variants: {
|
|
498
|
+
variant: {
|
|
499
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
500
|
+
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
501
|
+
destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
502
|
+
outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
503
|
+
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
504
|
+
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
505
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
|
|
506
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
507
|
+
},
|
|
508
|
+
size: {
|
|
509
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
510
|
+
xs: "h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
511
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
512
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
513
|
+
icon: "size-9",
|
|
514
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
515
|
+
"icon-sm": "size-8",
|
|
516
|
+
"icon-lg": "size-10"
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
defaultVariants: {
|
|
520
|
+
variant: "default",
|
|
521
|
+
size: "default"
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
);
|
|
525
|
+
var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
|
|
526
|
+
var _b = _a, {
|
|
527
|
+
className,
|
|
528
|
+
variant,
|
|
529
|
+
size,
|
|
530
|
+
asChild = false,
|
|
531
|
+
loading = false,
|
|
532
|
+
disabled,
|
|
533
|
+
children
|
|
534
|
+
} = _b, props = __objRest(_b, [
|
|
535
|
+
"className",
|
|
536
|
+
"variant",
|
|
537
|
+
"size",
|
|
538
|
+
"asChild",
|
|
539
|
+
"loading",
|
|
540
|
+
"disabled",
|
|
541
|
+
"children"
|
|
542
|
+
]);
|
|
543
|
+
const Comp = asChild ? Slot : "button";
|
|
544
|
+
const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
|
|
545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
546
|
+
Comp,
|
|
547
|
+
__spreadProps(__spreadValues({
|
|
548
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
549
|
+
"data-size": size,
|
|
550
|
+
"data-slot": "button",
|
|
551
|
+
"data-variant": variant,
|
|
552
|
+
disabled: loading || disabled,
|
|
553
|
+
ref
|
|
554
|
+
}, props), {
|
|
555
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
|
|
557
|
+
!isIconOnly && children
|
|
558
|
+
] }) : children
|
|
559
|
+
})
|
|
560
|
+
);
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
// src/components/ui/alert-dialog.tsx
|
|
564
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
565
|
+
function AlertDialog(_a) {
|
|
566
|
+
var props = __objRest(_a, []);
|
|
567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_alert_dialog.AlertDialog.Root, __spreadValues({ "data-slot": "alert-dialog" }, props));
|
|
568
|
+
}
|
|
569
|
+
function AlertDialogTrigger(_a) {
|
|
570
|
+
var props = __objRest(_a, []);
|
|
571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_alert_dialog.AlertDialog.Trigger, __spreadValues({ "data-slot": "alert-dialog-trigger" }, props));
|
|
572
|
+
}
|
|
573
|
+
function AlertDialogPortal(_a) {
|
|
574
|
+
var props = __objRest(_a, []);
|
|
575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_alert_dialog.AlertDialog.Portal, __spreadValues({ "data-slot": "alert-dialog-portal" }, props));
|
|
576
|
+
}
|
|
577
|
+
function AlertDialogOverlay(_a) {
|
|
578
|
+
var _b = _a, {
|
|
579
|
+
className
|
|
580
|
+
} = _b, props = __objRest(_b, [
|
|
581
|
+
"className"
|
|
582
|
+
]);
|
|
583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
584
|
+
import_alert_dialog.AlertDialog.Backdrop,
|
|
585
|
+
__spreadValues({
|
|
586
|
+
className: cn(
|
|
587
|
+
// WealthX: foreground/50 scrim — matches Figma foreground token at 50% opacity
|
|
588
|
+
"fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
589
|
+
className
|
|
590
|
+
),
|
|
591
|
+
"data-slot": "alert-dialog-overlay"
|
|
592
|
+
}, props)
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
function AlertDialogContent(_a) {
|
|
596
|
+
var _b = _a, {
|
|
597
|
+
className,
|
|
598
|
+
size = "default",
|
|
599
|
+
style: style2
|
|
600
|
+
} = _b, props = __objRest(_b, [
|
|
601
|
+
"className",
|
|
602
|
+
"size",
|
|
603
|
+
"style"
|
|
604
|
+
]);
|
|
605
|
+
const themeVars = useThemeVars();
|
|
606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(AlertDialogPortal, { children: [
|
|
607
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AlertDialogOverlay, {}),
|
|
608
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
609
|
+
import_alert_dialog.AlertDialog.Popup,
|
|
610
|
+
__spreadValues({
|
|
611
|
+
className: cn(
|
|
612
|
+
// WealthX: removed rounded-lg (sharp corners), shadow-lg (flat panels)
|
|
613
|
+
"group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 duration-200 data-[size=sm]:max-w-xs data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[size=default]:sm:max-w-lg",
|
|
614
|
+
className
|
|
615
|
+
),
|
|
616
|
+
"data-size": size,
|
|
617
|
+
"data-slot": "alert-dialog-content",
|
|
618
|
+
style: __spreadValues(__spreadValues({}, themeVars), style2)
|
|
619
|
+
}, props)
|
|
620
|
+
)
|
|
621
|
+
] });
|
|
622
|
+
}
|
|
623
|
+
function AlertDialogHeader(_a) {
|
|
624
|
+
var _b = _a, {
|
|
625
|
+
className
|
|
626
|
+
} = _b, props = __objRest(_b, [
|
|
627
|
+
"className"
|
|
628
|
+
]);
|
|
629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
630
|
+
"div",
|
|
631
|
+
__spreadValues({
|
|
632
|
+
className: cn(
|
|
633
|
+
"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
634
|
+
className
|
|
635
|
+
),
|
|
636
|
+
"data-slot": "alert-dialog-header"
|
|
637
|
+
}, props)
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
function AlertDialogFooter(_a) {
|
|
641
|
+
var _b = _a, {
|
|
642
|
+
className
|
|
643
|
+
} = _b, props = __objRest(_b, [
|
|
644
|
+
"className"
|
|
645
|
+
]);
|
|
646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
647
|
+
"div",
|
|
648
|
+
__spreadValues({
|
|
649
|
+
className: cn(
|
|
650
|
+
// WealthX: always row, right-aligned, separator above footer (matches Figma)
|
|
651
|
+
"flex flex-row justify-end gap-2 border-t border-border pt-4",
|
|
652
|
+
className
|
|
653
|
+
),
|
|
654
|
+
"data-slot": "alert-dialog-footer"
|
|
655
|
+
}, props)
|
|
656
|
+
);
|
|
657
|
+
}
|
|
658
|
+
function AlertDialogTitle(_a) {
|
|
659
|
+
var _b = _a, {
|
|
660
|
+
className
|
|
661
|
+
} = _b, props = __objRest(_b, [
|
|
662
|
+
"className"
|
|
663
|
+
]);
|
|
664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
665
|
+
import_alert_dialog.AlertDialog.Title,
|
|
666
|
+
__spreadValues({
|
|
667
|
+
className: cn(
|
|
668
|
+
"text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
669
|
+
className
|
|
670
|
+
),
|
|
671
|
+
"data-slot": "alert-dialog-title"
|
|
672
|
+
}, props)
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
function AlertDialogDescription(_a) {
|
|
676
|
+
var _b = _a, {
|
|
677
|
+
className
|
|
678
|
+
} = _b, props = __objRest(_b, [
|
|
679
|
+
"className"
|
|
680
|
+
]);
|
|
681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
682
|
+
import_alert_dialog.AlertDialog.Description,
|
|
683
|
+
__spreadValues({
|
|
684
|
+
className: cn(
|
|
685
|
+
"text-sm text-muted-foreground sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
686
|
+
className
|
|
687
|
+
),
|
|
688
|
+
"data-slot": "alert-dialog-description"
|
|
689
|
+
}, props)
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
function AlertDialogMedia(_a) {
|
|
693
|
+
var _b = _a, {
|
|
694
|
+
className
|
|
695
|
+
} = _b, props = __objRest(_b, [
|
|
696
|
+
"className"
|
|
697
|
+
]);
|
|
698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
699
|
+
"div",
|
|
700
|
+
__spreadValues({
|
|
701
|
+
className: cn(
|
|
702
|
+
// WealthX: borderless icon slot — size-10 default, size-8 sm
|
|
703
|
+
"mb-2 inline-flex size-10 items-center justify-center group-data-[size=sm]/alert-dialog-content:size-8 sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-5",
|
|
704
|
+
className
|
|
705
|
+
),
|
|
706
|
+
"data-slot": "alert-dialog-media"
|
|
707
|
+
}, props)
|
|
708
|
+
);
|
|
709
|
+
}
|
|
710
|
+
function AlertDialogAction(_a) {
|
|
711
|
+
var _b = _a, {
|
|
712
|
+
className,
|
|
713
|
+
variant = "default",
|
|
714
|
+
size = "default"
|
|
715
|
+
} = _b, props = __objRest(_b, [
|
|
716
|
+
"className",
|
|
717
|
+
"variant",
|
|
718
|
+
"size"
|
|
719
|
+
]);
|
|
720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
721
|
+
import_alert_dialog.AlertDialog.Close,
|
|
722
|
+
__spreadValues({
|
|
723
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
724
|
+
"data-slot": "alert-dialog-action"
|
|
725
|
+
}, props)
|
|
726
|
+
);
|
|
727
|
+
}
|
|
728
|
+
function AlertDialogCancel(_a) {
|
|
729
|
+
var _b = _a, {
|
|
730
|
+
className,
|
|
731
|
+
variant = "outline",
|
|
732
|
+
size = "default"
|
|
733
|
+
} = _b, props = __objRest(_b, [
|
|
734
|
+
"className",
|
|
735
|
+
"variant",
|
|
736
|
+
"size"
|
|
737
|
+
]);
|
|
738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
739
|
+
import_alert_dialog.AlertDialog.Close,
|
|
740
|
+
__spreadValues({
|
|
741
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
742
|
+
"data-slot": "alert-dialog-cancel"
|
|
743
|
+
}, props)
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
// src/components/ui/alert.tsx
|
|
748
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
749
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
750
|
+
var alertVariants = (0, import_class_variance_authority2.cva)(
|
|
751
|
+
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
752
|
+
{
|
|
753
|
+
variants: {
|
|
754
|
+
variant: {
|
|
755
|
+
default: "border-border bg-card text-card-foreground",
|
|
756
|
+
destructive: "border-destructive/40 bg-destructive/10 text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-destructive",
|
|
757
|
+
warning: "border-warning/40 bg-warning/10 text-warning *:data-[slot=alert-description]:text-warning/90 [&>svg]:text-warning",
|
|
758
|
+
success: "border-success/40 bg-success/10 text-success *:data-[slot=alert-description]:text-success/90 [&>svg]:text-success",
|
|
759
|
+
info: "border-info/40 bg-info/10 text-info *:data-[slot=alert-description]:text-info/90 [&>svg]:text-info"
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
defaultVariants: {
|
|
763
|
+
variant: "default"
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
);
|
|
767
|
+
function Alert(_a) {
|
|
768
|
+
var _b = _a, {
|
|
769
|
+
className,
|
|
770
|
+
variant
|
|
771
|
+
} = _b, props = __objRest(_b, [
|
|
772
|
+
"className",
|
|
773
|
+
"variant"
|
|
774
|
+
]);
|
|
775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
776
|
+
"div",
|
|
777
|
+
__spreadValues({
|
|
778
|
+
className: cn(alertVariants({ variant }), className),
|
|
779
|
+
"data-slot": "alert",
|
|
780
|
+
role: "alert"
|
|
781
|
+
}, props)
|
|
782
|
+
);
|
|
783
|
+
}
|
|
784
|
+
function AlertTitle(_a) {
|
|
785
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
787
|
+
"div",
|
|
788
|
+
__spreadValues({
|
|
789
|
+
className: cn(
|
|
790
|
+
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
791
|
+
className
|
|
792
|
+
),
|
|
793
|
+
"data-slot": "alert-title"
|
|
794
|
+
}, props)
|
|
795
|
+
);
|
|
796
|
+
}
|
|
797
|
+
function AlertDescription(_a) {
|
|
798
|
+
var _b = _a, {
|
|
799
|
+
className
|
|
800
|
+
} = _b, props = __objRest(_b, [
|
|
801
|
+
"className"
|
|
802
|
+
]);
|
|
803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
804
|
+
"div",
|
|
805
|
+
__spreadValues({
|
|
806
|
+
className: cn(
|
|
807
|
+
"col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",
|
|
808
|
+
className
|
|
809
|
+
),
|
|
810
|
+
"data-slot": "alert-description"
|
|
811
|
+
}, props)
|
|
812
|
+
);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
// src/components/ui/avatar.tsx
|
|
816
|
+
var import_avatar = require("@base-ui/react/avatar");
|
|
817
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
818
|
+
function Avatar(_a) {
|
|
819
|
+
var _b = _a, {
|
|
820
|
+
className,
|
|
821
|
+
size = "default"
|
|
822
|
+
} = _b, props = __objRest(_b, [
|
|
823
|
+
"className",
|
|
824
|
+
"size"
|
|
825
|
+
]);
|
|
826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
827
|
+
import_avatar.Avatar.Root,
|
|
828
|
+
__spreadValues({
|
|
829
|
+
className: cn(
|
|
830
|
+
"group/avatar relative flex size-8 shrink-0 rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
831
|
+
className
|
|
832
|
+
),
|
|
833
|
+
"data-size": size,
|
|
834
|
+
"data-slot": "avatar"
|
|
835
|
+
}, props)
|
|
836
|
+
);
|
|
837
|
+
}
|
|
838
|
+
function AvatarImage(_a) {
|
|
839
|
+
var _b = _a, {
|
|
840
|
+
className
|
|
841
|
+
} = _b, props = __objRest(_b, [
|
|
842
|
+
"className"
|
|
843
|
+
]);
|
|
844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
845
|
+
import_avatar.Avatar.Image,
|
|
846
|
+
__spreadValues({
|
|
847
|
+
className: cn("aspect-square size-full rounded-full", className),
|
|
848
|
+
"data-slot": "avatar-image"
|
|
849
|
+
}, props)
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
function AvatarFallback(_a) {
|
|
853
|
+
var _b = _a, {
|
|
854
|
+
className
|
|
855
|
+
} = _b, props = __objRest(_b, [
|
|
856
|
+
"className"
|
|
857
|
+
]);
|
|
858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
859
|
+
import_avatar.Avatar.Fallback,
|
|
860
|
+
__spreadValues({
|
|
861
|
+
className: cn(
|
|
862
|
+
"flex size-full items-center justify-center rounded-full overflow-hidden bg-muted text-sm font-sans text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
863
|
+
className
|
|
864
|
+
),
|
|
865
|
+
"data-slot": "avatar-fallback"
|
|
866
|
+
}, props)
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
function AvatarBadge(_a) {
|
|
870
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
872
|
+
"span",
|
|
873
|
+
__spreadValues({
|
|
874
|
+
className: cn(
|
|
875
|
+
"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none",
|
|
876
|
+
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
877
|
+
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
878
|
+
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
879
|
+
className
|
|
880
|
+
),
|
|
881
|
+
"data-slot": "avatar-badge"
|
|
882
|
+
}, props)
|
|
883
|
+
);
|
|
884
|
+
}
|
|
885
|
+
function AvatarGroup(_a) {
|
|
886
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
888
|
+
"div",
|
|
889
|
+
__spreadValues({
|
|
890
|
+
className: cn(
|
|
891
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
892
|
+
className
|
|
893
|
+
),
|
|
894
|
+
"data-slot": "avatar-group"
|
|
895
|
+
}, props)
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
function AvatarGroupCount(_a) {
|
|
899
|
+
var _b = _a, {
|
|
900
|
+
className
|
|
901
|
+
} = _b, props = __objRest(_b, [
|
|
902
|
+
"className"
|
|
903
|
+
]);
|
|
904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
905
|
+
"div",
|
|
906
|
+
__spreadValues({
|
|
907
|
+
className: cn(
|
|
908
|
+
"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
909
|
+
className
|
|
910
|
+
),
|
|
911
|
+
"data-slot": "avatar-group-count"
|
|
912
|
+
}, props)
|
|
913
|
+
);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
// src/components/ui/badge.tsx
|
|
917
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
918
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
919
|
+
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
920
|
+
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium font-sans whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
921
|
+
{
|
|
922
|
+
variants: {
|
|
923
|
+
variant: {
|
|
924
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
925
|
+
secondary: "bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
926
|
+
destructive: "bg-destructive text-destructive-foreground focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
|
|
927
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
928
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
929
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
defaultVariants: {
|
|
933
|
+
variant: "default"
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
);
|
|
937
|
+
function Badge(_a) {
|
|
938
|
+
var _b = _a, {
|
|
939
|
+
className,
|
|
940
|
+
variant = "default",
|
|
941
|
+
asChild = false
|
|
942
|
+
} = _b, props = __objRest(_b, [
|
|
943
|
+
"className",
|
|
944
|
+
"variant",
|
|
945
|
+
"asChild"
|
|
946
|
+
]);
|
|
947
|
+
const Comp = asChild ? Slot : "span";
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
949
|
+
Comp,
|
|
950
|
+
__spreadValues({
|
|
951
|
+
className: cn(badgeVariants({ variant }), className),
|
|
952
|
+
"data-slot": "badge",
|
|
953
|
+
"data-variant": variant
|
|
954
|
+
}, props)
|
|
955
|
+
);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
// src/components/ui/calendar.tsx
|
|
959
|
+
var React3 = __toESM(require("react"));
|
|
960
|
+
var import_lucide_react3 = require("lucide-react");
|
|
961
|
+
var import_react_day_picker = require("react-day-picker");
|
|
962
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
963
|
+
function CalendarRoot(_a) {
|
|
964
|
+
var _b = _a, {
|
|
965
|
+
className,
|
|
966
|
+
rootRef
|
|
967
|
+
} = _b, props = __objRest(_b, [
|
|
968
|
+
"className",
|
|
969
|
+
"rootRef"
|
|
970
|
+
]);
|
|
971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
972
|
+
"div",
|
|
973
|
+
__spreadValues({
|
|
974
|
+
className: cn(className),
|
|
975
|
+
"data-slot": "calendar",
|
|
976
|
+
ref: rootRef
|
|
977
|
+
}, props)
|
|
978
|
+
);
|
|
979
|
+
}
|
|
980
|
+
function CalendarChevron(_a) {
|
|
981
|
+
var _b = _a, {
|
|
982
|
+
className,
|
|
983
|
+
orientation
|
|
984
|
+
} = _b, props = __objRest(_b, [
|
|
985
|
+
"className",
|
|
986
|
+
"orientation"
|
|
987
|
+
]);
|
|
988
|
+
if (orientation === "left") {
|
|
989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
990
|
+
}
|
|
991
|
+
if (orientation === "right") {
|
|
992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
993
|
+
import_lucide_react3.ChevronRightIcon,
|
|
994
|
+
__spreadValues({
|
|
995
|
+
className: cn("size-4", className)
|
|
996
|
+
}, props)
|
|
997
|
+
);
|
|
998
|
+
}
|
|
999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.ChevronDownIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
1000
|
+
}
|
|
1001
|
+
function CalendarWeekNumber(_a) {
|
|
1002
|
+
var _b = _a, {
|
|
1003
|
+
children
|
|
1004
|
+
} = _b, props = __objRest(_b, [
|
|
1005
|
+
"children"
|
|
1006
|
+
]);
|
|
1007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("td", __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
|
|
1008
|
+
}
|
|
1009
|
+
function Calendar(_a) {
|
|
1010
|
+
var _b = _a, {
|
|
1011
|
+
className,
|
|
1012
|
+
classNames,
|
|
1013
|
+
showOutsideDays = true,
|
|
1014
|
+
captionLayout = "dropdown",
|
|
1015
|
+
buttonVariant = "ghost",
|
|
1016
|
+
formatters,
|
|
1017
|
+
components
|
|
1018
|
+
} = _b, props = __objRest(_b, [
|
|
1019
|
+
"className",
|
|
1020
|
+
"classNames",
|
|
1021
|
+
"showOutsideDays",
|
|
1022
|
+
"captionLayout",
|
|
1023
|
+
"buttonVariant",
|
|
1024
|
+
"formatters",
|
|
1025
|
+
"components"
|
|
1026
|
+
]);
|
|
1027
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1029
|
+
import_react_day_picker.DayPicker,
|
|
1030
|
+
__spreadValues({
|
|
1031
|
+
captionLayout,
|
|
1032
|
+
className: cn(
|
|
1033
|
+
"group/calendar bg-background p-3 font-sans border border-border shadow-sm [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
1034
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
1035
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
1036
|
+
className
|
|
1037
|
+
),
|
|
1038
|
+
classNames: __spreadValues({
|
|
1039
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
1040
|
+
months: cn(
|
|
1041
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
1042
|
+
defaultClassNames.months
|
|
1043
|
+
),
|
|
1044
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
1045
|
+
nav: cn(
|
|
1046
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
1047
|
+
defaultClassNames.nav
|
|
1048
|
+
),
|
|
1049
|
+
button_previous: cn(
|
|
1050
|
+
buttonVariants({ variant: buttonVariant }),
|
|
1051
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
1052
|
+
defaultClassNames.button_previous
|
|
1053
|
+
),
|
|
1054
|
+
button_next: cn(
|
|
1055
|
+
buttonVariants({ variant: buttonVariant }),
|
|
1056
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
1057
|
+
defaultClassNames.button_next
|
|
1058
|
+
),
|
|
1059
|
+
month_caption: cn(
|
|
1060
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
1061
|
+
defaultClassNames.month_caption
|
|
1062
|
+
),
|
|
1063
|
+
dropdowns: cn(
|
|
1064
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
1065
|
+
defaultClassNames.dropdowns
|
|
1066
|
+
),
|
|
1067
|
+
dropdown_root: cn(
|
|
1068
|
+
"relative border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
1069
|
+
defaultClassNames.dropdown_root
|
|
1070
|
+
),
|
|
1071
|
+
dropdown: cn(
|
|
1072
|
+
"absolute inset-0 bg-popover opacity-0",
|
|
1073
|
+
defaultClassNames.dropdown
|
|
1074
|
+
),
|
|
1075
|
+
caption_label: cn(
|
|
1076
|
+
"font-medium select-none",
|
|
1077
|
+
captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
1078
|
+
defaultClassNames.caption_label
|
|
1079
|
+
),
|
|
1080
|
+
table: "w-full border-collapse",
|
|
1081
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
1082
|
+
weekday: cn(
|
|
1083
|
+
"flex-1 text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
1084
|
+
defaultClassNames.weekday
|
|
1085
|
+
),
|
|
1086
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
1087
|
+
week_number_header: cn(
|
|
1088
|
+
"w-(--cell-size) select-none",
|
|
1089
|
+
defaultClassNames.week_number_header
|
|
1090
|
+
),
|
|
1091
|
+
week_number: cn(
|
|
1092
|
+
"text-[0.8rem] text-muted-foreground select-none",
|
|
1093
|
+
defaultClassNames.week_number
|
|
1094
|
+
),
|
|
1095
|
+
day: cn(
|
|
1096
|
+
"group/day relative aspect-square h-full w-full p-0 text-center select-none",
|
|
1097
|
+
defaultClassNames.day
|
|
1098
|
+
),
|
|
1099
|
+
range_start: cn("bg-accent", defaultClassNames.range_start),
|
|
1100
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
1101
|
+
range_end: cn("bg-accent", defaultClassNames.range_end),
|
|
1102
|
+
today: cn(
|
|
1103
|
+
"bg-accent text-accent-foreground",
|
|
1104
|
+
defaultClassNames.today
|
|
1105
|
+
),
|
|
1106
|
+
outside: cn(
|
|
1107
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
1108
|
+
defaultClassNames.outside
|
|
1109
|
+
),
|
|
1110
|
+
disabled: cn(
|
|
1111
|
+
"text-muted-foreground opacity-50",
|
|
1112
|
+
defaultClassNames.disabled
|
|
1113
|
+
),
|
|
1114
|
+
hidden: cn("invisible", defaultClassNames.hidden)
|
|
1115
|
+
}, classNames),
|
|
1116
|
+
components: __spreadValues({
|
|
1117
|
+
Root: CalendarRoot,
|
|
1118
|
+
Chevron: CalendarChevron,
|
|
1119
|
+
DayButton: CalendarDayButton,
|
|
1120
|
+
WeekNumber: CalendarWeekNumber
|
|
1121
|
+
}, components),
|
|
1122
|
+
formatters: __spreadValues({
|
|
1123
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" })
|
|
1124
|
+
}, formatters),
|
|
1125
|
+
showOutsideDays
|
|
1126
|
+
}, props)
|
|
1127
|
+
);
|
|
1128
|
+
}
|
|
1129
|
+
function CalendarDayButton(_a) {
|
|
1130
|
+
var _b = _a, {
|
|
1131
|
+
className,
|
|
1132
|
+
day,
|
|
1133
|
+
modifiers
|
|
1134
|
+
} = _b, props = __objRest(_b, [
|
|
1135
|
+
"className",
|
|
1136
|
+
"day",
|
|
1137
|
+
"modifiers"
|
|
1138
|
+
]);
|
|
1139
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1140
|
+
const ref = React3.useRef(null);
|
|
1141
|
+
React3.useEffect(() => {
|
|
1142
|
+
var _a2;
|
|
1143
|
+
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
1144
|
+
}, [modifiers.focused]);
|
|
1145
|
+
const selectedSingle = modifiers.selected && !modifiers.range_start && !modifiers.range_end ? !modifiers.range_middle : null;
|
|
1146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1147
|
+
Button,
|
|
1148
|
+
__spreadValues({
|
|
1149
|
+
className: cn(
|
|
1150
|
+
"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal rounded-none group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
1151
|
+
defaultClassNames.day,
|
|
1152
|
+
className
|
|
1153
|
+
),
|
|
1154
|
+
"data-day": day.date.toLocaleDateString(),
|
|
1155
|
+
"data-range-end": modifiers.range_end,
|
|
1156
|
+
"data-range-middle": modifiers.range_middle,
|
|
1157
|
+
"data-range-start": modifiers.range_start,
|
|
1158
|
+
"data-selected-single": selectedSingle,
|
|
1159
|
+
ref,
|
|
1160
|
+
size: "icon",
|
|
1161
|
+
variant: "ghost"
|
|
1162
|
+
}, props)
|
|
1163
|
+
);
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
// src/components/ui/card.tsx
|
|
1167
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1168
|
+
function Card(_a) {
|
|
1169
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1171
|
+
"div",
|
|
1172
|
+
__spreadValues({
|
|
1173
|
+
className: cn(
|
|
1174
|
+
"flex flex-col gap-6 border bg-card py-6 text-card-foreground shadow-sm",
|
|
1175
|
+
className
|
|
1176
|
+
),
|
|
1177
|
+
"data-slot": "card"
|
|
1178
|
+
}, props)
|
|
1179
|
+
);
|
|
1180
|
+
}
|
|
1181
|
+
function CardHeader(_a) {
|
|
1182
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1184
|
+
"div",
|
|
1185
|
+
__spreadValues({
|
|
1186
|
+
className: cn(
|
|
1187
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
1188
|
+
className
|
|
1189
|
+
),
|
|
1190
|
+
"data-slot": "card-header"
|
|
1191
|
+
}, props)
|
|
1192
|
+
);
|
|
1193
|
+
}
|
|
1194
|
+
function CardTitle(_a) {
|
|
1195
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1197
|
+
"div",
|
|
1198
|
+
__spreadValues({
|
|
1199
|
+
className: cn("leading-none font-semibold", className),
|
|
1200
|
+
"data-slot": "card-title"
|
|
1201
|
+
}, props)
|
|
1202
|
+
);
|
|
1203
|
+
}
|
|
1204
|
+
function CardDescription(_a) {
|
|
1205
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1207
|
+
"div",
|
|
1208
|
+
__spreadValues({
|
|
1209
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1210
|
+
"data-slot": "card-description"
|
|
1211
|
+
}, props)
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
function CardAction(_a) {
|
|
1215
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1217
|
+
"div",
|
|
1218
|
+
__spreadValues({
|
|
1219
|
+
className: cn(
|
|
1220
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
1221
|
+
className
|
|
1222
|
+
),
|
|
1223
|
+
"data-slot": "card-action"
|
|
1224
|
+
}, props)
|
|
1225
|
+
);
|
|
1226
|
+
}
|
|
1227
|
+
function CardContent(_a) {
|
|
1228
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1230
|
+
"div",
|
|
1231
|
+
__spreadValues({
|
|
1232
|
+
className: cn("px-6", className),
|
|
1233
|
+
"data-slot": "card-content"
|
|
1234
|
+
}, props)
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
function CardFooter(_a) {
|
|
1238
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1240
|
+
"div",
|
|
1241
|
+
__spreadValues({
|
|
1242
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
1243
|
+
"data-slot": "card-footer"
|
|
1244
|
+
}, props)
|
|
1245
|
+
);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
// src/components/ui/checkbox.tsx
|
|
1249
|
+
var import_react3 = require("react");
|
|
1250
|
+
var import_lucide_react4 = require("lucide-react");
|
|
1251
|
+
var import_checkbox = require("@base-ui/react/checkbox");
|
|
1252
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1253
|
+
function Checkbox(_a) {
|
|
1254
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1256
|
+
import_checkbox.Checkbox.Root,
|
|
1257
|
+
__spreadProps(__spreadValues({
|
|
1258
|
+
className: cn(
|
|
1259
|
+
"peer group inline-flex size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-all outline-none",
|
|
1260
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
1261
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1262
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20",
|
|
1263
|
+
"data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground",
|
|
1264
|
+
"data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground",
|
|
1265
|
+
// Dark mode (upstream shadcn)
|
|
1266
|
+
"dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary",
|
|
1267
|
+
// Stacked (2 attr selectors) → wins over single-attr rules above
|
|
1268
|
+
"aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive aria-invalid:data-checked:text-destructive-foreground",
|
|
1269
|
+
"aria-invalid:data-indeterminate:border-destructive aria-invalid:data-indeterminate:bg-destructive aria-invalid:data-indeterminate:text-destructive-foreground",
|
|
1270
|
+
className
|
|
1271
|
+
),
|
|
1272
|
+
"data-slot": "checkbox"
|
|
1273
|
+
}, props), {
|
|
1274
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1275
|
+
import_checkbox.Checkbox.Indicator,
|
|
1276
|
+
{
|
|
1277
|
+
className: "grid place-content-center text-current transition-none",
|
|
1278
|
+
"data-slot": "checkbox-indicator",
|
|
1279
|
+
children: [
|
|
1280
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.CheckIcon, { className: "size-3.5 group-data-indeterminate:hidden" }),
|
|
1281
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.MinusIcon, { className: "size-3.5 hidden group-data-indeterminate:block" })
|
|
1282
|
+
]
|
|
1283
|
+
}
|
|
1284
|
+
)
|
|
1285
|
+
})
|
|
1286
|
+
);
|
|
1287
|
+
}
|
|
1288
|
+
function CheckboxCard(_a) {
|
|
1289
|
+
var _b = _a, {
|
|
1290
|
+
className,
|
|
1291
|
+
checked,
|
|
1292
|
+
defaultChecked,
|
|
1293
|
+
onCheckedChange,
|
|
1294
|
+
disabled,
|
|
1295
|
+
error,
|
|
1296
|
+
label,
|
|
1297
|
+
description
|
|
1298
|
+
} = _b, props = __objRest(_b, [
|
|
1299
|
+
"className",
|
|
1300
|
+
"checked",
|
|
1301
|
+
"defaultChecked",
|
|
1302
|
+
"onCheckedChange",
|
|
1303
|
+
"disabled",
|
|
1304
|
+
"error",
|
|
1305
|
+
"label",
|
|
1306
|
+
"description"
|
|
1307
|
+
]);
|
|
1308
|
+
const [internalChecked, setInternalChecked] = (0, import_react3.useState)(
|
|
1309
|
+
Boolean(defaultChecked)
|
|
1310
|
+
);
|
|
1311
|
+
const resolvedChecked = checked != null ? checked : internalChecked;
|
|
1312
|
+
const isTinted = resolvedChecked;
|
|
1313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1314
|
+
"label",
|
|
1315
|
+
{
|
|
1316
|
+
className: cn(
|
|
1317
|
+
"flex items-start gap-3 border border-border p-4 font-sans transition-colors cursor-pointer",
|
|
1318
|
+
error ? ["border-destructive", isTinted && "bg-destructive/5"] : isTinted && "border-primary bg-primary/5",
|
|
1319
|
+
disabled && "cursor-not-allowed opacity-50",
|
|
1320
|
+
className
|
|
1321
|
+
),
|
|
1322
|
+
"data-slot": "checkbox-card",
|
|
1323
|
+
children: [
|
|
1324
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1325
|
+
Checkbox,
|
|
1326
|
+
__spreadValues({
|
|
1327
|
+
"aria-invalid": error || void 0,
|
|
1328
|
+
checked: resolvedChecked,
|
|
1329
|
+
className: "mt-0.5",
|
|
1330
|
+
disabled,
|
|
1331
|
+
onCheckedChange: (value, event) => {
|
|
1332
|
+
setInternalChecked(value);
|
|
1333
|
+
onCheckedChange == null ? void 0 : onCheckedChange(value, event);
|
|
1334
|
+
}
|
|
1335
|
+
}, props)
|
|
1336
|
+
),
|
|
1337
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1338
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-sm font-medium leading-none", children: label }),
|
|
1339
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-sm text-muted-foreground", children: description }) : null
|
|
1340
|
+
] })
|
|
1341
|
+
]
|
|
1342
|
+
}
|
|
1343
|
+
);
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
// src/components/ui/chip.tsx
|
|
1347
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1348
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1349
|
+
function Chip(_a) {
|
|
1350
|
+
var _b = _a, {
|
|
1351
|
+
className,
|
|
1352
|
+
variant = "secondary",
|
|
1353
|
+
onRemove,
|
|
1354
|
+
disabled,
|
|
1355
|
+
children
|
|
1356
|
+
} = _b, props = __objRest(_b, [
|
|
1357
|
+
"className",
|
|
1358
|
+
"variant",
|
|
1359
|
+
"onRemove",
|
|
1360
|
+
"disabled",
|
|
1361
|
+
"children"
|
|
1362
|
+
]);
|
|
1363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1364
|
+
"span",
|
|
1365
|
+
__spreadProps(__spreadValues({
|
|
1366
|
+
"aria-disabled": disabled,
|
|
1367
|
+
className: cn(
|
|
1368
|
+
badgeVariants({ variant }),
|
|
1369
|
+
// extra right padding only when dismiss button is present
|
|
1370
|
+
onRemove && "pr-1",
|
|
1371
|
+
disabled && "pointer-events-none opacity-50",
|
|
1372
|
+
className
|
|
1373
|
+
),
|
|
1374
|
+
"data-slot": "chip",
|
|
1375
|
+
"data-variant": variant
|
|
1376
|
+
}, props), {
|
|
1377
|
+
children: [
|
|
1378
|
+
children,
|
|
1379
|
+
onRemove ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1380
|
+
"button",
|
|
1381
|
+
{
|
|
1382
|
+
"aria-label": "Remove",
|
|
1383
|
+
className: "ml-0.5 inline-flex shrink-0 items-center justify-center rounded-full p-0.5 opacity-60 hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none",
|
|
1384
|
+
"data-slot": "chip-remove",
|
|
1385
|
+
disabled,
|
|
1386
|
+
onClick: (e) => {
|
|
1387
|
+
e.stopPropagation();
|
|
1388
|
+
onRemove();
|
|
1389
|
+
},
|
|
1390
|
+
type: "button",
|
|
1391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react5.X, { className: "size-3" })
|
|
1392
|
+
}
|
|
1393
|
+
) : null
|
|
1394
|
+
]
|
|
1395
|
+
})
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
// src/components/ui/data-table.tsx
|
|
1400
|
+
var React4 = __toESM(require("react"));
|
|
1401
|
+
var import_react_table = require("@tanstack/react-table");
|
|
1402
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1403
|
+
|
|
1404
|
+
// src/components/ui/table.tsx
|
|
1405
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1406
|
+
function Table(_a) {
|
|
1407
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1409
|
+
"div",
|
|
1410
|
+
{
|
|
1411
|
+
className: "relative w-full overflow-x-auto",
|
|
1412
|
+
"data-slot": "table-container",
|
|
1413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1414
|
+
"table",
|
|
1415
|
+
__spreadValues({
|
|
1416
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
1417
|
+
"data-slot": "table"
|
|
1418
|
+
}, props)
|
|
1419
|
+
)
|
|
1420
|
+
}
|
|
1421
|
+
);
|
|
1422
|
+
}
|
|
1423
|
+
function TableHeader(_a) {
|
|
1424
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1426
|
+
"thead",
|
|
1427
|
+
__spreadValues({
|
|
1428
|
+
className: cn("[&_tr]:border-b", className),
|
|
1429
|
+
"data-slot": "table-header"
|
|
1430
|
+
}, props)
|
|
1431
|
+
);
|
|
1432
|
+
}
|
|
1433
|
+
function TableBody(_a) {
|
|
1434
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1436
|
+
"tbody",
|
|
1437
|
+
__spreadValues({
|
|
1438
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
1439
|
+
"data-slot": "table-body"
|
|
1440
|
+
}, props)
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
function TableFooter(_a) {
|
|
1444
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1446
|
+
"tfoot",
|
|
1447
|
+
__spreadValues({
|
|
1448
|
+
className: cn(
|
|
1449
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
1450
|
+
className
|
|
1451
|
+
),
|
|
1452
|
+
"data-slot": "table-footer"
|
|
1453
|
+
}, props)
|
|
1454
|
+
);
|
|
1455
|
+
}
|
|
1456
|
+
function TableRow(_a) {
|
|
1457
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1459
|
+
"tr",
|
|
1460
|
+
__spreadValues({
|
|
1461
|
+
className: cn(
|
|
1462
|
+
"border-b transition-[background-color,opacity] hover:bg-muted/50 data-[state=selected]:bg-primary/10",
|
|
1463
|
+
className
|
|
1464
|
+
),
|
|
1465
|
+
"data-slot": "table-row"
|
|
1466
|
+
}, props)
|
|
1467
|
+
);
|
|
1468
|
+
}
|
|
1469
|
+
function TableHead(_a) {
|
|
1470
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1472
|
+
"th",
|
|
1473
|
+
__spreadValues({
|
|
1474
|
+
className: cn(
|
|
1475
|
+
"h-10 px-4 text-left align-middle font-medium whitespace-nowrap text-muted-foreground",
|
|
1476
|
+
"[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1477
|
+
className
|
|
1478
|
+
),
|
|
1479
|
+
"data-slot": "table-head"
|
|
1480
|
+
}, props)
|
|
1481
|
+
);
|
|
1482
|
+
}
|
|
1483
|
+
function TableCell(_a) {
|
|
1484
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1486
|
+
"td",
|
|
1487
|
+
__spreadValues({
|
|
1488
|
+
className: cn(
|
|
1489
|
+
"px-4 py-3 align-middle whitespace-nowrap",
|
|
1490
|
+
"[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1491
|
+
className
|
|
1492
|
+
),
|
|
1493
|
+
"data-slot": "table-cell"
|
|
1494
|
+
}, props)
|
|
1495
|
+
);
|
|
1496
|
+
}
|
|
1497
|
+
function TableCaption(_a) {
|
|
1498
|
+
var _b = _a, {
|
|
1499
|
+
className
|
|
1500
|
+
} = _b, props = __objRest(_b, [
|
|
1501
|
+
"className"
|
|
1502
|
+
]);
|
|
1503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1504
|
+
"caption",
|
|
1505
|
+
__spreadValues({
|
|
1506
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
1507
|
+
"data-slot": "table-caption"
|
|
1508
|
+
}, props)
|
|
1509
|
+
);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
// src/components/ui/input.tsx
|
|
1513
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1514
|
+
function Input(_a) {
|
|
1515
|
+
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
1516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1517
|
+
"input",
|
|
1518
|
+
__spreadValues({
|
|
1519
|
+
className: cn(
|
|
1520
|
+
"h-9 w-full min-w-0 border border-input bg-transparent px-3 py-1 text-base font-sans shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
|
|
1521
|
+
"focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20",
|
|
1522
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
1523
|
+
className
|
|
1524
|
+
),
|
|
1525
|
+
"data-slot": "input",
|
|
1526
|
+
type
|
|
1527
|
+
}, props)
|
|
1528
|
+
);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
// src/components/ui/select.tsx
|
|
1532
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1533
|
+
var import_select = require("@base-ui/react/select");
|
|
1534
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1535
|
+
function Select(_a) {
|
|
1536
|
+
var props = __objRest(_a, []);
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_select.Select.Root, __spreadValues({ "data-slot": "select" }, props));
|
|
1538
|
+
}
|
|
1539
|
+
function SelectGroup(_a) {
|
|
1540
|
+
var props = __objRest(_a, []);
|
|
1541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_select.Select.Group, __spreadValues({ "data-slot": "select-group" }, props));
|
|
1542
|
+
}
|
|
1543
|
+
function SelectValue(_a) {
|
|
1544
|
+
var props = __objRest(_a, []);
|
|
1545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_select.Select.Value, __spreadValues({ "data-slot": "select-value" }, props));
|
|
1546
|
+
}
|
|
1547
|
+
function SelectTrigger(_a) {
|
|
1548
|
+
var _b = _a, {
|
|
1549
|
+
className,
|
|
1550
|
+
size = "default",
|
|
1551
|
+
children
|
|
1552
|
+
} = _b, props = __objRest(_b, [
|
|
1553
|
+
"className",
|
|
1554
|
+
"size",
|
|
1555
|
+
"children"
|
|
1556
|
+
]);
|
|
1557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1558
|
+
import_select.Select.Trigger,
|
|
1559
|
+
__spreadProps(__spreadValues({
|
|
1560
|
+
className: cn(
|
|
1561
|
+
"flex w-fit items-center justify-between gap-2 border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20 data-popup-open:border-primary data-popup-open:ring-[3px] data-popup-open:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *: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",
|
|
1562
|
+
className
|
|
1563
|
+
),
|
|
1564
|
+
"data-size": size,
|
|
1565
|
+
"data-slot": "select-trigger"
|
|
1566
|
+
}, props), {
|
|
1567
|
+
children: [
|
|
1568
|
+
children,
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_select.Select.Icon, { className: "transition-transform duration-200 data-popup-open:rotate-180", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
1570
|
+
]
|
|
1571
|
+
})
|
|
1572
|
+
);
|
|
1573
|
+
}
|
|
1574
|
+
function SelectContent(_a) {
|
|
1575
|
+
var _b = _a, {
|
|
1576
|
+
className,
|
|
1577
|
+
children,
|
|
1578
|
+
style: style2
|
|
1579
|
+
} = _b, props = __objRest(_b, [
|
|
1580
|
+
"className",
|
|
1581
|
+
"children",
|
|
1582
|
+
"style"
|
|
1583
|
+
]);
|
|
1584
|
+
const themeVars = useThemeVars();
|
|
1585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_select.Select.Positioner, { align: "start", alignItemWithTrigger: false, sideOffset: 4, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1586
|
+
import_select.Select.Popup,
|
|
1587
|
+
__spreadProps(__spreadValues({
|
|
1588
|
+
className: cn(
|
|
1589
|
+
"relative z-50 max-h-[var(--available-height)] min-w-[8rem] overflow-x-hidden overflow-y-auto border bg-popover p-1 text-popover-foreground shadow-md 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 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
1590
|
+
className
|
|
1591
|
+
),
|
|
1592
|
+
"data-slot": "select-content",
|
|
1593
|
+
style: __spreadValues(__spreadValues({}, themeVars), style2)
|
|
1594
|
+
}, props), {
|
|
1595
|
+
children: [
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SelectScrollUpButton, {}),
|
|
1597
|
+
children,
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SelectScrollDownButton, {})
|
|
1599
|
+
]
|
|
1600
|
+
})
|
|
1601
|
+
) }) });
|
|
1602
|
+
}
|
|
1603
|
+
function SelectLabel(_a) {
|
|
1604
|
+
var _b = _a, {
|
|
1605
|
+
className
|
|
1606
|
+
} = _b, props = __objRest(_b, [
|
|
1607
|
+
"className"
|
|
1608
|
+
]);
|
|
1609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1610
|
+
import_select.Select.GroupLabel,
|
|
1611
|
+
__spreadValues({
|
|
1612
|
+
className: cn("px-2 py-1.5 text-xs font-semibold text-muted-foreground", className),
|
|
1613
|
+
"data-slot": "select-label"
|
|
1614
|
+
}, props)
|
|
1615
|
+
);
|
|
1616
|
+
}
|
|
1617
|
+
function SelectItem(_a) {
|
|
1618
|
+
var _b = _a, {
|
|
1619
|
+
className,
|
|
1620
|
+
children
|
|
1621
|
+
} = _b, props = __objRest(_b, [
|
|
1622
|
+
"className",
|
|
1623
|
+
"children"
|
|
1624
|
+
]);
|
|
1625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1626
|
+
import_select.Select.Item,
|
|
1627
|
+
__spreadProps(__spreadValues({
|
|
1628
|
+
className: cn(
|
|
1629
|
+
"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-primary/5 data-highlighted:text-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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1630
|
+
className
|
|
1631
|
+
),
|
|
1632
|
+
"data-slot": "select-item"
|
|
1633
|
+
}, props), {
|
|
1634
|
+
children: [
|
|
1635
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1636
|
+
"span",
|
|
1637
|
+
{
|
|
1638
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
1639
|
+
"data-slot": "select-item-indicator",
|
|
1640
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_select.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.CheckIcon, { className: "size-4" }) })
|
|
1641
|
+
}
|
|
1642
|
+
),
|
|
1643
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_select.Select.ItemText, { children })
|
|
1644
|
+
]
|
|
1645
|
+
})
|
|
1646
|
+
);
|
|
1647
|
+
}
|
|
1648
|
+
function SelectSeparator(_a) {
|
|
1649
|
+
var _b = _a, {
|
|
1650
|
+
className
|
|
1651
|
+
} = _b, props = __objRest(_b, [
|
|
1652
|
+
"className"
|
|
1653
|
+
]);
|
|
1654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1655
|
+
"div",
|
|
1656
|
+
__spreadValues({
|
|
1657
|
+
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
1658
|
+
"data-slot": "select-separator",
|
|
1659
|
+
role: "separator"
|
|
1660
|
+
}, props)
|
|
1661
|
+
);
|
|
1662
|
+
}
|
|
1663
|
+
function SelectScrollUpButton(_a) {
|
|
1664
|
+
var _b = _a, {
|
|
1665
|
+
className
|
|
1666
|
+
} = _b, props = __objRest(_b, [
|
|
1667
|
+
"className"
|
|
1668
|
+
]);
|
|
1669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1670
|
+
import_select.Select.ScrollUpArrow,
|
|
1671
|
+
__spreadProps(__spreadValues({
|
|
1672
|
+
className: cn(
|
|
1673
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1674
|
+
className
|
|
1675
|
+
),
|
|
1676
|
+
"data-slot": "select-scroll-up-button"
|
|
1677
|
+
}, props), {
|
|
1678
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.ChevronUpIcon, { className: "size-4" })
|
|
1679
|
+
})
|
|
1680
|
+
);
|
|
1681
|
+
}
|
|
1682
|
+
function SelectScrollDownButton(_a) {
|
|
1683
|
+
var _b = _a, {
|
|
1684
|
+
className
|
|
1685
|
+
} = _b, props = __objRest(_b, [
|
|
1686
|
+
"className"
|
|
1687
|
+
]);
|
|
1688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1689
|
+
import_select.Select.ScrollDownArrow,
|
|
1690
|
+
__spreadProps(__spreadValues({
|
|
1691
|
+
className: cn(
|
|
1692
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1693
|
+
className
|
|
1694
|
+
),
|
|
1695
|
+
"data-slot": "select-scroll-down-button"
|
|
1696
|
+
}, props), {
|
|
1697
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.ChevronDownIcon, { className: "size-4" })
|
|
1698
|
+
})
|
|
1699
|
+
);
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1703
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1704
|
+
var import_menu = require("@base-ui/react/menu");
|
|
1705
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1706
|
+
function DropdownMenu(_a) {
|
|
1707
|
+
var props = __objRest(_a, []);
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
|
|
1709
|
+
}
|
|
1710
|
+
function DropdownMenuPortal(_a) {
|
|
1711
|
+
var props = __objRest(_a, []);
|
|
1712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.Portal, __spreadValues({ "data-slot": "dropdown-menu-portal" }, props));
|
|
1713
|
+
}
|
|
1714
|
+
function DropdownMenuTrigger(_a) {
|
|
1715
|
+
var props = __objRest(_a, []);
|
|
1716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1717
|
+
import_menu.Menu.Trigger,
|
|
1718
|
+
__spreadValues({
|
|
1719
|
+
"data-slot": "dropdown-menu-trigger"
|
|
1720
|
+
}, props)
|
|
1721
|
+
);
|
|
1722
|
+
}
|
|
1723
|
+
function DropdownMenuContent(_a) {
|
|
1724
|
+
var _b = _a, {
|
|
1725
|
+
className,
|
|
1726
|
+
sideOffset = 4,
|
|
1727
|
+
style: style2
|
|
1728
|
+
} = _b, props = __objRest(_b, [
|
|
1729
|
+
"className",
|
|
1730
|
+
"sideOffset",
|
|
1731
|
+
"style"
|
|
1732
|
+
]);
|
|
1733
|
+
const themeVars = useThemeVars();
|
|
1734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.Positioner, { sideOffset, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1735
|
+
import_menu.Menu.Popup,
|
|
1736
|
+
__spreadValues({
|
|
1737
|
+
className: cn(
|
|
1738
|
+
"z-50 min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-none border bg-popover p-1 text-popover-foreground shadow-md 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 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
1739
|
+
className
|
|
1740
|
+
),
|
|
1741
|
+
"data-slot": "dropdown-menu-content",
|
|
1742
|
+
style: __spreadValues(__spreadValues({}, themeVars), style2)
|
|
1743
|
+
}, props)
|
|
1744
|
+
) }) });
|
|
1745
|
+
}
|
|
1746
|
+
function DropdownMenuGroup(_a) {
|
|
1747
|
+
var props = __objRest(_a, []);
|
|
1748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.Group, __spreadValues({ "data-slot": "dropdown-menu-group" }, props));
|
|
1749
|
+
}
|
|
1750
|
+
function DropdownMenuItem(_a) {
|
|
1751
|
+
var _b = _a, {
|
|
1752
|
+
className,
|
|
1753
|
+
inset,
|
|
1754
|
+
variant = "default"
|
|
1755
|
+
} = _b, props = __objRest(_b, [
|
|
1756
|
+
"className",
|
|
1757
|
+
"inset",
|
|
1758
|
+
"variant"
|
|
1759
|
+
]);
|
|
1760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1761
|
+
import_menu.Menu.Item,
|
|
1762
|
+
__spreadValues({
|
|
1763
|
+
className: cn(
|
|
1764
|
+
"relative flex cursor-default items-center gap-2 rounded-none 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 data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
1765
|
+
className
|
|
1766
|
+
),
|
|
1767
|
+
"data-inset": inset,
|
|
1768
|
+
"data-slot": "dropdown-menu-item",
|
|
1769
|
+
"data-variant": variant
|
|
1770
|
+
}, props)
|
|
1771
|
+
);
|
|
1772
|
+
}
|
|
1773
|
+
function DropdownMenuCheckboxItem(_a) {
|
|
1774
|
+
var _b = _a, {
|
|
1775
|
+
className,
|
|
1776
|
+
children,
|
|
1777
|
+
checked
|
|
1778
|
+
} = _b, props = __objRest(_b, [
|
|
1779
|
+
"className",
|
|
1780
|
+
"children",
|
|
1781
|
+
"checked"
|
|
1782
|
+
]);
|
|
1783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1784
|
+
import_menu.Menu.CheckboxItem,
|
|
1785
|
+
__spreadProps(__spreadValues({
|
|
1786
|
+
checked,
|
|
1787
|
+
className: cn(
|
|
1788
|
+
"relative flex cursor-default items-center gap-2 rounded-none 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 data-checked:bg-primary/10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1789
|
+
className
|
|
1790
|
+
),
|
|
1791
|
+
"data-slot": "dropdown-menu-checkbox-item"
|
|
1792
|
+
}, props), {
|
|
1793
|
+
children: [
|
|
1794
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react7.CheckIcon, { className: "size-4" }) }) }),
|
|
1795
|
+
children
|
|
1796
|
+
]
|
|
1797
|
+
})
|
|
1798
|
+
);
|
|
1799
|
+
}
|
|
1800
|
+
function DropdownMenuRadioGroup(_a) {
|
|
1801
|
+
var props = __objRest(_a, []);
|
|
1802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1803
|
+
import_menu.Menu.RadioGroup,
|
|
1804
|
+
__spreadValues({
|
|
1805
|
+
"data-slot": "dropdown-menu-radio-group"
|
|
1806
|
+
}, props)
|
|
1807
|
+
);
|
|
1808
|
+
}
|
|
1809
|
+
function DropdownMenuRadioItem(_a) {
|
|
1810
|
+
var _b = _a, {
|
|
1811
|
+
className,
|
|
1812
|
+
children
|
|
1813
|
+
} = _b, props = __objRest(_b, [
|
|
1814
|
+
"className",
|
|
1815
|
+
"children"
|
|
1816
|
+
]);
|
|
1817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1818
|
+
import_menu.Menu.RadioItem,
|
|
1819
|
+
__spreadProps(__spreadValues({
|
|
1820
|
+
className: cn(
|
|
1821
|
+
"relative flex cursor-default items-center gap-2 rounded-none 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 data-checked:bg-primary/10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1822
|
+
className
|
|
1823
|
+
),
|
|
1824
|
+
"data-slot": "dropdown-menu-radio-item"
|
|
1825
|
+
}, props), {
|
|
1826
|
+
children: [
|
|
1827
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.RadioItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react7.CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
1828
|
+
children
|
|
1829
|
+
]
|
|
1830
|
+
})
|
|
1831
|
+
);
|
|
1832
|
+
}
|
|
1833
|
+
function DropdownMenuLabel(_a) {
|
|
1834
|
+
var _b = _a, {
|
|
1835
|
+
className,
|
|
1836
|
+
inset
|
|
1837
|
+
} = _b, props = __objRest(_b, [
|
|
1838
|
+
"className",
|
|
1839
|
+
"inset"
|
|
1840
|
+
]);
|
|
1841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1842
|
+
import_menu.Menu.GroupLabel,
|
|
1843
|
+
__spreadValues({
|
|
1844
|
+
className: cn(
|
|
1845
|
+
"px-2 py-1.5 text-sm font-medium data-inset:pl-8",
|
|
1846
|
+
className
|
|
1847
|
+
),
|
|
1848
|
+
"data-inset": inset,
|
|
1849
|
+
"data-slot": "dropdown-menu-label"
|
|
1850
|
+
}, props)
|
|
1851
|
+
);
|
|
1852
|
+
}
|
|
1853
|
+
function DropdownMenuSeparator(_a) {
|
|
1854
|
+
var _b = _a, {
|
|
1855
|
+
className
|
|
1856
|
+
} = _b, props = __objRest(_b, [
|
|
1857
|
+
"className"
|
|
1858
|
+
]);
|
|
1859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1860
|
+
import_menu.Menu.Separator,
|
|
1861
|
+
__spreadValues({
|
|
1862
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1863
|
+
"data-slot": "dropdown-menu-separator"
|
|
1864
|
+
}, props)
|
|
1865
|
+
);
|
|
1866
|
+
}
|
|
1867
|
+
function DropdownMenuShortcut(_a) {
|
|
1868
|
+
var _b = _a, {
|
|
1869
|
+
className
|
|
1870
|
+
} = _b, props = __objRest(_b, [
|
|
1871
|
+
"className"
|
|
1872
|
+
]);
|
|
1873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1874
|
+
"span",
|
|
1875
|
+
__spreadValues({
|
|
1876
|
+
className: cn(
|
|
1877
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1878
|
+
className
|
|
1879
|
+
),
|
|
1880
|
+
"data-slot": "dropdown-menu-shortcut"
|
|
1881
|
+
}, props)
|
|
1882
|
+
);
|
|
1883
|
+
}
|
|
1884
|
+
function DropdownMenuSub(_a) {
|
|
1885
|
+
var props = __objRest(_a, []);
|
|
1886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.SubmenuRoot, __spreadValues({ "data-slot": "dropdown-menu-sub" }, props));
|
|
1887
|
+
}
|
|
1888
|
+
function DropdownMenuSubTrigger(_a) {
|
|
1889
|
+
var _b = _a, {
|
|
1890
|
+
className,
|
|
1891
|
+
inset,
|
|
1892
|
+
children
|
|
1893
|
+
} = _b, props = __objRest(_b, [
|
|
1894
|
+
"className",
|
|
1895
|
+
"inset",
|
|
1896
|
+
"children"
|
|
1897
|
+
]);
|
|
1898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1899
|
+
import_menu.Menu.SubmenuTrigger,
|
|
1900
|
+
__spreadProps(__spreadValues({
|
|
1901
|
+
className: cn(
|
|
1902
|
+
"flex cursor-default items-center gap-2 rounded-none px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
1903
|
+
className
|
|
1904
|
+
),
|
|
1905
|
+
"data-inset": inset,
|
|
1906
|
+
"data-slot": "dropdown-menu-sub-trigger"
|
|
1907
|
+
}, props), {
|
|
1908
|
+
children: [
|
|
1909
|
+
children,
|
|
1910
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react7.ChevronRightIcon, { className: "ml-auto size-4" })
|
|
1911
|
+
]
|
|
1912
|
+
})
|
|
1913
|
+
);
|
|
1914
|
+
}
|
|
1915
|
+
function DropdownMenuSubContent(_a) {
|
|
1916
|
+
var _b = _a, {
|
|
1917
|
+
className,
|
|
1918
|
+
sideOffset = 0,
|
|
1919
|
+
style: style2
|
|
1920
|
+
} = _b, props = __objRest(_b, [
|
|
1921
|
+
"className",
|
|
1922
|
+
"sideOffset",
|
|
1923
|
+
"style"
|
|
1924
|
+
]);
|
|
1925
|
+
const themeVars = useThemeVars();
|
|
1926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_menu.Menu.Positioner, { sideOffset, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1927
|
+
import_menu.Menu.Popup,
|
|
1928
|
+
__spreadValues({
|
|
1929
|
+
className: cn(
|
|
1930
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-none border bg-popover p-1 text-popover-foreground shadow-lg 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 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
1931
|
+
className
|
|
1932
|
+
),
|
|
1933
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1934
|
+
style: __spreadValues(__spreadValues({}, themeVars), style2)
|
|
1935
|
+
}, props)
|
|
1936
|
+
) }) });
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
// src/components/ui/skeleton.tsx
|
|
1940
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1941
|
+
function Skeleton(_a) {
|
|
1942
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1944
|
+
"div",
|
|
1945
|
+
__spreadValues({
|
|
1946
|
+
className: cn("animate-pulse bg-muted", className),
|
|
1947
|
+
"data-slot": "skeleton"
|
|
1948
|
+
}, props)
|
|
1949
|
+
);
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
// src/components/ui/data-table.tsx
|
|
1953
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1954
|
+
function DataTableColumnHeader({
|
|
1955
|
+
column,
|
|
1956
|
+
title,
|
|
1957
|
+
className
|
|
1958
|
+
}) {
|
|
1959
|
+
if (!column.getCanSort()) {
|
|
1960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className, children: title });
|
|
1961
|
+
}
|
|
1962
|
+
const sorted = column.getIsSorted();
|
|
1963
|
+
let sortIcon;
|
|
1964
|
+
if (sorted === "asc") {
|
|
1965
|
+
sortIcon = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.ArrowUp, { className: "ml-1 size-3.5" });
|
|
1966
|
+
} else if (sorted === "desc") {
|
|
1967
|
+
sortIcon = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.ArrowDown, { className: "ml-1 size-3.5" });
|
|
1968
|
+
} else {
|
|
1969
|
+
sortIcon = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.ArrowUpDown, { className: "ml-1 size-3.5" });
|
|
1970
|
+
}
|
|
1971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1972
|
+
Button,
|
|
1973
|
+
{
|
|
1974
|
+
className: cn("-ml-3 h-8 font-medium text-muted-foreground hover:text-foreground", className),
|
|
1975
|
+
onClick: () => {
|
|
1976
|
+
column.toggleSorting(sorted === "asc");
|
|
1977
|
+
},
|
|
1978
|
+
size: "sm",
|
|
1979
|
+
variant: "ghost",
|
|
1980
|
+
children: [
|
|
1981
|
+
title,
|
|
1982
|
+
sortIcon
|
|
1983
|
+
]
|
|
1984
|
+
}
|
|
1985
|
+
);
|
|
1986
|
+
}
|
|
1987
|
+
function getSelectionColumn() {
|
|
1988
|
+
return {
|
|
1989
|
+
id: "select",
|
|
1990
|
+
header: ({ table }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1991
|
+
Checkbox,
|
|
1992
|
+
{
|
|
1993
|
+
"aria-label": "Select all",
|
|
1994
|
+
checked: table.getIsAllPageRowsSelected(),
|
|
1995
|
+
indeterminate: table.getIsSomePageRowsSelected() && !table.getIsAllPageRowsSelected(),
|
|
1996
|
+
onCheckedChange: (checked) => {
|
|
1997
|
+
table.toggleAllPageRowsSelected(Boolean(checked));
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
),
|
|
2001
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2002
|
+
Checkbox,
|
|
2003
|
+
{
|
|
2004
|
+
"aria-label": "Select row",
|
|
2005
|
+
checked: row.getIsSelected(),
|
|
2006
|
+
onCheckedChange: (checked) => {
|
|
2007
|
+
row.toggleSelected(Boolean(checked));
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
),
|
|
2011
|
+
enableSorting: false,
|
|
2012
|
+
enableHiding: false
|
|
2013
|
+
};
|
|
2014
|
+
}
|
|
2015
|
+
function DataTableToolbar({
|
|
2016
|
+
table,
|
|
2017
|
+
searchKey,
|
|
2018
|
+
searchPlaceholder,
|
|
2019
|
+
enableColumnVisibility
|
|
2020
|
+
}) {
|
|
2021
|
+
var _a;
|
|
2022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between gap-2 py-4", "data-slot": "data-table-toolbar", children: [
|
|
2023
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-1 items-center gap-2", children: searchKey ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2024
|
+
Input,
|
|
2025
|
+
{
|
|
2026
|
+
className: "max-w-xs",
|
|
2027
|
+
onChange: (e) => {
|
|
2028
|
+
var _a2;
|
|
2029
|
+
return (_a2 = table.getColumn(searchKey)) == null ? void 0 : _a2.setFilterValue(e.target.value);
|
|
2030
|
+
},
|
|
2031
|
+
placeholder: searchPlaceholder != null ? searchPlaceholder : `Filter ${searchKey}...`,
|
|
2032
|
+
value: (_a = table.getColumn(searchKey)) == null ? void 0 : _a.getFilterValue()
|
|
2033
|
+
}
|
|
2034
|
+
) : null }),
|
|
2035
|
+
enableColumnVisibility ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DropdownMenu, { children: [
|
|
2036
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2037
|
+
DropdownMenuTrigger,
|
|
2038
|
+
{
|
|
2039
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { className: "ml-auto h-8 gap-1.5", size: "sm", variant: "outline" }),
|
|
2040
|
+
children: [
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.SlidersHorizontal, { className: "size-3.5" }),
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "hidden sm:inline", children: "Columns" })
|
|
2043
|
+
]
|
|
2044
|
+
}
|
|
2045
|
+
),
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownMenuContent, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DropdownMenuGroup, { children: [
|
|
2047
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownMenuLabel, { children: "Toggle columns" }),
|
|
2048
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownMenuSeparator, {}),
|
|
2049
|
+
table.getAllColumns().filter((col) => col.getCanHide()).map((col) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2050
|
+
DropdownMenuCheckboxItem,
|
|
2051
|
+
{
|
|
2052
|
+
checked: col.getIsVisible(),
|
|
2053
|
+
className: "capitalize",
|
|
2054
|
+
onCheckedChange: (value) => {
|
|
2055
|
+
col.toggleVisibility(Boolean(value));
|
|
2056
|
+
},
|
|
2057
|
+
children: col.id
|
|
2058
|
+
},
|
|
2059
|
+
col.id
|
|
2060
|
+
))
|
|
2061
|
+
] }) })
|
|
2062
|
+
] }) : null
|
|
2063
|
+
] });
|
|
2064
|
+
}
|
|
2065
|
+
function DataTablePagination({
|
|
2066
|
+
table,
|
|
2067
|
+
pageSizeOptions = [10, 20, 30, 50]
|
|
2068
|
+
}) {
|
|
2069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2070
|
+
"div",
|
|
2071
|
+
{
|
|
2072
|
+
className: "flex items-center justify-between gap-4 py-4",
|
|
2073
|
+
"data-slot": "data-table-pagination",
|
|
2074
|
+
children: [
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-muted-foreground", children: table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
2076
|
+
table.getFilteredSelectedRowModel().rows.length,
|
|
2077
|
+
" of",
|
|
2078
|
+
" ",
|
|
2079
|
+
table.getFilteredRowModel().rows.length,
|
|
2080
|
+
" row(s) selected."
|
|
2081
|
+
] }) }),
|
|
2082
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-6", children: [
|
|
2083
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2084
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Rows per page" }),
|
|
2085
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2086
|
+
Select,
|
|
2087
|
+
{
|
|
2088
|
+
onValueChange: (value) => {
|
|
2089
|
+
table.setPageSize(Number(value));
|
|
2090
|
+
},
|
|
2091
|
+
value: `${table.getState().pagination.pageSize}`,
|
|
2092
|
+
children: [
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectTrigger, { className: "w-[70px]", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectValue, { placeholder: `${table.getState().pagination.pageSize}` }) }),
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { children: pageSizeOptions.map((pageSize) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
|
|
2095
|
+
]
|
|
2096
|
+
}
|
|
2097
|
+
)
|
|
2098
|
+
] }),
|
|
2099
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
2100
|
+
"Page ",
|
|
2101
|
+
table.getState().pagination.pageIndex + 1,
|
|
2102
|
+
" of ",
|
|
2103
|
+
table.getPageCount()
|
|
2104
|
+
] }),
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2107
|
+
Button,
|
|
2108
|
+
{
|
|
2109
|
+
"aria-label": "Go to first page",
|
|
2110
|
+
disabled: !table.getCanPreviousPage(),
|
|
2111
|
+
onClick: () => {
|
|
2112
|
+
table.setPageIndex(0);
|
|
2113
|
+
},
|
|
2114
|
+
size: "icon-sm",
|
|
2115
|
+
variant: "outline",
|
|
2116
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.ChevronsLeftIcon, { className: "size-4" })
|
|
2117
|
+
}
|
|
2118
|
+
),
|
|
2119
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2120
|
+
Button,
|
|
2121
|
+
{
|
|
2122
|
+
"aria-label": "Go to previous page",
|
|
2123
|
+
disabled: !table.getCanPreviousPage(),
|
|
2124
|
+
onClick: () => {
|
|
2125
|
+
table.previousPage();
|
|
2126
|
+
},
|
|
2127
|
+
size: "icon-sm",
|
|
2128
|
+
variant: "outline",
|
|
2129
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.ChevronLeftIcon, { className: "size-4" })
|
|
2130
|
+
}
|
|
2131
|
+
),
|
|
2132
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2133
|
+
Button,
|
|
2134
|
+
{
|
|
2135
|
+
"aria-label": "Go to next page",
|
|
2136
|
+
disabled: !table.getCanNextPage(),
|
|
2137
|
+
onClick: () => {
|
|
2138
|
+
table.nextPage();
|
|
2139
|
+
},
|
|
2140
|
+
size: "icon-sm",
|
|
2141
|
+
variant: "outline",
|
|
2142
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.ChevronRightIcon, { className: "size-4" })
|
|
2143
|
+
}
|
|
2144
|
+
),
|
|
2145
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2146
|
+
Button,
|
|
2147
|
+
{
|
|
2148
|
+
"aria-label": "Go to last page",
|
|
2149
|
+
disabled: !table.getCanNextPage(),
|
|
2150
|
+
onClick: () => {
|
|
2151
|
+
table.setPageIndex(table.getPageCount() - 1);
|
|
2152
|
+
},
|
|
2153
|
+
size: "icon-sm",
|
|
2154
|
+
variant: "outline",
|
|
2155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.ChevronsRightIcon, { className: "size-4" })
|
|
2156
|
+
}
|
|
2157
|
+
)
|
|
2158
|
+
] })
|
|
2159
|
+
] })
|
|
2160
|
+
]
|
|
2161
|
+
}
|
|
2162
|
+
);
|
|
2163
|
+
}
|
|
2164
|
+
function DataTableSkeleton({
|
|
2165
|
+
columnCount,
|
|
2166
|
+
rowCount = 5
|
|
2167
|
+
}) {
|
|
2168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: Array.from({ length: rowCount }).map((_, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableRow, { children: Array.from({ length: columnCount }).map((_inner, colIdx) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Skeleton, { className: "h-4 w-3/4" }) }, `skeleton-cell-${String(rowIdx)}-${String(colIdx)}`)) }, `skeleton-row-${String(rowIdx)}`)) });
|
|
2169
|
+
}
|
|
2170
|
+
function DataTable({
|
|
2171
|
+
columns: userColumns,
|
|
2172
|
+
data,
|
|
2173
|
+
searchKey,
|
|
2174
|
+
searchPlaceholder,
|
|
2175
|
+
enableRowSelection = false,
|
|
2176
|
+
enableColumnVisibility = false,
|
|
2177
|
+
pageSizeOptions = [10, 20, 30, 50],
|
|
2178
|
+
loading = false,
|
|
2179
|
+
skeletonRows = 5,
|
|
2180
|
+
onRowSelectionChange,
|
|
2181
|
+
className,
|
|
2182
|
+
toolbar,
|
|
2183
|
+
emptyText = "No results."
|
|
2184
|
+
}) {
|
|
2185
|
+
const [sorting, setSorting] = React4.useState([]);
|
|
2186
|
+
const [columnFilters, setColumnFilters] = React4.useState([]);
|
|
2187
|
+
const [columnVisibility, setColumnVisibility] = React4.useState({});
|
|
2188
|
+
const [rowSelection, setRowSelection] = React4.useState({});
|
|
2189
|
+
const resolvedColumns = React4.useMemo(() => {
|
|
2190
|
+
if (!enableRowSelection) return userColumns;
|
|
2191
|
+
return [getSelectionColumn(), ...userColumns];
|
|
2192
|
+
}, [userColumns, enableRowSelection]);
|
|
2193
|
+
const table = (0, import_react_table.useReactTable)({
|
|
2194
|
+
data,
|
|
2195
|
+
columns: resolvedColumns,
|
|
2196
|
+
state: {
|
|
2197
|
+
sorting,
|
|
2198
|
+
columnFilters,
|
|
2199
|
+
columnVisibility,
|
|
2200
|
+
rowSelection
|
|
2201
|
+
},
|
|
2202
|
+
onSortingChange: setSorting,
|
|
2203
|
+
onColumnFiltersChange: setColumnFilters,
|
|
2204
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
2205
|
+
onRowSelectionChange: (updater) => {
|
|
2206
|
+
const next = typeof updater === "function" ? updater(rowSelection) : updater;
|
|
2207
|
+
setRowSelection(next);
|
|
2208
|
+
onRowSelectionChange == null ? void 0 : onRowSelectionChange(next);
|
|
2209
|
+
},
|
|
2210
|
+
getCoreRowModel: (0, import_react_table.getCoreRowModel)(),
|
|
2211
|
+
getFilteredRowModel: (0, import_react_table.getFilteredRowModel)(),
|
|
2212
|
+
getPaginationRowModel: (0, import_react_table.getPaginationRowModel)(),
|
|
2213
|
+
getSortedRowModel: (0, import_react_table.getSortedRowModel)(),
|
|
2214
|
+
enableRowSelection
|
|
2215
|
+
});
|
|
2216
|
+
function renderTableBody() {
|
|
2217
|
+
if (loading) {
|
|
2218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DataTableSkeleton, { columnCount: resolvedColumns.length, rowCount: skeletonRows });
|
|
2219
|
+
}
|
|
2220
|
+
if (table.getRowModel().rows.length) {
|
|
2221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2222
|
+
TableRow,
|
|
2223
|
+
{
|
|
2224
|
+
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
2225
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableCell, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
|
|
2226
|
+
},
|
|
2227
|
+
row.id
|
|
2228
|
+
)) });
|
|
2229
|
+
}
|
|
2230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2231
|
+
TableCell,
|
|
2232
|
+
{
|
|
2233
|
+
className: "h-24 text-center text-muted-foreground",
|
|
2234
|
+
colSpan: resolvedColumns.length,
|
|
2235
|
+
children: emptyText
|
|
2236
|
+
}
|
|
2237
|
+
) });
|
|
2238
|
+
}
|
|
2239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cn("w-full font-sans", className), "data-slot": "data-table", children: [
|
|
2240
|
+
toolbar ? toolbar(table) : (searchKey || enableColumnVisibility) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2241
|
+
DataTableToolbar,
|
|
2242
|
+
{
|
|
2243
|
+
enableColumnVisibility,
|
|
2244
|
+
searchKey,
|
|
2245
|
+
searchPlaceholder,
|
|
2246
|
+
table
|
|
2247
|
+
}
|
|
2248
|
+
),
|
|
2249
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Table, { children: [
|
|
2250
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()) }, header.id)) }, headerGroup.id)) }),
|
|
2251
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableBody, { children: renderTableBody() })
|
|
2252
|
+
] }) }),
|
|
2253
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DataTablePagination, { pageSizeOptions, table })
|
|
2254
|
+
] });
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
// src/components/ui/date-picker.tsx
|
|
2258
|
+
var React5 = __toESM(require("react"));
|
|
2259
|
+
var import_date_fns = require("date-fns");
|
|
2260
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2261
|
+
|
|
2262
|
+
// src/components/ui/popover.tsx
|
|
2263
|
+
var import_popover = require("@base-ui/react/popover");
|
|
2264
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2265
|
+
function Popover(_a) {
|
|
2266
|
+
var props = __objRest(_a, []);
|
|
2267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
2268
|
+
}
|
|
2269
|
+
function PopoverTrigger(_a) {
|
|
2270
|
+
var props = __objRest(_a, []);
|
|
2271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
|
|
2272
|
+
}
|
|
2273
|
+
function PopoverContent(_a) {
|
|
2274
|
+
var _b = _a, {
|
|
2275
|
+
className,
|
|
2276
|
+
align = "center",
|
|
2277
|
+
sideOffset = 4,
|
|
2278
|
+
style: style2
|
|
2279
|
+
} = _b, props = __objRest(_b, [
|
|
2280
|
+
"className",
|
|
2281
|
+
"align",
|
|
2282
|
+
"sideOffset",
|
|
2283
|
+
"style"
|
|
2284
|
+
]);
|
|
2285
|
+
const themeVars = useThemeVars();
|
|
2286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2287
|
+
import_popover.Popover.Positioner,
|
|
2288
|
+
{
|
|
2289
|
+
align,
|
|
2290
|
+
sideOffset,
|
|
2291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2292
|
+
import_popover.Popover.Popup,
|
|
2293
|
+
__spreadValues({
|
|
2294
|
+
className: cn(
|
|
2295
|
+
"z-50 w-72 border border-border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
2296
|
+
className
|
|
2297
|
+
),
|
|
2298
|
+
"data-slot": "popover-content",
|
|
2299
|
+
style: __spreadValues(__spreadValues({}, themeVars), style2)
|
|
2300
|
+
}, props)
|
|
2301
|
+
)
|
|
2302
|
+
}
|
|
2303
|
+
) });
|
|
2304
|
+
}
|
|
2305
|
+
function PopoverAnchor(_a) {
|
|
2306
|
+
var props = __objRest(_a, []);
|
|
2307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", __spreadValues({ "data-slot": "popover-anchor" }, props));
|
|
2308
|
+
}
|
|
2309
|
+
function PopoverHeader(_a) {
|
|
2310
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2312
|
+
"div",
|
|
2313
|
+
__spreadValues({
|
|
2314
|
+
className: cn("flex flex-col gap-1 text-sm", className),
|
|
2315
|
+
"data-slot": "popover-header"
|
|
2316
|
+
}, props)
|
|
2317
|
+
);
|
|
2318
|
+
}
|
|
2319
|
+
function PopoverTitle(_a) {
|
|
2320
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2321
|
+
return (
|
|
2322
|
+
// eslint-disable-next-line jsx-a11y/heading-has-content -- children passed via props spread
|
|
2323
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2324
|
+
"h2",
|
|
2325
|
+
__spreadValues({
|
|
2326
|
+
className: cn("font-medium", className),
|
|
2327
|
+
"data-slot": "popover-title"
|
|
2328
|
+
}, props)
|
|
2329
|
+
)
|
|
2330
|
+
);
|
|
2331
|
+
}
|
|
2332
|
+
function PopoverDescription(_a) {
|
|
2333
|
+
var _b = _a, {
|
|
2334
|
+
className
|
|
2335
|
+
} = _b, props = __objRest(_b, [
|
|
2336
|
+
"className"
|
|
2337
|
+
]);
|
|
2338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2339
|
+
"p",
|
|
2340
|
+
__spreadValues({
|
|
2341
|
+
className: cn("text-muted-foreground", className),
|
|
2342
|
+
"data-slot": "popover-description"
|
|
2343
|
+
}, props)
|
|
2344
|
+
);
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
// src/components/ui/date-picker.tsx
|
|
2348
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2349
|
+
function DatePicker({
|
|
2350
|
+
value,
|
|
2351
|
+
onChange,
|
|
2352
|
+
placeholder = "Pick a date",
|
|
2353
|
+
showTimePicker = false,
|
|
2354
|
+
disabled = false,
|
|
2355
|
+
className,
|
|
2356
|
+
calendarProps
|
|
2357
|
+
}) {
|
|
2358
|
+
const [open, setOpen] = React5.useState(false);
|
|
2359
|
+
function handleDaySelect(day) {
|
|
2360
|
+
if (!day) {
|
|
2361
|
+
onChange == null ? void 0 : onChange(void 0);
|
|
2362
|
+
return;
|
|
2363
|
+
}
|
|
2364
|
+
if (showTimePicker && value) {
|
|
2365
|
+
day.setHours(value.getHours(), value.getMinutes());
|
|
2366
|
+
}
|
|
2367
|
+
onChange == null ? void 0 : onChange(day);
|
|
2368
|
+
if (!showTimePicker) setOpen(false);
|
|
2369
|
+
}
|
|
2370
|
+
function handleTimeChange(e) {
|
|
2371
|
+
const [hours, minutes] = e.target.value.split(":").map(Number);
|
|
2372
|
+
const next = value ? new Date(value) : /* @__PURE__ */ new Date();
|
|
2373
|
+
next.setHours(hours, minutes, 0, 0);
|
|
2374
|
+
onChange == null ? void 0 : onChange(next);
|
|
2375
|
+
}
|
|
2376
|
+
const timeValue = value ? `${String(value.getHours()).padStart(2, "0")}:${String(value.getMinutes()).padStart(2, "0")}` : "";
|
|
2377
|
+
let displayValue;
|
|
2378
|
+
if (value && showTimePicker) {
|
|
2379
|
+
displayValue = (0, import_date_fns.format)(value, "dd/MM/yyyy HH:mm");
|
|
2380
|
+
} else if (value) {
|
|
2381
|
+
displayValue = (0, import_date_fns.format)(value, "dd/MM/yyyy");
|
|
2382
|
+
}
|
|
2383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Popover, { onOpenChange: disabled ? void 0 : setOpen, open, children: [
|
|
2384
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2385
|
+
PopoverTrigger,
|
|
2386
|
+
{
|
|
2387
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2388
|
+
Button,
|
|
2389
|
+
{
|
|
2390
|
+
className: cn(
|
|
2391
|
+
"w-full justify-start rounded-none font-normal data-[empty=true]:text-muted-foreground",
|
|
2392
|
+
className
|
|
2393
|
+
),
|
|
2394
|
+
"data-empty": !value,
|
|
2395
|
+
"data-slot": "date-picker-trigger",
|
|
2396
|
+
disabled,
|
|
2397
|
+
variant: "outline"
|
|
2398
|
+
}
|
|
2399
|
+
),
|
|
2400
|
+
children: [
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.CalendarIcon, {}),
|
|
2402
|
+
value ? displayValue : placeholder
|
|
2403
|
+
]
|
|
2404
|
+
}
|
|
2405
|
+
),
|
|
2406
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2407
|
+
PopoverContent,
|
|
2408
|
+
{
|
|
2409
|
+
align: "start",
|
|
2410
|
+
className: "w-auto rounded-none p-0 shadow-sm",
|
|
2411
|
+
children: [
|
|
2412
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2413
|
+
Calendar,
|
|
2414
|
+
__spreadProps(__spreadValues({
|
|
2415
|
+
captionLayout: "dropdown",
|
|
2416
|
+
mode: "single",
|
|
2417
|
+
onSelect: handleDaySelect,
|
|
2418
|
+
selected: value
|
|
2419
|
+
}, calendarProps), {
|
|
2420
|
+
className: cn(
|
|
2421
|
+
"rounded-none border-0 shadow-none",
|
|
2422
|
+
calendarProps == null ? void 0 : calendarProps.className
|
|
2423
|
+
)
|
|
2424
|
+
})
|
|
2425
|
+
),
|
|
2426
|
+
showTimePicker ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "border-t border-border px-3 pb-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "mb-1.5 block text-xs font-medium text-muted-foreground", children: [
|
|
2427
|
+
"Time",
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2429
|
+
"input",
|
|
2430
|
+
{
|
|
2431
|
+
className: "mt-1.5 h-8 w-full rounded-none border border-input bg-transparent px-2 text-sm font-sans outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
2432
|
+
onChange: handleTimeChange,
|
|
2433
|
+
type: "time",
|
|
2434
|
+
value: timeValue
|
|
2435
|
+
}
|
|
2436
|
+
)
|
|
2437
|
+
] }) }) : null
|
|
2438
|
+
]
|
|
2439
|
+
}
|
|
2440
|
+
)
|
|
2441
|
+
] });
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
// src/components/ui/dialog.tsx
|
|
2445
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2446
|
+
var import_dialog = require("@base-ui/react/dialog");
|
|
2447
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2448
|
+
function Dialog(_a) {
|
|
2449
|
+
var props = __objRest(_a, []);
|
|
2450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dialog.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
2451
|
+
}
|
|
2452
|
+
function DialogTrigger(_a) {
|
|
2453
|
+
var props = __objRest(_a, []);
|
|
2454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dialog.Dialog.Trigger, __spreadValues({ "data-slot": "dialog-trigger" }, props));
|
|
2455
|
+
}
|
|
2456
|
+
function DialogPortal(_a) {
|
|
2457
|
+
var props = __objRest(_a, []);
|
|
2458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dialog.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
2459
|
+
}
|
|
2460
|
+
function DialogClose(_a) {
|
|
2461
|
+
var props = __objRest(_a, []);
|
|
2462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dialog.Dialog.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
|
|
2463
|
+
}
|
|
2464
|
+
function DialogOverlay(_a) {
|
|
2465
|
+
var _b = _a, {
|
|
2466
|
+
className
|
|
2467
|
+
} = _b, props = __objRest(_b, [
|
|
2468
|
+
"className"
|
|
2469
|
+
]);
|
|
2470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2471
|
+
import_dialog.Dialog.Backdrop,
|
|
2472
|
+
__spreadValues({
|
|
2473
|
+
className: cn(
|
|
2474
|
+
// WealthX: foreground/50 scrim (matches Figma — foreground token at 50% opacity)
|
|
2475
|
+
"fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
2476
|
+
className
|
|
2477
|
+
),
|
|
2478
|
+
"data-slot": "dialog-overlay"
|
|
2479
|
+
}, props)
|
|
2480
|
+
);
|
|
2481
|
+
}
|
|
2482
|
+
function DialogContent(_a) {
|
|
2483
|
+
var _b = _a, {
|
|
2484
|
+
className,
|
|
2485
|
+
children,
|
|
2486
|
+
showCloseButton = true,
|
|
2487
|
+
style: style2
|
|
2488
|
+
} = _b, props = __objRest(_b, [
|
|
2489
|
+
"className",
|
|
2490
|
+
"children",
|
|
2491
|
+
"showCloseButton",
|
|
2492
|
+
"style"
|
|
2493
|
+
]);
|
|
2494
|
+
const themeVars = useThemeVars();
|
|
2495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DialogPortal, { children: [
|
|
2496
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogOverlay, {}),
|
|
2497
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2498
|
+
import_dialog.Dialog.Popup,
|
|
2499
|
+
__spreadProps(__spreadValues({
|
|
2500
|
+
className: cn(
|
|
2501
|
+
// WealthX: removed rounded-lg (sharp corners), shadow-lg (flat panels), foreground/50 scrim via DialogOverlay
|
|
2502
|
+
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 duration-200 outline-none data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 sm:max-w-lg",
|
|
2503
|
+
className
|
|
2504
|
+
),
|
|
2505
|
+
"data-slot": "dialog-content",
|
|
2506
|
+
style: __spreadValues(__spreadValues({}, themeVars), style2)
|
|
2507
|
+
}, props), {
|
|
2508
|
+
children: [
|
|
2509
|
+
children,
|
|
2510
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2511
|
+
import_dialog.Dialog.Close,
|
|
2512
|
+
{
|
|
2513
|
+
className: "absolute top-4 right-4 transition-colors hover:bg-foreground/5 focus:outline-hidden focus:ring-2 focus:ring-border focus:ring-offset-0 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2514
|
+
"data-slot": "dialog-close",
|
|
2515
|
+
children: [
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.XIcon, {}),
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "sr-only", children: "Close" })
|
|
2518
|
+
]
|
|
2519
|
+
}
|
|
2520
|
+
) : null
|
|
2521
|
+
]
|
|
2522
|
+
})
|
|
2523
|
+
)
|
|
2524
|
+
] });
|
|
2525
|
+
}
|
|
2526
|
+
function DialogHeader(_a) {
|
|
2527
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2529
|
+
"div",
|
|
2530
|
+
__spreadValues({
|
|
2531
|
+
className: cn("flex flex-col gap-1.5", className),
|
|
2532
|
+
"data-slot": "dialog-header"
|
|
2533
|
+
}, props)
|
|
2534
|
+
);
|
|
2535
|
+
}
|
|
2536
|
+
function DialogFooter(_a) {
|
|
2537
|
+
var _b = _a, {
|
|
2538
|
+
className,
|
|
2539
|
+
showCloseButton = false,
|
|
2540
|
+
children
|
|
2541
|
+
} = _b, props = __objRest(_b, [
|
|
2542
|
+
"className",
|
|
2543
|
+
"showCloseButton",
|
|
2544
|
+
"children"
|
|
2545
|
+
]);
|
|
2546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2547
|
+
"div",
|
|
2548
|
+
__spreadProps(__spreadValues({
|
|
2549
|
+
className: cn(
|
|
2550
|
+
// WealthX: always row layout, right-aligned, separator above footer
|
|
2551
|
+
"flex flex-row justify-end gap-2 border-t border-border pt-4",
|
|
2552
|
+
className
|
|
2553
|
+
),
|
|
2554
|
+
"data-slot": "dialog-footer"
|
|
2555
|
+
}, props), {
|
|
2556
|
+
children: [
|
|
2557
|
+
children,
|
|
2558
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2559
|
+
import_dialog.Dialog.Close,
|
|
2560
|
+
{
|
|
2561
|
+
className: cn(buttonVariants({ variant: "outline" })),
|
|
2562
|
+
children: "Close"
|
|
2563
|
+
}
|
|
2564
|
+
) : null
|
|
2565
|
+
]
|
|
2566
|
+
})
|
|
2567
|
+
);
|
|
2568
|
+
}
|
|
2569
|
+
function DialogTitle(_a) {
|
|
2570
|
+
var _b = _a, {
|
|
2571
|
+
className
|
|
2572
|
+
} = _b, props = __objRest(_b, [
|
|
2573
|
+
"className"
|
|
2574
|
+
]);
|
|
2575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2576
|
+
import_dialog.Dialog.Title,
|
|
2577
|
+
__spreadValues({
|
|
2578
|
+
className: cn("text-lg leading-none font-semibold", className),
|
|
2579
|
+
"data-slot": "dialog-title"
|
|
2580
|
+
}, props)
|
|
2581
|
+
);
|
|
2582
|
+
}
|
|
2583
|
+
function DialogDescription(_a) {
|
|
2584
|
+
var _b = _a, {
|
|
2585
|
+
className
|
|
2586
|
+
} = _b, props = __objRest(_b, [
|
|
2587
|
+
"className"
|
|
2588
|
+
]);
|
|
2589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2590
|
+
import_dialog.Dialog.Description,
|
|
2591
|
+
__spreadValues({
|
|
2592
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2593
|
+
"data-slot": "dialog-description"
|
|
2594
|
+
}, props)
|
|
2595
|
+
);
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
// src/components/ui/drawer.tsx
|
|
2599
|
+
var import_vaul = require("vaul");
|
|
2600
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2601
|
+
function Drawer(_a) {
|
|
2602
|
+
var props = __objRest(_a, []);
|
|
2603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul.Drawer.Root, __spreadValues({ "data-slot": "drawer" }, props));
|
|
2604
|
+
}
|
|
2605
|
+
function DrawerTrigger(_a) {
|
|
2606
|
+
var props = __objRest(_a, []);
|
|
2607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul.Drawer.Trigger, __spreadValues({ "data-slot": "drawer-trigger" }, props));
|
|
2608
|
+
}
|
|
2609
|
+
function DrawerPortal(_a) {
|
|
2610
|
+
var props = __objRest(_a, []);
|
|
2611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul.Drawer.Portal, __spreadValues({ "data-slot": "drawer-portal" }, props));
|
|
2612
|
+
}
|
|
2613
|
+
function DrawerClose(_a) {
|
|
2614
|
+
var props = __objRest(_a, []);
|
|
2615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul.Drawer.Close, __spreadValues({ "data-slot": "drawer-close" }, props));
|
|
2616
|
+
}
|
|
2617
|
+
function DrawerOverlay(_a) {
|
|
2618
|
+
var _b = _a, {
|
|
2619
|
+
className
|
|
2620
|
+
} = _b, props = __objRest(_b, [
|
|
2621
|
+
"className"
|
|
2622
|
+
]);
|
|
2623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2624
|
+
import_vaul.Drawer.Overlay,
|
|
2625
|
+
__spreadValues({
|
|
2626
|
+
className: cn(
|
|
2627
|
+
// WealthX: foreground/50 scrim — matches Figma overlay token
|
|
2628
|
+
"fixed inset-0 z-50 bg-foreground/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
2629
|
+
className
|
|
2630
|
+
),
|
|
2631
|
+
"data-slot": "drawer-overlay"
|
|
2632
|
+
}, props)
|
|
2633
|
+
);
|
|
2634
|
+
}
|
|
2635
|
+
function DrawerContent(_a) {
|
|
2636
|
+
var _b = _a, {
|
|
2637
|
+
className,
|
|
2638
|
+
children,
|
|
2639
|
+
style: style2
|
|
2640
|
+
} = _b, props = __objRest(_b, [
|
|
2641
|
+
"className",
|
|
2642
|
+
"children",
|
|
2643
|
+
"style"
|
|
2644
|
+
]);
|
|
2645
|
+
const themeVars = useThemeVars();
|
|
2646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
2647
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DrawerOverlay, {}),
|
|
2648
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2649
|
+
import_vaul.Drawer.Content,
|
|
2650
|
+
__spreadProps(__spreadValues({
|
|
2651
|
+
className: cn(
|
|
2652
|
+
"group/drawer-content fixed z-50 flex h-auto flex-col bg-background",
|
|
2653
|
+
// WealthX: no rounded corners (Figma: sharp edges)
|
|
2654
|
+
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:border-b",
|
|
2655
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:border-t",
|
|
2656
|
+
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
2657
|
+
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
2658
|
+
className
|
|
2659
|
+
),
|
|
2660
|
+
"data-slot": "drawer-content",
|
|
2661
|
+
style: __spreadValues(__spreadValues({}, themeVars), style2)
|
|
2662
|
+
}, props), {
|
|
2663
|
+
children: [
|
|
2664
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block group-data-[vaul-drawer-direction=top]/drawer-content:block" }),
|
|
2665
|
+
children
|
|
2666
|
+
]
|
|
2667
|
+
})
|
|
2668
|
+
)
|
|
2669
|
+
] });
|
|
2670
|
+
}
|
|
2671
|
+
function DrawerHeader(_a) {
|
|
2672
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2674
|
+
"div",
|
|
2675
|
+
__spreadValues({
|
|
2676
|
+
className: cn("flex flex-col gap-1 p-4", className),
|
|
2677
|
+
"data-slot": "drawer-header"
|
|
2678
|
+
}, props)
|
|
2679
|
+
);
|
|
2680
|
+
}
|
|
2681
|
+
function DrawerFooter(_a) {
|
|
2682
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2684
|
+
"div",
|
|
2685
|
+
__spreadValues({
|
|
2686
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
2687
|
+
"data-slot": "drawer-footer"
|
|
2688
|
+
}, props)
|
|
2689
|
+
);
|
|
2690
|
+
}
|
|
2691
|
+
function DrawerTitle(_a) {
|
|
2692
|
+
var _b = _a, {
|
|
2693
|
+
className
|
|
2694
|
+
} = _b, props = __objRest(_b, [
|
|
2695
|
+
"className"
|
|
2696
|
+
]);
|
|
2697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2698
|
+
import_vaul.Drawer.Title,
|
|
2699
|
+
__spreadValues({
|
|
2700
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
2701
|
+
"data-slot": "drawer-title"
|
|
2702
|
+
}, props)
|
|
2703
|
+
);
|
|
2704
|
+
}
|
|
2705
|
+
function DrawerDescription(_a) {
|
|
2706
|
+
var _b = _a, {
|
|
2707
|
+
className
|
|
2708
|
+
} = _b, props = __objRest(_b, [
|
|
2709
|
+
"className"
|
|
2710
|
+
]);
|
|
2711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2712
|
+
import_vaul.Drawer.Description,
|
|
2713
|
+
__spreadValues({
|
|
2714
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2715
|
+
"data-slot": "drawer-description"
|
|
2716
|
+
}, props)
|
|
2717
|
+
);
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
// src/components/ui/empty.tsx
|
|
2721
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
2722
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2723
|
+
function Empty(_a) {
|
|
2724
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2726
|
+
"div",
|
|
2727
|
+
__spreadValues({
|
|
2728
|
+
className: cn(
|
|
2729
|
+
"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 border border-dashed p-6 text-center text-balance md:p-12",
|
|
2730
|
+
className
|
|
2731
|
+
),
|
|
2732
|
+
"data-slot": "empty"
|
|
2733
|
+
}, props)
|
|
2734
|
+
);
|
|
2735
|
+
}
|
|
2736
|
+
function EmptyHeader(_a) {
|
|
2737
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2739
|
+
"div",
|
|
2740
|
+
__spreadValues({
|
|
2741
|
+
className: cn(
|
|
2742
|
+
"flex max-w-sm flex-col items-center gap-2 text-center",
|
|
2743
|
+
className
|
|
2744
|
+
),
|
|
2745
|
+
"data-slot": "empty-header"
|
|
2746
|
+
}, props)
|
|
2747
|
+
);
|
|
2748
|
+
}
|
|
2749
|
+
var emptyMediaVariants = (0, import_class_variance_authority4.cva)(
|
|
2750
|
+
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
2751
|
+
{
|
|
2752
|
+
variants: {
|
|
2753
|
+
variant: {
|
|
2754
|
+
default: "[&_svg:not([class*='size-'])]:size-10",
|
|
2755
|
+
icon: "flex size-10 shrink-0 items-center justify-center text-muted-foreground [&_svg:not([class*='size-'])]:size-6"
|
|
2756
|
+
}
|
|
2757
|
+
},
|
|
2758
|
+
defaultVariants: {
|
|
2759
|
+
variant: "default"
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
);
|
|
2763
|
+
function EmptyMedia(_a) {
|
|
2764
|
+
var _b = _a, {
|
|
2765
|
+
className,
|
|
2766
|
+
variant = "default"
|
|
2767
|
+
} = _b, props = __objRest(_b, [
|
|
2768
|
+
"className",
|
|
2769
|
+
"variant"
|
|
2770
|
+
]);
|
|
2771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2772
|
+
"div",
|
|
2773
|
+
__spreadValues({
|
|
2774
|
+
className: cn(emptyMediaVariants({ variant, className })),
|
|
2775
|
+
"data-slot": "empty-icon",
|
|
2776
|
+
"data-variant": variant
|
|
2777
|
+
}, props)
|
|
2778
|
+
);
|
|
2779
|
+
}
|
|
2780
|
+
function EmptyTitle(_a) {
|
|
2781
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2783
|
+
"div",
|
|
2784
|
+
__spreadValues({
|
|
2785
|
+
className: cn("text-lg font-medium tracking-tight", className),
|
|
2786
|
+
"data-slot": "empty-title"
|
|
2787
|
+
}, props)
|
|
2788
|
+
);
|
|
2789
|
+
}
|
|
2790
|
+
function EmptyDescription(_a) {
|
|
2791
|
+
var _b = _a, {
|
|
2792
|
+
className
|
|
2793
|
+
} = _b, props = __objRest(_b, [
|
|
2794
|
+
"className"
|
|
2795
|
+
]);
|
|
2796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2797
|
+
"div",
|
|
2798
|
+
__spreadValues({
|
|
2799
|
+
className: cn(
|
|
2800
|
+
"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
2801
|
+
className
|
|
2802
|
+
),
|
|
2803
|
+
"data-slot": "empty-description"
|
|
2804
|
+
}, props)
|
|
2805
|
+
);
|
|
2806
|
+
}
|
|
2807
|
+
function EmptyContent(_a) {
|
|
2808
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2810
|
+
"div",
|
|
2811
|
+
__spreadValues({
|
|
2812
|
+
className: cn(
|
|
2813
|
+
"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
|
|
2814
|
+
className
|
|
2815
|
+
),
|
|
2816
|
+
"data-slot": "empty-content"
|
|
2817
|
+
}, props)
|
|
2818
|
+
);
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2821
|
+
// src/components/ui/field.tsx
|
|
2822
|
+
var import_react4 = require("react");
|
|
2823
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
2824
|
+
|
|
2825
|
+
// src/components/ui/label.tsx
|
|
2826
|
+
var import_jsx_runtime23 = (
|
|
2827
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control -- htmlFor is passed by the consumer
|
|
2828
|
+
require("react/jsx-runtime")
|
|
2829
|
+
);
|
|
2830
|
+
function Label(_a) {
|
|
2831
|
+
var _b = _a, {
|
|
2832
|
+
className
|
|
2833
|
+
} = _b, props = __objRest(_b, [
|
|
2834
|
+
"className"
|
|
2835
|
+
]);
|
|
2836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2837
|
+
"label",
|
|
2838
|
+
__spreadValues({
|
|
2839
|
+
className: cn(
|
|
2840
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
2841
|
+
className
|
|
2842
|
+
),
|
|
2843
|
+
"data-slot": "label"
|
|
2844
|
+
}, props)
|
|
2845
|
+
);
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
// src/components/ui/separator.tsx
|
|
2849
|
+
var import_separator = require("@base-ui/react/separator");
|
|
2850
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2851
|
+
function Separator(_a) {
|
|
2852
|
+
var _b = _a, {
|
|
2853
|
+
className,
|
|
2854
|
+
orientation = "horizontal"
|
|
2855
|
+
} = _b, props = __objRest(_b, [
|
|
2856
|
+
"className",
|
|
2857
|
+
"orientation"
|
|
2858
|
+
]);
|
|
2859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2860
|
+
import_separator.Separator,
|
|
2861
|
+
__spreadValues({
|
|
2862
|
+
className: cn(
|
|
2863
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
2864
|
+
className
|
|
2865
|
+
),
|
|
2866
|
+
"data-orientation": orientation,
|
|
2867
|
+
"data-slot": "separator"
|
|
2868
|
+
}, props)
|
|
2869
|
+
);
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
// src/components/ui/field.tsx
|
|
2873
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2874
|
+
function FieldSet(_a) {
|
|
2875
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2877
|
+
"fieldset",
|
|
2878
|
+
__spreadValues({
|
|
2879
|
+
className: cn(
|
|
2880
|
+
"flex flex-col gap-6",
|
|
2881
|
+
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
2882
|
+
className
|
|
2883
|
+
),
|
|
2884
|
+
"data-slot": "field-set"
|
|
2885
|
+
}, props)
|
|
2886
|
+
);
|
|
2887
|
+
}
|
|
2888
|
+
function FieldLegend(_a) {
|
|
2889
|
+
var _b = _a, {
|
|
2890
|
+
className,
|
|
2891
|
+
variant = "legend"
|
|
2892
|
+
} = _b, props = __objRest(_b, [
|
|
2893
|
+
"className",
|
|
2894
|
+
"variant"
|
|
2895
|
+
]);
|
|
2896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2897
|
+
"legend",
|
|
2898
|
+
__spreadValues({
|
|
2899
|
+
className: cn(
|
|
2900
|
+
"mb-3 font-medium",
|
|
2901
|
+
"data-[variant=legend]:text-base",
|
|
2902
|
+
"data-[variant=label]:text-sm",
|
|
2903
|
+
className
|
|
2904
|
+
),
|
|
2905
|
+
"data-slot": "field-legend",
|
|
2906
|
+
"data-variant": variant
|
|
2907
|
+
}, props)
|
|
2908
|
+
);
|
|
2909
|
+
}
|
|
2910
|
+
function FieldGroup(_a) {
|
|
2911
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2913
|
+
"div",
|
|
2914
|
+
__spreadValues({
|
|
2915
|
+
className: cn(
|
|
2916
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
2917
|
+
className
|
|
2918
|
+
),
|
|
2919
|
+
"data-slot": "field-group"
|
|
2920
|
+
}, props)
|
|
2921
|
+
);
|
|
2922
|
+
}
|
|
2923
|
+
var fieldVariants = (0, import_class_variance_authority5.cva)(
|
|
2924
|
+
"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
|
|
2925
|
+
{
|
|
2926
|
+
variants: {
|
|
2927
|
+
orientation: {
|
|
2928
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
2929
|
+
horizontal: [
|
|
2930
|
+
"flex-row items-center",
|
|
2931
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
2932
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
2933
|
+
],
|
|
2934
|
+
responsive: [
|
|
2935
|
+
"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
2936
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
2937
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
2938
|
+
]
|
|
2939
|
+
}
|
|
2940
|
+
},
|
|
2941
|
+
defaultVariants: {
|
|
2942
|
+
orientation: "vertical"
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
);
|
|
2946
|
+
function Field(_a) {
|
|
2947
|
+
var _b = _a, {
|
|
2948
|
+
className,
|
|
2949
|
+
orientation = "vertical"
|
|
2950
|
+
} = _b, props = __objRest(_b, [
|
|
2951
|
+
"className",
|
|
2952
|
+
"orientation"
|
|
2953
|
+
]);
|
|
2954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2955
|
+
"div",
|
|
2956
|
+
__spreadValues({
|
|
2957
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
2958
|
+
"data-orientation": orientation,
|
|
2959
|
+
"data-slot": "field",
|
|
2960
|
+
role: "group"
|
|
2961
|
+
}, props)
|
|
2962
|
+
);
|
|
2963
|
+
}
|
|
2964
|
+
function FieldContent(_a) {
|
|
2965
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2967
|
+
"div",
|
|
2968
|
+
__spreadValues({
|
|
2969
|
+
className: cn(
|
|
2970
|
+
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
2971
|
+
className
|
|
2972
|
+
),
|
|
2973
|
+
"data-slot": "field-content"
|
|
2974
|
+
}, props)
|
|
2975
|
+
);
|
|
2976
|
+
}
|
|
2977
|
+
function FieldLabel(_a) {
|
|
2978
|
+
var _b = _a, {
|
|
2979
|
+
className
|
|
2980
|
+
} = _b, props = __objRest(_b, [
|
|
2981
|
+
"className"
|
|
2982
|
+
]);
|
|
2983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2984
|
+
Label,
|
|
2985
|
+
__spreadValues({
|
|
2986
|
+
className: cn(
|
|
2987
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
2988
|
+
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
|
|
2989
|
+
"has-data-checked:border-primary has-data-checked:bg-primary/5 dark:has-data-checked:bg-primary/10",
|
|
2990
|
+
className
|
|
2991
|
+
),
|
|
2992
|
+
"data-slot": "field-label"
|
|
2993
|
+
}, props)
|
|
2994
|
+
);
|
|
2995
|
+
}
|
|
2996
|
+
function FieldTitle(_a) {
|
|
2997
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2999
|
+
"div",
|
|
3000
|
+
__spreadValues({
|
|
3001
|
+
className: cn(
|
|
3002
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
3003
|
+
className
|
|
3004
|
+
),
|
|
3005
|
+
"data-slot": "field-label"
|
|
3006
|
+
}, props)
|
|
3007
|
+
);
|
|
3008
|
+
}
|
|
3009
|
+
function FieldDescription(_a) {
|
|
3010
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3012
|
+
"p",
|
|
3013
|
+
__spreadValues({
|
|
3014
|
+
className: cn(
|
|
3015
|
+
"text-xs leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
3016
|
+
"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
|
|
3017
|
+
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
3018
|
+
className
|
|
3019
|
+
),
|
|
3020
|
+
"data-slot": "field-description"
|
|
3021
|
+
}, props)
|
|
3022
|
+
);
|
|
3023
|
+
}
|
|
3024
|
+
function FieldSeparator(_a) {
|
|
3025
|
+
var _b = _a, {
|
|
3026
|
+
children,
|
|
3027
|
+
className
|
|
3028
|
+
} = _b, props = __objRest(_b, [
|
|
3029
|
+
"children",
|
|
3030
|
+
"className"
|
|
3031
|
+
]);
|
|
3032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3033
|
+
"div",
|
|
3034
|
+
__spreadProps(__spreadValues({
|
|
3035
|
+
className: cn(
|
|
3036
|
+
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
3037
|
+
className
|
|
3038
|
+
),
|
|
3039
|
+
"data-content": Boolean(children),
|
|
3040
|
+
"data-slot": "field-separator"
|
|
3041
|
+
}, props), {
|
|
3042
|
+
children: [
|
|
3043
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
3044
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3045
|
+
"span",
|
|
3046
|
+
{
|
|
3047
|
+
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
3048
|
+
"data-slot": "field-separator-content",
|
|
3049
|
+
children
|
|
3050
|
+
}
|
|
3051
|
+
) : null
|
|
3052
|
+
]
|
|
3053
|
+
})
|
|
3054
|
+
);
|
|
3055
|
+
}
|
|
3056
|
+
function FieldError(_a) {
|
|
3057
|
+
var _b = _a, {
|
|
3058
|
+
className,
|
|
3059
|
+
children,
|
|
3060
|
+
errors
|
|
3061
|
+
} = _b, props = __objRest(_b, [
|
|
3062
|
+
"className",
|
|
3063
|
+
"children",
|
|
3064
|
+
"errors"
|
|
3065
|
+
]);
|
|
3066
|
+
const content = (0, import_react4.useMemo)(() => {
|
|
3067
|
+
var _a2;
|
|
3068
|
+
if (children) {
|
|
3069
|
+
return children;
|
|
3070
|
+
}
|
|
3071
|
+
if (!(errors == null ? void 0 : errors.length)) {
|
|
3072
|
+
return null;
|
|
3073
|
+
}
|
|
3074
|
+
const uniqueErrors = Array.from(
|
|
3075
|
+
new Map(errors.map((error) => [error == null ? void 0 : error.message, error])).values()
|
|
3076
|
+
);
|
|
3077
|
+
if (uniqueErrors.length === 1) {
|
|
3078
|
+
return (_a2 = uniqueErrors[0]) == null ? void 0 : _a2.message;
|
|
3079
|
+
}
|
|
3080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
3081
|
+
(error) => (error == null ? void 0 : error.message) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("li", { children: error.message }, error.message)
|
|
3082
|
+
) });
|
|
3083
|
+
}, [children, errors]);
|
|
3084
|
+
if (!content) {
|
|
3085
|
+
return null;
|
|
3086
|
+
}
|
|
3087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3088
|
+
"div",
|
|
3089
|
+
__spreadProps(__spreadValues({
|
|
3090
|
+
className: cn("text-xs font-normal text-destructive", className),
|
|
3091
|
+
"data-slot": "field-error",
|
|
3092
|
+
role: "alert"
|
|
3093
|
+
}, props), {
|
|
3094
|
+
children: content
|
|
3095
|
+
})
|
|
3096
|
+
);
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3099
|
+
// src/components/ui/input-group.tsx
|
|
3100
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
3101
|
+
|
|
3102
|
+
// src/components/ui/textarea.tsx
|
|
3103
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3104
|
+
function Textarea(_a) {
|
|
3105
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3107
|
+
"textarea",
|
|
3108
|
+
__spreadValues({
|
|
3109
|
+
className: cn(
|
|
3110
|
+
// WealthX: removed shadow-xs (flat panels), added font-sans
|
|
3111
|
+
"flex field-sizing-content min-h-16 w-full border border-input bg-transparent px-3 py-2 text-base font-sans transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
3112
|
+
className
|
|
3113
|
+
),
|
|
3114
|
+
"data-slot": "textarea"
|
|
3115
|
+
}, props)
|
|
3116
|
+
);
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
// src/components/ui/input-group.tsx
|
|
3120
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3121
|
+
function InputGroup(_a) {
|
|
3122
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3124
|
+
"div",
|
|
3125
|
+
__spreadValues({
|
|
3126
|
+
className: cn(
|
|
3127
|
+
"group/input-group relative flex w-full items-center border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30",
|
|
3128
|
+
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
3129
|
+
// Variants based on alignment.
|
|
3130
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
3131
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
3132
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
3133
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
3134
|
+
// Focus state.
|
|
3135
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-primary/20",
|
|
3136
|
+
// Error state.
|
|
3137
|
+
"has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
|
|
3138
|
+
className
|
|
3139
|
+
),
|
|
3140
|
+
"data-slot": "input-group",
|
|
3141
|
+
role: "group"
|
|
3142
|
+
}, props)
|
|
3143
|
+
);
|
|
3144
|
+
}
|
|
3145
|
+
var inputGroupAddonVariants = (0, import_class_variance_authority6.cva)(
|
|
3146
|
+
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
3147
|
+
{
|
|
3148
|
+
variants: {
|
|
3149
|
+
align: {
|
|
3150
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
3151
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
3152
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3",
|
|
3153
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"
|
|
3154
|
+
}
|
|
3155
|
+
},
|
|
3156
|
+
defaultVariants: {
|
|
3157
|
+
align: "inline-start"
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
);
|
|
3161
|
+
function InputGroupAddon(_a) {
|
|
3162
|
+
var _b = _a, {
|
|
3163
|
+
className,
|
|
3164
|
+
align = "inline-start"
|
|
3165
|
+
} = _b, props = __objRest(_b, [
|
|
3166
|
+
"className",
|
|
3167
|
+
"align"
|
|
3168
|
+
]);
|
|
3169
|
+
return (
|
|
3170
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- click only forwards focus to the sibling input; the div is not truly interactive
|
|
3171
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3172
|
+
"div",
|
|
3173
|
+
__spreadValues({
|
|
3174
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
3175
|
+
"data-align": align,
|
|
3176
|
+
"data-slot": "input-group-addon",
|
|
3177
|
+
onClick: (e) => {
|
|
3178
|
+
var _a2, _b2;
|
|
3179
|
+
if (e.target.closest("button")) {
|
|
3180
|
+
return;
|
|
3181
|
+
}
|
|
3182
|
+
(_b2 = (_a2 = e.currentTarget.parentElement) == null ? void 0 : _a2.querySelector("input")) == null ? void 0 : _b2.focus();
|
|
3183
|
+
},
|
|
3184
|
+
onKeyDown: (e) => {
|
|
3185
|
+
var _a2, _b2;
|
|
3186
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
3187
|
+
(_b2 = (_a2 = e.currentTarget.parentElement) == null ? void 0 : _a2.querySelector("input")) == null ? void 0 : _b2.focus();
|
|
3188
|
+
}
|
|
3189
|
+
},
|
|
3190
|
+
role: "group"
|
|
3191
|
+
}, props)
|
|
3192
|
+
)
|
|
3193
|
+
);
|
|
3194
|
+
}
|
|
3195
|
+
var inputGroupButtonVariants = (0, import_class_variance_authority6.cva)(
|
|
3196
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
3197
|
+
{
|
|
3198
|
+
variants: {
|
|
3199
|
+
size: {
|
|
3200
|
+
xs: "h-6 gap-1 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
3201
|
+
sm: "h-8 gap-1.5 px-2.5 has-[>svg]:px-2.5",
|
|
3202
|
+
"icon-xs": "size-6 p-0 has-[>svg]:p-0",
|
|
3203
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
3204
|
+
}
|
|
3205
|
+
},
|
|
3206
|
+
defaultVariants: {
|
|
3207
|
+
size: "xs"
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
);
|
|
3211
|
+
function InputGroupButton(_a) {
|
|
3212
|
+
var _b = _a, {
|
|
3213
|
+
className,
|
|
3214
|
+
type = "button",
|
|
3215
|
+
variant = "ghost",
|
|
3216
|
+
size = "xs"
|
|
3217
|
+
} = _b, props = __objRest(_b, [
|
|
3218
|
+
"className",
|
|
3219
|
+
"type",
|
|
3220
|
+
"variant",
|
|
3221
|
+
"size"
|
|
3222
|
+
]);
|
|
3223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3224
|
+
Button,
|
|
3225
|
+
__spreadValues({
|
|
3226
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
3227
|
+
"data-size": size,
|
|
3228
|
+
type,
|
|
3229
|
+
variant
|
|
3230
|
+
}, props)
|
|
3231
|
+
);
|
|
3232
|
+
}
|
|
3233
|
+
function InputGroupText(_a) {
|
|
3234
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3236
|
+
"span",
|
|
3237
|
+
__spreadValues({
|
|
3238
|
+
className: cn(
|
|
3239
|
+
"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
3240
|
+
className
|
|
3241
|
+
)
|
|
3242
|
+
}, props)
|
|
3243
|
+
);
|
|
3244
|
+
}
|
|
3245
|
+
function InputGroupInput(_a) {
|
|
3246
|
+
var _b = _a, {
|
|
3247
|
+
className
|
|
3248
|
+
} = _b, props = __objRest(_b, [
|
|
3249
|
+
"className"
|
|
3250
|
+
]);
|
|
3251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3252
|
+
Input,
|
|
3253
|
+
__spreadValues({
|
|
3254
|
+
className: cn(
|
|
3255
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
3256
|
+
className
|
|
3257
|
+
),
|
|
3258
|
+
"data-slot": "input-group-control"
|
|
3259
|
+
}, props)
|
|
3260
|
+
);
|
|
3261
|
+
}
|
|
3262
|
+
function InputGroupTextarea(_a) {
|
|
3263
|
+
var _b = _a, {
|
|
3264
|
+
className
|
|
3265
|
+
} = _b, props = __objRest(_b, [
|
|
3266
|
+
"className"
|
|
3267
|
+
]);
|
|
3268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3269
|
+
Textarea,
|
|
3270
|
+
__spreadValues({
|
|
3271
|
+
className: cn(
|
|
3272
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
3273
|
+
className
|
|
3274
|
+
),
|
|
3275
|
+
"data-slot": "input-group-control"
|
|
3276
|
+
}, props)
|
|
3277
|
+
);
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
// src/components/ui/input-otp.tsx
|
|
3281
|
+
var React6 = __toESM(require("react"));
|
|
3282
|
+
var import_input_otp = require("input-otp");
|
|
3283
|
+
var import_lucide_react11 = require("lucide-react");
|
|
3284
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3285
|
+
function InputOTP(_a) {
|
|
3286
|
+
var _b = _a, {
|
|
3287
|
+
className,
|
|
3288
|
+
containerClassName
|
|
3289
|
+
} = _b, props = __objRest(_b, [
|
|
3290
|
+
"className",
|
|
3291
|
+
"containerClassName"
|
|
3292
|
+
]);
|
|
3293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3294
|
+
import_input_otp.OTPInput,
|
|
3295
|
+
__spreadValues({
|
|
3296
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
3297
|
+
containerClassName: cn(
|
|
3298
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
3299
|
+
containerClassName
|
|
3300
|
+
),
|
|
3301
|
+
"data-slot": "input-otp"
|
|
3302
|
+
}, props)
|
|
3303
|
+
);
|
|
3304
|
+
}
|
|
3305
|
+
function InputOTPGroup(_a) {
|
|
3306
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3308
|
+
"div",
|
|
3309
|
+
__spreadValues({
|
|
3310
|
+
className: cn("flex items-center", className),
|
|
3311
|
+
"data-slot": "input-otp-group"
|
|
3312
|
+
}, props)
|
|
3313
|
+
);
|
|
3314
|
+
}
|
|
3315
|
+
function InputOTPSlot(_a) {
|
|
3316
|
+
var _b = _a, {
|
|
3317
|
+
index,
|
|
3318
|
+
className
|
|
3319
|
+
} = _b, props = __objRest(_b, [
|
|
3320
|
+
"index",
|
|
3321
|
+
"className"
|
|
3322
|
+
]);
|
|
3323
|
+
var _a2;
|
|
3324
|
+
const inputOTPContext = React6.useContext(import_input_otp.OTPInputContext);
|
|
3325
|
+
const { char, hasFakeCaret, isActive } = (_a2 = inputOTPContext.slots[index]) != null ? _a2 : {};
|
|
3326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3327
|
+
"div",
|
|
3328
|
+
__spreadProps(__spreadValues({
|
|
3329
|
+
className: cn(
|
|
3330
|
+
"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:border-l aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
|
|
3331
|
+
className
|
|
3332
|
+
),
|
|
3333
|
+
"data-active": isActive,
|
|
3334
|
+
"data-slot": "input-otp-slot"
|
|
3335
|
+
}, props), {
|
|
3336
|
+
children: [
|
|
3337
|
+
char,
|
|
3338
|
+
hasFakeCaret ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }) : null
|
|
3339
|
+
]
|
|
3340
|
+
})
|
|
3341
|
+
);
|
|
3342
|
+
}
|
|
3343
|
+
function InputOTPSeparator(_a) {
|
|
3344
|
+
var props = __objRest(_a, []);
|
|
3345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", __spreadProps(__spreadValues({ "data-slot": "input-otp-separator", role: "separator" }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.MinusIcon, {}) }));
|
|
3346
|
+
}
|
|
3347
|
+
|
|
3348
|
+
// src/components/ui/pagination.tsx
|
|
3349
|
+
var import_lucide_react12 = require("lucide-react");
|
|
3350
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3351
|
+
function Pagination(_a) {
|
|
3352
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3354
|
+
"nav",
|
|
3355
|
+
__spreadValues({
|
|
3356
|
+
"aria-label": "pagination",
|
|
3357
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
3358
|
+
"data-slot": "pagination",
|
|
3359
|
+
role: "navigation"
|
|
3360
|
+
}, props)
|
|
3361
|
+
);
|
|
3362
|
+
}
|
|
3363
|
+
function PaginationContent(_a) {
|
|
3364
|
+
var _b = _a, {
|
|
3365
|
+
className
|
|
3366
|
+
} = _b, props = __objRest(_b, [
|
|
3367
|
+
"className"
|
|
3368
|
+
]);
|
|
3369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3370
|
+
"ul",
|
|
3371
|
+
__spreadValues({
|
|
3372
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
3373
|
+
"data-slot": "pagination-content"
|
|
3374
|
+
}, props)
|
|
3375
|
+
);
|
|
3376
|
+
}
|
|
3377
|
+
function PaginationItem(_a) {
|
|
3378
|
+
var props = __objRest(_a, []);
|
|
3379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("li", __spreadValues({ "data-slot": "pagination-item" }, props));
|
|
3380
|
+
}
|
|
3381
|
+
function PaginationLink(_a) {
|
|
3382
|
+
var _b = _a, {
|
|
3383
|
+
className,
|
|
3384
|
+
isActive,
|
|
3385
|
+
size = "icon"
|
|
3386
|
+
} = _b, props = __objRest(_b, [
|
|
3387
|
+
"className",
|
|
3388
|
+
"isActive",
|
|
3389
|
+
"size"
|
|
3390
|
+
]);
|
|
3391
|
+
return (
|
|
3392
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content -- children passed via props spread
|
|
3393
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3394
|
+
"a",
|
|
3395
|
+
__spreadValues({
|
|
3396
|
+
"aria-current": isActive ? "page" : void 0,
|
|
3397
|
+
className: cn(
|
|
3398
|
+
buttonVariants({
|
|
3399
|
+
variant: isActive ? "outline" : "ghost",
|
|
3400
|
+
size
|
|
3401
|
+
}),
|
|
3402
|
+
className
|
|
3403
|
+
),
|
|
3404
|
+
"data-active": isActive,
|
|
3405
|
+
"data-slot": "pagination-link"
|
|
3406
|
+
}, props)
|
|
3407
|
+
)
|
|
3408
|
+
);
|
|
3409
|
+
}
|
|
3410
|
+
function PaginationPrevious(_a) {
|
|
3411
|
+
var _b = _a, {
|
|
3412
|
+
className
|
|
3413
|
+
} = _b, props = __objRest(_b, [
|
|
3414
|
+
"className"
|
|
3415
|
+
]);
|
|
3416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3417
|
+
PaginationLink,
|
|
3418
|
+
__spreadProps(__spreadValues({
|
|
3419
|
+
"aria-label": "Go to previous page",
|
|
3420
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
3421
|
+
size: "default"
|
|
3422
|
+
}, props), {
|
|
3423
|
+
children: [
|
|
3424
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.ChevronLeftIcon, {}),
|
|
3425
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "hidden sm:block", children: "Previous" })
|
|
3426
|
+
]
|
|
3427
|
+
})
|
|
3428
|
+
);
|
|
3429
|
+
}
|
|
3430
|
+
function PaginationNext(_a) {
|
|
3431
|
+
var _b = _a, {
|
|
3432
|
+
className
|
|
3433
|
+
} = _b, props = __objRest(_b, [
|
|
3434
|
+
"className"
|
|
3435
|
+
]);
|
|
3436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3437
|
+
PaginationLink,
|
|
3438
|
+
__spreadProps(__spreadValues({
|
|
3439
|
+
"aria-label": "Go to next page",
|
|
3440
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
3441
|
+
size: "default"
|
|
3442
|
+
}, props), {
|
|
3443
|
+
children: [
|
|
3444
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "hidden sm:block", children: "Next" }),
|
|
3445
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.ChevronRightIcon, {})
|
|
3446
|
+
]
|
|
3447
|
+
})
|
|
3448
|
+
);
|
|
3449
|
+
}
|
|
3450
|
+
function PaginationEllipsis(_a) {
|
|
3451
|
+
var _b = _a, {
|
|
3452
|
+
className
|
|
3453
|
+
} = _b, props = __objRest(_b, [
|
|
3454
|
+
"className"
|
|
3455
|
+
]);
|
|
3456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3457
|
+
"span",
|
|
3458
|
+
__spreadProps(__spreadValues({
|
|
3459
|
+
"aria-hidden": true,
|
|
3460
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
3461
|
+
"data-slot": "pagination-ellipsis"
|
|
3462
|
+
}, props), {
|
|
3463
|
+
children: [
|
|
3464
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.MoreHorizontalIcon, { className: "size-4" }),
|
|
3465
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
3466
|
+
]
|
|
3467
|
+
})
|
|
3468
|
+
);
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3471
|
+
// src/components/ui/progress.tsx
|
|
3472
|
+
var import_progress = require("@base-ui/react/progress");
|
|
3473
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3474
|
+
function Progress(_a) {
|
|
3475
|
+
var _b = _a, {
|
|
3476
|
+
className,
|
|
3477
|
+
value
|
|
3478
|
+
} = _b, props = __objRest(_b, [
|
|
3479
|
+
"className",
|
|
3480
|
+
"value"
|
|
3481
|
+
]);
|
|
3482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3483
|
+
import_progress.Progress.Root,
|
|
3484
|
+
__spreadProps(__spreadValues({
|
|
3485
|
+
className: cn(
|
|
3486
|
+
"relative h-2 w-full overflow-hidden bg-muted",
|
|
3487
|
+
className
|
|
3488
|
+
),
|
|
3489
|
+
"data-slot": "progress",
|
|
3490
|
+
value
|
|
3491
|
+
}, props), {
|
|
3492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_progress.Progress.Track, { className: "h-full", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3493
|
+
import_progress.Progress.Indicator,
|
|
3494
|
+
{
|
|
3495
|
+
className: "h-full bg-primary transition-all",
|
|
3496
|
+
"data-slot": "progress-indicator"
|
|
3497
|
+
}
|
|
3498
|
+
) })
|
|
3499
|
+
})
|
|
3500
|
+
);
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
// src/components/ui/radio-group.tsx
|
|
3504
|
+
var import_lucide_react13 = require("lucide-react");
|
|
3505
|
+
var import_radio_group = require("@base-ui/react/radio-group");
|
|
3506
|
+
var import_radio = require("@base-ui/react/radio");
|
|
3507
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3508
|
+
var CIRCLE_BASE = "inline-flex items-center justify-center aspect-square size-4 shrink-0 rounded-full border border-primary bg-background";
|
|
3509
|
+
var INDICATOR_DOT = "size-2 fill-background text-background";
|
|
3510
|
+
function RadioGroup(_a) {
|
|
3511
|
+
var _b = _a, {
|
|
3512
|
+
className
|
|
3513
|
+
} = _b, props = __objRest(_b, [
|
|
3514
|
+
"className"
|
|
3515
|
+
]);
|
|
3516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3517
|
+
import_radio_group.RadioGroup,
|
|
3518
|
+
__spreadValues({
|
|
3519
|
+
className: cn("grid gap-3", className),
|
|
3520
|
+
"data-slot": "radio-group"
|
|
3521
|
+
}, props)
|
|
3522
|
+
);
|
|
3523
|
+
}
|
|
3524
|
+
function RadioGroupItem(_a) {
|
|
3525
|
+
var _b = _a, {
|
|
3526
|
+
className
|
|
3527
|
+
} = _b, props = __objRest(_b, [
|
|
3528
|
+
"className"
|
|
3529
|
+
]);
|
|
3530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3531
|
+
import_radio.Radio.Root,
|
|
3532
|
+
__spreadProps(__spreadValues({
|
|
3533
|
+
className: cn(
|
|
3534
|
+
CIRCLE_BASE,
|
|
3535
|
+
"transition-all outline-none",
|
|
3536
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
3537
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
3538
|
+
"data-checked:bg-primary",
|
|
3539
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20",
|
|
3540
|
+
"aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive",
|
|
3541
|
+
"dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
3542
|
+
className
|
|
3543
|
+
),
|
|
3544
|
+
"data-slot": "radio-group-item"
|
|
3545
|
+
}, props), {
|
|
3546
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3547
|
+
import_radio.Radio.Indicator,
|
|
3548
|
+
{
|
|
3549
|
+
"data-slot": "radio-group-indicator",
|
|
3550
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.CircleIcon, { className: INDICATOR_DOT })
|
|
3551
|
+
}
|
|
3552
|
+
)
|
|
3553
|
+
})
|
|
3554
|
+
);
|
|
3555
|
+
}
|
|
3556
|
+
function RadioGroupCard(_a) {
|
|
3557
|
+
var _b = _a, {
|
|
3558
|
+
className,
|
|
3559
|
+
value,
|
|
3560
|
+
disabled,
|
|
3561
|
+
error,
|
|
3562
|
+
label,
|
|
3563
|
+
description
|
|
3564
|
+
} = _b, props = __objRest(_b, [
|
|
3565
|
+
"className",
|
|
3566
|
+
"value",
|
|
3567
|
+
"disabled",
|
|
3568
|
+
"error",
|
|
3569
|
+
"label",
|
|
3570
|
+
"description"
|
|
3571
|
+
]);
|
|
3572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3573
|
+
import_radio.Radio.Root,
|
|
3574
|
+
__spreadProps(__spreadValues({
|
|
3575
|
+
"aria-invalid": error || void 0,
|
|
3576
|
+
className: cn(
|
|
3577
|
+
"group/card flex items-center gap-3 border border-border p-4 font-sans transition-colors text-left cursor-pointer outline-none",
|
|
3578
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
3579
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
3580
|
+
"data-checked:border-primary data-checked:bg-primary/5",
|
|
3581
|
+
"aria-invalid:border-destructive",
|
|
3582
|
+
"aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive/5",
|
|
3583
|
+
className
|
|
3584
|
+
),
|
|
3585
|
+
"data-slot": "radio-group-card",
|
|
3586
|
+
disabled,
|
|
3587
|
+
value
|
|
3588
|
+
}, props), {
|
|
3589
|
+
children: [
|
|
3590
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3591
|
+
"div",
|
|
3592
|
+
{
|
|
3593
|
+
className: cn(
|
|
3594
|
+
CIRCLE_BASE,
|
|
3595
|
+
"transition-colors",
|
|
3596
|
+
"group-data-[checked]/card:bg-primary",
|
|
3597
|
+
"group-aria-invalid/card:border-destructive",
|
|
3598
|
+
"group-aria-invalid/card:group-data-[checked]/card:border-destructive group-aria-invalid/card:group-data-[checked]/card:bg-destructive"
|
|
3599
|
+
),
|
|
3600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_radio.Radio.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.CircleIcon, { className: INDICATOR_DOT }) })
|
|
3601
|
+
}
|
|
3602
|
+
),
|
|
3603
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3604
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-sm font-medium leading-none", children: label }),
|
|
3605
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-sm text-muted-foreground", children: description }) : null
|
|
3606
|
+
] })
|
|
3607
|
+
]
|
|
3608
|
+
})
|
|
3609
|
+
);
|
|
3610
|
+
}
|
|
3611
|
+
|
|
3612
|
+
// src/components/ui/sheet.tsx
|
|
3613
|
+
var import_lucide_react14 = require("lucide-react");
|
|
3614
|
+
var import_dialog2 = require("@base-ui/react/dialog");
|
|
3615
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3616
|
+
var SIDE_CLASSES = {
|
|
3617
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-ending-style:slide-out-to-right data-open:slide-in-from-right sm:max-w-sm",
|
|
3618
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-ending-style:slide-out-to-left data-open:slide-in-from-left sm:max-w-sm",
|
|
3619
|
+
top: "inset-x-0 top-0 h-auto border-b data-ending-style:slide-out-to-top data-open:slide-in-from-top",
|
|
3620
|
+
bottom: "inset-x-0 bottom-0 h-auto border-t data-ending-style:slide-out-to-bottom data-open:slide-in-from-bottom"
|
|
3621
|
+
};
|
|
3622
|
+
function Sheet(_a) {
|
|
3623
|
+
var props = __objRest(_a, []);
|
|
3624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_dialog2.Dialog.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
3625
|
+
}
|
|
3626
|
+
function SheetTrigger(_a) {
|
|
3627
|
+
var props = __objRest(_a, []);
|
|
3628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_dialog2.Dialog.Trigger, __spreadValues({ "data-slot": "sheet-trigger" }, props));
|
|
3629
|
+
}
|
|
3630
|
+
function SheetClose(_a) {
|
|
3631
|
+
var props = __objRest(_a, []);
|
|
3632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_dialog2.Dialog.Close, __spreadValues({ "data-slot": "sheet-close" }, props));
|
|
3633
|
+
}
|
|
3634
|
+
function SheetPortal(_a) {
|
|
3635
|
+
var props = __objRest(_a, []);
|
|
3636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_dialog2.Dialog.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
3637
|
+
}
|
|
3638
|
+
function SheetOverlay(_a) {
|
|
3639
|
+
var _b = _a, {
|
|
3640
|
+
className
|
|
3641
|
+
} = _b, props = __objRest(_b, [
|
|
3642
|
+
"className"
|
|
3643
|
+
]);
|
|
3644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3645
|
+
import_dialog2.Dialog.Backdrop,
|
|
3646
|
+
__spreadValues({
|
|
3647
|
+
className: cn(
|
|
3648
|
+
"fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
3649
|
+
className
|
|
3650
|
+
),
|
|
3651
|
+
"data-slot": "sheet-overlay"
|
|
3652
|
+
}, props)
|
|
3653
|
+
);
|
|
3654
|
+
}
|
|
3655
|
+
function SheetContent(_a) {
|
|
3656
|
+
var _b = _a, {
|
|
3657
|
+
className,
|
|
3658
|
+
children,
|
|
3659
|
+
side = "right",
|
|
3660
|
+
showCloseButton = true,
|
|
3661
|
+
style: style2
|
|
3662
|
+
} = _b, props = __objRest(_b, [
|
|
3663
|
+
"className",
|
|
3664
|
+
"children",
|
|
3665
|
+
"side",
|
|
3666
|
+
"showCloseButton",
|
|
3667
|
+
"style"
|
|
3668
|
+
]);
|
|
3669
|
+
const themeVars = useThemeVars();
|
|
3670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(SheetPortal, { children: [
|
|
3671
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SheetOverlay, {}),
|
|
3672
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3673
|
+
import_dialog2.Dialog.Popup,
|
|
3674
|
+
__spreadProps(__spreadValues({
|
|
3675
|
+
className: cn(
|
|
3676
|
+
"fixed z-50 flex flex-col gap-4 bg-background transition ease-in-out data-ending-style:animate-out data-ending-style:duration-300 data-ending-style:fill-mode-forwards data-open:animate-in data-open:duration-500",
|
|
3677
|
+
SIDE_CLASSES[side],
|
|
3678
|
+
className
|
|
3679
|
+
),
|
|
3680
|
+
"data-slot": "sheet-content",
|
|
3681
|
+
style: __spreadValues(__spreadValues({}, themeVars), style2)
|
|
3682
|
+
}, props), {
|
|
3683
|
+
children: [
|
|
3684
|
+
children,
|
|
3685
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3686
|
+
import_dialog2.Dialog.Close,
|
|
3687
|
+
{
|
|
3688
|
+
className: "absolute top-4 right-4 transition-colors hover:bg-foreground/5 focus:outline-hidden focus:ring-2 focus:ring-border focus:ring-offset-0 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3689
|
+
"data-slot": "sheet-icon-close",
|
|
3690
|
+
children: [
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react14.XIcon, {}),
|
|
3692
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "sr-only", children: "Close" })
|
|
3693
|
+
]
|
|
3694
|
+
}
|
|
3695
|
+
) : null
|
|
3696
|
+
]
|
|
3697
|
+
})
|
|
3698
|
+
)
|
|
3699
|
+
] });
|
|
3700
|
+
}
|
|
3701
|
+
function SheetHeader(_a) {
|
|
3702
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3704
|
+
"div",
|
|
3705
|
+
__spreadValues({
|
|
3706
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
3707
|
+
"data-slot": "sheet-header"
|
|
3708
|
+
}, props)
|
|
3709
|
+
);
|
|
3710
|
+
}
|
|
3711
|
+
function SheetFooter(_a) {
|
|
3712
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3714
|
+
"div",
|
|
3715
|
+
__spreadValues({
|
|
3716
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
3717
|
+
"data-slot": "sheet-footer"
|
|
3718
|
+
}, props)
|
|
3719
|
+
);
|
|
3720
|
+
}
|
|
3721
|
+
function SheetTitle(_a) {
|
|
3722
|
+
var _b = _a, {
|
|
3723
|
+
className
|
|
3724
|
+
} = _b, props = __objRest(_b, [
|
|
3725
|
+
"className"
|
|
3726
|
+
]);
|
|
3727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3728
|
+
import_dialog2.Dialog.Title,
|
|
3729
|
+
__spreadValues({
|
|
3730
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
3731
|
+
"data-slot": "sheet-title"
|
|
3732
|
+
}, props)
|
|
3733
|
+
);
|
|
3734
|
+
}
|
|
3735
|
+
function SheetDescription(_a) {
|
|
3736
|
+
var _b = _a, {
|
|
3737
|
+
className
|
|
3738
|
+
} = _b, props = __objRest(_b, [
|
|
3739
|
+
"className"
|
|
3740
|
+
]);
|
|
3741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3742
|
+
import_dialog2.Dialog.Description,
|
|
3743
|
+
__spreadValues({
|
|
3744
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
3745
|
+
"data-slot": "sheet-description"
|
|
3746
|
+
}, props)
|
|
3747
|
+
);
|
|
3748
|
+
}
|
|
3749
|
+
|
|
3750
|
+
// src/components/ui/sonner.tsx
|
|
3751
|
+
var import_lucide_react15 = require("lucide-react");
|
|
3752
|
+
var import_sonner = require("sonner");
|
|
3753
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3754
|
+
function Toaster(_a) {
|
|
3755
|
+
var _b = _a, { theme = "light" } = _b, props = __objRest(_b, ["theme"]);
|
|
3756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3757
|
+
import_sonner.Toaster,
|
|
3758
|
+
__spreadValues({
|
|
3759
|
+
className: "toaster group",
|
|
3760
|
+
icons: {
|
|
3761
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.CircleCheckIcon, { className: "size-4" }),
|
|
3762
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.InfoIcon, { className: "size-4" }),
|
|
3763
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.TriangleAlertIcon, { className: "size-4" }),
|
|
3764
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.OctagonXIcon, { className: "size-4" }),
|
|
3765
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.Loader2Icon, { className: "size-4 animate-spin" })
|
|
3766
|
+
},
|
|
3767
|
+
style: {
|
|
3768
|
+
"--normal-bg": "var(--popover)",
|
|
3769
|
+
"--normal-text": "var(--popover-foreground)",
|
|
3770
|
+
"--normal-border": "var(--border)",
|
|
3771
|
+
"--border-radius": "var(--radius)"
|
|
3772
|
+
},
|
|
3773
|
+
theme,
|
|
3774
|
+
toastOptions: {
|
|
3775
|
+
classNames: {
|
|
3776
|
+
toast: "font-sans"
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
}, props)
|
|
3780
|
+
);
|
|
3781
|
+
}
|
|
3782
|
+
|
|
3783
|
+
// src/components/ui/spinner.tsx
|
|
3784
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
3785
|
+
var import_lucide_react16 = require("lucide-react");
|
|
3786
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3787
|
+
var spinnerVariants = (0, import_class_variance_authority7.cva)("animate-spin shrink-0", {
|
|
3788
|
+
variants: {
|
|
3789
|
+
size: {
|
|
3790
|
+
sm: "size-3",
|
|
3791
|
+
default: "size-4",
|
|
3792
|
+
lg: "size-6",
|
|
3793
|
+
xl: "size-8"
|
|
3794
|
+
}
|
|
3795
|
+
},
|
|
3796
|
+
defaultVariants: {
|
|
3797
|
+
size: "default"
|
|
3798
|
+
}
|
|
3799
|
+
});
|
|
3800
|
+
function Spinner(_a) {
|
|
3801
|
+
var _b = _a, { className, size } = _b, props = __objRest(_b, ["className", "size"]);
|
|
3802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3803
|
+
import_lucide_react16.LoaderCircle,
|
|
3804
|
+
__spreadValues({
|
|
3805
|
+
"aria-hidden": "true",
|
|
3806
|
+
className: cn(spinnerVariants({ size }), className),
|
|
3807
|
+
"data-slot": "spinner"
|
|
3808
|
+
}, props)
|
|
3809
|
+
);
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3812
|
+
// src/components/ui/switch.tsx
|
|
3813
|
+
var import_react5 = require("react");
|
|
3814
|
+
var import_switch = require("@base-ui/react/switch");
|
|
3815
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3816
|
+
function Switch(_a) {
|
|
3817
|
+
var _b = _a, {
|
|
3818
|
+
className,
|
|
3819
|
+
size = "default"
|
|
3820
|
+
} = _b, props = __objRest(_b, [
|
|
3821
|
+
"className",
|
|
3822
|
+
"size"
|
|
3823
|
+
]);
|
|
3824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3825
|
+
import_switch.Switch.Root,
|
|
3826
|
+
__spreadProps(__spreadValues({
|
|
3827
|
+
className: cn(
|
|
3828
|
+
"peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none",
|
|
3829
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
3830
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
3831
|
+
"data-[size=default]:h-[1.15rem] data-[size=default]:w-8",
|
|
3832
|
+
"data-[size=sm]:h-3.5 data-[size=sm]:w-6",
|
|
3833
|
+
"data-checked:bg-primary data-unchecked:bg-input",
|
|
3834
|
+
"aria-invalid:data-checked:bg-destructive aria-invalid:border-destructive",
|
|
3835
|
+
"dark:data-unchecked:bg-input/80",
|
|
3836
|
+
className
|
|
3837
|
+
),
|
|
3838
|
+
"data-size": size,
|
|
3839
|
+
"data-slot": "switch"
|
|
3840
|
+
}, props), {
|
|
3841
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3842
|
+
import_switch.Switch.Thumb,
|
|
3843
|
+
{
|
|
3844
|
+
className: cn(
|
|
3845
|
+
"pointer-events-none block rounded-full bg-background ring-0 transition-transform",
|
|
3846
|
+
"group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3",
|
|
3847
|
+
"data-checked:translate-x-[calc(100%-2px)] data-unchecked:translate-x-0",
|
|
3848
|
+
"dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground"
|
|
3849
|
+
),
|
|
3850
|
+
"data-slot": "switch-thumb"
|
|
3851
|
+
}
|
|
3852
|
+
)
|
|
3853
|
+
})
|
|
3854
|
+
);
|
|
3855
|
+
}
|
|
3856
|
+
function SwitchCard(_a) {
|
|
3857
|
+
var _b = _a, {
|
|
3858
|
+
className,
|
|
3859
|
+
checked,
|
|
3860
|
+
defaultChecked,
|
|
3861
|
+
onCheckedChange,
|
|
3862
|
+
disabled,
|
|
3863
|
+
error,
|
|
3864
|
+
label,
|
|
3865
|
+
description,
|
|
3866
|
+
switchPosition = "right",
|
|
3867
|
+
size
|
|
3868
|
+
} = _b, props = __objRest(_b, [
|
|
3869
|
+
"className",
|
|
3870
|
+
"checked",
|
|
3871
|
+
"defaultChecked",
|
|
3872
|
+
"onCheckedChange",
|
|
3873
|
+
"disabled",
|
|
3874
|
+
"error",
|
|
3875
|
+
"label",
|
|
3876
|
+
"description",
|
|
3877
|
+
"switchPosition",
|
|
3878
|
+
"size"
|
|
3879
|
+
]);
|
|
3880
|
+
const [internalChecked, setInternalChecked] = (0, import_react5.useState)(defaultChecked != null ? defaultChecked : false);
|
|
3881
|
+
const isChecked = checked != null ? checked : internalChecked;
|
|
3882
|
+
const switchElement = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3883
|
+
Switch,
|
|
3884
|
+
__spreadValues({
|
|
3885
|
+
"aria-invalid": error || void 0,
|
|
3886
|
+
checked: isChecked,
|
|
3887
|
+
className: "shrink-0",
|
|
3888
|
+
disabled,
|
|
3889
|
+
onCheckedChange: (value, event) => {
|
|
3890
|
+
setInternalChecked(value);
|
|
3891
|
+
onCheckedChange == null ? void 0 : onCheckedChange(value, event);
|
|
3892
|
+
},
|
|
3893
|
+
size
|
|
3894
|
+
}, props)
|
|
3895
|
+
);
|
|
3896
|
+
const contentElement = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-sm font-medium leading-none", children: label }),
|
|
3898
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-sm text-muted-foreground", children: description }) : null
|
|
3899
|
+
] });
|
|
3900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3901
|
+
"label",
|
|
3902
|
+
{
|
|
3903
|
+
className: cn(
|
|
3904
|
+
"flex items-center gap-3 border border-border p-4 font-sans transition-colors cursor-pointer",
|
|
3905
|
+
switchPosition === "right" && "justify-between",
|
|
3906
|
+
disabled && "cursor-not-allowed opacity-50",
|
|
3907
|
+
error ? ["border-destructive", isChecked && "bg-destructive/5"] : isChecked && "border-primary bg-primary/5",
|
|
3908
|
+
className
|
|
3909
|
+
),
|
|
3910
|
+
"data-slot": "switch-card",
|
|
3911
|
+
children: switchPosition === "left" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3912
|
+
switchElement,
|
|
3913
|
+
contentElement
|
|
3914
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3915
|
+
contentElement,
|
|
3916
|
+
switchElement
|
|
3917
|
+
] })
|
|
3918
|
+
}
|
|
3919
|
+
);
|
|
3920
|
+
}
|
|
3921
|
+
|
|
3922
|
+
// src/components/ui/tabs.tsx
|
|
3923
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
3924
|
+
var import_tabs = require("@base-ui/react/tabs");
|
|
3925
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3926
|
+
function Tabs(_a) {
|
|
3927
|
+
var _b = _a, {
|
|
3928
|
+
className,
|
|
3929
|
+
orientation = "horizontal"
|
|
3930
|
+
} = _b, props = __objRest(_b, [
|
|
3931
|
+
"className",
|
|
3932
|
+
"orientation"
|
|
3933
|
+
]);
|
|
3934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3935
|
+
import_tabs.Tabs.Root,
|
|
3936
|
+
__spreadValues({
|
|
3937
|
+
className: cn(
|
|
3938
|
+
"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",
|
|
3939
|
+
className
|
|
3940
|
+
),
|
|
3941
|
+
"data-orientation": orientation,
|
|
3942
|
+
"data-slot": "tabs"
|
|
3943
|
+
}, props)
|
|
3944
|
+
);
|
|
3945
|
+
}
|
|
3946
|
+
var tabsListVariants = (0, import_class_variance_authority8.cva)(
|
|
3947
|
+
"group/tabs-list inline-flex w-fit items-center justify-center gap-1 rounded-none p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",
|
|
3948
|
+
{
|
|
3949
|
+
variants: {
|
|
3950
|
+
variant: {
|
|
3951
|
+
default: "bg-muted",
|
|
3952
|
+
line: "bg-transparent p-0"
|
|
3953
|
+
}
|
|
3954
|
+
},
|
|
3955
|
+
defaultVariants: {
|
|
3956
|
+
variant: "default"
|
|
3957
|
+
}
|
|
3958
|
+
}
|
|
3959
|
+
);
|
|
3960
|
+
function TabsList(_a) {
|
|
3961
|
+
var _b = _a, {
|
|
3962
|
+
className,
|
|
3963
|
+
variant = "default"
|
|
3964
|
+
} = _b, props = __objRest(_b, [
|
|
3965
|
+
"className",
|
|
3966
|
+
"variant"
|
|
3967
|
+
]);
|
|
3968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3969
|
+
import_tabs.Tabs.List,
|
|
3970
|
+
__spreadValues({
|
|
3971
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
3972
|
+
"data-slot": "tabs-list",
|
|
3973
|
+
"data-variant": variant
|
|
3974
|
+
}, props)
|
|
3975
|
+
);
|
|
3976
|
+
}
|
|
3977
|
+
function TabsTrigger(_a) {
|
|
3978
|
+
var _b = _a, {
|
|
3979
|
+
className
|
|
3980
|
+
} = _b, props = __objRest(_b, [
|
|
3981
|
+
"className"
|
|
3982
|
+
]);
|
|
3983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3984
|
+
import_tabs.Tabs.Tab,
|
|
3985
|
+
__spreadValues({
|
|
3986
|
+
className: cn(
|
|
3987
|
+
// Base layout & typography
|
|
3988
|
+
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap",
|
|
3989
|
+
"rounded-none border border-transparent px-1.5 py-1 text-sm font-medium",
|
|
3990
|
+
"text-muted-foreground transition-all",
|
|
3991
|
+
// Vertical orientation
|
|
3992
|
+
"group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start",
|
|
3993
|
+
// Hover & focus
|
|
3994
|
+
"hover:text-foreground",
|
|
3995
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring",
|
|
3996
|
+
// Disabled
|
|
3997
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
3998
|
+
// Active state — Default variant: primary/10 bg + subtle shadow
|
|
3999
|
+
// Base UI uses data-active attribute for the active/selected tab
|
|
4000
|
+
"data-active:bg-primary/10 data-active:text-foreground",
|
|
4001
|
+
"group-data-[variant=default]/tabs-list:data-active:shadow-sm",
|
|
4002
|
+
// Active state — Line variant: suppress bg & shadow
|
|
4003
|
+
"group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
4004
|
+
"group-data-[variant=line]/tabs-list:data-active:shadow-none",
|
|
4005
|
+
// Indicator pseudo-element (visible only for Line variant, active state)
|
|
4006
|
+
"after:absolute after:bg-primary after:opacity-0 after:transition-opacity",
|
|
4007
|
+
"group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5",
|
|
4008
|
+
"group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5",
|
|
4009
|
+
"group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
4010
|
+
// SVG icons
|
|
4011
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
4012
|
+
className
|
|
4013
|
+
),
|
|
4014
|
+
"data-slot": "tabs-trigger"
|
|
4015
|
+
}, props)
|
|
4016
|
+
);
|
|
4017
|
+
}
|
|
4018
|
+
function TabsContent(_a) {
|
|
4019
|
+
var _b = _a, {
|
|
4020
|
+
className
|
|
4021
|
+
} = _b, props = __objRest(_b, [
|
|
4022
|
+
"className"
|
|
4023
|
+
]);
|
|
4024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4025
|
+
import_tabs.Tabs.Panel,
|
|
4026
|
+
__spreadValues({
|
|
4027
|
+
className: cn("flex-1 outline-none", className),
|
|
4028
|
+
"data-slot": "tabs-content"
|
|
4029
|
+
}, props)
|
|
4030
|
+
);
|
|
4031
|
+
}
|
|
4032
|
+
|
|
4033
|
+
// src/components/ui/toggle-group.tsx
|
|
4034
|
+
var React7 = __toESM(require("react"));
|
|
4035
|
+
var import_toggle_group = require("@base-ui/react/toggle-group");
|
|
4036
|
+
var import_toggle2 = require("@base-ui/react/toggle");
|
|
4037
|
+
|
|
4038
|
+
// src/components/ui/toggle.tsx
|
|
4039
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
4040
|
+
var import_toggle = require("@base-ui/react/toggle");
|
|
4041
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4042
|
+
var toggleVariants = (0, import_class_variance_authority9.cva)(
|
|
4043
|
+
"inline-flex items-center justify-center gap-2 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
4044
|
+
{
|
|
4045
|
+
variants: {
|
|
4046
|
+
variant: {
|
|
4047
|
+
default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
|
|
4048
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
4049
|
+
},
|
|
4050
|
+
size: {
|
|
4051
|
+
default: "h-9 min-w-9 px-2",
|
|
4052
|
+
sm: "h-8 min-w-8 px-1.5",
|
|
4053
|
+
lg: "h-10 min-w-10 px-2.5"
|
|
4054
|
+
}
|
|
4055
|
+
},
|
|
4056
|
+
defaultVariants: {
|
|
4057
|
+
variant: "default",
|
|
4058
|
+
size: "default"
|
|
4059
|
+
}
|
|
4060
|
+
}
|
|
4061
|
+
);
|
|
4062
|
+
function Toggle(_a) {
|
|
4063
|
+
var _b = _a, {
|
|
4064
|
+
className,
|
|
4065
|
+
variant,
|
|
4066
|
+
size
|
|
4067
|
+
} = _b, props = __objRest(_b, [
|
|
4068
|
+
"className",
|
|
4069
|
+
"variant",
|
|
4070
|
+
"size"
|
|
4071
|
+
]);
|
|
4072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4073
|
+
import_toggle.Toggle,
|
|
4074
|
+
__spreadValues({
|
|
4075
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
4076
|
+
"data-slot": "toggle"
|
|
4077
|
+
}, props)
|
|
4078
|
+
);
|
|
4079
|
+
}
|
|
4080
|
+
|
|
4081
|
+
// src/components/ui/toggle-group.tsx
|
|
4082
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4083
|
+
var ToggleGroupContext = React7.createContext({
|
|
4084
|
+
size: "default",
|
|
4085
|
+
variant: "default",
|
|
4086
|
+
spacing: 0
|
|
4087
|
+
});
|
|
4088
|
+
function ToggleGroup(_a) {
|
|
4089
|
+
var _b = _a, {
|
|
4090
|
+
className,
|
|
4091
|
+
variant,
|
|
4092
|
+
size,
|
|
4093
|
+
spacing = 0,
|
|
4094
|
+
type,
|
|
4095
|
+
children
|
|
4096
|
+
} = _b, props = __objRest(_b, [
|
|
4097
|
+
"className",
|
|
4098
|
+
"variant",
|
|
4099
|
+
"size",
|
|
4100
|
+
"spacing",
|
|
4101
|
+
"type",
|
|
4102
|
+
"children"
|
|
4103
|
+
]);
|
|
4104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4105
|
+
import_toggle_group.ToggleGroup,
|
|
4106
|
+
__spreadProps(__spreadValues({
|
|
4107
|
+
className: cn(
|
|
4108
|
+
// WealthX: removed rounded-md (sharp corners) and shadow-xs (flat panels)
|
|
4109
|
+
"group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))]",
|
|
4110
|
+
className
|
|
4111
|
+
),
|
|
4112
|
+
"data-size": size,
|
|
4113
|
+
"data-slot": "toggle-group",
|
|
4114
|
+
"data-spacing": spacing,
|
|
4115
|
+
"data-variant": variant,
|
|
4116
|
+
multiple: type === "multiple",
|
|
4117
|
+
style: { "--gap": spacing }
|
|
4118
|
+
}, props), {
|
|
4119
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
|
|
4120
|
+
})
|
|
4121
|
+
);
|
|
4122
|
+
}
|
|
4123
|
+
function ToggleGroupItem(_a) {
|
|
4124
|
+
var _b = _a, {
|
|
4125
|
+
className,
|
|
4126
|
+
children,
|
|
4127
|
+
variant,
|
|
4128
|
+
size
|
|
4129
|
+
} = _b, props = __objRest(_b, [
|
|
4130
|
+
"className",
|
|
4131
|
+
"children",
|
|
4132
|
+
"variant",
|
|
4133
|
+
"size"
|
|
4134
|
+
]);
|
|
4135
|
+
const context = React7.useContext(ToggleGroupContext);
|
|
4136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4137
|
+
import_toggle2.Toggle,
|
|
4138
|
+
__spreadProps(__spreadValues({
|
|
4139
|
+
className: cn(
|
|
4140
|
+
toggleVariants({
|
|
4141
|
+
variant: context.variant || variant,
|
|
4142
|
+
size: context.size || size
|
|
4143
|
+
}),
|
|
4144
|
+
"w-auto min-w-0 shrink-0 focus:z-10 focus-visible:z-10",
|
|
4145
|
+
// WealthX: no rounded corners on grouped items
|
|
4146
|
+
"data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
|
|
4147
|
+
className
|
|
4148
|
+
),
|
|
4149
|
+
"data-size": context.size || size,
|
|
4150
|
+
"data-slot": "toggle-group-item",
|
|
4151
|
+
"data-spacing": context.spacing,
|
|
4152
|
+
"data-variant": context.variant || variant
|
|
4153
|
+
}, props), {
|
|
4154
|
+
children
|
|
4155
|
+
})
|
|
4156
|
+
);
|
|
4157
|
+
}
|
|
4158
|
+
|
|
4159
|
+
// src/components/ui/tooltip.tsx
|
|
4160
|
+
var import_tooltip = require("@base-ui/react/tooltip");
|
|
4161
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4162
|
+
function TooltipProvider(_a) {
|
|
4163
|
+
var _b = _a, {
|
|
4164
|
+
delay = 0
|
|
4165
|
+
} = _b, props = __objRest(_b, [
|
|
4166
|
+
"delay"
|
|
4167
|
+
]);
|
|
4168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4169
|
+
import_tooltip.Tooltip.Provider,
|
|
4170
|
+
__spreadValues({
|
|
4171
|
+
"data-slot": "tooltip-provider",
|
|
4172
|
+
delay
|
|
4173
|
+
}, props)
|
|
4174
|
+
);
|
|
4175
|
+
}
|
|
4176
|
+
function Tooltip(_a) {
|
|
4177
|
+
var props = __objRest(_a, []);
|
|
4178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_tooltip.Tooltip.Root, __spreadValues({ "data-slot": "tooltip" }, props));
|
|
4179
|
+
}
|
|
4180
|
+
function TooltipTrigger(_a) {
|
|
4181
|
+
var props = __objRest(_a, []);
|
|
4182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_tooltip.Tooltip.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
4183
|
+
}
|
|
4184
|
+
function TooltipContent(_a) {
|
|
4185
|
+
var _b = _a, {
|
|
4186
|
+
className,
|
|
4187
|
+
sideOffset = 8,
|
|
4188
|
+
children,
|
|
4189
|
+
style: style2
|
|
4190
|
+
} = _b, props = __objRest(_b, [
|
|
4191
|
+
"className",
|
|
4192
|
+
"sideOffset",
|
|
4193
|
+
"children",
|
|
4194
|
+
"style"
|
|
4195
|
+
]);
|
|
4196
|
+
const themeVars = useThemeVars();
|
|
4197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_tooltip.Tooltip.Positioner, { sideOffset, children: [
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4199
|
+
import_tooltip.Tooltip.Popup,
|
|
4200
|
+
__spreadProps(__spreadValues({
|
|
4201
|
+
className: cn(
|
|
4202
|
+
"z-50 w-fit animate-in bg-brand-secondary px-3 py-1.5 text-xs text-balance text-brand-secondary-foreground fade-in-0 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 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards",
|
|
4203
|
+
className
|
|
4204
|
+
),
|
|
4205
|
+
"data-slot": "tooltip-content",
|
|
4206
|
+
style: __spreadValues(__spreadValues({}, themeVars), style2)
|
|
4207
|
+
}, props), {
|
|
4208
|
+
children
|
|
4209
|
+
})
|
|
4210
|
+
),
|
|
4211
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4212
|
+
import_tooltip.Tooltip.Arrow,
|
|
4213
|
+
{
|
|
4214
|
+
className: "z-50 size-2.5 rotate-45 bg-brand-secondary"
|
|
4215
|
+
}
|
|
4216
|
+
)
|
|
4217
|
+
] }) });
|
|
4218
|
+
}
|
|
4219
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
4220
|
+
0 && (module.exports = {
|
|
4221
|
+
Accordion,
|
|
4222
|
+
AccordionContent,
|
|
4223
|
+
AccordionItem,
|
|
4224
|
+
AccordionTrigger,
|
|
4225
|
+
Alert,
|
|
4226
|
+
AlertDescription,
|
|
4227
|
+
AlertDialog,
|
|
4228
|
+
AlertDialogAction,
|
|
4229
|
+
AlertDialogCancel,
|
|
4230
|
+
AlertDialogContent,
|
|
4231
|
+
AlertDialogDescription,
|
|
4232
|
+
AlertDialogFooter,
|
|
4233
|
+
AlertDialogHeader,
|
|
4234
|
+
AlertDialogMedia,
|
|
4235
|
+
AlertDialogOverlay,
|
|
4236
|
+
AlertDialogPortal,
|
|
4237
|
+
AlertDialogTitle,
|
|
4238
|
+
AlertDialogTrigger,
|
|
4239
|
+
AlertTitle,
|
|
4240
|
+
Avatar,
|
|
4241
|
+
AvatarBadge,
|
|
4242
|
+
AvatarFallback,
|
|
4243
|
+
AvatarGroup,
|
|
4244
|
+
AvatarGroupCount,
|
|
4245
|
+
AvatarImage,
|
|
4246
|
+
Badge,
|
|
4247
|
+
Button,
|
|
4248
|
+
Calendar,
|
|
4249
|
+
CalendarDayButton,
|
|
4250
|
+
Card,
|
|
4251
|
+
CardAction,
|
|
4252
|
+
CardContent,
|
|
4253
|
+
CardDescription,
|
|
4254
|
+
CardFooter,
|
|
4255
|
+
CardHeader,
|
|
4256
|
+
CardTitle,
|
|
4257
|
+
Checkbox,
|
|
4258
|
+
CheckboxCard,
|
|
4259
|
+
Chip,
|
|
4260
|
+
DataTable,
|
|
4261
|
+
DataTableColumnHeader,
|
|
4262
|
+
DataTablePagination,
|
|
4263
|
+
DataTableSkeleton,
|
|
4264
|
+
DataTableToolbar,
|
|
4265
|
+
DatePicker,
|
|
4266
|
+
Dialog,
|
|
4267
|
+
DialogClose,
|
|
4268
|
+
DialogContent,
|
|
4269
|
+
DialogDescription,
|
|
4270
|
+
DialogFooter,
|
|
4271
|
+
DialogHeader,
|
|
4272
|
+
DialogOverlay,
|
|
4273
|
+
DialogPortal,
|
|
4274
|
+
DialogTitle,
|
|
4275
|
+
DialogTrigger,
|
|
4276
|
+
Drawer,
|
|
4277
|
+
DrawerClose,
|
|
4278
|
+
DrawerContent,
|
|
4279
|
+
DrawerDescription,
|
|
4280
|
+
DrawerFooter,
|
|
4281
|
+
DrawerHeader,
|
|
4282
|
+
DrawerOverlay,
|
|
4283
|
+
DrawerPortal,
|
|
4284
|
+
DrawerTitle,
|
|
4285
|
+
DrawerTrigger,
|
|
4286
|
+
DropdownMenu,
|
|
4287
|
+
DropdownMenuCheckboxItem,
|
|
4288
|
+
DropdownMenuContent,
|
|
4289
|
+
DropdownMenuGroup,
|
|
4290
|
+
DropdownMenuItem,
|
|
4291
|
+
DropdownMenuLabel,
|
|
4292
|
+
DropdownMenuPortal,
|
|
4293
|
+
DropdownMenuRadioGroup,
|
|
4294
|
+
DropdownMenuRadioItem,
|
|
4295
|
+
DropdownMenuSeparator,
|
|
4296
|
+
DropdownMenuShortcut,
|
|
4297
|
+
DropdownMenuSub,
|
|
4298
|
+
DropdownMenuSubContent,
|
|
4299
|
+
DropdownMenuSubTrigger,
|
|
4300
|
+
DropdownMenuTrigger,
|
|
4301
|
+
Empty,
|
|
4302
|
+
EmptyContent,
|
|
4303
|
+
EmptyDescription,
|
|
4304
|
+
EmptyHeader,
|
|
4305
|
+
EmptyMedia,
|
|
4306
|
+
EmptyTitle,
|
|
4307
|
+
FONT_FAMILY_SANS,
|
|
4308
|
+
Field,
|
|
4309
|
+
FieldContent,
|
|
4310
|
+
FieldDescription,
|
|
4311
|
+
FieldError,
|
|
4312
|
+
FieldGroup,
|
|
4313
|
+
FieldLabel,
|
|
4314
|
+
FieldLegend,
|
|
4315
|
+
FieldSeparator,
|
|
4316
|
+
FieldSet,
|
|
4317
|
+
FieldTitle,
|
|
4318
|
+
Input,
|
|
4319
|
+
InputGroup,
|
|
4320
|
+
InputGroupAddon,
|
|
4321
|
+
InputGroupButton,
|
|
4322
|
+
InputGroupInput,
|
|
4323
|
+
InputGroupText,
|
|
4324
|
+
InputGroupTextarea,
|
|
4325
|
+
InputOTP,
|
|
4326
|
+
InputOTPGroup,
|
|
4327
|
+
InputOTPSeparator,
|
|
4328
|
+
InputOTPSlot,
|
|
4329
|
+
Label,
|
|
4330
|
+
Pagination,
|
|
4331
|
+
PaginationContent,
|
|
4332
|
+
PaginationEllipsis,
|
|
4333
|
+
PaginationItem,
|
|
4334
|
+
PaginationLink,
|
|
4335
|
+
PaginationNext,
|
|
4336
|
+
PaginationPrevious,
|
|
4337
|
+
Popover,
|
|
4338
|
+
PopoverAnchor,
|
|
4339
|
+
PopoverContent,
|
|
4340
|
+
PopoverDescription,
|
|
4341
|
+
PopoverHeader,
|
|
4342
|
+
PopoverTitle,
|
|
4343
|
+
PopoverTrigger,
|
|
4344
|
+
Progress,
|
|
4345
|
+
RadioGroup,
|
|
4346
|
+
RadioGroupCard,
|
|
4347
|
+
RadioGroupItem,
|
|
4348
|
+
Select,
|
|
4349
|
+
SelectContent,
|
|
4350
|
+
SelectGroup,
|
|
4351
|
+
SelectItem,
|
|
4352
|
+
SelectLabel,
|
|
4353
|
+
SelectScrollDownButton,
|
|
4354
|
+
SelectScrollUpButton,
|
|
4355
|
+
SelectSeparator,
|
|
4356
|
+
SelectTrigger,
|
|
4357
|
+
SelectValue,
|
|
4358
|
+
Separator,
|
|
4359
|
+
Sheet,
|
|
4360
|
+
SheetClose,
|
|
4361
|
+
SheetContent,
|
|
4362
|
+
SheetDescription,
|
|
4363
|
+
SheetFooter,
|
|
4364
|
+
SheetHeader,
|
|
4365
|
+
SheetPortal,
|
|
4366
|
+
SheetTitle,
|
|
4367
|
+
SheetTrigger,
|
|
4368
|
+
Skeleton,
|
|
4369
|
+
Spinner,
|
|
4370
|
+
Switch,
|
|
4371
|
+
SwitchCard,
|
|
4372
|
+
TYPOGRAPHY,
|
|
4373
|
+
TYPOGRAPHY_BODY,
|
|
4374
|
+
TYPOGRAPHY_DISPLAY,
|
|
4375
|
+
TYPOGRAPHY_HEADING,
|
|
4376
|
+
TYPOGRAPHY_LABEL,
|
|
4377
|
+
TYPOGRAPHY_RESPONSIVE,
|
|
4378
|
+
TYPOGRAPHY_UTILITY,
|
|
4379
|
+
Table,
|
|
4380
|
+
TableBody,
|
|
4381
|
+
TableCaption,
|
|
4382
|
+
TableCell,
|
|
4383
|
+
TableFooter,
|
|
4384
|
+
TableHead,
|
|
4385
|
+
TableHeader,
|
|
4386
|
+
TableRow,
|
|
4387
|
+
Tabs,
|
|
4388
|
+
TabsContent,
|
|
4389
|
+
TabsList,
|
|
4390
|
+
TabsTrigger,
|
|
4391
|
+
Textarea,
|
|
4392
|
+
Toaster,
|
|
4393
|
+
Toggle,
|
|
4394
|
+
ToggleGroup,
|
|
4395
|
+
ToggleGroupItem,
|
|
4396
|
+
Tooltip,
|
|
4397
|
+
TooltipContent,
|
|
4398
|
+
TooltipProvider,
|
|
4399
|
+
TooltipTrigger,
|
|
4400
|
+
badgeVariants,
|
|
4401
|
+
buttonVariants,
|
|
4402
|
+
cn,
|
|
4403
|
+
getResponsiveTypographyCssVars,
|
|
4404
|
+
getSelectionColumn,
|
|
4405
|
+
getTypographyCssVars,
|
|
4406
|
+
spinnerVariants,
|
|
4407
|
+
tabsListVariants,
|
|
4408
|
+
toggleVariants
|
|
4409
|
+
});
|