@use-stall/ui 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/index.d.mts +770 -0
- package/dist/index.d.ts +770 -0
- package/dist/index.js +3744 -0
- package/dist/index.mjs +3525 -0
- package/dist/styles.css +3 -0
- package/dist/styles.d.mts +2 -0
- package/dist/styles.d.ts +2 -0
- package/package.json +81 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3744 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
Accordion: () => Accordion,
|
|
34
|
+
AccordionContent: () => AccordionContent,
|
|
35
|
+
AccordionItem: () => AccordionItem,
|
|
36
|
+
AccordionTrigger: () => AccordionTrigger,
|
|
37
|
+
AlertDialog: () => AlertDialog,
|
|
38
|
+
AlertDialogBackdrop: () => AlertDialogBackdrop,
|
|
39
|
+
AlertDialogClose: () => AlertDialogClose,
|
|
40
|
+
AlertDialogContent: () => AlertDialogPopup,
|
|
41
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
42
|
+
AlertDialogFooter: () => AlertDialogFooter,
|
|
43
|
+
AlertDialogHeader: () => AlertDialogHeader,
|
|
44
|
+
AlertDialogOverlay: () => AlertDialogBackdrop,
|
|
45
|
+
AlertDialogPopup: () => AlertDialogPopup,
|
|
46
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
47
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
48
|
+
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
49
|
+
Avatar: () => Avatar,
|
|
50
|
+
AvatarFallback: () => AvatarFallback,
|
|
51
|
+
AvatarImage: () => AvatarImage,
|
|
52
|
+
Badge: () => Badge,
|
|
53
|
+
Breadcrumb: () => Breadcrumb,
|
|
54
|
+
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
|
55
|
+
BreadcrumbItem: () => BreadcrumbItem,
|
|
56
|
+
BreadcrumbLink: () => BreadcrumbLink,
|
|
57
|
+
BreadcrumbList: () => BreadcrumbList,
|
|
58
|
+
BreadcrumbPage: () => BreadcrumbPage,
|
|
59
|
+
BreadcrumbSeparator: () => BreadcrumbSeparator,
|
|
60
|
+
Button: () => Button,
|
|
61
|
+
Card: () => Card,
|
|
62
|
+
CardContent: () => CardContent,
|
|
63
|
+
CardDescription: () => CardDescription,
|
|
64
|
+
CardFooter: () => CardFooter,
|
|
65
|
+
CardHeader: () => CardHeader,
|
|
66
|
+
CardTitle: () => CardTitle,
|
|
67
|
+
Checkbox: () => Checkbox,
|
|
68
|
+
Combobox: () => Combobox2,
|
|
69
|
+
ComboboxChip: () => ComboboxChip,
|
|
70
|
+
ComboboxChips: () => ComboboxChips,
|
|
71
|
+
ComboboxClear: () => ComboboxClear,
|
|
72
|
+
ComboboxCollection: () => ComboboxCollection,
|
|
73
|
+
ComboboxEmpty: () => ComboboxEmpty,
|
|
74
|
+
ComboboxGroup: () => ComboboxGroup,
|
|
75
|
+
ComboboxGroupLabel: () => ComboboxGroupLabel,
|
|
76
|
+
ComboboxInput: () => ComboboxInput,
|
|
77
|
+
ComboboxItem: () => ComboboxItem,
|
|
78
|
+
ComboboxList: () => ComboboxList,
|
|
79
|
+
ComboboxMulti: () => Combobox,
|
|
80
|
+
ComboboxPopup: () => ComboboxPopup,
|
|
81
|
+
ComboboxRow: () => ComboboxRow,
|
|
82
|
+
ComboboxSeparator: () => ComboboxSeparator,
|
|
83
|
+
ComboboxStatus: () => ComboboxStatus,
|
|
84
|
+
ComboboxTrigger: () => ComboboxTrigger,
|
|
85
|
+
ComboboxValue: () => ComboboxValue,
|
|
86
|
+
Command: () => Command,
|
|
87
|
+
CommandDialog: () => CommandDialog,
|
|
88
|
+
CommandEmpty: () => CommandEmpty,
|
|
89
|
+
CommandGroup: () => CommandGroup,
|
|
90
|
+
CommandInput: () => CommandInput,
|
|
91
|
+
CommandItem: () => CommandItem,
|
|
92
|
+
CommandList: () => CommandList,
|
|
93
|
+
CommandSeparator: () => CommandSeparator,
|
|
94
|
+
CommandShortcut: () => CommandShortcut,
|
|
95
|
+
ConfirmDialog: () => ConfirmDialog,
|
|
96
|
+
CopyButton: () => CopyButton,
|
|
97
|
+
CountryPicker: () => CountryPicker,
|
|
98
|
+
Dialog: () => Dialog,
|
|
99
|
+
DialogBackdrop: () => DialogBackdrop,
|
|
100
|
+
DialogClose: () => DialogClose,
|
|
101
|
+
DialogContent: () => DialogPopup,
|
|
102
|
+
DialogDescription: () => DialogDescription,
|
|
103
|
+
DialogFooter: () => DialogFooter,
|
|
104
|
+
DialogHeader: () => DialogHeader,
|
|
105
|
+
DialogOverlay: () => DialogBackdrop,
|
|
106
|
+
DialogPopup: () => DialogPopup,
|
|
107
|
+
DialogPortal: () => DialogPortal,
|
|
108
|
+
DialogTitle: () => DialogTitle,
|
|
109
|
+
DialogTrigger: () => DialogTrigger,
|
|
110
|
+
Drawer: () => Drawer,
|
|
111
|
+
DrawerClose: () => DrawerClose,
|
|
112
|
+
DrawerContent: () => DrawerContent,
|
|
113
|
+
DrawerDescription: () => DrawerDescription,
|
|
114
|
+
DrawerFooter: () => DrawerFooter,
|
|
115
|
+
DrawerHeader: () => DrawerHeader,
|
|
116
|
+
DrawerOverlay: () => DrawerOverlay,
|
|
117
|
+
DrawerPortal: () => DrawerPortal,
|
|
118
|
+
DrawerTitle: () => DrawerTitle,
|
|
119
|
+
DrawerTrigger: () => DrawerTrigger,
|
|
120
|
+
DropdownMenu: () => DropdownMenu,
|
|
121
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
122
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
123
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
124
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
125
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
126
|
+
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
127
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
128
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
129
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
130
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
131
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
132
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
133
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
134
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
135
|
+
FancyButton: () => ButtonRoot,
|
|
136
|
+
Field: () => Field,
|
|
137
|
+
FieldControl: () => FieldControl,
|
|
138
|
+
FieldDescription: () => FieldDescription,
|
|
139
|
+
FieldError: () => FieldError,
|
|
140
|
+
FieldLabel: () => FieldLabel,
|
|
141
|
+
FieldValidity: () => FieldValidity,
|
|
142
|
+
Form: () => Form,
|
|
143
|
+
FormControl: () => FormControl,
|
|
144
|
+
FormDescription: () => FormDescription,
|
|
145
|
+
FormField: () => FormField,
|
|
146
|
+
FormItem: () => FormItem,
|
|
147
|
+
FormLabel: () => FormLabel,
|
|
148
|
+
FormMessage: () => FormMessage,
|
|
149
|
+
Icon: () => ButtonIcon,
|
|
150
|
+
Input: () => Input,
|
|
151
|
+
InputOTP: () => InputOTP,
|
|
152
|
+
InputOTPGroup: () => InputOTPGroup,
|
|
153
|
+
InputOTPSeparator: () => InputOTPSeparator,
|
|
154
|
+
InputOTPSlot: () => InputOTPSlot,
|
|
155
|
+
Label: () => Label2,
|
|
156
|
+
MultiSelect: () => MultiSelect,
|
|
157
|
+
Popover: () => Popover,
|
|
158
|
+
PopoverContent: () => PopoverContent,
|
|
159
|
+
PopoverTrigger: () => PopoverTrigger,
|
|
160
|
+
Progress: () => Progress,
|
|
161
|
+
Root: () => ButtonRoot,
|
|
162
|
+
ScrollArea: () => ScrollArea,
|
|
163
|
+
ScrollBar: () => ScrollBar,
|
|
164
|
+
Select: () => Select,
|
|
165
|
+
SelectContent: () => SelectContent,
|
|
166
|
+
SelectGroup: () => SelectGroup,
|
|
167
|
+
SelectItem: () => SelectItem,
|
|
168
|
+
SelectLabel: () => SelectLabel,
|
|
169
|
+
SelectScrollDownButton: () => SelectScrollDownButton,
|
|
170
|
+
SelectScrollUpButton: () => SelectScrollUpButton,
|
|
171
|
+
SelectSeparator: () => SelectSeparator,
|
|
172
|
+
SelectTrigger: () => SelectTrigger,
|
|
173
|
+
SelectValue: () => SelectValue,
|
|
174
|
+
Separator: () => Separator3,
|
|
175
|
+
Sheet: () => Sheet,
|
|
176
|
+
SheetClose: () => SheetClose,
|
|
177
|
+
SheetContent: () => SheetContent,
|
|
178
|
+
SheetDescription: () => SheetDescription,
|
|
179
|
+
SheetFooter: () => SheetFooter,
|
|
180
|
+
SheetHeader: () => SheetHeader,
|
|
181
|
+
SheetOverlay: () => SheetOverlay,
|
|
182
|
+
SheetPortal: () => SheetPortal,
|
|
183
|
+
SheetTitle: () => SheetTitle,
|
|
184
|
+
SheetTrigger: () => SheetTrigger,
|
|
185
|
+
Skeleton: () => Skeleton,
|
|
186
|
+
StatusIndicator: () => StatusIndicator,
|
|
187
|
+
Switch: () => Switch,
|
|
188
|
+
Table: () => Table,
|
|
189
|
+
TableBody: () => TableBody,
|
|
190
|
+
TableCaption: () => TableCaption,
|
|
191
|
+
TableCell: () => TableCell,
|
|
192
|
+
TableFooter: () => TableFooter,
|
|
193
|
+
TableHead: () => TableHead,
|
|
194
|
+
TableHeader: () => TableHeader,
|
|
195
|
+
TableRow: () => TableRow,
|
|
196
|
+
Tabs: () => Tabs,
|
|
197
|
+
TabsContent: () => TabsContent,
|
|
198
|
+
TabsList: () => TabsList,
|
|
199
|
+
TabsTrigger: () => TabsTrigger,
|
|
200
|
+
Textarea: () => Textarea,
|
|
201
|
+
Timeline: () => Timeline,
|
|
202
|
+
TimelineConnector: () => TimelineConnector,
|
|
203
|
+
TimelineContent: () => TimelineContent,
|
|
204
|
+
TimelineDescription: () => TimelineDescription,
|
|
205
|
+
TimelineDot: () => TimelineDot,
|
|
206
|
+
TimelineItem: () => TimelineItem,
|
|
207
|
+
TimelineSeparator: () => TimelineSeparator,
|
|
208
|
+
TimelineTitle: () => TimelineTitle,
|
|
209
|
+
Tooltip: () => Tooltip,
|
|
210
|
+
TooltipContent: () => TooltipContent,
|
|
211
|
+
TooltipProvider: () => TooltipProvider,
|
|
212
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
213
|
+
badgeVariants: () => badgeVariants,
|
|
214
|
+
buttonVariants: () => buttonVariants,
|
|
215
|
+
cn: () => cn,
|
|
216
|
+
statusIndicatorVariants: () => statusIndicatorVariants,
|
|
217
|
+
tv: () => tv,
|
|
218
|
+
useComboboxFilter: () => useComboboxFilter,
|
|
219
|
+
useFormField: () => useFormField
|
|
220
|
+
});
|
|
221
|
+
module.exports = __toCommonJS(index_exports);
|
|
222
|
+
|
|
223
|
+
// src/components/accordion.tsx
|
|
224
|
+
var React = __toESM(require("react"));
|
|
225
|
+
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
|
|
226
|
+
var import_lucide_react = require("lucide-react");
|
|
227
|
+
|
|
228
|
+
// src/lib/utils.ts
|
|
229
|
+
var import_clsx = require("clsx");
|
|
230
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
231
|
+
function cn(...inputs) {
|
|
232
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// src/components/accordion.tsx
|
|
236
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
237
|
+
var Accordion = AccordionPrimitive.Root;
|
|
238
|
+
var AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
239
|
+
AccordionPrimitive.Item,
|
|
240
|
+
{
|
|
241
|
+
ref,
|
|
242
|
+
className: cn("border-b last:border-b-0", className),
|
|
243
|
+
...props
|
|
244
|
+
}
|
|
245
|
+
));
|
|
246
|
+
AccordionItem.displayName = "AccordionItem";
|
|
247
|
+
var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
248
|
+
AccordionPrimitive.Trigger,
|
|
249
|
+
{
|
|
250
|
+
ref,
|
|
251
|
+
className: cn(
|
|
252
|
+
"flex flex-1 items-center justify-between py-4 font-medium text-xs transition-all hover:underline [&[data-state=open]>svg]:rotate-180 cursor-pointer",
|
|
253
|
+
className
|
|
254
|
+
),
|
|
255
|
+
...props,
|
|
256
|
+
children: [
|
|
257
|
+
children,
|
|
258
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
) }));
|
|
262
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
263
|
+
var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
264
|
+
AccordionPrimitive.Content,
|
|
265
|
+
{
|
|
266
|
+
ref,
|
|
267
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
268
|
+
...props,
|
|
269
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cn("pb-4 pt-0", className), children })
|
|
270
|
+
}
|
|
271
|
+
));
|
|
272
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
273
|
+
|
|
274
|
+
// src/components/alert-dialog.tsx
|
|
275
|
+
var import_alert_dialog = require("@base-ui-components/react/alert-dialog");
|
|
276
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
277
|
+
function AlertDialog(props) {
|
|
278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_alert_dialog.AlertDialog.Root, { "data-slot": "alert-dialog", ...props });
|
|
279
|
+
}
|
|
280
|
+
function AlertDialogTrigger(props) {
|
|
281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_alert_dialog.AlertDialog.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
282
|
+
}
|
|
283
|
+
function AlertDialogPortal(props) {
|
|
284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_alert_dialog.AlertDialog.Portal, { ...props });
|
|
285
|
+
}
|
|
286
|
+
function AlertDialogBackdrop({
|
|
287
|
+
className,
|
|
288
|
+
...props
|
|
289
|
+
}) {
|
|
290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
291
|
+
import_alert_dialog.AlertDialog.Backdrop,
|
|
292
|
+
{
|
|
293
|
+
className: cn(
|
|
294
|
+
"fixed inset-0 z-50 bg-black/32 backdrop-blur-sm transition-all duration-200 ease-out data-ending-style:opacity-0 data-starting-style:opacity-0",
|
|
295
|
+
className
|
|
296
|
+
),
|
|
297
|
+
"data-slot": "alert-dialog-backdrop",
|
|
298
|
+
...props
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
function AlertDialogPopup({
|
|
303
|
+
className,
|
|
304
|
+
...props
|
|
305
|
+
}) {
|
|
306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(AlertDialogPortal, { children: [
|
|
307
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AlertDialogBackdrop, {}),
|
|
308
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "fixed inset-0 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex h-dvh flex-col items-center overflow-hidden pt-6 max-sm:before:flex-1 sm:overflow-y-auto sm:p-4 sm:after:flex-1 sm:before:basis-[20vh]", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
309
|
+
import_alert_dialog.AlertDialog.Popup,
|
|
310
|
+
{
|
|
311
|
+
className: cn(
|
|
312
|
+
"sm:-translate-y-[calc(1.25rem*var(--nested-dialogs))] row-start-2 grid w-full min-w-0 origin-top gap-4 border bg-popover bg-clip-padding p-6 text-popover-foreground shadow-lg transition-[scale,opacity,translate] duration-200 ease-in-out will-change-transform data-ending-style:opacity-0 data-starting-style:opacity-0 max-sm:overflow-y-auto max-sm:border-none max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4 sm:max-w-lg sm:scale-[calc(1-0.1*var(--nested-dialogs))] sm:rounded-2xl sm:data-ending-style:scale-98 sm:data-starting-style:scale-98 dark:bg-clip-border",
|
|
313
|
+
"relative before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] max-sm:before:hidden sm:data-nested:data-ending-style:translate-y-8 sm:data-nested:data-starting-style:translate-y-8 sm:before:rounded-[calc(var(--radius-2xl)-1px)] dark:before:shadow-[0_-1px_--theme(--color-white/8%)]",
|
|
314
|
+
className
|
|
315
|
+
),
|
|
316
|
+
"data-slot": "alert-dialog-popup",
|
|
317
|
+
...props
|
|
318
|
+
}
|
|
319
|
+
) }) })
|
|
320
|
+
] });
|
|
321
|
+
}
|
|
322
|
+
function AlertDialogHeader({
|
|
323
|
+
className,
|
|
324
|
+
...props
|
|
325
|
+
}) {
|
|
326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
327
|
+
"div",
|
|
328
|
+
{
|
|
329
|
+
className: cn("flex flex-col gap-1 text-center sm:text-left", className),
|
|
330
|
+
"data-slot": "alert-dialog-header",
|
|
331
|
+
...props
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
function AlertDialogFooter({
|
|
336
|
+
className,
|
|
337
|
+
...props
|
|
338
|
+
}) {
|
|
339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
340
|
+
"div",
|
|
341
|
+
{
|
|
342
|
+
className: cn(
|
|
343
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
344
|
+
className
|
|
345
|
+
),
|
|
346
|
+
"data-slot": "alert-dialog-footer",
|
|
347
|
+
...props
|
|
348
|
+
}
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
function AlertDialogTitle({
|
|
352
|
+
className,
|
|
353
|
+
...props
|
|
354
|
+
}) {
|
|
355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
356
|
+
import_alert_dialog.AlertDialog.Title,
|
|
357
|
+
{
|
|
358
|
+
className: cn("font-semibold text-lg", className),
|
|
359
|
+
"data-slot": "alert-dialog-title",
|
|
360
|
+
...props
|
|
361
|
+
}
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
function AlertDialogDescription({
|
|
365
|
+
className,
|
|
366
|
+
...props
|
|
367
|
+
}) {
|
|
368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
369
|
+
import_alert_dialog.AlertDialog.Description,
|
|
370
|
+
{
|
|
371
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
372
|
+
"data-slot": "alert-dialog-description",
|
|
373
|
+
...props
|
|
374
|
+
}
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
function AlertDialogClose(props) {
|
|
378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_alert_dialog.AlertDialog.Close, { "data-slot": "alert-dialog-close", ...props });
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// src/components/avatar.tsx
|
|
382
|
+
var React2 = __toESM(require("react"));
|
|
383
|
+
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
|
|
384
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
385
|
+
var Avatar = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
386
|
+
AvatarPrimitive.Root,
|
|
387
|
+
{
|
|
388
|
+
ref,
|
|
389
|
+
className: cn(
|
|
390
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
391
|
+
className
|
|
392
|
+
),
|
|
393
|
+
...props
|
|
394
|
+
}
|
|
395
|
+
));
|
|
396
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
397
|
+
var AvatarImage = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
398
|
+
AvatarPrimitive.Image,
|
|
399
|
+
{
|
|
400
|
+
ref,
|
|
401
|
+
className: cn("aspect-square h-full w-full object-cover object-center", className),
|
|
402
|
+
...props
|
|
403
|
+
}
|
|
404
|
+
));
|
|
405
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
406
|
+
var AvatarFallback = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
407
|
+
AvatarPrimitive.Fallback,
|
|
408
|
+
{
|
|
409
|
+
ref,
|
|
410
|
+
className: cn(
|
|
411
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
412
|
+
className
|
|
413
|
+
),
|
|
414
|
+
...props
|
|
415
|
+
}
|
|
416
|
+
));
|
|
417
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
418
|
+
|
|
419
|
+
// src/components/badge.tsx
|
|
420
|
+
var import_merge_props = require("@base-ui-components/react/merge-props");
|
|
421
|
+
var import_use_render = require("@base-ui-components/react/use-render");
|
|
422
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
423
|
+
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
424
|
+
"relative inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-lg border border-transparent font-medium outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='size-'])]:size-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [button,a&]:cursor-pointer [button,a&]:pointer-coarse:after:absolute [button,a&]:pointer-coarse:after:size-full [button,a&]:pointer-coarse:after:min-h-11 [button,a&]:pointer-coarse:after:min-w-11",
|
|
425
|
+
{
|
|
426
|
+
defaultVariants: {
|
|
427
|
+
size: "default",
|
|
428
|
+
variant: "default"
|
|
429
|
+
},
|
|
430
|
+
variants: {
|
|
431
|
+
size: {
|
|
432
|
+
default: "px-[calc(--spacing(1)-1px)] text-xs",
|
|
433
|
+
lg: "px-[calc(--spacing(1.5)-1px)] text-sm",
|
|
434
|
+
sm: "px-[calc(--spacing(1)-1px)] text-[.625rem]"
|
|
435
|
+
},
|
|
436
|
+
variant: {
|
|
437
|
+
default: "bg-primary text-primary-foreground [button,a&]:hover:bg-primary/90",
|
|
438
|
+
destructive: "bg-destructive text-white [button,a&]:hover:bg-destructive/90",
|
|
439
|
+
error: "bg-destructive/8 text-destructive-foreground dark:bg-destructive/16",
|
|
440
|
+
info: "bg-info/8 text-info-foreground dark:bg-info/16",
|
|
441
|
+
outline: "border-border bg-accent/30 text-muted-foreground [button,a&]:hover:bg-accent/50 dark:[button,a&]:hover:bg-input/48",
|
|
442
|
+
secondary: "bg-secondary text-secondary-foreground [button,a&]:hover:bg-secondary/90",
|
|
443
|
+
success: "bg-success/8 text-success-foreground dark:bg-success/16",
|
|
444
|
+
warning: "bg-warning/8 text-warning-foreground dark:bg-warning/16"
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
function Badge({ className, variant, size, render, ...props }) {
|
|
450
|
+
const defaultProps = {
|
|
451
|
+
className: cn(badgeVariants({ className, size, variant })),
|
|
452
|
+
"data-slot": "badge"
|
|
453
|
+
};
|
|
454
|
+
return (0, import_use_render.useRender)({
|
|
455
|
+
defaultTagName: "span",
|
|
456
|
+
props: (0, import_merge_props.mergeProps)(defaultProps, props),
|
|
457
|
+
render
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// src/components/breadcrumb.tsx
|
|
462
|
+
var React3 = __toESM(require("react"));
|
|
463
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
464
|
+
var import_lucide_react2 = require("lucide-react");
|
|
465
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
466
|
+
var Breadcrumb = React3.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
467
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
468
|
+
var BreadcrumbList = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
469
|
+
"ol",
|
|
470
|
+
{
|
|
471
|
+
ref,
|
|
472
|
+
className: cn(
|
|
473
|
+
"flex flex-wrap items-center gap-1 wrap-break-word text-sm text-muted-foreground",
|
|
474
|
+
className
|
|
475
|
+
),
|
|
476
|
+
...props
|
|
477
|
+
}
|
|
478
|
+
));
|
|
479
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
480
|
+
var BreadcrumbItem = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
481
|
+
"li",
|
|
482
|
+
{
|
|
483
|
+
ref,
|
|
484
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
485
|
+
...props
|
|
486
|
+
}
|
|
487
|
+
));
|
|
488
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
489
|
+
var BreadcrumbLink = React3.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
490
|
+
const Comp = asChild ? import_react_slot.Slot : "a";
|
|
491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
492
|
+
Comp,
|
|
493
|
+
{
|
|
494
|
+
ref,
|
|
495
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
496
|
+
...props
|
|
497
|
+
}
|
|
498
|
+
);
|
|
499
|
+
});
|
|
500
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
501
|
+
var BreadcrumbPage = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
502
|
+
"span",
|
|
503
|
+
{
|
|
504
|
+
ref,
|
|
505
|
+
role: "link",
|
|
506
|
+
"aria-disabled": "true",
|
|
507
|
+
"aria-current": "page",
|
|
508
|
+
className: cn("font-normal text-foreground", className),
|
|
509
|
+
...props
|
|
510
|
+
}
|
|
511
|
+
));
|
|
512
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
513
|
+
var BreadcrumbSeparator = ({
|
|
514
|
+
children,
|
|
515
|
+
className,
|
|
516
|
+
...props
|
|
517
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
518
|
+
"li",
|
|
519
|
+
{
|
|
520
|
+
role: "presentation",
|
|
521
|
+
"aria-hidden": "true",
|
|
522
|
+
className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className),
|
|
523
|
+
...props,
|
|
524
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.ChevronRight, {})
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
528
|
+
var BreadcrumbEllipsis = ({
|
|
529
|
+
className,
|
|
530
|
+
...props
|
|
531
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
532
|
+
"span",
|
|
533
|
+
{
|
|
534
|
+
role: "presentation",
|
|
535
|
+
"aria-hidden": "true",
|
|
536
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
537
|
+
...props,
|
|
538
|
+
children: [
|
|
539
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.MoreHorizontal, { className: "h-4 w-4" }),
|
|
540
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "sr-only", children: "More" })
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
);
|
|
544
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
545
|
+
|
|
546
|
+
// src/components/button.tsx
|
|
547
|
+
var import_merge_props2 = require("@base-ui-components/react/merge-props");
|
|
548
|
+
var import_use_render2 = require("@base-ui-components/react/use-render");
|
|
549
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
550
|
+
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
551
|
+
"relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-10 border bg-clip-padding text-sm font-medium whitespace-nowrap transition-shadow outline-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
552
|
+
{
|
|
553
|
+
variants: {
|
|
554
|
+
variant: {
|
|
555
|
+
default: "border-primary bg-primary text-primary-foreground shadow-xs shadow-primary/24 not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] hover:bg-primary/90 [&:is(:active,[data-pressed])]:inset-shadow-[0_1px_--theme(--color-black/8%)] [&:is(:disabled,:active,[data-pressed])]:shadow-none",
|
|
556
|
+
outline: "border-border bg-background text-muted-foreground shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [&:is(:disabled,:active,[data-pressed])]:shadow-none [&:is(:hover,[data-pressed])]:opacity-80",
|
|
557
|
+
secondary: "border-secondary bg-secondary text-secondary-foreground hover:bg-secondary/90 data-pressed:bg-secondary/90",
|
|
558
|
+
destructive: "border-destructive bg-destructive text-white shadow-xs shadow-destructive/24 not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] hover:bg-destructive/90 [&:is(:active,[data-pressed])]:inset-shadow-[0_1px_--theme(--color-black/8%)] [&:is(:disabled,:active,[data-pressed])]:shadow-none",
|
|
559
|
+
"destructive-outline": "border-border bg-transparent text-destructive-foreground shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [&:is(:disabled,:active,[data-pressed])]:shadow-none [&:is(:hover,[data-pressed])]:border-destructive/32 [&:is(:hover,[data-pressed])]:bg-destructive/4",
|
|
560
|
+
ghost: "border-transparent hover:bg-accent data-pressed:bg-accent",
|
|
561
|
+
link: "border-transparent underline-offset-4 hover:underline"
|
|
562
|
+
},
|
|
563
|
+
size: {
|
|
564
|
+
default: "min-h-10 px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)]",
|
|
565
|
+
xs: "min-h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] py-[calc(--spacing(1)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] [&_svg:not([class*='size-'])]:size-3",
|
|
566
|
+
sm: "min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)]",
|
|
567
|
+
lg: "min-h-10 px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2)-1px)]",
|
|
568
|
+
xl: "min-h-12 px-[calc(--spacing(4)-1px)] py-[calc(--spacing(2)-1px)] text-base [&_svg:not([class*='size-'])]:size-4.5",
|
|
569
|
+
icon: "size-10",
|
|
570
|
+
"icon-xs": "size-6 rounded-md before:rounded-[calc(var(--radius-md)-1px)]",
|
|
571
|
+
"icon-sm": "size-7",
|
|
572
|
+
"icon-lg": "size-9",
|
|
573
|
+
"icon-xl": "size-10 [&_svg:not([class*='size-'])]:size-4.5"
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
defaultVariants: {
|
|
577
|
+
variant: "default",
|
|
578
|
+
size: "default"
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
);
|
|
582
|
+
function Button({ className, variant, size, render, ...props }) {
|
|
583
|
+
const typeValue = render ? void 0 : "button";
|
|
584
|
+
const defaultProps = {
|
|
585
|
+
"data-slot": "button",
|
|
586
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
587
|
+
type: typeValue
|
|
588
|
+
};
|
|
589
|
+
return (0, import_use_render2.useRender)({
|
|
590
|
+
defaultTagName: "button",
|
|
591
|
+
render,
|
|
592
|
+
props: (0, import_merge_props2.mergeProps)(defaultProps, props)
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
// src/components/card.tsx
|
|
597
|
+
var React4 = __toESM(require("react"));
|
|
598
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
599
|
+
var Card = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
600
|
+
"div",
|
|
601
|
+
{
|
|
602
|
+
ref,
|
|
603
|
+
className: cn(
|
|
604
|
+
"rounded-2xl border bg-card text-card-foreground shadow-xs",
|
|
605
|
+
className
|
|
606
|
+
),
|
|
607
|
+
...props
|
|
608
|
+
}
|
|
609
|
+
));
|
|
610
|
+
Card.displayName = "Card";
|
|
611
|
+
var CardHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
612
|
+
"div",
|
|
613
|
+
{
|
|
614
|
+
ref,
|
|
615
|
+
className: cn("flex flex-col space-y-1.5 p-5", className),
|
|
616
|
+
...props
|
|
617
|
+
}
|
|
618
|
+
));
|
|
619
|
+
CardHeader.displayName = "CardHeader";
|
|
620
|
+
var CardTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
621
|
+
"h3",
|
|
622
|
+
{
|
|
623
|
+
ref,
|
|
624
|
+
className: cn(
|
|
625
|
+
"text-2xl font-semibold leading-none tracking-tight",
|
|
626
|
+
className
|
|
627
|
+
),
|
|
628
|
+
...props
|
|
629
|
+
}
|
|
630
|
+
));
|
|
631
|
+
CardTitle.displayName = "CardTitle";
|
|
632
|
+
var CardDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
633
|
+
"p",
|
|
634
|
+
{
|
|
635
|
+
ref,
|
|
636
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
637
|
+
...props
|
|
638
|
+
}
|
|
639
|
+
));
|
|
640
|
+
CardDescription.displayName = "CardDescription";
|
|
641
|
+
var CardContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: cn("p-5 pt-0", className), ...props }));
|
|
642
|
+
CardContent.displayName = "CardContent";
|
|
643
|
+
var CardFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
644
|
+
"div",
|
|
645
|
+
{
|
|
646
|
+
ref,
|
|
647
|
+
className: cn("flex items-center p-5 pt-0", className),
|
|
648
|
+
...props
|
|
649
|
+
}
|
|
650
|
+
));
|
|
651
|
+
CardFooter.displayName = "CardFooter";
|
|
652
|
+
|
|
653
|
+
// src/components/checkbox.tsx
|
|
654
|
+
var React5 = __toESM(require("react"));
|
|
655
|
+
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
656
|
+
var import_lucide_react3 = require("lucide-react");
|
|
657
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
658
|
+
var Checkbox = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
659
|
+
CheckboxPrimitive.Root,
|
|
660
|
+
{
|
|
661
|
+
ref,
|
|
662
|
+
className: cn(
|
|
663
|
+
"peer h-4 w-4 shrink-0 rounded-sm shadow-xs border border-border ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-none",
|
|
664
|
+
className
|
|
665
|
+
),
|
|
666
|
+
...props,
|
|
667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
668
|
+
CheckboxPrimitive.Indicator,
|
|
669
|
+
{
|
|
670
|
+
className: cn("flex items-center justify-center text-current"),
|
|
671
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Check, { className: "h-3 w-3 stroke-white" })
|
|
672
|
+
}
|
|
673
|
+
)
|
|
674
|
+
}
|
|
675
|
+
));
|
|
676
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
677
|
+
|
|
678
|
+
// src/components/combobox-multi.tsx
|
|
679
|
+
var import_combobox = require("@base-ui/react/combobox");
|
|
680
|
+
var import_lucide_react4 = require("lucide-react");
|
|
681
|
+
var React8 = __toESM(require("react"));
|
|
682
|
+
|
|
683
|
+
// src/components/input.tsx
|
|
684
|
+
var React6 = __toESM(require("react"));
|
|
685
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
686
|
+
var Input = React6.forwardRef(
|
|
687
|
+
({ className, type, removeFocusIndicator, ...props }, ref) => {
|
|
688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
689
|
+
"input",
|
|
690
|
+
{
|
|
691
|
+
type,
|
|
692
|
+
className: cn(
|
|
693
|
+
`flex h-10 w-full rounded-10 border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0
|
|
694
|
+
file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/30 font-normal
|
|
695
|
+
focus-visible:outline-hidden focus-visible:border-primary/80 focus-visible:ring-2 focus-visible:ring-ring/30
|
|
696
|
+
focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50`,
|
|
697
|
+
removeFocusIndicator && "focus-visible:ring-0 focus:ring-0 focus-visible:ring-offset-0 focus-visible:border-input",
|
|
698
|
+
className
|
|
699
|
+
),
|
|
700
|
+
ref,
|
|
701
|
+
...props
|
|
702
|
+
}
|
|
703
|
+
);
|
|
704
|
+
}
|
|
705
|
+
);
|
|
706
|
+
Input.displayName = "Input";
|
|
707
|
+
|
|
708
|
+
// src/components/scroll-area.tsx
|
|
709
|
+
var React7 = __toESM(require("react"));
|
|
710
|
+
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"));
|
|
711
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
712
|
+
var ScrollArea = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
713
|
+
ScrollAreaPrimitive.Root,
|
|
714
|
+
{
|
|
715
|
+
ref,
|
|
716
|
+
className: cn("relative overflow-hidden", className),
|
|
717
|
+
...props,
|
|
718
|
+
children: [
|
|
719
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
720
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ScrollBar, {}),
|
|
721
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
722
|
+
]
|
|
723
|
+
}
|
|
724
|
+
));
|
|
725
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
726
|
+
var ScrollBar = React7.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
727
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
728
|
+
{
|
|
729
|
+
ref,
|
|
730
|
+
orientation,
|
|
731
|
+
className: cn(
|
|
732
|
+
"flex touch-none select-none transition-colors",
|
|
733
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
|
|
734
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
|
|
735
|
+
className
|
|
736
|
+
),
|
|
737
|
+
...props,
|
|
738
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
739
|
+
}
|
|
740
|
+
));
|
|
741
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
742
|
+
|
|
743
|
+
// src/components/combobox-multi.tsx
|
|
744
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
745
|
+
var ComboboxContext = React8.createContext({
|
|
746
|
+
chipsRef: null,
|
|
747
|
+
multiple: false
|
|
748
|
+
});
|
|
749
|
+
function Combobox(props) {
|
|
750
|
+
const chipsRef = React8.useRef(null);
|
|
751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ComboboxContext.Provider, { value: { chipsRef, multiple: !!props.multiple }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
752
|
+
import_combobox.Combobox.Root,
|
|
753
|
+
{
|
|
754
|
+
...props
|
|
755
|
+
}
|
|
756
|
+
) });
|
|
757
|
+
}
|
|
758
|
+
function ComboboxInput({
|
|
759
|
+
className,
|
|
760
|
+
showTrigger = true,
|
|
761
|
+
showClear = false,
|
|
762
|
+
startAddon,
|
|
763
|
+
size,
|
|
764
|
+
...props
|
|
765
|
+
}) {
|
|
766
|
+
const { multiple } = React8.useContext(ComboboxContext);
|
|
767
|
+
const sizeValue = size ?? "default";
|
|
768
|
+
if (multiple) {
|
|
769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
770
|
+
import_combobox.Combobox.Input,
|
|
771
|
+
{
|
|
772
|
+
className: cn(
|
|
773
|
+
"min-w-12 flex-1 text-base outline-none sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5",
|
|
774
|
+
sizeValue === "sm" ? "ps-1.5" : "ps-2",
|
|
775
|
+
className
|
|
776
|
+
),
|
|
777
|
+
"data-size": typeof sizeValue === "string" ? sizeValue : void 0,
|
|
778
|
+
"data-slot": "combobox-input",
|
|
779
|
+
size: typeof sizeValue === "number" ? sizeValue : void 0,
|
|
780
|
+
...props
|
|
781
|
+
}
|
|
782
|
+
);
|
|
783
|
+
}
|
|
784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64", children: [
|
|
785
|
+
startAddon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
786
|
+
"div",
|
|
787
|
+
{
|
|
788
|
+
"aria-hidden": "true",
|
|
789
|
+
className: "[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4",
|
|
790
|
+
"data-slot": "combobox-start-addon",
|
|
791
|
+
children: startAddon
|
|
792
|
+
}
|
|
793
|
+
),
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
795
|
+
import_combobox.Combobox.Input,
|
|
796
|
+
{
|
|
797
|
+
className: cn(
|
|
798
|
+
startAddon && "data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]",
|
|
799
|
+
sizeValue === "sm" ? "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5" : "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7",
|
|
800
|
+
className
|
|
801
|
+
),
|
|
802
|
+
"data-slot": "combobox-input",
|
|
803
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
804
|
+
Input,
|
|
805
|
+
{
|
|
806
|
+
className: "has-disabled:opacity-100",
|
|
807
|
+
size: sizeValue
|
|
808
|
+
}
|
|
809
|
+
),
|
|
810
|
+
...props
|
|
811
|
+
}
|
|
812
|
+
),
|
|
813
|
+
showTrigger && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
814
|
+
ComboboxTrigger,
|
|
815
|
+
{
|
|
816
|
+
className: cn(
|
|
817
|
+
"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
818
|
+
sizeValue === "sm" ? "end-0" : "end-0.5"
|
|
819
|
+
),
|
|
820
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.ChevronsUpDownIcon, {})
|
|
821
|
+
}
|
|
822
|
+
),
|
|
823
|
+
showClear && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
824
|
+
ComboboxClear,
|
|
825
|
+
{
|
|
826
|
+
className: cn(
|
|
827
|
+
"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
828
|
+
sizeValue === "sm" ? "end-0" : "end-0.5"
|
|
829
|
+
),
|
|
830
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.XIcon, {})
|
|
831
|
+
}
|
|
832
|
+
)
|
|
833
|
+
] });
|
|
834
|
+
}
|
|
835
|
+
function ComboboxTrigger({
|
|
836
|
+
className,
|
|
837
|
+
...props
|
|
838
|
+
}) {
|
|
839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
840
|
+
import_combobox.Combobox.Trigger,
|
|
841
|
+
{
|
|
842
|
+
className,
|
|
843
|
+
"data-slot": "combobox-trigger",
|
|
844
|
+
...props
|
|
845
|
+
}
|
|
846
|
+
);
|
|
847
|
+
}
|
|
848
|
+
function ComboboxPopup({
|
|
849
|
+
className,
|
|
850
|
+
children,
|
|
851
|
+
sideOffset = 4,
|
|
852
|
+
...props
|
|
853
|
+
}) {
|
|
854
|
+
const { chipsRef } = React8.useContext(ComboboxContext);
|
|
855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_combobox.Combobox.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
856
|
+
import_combobox.Combobox.Positioner,
|
|
857
|
+
{
|
|
858
|
+
anchor: chipsRef,
|
|
859
|
+
className: "z-50 select-none",
|
|
860
|
+
"data-slot": "combobox-positioner",
|
|
861
|
+
sideOffset,
|
|
862
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
863
|
+
"span",
|
|
864
|
+
{
|
|
865
|
+
className: cn(
|
|
866
|
+
"relative flex max-h-full origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
|
|
867
|
+
className
|
|
868
|
+
),
|
|
869
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
870
|
+
import_combobox.Combobox.Popup,
|
|
871
|
+
{
|
|
872
|
+
className: "flex max-h-[min(var(--available-height),23rem)] w-(--anchor-width) max-w-(--available-width) flex-col text-foreground",
|
|
873
|
+
"data-slot": "combobox-popup",
|
|
874
|
+
...props,
|
|
875
|
+
children
|
|
876
|
+
}
|
|
877
|
+
)
|
|
878
|
+
}
|
|
879
|
+
)
|
|
880
|
+
}
|
|
881
|
+
) });
|
|
882
|
+
}
|
|
883
|
+
function ComboboxItem({
|
|
884
|
+
className,
|
|
885
|
+
children,
|
|
886
|
+
...props
|
|
887
|
+
}) {
|
|
888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
889
|
+
import_combobox.Combobox.Item,
|
|
890
|
+
{
|
|
891
|
+
className: cn(
|
|
892
|
+
"grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
893
|
+
className
|
|
894
|
+
),
|
|
895
|
+
"data-slot": "combobox-item",
|
|
896
|
+
...props,
|
|
897
|
+
children: [
|
|
898
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_combobox.Combobox.ItemIndicator, { className: "col-start-1", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
899
|
+
"svg",
|
|
900
|
+
{
|
|
901
|
+
fill: "none",
|
|
902
|
+
height: "24",
|
|
903
|
+
stroke: "currentColor",
|
|
904
|
+
strokeLinecap: "round",
|
|
905
|
+
strokeLinejoin: "round",
|
|
906
|
+
strokeWidth: "2",
|
|
907
|
+
viewBox: "0 0 24 24",
|
|
908
|
+
width: "24",
|
|
909
|
+
xmlns: "http://www.w3.org/1500/svg",
|
|
910
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })
|
|
911
|
+
}
|
|
912
|
+
) }),
|
|
913
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-start-2", children })
|
|
914
|
+
]
|
|
915
|
+
}
|
|
916
|
+
);
|
|
917
|
+
}
|
|
918
|
+
function ComboboxSeparator({
|
|
919
|
+
className,
|
|
920
|
+
...props
|
|
921
|
+
}) {
|
|
922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
923
|
+
import_combobox.Combobox.Separator,
|
|
924
|
+
{
|
|
925
|
+
className: cn("mx-2 my-1 h-px bg-border last:hidden", className),
|
|
926
|
+
"data-slot": "combobox-separator",
|
|
927
|
+
...props
|
|
928
|
+
}
|
|
929
|
+
);
|
|
930
|
+
}
|
|
931
|
+
function ComboboxGroup({ className, ...props }) {
|
|
932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
933
|
+
import_combobox.Combobox.Group,
|
|
934
|
+
{
|
|
935
|
+
className: cn("[[role=group]+&]:mt-1.5", className),
|
|
936
|
+
"data-slot": "combobox-group",
|
|
937
|
+
...props
|
|
938
|
+
}
|
|
939
|
+
);
|
|
940
|
+
}
|
|
941
|
+
function ComboboxGroupLabel({
|
|
942
|
+
className,
|
|
943
|
+
...props
|
|
944
|
+
}) {
|
|
945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
946
|
+
import_combobox.Combobox.GroupLabel,
|
|
947
|
+
{
|
|
948
|
+
className: cn(
|
|
949
|
+
"px-2 py-1.5 font-medium text-muted-foreground text-xs",
|
|
950
|
+
className
|
|
951
|
+
),
|
|
952
|
+
"data-slot": "combobox-group-label",
|
|
953
|
+
...props
|
|
954
|
+
}
|
|
955
|
+
);
|
|
956
|
+
}
|
|
957
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
959
|
+
import_combobox.Combobox.Empty,
|
|
960
|
+
{
|
|
961
|
+
className: cn(
|
|
962
|
+
"not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm",
|
|
963
|
+
className
|
|
964
|
+
),
|
|
965
|
+
"data-slot": "combobox-empty",
|
|
966
|
+
...props
|
|
967
|
+
}
|
|
968
|
+
);
|
|
969
|
+
}
|
|
970
|
+
function ComboboxRow({ className, ...props }) {
|
|
971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
972
|
+
import_combobox.Combobox.Row,
|
|
973
|
+
{
|
|
974
|
+
className,
|
|
975
|
+
"data-slot": "combobox-row",
|
|
976
|
+
...props
|
|
977
|
+
}
|
|
978
|
+
);
|
|
979
|
+
}
|
|
980
|
+
function ComboboxValue({ ...props }) {
|
|
981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_combobox.Combobox.Value, { "data-slot": "combobox-value", ...props });
|
|
982
|
+
}
|
|
983
|
+
function ComboboxList({ className, ...props }) {
|
|
984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ScrollArea, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
985
|
+
import_combobox.Combobox.List,
|
|
986
|
+
{
|
|
987
|
+
className: cn(
|
|
988
|
+
"not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1 in-data-has-overflow-y:pe-3",
|
|
989
|
+
className
|
|
990
|
+
),
|
|
991
|
+
"data-slot": "combobox-list",
|
|
992
|
+
...props
|
|
993
|
+
}
|
|
994
|
+
) });
|
|
995
|
+
}
|
|
996
|
+
function ComboboxClear({ className, ...props }) {
|
|
997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
998
|
+
import_combobox.Combobox.Clear,
|
|
999
|
+
{
|
|
1000
|
+
className,
|
|
1001
|
+
"data-slot": "combobox-clear",
|
|
1002
|
+
...props
|
|
1003
|
+
}
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
function ComboboxStatus({
|
|
1007
|
+
className,
|
|
1008
|
+
...props
|
|
1009
|
+
}) {
|
|
1010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1011
|
+
import_combobox.Combobox.Status,
|
|
1012
|
+
{
|
|
1013
|
+
className: cn(
|
|
1014
|
+
"px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0",
|
|
1015
|
+
className
|
|
1016
|
+
),
|
|
1017
|
+
"data-slot": "combobox-status",
|
|
1018
|
+
...props
|
|
1019
|
+
}
|
|
1020
|
+
);
|
|
1021
|
+
}
|
|
1022
|
+
function ComboboxCollection(props) {
|
|
1023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_combobox.Combobox.Collection, { "data-slot": "combobox-collection", ...props });
|
|
1024
|
+
}
|
|
1025
|
+
function ComboboxChips({
|
|
1026
|
+
className,
|
|
1027
|
+
children,
|
|
1028
|
+
startAddon,
|
|
1029
|
+
...props
|
|
1030
|
+
}) {
|
|
1031
|
+
const { chipsRef } = React8.useContext(ComboboxContext);
|
|
1032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1033
|
+
import_combobox.Combobox.Chips,
|
|
1034
|
+
{
|
|
1035
|
+
className: cn(
|
|
1036
|
+
"relative inline-flex min-h-9 w-full flex-wrap gap-1 rounded-lg border border-input bg-background not-dark:bg-clip-padding p-[calc(--spacing(1)-1px)] text-base shadow-xs/5 outline-none ring-ring/24 transition-shadow *:min-h-7 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/6%)] focus-within:border-ring focus-within:ring-[3px] has-disabled:pointer-events-none has-data-[size=lg]:min-h-10 has-data-[size=sm]:min-h-8 has-aria-invalid:border-destructive/36 has-disabled:opacity-64 has-[:disabled,:focus-within,[aria-invalid]]:shadow-none focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 has-data-[size=lg]:*:min-h-8 has-data-[size=sm]:*:min-h-6 sm:min-h-8 sm:text-sm sm:has-data-[size=lg]:min-h-9 sm:has-data-[size=sm]:min-h-7 sm:*:min-h-6 sm:has-data-[size=lg]:*:min-h-7 sm:has-data-[size=sm]:*:min-h-5 dark:not-has-disabled:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]",
|
|
1037
|
+
className
|
|
1038
|
+
),
|
|
1039
|
+
"data-slot": "combobox-chips",
|
|
1040
|
+
onMouseDown: (e) => {
|
|
1041
|
+
const target = e.target;
|
|
1042
|
+
const isChip = target.closest('[data-slot="combobox-chip"]');
|
|
1043
|
+
if (isChip || !chipsRef?.current) return;
|
|
1044
|
+
e.preventDefault();
|
|
1045
|
+
const input = chipsRef.current.querySelector("input");
|
|
1046
|
+
if (input && !chipsRef.current.querySelector("input:focus")) {
|
|
1047
|
+
input.focus();
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
ref: chipsRef,
|
|
1051
|
+
...props,
|
|
1052
|
+
children: [
|
|
1053
|
+
startAddon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1054
|
+
"div",
|
|
1055
|
+
{
|
|
1056
|
+
"aria-hidden": "true",
|
|
1057
|
+
className: "[&_svg]:-ms-0.5 [&_svg]:-me-1.5 flex shrink-0 items-center ps-2 opacity-80 has-[~[data-size=sm]]:has-[+[data-slot=combobox-chip]]:pe-1.5 has-[~[data-size=sm]]:ps-1.5 has-[+[data-slot=combobox-chip]]:pe-2 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
1058
|
+
"data-slot": "combobox-start-addon",
|
|
1059
|
+
children: startAddon
|
|
1060
|
+
}
|
|
1061
|
+
),
|
|
1062
|
+
children
|
|
1063
|
+
]
|
|
1064
|
+
}
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
function ComboboxChip({ children, ...props }) {
|
|
1068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1069
|
+
import_combobox.Combobox.Chip,
|
|
1070
|
+
{
|
|
1071
|
+
className: "flex items-center rounded-[calc(var(--radius-md)-1px)] bg-accent ps-2 font-medium text-accent-foreground text-sm outline-none sm:text-xs/(--text-xs--line-height) [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
|
|
1072
|
+
"data-slot": "combobox-chip",
|
|
1073
|
+
...props,
|
|
1074
|
+
children: [
|
|
1075
|
+
children,
|
|
1076
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ComboboxChipRemove, {})
|
|
1077
|
+
]
|
|
1078
|
+
}
|
|
1079
|
+
);
|
|
1080
|
+
}
|
|
1081
|
+
function ComboboxChipRemove(props) {
|
|
1082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1083
|
+
import_combobox.Combobox.ChipRemove,
|
|
1084
|
+
{
|
|
1085
|
+
"aria-label": "Remove",
|
|
1086
|
+
className: "h-full shrink-0 cursor-pointer px-1.5 opacity-80 hover:opacity-100 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
|
|
1087
|
+
"data-slot": "combobox-chip-remove",
|
|
1088
|
+
...props,
|
|
1089
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.XIcon, {})
|
|
1090
|
+
}
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
var useComboboxFilter = import_combobox.Combobox.useFilter;
|
|
1094
|
+
|
|
1095
|
+
// src/components/combobox.tsx
|
|
1096
|
+
var React11 = __toESM(require("react"));
|
|
1097
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1098
|
+
|
|
1099
|
+
// src/components/command.tsx
|
|
1100
|
+
var React9 = __toESM(require("react"));
|
|
1101
|
+
var import_cmdk = require("cmdk");
|
|
1102
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1103
|
+
|
|
1104
|
+
// src/components/dialog.tsx
|
|
1105
|
+
var import_dialog = require("@base-ui-components/react/dialog");
|
|
1106
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1107
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1108
|
+
var Dialog = import_dialog.Dialog.Root;
|
|
1109
|
+
function DialogTrigger(props) {
|
|
1110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
1111
|
+
}
|
|
1112
|
+
function DialogPortal(props) {
|
|
1113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dialog.Dialog.Portal, { ...props });
|
|
1114
|
+
}
|
|
1115
|
+
function DialogClose(props) {
|
|
1116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dialog.Dialog.Close, { "data-slot": "dialog-close", ...props });
|
|
1117
|
+
}
|
|
1118
|
+
function DialogBackdrop({
|
|
1119
|
+
className,
|
|
1120
|
+
...props
|
|
1121
|
+
}) {
|
|
1122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1123
|
+
import_dialog.Dialog.Backdrop,
|
|
1124
|
+
{
|
|
1125
|
+
className: cn(
|
|
1126
|
+
"fixed inset-0 z-50 bg-black/32 backdrop-blur-sm transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0",
|
|
1127
|
+
className
|
|
1128
|
+
),
|
|
1129
|
+
"data-slot": "dialog-backdrop",
|
|
1130
|
+
...props
|
|
1131
|
+
}
|
|
1132
|
+
);
|
|
1133
|
+
}
|
|
1134
|
+
function DialogPopup({
|
|
1135
|
+
className,
|
|
1136
|
+
children,
|
|
1137
|
+
showCloseButton = true,
|
|
1138
|
+
...props
|
|
1139
|
+
}) {
|
|
1140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogPortal, { children: [
|
|
1141
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogBackdrop, {}),
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "fixed inset-0 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "grid h-dvh grid-rows-[1fr_auto] justify-items-center pt-6 sm:grid-rows-[1fr_auto_3fr] sm:p-4", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1143
|
+
import_dialog.Dialog.Popup,
|
|
1144
|
+
{
|
|
1145
|
+
className: cn(
|
|
1146
|
+
"sm:-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative row-start-2 grid max-h-full w-full min-w-0 origin-top overflow-hidden border bg-popover bg-clip-padding text-popover-foreground opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-lg transition-[scale,opacity,translate] duration-200 ease-in-out will-change-transform before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] **:has-[+[data-slot=dialog-footer]]:pb-4 data-ending-style:opacity-0 data-starting-style:opacity-0 max-sm:border-none max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4 max-sm:before:hidden sm:max-w-lg sm:data-nested:data-ending-style:translate-y-8 sm:data-nested:data-starting-style:translate-y-8 sm:scale-[calc(1-0.1*var(--nested-dialogs))] sm:rounded-2xl sm:data-ending-style:scale-98 sm:data-starting-style:scale-98 sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:has-[+[data-slot=dialog-footer]]:pb-6 dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]",
|
|
1147
|
+
className
|
|
1148
|
+
),
|
|
1149
|
+
"data-slot": "dialog-popup",
|
|
1150
|
+
...props,
|
|
1151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex h-full flex-col overflow-y-auto", children: [
|
|
1152
|
+
children,
|
|
1153
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_dialog.Dialog.Close, { className: "absolute end-2 top-2 inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-72 outline-none transition-[color,background-color,box-shadow,opacity] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", children: [
|
|
1154
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react5.XIcon, {}),
|
|
1155
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1156
|
+
] })
|
|
1157
|
+
] })
|
|
1158
|
+
}
|
|
1159
|
+
) }) })
|
|
1160
|
+
] });
|
|
1161
|
+
}
|
|
1162
|
+
function DialogHeader({ className, ...props }) {
|
|
1163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1164
|
+
"div",
|
|
1165
|
+
{
|
|
1166
|
+
className: cn(
|
|
1167
|
+
"flex flex-col gap-1 px-6 pt-6 pb-4 text-center last:pb-6 sm:text-left",
|
|
1168
|
+
className
|
|
1169
|
+
),
|
|
1170
|
+
"data-slot": "dialog-header",
|
|
1171
|
+
...props
|
|
1172
|
+
}
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
function DialogFooter({ className, ...props }) {
|
|
1176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1177
|
+
"div",
|
|
1178
|
+
{
|
|
1179
|
+
className: cn(
|
|
1180
|
+
"flex flex-col-reverse gap-2 px-6 pb-4 sm:flex-row sm:justify-end sm:rounded-b-xl sm:border-t sm:bg-muted/50 sm:pt-4",
|
|
1181
|
+
className
|
|
1182
|
+
),
|
|
1183
|
+
"data-slot": "dialog-footer",
|
|
1184
|
+
...props
|
|
1185
|
+
}
|
|
1186
|
+
);
|
|
1187
|
+
}
|
|
1188
|
+
function DialogTitle({ className, ...props }) {
|
|
1189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1190
|
+
import_dialog.Dialog.Title,
|
|
1191
|
+
{
|
|
1192
|
+
className: cn("font-heading text-xl font-semibold leading-none", className),
|
|
1193
|
+
"data-slot": "dialog-title",
|
|
1194
|
+
...props
|
|
1195
|
+
}
|
|
1196
|
+
);
|
|
1197
|
+
}
|
|
1198
|
+
function DialogDescription({
|
|
1199
|
+
className,
|
|
1200
|
+
...props
|
|
1201
|
+
}) {
|
|
1202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1203
|
+
import_dialog.Dialog.Description,
|
|
1204
|
+
{
|
|
1205
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1206
|
+
"data-slot": "dialog-description",
|
|
1207
|
+
...props
|
|
1208
|
+
}
|
|
1209
|
+
);
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
// src/components/command.tsx
|
|
1213
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1214
|
+
var Command = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1215
|
+
import_cmdk.Command,
|
|
1216
|
+
{
|
|
1217
|
+
ref,
|
|
1218
|
+
className: cn(
|
|
1219
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
1220
|
+
className
|
|
1221
|
+
),
|
|
1222
|
+
...props
|
|
1223
|
+
}
|
|
1224
|
+
));
|
|
1225
|
+
Command.displayName = import_cmdk.Command.displayName;
|
|
1226
|
+
var CommandDialog = ({ children, ...props }) => {
|
|
1227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Dialog, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DialogPopup, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Command, { className: "**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
1228
|
+
};
|
|
1229
|
+
var CommandInput = React9.forwardRef(({ className, searchContainerClassName, icon, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1230
|
+
"div",
|
|
1231
|
+
{
|
|
1232
|
+
className: cn("flex items-center border-b px-3", searchContainerClassName),
|
|
1233
|
+
"cmdk-input-wrapper": "",
|
|
1234
|
+
children: [
|
|
1235
|
+
icon || /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react6.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1236
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1237
|
+
import_cmdk.Command.Input,
|
|
1238
|
+
{
|
|
1239
|
+
ref,
|
|
1240
|
+
className: cn(
|
|
1241
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
1242
|
+
className
|
|
1243
|
+
),
|
|
1244
|
+
...props
|
|
1245
|
+
}
|
|
1246
|
+
)
|
|
1247
|
+
]
|
|
1248
|
+
}
|
|
1249
|
+
));
|
|
1250
|
+
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
1251
|
+
var CommandList = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1252
|
+
import_cmdk.Command.List,
|
|
1253
|
+
{
|
|
1254
|
+
ref,
|
|
1255
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
1256
|
+
...props
|
|
1257
|
+
}
|
|
1258
|
+
));
|
|
1259
|
+
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
1260
|
+
var CommandEmpty = React9.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1261
|
+
import_cmdk.Command.Empty,
|
|
1262
|
+
{
|
|
1263
|
+
ref,
|
|
1264
|
+
className: "py-6 text-center text-sm",
|
|
1265
|
+
...props
|
|
1266
|
+
}
|
|
1267
|
+
));
|
|
1268
|
+
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
1269
|
+
var CommandGroup = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1270
|
+
import_cmdk.Command.Group,
|
|
1271
|
+
{
|
|
1272
|
+
ref,
|
|
1273
|
+
className: cn(
|
|
1274
|
+
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
1275
|
+
className
|
|
1276
|
+
),
|
|
1277
|
+
...props
|
|
1278
|
+
}
|
|
1279
|
+
));
|
|
1280
|
+
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
1281
|
+
var CommandSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1282
|
+
import_cmdk.Command.Separator,
|
|
1283
|
+
{
|
|
1284
|
+
ref,
|
|
1285
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
1286
|
+
...props
|
|
1287
|
+
}
|
|
1288
|
+
));
|
|
1289
|
+
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
1290
|
+
var CommandItem = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1291
|
+
import_cmdk.Command.Item,
|
|
1292
|
+
{
|
|
1293
|
+
ref,
|
|
1294
|
+
className: cn(
|
|
1295
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
|
|
1296
|
+
className
|
|
1297
|
+
),
|
|
1298
|
+
...props
|
|
1299
|
+
}
|
|
1300
|
+
));
|
|
1301
|
+
CommandItem.displayName = import_cmdk.Command.Item.displayName;
|
|
1302
|
+
var CommandShortcut = ({
|
|
1303
|
+
className,
|
|
1304
|
+
...props
|
|
1305
|
+
}) => {
|
|
1306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1307
|
+
"span",
|
|
1308
|
+
{
|
|
1309
|
+
className: cn(
|
|
1310
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1311
|
+
className
|
|
1312
|
+
),
|
|
1313
|
+
...props
|
|
1314
|
+
}
|
|
1315
|
+
);
|
|
1316
|
+
};
|
|
1317
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
1318
|
+
|
|
1319
|
+
// src/components/popover.tsx
|
|
1320
|
+
var React10 = __toESM(require("react"));
|
|
1321
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
1322
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1323
|
+
var Popover = PopoverPrimitive.Root;
|
|
1324
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1325
|
+
var PopoverContent = React10.forwardRef(
|
|
1326
|
+
({
|
|
1327
|
+
className,
|
|
1328
|
+
align = "center",
|
|
1329
|
+
sideOffset = 4,
|
|
1330
|
+
hidePrimitive = false,
|
|
1331
|
+
...props
|
|
1332
|
+
}, ref) => {
|
|
1333
|
+
const Contents = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1334
|
+
PopoverPrimitive.Content,
|
|
1335
|
+
{
|
|
1336
|
+
ref,
|
|
1337
|
+
align,
|
|
1338
|
+
sideOffset,
|
|
1339
|
+
className: cn(
|
|
1340
|
+
`z-50 w-72 rounded-10 border bg-popover p-4 text-popover-foreground shadow-md
|
|
1341
|
+
outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
1342
|
+
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
|
|
1343
|
+
data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2
|
|
1344
|
+
data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,
|
|
1345
|
+
className
|
|
1346
|
+
),
|
|
1347
|
+
...props
|
|
1348
|
+
}
|
|
1349
|
+
);
|
|
1350
|
+
if (hidePrimitive) {
|
|
1351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Contents, {});
|
|
1352
|
+
}
|
|
1353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Contents, {}) });
|
|
1354
|
+
}
|
|
1355
|
+
);
|
|
1356
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1357
|
+
|
|
1358
|
+
// src/components/combobox.tsx
|
|
1359
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1360
|
+
function Combobox2({ modal = false, ...props }) {
|
|
1361
|
+
const [open, setOpen] = React11.useState(false);
|
|
1362
|
+
const options2 = props?.options || props?.data_source;
|
|
1363
|
+
const active_option = React11.useMemo(
|
|
1364
|
+
() => options2?.find((item) => item.value === props.value)?.label,
|
|
1365
|
+
[options2, props.value]
|
|
1366
|
+
);
|
|
1367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Popover, { open, onOpenChange: setOpen, modal, children: [
|
|
1368
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1369
|
+
PopoverTrigger,
|
|
1370
|
+
{
|
|
1371
|
+
disabled: props.disabled,
|
|
1372
|
+
asChild: !!props.trigger,
|
|
1373
|
+
className: cn(
|
|
1374
|
+
"bg-tranparent w-full px-0",
|
|
1375
|
+
props.disabled && "pointer-events-none cursor-not-allowed"
|
|
1376
|
+
),
|
|
1377
|
+
children: props.trigger ? props.trigger : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1378
|
+
"button",
|
|
1379
|
+
{
|
|
1380
|
+
type: "button",
|
|
1381
|
+
role: "combobox",
|
|
1382
|
+
"aria-expanded": open,
|
|
1383
|
+
disabled: props.disabled,
|
|
1384
|
+
className: cn(
|
|
1385
|
+
buttonVariants({ variant: "outline" }),
|
|
1386
|
+
`relative w-full h-10 px-3 gap-2 overflow-hidden justify-between bg-background shadow-none
|
|
1387
|
+
text-muted-foreground/40 ring-offset-0 ring-inset [font-weight:inherit]`,
|
|
1388
|
+
props.value && "text-foreground",
|
|
1389
|
+
props?.className,
|
|
1390
|
+
props.disabled && "pointer-events-none cursor-not-allowed"
|
|
1391
|
+
),
|
|
1392
|
+
children: [
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1394
|
+
"span",
|
|
1395
|
+
{
|
|
1396
|
+
className: cn(
|
|
1397
|
+
"max-w-full whitespace-nowrap truncate overflow-hidden text-inherit",
|
|
1398
|
+
props.nestedClassName
|
|
1399
|
+
),
|
|
1400
|
+
children: active_option ? active_option : props.placeholder || "Select ..."
|
|
1401
|
+
}
|
|
1402
|
+
),
|
|
1403
|
+
!props.disabled && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react7.ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-50 -mr-1" }),
|
|
1404
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1405
|
+
"input",
|
|
1406
|
+
{
|
|
1407
|
+
onChange: (e) => props.onChange(e.target.value),
|
|
1408
|
+
type: "text",
|
|
1409
|
+
className: "scale-0 absolute",
|
|
1410
|
+
value: props.value ?? "",
|
|
1411
|
+
required: props.required ?? false
|
|
1412
|
+
}
|
|
1413
|
+
)
|
|
1414
|
+
]
|
|
1415
|
+
}
|
|
1416
|
+
)
|
|
1417
|
+
}
|
|
1418
|
+
),
|
|
1419
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1420
|
+
PopoverContent,
|
|
1421
|
+
{
|
|
1422
|
+
align: props.align || "center",
|
|
1423
|
+
hidePrimitive: props.hidePrimitive,
|
|
1424
|
+
className: "w-[var(--radix-popover-trigger-width)] max-h-(--radix-popover-content-available-height)\n min-w-40 p-0 overflow-hidden",
|
|
1425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1426
|
+
Command,
|
|
1427
|
+
{
|
|
1428
|
+
className: "w-full",
|
|
1429
|
+
filter: (value, search, keywords = []) => {
|
|
1430
|
+
const extendValue = value + " " + keywords.join(" ");
|
|
1431
|
+
if (extendValue.toLowerCase().includes(search.toLowerCase())) {
|
|
1432
|
+
return 1;
|
|
1433
|
+
}
|
|
1434
|
+
return 0;
|
|
1435
|
+
},
|
|
1436
|
+
children: [
|
|
1437
|
+
!props.hideSearch && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CommandInput, { placeholder: "Search ...", className: "text-xs" }),
|
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(CommandList, { children: [
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CommandEmpty, { className: "flex flex-col items-center justify-center p-6", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "mt-2 text-xs text-zinc-400", children: "No data found" }) }),
|
|
1440
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CommandGroup, { children: options2?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1441
|
+
CommandItem,
|
|
1442
|
+
{
|
|
1443
|
+
value: item.value,
|
|
1444
|
+
onSelect: (currentValue) => {
|
|
1445
|
+
props.onChange(
|
|
1446
|
+
currentValue === props.value ? "" : currentValue,
|
|
1447
|
+
item.item
|
|
1448
|
+
);
|
|
1449
|
+
setOpen(false);
|
|
1450
|
+
},
|
|
1451
|
+
keywords: [item.label],
|
|
1452
|
+
className: "cursor-pointer font-medium text-xs capitalize",
|
|
1453
|
+
children: [
|
|
1454
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1455
|
+
import_lucide_react7.Check,
|
|
1456
|
+
{
|
|
1457
|
+
className: cn(
|
|
1458
|
+
"h-3 w-3",
|
|
1459
|
+
props.value === item.value ? "opacity-100" : "opacity-0"
|
|
1460
|
+
)
|
|
1461
|
+
}
|
|
1462
|
+
),
|
|
1463
|
+
item.label
|
|
1464
|
+
]
|
|
1465
|
+
},
|
|
1466
|
+
item.value
|
|
1467
|
+
)) })
|
|
1468
|
+
] })
|
|
1469
|
+
]
|
|
1470
|
+
}
|
|
1471
|
+
)
|
|
1472
|
+
}
|
|
1473
|
+
)
|
|
1474
|
+
] });
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
// src/components/confirm-dialog.tsx
|
|
1478
|
+
var import_react = __toESM(require("react"));
|
|
1479
|
+
|
|
1480
|
+
// src/components/fancy-button.tsx
|
|
1481
|
+
var React13 = __toESM(require("react"));
|
|
1482
|
+
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1483
|
+
|
|
1484
|
+
// src/lib/recursive-clone-children.tsx
|
|
1485
|
+
var React12 = __toESM(require("react"));
|
|
1486
|
+
function recursiveCloneChildren(children, additionalProps, displayNames, uniqueId, asChild) {
|
|
1487
|
+
const mappedChildren = React12.Children.map(
|
|
1488
|
+
children,
|
|
1489
|
+
(child, index) => {
|
|
1490
|
+
if (!React12.isValidElement(child)) {
|
|
1491
|
+
return child;
|
|
1492
|
+
}
|
|
1493
|
+
const displayName = child.type?.displayName || "";
|
|
1494
|
+
const newProps = displayNames.includes(displayName) ? additionalProps : {};
|
|
1495
|
+
const childProps = child.props;
|
|
1496
|
+
return React12.cloneElement(
|
|
1497
|
+
child,
|
|
1498
|
+
{ ...newProps, key: `${uniqueId}-${index}` },
|
|
1499
|
+
recursiveCloneChildren(
|
|
1500
|
+
childProps?.children,
|
|
1501
|
+
additionalProps,
|
|
1502
|
+
displayNames,
|
|
1503
|
+
uniqueId,
|
|
1504
|
+
childProps?.asChild
|
|
1505
|
+
)
|
|
1506
|
+
);
|
|
1507
|
+
}
|
|
1508
|
+
);
|
|
1509
|
+
return asChild ? mappedChildren?.[0] : mappedChildren;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
// src/lib/tv.ts
|
|
1513
|
+
var import_tailwind_variants = require("tailwind-variants");
|
|
1514
|
+
var tv = (0, import_tailwind_variants.createTV)({});
|
|
1515
|
+
|
|
1516
|
+
// src/components/fancy-button.tsx
|
|
1517
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1518
|
+
var BUTTON_ROOT_NAME = "ButtonRoot";
|
|
1519
|
+
var BUTTON_ICON_NAME = "ButtonIcon";
|
|
1520
|
+
var fancyButtonVariants = tv({
|
|
1521
|
+
slots: {
|
|
1522
|
+
root: [
|
|
1523
|
+
// base
|
|
1524
|
+
"group relative inline-flex items-center justify-center whitespace-nowrap text-label-sm outline-none",
|
|
1525
|
+
"transition duration-200 ease-out cursor-pointer",
|
|
1526
|
+
// focus
|
|
1527
|
+
"focus:outline-none",
|
|
1528
|
+
// disabled
|
|
1529
|
+
"disabled:pointer-events-none",
|
|
1530
|
+
"disabled:opacity-80"
|
|
1531
|
+
],
|
|
1532
|
+
icon: "relative z-10 size-5 shrink-0"
|
|
1533
|
+
},
|
|
1534
|
+
variants: {
|
|
1535
|
+
variant: {
|
|
1536
|
+
neutral: {
|
|
1537
|
+
root: "bg-bg-strong-950 text-text-white-0 border border-border shadow-ancy-buttons-neutral"
|
|
1538
|
+
},
|
|
1539
|
+
primary: {
|
|
1540
|
+
root: "bg-primary-base text-static-white shadow-fancy-buttons-primary"
|
|
1541
|
+
},
|
|
1542
|
+
destructive: {
|
|
1543
|
+
root: "bg-error-base text-static-white shadow-fancy-buttons-error"
|
|
1544
|
+
},
|
|
1545
|
+
basic: {
|
|
1546
|
+
root: [
|
|
1547
|
+
// base
|
|
1548
|
+
"bg-bg-white-0 text-text-sub-600 shadow-fancy-buttons-stroke",
|
|
1549
|
+
// hover
|
|
1550
|
+
"hover:bg-bg-weak-50 hover:text-text-strong-950 hover:shadow-none"
|
|
1551
|
+
]
|
|
1552
|
+
}
|
|
1553
|
+
},
|
|
1554
|
+
size: {
|
|
1555
|
+
medium: {
|
|
1556
|
+
root: "h-10 gap-3 rounded-10 px-3.5",
|
|
1557
|
+
icon: "-mx-1"
|
|
1558
|
+
},
|
|
1559
|
+
small: {
|
|
1560
|
+
root: "h-9 gap-3 rounded-lg px-3",
|
|
1561
|
+
icon: "-mx-1"
|
|
1562
|
+
},
|
|
1563
|
+
xsmall: {
|
|
1564
|
+
root: "h-8 gap-3 rounded-lg px-2.5",
|
|
1565
|
+
icon: "-mx-1"
|
|
1566
|
+
},
|
|
1567
|
+
icon: {
|
|
1568
|
+
root: "size-10 rounded-10 p-0",
|
|
1569
|
+
icon: ""
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
compoundVariants: [
|
|
1574
|
+
{
|
|
1575
|
+
variant: ["neutral", "primary", "destructive"],
|
|
1576
|
+
class: {
|
|
1577
|
+
root: [
|
|
1578
|
+
// before
|
|
1579
|
+
"before:pointer-events-none before:absolute before:inset-0 before:z-10 before:rounded-[inherit]",
|
|
1580
|
+
"before:bg-gradient-to-b before:p-px",
|
|
1581
|
+
"before:from-static-white/[.12] before:to-transparent",
|
|
1582
|
+
// before mask
|
|
1583
|
+
"before:[mask-clip:content-box,border-box] before:[mask-composite:exclude] before:[mask-image:linear-gradient(#fff_0_0),linear-gradient(#fff_0_0)]",
|
|
1584
|
+
// after
|
|
1585
|
+
"after:absolute after:inset-0 after:rounded-[inherit] after:bg-gradient-to-b after:from-static-white after:to-transparent",
|
|
1586
|
+
"after:pointer-events-none after:opacity-[.16] after:transition after:duration-200 after:ease-out",
|
|
1587
|
+
// hover
|
|
1588
|
+
"hover:after:opacity-[.24]"
|
|
1589
|
+
]
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
],
|
|
1593
|
+
defaultVariants: {
|
|
1594
|
+
variant: "primary",
|
|
1595
|
+
size: "medium"
|
|
1596
|
+
}
|
|
1597
|
+
});
|
|
1598
|
+
var ButtonRoot = React13.forwardRef(
|
|
1599
|
+
({
|
|
1600
|
+
asChild,
|
|
1601
|
+
children,
|
|
1602
|
+
variant = "primary",
|
|
1603
|
+
size,
|
|
1604
|
+
className,
|
|
1605
|
+
loading,
|
|
1606
|
+
...rest
|
|
1607
|
+
}, forwardedRef) => {
|
|
1608
|
+
const uniqueId = React13.useId();
|
|
1609
|
+
const Component = asChild ? import_react_slot2.Slot : "button";
|
|
1610
|
+
const { root } = fancyButtonVariants({ variant, size });
|
|
1611
|
+
const sharedProps = {
|
|
1612
|
+
variant,
|
|
1613
|
+
size
|
|
1614
|
+
};
|
|
1615
|
+
const extendedChildren = recursiveCloneChildren(
|
|
1616
|
+
children,
|
|
1617
|
+
sharedProps,
|
|
1618
|
+
[BUTTON_ICON_NAME],
|
|
1619
|
+
uniqueId,
|
|
1620
|
+
asChild
|
|
1621
|
+
);
|
|
1622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1623
|
+
Component,
|
|
1624
|
+
{
|
|
1625
|
+
ref: forwardedRef,
|
|
1626
|
+
className: root({ class: className }),
|
|
1627
|
+
disabled: loading,
|
|
1628
|
+
...rest,
|
|
1629
|
+
children: [
|
|
1630
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1631
|
+
"div",
|
|
1632
|
+
{
|
|
1633
|
+
className: cn(
|
|
1634
|
+
`size-4 shrink-0 rounded-full border-2 border-background/30
|
|
1635
|
+
border-l-background animate-spin`,
|
|
1636
|
+
{
|
|
1637
|
+
"border-primary/30 border-l-primary": ![
|
|
1638
|
+
"primary",
|
|
1639
|
+
"destructive"
|
|
1640
|
+
].includes(variant)
|
|
1641
|
+
}
|
|
1642
|
+
)
|
|
1643
|
+
}
|
|
1644
|
+
),
|
|
1645
|
+
extendedChildren
|
|
1646
|
+
]
|
|
1647
|
+
}
|
|
1648
|
+
);
|
|
1649
|
+
}
|
|
1650
|
+
);
|
|
1651
|
+
ButtonRoot.displayName = BUTTON_ROOT_NAME;
|
|
1652
|
+
function ButtonIcon({
|
|
1653
|
+
className,
|
|
1654
|
+
variant,
|
|
1655
|
+
size,
|
|
1656
|
+
as,
|
|
1657
|
+
...rest
|
|
1658
|
+
}) {
|
|
1659
|
+
const Component = as || "div";
|
|
1660
|
+
const { icon } = fancyButtonVariants({ variant, size });
|
|
1661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Component, { className: icon({ class: className }), ...rest });
|
|
1662
|
+
}
|
|
1663
|
+
ButtonIcon.displayName = BUTTON_ICON_NAME;
|
|
1664
|
+
|
|
1665
|
+
// src/components/confirm-dialog.tsx
|
|
1666
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1667
|
+
var ConfirmDialog = import_react.default.memo(({ trigger, confirmAction }) => {
|
|
1668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(AlertDialog, { children: [
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AlertDialogTrigger, { className: "contents", children: trigger || /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ButtonRoot, { variant: "neutral", children: "Confirm" }) }),
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(AlertDialogPopup, { children: [
|
|
1671
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(AlertDialogHeader, { children: [
|
|
1672
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AlertDialogTitle, { className: "text-lg", children: "Are you want to proceed?" }),
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AlertDialogDescription, { className: "text-sm", children: "This action may be destructive and can potentially harm any related data. Please ensure that you have backed up all important information before proceeding. If you are unsure about the consequences, it is recommended to cancel and seek further assistance." })
|
|
1674
|
+
] }),
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(AlertDialogFooter, { className: "justify-start!", children: [
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1677
|
+
AlertDialogClose,
|
|
1678
|
+
{
|
|
1679
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ButtonRoot, { variant: "neutral", className: "w-full max-sm:bg-accent sm:w-24" }),
|
|
1680
|
+
children: "Cancel"
|
|
1681
|
+
}
|
|
1682
|
+
),
|
|
1683
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1684
|
+
AlertDialogClose,
|
|
1685
|
+
{
|
|
1686
|
+
onClick: async () => {
|
|
1687
|
+
confirmAction();
|
|
1688
|
+
},
|
|
1689
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ButtonRoot, { variant: "destructive", className: "w-full sm:w-24" }),
|
|
1690
|
+
children: "Continue"
|
|
1691
|
+
}
|
|
1692
|
+
)
|
|
1693
|
+
] })
|
|
1694
|
+
] })
|
|
1695
|
+
] });
|
|
1696
|
+
});
|
|
1697
|
+
|
|
1698
|
+
// src/components/copy-button.tsx
|
|
1699
|
+
var import_icons = require("@use-stall/icons");
|
|
1700
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1701
|
+
var CopyButton = ({
|
|
1702
|
+
isCopied,
|
|
1703
|
+
copyFunction,
|
|
1704
|
+
clearFunction,
|
|
1705
|
+
className,
|
|
1706
|
+
icon_size
|
|
1707
|
+
}) => {
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1709
|
+
Button,
|
|
1710
|
+
{
|
|
1711
|
+
onClick: () => {
|
|
1712
|
+
copyFunction();
|
|
1713
|
+
setTimeout(() => {
|
|
1714
|
+
clearFunction();
|
|
1715
|
+
}, 2e3);
|
|
1716
|
+
},
|
|
1717
|
+
size: "icon",
|
|
1718
|
+
variant: "ghost",
|
|
1719
|
+
className: cn("size-6 text-primary", className),
|
|
1720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "relative", children: [
|
|
1721
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1722
|
+
"div",
|
|
1723
|
+
{
|
|
1724
|
+
className: cn(
|
|
1725
|
+
"absolute inset-0 flex items-center justify-center transition-all duration-300 ease-in-out will-change-[transform, opacity, filter]",
|
|
1726
|
+
isCopied ? "scale-100 opacity-100 blur-0" : "blur-xs scale-[0.25] opacity-0"
|
|
1727
|
+
),
|
|
1728
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons.StCheckMarkCircle, { size: icon_size, className: "fill-primary/20" })
|
|
1729
|
+
}
|
|
1730
|
+
),
|
|
1731
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1732
|
+
"div",
|
|
1733
|
+
{
|
|
1734
|
+
className: cn(
|
|
1735
|
+
"transition-[transform, opacity, filter] duration-300 ease-in-out will-change-[transform, opacity, filter]",
|
|
1736
|
+
isCopied ? "blur-xs scale-[0.25] opacity-0" : "scale-100 opacity-100 blur-0"
|
|
1737
|
+
),
|
|
1738
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons.StCopy, { size: icon_size, className: "fill-primary/20" })
|
|
1739
|
+
}
|
|
1740
|
+
)
|
|
1741
|
+
] })
|
|
1742
|
+
}
|
|
1743
|
+
);
|
|
1744
|
+
};
|
|
1745
|
+
|
|
1746
|
+
// src/components/country-picker.tsx
|
|
1747
|
+
var React15 = __toESM(require("react"));
|
|
1748
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1749
|
+
|
|
1750
|
+
// src/constants/countries.ts
|
|
1751
|
+
var COUNTRIES = [
|
|
1752
|
+
{ code: "AF", name: "Afghanistan", label: "\u{1F1E6}\u{1F1EB} Afghanistan" },
|
|
1753
|
+
{ code: "AL", name: "Albania", label: "\u{1F1E6}\u{1F1F1} Albania" },
|
|
1754
|
+
{ code: "DZ", name: "Algeria", label: "\u{1F1E9}\u{1F1FF} Algeria" },
|
|
1755
|
+
{ code: "AD", name: "Andorra", label: "\u{1F1E6}\u{1F1E9} Andorra" },
|
|
1756
|
+
{ code: "AO", name: "Angola", label: "\u{1F1E6}\u{1F1F4} Angola" },
|
|
1757
|
+
{ code: "AG", name: "Antigua and Barbuda", label: "\u{1F1E6}\u{1F1EC} Antigua and Barbuda" },
|
|
1758
|
+
{ code: "AR", name: "Argentina", label: "\u{1F1E6}\u{1F1F7} Argentina" },
|
|
1759
|
+
{ code: "AM", name: "Armenia", label: "\u{1F1E6}\u{1F1F2} Armenia" },
|
|
1760
|
+
{ code: "AU", name: "Australia", label: "\u{1F1E6}\u{1F1FA} Australia" },
|
|
1761
|
+
{ code: "AT", name: "Austria", label: "\u{1F1E6}\u{1F1F9} Austria" },
|
|
1762
|
+
{ code: "AZ", name: "Azerbaijan", label: "\u{1F1E6}\u{1F1FF} Azerbaijan" },
|
|
1763
|
+
{ code: "BS", name: "Bahamas", label: "\u{1F1E7}\u{1F1F8} Bahamas" },
|
|
1764
|
+
{ code: "BH", name: "Bahrain", label: "\u{1F1E7}\u{1F1ED} Bahrain" },
|
|
1765
|
+
{ code: "BD", name: "Bangladesh", label: "\u{1F1E7}\u{1F1E9} Bangladesh" },
|
|
1766
|
+
{ code: "BB", name: "Barbados", label: "\u{1F1E7}\u{1F1E7} Barbados" },
|
|
1767
|
+
{ code: "BY", name: "Belarus", label: "\u{1F1E7}\u{1F1FE} Belarus" },
|
|
1768
|
+
{ code: "BE", name: "Belgium", label: "\u{1F1E7}\u{1F1EA} Belgium" },
|
|
1769
|
+
{ code: "BZ", name: "Belize", label: "\u{1F1E7}\u{1F1FF} Belize" },
|
|
1770
|
+
{ code: "BJ", name: "Benin", label: "\u{1F1E7}\u{1F1EF} Benin" },
|
|
1771
|
+
{ code: "BT", name: "Bhutan", label: "\u{1F1E7}\u{1F1F9} Bhutan" },
|
|
1772
|
+
{ code: "BO", name: "Bolivia", label: "\u{1F1E7}\u{1F1F4} Bolivia" },
|
|
1773
|
+
{ code: "BA", name: "Bosnia and Herzegovina", label: "\u{1F1E7}\u{1F1E6} Bosnia and Herzegovina" },
|
|
1774
|
+
{ code: "BW", name: "Botswana", label: "\u{1F1E7}\u{1F1FC} Botswana" },
|
|
1775
|
+
{ code: "BR", name: "Brazil", label: "\u{1F1E7}\u{1F1F7} Brazil" },
|
|
1776
|
+
{ code: "BN", name: "Brunei", label: "\u{1F1E7}\u{1F1F3} Brunei" },
|
|
1777
|
+
{ code: "BG", name: "Bulgaria", label: "\u{1F1E7}\u{1F1EC} Bulgaria" },
|
|
1778
|
+
{ code: "BF", name: "Burkina Faso", label: "\u{1F1E7}\u{1F1EB} Burkina Faso" },
|
|
1779
|
+
{ code: "BI", name: "Burundi", label: "\u{1F1E7}\u{1F1EE} Burundi" },
|
|
1780
|
+
{ code: "CV", name: "Cabo Verde", label: "\u{1F1E8}\u{1F1FB} Cabo Verde" },
|
|
1781
|
+
{ code: "KH", name: "Cambodia", label: "\u{1F1F0}\u{1F1ED} Cambodia" },
|
|
1782
|
+
{ code: "CM", name: "Cameroon", label: "\u{1F1E8}\u{1F1F2} Cameroon" },
|
|
1783
|
+
{ code: "CA", name: "Canada", label: "\u{1F1E8}\u{1F1E6} Canada" },
|
|
1784
|
+
{ code: "CF", name: "Central African Republic", label: "\u{1F1E8}\u{1F1EB} Central African Republic" },
|
|
1785
|
+
{ code: "TD", name: "Chad", label: "\u{1F1F9}\u{1F1E9} Chad" },
|
|
1786
|
+
{ code: "CL", name: "Chile", label: "\u{1F1E8}\u{1F1F1} Chile" },
|
|
1787
|
+
{ code: "CN", name: "China", label: "\u{1F1E8}\u{1F1F3} China" },
|
|
1788
|
+
{ code: "CO", name: "Colombia", label: "\u{1F1E8}\u{1F1F4} Colombia" },
|
|
1789
|
+
{ code: "KM", name: "Comoros", label: "\u{1F1F0}\u{1F1F2} Comoros" },
|
|
1790
|
+
{ code: "CG", name: "Congo", label: "\u{1F1E8}\u{1F1EC} Congo" },
|
|
1791
|
+
{ code: "CD", name: "Congo (DRC)", label: "\u{1F1E8}\u{1F1E9} Congo (DRC)" },
|
|
1792
|
+
{ code: "CR", name: "Costa Rica", label: "\u{1F1E8}\u{1F1F7} Costa Rica" },
|
|
1793
|
+
{ code: "CI", name: "C\xF4te d\u2019Ivoire", label: "\u{1F1E8}\u{1F1EE} C\xF4te d\u2019Ivoire" },
|
|
1794
|
+
{ code: "HR", name: "Croatia", label: "\u{1F1ED}\u{1F1F7} Croatia" },
|
|
1795
|
+
{ code: "CU", name: "Cuba", label: "\u{1F1E8}\u{1F1FA} Cuba" },
|
|
1796
|
+
{ code: "CY", name: "Cyprus", label: "\u{1F1E8}\u{1F1FE} Cyprus" },
|
|
1797
|
+
{ code: "CZ", name: "Czechia", label: "\u{1F1E8}\u{1F1FF} Czechia" },
|
|
1798
|
+
{ code: "DK", name: "Denmark", label: "\u{1F1E9}\u{1F1F0} Denmark" },
|
|
1799
|
+
{ code: "DJ", name: "Djibouti", label: "\u{1F1E9}\u{1F1EF} Djibouti" },
|
|
1800
|
+
{ code: "DM", name: "Dominica", label: "\u{1F1E9}\u{1F1F2} Dominica" },
|
|
1801
|
+
{ code: "DO", name: "Dominican Republic", label: "\u{1F1E9}\u{1F1F4} Dominican Republic" },
|
|
1802
|
+
{ code: "EC", name: "Ecuador", label: "\u{1F1EA}\u{1F1E8} Ecuador" },
|
|
1803
|
+
{ code: "EG", name: "Egypt", label: "\u{1F1EA}\u{1F1EC} Egypt" },
|
|
1804
|
+
{ code: "SV", name: "El Salvador", label: "\u{1F1F8}\u{1F1FB} El Salvador" },
|
|
1805
|
+
{ code: "GQ", name: "Equatorial Guinea", label: "\u{1F1EC}\u{1F1F6} Equatorial Guinea" },
|
|
1806
|
+
{ code: "ER", name: "Eritrea", label: "\u{1F1EA}\u{1F1F7} Eritrea" },
|
|
1807
|
+
{ code: "EE", name: "Estonia", label: "\u{1F1EA}\u{1F1EA} Estonia" },
|
|
1808
|
+
{ code: "SZ", name: "Eswatini", label: "\u{1F1F8}\u{1F1FF} Eswatini" },
|
|
1809
|
+
{ code: "ET", name: "Ethiopia", label: "\u{1F1EA}\u{1F1F9} Ethiopia" },
|
|
1810
|
+
{ code: "FJ", name: "Fiji", label: "\u{1F1EB}\u{1F1EF} Fiji" },
|
|
1811
|
+
{ code: "FI", name: "Finland", label: "\u{1F1EB}\u{1F1EE} Finland" },
|
|
1812
|
+
{ code: "FR", name: "France", label: "\u{1F1EB}\u{1F1F7} France" },
|
|
1813
|
+
{ code: "GA", name: "Gabon", label: "\u{1F1EC}\u{1F1E6} Gabon" },
|
|
1814
|
+
{ code: "GM", name: "Gambia", label: "\u{1F1EC}\u{1F1F2} Gambia" },
|
|
1815
|
+
{ code: "GE", name: "Georgia", label: "\u{1F1EC}\u{1F1EA} Georgia" },
|
|
1816
|
+
{ code: "DE", name: "Germany", label: "\u{1F1E9}\u{1F1EA} Germany" },
|
|
1817
|
+
{ code: "GH", name: "Ghana", label: "\u{1F1EC}\u{1F1ED} Ghana" },
|
|
1818
|
+
{ code: "GR", name: "Greece", label: "\u{1F1EC}\u{1F1F7} Greece" },
|
|
1819
|
+
{ code: "GD", name: "Grenada", label: "\u{1F1EC}\u{1F1E9} Grenada" },
|
|
1820
|
+
{ code: "GT", name: "Guatemala", label: "\u{1F1EC}\u{1F1F9} Guatemala" },
|
|
1821
|
+
{ code: "GN", name: "Guinea", label: "\u{1F1EC}\u{1F1F3} Guinea" },
|
|
1822
|
+
{ code: "GW", name: "Guinea-Bissau", label: "\u{1F1EC}\u{1F1FC} Guinea-Bissau" },
|
|
1823
|
+
{ code: "GY", name: "Guyana", label: "\u{1F1EC}\u{1F1FE} Guyana" },
|
|
1824
|
+
{ code: "HT", name: "Haiti", label: "\u{1F1ED}\u{1F1F9} Haiti" },
|
|
1825
|
+
{ code: "HN", name: "Honduras", label: "\u{1F1ED}\u{1F1F3} Honduras" },
|
|
1826
|
+
{ code: "HU", name: "Hungary", label: "\u{1F1ED}\u{1F1FA} Hungary" },
|
|
1827
|
+
{ code: "IS", name: "Iceland", label: "\u{1F1EE}\u{1F1F8} Iceland" },
|
|
1828
|
+
{ code: "IN", name: "India", label: "\u{1F1EE}\u{1F1F3} India" },
|
|
1829
|
+
{ code: "ID", name: "Indonesia", label: "\u{1F1EE}\u{1F1E9} Indonesia" },
|
|
1830
|
+
{ code: "IR", name: "Iran", label: "\u{1F1EE}\u{1F1F7} Iran" },
|
|
1831
|
+
{ code: "IQ", name: "Iraq", label: "\u{1F1EE}\u{1F1F6} Iraq" },
|
|
1832
|
+
{ code: "IE", name: "Ireland", label: "\u{1F1EE}\u{1F1EA} Ireland" },
|
|
1833
|
+
{ code: "IL", name: "Israel", label: "\u{1F1EE}\u{1F1F1} Israel" },
|
|
1834
|
+
{ code: "IT", name: "Italy", label: "\u{1F1EE}\u{1F1F9} Italy" },
|
|
1835
|
+
{ code: "JM", name: "Jamaica", label: "\u{1F1EF}\u{1F1F2} Jamaica" },
|
|
1836
|
+
{ code: "JP", name: "Japan", label: "\u{1F1EF}\u{1F1F5} Japan" },
|
|
1837
|
+
{ code: "JO", name: "Jordan", label: "\u{1F1EF}\u{1F1F4} Jordan" },
|
|
1838
|
+
{ code: "KZ", name: "Kazakhstan", label: "\u{1F1F0}\u{1F1FF} Kazakhstan" },
|
|
1839
|
+
{ code: "KE", name: "Kenya", label: "\u{1F1F0}\u{1F1EA} Kenya" },
|
|
1840
|
+
{ code: "KI", name: "Kiribati", label: "\u{1F1F0}\u{1F1EE} Kiribati" },
|
|
1841
|
+
{ code: "KP", name: "North Korea", label: "\u{1F1F0}\u{1F1F5} North Korea" },
|
|
1842
|
+
{ code: "KR", name: "South Korea", label: "\u{1F1F0}\u{1F1F7} South Korea" },
|
|
1843
|
+
{ code: "KW", name: "Kuwait", label: "\u{1F1F0}\u{1F1FC} Kuwait" },
|
|
1844
|
+
{ code: "KG", name: "Kyrgyzstan", label: "\u{1F1F0}\u{1F1EC} Kyrgyzstan" },
|
|
1845
|
+
{ code: "LA", name: "Laos", label: "\u{1F1F1}\u{1F1E6} Laos" },
|
|
1846
|
+
{ code: "LV", name: "Latvia", label: "\u{1F1F1}\u{1F1FB} Latvia" },
|
|
1847
|
+
{ code: "LB", name: "Lebanon", label: "\u{1F1F1}\u{1F1E7} Lebanon" },
|
|
1848
|
+
{ code: "LS", name: "Lesotho", label: "\u{1F1F1}\u{1F1F8} Lesotho" },
|
|
1849
|
+
{ code: "LR", name: "Liberia", label: "\u{1F1F1}\u{1F1F7} Liberia" },
|
|
1850
|
+
{ code: "LY", name: "Libya", label: "\u{1F1F1}\u{1F1FE} Libya" },
|
|
1851
|
+
{ code: "LI", name: "Liechtenstein", label: "\u{1F1F1}\u{1F1EE} Liechtenstein" },
|
|
1852
|
+
{ code: "LT", name: "Lithuania", label: "\u{1F1F1}\u{1F1F9} Lithuania" },
|
|
1853
|
+
{ code: "LU", name: "Luxembourg", label: "\u{1F1F1}\u{1F1FA} Luxembourg" },
|
|
1854
|
+
{ code: "MG", name: "Madagascar", label: "\u{1F1F2}\u{1F1EC} Madagascar" },
|
|
1855
|
+
{ code: "MW", name: "Malawi", label: "\u{1F1F2}\u{1F1FC} Malawi" },
|
|
1856
|
+
{ code: "MY", name: "Malaysia", label: "\u{1F1F2}\u{1F1FE} Malaysia" },
|
|
1857
|
+
{ code: "MV", name: "Maldives", label: "\u{1F1F2}\u{1F1FB} Maldives" },
|
|
1858
|
+
{ code: "ML", name: "Mali", label: "\u{1F1F2}\u{1F1F1} Mali" },
|
|
1859
|
+
{ code: "MT", name: "Malta", label: "\u{1F1F2}\u{1F1F9} Malta" },
|
|
1860
|
+
{ code: "MH", name: "Marshall Islands", label: "\u{1F1F2}\u{1F1ED} Marshall Islands" },
|
|
1861
|
+
{ code: "MR", name: "Mauritania", label: "\u{1F1F2}\u{1F1F7} Mauritania" },
|
|
1862
|
+
{ code: "MU", name: "Mauritius", label: "\u{1F1F2}\u{1F1FA} Mauritius" },
|
|
1863
|
+
{ code: "MX", name: "Mexico", label: "\u{1F1F2}\u{1F1FD} Mexico" },
|
|
1864
|
+
{ code: "FM", name: "Micronesia", label: "\u{1F1EB}\u{1F1F2} Micronesia" },
|
|
1865
|
+
{ code: "MD", name: "Moldova", label: "\u{1F1F2}\u{1F1E9} Moldova" },
|
|
1866
|
+
{ code: "MC", name: "Monaco", label: "\u{1F1F2}\u{1F1E8} Monaco" },
|
|
1867
|
+
{ code: "MN", name: "Mongolia", label: "\u{1F1F2}\u{1F1F3} Mongolia" },
|
|
1868
|
+
{ code: "ME", name: "Montenegro", label: "\u{1F1F2}\u{1F1EA} Montenegro" },
|
|
1869
|
+
{ code: "MA", name: "Morocco", label: "\u{1F1F2}\u{1F1E6} Morocco" },
|
|
1870
|
+
{ code: "MZ", name: "Mozambique", label: "\u{1F1F2}\u{1F1FF} Mozambique" },
|
|
1871
|
+
{ code: "MM", name: "Myanmar", label: "\u{1F1F2}\u{1F1F2} Myanmar" },
|
|
1872
|
+
{ code: "NA", name: "Namibia", label: "\u{1F1F3}\u{1F1E6} Namibia" },
|
|
1873
|
+
{ code: "NR", name: "Nauru", label: "\u{1F1F3}\u{1F1F7} Nauru" },
|
|
1874
|
+
{ code: "NP", name: "Nepal", label: "\u{1F1F3}\u{1F1F5} Nepal" },
|
|
1875
|
+
{ code: "NL", name: "Netherlands", label: "\u{1F1F3}\u{1F1F1} Netherlands" },
|
|
1876
|
+
{ code: "NZ", name: "New Zealand", label: "\u{1F1F3}\u{1F1FF} New Zealand" },
|
|
1877
|
+
{ code: "NI", name: "Nicaragua", label: "\u{1F1F3}\u{1F1EE} Nicaragua" },
|
|
1878
|
+
{ code: "NE", name: "Niger", label: "\u{1F1F3}\u{1F1EA} Niger" },
|
|
1879
|
+
{ code: "NG", name: "Nigeria", label: "\u{1F1F3}\u{1F1EC} Nigeria" },
|
|
1880
|
+
{ code: "MK", name: "North Macedonia", label: "\u{1F1F2}\u{1F1F0} North Macedonia" },
|
|
1881
|
+
{ code: "NO", name: "Norway", label: "\u{1F1F3}\u{1F1F4} Norway" },
|
|
1882
|
+
{ code: "OM", name: "Oman", label: "\u{1F1F4}\u{1F1F2} Oman" },
|
|
1883
|
+
{ code: "PK", name: "Pakistan", label: "\u{1F1F5}\u{1F1F0} Pakistan" },
|
|
1884
|
+
{ code: "PW", name: "Palau", label: "\u{1F1F5}\u{1F1FC} Palau" },
|
|
1885
|
+
{ code: "PA", name: "Panama", label: "\u{1F1F5}\u{1F1E6} Panama" },
|
|
1886
|
+
{ code: "PG", name: "Papua New Guinea", label: "\u{1F1F5}\u{1F1EC} Papua New Guinea" },
|
|
1887
|
+
{ code: "PY", name: "Paraguay", label: "\u{1F1F5}\u{1F1FE} Paraguay" },
|
|
1888
|
+
{ code: "PE", name: "Peru", label: "\u{1F1F5}\u{1F1EA} Peru" },
|
|
1889
|
+
{ code: "PH", name: "Philippines", label: "\u{1F1F5}\u{1F1ED} Philippines" },
|
|
1890
|
+
{ code: "PL", name: "Poland", label: "\u{1F1F5}\u{1F1F1} Poland" },
|
|
1891
|
+
{ code: "PT", name: "Portugal", label: "\u{1F1F5}\u{1F1F9} Portugal" },
|
|
1892
|
+
{ code: "QA", name: "Qatar", label: "\u{1F1F6}\u{1F1E6} Qatar" },
|
|
1893
|
+
{ code: "RO", name: "Romania", label: "\u{1F1F7}\u{1F1F4} Romania" },
|
|
1894
|
+
{ code: "RU", name: "Russia", label: "\u{1F1F7}\u{1F1FA} Russia" },
|
|
1895
|
+
{ code: "RW", name: "Rwanda", label: "\u{1F1F7}\u{1F1FC} Rwanda" },
|
|
1896
|
+
{ code: "KN", name: "Saint Kitts and Nevis", label: "\u{1F1F0}\u{1F1F3} Saint Kitts and Nevis" },
|
|
1897
|
+
{ code: "LC", name: "Saint Lucia", label: "\u{1F1F1}\u{1F1E8} Saint Lucia" },
|
|
1898
|
+
{ code: "VC", name: "Saint Vincent and the Grenadines", label: "\u{1F1FB}\u{1F1E8} Saint Vincent and the Grenadines" },
|
|
1899
|
+
{ code: "WS", name: "Samoa", label: "\u{1F1FC}\u{1F1F8} Samoa" },
|
|
1900
|
+
{ code: "SM", name: "San Marino", label: "\u{1F1F8}\u{1F1F2} San Marino" },
|
|
1901
|
+
{ code: "ST", name: "Sao Tome and Principe", label: "\u{1F1F8}\u{1F1F9} Sao Tome and Principe" },
|
|
1902
|
+
{ code: "SA", name: "Saudi Arabia", label: "\u{1F1F8}\u{1F1E6} Saudi Arabia" },
|
|
1903
|
+
{ code: "SN", name: "Senegal", label: "\u{1F1F8}\u{1F1F3} Senegal" },
|
|
1904
|
+
{ code: "RS", name: "Serbia", label: "\u{1F1F7}\u{1F1F8} Serbia" },
|
|
1905
|
+
{ code: "SC", name: "Seychelles", label: "\u{1F1F8}\u{1F1E8} Seychelles" },
|
|
1906
|
+
{ code: "SL", name: "Sierra Leone", label: "\u{1F1F8}\u{1F1F1} Sierra Leone" },
|
|
1907
|
+
{ code: "SG", name: "Singapore", label: "\u{1F1F8}\u{1F1EC} Singapore" },
|
|
1908
|
+
{ code: "SK", name: "Slovakia", label: "\u{1F1F8}\u{1F1F0} Slovakia" },
|
|
1909
|
+
{ code: "SI", name: "Slovenia", label: "\u{1F1F8}\u{1F1EE} Slovenia" },
|
|
1910
|
+
{ code: "SB", name: "Solomon Islands", label: "\u{1F1F8}\u{1F1E7} Solomon Islands" },
|
|
1911
|
+
{ code: "SO", name: "Somalia", label: "\u{1F1F8}\u{1F1F4} Somalia" },
|
|
1912
|
+
{ code: "ZA", name: "South Africa", label: "\u{1F1FF}\u{1F1E6} South Africa" },
|
|
1913
|
+
{ code: "SS", name: "South Sudan", label: "\u{1F1F8}\u{1F1F8} South Sudan" },
|
|
1914
|
+
{ code: "ES", name: "Spain", label: "\u{1F1EA}\u{1F1F8} Spain" },
|
|
1915
|
+
{ code: "LK", name: "Sri Lanka", label: "\u{1F1F1}\u{1F1F0} Sri Lanka" },
|
|
1916
|
+
{ code: "SD", name: "Sudan", label: "\u{1F1F8}\u{1F1E9} Sudan" },
|
|
1917
|
+
{ code: "SR", name: "Suriname", label: "\u{1F1F8}\u{1F1F7} Suriname" },
|
|
1918
|
+
{ code: "SE", name: "Sweden", label: "\u{1F1F8}\u{1F1EA} Sweden" },
|
|
1919
|
+
{ code: "CH", name: "Switzerland", label: "\u{1F1E8}\u{1F1ED} Switzerland" },
|
|
1920
|
+
{ code: "SY", name: "Syria", label: "\u{1F1F8}\u{1F1FE} Syria" },
|
|
1921
|
+
{ code: "TW", name: "Taiwan", label: "\u{1F1F9}\u{1F1FC} Taiwan" },
|
|
1922
|
+
{ code: "TJ", name: "Tajikistan", label: "\u{1F1F9}\u{1F1EF} Tajikistan" },
|
|
1923
|
+
{ code: "TZ", name: "Tanzania", label: "\u{1F1F9}\u{1F1FF} Tanzania" },
|
|
1924
|
+
{ code: "TH", name: "Thailand", label: "\u{1F1F9}\u{1F1ED} Thailand" },
|
|
1925
|
+
{ code: "TL", name: "Timor-Leste", label: "\u{1F1F9}\u{1F1F1} Timor-Leste" },
|
|
1926
|
+
{ code: "TG", name: "Togo", label: "\u{1F1F9}\u{1F1EC} Togo" },
|
|
1927
|
+
{ code: "TO", name: "Tonga", label: "\u{1F1F9}\u{1F1F4} Tonga" },
|
|
1928
|
+
{ code: "TT", name: "Trinidad and Tobago", label: "\u{1F1F9}\u{1F1F9} Trinidad and Tobago" },
|
|
1929
|
+
{ code: "TN", name: "Tunisia", label: "\u{1F1F9}\u{1F1F3} Tunisia" },
|
|
1930
|
+
{ code: "TR", name: "Turkey", label: "\u{1F1F9}\u{1F1F7} Turkey" },
|
|
1931
|
+
{ code: "TM", name: "Turkmenistan", label: "\u{1F1F9}\u{1F1F2} Turkmenistan" },
|
|
1932
|
+
{ code: "TV", name: "Tuvalu", label: "\u{1F1F9}\u{1F1FB} Tuvalu" },
|
|
1933
|
+
{ code: "UG", name: "Uganda", label: "\u{1F1FA}\u{1F1EC} Uganda" },
|
|
1934
|
+
{ code: "UA", name: "Ukraine", label: "\u{1F1FA}\u{1F1E6} Ukraine" },
|
|
1935
|
+
{ code: "AE", name: "United Arab Emirates", label: "\u{1F1E6}\u{1F1EA} United Arab Emirates" },
|
|
1936
|
+
{ code: "GB", name: "United Kingdom", label: "\u{1F1EC}\u{1F1E7} United Kingdom" },
|
|
1937
|
+
{ code: "US", name: "United States", label: "\u{1F1FA}\u{1F1F8} United States" },
|
|
1938
|
+
{ code: "UY", name: "Uruguay", label: "\u{1F1FA}\u{1F1FE} Uruguay" },
|
|
1939
|
+
{ code: "UZ", name: "Uzbekistan", label: "\u{1F1FA}\u{1F1FF} Uzbekistan" },
|
|
1940
|
+
{ code: "VU", name: "Vanuatu", label: "\u{1F1FB}\u{1F1FA} Vanuatu" },
|
|
1941
|
+
{ code: "VA", name: "Vatican City", label: "\u{1F1FB}\u{1F1E6} Vatican City" },
|
|
1942
|
+
{ code: "VE", name: "Venezuela", label: "\u{1F1FB}\u{1F1EA} Venezuela" },
|
|
1943
|
+
{ code: "VN", name: "Vietnam", label: "\u{1F1FB}\u{1F1F3} Vietnam" },
|
|
1944
|
+
{ code: "YE", name: "Yemen", label: "\u{1F1FE}\u{1F1EA} Yemen" },
|
|
1945
|
+
{ code: "ZM", name: "Zambia", label: "\u{1F1FF}\u{1F1F2} Zambia" },
|
|
1946
|
+
{ code: "ZW", name: "Zimbabwe", label: "\u{1F1FF}\u{1F1FC} Zimbabwe" }
|
|
1947
|
+
];
|
|
1948
|
+
|
|
1949
|
+
// src/components/country-picker.tsx
|
|
1950
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1951
|
+
var options = COUNTRIES.map((c) => ({
|
|
1952
|
+
label: c.label,
|
|
1953
|
+
value: c.name,
|
|
1954
|
+
name: c.name,
|
|
1955
|
+
alpha2: c.code
|
|
1956
|
+
}));
|
|
1957
|
+
function CountryPicker({
|
|
1958
|
+
modal = false,
|
|
1959
|
+
value_key = "value",
|
|
1960
|
+
...props
|
|
1961
|
+
}) {
|
|
1962
|
+
const [open, setOpen] = React15.useState(false);
|
|
1963
|
+
const active_option = React15.useMemo(
|
|
1964
|
+
() => options?.find(
|
|
1965
|
+
(item) => item[value_key] === props.value
|
|
1966
|
+
)?.label,
|
|
1967
|
+
[props.value, value_key]
|
|
1968
|
+
);
|
|
1969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Popover, { open, onOpenChange: setOpen, modal, children: [
|
|
1970
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1971
|
+
PopoverTrigger,
|
|
1972
|
+
{
|
|
1973
|
+
disabled: props.disabled,
|
|
1974
|
+
asChild: !!props.trigger,
|
|
1975
|
+
className: cn(
|
|
1976
|
+
"bg-tranparent w-full px-0",
|
|
1977
|
+
props.disabled && "pointer-events-none cursor-not-allowed"
|
|
1978
|
+
),
|
|
1979
|
+
children: props.trigger ? props.trigger : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1980
|
+
"button",
|
|
1981
|
+
{
|
|
1982
|
+
type: "button",
|
|
1983
|
+
role: "combobox",
|
|
1984
|
+
"aria-expanded": open,
|
|
1985
|
+
disabled: props.disabled,
|
|
1986
|
+
className: cn(
|
|
1987
|
+
buttonVariants({ variant: "outline" }),
|
|
1988
|
+
`relative w-full h-10 px-3 gap-2 overflow-hidden justify-between bg-background shadow-none
|
|
1989
|
+
text-muted-foreground/40 ring-offset-0 ring-inset [font-weight:inherit]`,
|
|
1990
|
+
props.value && "text-foreground",
|
|
1991
|
+
props?.className,
|
|
1992
|
+
props.disabled && "pointer-events-none cursor-not-allowed"
|
|
1993
|
+
),
|
|
1994
|
+
children: [
|
|
1995
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1996
|
+
"span",
|
|
1997
|
+
{
|
|
1998
|
+
className: cn(
|
|
1999
|
+
"max-w-full whitespace-nowrap truncate overflow-hidden text-inherit",
|
|
2000
|
+
props.nestedClassName
|
|
2001
|
+
),
|
|
2002
|
+
children: active_option ? active_option : props.placeholder || "Pick a country"
|
|
2003
|
+
}
|
|
2004
|
+
),
|
|
2005
|
+
!props.disabled && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-50 -mr-1" }),
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2007
|
+
"input",
|
|
2008
|
+
{
|
|
2009
|
+
type: "text",
|
|
2010
|
+
className: "scale-0 absolute",
|
|
2011
|
+
value: props.value ?? "",
|
|
2012
|
+
required: props.required ?? false
|
|
2013
|
+
}
|
|
2014
|
+
)
|
|
2015
|
+
]
|
|
2016
|
+
}
|
|
2017
|
+
)
|
|
2018
|
+
}
|
|
2019
|
+
),
|
|
2020
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2021
|
+
PopoverContent,
|
|
2022
|
+
{
|
|
2023
|
+
align: props.align || "center",
|
|
2024
|
+
hidePrimitive: props.hidePrimitive,
|
|
2025
|
+
className: "w-[var(--radix-popover-trigger-width)] max-h-(--radix-popover-content-available-height)\n min-w-40 p-0 overflow-hidden",
|
|
2026
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2027
|
+
Command,
|
|
2028
|
+
{
|
|
2029
|
+
className: "w-full",
|
|
2030
|
+
filter: (value, search, keywords = []) => {
|
|
2031
|
+
const extendValue = value + " " + keywords.join(" ");
|
|
2032
|
+
if (extendValue.toLowerCase().includes(search.toLowerCase())) {
|
|
2033
|
+
return 1;
|
|
2034
|
+
}
|
|
2035
|
+
return 0;
|
|
2036
|
+
},
|
|
2037
|
+
children: [
|
|
2038
|
+
!props.hideSearch && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CommandInput, { placeholder: "Search ...", className: "text-xs" }),
|
|
2039
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(CommandList, { children: [
|
|
2040
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CommandEmpty, { className: "flex flex-col items-center justify-center p-6", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "mt-2 text-xs text-zinc-400", children: "No data found" }) }),
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CommandGroup, { children: options?.map((item) => {
|
|
2042
|
+
const item_value = item[value_key];
|
|
2043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2044
|
+
CommandItem,
|
|
2045
|
+
{
|
|
2046
|
+
value: item_value,
|
|
2047
|
+
onSelect: (e) => {
|
|
2048
|
+
props.onChange(e);
|
|
2049
|
+
setOpen(false);
|
|
2050
|
+
},
|
|
2051
|
+
keywords: [item.label],
|
|
2052
|
+
className: "cursor-pointer font-medium text-xs capitalize",
|
|
2053
|
+
children: [
|
|
2054
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2055
|
+
import_lucide_react8.Check,
|
|
2056
|
+
{
|
|
2057
|
+
className: cn(
|
|
2058
|
+
"h-3 w-3",
|
|
2059
|
+
props.value === item_value ? "opacity-100" : "opacity-0"
|
|
2060
|
+
)
|
|
2061
|
+
}
|
|
2062
|
+
),
|
|
2063
|
+
item.label
|
|
2064
|
+
]
|
|
2065
|
+
},
|
|
2066
|
+
item_value
|
|
2067
|
+
);
|
|
2068
|
+
}) })
|
|
2069
|
+
] })
|
|
2070
|
+
]
|
|
2071
|
+
}
|
|
2072
|
+
)
|
|
2073
|
+
}
|
|
2074
|
+
)
|
|
2075
|
+
] });
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
// src/components/drawer.tsx
|
|
2079
|
+
var React16 = __toESM(require("react"));
|
|
2080
|
+
var import_vaul = require("vaul");
|
|
2081
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2082
|
+
var Drawer = ({
|
|
2083
|
+
shouldScaleBackground = true,
|
|
2084
|
+
...props
|
|
2085
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2086
|
+
import_vaul.Drawer.Root,
|
|
2087
|
+
{
|
|
2088
|
+
shouldScaleBackground,
|
|
2089
|
+
...props
|
|
2090
|
+
}
|
|
2091
|
+
);
|
|
2092
|
+
Drawer.displayName = "Drawer";
|
|
2093
|
+
var DrawerTrigger = import_vaul.Drawer.Trigger;
|
|
2094
|
+
var DrawerPortal = import_vaul.Drawer.Portal;
|
|
2095
|
+
var DrawerClose = import_vaul.Drawer.Close;
|
|
2096
|
+
var DrawerOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2097
|
+
import_vaul.Drawer.Overlay,
|
|
2098
|
+
{
|
|
2099
|
+
ref,
|
|
2100
|
+
className: cn("fixed inset-0 z-50 bg-black/80", className),
|
|
2101
|
+
...props
|
|
2102
|
+
}
|
|
2103
|
+
));
|
|
2104
|
+
DrawerOverlay.displayName = import_vaul.Drawer.Overlay.displayName;
|
|
2105
|
+
var DrawerContent = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DrawerPortal, { children: [
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DrawerOverlay, {}),
|
|
2107
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2108
|
+
import_vaul.Drawer.Content,
|
|
2109
|
+
{
|
|
2110
|
+
ref,
|
|
2111
|
+
className: cn(
|
|
2112
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2113
|
+
className
|
|
2114
|
+
),
|
|
2115
|
+
...props,
|
|
2116
|
+
children: [
|
|
2117
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
2118
|
+
children
|
|
2119
|
+
]
|
|
2120
|
+
}
|
|
2121
|
+
)
|
|
2122
|
+
] }));
|
|
2123
|
+
DrawerContent.displayName = "DrawerContent";
|
|
2124
|
+
var DrawerHeader = ({
|
|
2125
|
+
className,
|
|
2126
|
+
...props
|
|
2127
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2128
|
+
"div",
|
|
2129
|
+
{
|
|
2130
|
+
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className),
|
|
2131
|
+
...props
|
|
2132
|
+
}
|
|
2133
|
+
);
|
|
2134
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
2135
|
+
var DrawerFooter = ({
|
|
2136
|
+
className,
|
|
2137
|
+
...props
|
|
2138
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2139
|
+
"div",
|
|
2140
|
+
{
|
|
2141
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
2142
|
+
...props
|
|
2143
|
+
}
|
|
2144
|
+
);
|
|
2145
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
2146
|
+
var DrawerTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2147
|
+
import_vaul.Drawer.Title,
|
|
2148
|
+
{
|
|
2149
|
+
ref,
|
|
2150
|
+
className: cn(
|
|
2151
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
2152
|
+
className
|
|
2153
|
+
),
|
|
2154
|
+
...props
|
|
2155
|
+
}
|
|
2156
|
+
));
|
|
2157
|
+
DrawerTitle.displayName = import_vaul.Drawer.Title.displayName;
|
|
2158
|
+
var DrawerDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2159
|
+
import_vaul.Drawer.Description,
|
|
2160
|
+
{
|
|
2161
|
+
ref,
|
|
2162
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2163
|
+
...props
|
|
2164
|
+
}
|
|
2165
|
+
));
|
|
2166
|
+
DrawerDescription.displayName = import_vaul.Drawer.Description.displayName;
|
|
2167
|
+
|
|
2168
|
+
// src/components/dropdown-menu.tsx
|
|
2169
|
+
var React17 = __toESM(require("react"));
|
|
2170
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
2171
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2172
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2173
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2174
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
2175
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
2176
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
2177
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
2178
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
2179
|
+
var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2180
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
2181
|
+
{
|
|
2182
|
+
ref,
|
|
2183
|
+
className: cn(
|
|
2184
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent",
|
|
2185
|
+
inset && "pl-8",
|
|
2186
|
+
className
|
|
2187
|
+
),
|
|
2188
|
+
...props,
|
|
2189
|
+
children: [
|
|
2190
|
+
children,
|
|
2191
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
2192
|
+
]
|
|
2193
|
+
}
|
|
2194
|
+
));
|
|
2195
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
2196
|
+
var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2197
|
+
DropdownMenuPrimitive.SubContent,
|
|
2198
|
+
{
|
|
2199
|
+
ref,
|
|
2200
|
+
className: cn(
|
|
2201
|
+
"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2202
|
+
className
|
|
2203
|
+
),
|
|
2204
|
+
...props
|
|
2205
|
+
}
|
|
2206
|
+
));
|
|
2207
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
2208
|
+
var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2209
|
+
DropdownMenuPrimitive.Content,
|
|
2210
|
+
{
|
|
2211
|
+
ref,
|
|
2212
|
+
sideOffset,
|
|
2213
|
+
className: cn(
|
|
2214
|
+
"z-50 min-w-32 overflow-hidden rounded-10 border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2215
|
+
className
|
|
2216
|
+
),
|
|
2217
|
+
...props
|
|
2218
|
+
}
|
|
2219
|
+
) }));
|
|
2220
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
2221
|
+
var DropdownMenuItem = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2222
|
+
DropdownMenuPrimitive.Item,
|
|
2223
|
+
{
|
|
2224
|
+
ref,
|
|
2225
|
+
className: cn(
|
|
2226
|
+
"relative flex cursor-pointer select-none items-center rounded-[0.45rem] px-2 py-1 text-xs font-medium outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2227
|
+
inset && "pl-8",
|
|
2228
|
+
className
|
|
2229
|
+
),
|
|
2230
|
+
...props
|
|
2231
|
+
}
|
|
2232
|
+
));
|
|
2233
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2234
|
+
var DropdownMenuCheckboxItem = React17.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2235
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
2236
|
+
{
|
|
2237
|
+
ref,
|
|
2238
|
+
className: cn(
|
|
2239
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2240
|
+
className
|
|
2241
|
+
),
|
|
2242
|
+
checked,
|
|
2243
|
+
...props,
|
|
2244
|
+
children: [
|
|
2245
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Check, { className: "h-4 w-4" }) }) }),
|
|
2246
|
+
children
|
|
2247
|
+
]
|
|
2248
|
+
}
|
|
2249
|
+
));
|
|
2250
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
2251
|
+
var DropdownMenuRadioItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2252
|
+
DropdownMenuPrimitive.RadioItem,
|
|
2253
|
+
{
|
|
2254
|
+
ref,
|
|
2255
|
+
className: cn(
|
|
2256
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2257
|
+
className
|
|
2258
|
+
),
|
|
2259
|
+
...props,
|
|
2260
|
+
children: [
|
|
2261
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
2262
|
+
children
|
|
2263
|
+
]
|
|
2264
|
+
}
|
|
2265
|
+
));
|
|
2266
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
2267
|
+
var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2268
|
+
DropdownMenuPrimitive.Label,
|
|
2269
|
+
{
|
|
2270
|
+
ref,
|
|
2271
|
+
className: cn(
|
|
2272
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
2273
|
+
inset && "pl-8",
|
|
2274
|
+
className
|
|
2275
|
+
),
|
|
2276
|
+
...props
|
|
2277
|
+
}
|
|
2278
|
+
));
|
|
2279
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2280
|
+
var DropdownMenuSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2281
|
+
DropdownMenuPrimitive.Separator,
|
|
2282
|
+
{
|
|
2283
|
+
ref,
|
|
2284
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
2285
|
+
...props
|
|
2286
|
+
}
|
|
2287
|
+
));
|
|
2288
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
2289
|
+
var DropdownMenuShortcut = ({
|
|
2290
|
+
className,
|
|
2291
|
+
...props
|
|
2292
|
+
}) => {
|
|
2293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2294
|
+
"span",
|
|
2295
|
+
{
|
|
2296
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
2297
|
+
...props
|
|
2298
|
+
}
|
|
2299
|
+
);
|
|
2300
|
+
};
|
|
2301
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
2302
|
+
|
|
2303
|
+
// src/components/field.tsx
|
|
2304
|
+
var import_field = require("@base-ui-components/react/field");
|
|
2305
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2306
|
+
function Field({ className, ...props }) {
|
|
2307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2308
|
+
import_field.Field.Root,
|
|
2309
|
+
{
|
|
2310
|
+
className: cn("flex flex-col items-start gap-2", className),
|
|
2311
|
+
"data-slot": "field",
|
|
2312
|
+
...props
|
|
2313
|
+
}
|
|
2314
|
+
);
|
|
2315
|
+
}
|
|
2316
|
+
function FieldLabel({ className, ...props }) {
|
|
2317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2318
|
+
import_field.Field.Label,
|
|
2319
|
+
{
|
|
2320
|
+
className: cn("inline-flex items-center gap-2 text-sm/4", className),
|
|
2321
|
+
"data-slot": "field-label",
|
|
2322
|
+
...props
|
|
2323
|
+
}
|
|
2324
|
+
);
|
|
2325
|
+
}
|
|
2326
|
+
function FieldDescription({
|
|
2327
|
+
className,
|
|
2328
|
+
...props
|
|
2329
|
+
}) {
|
|
2330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2331
|
+
import_field.Field.Description,
|
|
2332
|
+
{
|
|
2333
|
+
className: cn("text-muted-foreground text-xs", className),
|
|
2334
|
+
"data-slot": "field-description",
|
|
2335
|
+
...props
|
|
2336
|
+
}
|
|
2337
|
+
);
|
|
2338
|
+
}
|
|
2339
|
+
function FieldError({ className, ...props }) {
|
|
2340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2341
|
+
import_field.Field.Error,
|
|
2342
|
+
{
|
|
2343
|
+
className: cn("text-destructive-foreground text-xs", className),
|
|
2344
|
+
"data-slot": "field-error",
|
|
2345
|
+
...props
|
|
2346
|
+
}
|
|
2347
|
+
);
|
|
2348
|
+
}
|
|
2349
|
+
var FieldControl = import_field.Field.Control;
|
|
2350
|
+
var FieldValidity = import_field.Field.Validity;
|
|
2351
|
+
|
|
2352
|
+
// src/components/form.tsx
|
|
2353
|
+
var React19 = __toESM(require("react"));
|
|
2354
|
+
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
2355
|
+
var import_react_hook_form = require("react-hook-form");
|
|
2356
|
+
|
|
2357
|
+
// src/components/label.tsx
|
|
2358
|
+
var React18 = __toESM(require("react"));
|
|
2359
|
+
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
2360
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
2361
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2362
|
+
var labelVariants = (0, import_class_variance_authority3.cva)(
|
|
2363
|
+
"text-xs text-muted-foreground font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2364
|
+
);
|
|
2365
|
+
var Label2 = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2366
|
+
LabelPrimitive.Root,
|
|
2367
|
+
{
|
|
2368
|
+
ref,
|
|
2369
|
+
className: cn(labelVariants(), className),
|
|
2370
|
+
...props
|
|
2371
|
+
}
|
|
2372
|
+
));
|
|
2373
|
+
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
2374
|
+
|
|
2375
|
+
// src/components/form.tsx
|
|
2376
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2377
|
+
var Form = import_react_hook_form.FormProvider;
|
|
2378
|
+
var FormFieldContext = React19.createContext(
|
|
2379
|
+
{}
|
|
2380
|
+
);
|
|
2381
|
+
var FormField = ({
|
|
2382
|
+
...props
|
|
2383
|
+
}) => {
|
|
2384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_hook_form.Controller, { ...props }) });
|
|
2385
|
+
};
|
|
2386
|
+
var useFormField = () => {
|
|
2387
|
+
const fieldContext = React19.useContext(FormFieldContext);
|
|
2388
|
+
const itemContext = React19.useContext(FormItemContext);
|
|
2389
|
+
const { getFieldState, formState } = (0, import_react_hook_form.useFormContext)();
|
|
2390
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
2391
|
+
if (!fieldContext) {
|
|
2392
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
2393
|
+
}
|
|
2394
|
+
const { id } = itemContext;
|
|
2395
|
+
return {
|
|
2396
|
+
id,
|
|
2397
|
+
name: fieldContext.name,
|
|
2398
|
+
formItemId: `${id}-form-item`,
|
|
2399
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
2400
|
+
formMessageId: `${id}-form-item-message`,
|
|
2401
|
+
...fieldState
|
|
2402
|
+
};
|
|
2403
|
+
};
|
|
2404
|
+
var FormItemContext = React19.createContext(
|
|
2405
|
+
{}
|
|
2406
|
+
);
|
|
2407
|
+
var FormItem = React19.forwardRef(({ className, ...props }, ref) => {
|
|
2408
|
+
const id = React19.useId();
|
|
2409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
2410
|
+
});
|
|
2411
|
+
FormItem.displayName = "FormItem";
|
|
2412
|
+
var FormLabel = React19.forwardRef(({ className, ...props }, ref) => {
|
|
2413
|
+
const { error, formItemId } = useFormField();
|
|
2414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2415
|
+
Label2,
|
|
2416
|
+
{
|
|
2417
|
+
ref,
|
|
2418
|
+
className: cn(error && "text-destructive", className),
|
|
2419
|
+
htmlFor: formItemId,
|
|
2420
|
+
...props
|
|
2421
|
+
}
|
|
2422
|
+
);
|
|
2423
|
+
});
|
|
2424
|
+
FormLabel.displayName = "FormLabel";
|
|
2425
|
+
var FormControl = React19.forwardRef(({ ...props }, ref) => {
|
|
2426
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
2427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2428
|
+
import_react_slot3.Slot,
|
|
2429
|
+
{
|
|
2430
|
+
ref,
|
|
2431
|
+
id: formItemId,
|
|
2432
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
2433
|
+
"aria-invalid": !!error,
|
|
2434
|
+
...props
|
|
2435
|
+
}
|
|
2436
|
+
);
|
|
2437
|
+
});
|
|
2438
|
+
FormControl.displayName = "FormControl";
|
|
2439
|
+
var FormDescription = React19.forwardRef(({ className, ...props }, ref) => {
|
|
2440
|
+
const { formDescriptionId } = useFormField();
|
|
2441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2442
|
+
"p",
|
|
2443
|
+
{
|
|
2444
|
+
ref,
|
|
2445
|
+
id: formDescriptionId,
|
|
2446
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2447
|
+
...props
|
|
2448
|
+
}
|
|
2449
|
+
);
|
|
2450
|
+
});
|
|
2451
|
+
FormDescription.displayName = "FormDescription";
|
|
2452
|
+
var FormMessage = React19.forwardRef(({ className, children, ...props }, ref) => {
|
|
2453
|
+
const { error, formMessageId } = useFormField();
|
|
2454
|
+
const body = error ? String(error?.message) : children;
|
|
2455
|
+
if (!body) {
|
|
2456
|
+
return null;
|
|
2457
|
+
}
|
|
2458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2459
|
+
"p",
|
|
2460
|
+
{
|
|
2461
|
+
ref,
|
|
2462
|
+
id: formMessageId,
|
|
2463
|
+
className: cn("text-sm font-medium text-destructive", className),
|
|
2464
|
+
...props,
|
|
2465
|
+
children: body
|
|
2466
|
+
}
|
|
2467
|
+
);
|
|
2468
|
+
});
|
|
2469
|
+
FormMessage.displayName = "FormMessage";
|
|
2470
|
+
|
|
2471
|
+
// src/components/image-card.tsx
|
|
2472
|
+
var import_react2 = __toESM(require("react"));
|
|
2473
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2474
|
+
var ImageCard = import_react2.default.memo(
|
|
2475
|
+
({ src = "", alt = "", onErrorImage, className }) => {
|
|
2476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2477
|
+
"img",
|
|
2478
|
+
{
|
|
2479
|
+
onError: (e) => {
|
|
2480
|
+
const target = e?.currentTarget;
|
|
2481
|
+
if (target) {
|
|
2482
|
+
target.src = onErrorImage || "";
|
|
2483
|
+
}
|
|
2484
|
+
},
|
|
2485
|
+
src,
|
|
2486
|
+
alt,
|
|
2487
|
+
className: cn(
|
|
2488
|
+
`h-8 w-8 rounded-10 bg-main-background object-cover object-center shadow-s
|
|
2489
|
+
overflow-hidden border-4 border-main-background shrink-0`,
|
|
2490
|
+
className
|
|
2491
|
+
)
|
|
2492
|
+
}
|
|
2493
|
+
);
|
|
2494
|
+
}
|
|
2495
|
+
);
|
|
2496
|
+
|
|
2497
|
+
// src/components/input-otp.tsx
|
|
2498
|
+
var React21 = __toESM(require("react"));
|
|
2499
|
+
var import_input_otp = require("input-otp");
|
|
2500
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2501
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2502
|
+
var InputOTP = React21.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2503
|
+
import_input_otp.OTPInput,
|
|
2504
|
+
{
|
|
2505
|
+
ref,
|
|
2506
|
+
containerClassName: cn(
|
|
2507
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
2508
|
+
containerClassName
|
|
2509
|
+
),
|
|
2510
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
2511
|
+
...props
|
|
2512
|
+
}
|
|
2513
|
+
));
|
|
2514
|
+
InputOTP.displayName = "InputOTP";
|
|
2515
|
+
var InputOTPGroup = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
2516
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
2517
|
+
var InputOTPSlot = React21.forwardRef(({ index, className, ...props }, ref) => {
|
|
2518
|
+
const inputOTPContext = React21.useContext(import_input_otp.OTPInputContext);
|
|
2519
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
2520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2521
|
+
"div",
|
|
2522
|
+
{
|
|
2523
|
+
ref,
|
|
2524
|
+
className: cn(
|
|
2525
|
+
"relative flex h-10 w-10 items-center justify-center bg-background border-y border-r border-input text-sm transition-all first:rounded-l-10 first:border-l last:rounded-r-10",
|
|
2526
|
+
isActive && "z-10 ring-2 ring-ring ring-offset-background",
|
|
2527
|
+
className
|
|
2528
|
+
),
|
|
2529
|
+
...props,
|
|
2530
|
+
children: [
|
|
2531
|
+
char,
|
|
2532
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
2533
|
+
]
|
|
2534
|
+
}
|
|
2535
|
+
);
|
|
2536
|
+
});
|
|
2537
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
2538
|
+
var InputOTPSeparator = React21.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react10.Dot, {}) }));
|
|
2539
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
2540
|
+
|
|
2541
|
+
// src/components/modal-container.tsx
|
|
2542
|
+
var import_react3 = __toESM(require("react"));
|
|
2543
|
+
var import_framer_motion = require("framer-motion");
|
|
2544
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2545
|
+
var ModalContainer = import_react3.default.memo((props) => {
|
|
2546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2547
|
+
import_framer_motion.motion.div,
|
|
2548
|
+
{
|
|
2549
|
+
initial: { y: 10, opacity: 0 },
|
|
2550
|
+
exit: { y: 10, opacity: 0 },
|
|
2551
|
+
animate: { y: 0, opacity: 1 },
|
|
2552
|
+
className: "fixed inset-0 md:inset-2 md:rounded-xl md:border-4 border-white dark:border-zinc-700\n shadow-3xl bg-main-background overflow-hidden z-10",
|
|
2553
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-full h-full overflow-hidden overflow-y-auto flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-full max-w-[700px] h-fit shrink-0 overflow-hidden flex flex-col p-4", children: props.children }) })
|
|
2554
|
+
}
|
|
2555
|
+
);
|
|
2556
|
+
});
|
|
2557
|
+
|
|
2558
|
+
// src/components/multi-select.tsx
|
|
2559
|
+
var React23 = __toESM(require("react"));
|
|
2560
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2561
|
+
var MultiSelect = ({
|
|
2562
|
+
options: options2 = [],
|
|
2563
|
+
value = [],
|
|
2564
|
+
onValueChange,
|
|
2565
|
+
className,
|
|
2566
|
+
searchInputClassName,
|
|
2567
|
+
placeholder,
|
|
2568
|
+
maxCount,
|
|
2569
|
+
required
|
|
2570
|
+
}) => {
|
|
2571
|
+
const selectedOptions = React23.useMemo(() => {
|
|
2572
|
+
return value.map((v) => options2.find((opt) => opt.value === v)).filter(Boolean);
|
|
2573
|
+
}, [value, options2]);
|
|
2574
|
+
const handleValueChange = React23.useCallback(
|
|
2575
|
+
(newValue) => {
|
|
2576
|
+
if (Array.isArray(newValue)) {
|
|
2577
|
+
onValueChange?.(newValue.map((opt) => opt.value));
|
|
2578
|
+
} else if (newValue === null) {
|
|
2579
|
+
onValueChange?.([]);
|
|
2580
|
+
}
|
|
2581
|
+
},
|
|
2582
|
+
[onValueChange]
|
|
2583
|
+
);
|
|
2584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2585
|
+
Combobox,
|
|
2586
|
+
{
|
|
2587
|
+
required,
|
|
2588
|
+
items: options2,
|
|
2589
|
+
multiple: true,
|
|
2590
|
+
value: selectedOptions,
|
|
2591
|
+
onValueChange: handleValueChange,
|
|
2592
|
+
disabled: maxCount === options2.length,
|
|
2593
|
+
children: [
|
|
2594
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2595
|
+
ComboboxChips,
|
|
2596
|
+
{
|
|
2597
|
+
className: cn(
|
|
2598
|
+
"min-h-10! before:hidden shadow-none rounded-10!",
|
|
2599
|
+
className
|
|
2600
|
+
),
|
|
2601
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ComboboxValue, { children: (value2) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(React23.Fragment, { children: [
|
|
2602
|
+
value2?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2603
|
+
ComboboxChip,
|
|
2604
|
+
{
|
|
2605
|
+
"aria-label": item.value,
|
|
2606
|
+
className: "bg-background border border-border text-xs text-primary [&_svg]:text-muted-foreground/80\n [&_svg]:hover:text-destructive cursor-default font-medium pl-2 flex items-center rounded-lg",
|
|
2607
|
+
children: item.label
|
|
2608
|
+
},
|
|
2609
|
+
item.value
|
|
2610
|
+
)),
|
|
2611
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2612
|
+
ComboboxInput,
|
|
2613
|
+
{
|
|
2614
|
+
placeholder: value2.length > 0 ? void 0 : placeholder || "Select an item...",
|
|
2615
|
+
"aria-label": "Select an item",
|
|
2616
|
+
className: cn(
|
|
2617
|
+
"text-sm! placeholder:text-muted-foreground/50 rounded-10",
|
|
2618
|
+
searchInputClassName
|
|
2619
|
+
)
|
|
2620
|
+
}
|
|
2621
|
+
)
|
|
2622
|
+
] }) })
|
|
2623
|
+
}
|
|
2624
|
+
),
|
|
2625
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ComboboxPopup, { className: "rounded-xl", children: [
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ComboboxEmpty, { className: "w-full center-flex flex-col", children: [
|
|
2627
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2628
|
+
"div",
|
|
2629
|
+
{
|
|
2630
|
+
style: { borderRadius: "30% 70% 70% 30% / 30% 38% 62% 70%" },
|
|
2631
|
+
className: "mt-8 size-24 center-flex bg-accent/50 rounded-blob",
|
|
2632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2633
|
+
"img",
|
|
2634
|
+
{
|
|
2635
|
+
src: "/images/no-direction.png",
|
|
2636
|
+
alt: "no-results",
|
|
2637
|
+
className: "size-16 object-cover object-center"
|
|
2638
|
+
}
|
|
2639
|
+
)
|
|
2640
|
+
}
|
|
2641
|
+
),
|
|
2642
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h1", { className: "mt-4 text-sm text-foreground font-semibold", children: "Nothing Found" }),
|
|
2643
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-1 mb-8 text-sm text-center text-muted-foreground max-w-62", children: "We couldn't find anything matching your search" })
|
|
2644
|
+
] }),
|
|
2645
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ComboboxList, { children: (item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2646
|
+
ComboboxItem,
|
|
2647
|
+
{
|
|
2648
|
+
value: item,
|
|
2649
|
+
className: "pe-0! flex data-selected:hidden",
|
|
2650
|
+
children: item.label
|
|
2651
|
+
},
|
|
2652
|
+
item.value
|
|
2653
|
+
) })
|
|
2654
|
+
] })
|
|
2655
|
+
]
|
|
2656
|
+
}
|
|
2657
|
+
);
|
|
2658
|
+
};
|
|
2659
|
+
MultiSelect.displayName = "MultiSelect";
|
|
2660
|
+
|
|
2661
|
+
// src/components/password-input.tsx
|
|
2662
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2663
|
+
var import_react4 = __toESM(require("react"));
|
|
2664
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2665
|
+
var PasswordInput = import_react4.default.forwardRef(
|
|
2666
|
+
({ className, onSubmit, showStrength, ...props }, ref) => {
|
|
2667
|
+
const [isVisible, setIsVisible] = import_react4.default.useState(false);
|
|
2668
|
+
const toggleVisibility = () => setIsVisible((prevState) => !prevState);
|
|
2669
|
+
const checkStrength = (pass) => {
|
|
2670
|
+
const requirements = [
|
|
2671
|
+
{ regex: /.{8,}/, text: "At least 8 characters" },
|
|
2672
|
+
{ regex: /[0-9]/, text: "At least 1 number" },
|
|
2673
|
+
{ regex: /[a-z]/, text: "At least 1 lowercase letter" },
|
|
2674
|
+
{ regex: /[A-Z]/, text: "At least 1 uppercase letter" }
|
|
2675
|
+
];
|
|
2676
|
+
return requirements.map((req) => ({
|
|
2677
|
+
met: req.regex.test(pass),
|
|
2678
|
+
text: req.text
|
|
2679
|
+
}));
|
|
2680
|
+
};
|
|
2681
|
+
const strength = checkStrength(props.value?.toString() || "");
|
|
2682
|
+
const strengthScore = import_react4.default.useMemo(() => {
|
|
2683
|
+
return strength.filter((req) => req.met).length;
|
|
2684
|
+
}, [strength]);
|
|
2685
|
+
const getStrengthColor = (score) => {
|
|
2686
|
+
if (score === 0) return "bg-border";
|
|
2687
|
+
if (score <= 1) return "bg-red-500";
|
|
2688
|
+
if (score <= 2) return "bg-orange-500";
|
|
2689
|
+
if (score === 3) return "bg-amber-500";
|
|
2690
|
+
return "bg-emerald-500";
|
|
2691
|
+
};
|
|
2692
|
+
const getStrengthText = (score) => {
|
|
2693
|
+
if (score === 0) return "Enter a password";
|
|
2694
|
+
if (score <= 2) return "Weak password";
|
|
2695
|
+
if (score === 3) return "Medium password";
|
|
2696
|
+
return "Strong password";
|
|
2697
|
+
};
|
|
2698
|
+
const handleSubmit = (event) => {
|
|
2699
|
+
if (showStrength && strengthScore < 4) {
|
|
2700
|
+
event.preventDefault();
|
|
2701
|
+
return;
|
|
2702
|
+
}
|
|
2703
|
+
onSubmit?.(event);
|
|
2704
|
+
};
|
|
2705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative w-full", children: [
|
|
2706
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative w-full", children: [
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2708
|
+
Input,
|
|
2709
|
+
{
|
|
2710
|
+
className: cn("pe-9", className),
|
|
2711
|
+
...props,
|
|
2712
|
+
ref,
|
|
2713
|
+
type: isVisible ? "text" : "password",
|
|
2714
|
+
"aria-invalid": showStrength ? strengthScore < 4 : false,
|
|
2715
|
+
onSubmit: handleSubmit
|
|
2716
|
+
}
|
|
2717
|
+
),
|
|
2718
|
+
showStrength && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2719
|
+
"input",
|
|
2720
|
+
{
|
|
2721
|
+
title: "password",
|
|
2722
|
+
type: "password",
|
|
2723
|
+
className: "scale-0 absolute",
|
|
2724
|
+
required: true,
|
|
2725
|
+
value: showStrength ? strengthScore >= 4 ? props?.value : "" : props.value
|
|
2726
|
+
}
|
|
2727
|
+
),
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2729
|
+
"button",
|
|
2730
|
+
{
|
|
2731
|
+
className: "absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-lg text-muted-foreground/80 outline-offset-2 transition-colors hover:text-foreground focus:z-10 focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-ring/70 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
2732
|
+
type: "button",
|
|
2733
|
+
onClick: toggleVisibility,
|
|
2734
|
+
"aria-label": isVisible ? "Hide password" : "Show password",
|
|
2735
|
+
"aria-pressed": isVisible,
|
|
2736
|
+
"aria-controls": "password",
|
|
2737
|
+
children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react11.EyeOff, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react11.Eye, { size: 16, strokeWidth: 2, "aria-hidden": "true" })
|
|
2738
|
+
}
|
|
2739
|
+
)
|
|
2740
|
+
] }),
|
|
2741
|
+
showStrength && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react4.default.Fragment, { children: [
|
|
2742
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2743
|
+
"div",
|
|
2744
|
+
{
|
|
2745
|
+
className: "my-3 h-1 w-full overflow-hidden rounded-full bg-border",
|
|
2746
|
+
role: "progressbar",
|
|
2747
|
+
"aria-valuenow": strengthScore,
|
|
2748
|
+
"aria-valuemin": 0,
|
|
2749
|
+
"aria-valuemax": 4,
|
|
2750
|
+
"aria-label": "Password strength",
|
|
2751
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2752
|
+
"div",
|
|
2753
|
+
{
|
|
2754
|
+
className: `h-full ${getStrengthColor(
|
|
2755
|
+
strengthScore
|
|
2756
|
+
)} transition-all duration-500 ease-out`,
|
|
2757
|
+
style: { width: `${strengthScore / 4 * 100}%` }
|
|
2758
|
+
}
|
|
2759
|
+
)
|
|
2760
|
+
}
|
|
2761
|
+
),
|
|
2762
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2763
|
+
"p",
|
|
2764
|
+
{
|
|
2765
|
+
id: "password-strength",
|
|
2766
|
+
className: "mb-2 text-xs font-medium text-zinc-600",
|
|
2767
|
+
children: [
|
|
2768
|
+
getStrengthText(strengthScore),
|
|
2769
|
+
". Must contain:"
|
|
2770
|
+
]
|
|
2771
|
+
}
|
|
2772
|
+
),
|
|
2773
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("ul", { className: "space-y-1.5", "aria-label": "Password requirements", children: strength.map((req, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("li", { className: "flex items-center gap-2", children: [
|
|
2774
|
+
req.met ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2775
|
+
import_lucide_react11.Check,
|
|
2776
|
+
{
|
|
2777
|
+
size: 16,
|
|
2778
|
+
className: "text-emerald-500",
|
|
2779
|
+
"aria-hidden": "true"
|
|
2780
|
+
}
|
|
2781
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2782
|
+
import_lucide_react11.X,
|
|
2783
|
+
{
|
|
2784
|
+
size: 16,
|
|
2785
|
+
className: "text-muted-foreground/80",
|
|
2786
|
+
"aria-hidden": "true"
|
|
2787
|
+
}
|
|
2788
|
+
),
|
|
2789
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2790
|
+
"span",
|
|
2791
|
+
{
|
|
2792
|
+
className: `text-xs ${req.met ? "text-emerald-600" : "text-muted-foreground"}`,
|
|
2793
|
+
children: [
|
|
2794
|
+
req.text,
|
|
2795
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "sr-only", children: req.met ? " - Requirement met" : " - Requirement not met" })
|
|
2796
|
+
]
|
|
2797
|
+
}
|
|
2798
|
+
)
|
|
2799
|
+
] }, index)) })
|
|
2800
|
+
] })
|
|
2801
|
+
] });
|
|
2802
|
+
}
|
|
2803
|
+
);
|
|
2804
|
+
PasswordInput.displayName = "PasswordInput";
|
|
2805
|
+
var password_input_default = import_react4.default.memo(PasswordInput);
|
|
2806
|
+
|
|
2807
|
+
// src/components/phone-number-input.tsx
|
|
2808
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2809
|
+
var import_react5 = require("react");
|
|
2810
|
+
var RPNInput = __toESM(require("react-phone-number-input"));
|
|
2811
|
+
var import_flags = __toESM(require("react-phone-number-input/flags"));
|
|
2812
|
+
var import_react_phone_number_input = require("react-phone-number-input");
|
|
2813
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2814
|
+
var PhoneInput = (0, import_react5.forwardRef)(
|
|
2815
|
+
({ className, ...props }, ref) => {
|
|
2816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2817
|
+
Input,
|
|
2818
|
+
{
|
|
2819
|
+
className: cn(
|
|
2820
|
+
"-ms-px rounded-s-none shadow-none focus-visible:z-10 ring-0! border!",
|
|
2821
|
+
className
|
|
2822
|
+
),
|
|
2823
|
+
ref,
|
|
2824
|
+
...props
|
|
2825
|
+
}
|
|
2826
|
+
);
|
|
2827
|
+
}
|
|
2828
|
+
);
|
|
2829
|
+
PhoneInput.displayName = "PhoneInput";
|
|
2830
|
+
|
|
2831
|
+
// src/components/price-input.tsx
|
|
2832
|
+
var import_react6 = __toESM(require("react"));
|
|
2833
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2834
|
+
var PriceInput = import_react6.default.forwardRef(({ currency, ...props }, ref) => {
|
|
2835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2836
|
+
"div",
|
|
2837
|
+
{
|
|
2838
|
+
className: cn(
|
|
2839
|
+
"relative h-fit flex overflow-hidden p-0",
|
|
2840
|
+
props.containerClassname
|
|
2841
|
+
),
|
|
2842
|
+
children: [
|
|
2843
|
+
!props.hide_currency_symbol && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "absolute inset-y-0.5 flex items-center pl-4 pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "[fontSize:inherit] font-medium text-muted-foreground/50", children: currency?.symbol }) }),
|
|
2844
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2845
|
+
Input,
|
|
2846
|
+
{
|
|
2847
|
+
ref,
|
|
2848
|
+
placeholder: "0.00",
|
|
2849
|
+
type: "text",
|
|
2850
|
+
...props,
|
|
2851
|
+
className: cn("px-10 shadow-none m-0! py-0", props.className)
|
|
2852
|
+
}
|
|
2853
|
+
),
|
|
2854
|
+
!props.hide_currency_code && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "absolute inset-y-0.5 right-0 flex items-center pl-3 pr-4", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "[fontSize:inherit] font-medium text-muted-foreground/50", children: currency?.code }) })
|
|
2855
|
+
]
|
|
2856
|
+
}
|
|
2857
|
+
);
|
|
2858
|
+
});
|
|
2859
|
+
PriceInput.displayName = "PriceInput";
|
|
2860
|
+
|
|
2861
|
+
// src/components/progress.tsx
|
|
2862
|
+
var React27 = __toESM(require("react"));
|
|
2863
|
+
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
|
2864
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2865
|
+
var Progress = React27.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2866
|
+
ProgressPrimitive.Root,
|
|
2867
|
+
{
|
|
2868
|
+
ref,
|
|
2869
|
+
className: cn(
|
|
2870
|
+
"relative h-4 w-full overflow-hidden rounded-full bg-secondary",
|
|
2871
|
+
className
|
|
2872
|
+
),
|
|
2873
|
+
...props,
|
|
2874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2875
|
+
ProgressPrimitive.Indicator,
|
|
2876
|
+
{
|
|
2877
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
2878
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
2879
|
+
}
|
|
2880
|
+
)
|
|
2881
|
+
}
|
|
2882
|
+
));
|
|
2883
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
2884
|
+
|
|
2885
|
+
// src/components/select.tsx
|
|
2886
|
+
var React28 = __toESM(require("react"));
|
|
2887
|
+
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
2888
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2889
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2890
|
+
var Select = SelectPrimitive.Root;
|
|
2891
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
2892
|
+
var SelectValue = SelectPrimitive.Value;
|
|
2893
|
+
var SelectTrigger = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2894
|
+
SelectPrimitive.Trigger,
|
|
2895
|
+
{
|
|
2896
|
+
ref,
|
|
2897
|
+
className: cn(
|
|
2898
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
2899
|
+
className
|
|
2900
|
+
),
|
|
2901
|
+
...props,
|
|
2902
|
+
children: [
|
|
2903
|
+
children,
|
|
2904
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
2905
|
+
]
|
|
2906
|
+
}
|
|
2907
|
+
));
|
|
2908
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2909
|
+
var SelectScrollUpButton = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2910
|
+
SelectPrimitive.ScrollUpButton,
|
|
2911
|
+
{
|
|
2912
|
+
ref,
|
|
2913
|
+
className: cn(
|
|
2914
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2915
|
+
className
|
|
2916
|
+
),
|
|
2917
|
+
...props,
|
|
2918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.ChevronUp, { className: "h-4 w-4" })
|
|
2919
|
+
}
|
|
2920
|
+
));
|
|
2921
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2922
|
+
var SelectScrollDownButton = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2923
|
+
SelectPrimitive.ScrollDownButton,
|
|
2924
|
+
{
|
|
2925
|
+
ref,
|
|
2926
|
+
className: cn(
|
|
2927
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2928
|
+
className
|
|
2929
|
+
),
|
|
2930
|
+
...props,
|
|
2931
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.ChevronDown, { className: "h-4 w-4" })
|
|
2932
|
+
}
|
|
2933
|
+
));
|
|
2934
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2935
|
+
var SelectContent = React28.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2936
|
+
SelectPrimitive.Content,
|
|
2937
|
+
{
|
|
2938
|
+
ref,
|
|
2939
|
+
className: cn(
|
|
2940
|
+
"relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2941
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
2942
|
+
className
|
|
2943
|
+
),
|
|
2944
|
+
position,
|
|
2945
|
+
...props,
|
|
2946
|
+
children: [
|
|
2947
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectScrollUpButton, {}),
|
|
2948
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2949
|
+
SelectPrimitive.Viewport,
|
|
2950
|
+
{
|
|
2951
|
+
className: cn(
|
|
2952
|
+
"p-1",
|
|
2953
|
+
position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
|
|
2954
|
+
),
|
|
2955
|
+
children
|
|
2956
|
+
}
|
|
2957
|
+
),
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectScrollDownButton, {})
|
|
2959
|
+
]
|
|
2960
|
+
}
|
|
2961
|
+
) }));
|
|
2962
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2963
|
+
var SelectLabel = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2964
|
+
SelectPrimitive.Label,
|
|
2965
|
+
{
|
|
2966
|
+
ref,
|
|
2967
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
2968
|
+
...props
|
|
2969
|
+
}
|
|
2970
|
+
));
|
|
2971
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2972
|
+
var SelectItem = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2973
|
+
SelectPrimitive.Item,
|
|
2974
|
+
{
|
|
2975
|
+
ref,
|
|
2976
|
+
className: cn(
|
|
2977
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-xs outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2978
|
+
className
|
|
2979
|
+
),
|
|
2980
|
+
...props,
|
|
2981
|
+
children: [
|
|
2982
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.Check, { className: "h-4 w-4" }) }) }),
|
|
2983
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive.ItemText, { children })
|
|
2984
|
+
]
|
|
2985
|
+
}
|
|
2986
|
+
));
|
|
2987
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2988
|
+
var SelectSeparator = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2989
|
+
SelectPrimitive.Separator,
|
|
2990
|
+
{
|
|
2991
|
+
ref,
|
|
2992
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
2993
|
+
...props
|
|
2994
|
+
}
|
|
2995
|
+
));
|
|
2996
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
2997
|
+
|
|
2998
|
+
// src/components/separator.tsx
|
|
2999
|
+
var React29 = __toESM(require("react"));
|
|
3000
|
+
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
|
|
3001
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3002
|
+
var Separator3 = React29.forwardRef(
|
|
3003
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3004
|
+
SeparatorPrimitive.Root,
|
|
3005
|
+
{
|
|
3006
|
+
ref,
|
|
3007
|
+
decorative,
|
|
3008
|
+
orientation,
|
|
3009
|
+
className: cn(
|
|
3010
|
+
"shrink-0 bg-border",
|
|
3011
|
+
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
3012
|
+
className
|
|
3013
|
+
),
|
|
3014
|
+
...props
|
|
3015
|
+
}
|
|
3016
|
+
)
|
|
3017
|
+
);
|
|
3018
|
+
Separator3.displayName = SeparatorPrimitive.Root.displayName;
|
|
3019
|
+
|
|
3020
|
+
// src/components/sheet.tsx
|
|
3021
|
+
var React30 = __toESM(require("react"));
|
|
3022
|
+
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
3023
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
3024
|
+
var import_lucide_react14 = require("lucide-react");
|
|
3025
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3026
|
+
var Sheet = SheetPrimitive.Root;
|
|
3027
|
+
var SheetTrigger = SheetPrimitive.Trigger;
|
|
3028
|
+
var SheetClose = SheetPrimitive.Close;
|
|
3029
|
+
var SheetPortal = SheetPrimitive.Portal;
|
|
3030
|
+
var SheetOverlay = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3031
|
+
SheetPrimitive.Overlay,
|
|
3032
|
+
{
|
|
3033
|
+
className: cn(
|
|
3034
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3035
|
+
className
|
|
3036
|
+
),
|
|
3037
|
+
...props,
|
|
3038
|
+
ref
|
|
3039
|
+
}
|
|
3040
|
+
));
|
|
3041
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
3042
|
+
var sheetVariants = (0, import_class_variance_authority4.cva)(
|
|
3043
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
3044
|
+
{
|
|
3045
|
+
variants: {
|
|
3046
|
+
side: {
|
|
3047
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
3048
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
3049
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
3050
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
3051
|
+
}
|
|
3052
|
+
},
|
|
3053
|
+
defaultVariants: {
|
|
3054
|
+
side: "right"
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
);
|
|
3058
|
+
var SheetContent = React30.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(SheetPortal, { children: [
|
|
3059
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SheetOverlay, {}),
|
|
3060
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
3061
|
+
SheetPrimitive.Content,
|
|
3062
|
+
{
|
|
3063
|
+
ref,
|
|
3064
|
+
className: cn(sheetVariants({ side }), className),
|
|
3065
|
+
...props,
|
|
3066
|
+
children: [
|
|
3067
|
+
children,
|
|
3068
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
3069
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react14.X, { className: "h-4 w-4" }),
|
|
3070
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "sr-only", children: "Close" })
|
|
3071
|
+
] })
|
|
3072
|
+
]
|
|
3073
|
+
}
|
|
3074
|
+
)
|
|
3075
|
+
] }));
|
|
3076
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
3077
|
+
var SheetHeader = ({
|
|
3078
|
+
className,
|
|
3079
|
+
...props
|
|
3080
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3081
|
+
"div",
|
|
3082
|
+
{
|
|
3083
|
+
className: cn(
|
|
3084
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
3085
|
+
className
|
|
3086
|
+
),
|
|
3087
|
+
...props
|
|
3088
|
+
}
|
|
3089
|
+
);
|
|
3090
|
+
SheetHeader.displayName = "SheetHeader";
|
|
3091
|
+
var SheetFooter = ({
|
|
3092
|
+
className,
|
|
3093
|
+
...props
|
|
3094
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3095
|
+
"div",
|
|
3096
|
+
{
|
|
3097
|
+
className: cn(
|
|
3098
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
3099
|
+
className
|
|
3100
|
+
),
|
|
3101
|
+
...props
|
|
3102
|
+
}
|
|
3103
|
+
);
|
|
3104
|
+
SheetFooter.displayName = "SheetFooter";
|
|
3105
|
+
var SheetTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3106
|
+
SheetPrimitive.Title,
|
|
3107
|
+
{
|
|
3108
|
+
ref,
|
|
3109
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
3110
|
+
...props
|
|
3111
|
+
}
|
|
3112
|
+
));
|
|
3113
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
3114
|
+
var SheetDescription = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3115
|
+
SheetPrimitive.Description,
|
|
3116
|
+
{
|
|
3117
|
+
ref,
|
|
3118
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
3119
|
+
...props
|
|
3120
|
+
}
|
|
3121
|
+
));
|
|
3122
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
3123
|
+
|
|
3124
|
+
// src/components/skeleton.tsx
|
|
3125
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3126
|
+
function Skeleton({
|
|
3127
|
+
className,
|
|
3128
|
+
...props
|
|
3129
|
+
}) {
|
|
3130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3131
|
+
"div",
|
|
3132
|
+
{
|
|
3133
|
+
className: cn("animate-pulse rounded-lg bg-muted", className),
|
|
3134
|
+
...props
|
|
3135
|
+
}
|
|
3136
|
+
);
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
// src/components/status-indicator.tsx
|
|
3140
|
+
var import_merge_props3 = require("@base-ui-components/react/merge-props");
|
|
3141
|
+
var import_use_render3 = require("@base-ui-components/react/use-render");
|
|
3142
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
3143
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3144
|
+
var statusIndicatorVariants = (0, import_class_variance_authority5.cva)(
|
|
3145
|
+
"relative inline-flex size-2.5 shrink-0",
|
|
3146
|
+
{
|
|
3147
|
+
defaultVariants: {
|
|
3148
|
+
variant: "active"
|
|
3149
|
+
},
|
|
3150
|
+
variants: {
|
|
3151
|
+
variant: {
|
|
3152
|
+
active: "[&>span:first-child]:bg-teal-500 [&>span:last-child]:bg-teal-600",
|
|
3153
|
+
degraded: "[&>span:first-child]:bg-yellow-500 [&>span:last-child]:bg-yellow-600",
|
|
3154
|
+
critical: "[&>span:first-child]:bg-red-500 [&>span:last-child]:bg-red-600",
|
|
3155
|
+
neutral: "[&>span:first-child]:bg-muted-foreground/80 [&>span:last-child]:bg-muted-foreground"
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
}
|
|
3159
|
+
);
|
|
3160
|
+
function StatusIndicator({
|
|
3161
|
+
className,
|
|
3162
|
+
variant,
|
|
3163
|
+
animated = true,
|
|
3164
|
+
render,
|
|
3165
|
+
...props
|
|
3166
|
+
}) {
|
|
3167
|
+
const defaultProps = {
|
|
3168
|
+
className: cn(statusIndicatorVariants({ className, variant })),
|
|
3169
|
+
"data-slot": "status-indicator"
|
|
3170
|
+
};
|
|
3171
|
+
return (0, import_use_render3.useRender)({
|
|
3172
|
+
defaultTagName: "span",
|
|
3173
|
+
props: (0, import_merge_props3.mergeProps)(defaultProps, props),
|
|
3174
|
+
render: render || /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { ...defaultProps, children: [
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3176
|
+
"span",
|
|
3177
|
+
{
|
|
3178
|
+
className: cn(
|
|
3179
|
+
"absolute inline-flex h-full w-full rounded-full opacity-75",
|
|
3180
|
+
animated && "animate-ping"
|
|
3181
|
+
)
|
|
3182
|
+
}
|
|
3183
|
+
),
|
|
3184
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "relative inline-flex rounded-full size-2.5" })
|
|
3185
|
+
] })
|
|
3186
|
+
});
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
// src/components/switch.tsx
|
|
3190
|
+
var import_switch = require("@base-ui-components/react/switch");
|
|
3191
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3192
|
+
function Switch({ className, ...props }) {
|
|
3193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3194
|
+
import_switch.Switch.Root,
|
|
3195
|
+
{
|
|
3196
|
+
className: cn(
|
|
3197
|
+
"cursor-pointer group/switch inset-shadow-[0_1px_--theme(--color-black/4%)] inline-flex h-4.5 w-7.5 shrink-0 items-center rounded-full p-px outline-none transition-all focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-64 data-checked:bg-primary data-unchecked:bg-input",
|
|
3198
|
+
className
|
|
3199
|
+
),
|
|
3200
|
+
"data-slot": "switch",
|
|
3201
|
+
...props,
|
|
3202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3203
|
+
import_switch.Switch.Thumb,
|
|
3204
|
+
{
|
|
3205
|
+
className: cn(
|
|
3206
|
+
"pointer-events-none block size-4 rounded-full bg-background shadow-sm transition-[translate,width] group-active/switch:w-4.5 data-checked:translate-x-3 data-unchecked:translate-x-0 data-checked:group-active/switch:translate-x-2.5"
|
|
3207
|
+
),
|
|
3208
|
+
"data-slot": "switch-thumb"
|
|
3209
|
+
}
|
|
3210
|
+
)
|
|
3211
|
+
}
|
|
3212
|
+
);
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
// src/components/table.tsx
|
|
3216
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3217
|
+
function Table({ className, ...props }) {
|
|
3218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3219
|
+
"div",
|
|
3220
|
+
{
|
|
3221
|
+
className: "relative w-full overflow-x-auto",
|
|
3222
|
+
"data-slot": "table-container",
|
|
3223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3224
|
+
"table",
|
|
3225
|
+
{
|
|
3226
|
+
className: cn(
|
|
3227
|
+
"w-full caption-bottom in-data-[slot=frame]:border-separate in-data-[slot=frame]:border-spacing-0 text-sm",
|
|
3228
|
+
className
|
|
3229
|
+
),
|
|
3230
|
+
"data-slot": "table",
|
|
3231
|
+
...props
|
|
3232
|
+
}
|
|
3233
|
+
)
|
|
3234
|
+
}
|
|
3235
|
+
);
|
|
3236
|
+
}
|
|
3237
|
+
function TableHeader({ className, ...props }) {
|
|
3238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3239
|
+
"thead",
|
|
3240
|
+
{
|
|
3241
|
+
className: cn(
|
|
3242
|
+
"[&_tr]:border-b in-data-[slot=frame]:**:[th]:h-9 in-data-[slot=frame]:*:[tr]:border-none in-data-[slot=frame]:*:[tr]:hover:bg-transparent",
|
|
3243
|
+
className
|
|
3244
|
+
),
|
|
3245
|
+
"data-slot": "table-header",
|
|
3246
|
+
...props
|
|
3247
|
+
}
|
|
3248
|
+
);
|
|
3249
|
+
}
|
|
3250
|
+
function TableBody({ className, ...props }) {
|
|
3251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3252
|
+
"tbody",
|
|
3253
|
+
{
|
|
3254
|
+
className: cn(
|
|
3255
|
+
"relative in-data-[slot=frame]:rounded-xl in-data-[slot=frame]:shadow-xs before:pointer-events-none before:absolute before:inset-px not-in-data-[slot=frame]:before:hidden before:rounded-[calc(var(--radius-xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)] [&_tr:last-child]:border-0 in-data-[slot=frame]:*:[tr]:border-0 in-data-[slot=frame]:*:[tr]:*:[td]:border-b in-data-[slot=frame]:*:[tr]:*:[td]:bg-card in-data-[slot=frame]:*:[tr]:*:[td]:bg-clip-padding in-data-[slot=frame]:*:[tr]:first:*:[td]:first:rounded-ss-xl in-data-[slot=frame]:*:[tr]:*:[td]:first:border-s in-data-[slot=frame]:*:[tr]:first:*:[td]:border-t in-data-[slot=frame]:*:[tr]:last:*:[td]:last:rounded-ee-xl in-data-[slot=frame]:*:[tr]:*:[td]:last:border-e in-data-[slot=frame]:*:[tr]:first:*:[td]:last:rounded-se-xl in-data-[slot=frame]:*:[tr]:last:*:[td]:first:rounded-es-xl in-data-[slot=frame]:*:[tr]:hover:*:[td]:bg-muted/32",
|
|
3256
|
+
className
|
|
3257
|
+
),
|
|
3258
|
+
"data-slot": "table-body",
|
|
3259
|
+
...props
|
|
3260
|
+
}
|
|
3261
|
+
);
|
|
3262
|
+
}
|
|
3263
|
+
function TableFooter({ className, ...props }) {
|
|
3264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3265
|
+
"tfoot",
|
|
3266
|
+
{
|
|
3267
|
+
className: cn(
|
|
3268
|
+
"border-t in-data-[slot=frame]:border-none bg-muted/72 in-data-[slot=frame]:bg-transparent font-medium [&>tr]:last:border-b-0 in-data-[slot=frame]:*:[tr]:hover:bg-transparent",
|
|
3269
|
+
className
|
|
3270
|
+
),
|
|
3271
|
+
"data-slot": "table-footer",
|
|
3272
|
+
...props
|
|
3273
|
+
}
|
|
3274
|
+
);
|
|
3275
|
+
}
|
|
3276
|
+
function TableRow({ className, ...props }) {
|
|
3277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3278
|
+
"tr",
|
|
3279
|
+
{
|
|
3280
|
+
className: cn(
|
|
3281
|
+
"border-b transition-colors hover:bg-muted in-data-[slot=frame]:hover:bg-transparent data-[state=selected]:bg-muted in-data-[slot=frame]:data-[state=selected]:bg-transparent",
|
|
3282
|
+
className
|
|
3283
|
+
),
|
|
3284
|
+
"data-slot": "table-row",
|
|
3285
|
+
...props
|
|
3286
|
+
}
|
|
3287
|
+
);
|
|
3288
|
+
}
|
|
3289
|
+
function TableHead({ className, ...props }) {
|
|
3290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3291
|
+
"th",
|
|
3292
|
+
{
|
|
3293
|
+
className: cn(
|
|
3294
|
+
"h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-foreground has-[[role=checkbox]]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
3295
|
+
className
|
|
3296
|
+
),
|
|
3297
|
+
"data-slot": "table-head",
|
|
3298
|
+
...props
|
|
3299
|
+
}
|
|
3300
|
+
);
|
|
3301
|
+
}
|
|
3302
|
+
function TableCell({ className, ...props }) {
|
|
3303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3304
|
+
"td",
|
|
3305
|
+
{
|
|
3306
|
+
className: cn(
|
|
3307
|
+
"whitespace-nowrap p-2 align-middle has-[[role=checkbox]]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
3308
|
+
className
|
|
3309
|
+
),
|
|
3310
|
+
"data-slot": "table-cell",
|
|
3311
|
+
...props
|
|
3312
|
+
}
|
|
3313
|
+
);
|
|
3314
|
+
}
|
|
3315
|
+
function TableCaption({
|
|
3316
|
+
className,
|
|
3317
|
+
...props
|
|
3318
|
+
}) {
|
|
3319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3320
|
+
"caption",
|
|
3321
|
+
{
|
|
3322
|
+
className: cn(
|
|
3323
|
+
"in-data-[slot=frame]:my-4 mt-4 text-muted-foreground text-sm",
|
|
3324
|
+
className
|
|
3325
|
+
),
|
|
3326
|
+
"data-slot": "table-caption",
|
|
3327
|
+
...props
|
|
3328
|
+
}
|
|
3329
|
+
);
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
// src/components/tabs.tsx
|
|
3333
|
+
var React31 = __toESM(require("react"));
|
|
3334
|
+
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
|
3335
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3336
|
+
var Tabs = TabsPrimitive.Root;
|
|
3337
|
+
var TabsList = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3338
|
+
TabsPrimitive.List,
|
|
3339
|
+
{
|
|
3340
|
+
ref,
|
|
3341
|
+
className: cn(
|
|
3342
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
3343
|
+
className
|
|
3344
|
+
),
|
|
3345
|
+
...props
|
|
3346
|
+
}
|
|
3347
|
+
));
|
|
3348
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3349
|
+
var TabsTrigger = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3350
|
+
TabsPrimitive.Trigger,
|
|
3351
|
+
{
|
|
3352
|
+
ref,
|
|
3353
|
+
className: cn(
|
|
3354
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-[11px] font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-xs",
|
|
3355
|
+
className
|
|
3356
|
+
),
|
|
3357
|
+
...props
|
|
3358
|
+
}
|
|
3359
|
+
));
|
|
3360
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3361
|
+
var TabsContent = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3362
|
+
TabsPrimitive.Content,
|
|
3363
|
+
{
|
|
3364
|
+
ref,
|
|
3365
|
+
className: cn(
|
|
3366
|
+
"mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
3367
|
+
className
|
|
3368
|
+
),
|
|
3369
|
+
...props
|
|
3370
|
+
}
|
|
3371
|
+
));
|
|
3372
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3373
|
+
|
|
3374
|
+
// src/components/tags-input.tsx
|
|
3375
|
+
var import_emblor = require("emblor");
|
|
3376
|
+
var import_react7 = require("react");
|
|
3377
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3378
|
+
|
|
3379
|
+
// src/components/textarea.tsx
|
|
3380
|
+
var React32 = __toESM(require("react"));
|
|
3381
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3382
|
+
var Textarea = React32.forwardRef(
|
|
3383
|
+
({ className, ...props }, ref) => {
|
|
3384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3385
|
+
"textarea",
|
|
3386
|
+
{
|
|
3387
|
+
className: cn(
|
|
3388
|
+
"flex min-h-20 w-full rounded-10 border border-input bg-background p-3 text-sm font-normal ring-offset-background placeholder:text-muted-foreground/30 focus-visible:border-primary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/30 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3389
|
+
className
|
|
3390
|
+
),
|
|
3391
|
+
ref,
|
|
3392
|
+
...props
|
|
3393
|
+
}
|
|
3394
|
+
);
|
|
3395
|
+
}
|
|
3396
|
+
);
|
|
3397
|
+
Textarea.displayName = "Textarea";
|
|
3398
|
+
|
|
3399
|
+
// src/components/timeline.tsx
|
|
3400
|
+
var React33 = __toESM(require("react"));
|
|
3401
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3402
|
+
var TimelineContext = React33.createContext(null);
|
|
3403
|
+
function useTimeline() {
|
|
3404
|
+
const context = React33.useContext(TimelineContext);
|
|
3405
|
+
if (!context) {
|
|
3406
|
+
throw new Error("useTimeline must be used within a <Timeline />.");
|
|
3407
|
+
}
|
|
3408
|
+
return context;
|
|
3409
|
+
}
|
|
3410
|
+
var Timeline = React33.forwardRef(
|
|
3411
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TimelineContext.Provider, { value: { orientation }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3412
|
+
"ol",
|
|
3413
|
+
{
|
|
3414
|
+
ref,
|
|
3415
|
+
role: "list",
|
|
3416
|
+
"data-orientation": orientation,
|
|
3417
|
+
className: cn(
|
|
3418
|
+
"flex",
|
|
3419
|
+
orientation === "vertical" && "flex-col",
|
|
3420
|
+
className
|
|
3421
|
+
),
|
|
3422
|
+
...props
|
|
3423
|
+
}
|
|
3424
|
+
) })
|
|
3425
|
+
);
|
|
3426
|
+
Timeline.displayName = "Timeline";
|
|
3427
|
+
var TimelineItem = React33.forwardRef(({ className, ...props }, ref) => {
|
|
3428
|
+
const { orientation } = useTimeline();
|
|
3429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3430
|
+
"li",
|
|
3431
|
+
{
|
|
3432
|
+
ref,
|
|
3433
|
+
"data-orientation": orientation,
|
|
3434
|
+
className: cn(
|
|
3435
|
+
"flex gap-4",
|
|
3436
|
+
orientation === "horizontal" && "flex-col",
|
|
3437
|
+
className
|
|
3438
|
+
),
|
|
3439
|
+
...props
|
|
3440
|
+
}
|
|
3441
|
+
);
|
|
3442
|
+
});
|
|
3443
|
+
TimelineItem.displayName = "TimelineItem";
|
|
3444
|
+
var TimelineSeparator = React33.forwardRef(({ className, ...props }, ref) => {
|
|
3445
|
+
const { orientation } = useTimeline();
|
|
3446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3447
|
+
"div",
|
|
3448
|
+
{
|
|
3449
|
+
ref,
|
|
3450
|
+
"data-orientation": orientation,
|
|
3451
|
+
className: cn(
|
|
3452
|
+
"flex items-center",
|
|
3453
|
+
orientation === "vertical" && "flex-col",
|
|
3454
|
+
className
|
|
3455
|
+
),
|
|
3456
|
+
...props
|
|
3457
|
+
}
|
|
3458
|
+
);
|
|
3459
|
+
});
|
|
3460
|
+
TimelineSeparator.displayName = "TimelineSeparator";
|
|
3461
|
+
var TimelineDot = React33.forwardRef(({ variant = "default", className, ...props }, ref) => {
|
|
3462
|
+
const { orientation } = useTimeline();
|
|
3463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3464
|
+
"div",
|
|
3465
|
+
{
|
|
3466
|
+
ref,
|
|
3467
|
+
"data-orientation": orientation,
|
|
3468
|
+
className: cn(
|
|
3469
|
+
"flex size-4 items-center justify-center empty:after:block empty:after:rounded-full empty:after:outline-current [&_svg]:size-4",
|
|
3470
|
+
orientation === "vertical" && "mt-1",
|
|
3471
|
+
variant === "default" && "empty:after:size-2.5 empty:after:bg-current",
|
|
3472
|
+
variant === "outline-solid" && "empty:after:size-2 empty:after:outline-solid",
|
|
3473
|
+
className
|
|
3474
|
+
),
|
|
3475
|
+
...props
|
|
3476
|
+
}
|
|
3477
|
+
);
|
|
3478
|
+
});
|
|
3479
|
+
TimelineDot.displayName = "TimelineDot";
|
|
3480
|
+
var TimelineConnector = React33.forwardRef(({ className, ...props }, ref) => {
|
|
3481
|
+
const { orientation } = useTimeline();
|
|
3482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3483
|
+
"div",
|
|
3484
|
+
{
|
|
3485
|
+
ref,
|
|
3486
|
+
"data-orientation": orientation,
|
|
3487
|
+
className: cn(
|
|
3488
|
+
"flex-1 bg-border",
|
|
3489
|
+
orientation === "vertical" && "my-2 w-0.5",
|
|
3490
|
+
orientation === "horizontal" && "mx-2 h-0.5",
|
|
3491
|
+
className
|
|
3492
|
+
),
|
|
3493
|
+
...props
|
|
3494
|
+
}
|
|
3495
|
+
);
|
|
3496
|
+
});
|
|
3497
|
+
TimelineConnector.displayName = "TimelineConnector";
|
|
3498
|
+
var TimelineContent = React33.forwardRef(({ className, ...props }, ref) => {
|
|
3499
|
+
const { orientation } = useTimeline();
|
|
3500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3501
|
+
"div",
|
|
3502
|
+
{
|
|
3503
|
+
ref,
|
|
3504
|
+
"data-orientation": orientation,
|
|
3505
|
+
className: cn(
|
|
3506
|
+
"flex-1",
|
|
3507
|
+
orientation === "vertical" && "pb-8 first:text-right last:text-left",
|
|
3508
|
+
orientation === "horizontal" && "pr-8",
|
|
3509
|
+
className
|
|
3510
|
+
),
|
|
3511
|
+
...props
|
|
3512
|
+
}
|
|
3513
|
+
);
|
|
3514
|
+
});
|
|
3515
|
+
TimelineContent.displayName = "TimelineContent";
|
|
3516
|
+
var TimelineTitle = React33.forwardRef((props, ref) => {
|
|
3517
|
+
const { orientation } = useTimeline();
|
|
3518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { ref, "data-orientation": orientation, ...props });
|
|
3519
|
+
});
|
|
3520
|
+
TimelineTitle.displayName = "TimelineTitle";
|
|
3521
|
+
var TimelineDescription = React33.forwardRef(({ className, ...props }, ref) => {
|
|
3522
|
+
const { orientation } = useTimeline();
|
|
3523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3524
|
+
"div",
|
|
3525
|
+
{
|
|
3526
|
+
ref,
|
|
3527
|
+
"data-orientation": orientation,
|
|
3528
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
3529
|
+
...props
|
|
3530
|
+
}
|
|
3531
|
+
);
|
|
3532
|
+
});
|
|
3533
|
+
TimelineDescription.displayName = "TimelineDescription";
|
|
3534
|
+
|
|
3535
|
+
// src/components/tooltip.tsx
|
|
3536
|
+
var React34 = __toESM(require("react"));
|
|
3537
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
3538
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3539
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3540
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
3541
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3542
|
+
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3543
|
+
TooltipPrimitive.Content,
|
|
3544
|
+
{
|
|
3545
|
+
ref,
|
|
3546
|
+
sideOffset,
|
|
3547
|
+
className: cn(
|
|
3548
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
3549
|
+
className
|
|
3550
|
+
),
|
|
3551
|
+
...props
|
|
3552
|
+
}
|
|
3553
|
+
));
|
|
3554
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3555
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3556
|
+
0 && (module.exports = {
|
|
3557
|
+
Accordion,
|
|
3558
|
+
AccordionContent,
|
|
3559
|
+
AccordionItem,
|
|
3560
|
+
AccordionTrigger,
|
|
3561
|
+
AlertDialog,
|
|
3562
|
+
AlertDialogBackdrop,
|
|
3563
|
+
AlertDialogClose,
|
|
3564
|
+
AlertDialogContent,
|
|
3565
|
+
AlertDialogDescription,
|
|
3566
|
+
AlertDialogFooter,
|
|
3567
|
+
AlertDialogHeader,
|
|
3568
|
+
AlertDialogOverlay,
|
|
3569
|
+
AlertDialogPopup,
|
|
3570
|
+
AlertDialogPortal,
|
|
3571
|
+
AlertDialogTitle,
|
|
3572
|
+
AlertDialogTrigger,
|
|
3573
|
+
Avatar,
|
|
3574
|
+
AvatarFallback,
|
|
3575
|
+
AvatarImage,
|
|
3576
|
+
Badge,
|
|
3577
|
+
Breadcrumb,
|
|
3578
|
+
BreadcrumbEllipsis,
|
|
3579
|
+
BreadcrumbItem,
|
|
3580
|
+
BreadcrumbLink,
|
|
3581
|
+
BreadcrumbList,
|
|
3582
|
+
BreadcrumbPage,
|
|
3583
|
+
BreadcrumbSeparator,
|
|
3584
|
+
Button,
|
|
3585
|
+
Card,
|
|
3586
|
+
CardContent,
|
|
3587
|
+
CardDescription,
|
|
3588
|
+
CardFooter,
|
|
3589
|
+
CardHeader,
|
|
3590
|
+
CardTitle,
|
|
3591
|
+
Checkbox,
|
|
3592
|
+
Combobox,
|
|
3593
|
+
ComboboxChip,
|
|
3594
|
+
ComboboxChips,
|
|
3595
|
+
ComboboxClear,
|
|
3596
|
+
ComboboxCollection,
|
|
3597
|
+
ComboboxEmpty,
|
|
3598
|
+
ComboboxGroup,
|
|
3599
|
+
ComboboxGroupLabel,
|
|
3600
|
+
ComboboxInput,
|
|
3601
|
+
ComboboxItem,
|
|
3602
|
+
ComboboxList,
|
|
3603
|
+
ComboboxMulti,
|
|
3604
|
+
ComboboxPopup,
|
|
3605
|
+
ComboboxRow,
|
|
3606
|
+
ComboboxSeparator,
|
|
3607
|
+
ComboboxStatus,
|
|
3608
|
+
ComboboxTrigger,
|
|
3609
|
+
ComboboxValue,
|
|
3610
|
+
Command,
|
|
3611
|
+
CommandDialog,
|
|
3612
|
+
CommandEmpty,
|
|
3613
|
+
CommandGroup,
|
|
3614
|
+
CommandInput,
|
|
3615
|
+
CommandItem,
|
|
3616
|
+
CommandList,
|
|
3617
|
+
CommandSeparator,
|
|
3618
|
+
CommandShortcut,
|
|
3619
|
+
ConfirmDialog,
|
|
3620
|
+
CopyButton,
|
|
3621
|
+
CountryPicker,
|
|
3622
|
+
Dialog,
|
|
3623
|
+
DialogBackdrop,
|
|
3624
|
+
DialogClose,
|
|
3625
|
+
DialogContent,
|
|
3626
|
+
DialogDescription,
|
|
3627
|
+
DialogFooter,
|
|
3628
|
+
DialogHeader,
|
|
3629
|
+
DialogOverlay,
|
|
3630
|
+
DialogPopup,
|
|
3631
|
+
DialogPortal,
|
|
3632
|
+
DialogTitle,
|
|
3633
|
+
DialogTrigger,
|
|
3634
|
+
Drawer,
|
|
3635
|
+
DrawerClose,
|
|
3636
|
+
DrawerContent,
|
|
3637
|
+
DrawerDescription,
|
|
3638
|
+
DrawerFooter,
|
|
3639
|
+
DrawerHeader,
|
|
3640
|
+
DrawerOverlay,
|
|
3641
|
+
DrawerPortal,
|
|
3642
|
+
DrawerTitle,
|
|
3643
|
+
DrawerTrigger,
|
|
3644
|
+
DropdownMenu,
|
|
3645
|
+
DropdownMenuCheckboxItem,
|
|
3646
|
+
DropdownMenuContent,
|
|
3647
|
+
DropdownMenuGroup,
|
|
3648
|
+
DropdownMenuItem,
|
|
3649
|
+
DropdownMenuLabel,
|
|
3650
|
+
DropdownMenuPortal,
|
|
3651
|
+
DropdownMenuRadioGroup,
|
|
3652
|
+
DropdownMenuRadioItem,
|
|
3653
|
+
DropdownMenuSeparator,
|
|
3654
|
+
DropdownMenuShortcut,
|
|
3655
|
+
DropdownMenuSub,
|
|
3656
|
+
DropdownMenuSubContent,
|
|
3657
|
+
DropdownMenuSubTrigger,
|
|
3658
|
+
DropdownMenuTrigger,
|
|
3659
|
+
FancyButton,
|
|
3660
|
+
Field,
|
|
3661
|
+
FieldControl,
|
|
3662
|
+
FieldDescription,
|
|
3663
|
+
FieldError,
|
|
3664
|
+
FieldLabel,
|
|
3665
|
+
FieldValidity,
|
|
3666
|
+
Form,
|
|
3667
|
+
FormControl,
|
|
3668
|
+
FormDescription,
|
|
3669
|
+
FormField,
|
|
3670
|
+
FormItem,
|
|
3671
|
+
FormLabel,
|
|
3672
|
+
FormMessage,
|
|
3673
|
+
Icon,
|
|
3674
|
+
Input,
|
|
3675
|
+
InputOTP,
|
|
3676
|
+
InputOTPGroup,
|
|
3677
|
+
InputOTPSeparator,
|
|
3678
|
+
InputOTPSlot,
|
|
3679
|
+
Label,
|
|
3680
|
+
MultiSelect,
|
|
3681
|
+
Popover,
|
|
3682
|
+
PopoverContent,
|
|
3683
|
+
PopoverTrigger,
|
|
3684
|
+
Progress,
|
|
3685
|
+
Root,
|
|
3686
|
+
ScrollArea,
|
|
3687
|
+
ScrollBar,
|
|
3688
|
+
Select,
|
|
3689
|
+
SelectContent,
|
|
3690
|
+
SelectGroup,
|
|
3691
|
+
SelectItem,
|
|
3692
|
+
SelectLabel,
|
|
3693
|
+
SelectScrollDownButton,
|
|
3694
|
+
SelectScrollUpButton,
|
|
3695
|
+
SelectSeparator,
|
|
3696
|
+
SelectTrigger,
|
|
3697
|
+
SelectValue,
|
|
3698
|
+
Separator,
|
|
3699
|
+
Sheet,
|
|
3700
|
+
SheetClose,
|
|
3701
|
+
SheetContent,
|
|
3702
|
+
SheetDescription,
|
|
3703
|
+
SheetFooter,
|
|
3704
|
+
SheetHeader,
|
|
3705
|
+
SheetOverlay,
|
|
3706
|
+
SheetPortal,
|
|
3707
|
+
SheetTitle,
|
|
3708
|
+
SheetTrigger,
|
|
3709
|
+
Skeleton,
|
|
3710
|
+
StatusIndicator,
|
|
3711
|
+
Switch,
|
|
3712
|
+
Table,
|
|
3713
|
+
TableBody,
|
|
3714
|
+
TableCaption,
|
|
3715
|
+
TableCell,
|
|
3716
|
+
TableFooter,
|
|
3717
|
+
TableHead,
|
|
3718
|
+
TableHeader,
|
|
3719
|
+
TableRow,
|
|
3720
|
+
Tabs,
|
|
3721
|
+
TabsContent,
|
|
3722
|
+
TabsList,
|
|
3723
|
+
TabsTrigger,
|
|
3724
|
+
Textarea,
|
|
3725
|
+
Timeline,
|
|
3726
|
+
TimelineConnector,
|
|
3727
|
+
TimelineContent,
|
|
3728
|
+
TimelineDescription,
|
|
3729
|
+
TimelineDot,
|
|
3730
|
+
TimelineItem,
|
|
3731
|
+
TimelineSeparator,
|
|
3732
|
+
TimelineTitle,
|
|
3733
|
+
Tooltip,
|
|
3734
|
+
TooltipContent,
|
|
3735
|
+
TooltipProvider,
|
|
3736
|
+
TooltipTrigger,
|
|
3737
|
+
badgeVariants,
|
|
3738
|
+
buttonVariants,
|
|
3739
|
+
cn,
|
|
3740
|
+
statusIndicatorVariants,
|
|
3741
|
+
tv,
|
|
3742
|
+
useComboboxFilter,
|
|
3743
|
+
useFormField
|
|
3744
|
+
});
|