@web-my-money/primitives 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/index.d.mts +9 -0
- package/dist/accordion/index.d.ts +9 -0
- package/dist/accordion/index.js +99 -0
- package/dist/accordion/index.mjs +14 -0
- package/dist/alert-dialog/index.d.mts +22 -0
- package/dist/alert-dialog/index.d.ts +22 -0
- package/dist/alert-dialog/index.js +206 -0
- package/dist/alert-dialog/index.mjs +29 -0
- package/dist/avatar/index.d.mts +23 -0
- package/dist/avatar/index.d.ts +23 -0
- package/dist/avatar/index.js +133 -0
- package/dist/avatar/index.mjs +10 -0
- package/dist/badge/index.d.mts +15 -0
- package/dist/badge/index.d.ts +15 -0
- package/dist/badge/index.js +96 -0
- package/dist/badge/index.mjs +10 -0
- package/dist/breadcrumb/index.d.mts +20 -0
- package/dist/breadcrumb/index.d.ts +20 -0
- package/dist/breadcrumb/index.js +126 -0
- package/dist/breadcrumb/index.mjs +20 -0
- package/dist/button/index.d.mts +12 -0
- package/dist/button/index.d.ts +12 -0
- package/dist/button/index.js +88 -0
- package/dist/button/index.mjs +10 -0
- package/dist/calendar/index.d.mts +29 -0
- package/dist/calendar/index.d.ts +29 -0
- package/dist/calendar/index.js +191 -0
- package/dist/calendar/index.mjs +9 -0
- package/dist/card/index.d.mts +13 -0
- package/dist/card/index.d.ts +13 -0
- package/dist/card/index.js +141 -0
- package/dist/card/index.mjs +19 -0
- package/dist/carousel/index.d.mts +20 -0
- package/dist/carousel/index.d.ts +20 -0
- package/dist/carousel/index.js +236 -0
- package/dist/carousel/index.mjs +19 -0
- package/dist/checkbox/index.d.mts +6 -0
- package/dist/checkbox/index.d.ts +6 -0
- package/dist/checkbox/index.js +63 -0
- package/dist/checkbox/index.mjs +8 -0
- package/dist/chunk-32LEHNCH.mjs +155 -0
- package/dist/chunk-3ZJ4L43B.mjs +92 -0
- package/dist/chunk-4KQNZMKT.mjs +47 -0
- package/dist/chunk-4W6U222X.mjs +113 -0
- package/dist/chunk-556SM2PJ.mjs +40 -0
- package/dist/chunk-5LYTCNI6.mjs +127 -0
- package/dist/chunk-5N7LGYZK.mjs +137 -0
- package/dist/chunk-6OG237U6.mjs +54 -0
- package/dist/chunk-7TMIJ7HZ.mjs +149 -0
- package/dist/chunk-DTENOVQN.mjs +44 -0
- package/dist/chunk-DUGW62XX.mjs +143 -0
- package/dist/chunk-DWLKKYIU.mjs +156 -0
- package/dist/chunk-DYCSGLM5.mjs +32 -0
- package/dist/chunk-DZPJV6MN.mjs +66 -0
- package/dist/chunk-FT72MNAV.mjs +25 -0
- package/dist/chunk-FV6JTZAK.mjs +30 -0
- package/dist/chunk-GLD4KQD3.mjs +90 -0
- package/dist/chunk-GWVW5OI6.mjs +106 -0
- package/dist/chunk-JWCA4M7E.mjs +160 -0
- package/dist/chunk-K4UYYX45.mjs +199 -0
- package/dist/chunk-KVQKOJNU.mjs +52 -0
- package/dist/chunk-LPMRBQLR.mjs +120 -0
- package/dist/chunk-M6HSM6GV.mjs +68 -0
- package/dist/chunk-NE5LEVMC.mjs +201 -0
- package/dist/chunk-NGWDLZ6E.mjs +33 -0
- package/dist/chunk-NH5ZVHAV.mjs +36 -0
- package/dist/chunk-PFXSPRVI.mjs +65 -0
- package/dist/chunk-PJO7WJ4G.mjs +10 -0
- package/dist/chunk-PTXZWR7Y.mjs +76 -0
- package/dist/chunk-SG747CBC.mjs +34 -0
- package/dist/chunk-UDQDW22Y.mjs +71 -0
- package/dist/chunk-UGOA6M4S.mjs +120 -0
- package/dist/chunk-UXU54FBX.mjs +63 -0
- package/dist/chunk-WYBX5VJ4.mjs +49 -0
- package/dist/chunk-Y7DNVOKO.mjs +57 -0
- package/dist/chunk-YNOS3JA2.mjs +29 -0
- package/dist/chunk-YPTARV3T.mjs +57 -0
- package/dist/chunk-YYFQVSPV.mjs +17 -0
- package/dist/chunk-ZR3J34NX.mjs +85 -0
- package/dist/collapsible/index.d.mts +8 -0
- package/dist/collapsible/index.d.ts +8 -0
- package/dist/collapsible/index.js +64 -0
- package/dist/collapsible/index.mjs +12 -0
- package/dist/combobox/index.d.mts +18 -0
- package/dist/combobox/index.d.ts +18 -0
- package/dist/combobox/index.js +198 -0
- package/dist/combobox/index.mjs +32 -0
- package/dist/context-menu/index.d.mts +16 -0
- package/dist/context-menu/index.d.ts +16 -0
- package/dist/context-menu/index.js +177 -0
- package/dist/context-menu/index.mjs +28 -0
- package/dist/date-range-input/index.d.mts +17 -0
- package/dist/date-range-input/index.d.ts +17 -0
- package/dist/date-range-input/index.js +284 -0
- package/dist/date-range-input/index.mjs +11 -0
- package/dist/dialog/index.d.mts +19 -0
- package/dist/dialog/index.d.ts +19 -0
- package/dist/dialog/index.js +240 -0
- package/dist/dialog/index.mjs +27 -0
- package/dist/dropdown-menu/index.d.mts +16 -0
- package/dist/dropdown-menu/index.d.ts +16 -0
- package/dist/dropdown-menu/index.js +189 -0
- package/dist/dropdown-menu/index.mjs +28 -0
- package/dist/field/index.d.mts +24 -0
- package/dist/field/index.d.ts +24 -0
- package/dist/field/index.js +88 -0
- package/dist/field/index.mjs +16 -0
- package/dist/hover-card/index.d.mts +8 -0
- package/dist/hover-card/index.d.ts +8 -0
- package/dist/hover-card/index.js +79 -0
- package/dist/hover-card/index.mjs +12 -0
- package/dist/index.d.mts +73 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +3167 -0
- package/dist/index.mjs +452 -0
- package/dist/input/index.d.mts +5 -0
- package/dist/input/index.d.ts +5 -0
- package/dist/input/index.js +54 -0
- package/dist/input/index.mjs +7 -0
- package/dist/kbd/index.d.mts +8 -0
- package/dist/kbd/index.d.ts +8 -0
- package/dist/kbd/index.js +64 -0
- package/dist/kbd/index.mjs +9 -0
- package/dist/lightbox/index.d.mts +17 -0
- package/dist/lightbox/index.d.ts +17 -0
- package/dist/lightbox/index.js +151 -0
- package/dist/lightbox/index.mjs +24 -0
- package/dist/pagination/index.d.mts +33 -0
- package/dist/pagination/index.d.ts +33 -0
- package/dist/pagination/index.js +212 -0
- package/dist/pagination/index.mjs +25 -0
- package/dist/popover/index.d.mts +11 -0
- package/dist/popover/index.d.ts +11 -0
- package/dist/popover/index.js +120 -0
- package/dist/popover/index.mjs +18 -0
- package/dist/progress/index.d.mts +6 -0
- package/dist/progress/index.d.ts +6 -0
- package/dist/progress/index.js +60 -0
- package/dist/progress/index.mjs +8 -0
- package/dist/radio-group/index.d.mts +8 -0
- package/dist/radio-group/index.d.ts +8 -0
- package/dist/radio-group/index.js +71 -0
- package/dist/radio-group/index.mjs +10 -0
- package/dist/resizable/index.d.mts +10 -0
- package/dist/resizable/index.d.ts +10 -0
- package/dist/resizable/index.js +80 -0
- package/dist/resizable/index.mjs +12 -0
- package/dist/scroll-area/index.d.mts +6 -0
- package/dist/scroll-area/index.d.ts +6 -0
- package/dist/scroll-area/index.js +74 -0
- package/dist/scroll-area/index.mjs +8 -0
- package/dist/select/index.d.mts +17 -0
- package/dist/select/index.d.ts +17 -0
- package/dist/select/index.js +238 -0
- package/dist/select/index.mjs +26 -0
- package/dist/separator/index.d.mts +6 -0
- package/dist/separator/index.d.ts +6 -0
- package/dist/separator/index.js +59 -0
- package/dist/separator/index.mjs +8 -0
- package/dist/sheet/index.d.mts +38 -0
- package/dist/sheet/index.d.ts +38 -0
- package/dist/sheet/index.js +212 -0
- package/dist/sheet/index.mjs +27 -0
- package/dist/skeleton/index.d.mts +17 -0
- package/dist/skeleton/index.d.ts +17 -0
- package/dist/skeleton/index.js +80 -0
- package/dist/skeleton/index.mjs +11 -0
- package/dist/slide-over/index.d.mts +92 -0
- package/dist/slide-over/index.d.ts +92 -0
- package/dist/slide-over/index.js +298 -0
- package/dist/slide-over/index.mjs +31 -0
- package/dist/slider/index.d.mts +6 -0
- package/dist/slider/index.d.ts +6 -0
- package/dist/slider/index.js +47 -0
- package/dist/slider/index.mjs +8 -0
- package/dist/switch/index.d.mts +8 -0
- package/dist/switch/index.d.ts +8 -0
- package/dist/switch/index.js +66 -0
- package/dist/switch/index.mjs +8 -0
- package/dist/tabs/index.d.mts +9 -0
- package/dist/tabs/index.d.ts +9 -0
- package/dist/tabs/index.js +96 -0
- package/dist/tabs/index.mjs +14 -0
- package/dist/toast/index.d.mts +19 -0
- package/dist/toast/index.d.ts +19 -0
- package/dist/toast/index.js +107 -0
- package/dist/toast/index.mjs +10 -0
- package/dist/toggle/index.d.mts +14 -0
- package/dist/toggle/index.d.ts +14 -0
- package/dist/toggle/index.js +89 -0
- package/dist/toggle/index.mjs +12 -0
- package/dist/tooltip/index.d.mts +9 -0
- package/dist/tooltip/index.d.ts +9 -0
- package/dist/tooltip/index.js +101 -0
- package/dist/tooltip/index.mjs +14 -0
- package/package.json +235 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3167 @@
|
|
|
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
|
+
AlertDialogAction: () => AlertDialogAction,
|
|
39
|
+
AlertDialogCancel: () => AlertDialogCancel,
|
|
40
|
+
AlertDialogContent: () => AlertDialogContent,
|
|
41
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
42
|
+
AlertDialogFooter: () => AlertDialogFooter,
|
|
43
|
+
AlertDialogHeader: () => AlertDialogHeader,
|
|
44
|
+
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
45
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
46
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
47
|
+
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
48
|
+
Avatar: () => Avatar,
|
|
49
|
+
AvatarGroup: () => AvatarGroup,
|
|
50
|
+
Badge: () => Badge,
|
|
51
|
+
Breadcrumb: () => Breadcrumb,
|
|
52
|
+
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
|
53
|
+
BreadcrumbItem: () => BreadcrumbItem,
|
|
54
|
+
BreadcrumbLink: () => BreadcrumbLink,
|
|
55
|
+
BreadcrumbList: () => BreadcrumbList,
|
|
56
|
+
BreadcrumbPage: () => BreadcrumbPage,
|
|
57
|
+
BreadcrumbSeparator: () => BreadcrumbSeparator,
|
|
58
|
+
Button: () => Button,
|
|
59
|
+
Calendar: () => Calendar,
|
|
60
|
+
Card: () => Card,
|
|
61
|
+
CardAction: () => CardAction,
|
|
62
|
+
CardContent: () => CardContent,
|
|
63
|
+
CardDescription: () => CardDescription,
|
|
64
|
+
CardFooter: () => CardFooter,
|
|
65
|
+
CardHeader: () => CardHeader,
|
|
66
|
+
CardTitle: () => CardTitle,
|
|
67
|
+
Carousel: () => Carousel,
|
|
68
|
+
CarouselContent: () => CarouselContent,
|
|
69
|
+
CarouselItem: () => CarouselItem,
|
|
70
|
+
CarouselNext: () => CarouselNext,
|
|
71
|
+
CarouselPrevious: () => CarouselPrevious,
|
|
72
|
+
Checkbox: () => Checkbox,
|
|
73
|
+
Collapsible: () => Collapsible,
|
|
74
|
+
CollapsibleContent: () => CollapsibleContent,
|
|
75
|
+
CollapsibleTrigger: () => CollapsibleTrigger,
|
|
76
|
+
Combobox: () => Combobox,
|
|
77
|
+
ComboboxClear: () => ComboboxClear,
|
|
78
|
+
ComboboxEmpty: () => ComboboxEmpty,
|
|
79
|
+
ComboboxGroup: () => ComboboxGroup,
|
|
80
|
+
ComboboxGroupLabel: () => ComboboxGroupLabel,
|
|
81
|
+
ComboboxInput: () => ComboboxInput,
|
|
82
|
+
ComboboxInputGroup: () => ComboboxInputGroup,
|
|
83
|
+
ComboboxItem: () => ComboboxItem,
|
|
84
|
+
ComboboxList: () => ComboboxList,
|
|
85
|
+
ComboboxPopup: () => ComboboxPopup,
|
|
86
|
+
ComboboxPortal: () => ComboboxPortal,
|
|
87
|
+
ComboboxPositioner: () => ComboboxPositioner,
|
|
88
|
+
ComboboxTrigger: () => ComboboxTrigger,
|
|
89
|
+
ContextMenu: () => ContextMenu,
|
|
90
|
+
ContextMenuCheckboxItem: () => ContextMenuCheckboxItem,
|
|
91
|
+
ContextMenuContent: () => ContextMenuContent,
|
|
92
|
+
ContextMenuGroup: () => ContextMenuGroup,
|
|
93
|
+
ContextMenuItem: () => ContextMenuItem,
|
|
94
|
+
ContextMenuLabel: () => ContextMenuLabel,
|
|
95
|
+
ContextMenuSeparator: () => ContextMenuSeparator,
|
|
96
|
+
ContextMenuSub: () => ContextMenuSub,
|
|
97
|
+
ContextMenuSubContent: () => ContextMenuSubContent,
|
|
98
|
+
ContextMenuSubTrigger: () => ContextMenuSubTrigger,
|
|
99
|
+
ContextMenuTrigger: () => ContextMenuTrigger,
|
|
100
|
+
DateRangeInput: () => DateRangeInput,
|
|
101
|
+
Dialog: () => Dialog,
|
|
102
|
+
DialogClose: () => DialogClose,
|
|
103
|
+
DialogContent: () => DialogContent,
|
|
104
|
+
DialogDescription: () => DialogDescription,
|
|
105
|
+
DialogFooter: () => DialogFooter,
|
|
106
|
+
DialogHeader: () => DialogHeader,
|
|
107
|
+
DialogOverlay: () => DialogOverlay,
|
|
108
|
+
DialogPortal: () => DialogPortal,
|
|
109
|
+
DialogTitle: () => DialogTitle,
|
|
110
|
+
DialogTrigger: () => DialogTrigger,
|
|
111
|
+
DropdownMenu: () => DropdownMenu,
|
|
112
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
113
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
114
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
115
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
116
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
117
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
118
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
119
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
120
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
121
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
122
|
+
Field: () => Field,
|
|
123
|
+
FieldControl: () => FieldControl,
|
|
124
|
+
FieldDescription: () => FieldDescription,
|
|
125
|
+
FieldError: () => FieldError,
|
|
126
|
+
FieldLabel: () => FieldLabel,
|
|
127
|
+
HoverCard: () => HoverCard,
|
|
128
|
+
HoverCardContent: () => HoverCardContent,
|
|
129
|
+
HoverCardTrigger: () => HoverCardTrigger,
|
|
130
|
+
Input: () => Input,
|
|
131
|
+
Kbd: () => Kbd,
|
|
132
|
+
KbdGroup: () => KbdGroup,
|
|
133
|
+
Lightbox: () => Lightbox,
|
|
134
|
+
LightboxCaption: () => LightboxCaption,
|
|
135
|
+
LightboxClose: () => LightboxClose,
|
|
136
|
+
LightboxContent: () => LightboxContent,
|
|
137
|
+
LightboxImage: () => LightboxImage,
|
|
138
|
+
LightboxNavButton: () => LightboxNavButton,
|
|
139
|
+
LightboxOverlay: () => LightboxOverlay,
|
|
140
|
+
LightboxPortal: () => LightboxPortal,
|
|
141
|
+
LightboxTrigger: () => LightboxTrigger,
|
|
142
|
+
Pagination: () => Pagination,
|
|
143
|
+
PaginationBar: () => PaginationBar,
|
|
144
|
+
PaginationContent: () => PaginationContent,
|
|
145
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
146
|
+
PaginationItem: () => PaginationItem,
|
|
147
|
+
PaginationLink: () => PaginationLink,
|
|
148
|
+
PaginationNext: () => PaginationNext,
|
|
149
|
+
PaginationPrevious: () => PaginationPrevious,
|
|
150
|
+
Popover: () => Popover,
|
|
151
|
+
PopoverContent: () => PopoverContent,
|
|
152
|
+
PopoverDescription: () => PopoverDescription,
|
|
153
|
+
PopoverHeader: () => PopoverHeader,
|
|
154
|
+
PopoverTitle: () => PopoverTitle,
|
|
155
|
+
PopoverTrigger: () => PopoverTrigger,
|
|
156
|
+
Progress: () => Progress,
|
|
157
|
+
RadioGroup: () => RadioGroup,
|
|
158
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
159
|
+
ResizableHandle: () => ResizableHandle,
|
|
160
|
+
ResizablePanel: () => ResizablePanel,
|
|
161
|
+
ResizablePanelGroup: () => ResizablePanelGroup,
|
|
162
|
+
ScrollArea: () => ScrollArea,
|
|
163
|
+
Select: () => Select,
|
|
164
|
+
SelectContent: () => SelectContent,
|
|
165
|
+
SelectGroup: () => SelectGroup,
|
|
166
|
+
SelectItem: () => SelectItem,
|
|
167
|
+
SelectLabel: () => SelectLabel,
|
|
168
|
+
SelectScrollDownButton: () => SelectScrollDownButton,
|
|
169
|
+
SelectScrollUpButton: () => SelectScrollUpButton,
|
|
170
|
+
SelectSeparator: () => SelectSeparator,
|
|
171
|
+
SelectTrigger: () => SelectTrigger,
|
|
172
|
+
SelectValue: () => SelectValue,
|
|
173
|
+
Separator: () => Separator,
|
|
174
|
+
Sheet: () => Sheet,
|
|
175
|
+
SheetClose: () => SheetClose,
|
|
176
|
+
SheetContent: () => SheetContent,
|
|
177
|
+
SheetDescription: () => SheetDescription,
|
|
178
|
+
SheetFooter: () => SheetFooter,
|
|
179
|
+
SheetHeader: () => SheetHeader,
|
|
180
|
+
SheetOverlay: () => SheetOverlay,
|
|
181
|
+
SheetPortal: () => SheetPortal,
|
|
182
|
+
SheetTitle: () => SheetTitle,
|
|
183
|
+
SheetTrigger: () => SheetTrigger,
|
|
184
|
+
Skeleton: () => Skeleton,
|
|
185
|
+
SkeletonCard: () => SkeletonCard,
|
|
186
|
+
SkeletonRow: () => SkeletonRow,
|
|
187
|
+
SlideOver: () => SlideOver,
|
|
188
|
+
SlideOverClose: () => SlideOverClose,
|
|
189
|
+
SlideOverColumns: () => SlideOverColumns,
|
|
190
|
+
SlideOverContent: () => SlideOverContent,
|
|
191
|
+
SlideOverDescription: () => SlideOverDescription,
|
|
192
|
+
SlideOverFooter: () => SlideOverFooter,
|
|
193
|
+
SlideOverHeader: () => SlideOverHeader,
|
|
194
|
+
SlideOverOverlay: () => SlideOverOverlay,
|
|
195
|
+
SlideOverPortal: () => SlideOverPortal,
|
|
196
|
+
SlideOverTitle: () => SlideOverTitle,
|
|
197
|
+
SlideOverTrigger: () => SlideOverTrigger,
|
|
198
|
+
Slider: () => Slider,
|
|
199
|
+
Switch: () => Switch,
|
|
200
|
+
Tabs: () => Tabs,
|
|
201
|
+
TabsContent: () => TabsContent,
|
|
202
|
+
TabsList: () => TabsList,
|
|
203
|
+
TabsTrigger: () => TabsTrigger,
|
|
204
|
+
ToastProvider: () => ToastProvider,
|
|
205
|
+
Toggle: () => Toggle,
|
|
206
|
+
ToggleGroup: () => ToggleGroup,
|
|
207
|
+
Tooltip: () => Tooltip,
|
|
208
|
+
TooltipContent: () => TooltipContent,
|
|
209
|
+
TooltipProvider: () => TooltipProvider,
|
|
210
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
211
|
+
badgeVariants: () => badgeVariants,
|
|
212
|
+
buttonVariants: () => buttonVariants,
|
|
213
|
+
cn: () => cn,
|
|
214
|
+
getPaginationRange: () => getPaginationRange,
|
|
215
|
+
toggleVariants: () => toggleVariants,
|
|
216
|
+
useCarousel: () => useCarousel,
|
|
217
|
+
useRecordNav: () => useRecordNav,
|
|
218
|
+
useToast: () => useToast
|
|
219
|
+
});
|
|
220
|
+
module.exports = __toCommonJS(index_exports);
|
|
221
|
+
|
|
222
|
+
// src/utils.ts
|
|
223
|
+
var import_clsx = require("clsx");
|
|
224
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
225
|
+
function cn(...inputs) {
|
|
226
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// src/badge/index.tsx
|
|
230
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
231
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
232
|
+
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
233
|
+
"inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors border select-none",
|
|
234
|
+
{
|
|
235
|
+
variants: {
|
|
236
|
+
variant: {
|
|
237
|
+
default: "border-transparent bg-primary/15 text-primary",
|
|
238
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
239
|
+
outline: "border-border text-foreground bg-transparent",
|
|
240
|
+
success: "border-transparent bg-emerald-500/15 text-emerald-500",
|
|
241
|
+
warning: "border-transparent bg-amber-500/15 text-amber-500",
|
|
242
|
+
destructive: "border-transparent bg-red-500/15 text-red-500",
|
|
243
|
+
info: "border-transparent bg-sky-500/15 text-sky-500"
|
|
244
|
+
},
|
|
245
|
+
size: {
|
|
246
|
+
sm: "px-2 py-px text-[10px]",
|
|
247
|
+
default: "px-2.5 py-0.5 text-xs",
|
|
248
|
+
lg: "px-3 py-1 text-sm"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
defaultVariants: {
|
|
252
|
+
variant: "default",
|
|
253
|
+
size: "default"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
var dotColors = {
|
|
258
|
+
default: "bg-primary",
|
|
259
|
+
secondary: "bg-secondary-foreground",
|
|
260
|
+
outline: "bg-foreground",
|
|
261
|
+
success: "bg-emerald-500",
|
|
262
|
+
warning: "bg-amber-500",
|
|
263
|
+
destructive: "bg-red-500",
|
|
264
|
+
info: "bg-sky-500"
|
|
265
|
+
};
|
|
266
|
+
function Badge({
|
|
267
|
+
className,
|
|
268
|
+
variant = "default",
|
|
269
|
+
size,
|
|
270
|
+
dot,
|
|
271
|
+
children,
|
|
272
|
+
...props
|
|
273
|
+
}) {
|
|
274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: cn(badgeVariants({ variant, size }), className), ...props, children: [
|
|
275
|
+
dot && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
276
|
+
"span",
|
|
277
|
+
{
|
|
278
|
+
"aria-hidden": true,
|
|
279
|
+
className: cn("inline-block size-1.5 rounded-full shrink-0", dotColors[variant ?? "default"])
|
|
280
|
+
}
|
|
281
|
+
),
|
|
282
|
+
children
|
|
283
|
+
] });
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// src/avatar/index.tsx
|
|
287
|
+
var React = __toESM(require("react"));
|
|
288
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
289
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
290
|
+
var avatarVariants = (0, import_class_variance_authority2.cva)(
|
|
291
|
+
"relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted font-medium select-none",
|
|
292
|
+
{
|
|
293
|
+
variants: {
|
|
294
|
+
size: {
|
|
295
|
+
xs: "size-6 text-[10px]",
|
|
296
|
+
sm: "size-8 text-xs",
|
|
297
|
+
default: "size-10 text-sm",
|
|
298
|
+
lg: "size-12 text-base",
|
|
299
|
+
xl: "size-16 text-lg"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
defaultVariants: { size: "default" }
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
function getInitials(text) {
|
|
306
|
+
if (!text) return "?";
|
|
307
|
+
const words = text.trim().split(/\s+/);
|
|
308
|
+
if (words.length === 1) return words[0].slice(0, 2).toUpperCase();
|
|
309
|
+
return (words[0][0] + words[words.length - 1][0]).toUpperCase();
|
|
310
|
+
}
|
|
311
|
+
function Avatar({
|
|
312
|
+
className,
|
|
313
|
+
size,
|
|
314
|
+
src,
|
|
315
|
+
alt,
|
|
316
|
+
initials,
|
|
317
|
+
...props
|
|
318
|
+
}) {
|
|
319
|
+
const [imgError, setImgError] = React.useState(false);
|
|
320
|
+
const showImg = src && !imgError;
|
|
321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: cn(avatarVariants({ size }), className), ...props, children: showImg ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
322
|
+
"img",
|
|
323
|
+
{
|
|
324
|
+
src,
|
|
325
|
+
alt: alt ?? "",
|
|
326
|
+
className: "absolute inset-0 size-full object-cover",
|
|
327
|
+
onError: () => setImgError(true)
|
|
328
|
+
}
|
|
329
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
330
|
+
"span",
|
|
331
|
+
{
|
|
332
|
+
"aria-label": alt,
|
|
333
|
+
className: "text-muted-foreground",
|
|
334
|
+
style: { lineHeight: 1 },
|
|
335
|
+
children: initials ?? getInitials(alt)
|
|
336
|
+
}
|
|
337
|
+
) });
|
|
338
|
+
}
|
|
339
|
+
function AvatarGroup({ avatars, max = 5, size = "sm", className }) {
|
|
340
|
+
const shown = avatars.slice(0, max);
|
|
341
|
+
const overflow = avatars.length - max;
|
|
342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: cn("flex items-center", className), children: [
|
|
343
|
+
shown.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
344
|
+
"span",
|
|
345
|
+
{
|
|
346
|
+
className: "ring-2 ring-background rounded-full",
|
|
347
|
+
style: { marginLeft: i === 0 ? 0 : "-0.5rem" },
|
|
348
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Avatar, { ...a, size })
|
|
349
|
+
},
|
|
350
|
+
i
|
|
351
|
+
)),
|
|
352
|
+
overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
353
|
+
"span",
|
|
354
|
+
{
|
|
355
|
+
className: cn(
|
|
356
|
+
avatarVariants({ size }),
|
|
357
|
+
"ring-2 ring-background text-muted-foreground bg-muted"
|
|
358
|
+
),
|
|
359
|
+
style: { marginLeft: "-0.5rem" },
|
|
360
|
+
"aria-label": `${overflow} more`,
|
|
361
|
+
children: [
|
|
362
|
+
"+",
|
|
363
|
+
overflow
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
)
|
|
367
|
+
] });
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// src/skeleton/index.tsx
|
|
371
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
372
|
+
function Skeleton({ className, shape, width, height, style, ...props }) {
|
|
373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
374
|
+
"div",
|
|
375
|
+
{
|
|
376
|
+
"aria-hidden": true,
|
|
377
|
+
className: cn(
|
|
378
|
+
"animate-pulse rounded-md bg-muted/60",
|
|
379
|
+
shape === "circle" && "rounded-full",
|
|
380
|
+
shape === "line" && "h-4",
|
|
381
|
+
className
|
|
382
|
+
),
|
|
383
|
+
style: {
|
|
384
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
385
|
+
height: typeof height === "number" ? `${height}px` : height,
|
|
386
|
+
...style
|
|
387
|
+
},
|
|
388
|
+
...props
|
|
389
|
+
}
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
function SkeletonCard({ className }) {
|
|
393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn("space-y-3 rounded-xl border border-border bg-card p-5", className), children: [
|
|
394
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { className: "h-4 w-2/5" }),
|
|
395
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { className: "h-8 w-3/5" }),
|
|
396
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { className: "h-3 w-4/5" }),
|
|
397
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { className: "h-3 w-1/2" })
|
|
398
|
+
] });
|
|
399
|
+
}
|
|
400
|
+
function SkeletonRow({ className }) {
|
|
401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn("flex items-center gap-3", className), children: [
|
|
402
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { shape: "circle", className: "size-9 shrink-0" }),
|
|
403
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
404
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { className: "h-3 w-2/3" }),
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { className: "h-3 w-1/3" })
|
|
406
|
+
] })
|
|
407
|
+
] });
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// src/tabs/index.tsx
|
|
411
|
+
var import_tabs = require("@base-ui/react/tabs");
|
|
412
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
413
|
+
var TabsList = ({
|
|
414
|
+
className,
|
|
415
|
+
...props
|
|
416
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
417
|
+
import_tabs.Tabs.List,
|
|
418
|
+
{
|
|
419
|
+
className: cn(
|
|
420
|
+
"inline-flex h-9 items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground",
|
|
421
|
+
className
|
|
422
|
+
),
|
|
423
|
+
...props
|
|
424
|
+
}
|
|
425
|
+
);
|
|
426
|
+
var TabsTrigger = ({
|
|
427
|
+
className,
|
|
428
|
+
...props
|
|
429
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
430
|
+
import_tabs.Tabs.Tab,
|
|
431
|
+
{
|
|
432
|
+
className: cn(
|
|
433
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium",
|
|
434
|
+
"transition-all outline-none select-none cursor-pointer",
|
|
435
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
436
|
+
"data-[selected]:bg-background data-[selected]:text-foreground data-[selected]:shadow-sm",
|
|
437
|
+
"hover:not-data-[selected]:text-foreground/80",
|
|
438
|
+
"focus-visible:ring-2 focus-visible:ring-ring",
|
|
439
|
+
className
|
|
440
|
+
),
|
|
441
|
+
...props
|
|
442
|
+
}
|
|
443
|
+
);
|
|
444
|
+
var TabsContent = ({
|
|
445
|
+
className,
|
|
446
|
+
...props
|
|
447
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
448
|
+
import_tabs.Tabs.Panel,
|
|
449
|
+
{
|
|
450
|
+
className: cn(
|
|
451
|
+
"mt-2 outline-none",
|
|
452
|
+
"focus-visible:ring-2 focus-visible:ring-ring rounded-md",
|
|
453
|
+
className
|
|
454
|
+
),
|
|
455
|
+
...props
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
var Tabs = ({
|
|
459
|
+
className,
|
|
460
|
+
...props
|
|
461
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tabs.Tabs.Root, { className: cn("flex flex-col gap-2", className), ...props });
|
|
462
|
+
|
|
463
|
+
// src/accordion/index.tsx
|
|
464
|
+
var import_accordion = require("@base-ui/react/accordion");
|
|
465
|
+
var import_lucide_react = require("lucide-react");
|
|
466
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
467
|
+
var Accordion = import_accordion.Accordion.Root;
|
|
468
|
+
var AccordionItem = ({
|
|
469
|
+
className,
|
|
470
|
+
...props
|
|
471
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
472
|
+
import_accordion.Accordion.Item,
|
|
473
|
+
{
|
|
474
|
+
className: cn("border-b border-border last:border-0", className),
|
|
475
|
+
...props
|
|
476
|
+
}
|
|
477
|
+
);
|
|
478
|
+
var AccordionTrigger = ({
|
|
479
|
+
className,
|
|
480
|
+
children,
|
|
481
|
+
...props
|
|
482
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
483
|
+
import_accordion.Accordion.Trigger,
|
|
484
|
+
{
|
|
485
|
+
className: cn(
|
|
486
|
+
"flex flex-1 cursor-pointer items-center justify-between py-4 text-sm font-medium",
|
|
487
|
+
"transition-all outline-none select-none",
|
|
488
|
+
"hover:underline hover:text-foreground",
|
|
489
|
+
"focus-visible:ring-2 focus-visible:ring-ring rounded-sm",
|
|
490
|
+
"[&[data-panel-open]>svg]:rotate-180",
|
|
491
|
+
className
|
|
492
|
+
),
|
|
493
|
+
...props,
|
|
494
|
+
children: [
|
|
495
|
+
children,
|
|
496
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
497
|
+
import_lucide_react.ChevronDown,
|
|
498
|
+
{
|
|
499
|
+
className: "size-4 shrink-0 text-muted-foreground transition-transform duration-200",
|
|
500
|
+
"aria-hidden": true
|
|
501
|
+
}
|
|
502
|
+
)
|
|
503
|
+
]
|
|
504
|
+
}
|
|
505
|
+
) });
|
|
506
|
+
var AccordionContent = ({
|
|
507
|
+
className,
|
|
508
|
+
children,
|
|
509
|
+
...props
|
|
510
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
511
|
+
import_accordion.Accordion.Panel,
|
|
512
|
+
{
|
|
513
|
+
className: "wmm-accordion-panel text-sm",
|
|
514
|
+
...props,
|
|
515
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cn("pb-4 pt-0 text-muted-foreground", className), children })
|
|
516
|
+
}
|
|
517
|
+
);
|
|
518
|
+
|
|
519
|
+
// src/field/index.tsx
|
|
520
|
+
var import_field = require("@base-ui/react/field");
|
|
521
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
522
|
+
var Field = ({
|
|
523
|
+
className,
|
|
524
|
+
...props
|
|
525
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_field.Field.Root, { className: cn("flex flex-col gap-1.5", className), ...props });
|
|
526
|
+
var FieldLabel = ({
|
|
527
|
+
className,
|
|
528
|
+
...props
|
|
529
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
530
|
+
import_field.Field.Label,
|
|
531
|
+
{
|
|
532
|
+
className: cn(
|
|
533
|
+
"text-sm font-medium text-foreground select-none",
|
|
534
|
+
"data-[disabled]:opacity-50",
|
|
535
|
+
className
|
|
536
|
+
),
|
|
537
|
+
...props
|
|
538
|
+
}
|
|
539
|
+
);
|
|
540
|
+
var FieldDescription = ({
|
|
541
|
+
className,
|
|
542
|
+
...props
|
|
543
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
544
|
+
import_field.Field.Description,
|
|
545
|
+
{
|
|
546
|
+
className: cn("text-xs text-muted-foreground", className),
|
|
547
|
+
...props
|
|
548
|
+
}
|
|
549
|
+
);
|
|
550
|
+
var FieldError = ({
|
|
551
|
+
className,
|
|
552
|
+
...props
|
|
553
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
554
|
+
import_field.Field.Error,
|
|
555
|
+
{
|
|
556
|
+
className: cn("text-xs font-medium text-destructive", className),
|
|
557
|
+
...props
|
|
558
|
+
}
|
|
559
|
+
);
|
|
560
|
+
var FieldControl = import_field.Field.Control;
|
|
561
|
+
|
|
562
|
+
// src/sheet/index.tsx
|
|
563
|
+
var import_dialog = require("@base-ui/react/dialog");
|
|
564
|
+
|
|
565
|
+
// src/button/index.tsx
|
|
566
|
+
var import_button = require("@base-ui/react/button");
|
|
567
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
568
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
569
|
+
var buttonVariants = (0, import_class_variance_authority3.cva)(
|
|
570
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
571
|
+
{
|
|
572
|
+
variants: {
|
|
573
|
+
variant: {
|
|
574
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
575
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
576
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
577
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
578
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
579
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
580
|
+
},
|
|
581
|
+
size: {
|
|
582
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
583
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
584
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
585
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
586
|
+
icon: "size-8",
|
|
587
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
588
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
589
|
+
"icon-lg": "size-9"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
defaultVariants: {
|
|
593
|
+
variant: "default",
|
|
594
|
+
size: "default"
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
);
|
|
598
|
+
function Button({
|
|
599
|
+
className,
|
|
600
|
+
variant = "default",
|
|
601
|
+
size = "default",
|
|
602
|
+
...props
|
|
603
|
+
}) {
|
|
604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
605
|
+
import_button.Button,
|
|
606
|
+
{
|
|
607
|
+
"data-slot": "button",
|
|
608
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
609
|
+
...props
|
|
610
|
+
}
|
|
611
|
+
);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// src/sheet/index.tsx
|
|
615
|
+
var import_lucide_react2 = require("lucide-react");
|
|
616
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
617
|
+
function Sheet({ ...props }) {
|
|
618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dialog.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
619
|
+
}
|
|
620
|
+
function SheetTrigger({ ...props }) {
|
|
621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
622
|
+
}
|
|
623
|
+
function SheetPortal({ ...props }) {
|
|
624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dialog.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
625
|
+
}
|
|
626
|
+
function SheetClose({ ...props }) {
|
|
627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dialog.Dialog.Close, { "data-slot": "sheet-close", ...props });
|
|
628
|
+
}
|
|
629
|
+
function SheetOverlay({ className, ...props }) {
|
|
630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
631
|
+
import_dialog.Dialog.Backdrop,
|
|
632
|
+
{
|
|
633
|
+
"data-slot": "sheet-overlay",
|
|
634
|
+
className: cn("fixed inset-0 z-50 bg-black/40", className),
|
|
635
|
+
...props
|
|
636
|
+
}
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
var SIDE_STYLES = {
|
|
640
|
+
bottom: "inset-x-0 bottom-0 max-h-[85vh] rounded-t-2xl border-t",
|
|
641
|
+
top: "inset-x-0 top-0 max-h-[85vh] rounded-b-2xl border-b",
|
|
642
|
+
right: "inset-y-0 right-0 h-full w-full max-w-sm border-l",
|
|
643
|
+
left: "inset-y-0 left-0 h-full w-full max-w-sm border-r"
|
|
644
|
+
};
|
|
645
|
+
function SheetContent({
|
|
646
|
+
className,
|
|
647
|
+
children,
|
|
648
|
+
side = "bottom",
|
|
649
|
+
showCloseButton = true,
|
|
650
|
+
showHandle,
|
|
651
|
+
...props
|
|
652
|
+
}) {
|
|
653
|
+
const handle = showHandle ?? side === "bottom";
|
|
654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(SheetPortal, { children: [
|
|
655
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SheetOverlay, {}),
|
|
656
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
657
|
+
import_dialog.Dialog.Popup,
|
|
658
|
+
{
|
|
659
|
+
"data-slot": "sheet-content",
|
|
660
|
+
"data-side": side,
|
|
661
|
+
className: cn(
|
|
662
|
+
"fixed z-50 flex flex-col gap-4 border-border bg-popover p-4 text-popover-foreground shadow-xl outline-none",
|
|
663
|
+
side === "bottom" && "pb-[calc(1rem+env(safe-area-inset-bottom))]",
|
|
664
|
+
SIDE_STYLES[side],
|
|
665
|
+
className
|
|
666
|
+
),
|
|
667
|
+
...props,
|
|
668
|
+
children: [
|
|
669
|
+
handle && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { "aria-hidden": true, className: "mx-auto -mt-1 h-1.5 w-9 shrink-0 rounded-full bg-border" }),
|
|
670
|
+
children,
|
|
671
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
672
|
+
import_dialog.Dialog.Close,
|
|
673
|
+
{
|
|
674
|
+
"data-slot": "sheet-close",
|
|
675
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm" }),
|
|
676
|
+
children: [
|
|
677
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.XIcon, {}),
|
|
678
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "sr-only", children: "Close" })
|
|
679
|
+
]
|
|
680
|
+
}
|
|
681
|
+
)
|
|
682
|
+
]
|
|
683
|
+
}
|
|
684
|
+
)
|
|
685
|
+
] });
|
|
686
|
+
}
|
|
687
|
+
function SheetHeader({ className, ...props }) {
|
|
688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5", className), ...props });
|
|
689
|
+
}
|
|
690
|
+
function SheetFooter({ className, ...props }) {
|
|
691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
692
|
+
"div",
|
|
693
|
+
{
|
|
694
|
+
"data-slot": "sheet-footer",
|
|
695
|
+
className: cn("mt-auto flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
696
|
+
...props
|
|
697
|
+
}
|
|
698
|
+
);
|
|
699
|
+
}
|
|
700
|
+
function SheetTitle({ className, ...props }) {
|
|
701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
702
|
+
import_dialog.Dialog.Title,
|
|
703
|
+
{
|
|
704
|
+
"data-slot": "sheet-title",
|
|
705
|
+
className: cn("font-heading text-base leading-none font-semibold", className),
|
|
706
|
+
...props
|
|
707
|
+
}
|
|
708
|
+
);
|
|
709
|
+
}
|
|
710
|
+
function SheetDescription({ className, ...props }) {
|
|
711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
712
|
+
import_dialog.Dialog.Description,
|
|
713
|
+
{
|
|
714
|
+
"data-slot": "sheet-description",
|
|
715
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
716
|
+
...props
|
|
717
|
+
}
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
// src/slide-over/index.tsx
|
|
722
|
+
var import_dialog2 = require("@base-ui/react/dialog");
|
|
723
|
+
var import_lucide_react3 = require("lucide-react");
|
|
724
|
+
|
|
725
|
+
// src/slide-over/use-record-nav.ts
|
|
726
|
+
var React2 = __toESM(require("react"));
|
|
727
|
+
function useRecordNav({
|
|
728
|
+
selector,
|
|
729
|
+
idAttribute = "data-record-id",
|
|
730
|
+
currentId,
|
|
731
|
+
onNavigate,
|
|
732
|
+
enabled = true,
|
|
733
|
+
keys
|
|
734
|
+
}) {
|
|
735
|
+
const nextKey = keys?.next ?? "j";
|
|
736
|
+
const prevKey = keys?.prev ?? "k";
|
|
737
|
+
const onNavigateRef = React2.useRef(onNavigate);
|
|
738
|
+
onNavigateRef.current = onNavigate;
|
|
739
|
+
React2.useEffect(() => {
|
|
740
|
+
if (!enabled) return;
|
|
741
|
+
function onKeyDown(e) {
|
|
742
|
+
const target = e.target;
|
|
743
|
+
const tag = target?.tagName;
|
|
744
|
+
if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT" || target?.isContentEditable) return;
|
|
745
|
+
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
|
746
|
+
if (e.key !== nextKey && e.key !== prevKey) return;
|
|
747
|
+
const nodes = Array.from(document.querySelectorAll(selector));
|
|
748
|
+
if (nodes.length === 0) return;
|
|
749
|
+
const ids = nodes.map((n) => n.getAttribute(idAttribute)).filter((id) => !!id);
|
|
750
|
+
const currentIndex = currentId ? ids.indexOf(currentId) : -1;
|
|
751
|
+
const delta = e.key === nextKey ? 1 : -1;
|
|
752
|
+
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + delta + ids.length) % ids.length;
|
|
753
|
+
const nextId = ids[nextIndex];
|
|
754
|
+
if (nextId) {
|
|
755
|
+
e.preventDefault();
|
|
756
|
+
onNavigateRef.current(nextId);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
document.addEventListener("keydown", onKeyDown);
|
|
760
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
761
|
+
}, [enabled, selector, idAttribute, currentId, nextKey, prevKey]);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
// src/slide-over/index.tsx
|
|
765
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
766
|
+
function SlideOver({ ...props }) {
|
|
767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_dialog2.Dialog.Root, { "data-slot": "slide-over", ...props });
|
|
768
|
+
}
|
|
769
|
+
function SlideOverTrigger({ ...props }) {
|
|
770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_dialog2.Dialog.Trigger, { "data-slot": "slide-over-trigger", ...props });
|
|
771
|
+
}
|
|
772
|
+
function SlideOverPortal({ ...props }) {
|
|
773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_dialog2.Dialog.Portal, { "data-slot": "slide-over-portal", ...props });
|
|
774
|
+
}
|
|
775
|
+
function SlideOverClose({ ...props }) {
|
|
776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_dialog2.Dialog.Close, { "data-slot": "slide-over-close", ...props });
|
|
777
|
+
}
|
|
778
|
+
function SlideOverOverlay({ className, ...props }) {
|
|
779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
780
|
+
import_dialog2.Dialog.Backdrop,
|
|
781
|
+
{
|
|
782
|
+
"data-slot": "dialog-overlay",
|
|
783
|
+
className: cn("fixed inset-0 z-50 bg-black/50", className),
|
|
784
|
+
...props
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
var SIZE_STYLES = {
|
|
789
|
+
md: "sm:max-w-2xl",
|
|
790
|
+
lg: "sm:max-w-4xl lg:max-w-5xl",
|
|
791
|
+
xl: "sm:max-w-6xl lg:max-w-7xl xl:max-w-[90rem]",
|
|
792
|
+
full: "sm:max-w-[100vw]"
|
|
793
|
+
};
|
|
794
|
+
function SlideOverContent({
|
|
795
|
+
className,
|
|
796
|
+
children,
|
|
797
|
+
size = "lg",
|
|
798
|
+
showCloseButton = true,
|
|
799
|
+
...props
|
|
800
|
+
}) {
|
|
801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(SlideOverPortal, { children: [
|
|
802
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SlideOverOverlay, {}),
|
|
803
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
804
|
+
import_dialog2.Dialog.Popup,
|
|
805
|
+
{
|
|
806
|
+
"data-slot": "slide-over-content",
|
|
807
|
+
className: cn(
|
|
808
|
+
"fixed inset-0 z-50 flex w-full max-w-[100vw] flex-col overflow-hidden bg-card text-card-foreground outline-none sm:inset-y-6 sm:left-1/2 sm:h-[calc(100%-3rem)] sm:-translate-x-1/2 sm:rounded-xl sm:border sm:border-border sm:shadow-2xl",
|
|
809
|
+
SIZE_STYLES[size],
|
|
810
|
+
className
|
|
811
|
+
),
|
|
812
|
+
...props,
|
|
813
|
+
children: [
|
|
814
|
+
children,
|
|
815
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
816
|
+
SlideOverClose,
|
|
817
|
+
{
|
|
818
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { variant: "ghost", className: "absolute right-3 top-3 z-10", size: "icon-sm" }),
|
|
819
|
+
children: [
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.XIcon, {}),
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sr-only", children: "Close" })
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
)
|
|
825
|
+
]
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
] });
|
|
829
|
+
}
|
|
830
|
+
function SlideOverHeader({ className, ...props }) {
|
|
831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
832
|
+
"div",
|
|
833
|
+
{
|
|
834
|
+
"data-slot": "slide-over-header",
|
|
835
|
+
className: cn("flex shrink-0 items-center gap-3 border-b border-border px-4 py-3 sm:px-6", className),
|
|
836
|
+
...props
|
|
837
|
+
}
|
|
838
|
+
);
|
|
839
|
+
}
|
|
840
|
+
function SlideOverFooter({
|
|
841
|
+
className,
|
|
842
|
+
shortcuts,
|
|
843
|
+
children,
|
|
844
|
+
...props
|
|
845
|
+
}) {
|
|
846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
847
|
+
"div",
|
|
848
|
+
{
|
|
849
|
+
"data-slot": "slide-over-footer",
|
|
850
|
+
className: cn(
|
|
851
|
+
"flex shrink-0 flex-wrap items-center justify-between gap-2 border-t border-border px-4 py-2.5 text-xs text-muted-foreground sm:px-6",
|
|
852
|
+
className
|
|
853
|
+
),
|
|
854
|
+
...props,
|
|
855
|
+
children: [
|
|
856
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center gap-3", children: shortcuts }),
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center gap-2", children })
|
|
858
|
+
]
|
|
859
|
+
}
|
|
860
|
+
);
|
|
861
|
+
}
|
|
862
|
+
function SlideOverTitle({ className, ...props }) {
|
|
863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
864
|
+
import_dialog2.Dialog.Title,
|
|
865
|
+
{
|
|
866
|
+
"data-slot": "slide-over-title",
|
|
867
|
+
className: cn("truncate font-heading text-base font-semibold", className),
|
|
868
|
+
...props
|
|
869
|
+
}
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
function SlideOverDescription({ className, ...props }) {
|
|
873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
874
|
+
import_dialog2.Dialog.Description,
|
|
875
|
+
{
|
|
876
|
+
"data-slot": "slide-over-description",
|
|
877
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
878
|
+
...props
|
|
879
|
+
}
|
|
880
|
+
);
|
|
881
|
+
}
|
|
882
|
+
function SlideOverColumns({
|
|
883
|
+
columns,
|
|
884
|
+
className
|
|
885
|
+
}) {
|
|
886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: cn("flex flex-1 flex-col overflow-y-auto lg:flex-row lg:overflow-hidden", className), children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
887
|
+
"div",
|
|
888
|
+
{
|
|
889
|
+
className: cn(
|
|
890
|
+
"flex flex-col lg:h-full lg:overflow-y-auto",
|
|
891
|
+
col.width ?? "lg:flex-1",
|
|
892
|
+
col.className
|
|
893
|
+
),
|
|
894
|
+
style: col.order != null ? { order: col.order } : void 0,
|
|
895
|
+
children: col.content
|
|
896
|
+
},
|
|
897
|
+
col.key
|
|
898
|
+
)) });
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
// src/dropdown-menu/index.tsx
|
|
902
|
+
var import_menu = require("@base-ui/react/menu");
|
|
903
|
+
var import_lucide_react4 = require("lucide-react");
|
|
904
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
905
|
+
function DropdownMenu({ ...props }) {
|
|
906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_menu.Menu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
907
|
+
}
|
|
908
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_menu.Menu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
910
|
+
}
|
|
911
|
+
function DropdownMenuGroup({ ...props }) {
|
|
912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_menu.Menu.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
913
|
+
}
|
|
914
|
+
var popupClasses = "z-50 min-w-40 origin-(--transform-origin) rounded-lg bg-popover p-1 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95";
|
|
915
|
+
function DropdownMenuContent({
|
|
916
|
+
className,
|
|
917
|
+
align = "start",
|
|
918
|
+
sideOffset = 4,
|
|
919
|
+
side = "bottom",
|
|
920
|
+
...props
|
|
921
|
+
}) {
|
|
922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
923
|
+
import_menu.Menu.Positioner,
|
|
924
|
+
{
|
|
925
|
+
align,
|
|
926
|
+
sideOffset,
|
|
927
|
+
side,
|
|
928
|
+
className: "isolate z-50",
|
|
929
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
930
|
+
import_menu.Menu.Popup,
|
|
931
|
+
{
|
|
932
|
+
"data-slot": "dropdown-menu-content",
|
|
933
|
+
className: cn(popupClasses, className),
|
|
934
|
+
...props
|
|
935
|
+
}
|
|
936
|
+
)
|
|
937
|
+
}
|
|
938
|
+
) });
|
|
939
|
+
}
|
|
940
|
+
var itemClasses = "relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden data-highlighted:bg-muted data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0";
|
|
941
|
+
function DropdownMenuItem({
|
|
942
|
+
className,
|
|
943
|
+
...props
|
|
944
|
+
}) {
|
|
945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
946
|
+
import_menu.Menu.Item,
|
|
947
|
+
{
|
|
948
|
+
"data-slot": "dropdown-menu-item",
|
|
949
|
+
className: cn(itemClasses, className),
|
|
950
|
+
...props
|
|
951
|
+
}
|
|
952
|
+
);
|
|
953
|
+
}
|
|
954
|
+
function DropdownMenuCheckboxItem({
|
|
955
|
+
className,
|
|
956
|
+
children,
|
|
957
|
+
...props
|
|
958
|
+
}) {
|
|
959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
960
|
+
import_menu.Menu.CheckboxItem,
|
|
961
|
+
{
|
|
962
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
963
|
+
className: cn(itemClasses, "pl-7", className),
|
|
964
|
+
...props,
|
|
965
|
+
children: [
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "absolute left-1.5 flex size-4 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_menu.Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.Check, { className: "size-3.5" }) }) }),
|
|
967
|
+
children
|
|
968
|
+
]
|
|
969
|
+
}
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
function DropdownMenuLabel({
|
|
973
|
+
className,
|
|
974
|
+
...props
|
|
975
|
+
}) {
|
|
976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
977
|
+
import_menu.Menu.GroupLabel,
|
|
978
|
+
{
|
|
979
|
+
"data-slot": "dropdown-menu-label",
|
|
980
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className),
|
|
981
|
+
...props
|
|
982
|
+
}
|
|
983
|
+
);
|
|
984
|
+
}
|
|
985
|
+
function DropdownMenuSeparator({
|
|
986
|
+
className,
|
|
987
|
+
...props
|
|
988
|
+
}) {
|
|
989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
990
|
+
import_menu.Menu.Separator,
|
|
991
|
+
{
|
|
992
|
+
"data-slot": "dropdown-menu-separator",
|
|
993
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
994
|
+
...props
|
|
995
|
+
}
|
|
996
|
+
);
|
|
997
|
+
}
|
|
998
|
+
function DropdownMenuSub({ ...props }) {
|
|
999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_menu.Menu.SubmenuRoot, { ...props });
|
|
1000
|
+
}
|
|
1001
|
+
function DropdownMenuSubTrigger({
|
|
1002
|
+
className,
|
|
1003
|
+
children,
|
|
1004
|
+
...props
|
|
1005
|
+
}) {
|
|
1006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1007
|
+
import_menu.Menu.SubmenuTrigger,
|
|
1008
|
+
{
|
|
1009
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1010
|
+
className: cn(itemClasses, "data-popup-open:bg-muted", className),
|
|
1011
|
+
...props,
|
|
1012
|
+
children: [
|
|
1013
|
+
children,
|
|
1014
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.ChevronRight, { className: "ml-auto size-4" })
|
|
1015
|
+
]
|
|
1016
|
+
}
|
|
1017
|
+
);
|
|
1018
|
+
}
|
|
1019
|
+
function DropdownMenuSubContent({
|
|
1020
|
+
className,
|
|
1021
|
+
...props
|
|
1022
|
+
}) {
|
|
1023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_menu.Menu.Positioner, { className: "isolate z-50", side: "inline-end", sideOffset: 4, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1024
|
+
import_menu.Menu.Popup,
|
|
1025
|
+
{
|
|
1026
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1027
|
+
className: cn(popupClasses, className),
|
|
1028
|
+
...props
|
|
1029
|
+
}
|
|
1030
|
+
) }) });
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// src/progress/index.tsx
|
|
1034
|
+
var import_progress = require("@base-ui/react/progress");
|
|
1035
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1036
|
+
function Progress({
|
|
1037
|
+
className,
|
|
1038
|
+
value,
|
|
1039
|
+
...props
|
|
1040
|
+
}) {
|
|
1041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_progress.Progress.Root, { "data-slot": "progress", value, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1042
|
+
import_progress.Progress.Track,
|
|
1043
|
+
{
|
|
1044
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-muted", className),
|
|
1045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1046
|
+
import_progress.Progress.Indicator,
|
|
1047
|
+
{
|
|
1048
|
+
"data-slot": "progress-indicator",
|
|
1049
|
+
className: "h-full rounded-full bg-primary transition-[width] duration-300 ease-out"
|
|
1050
|
+
}
|
|
1051
|
+
)
|
|
1052
|
+
}
|
|
1053
|
+
) });
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
// src/collapsible/index.tsx
|
|
1057
|
+
var import_collapsible = require("@base-ui/react/collapsible");
|
|
1058
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1059
|
+
function Collapsible({ ...props }) {
|
|
1060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_collapsible.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
1061
|
+
}
|
|
1062
|
+
function CollapsibleTrigger({ ...props }) {
|
|
1063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_collapsible.Collapsible.Trigger, { "data-slot": "collapsible-trigger", ...props });
|
|
1064
|
+
}
|
|
1065
|
+
function CollapsibleContent({
|
|
1066
|
+
className,
|
|
1067
|
+
...props
|
|
1068
|
+
}) {
|
|
1069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1070
|
+
import_collapsible.Collapsible.Panel,
|
|
1071
|
+
{
|
|
1072
|
+
"data-slot": "collapsible-content",
|
|
1073
|
+
className: cn("wmm-collapsible-panel", className),
|
|
1074
|
+
...props
|
|
1075
|
+
}
|
|
1076
|
+
);
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
// src/radio-group/index.tsx
|
|
1080
|
+
var import_radio_group = require("@base-ui/react/radio-group");
|
|
1081
|
+
var import_radio = require("@base-ui/react/radio");
|
|
1082
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1083
|
+
function RadioGroup({ className, ...props }) {
|
|
1084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1085
|
+
import_radio_group.RadioGroup,
|
|
1086
|
+
{
|
|
1087
|
+
"data-slot": "radio-group",
|
|
1088
|
+
className: cn("flex flex-col gap-2.5", className),
|
|
1089
|
+
...props
|
|
1090
|
+
}
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
function RadioGroupItem({ className, ...props }) {
|
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1095
|
+
import_radio.Radio.Root,
|
|
1096
|
+
{
|
|
1097
|
+
"data-slot": "radio-group-item",
|
|
1098
|
+
className: cn(
|
|
1099
|
+
"flex size-4 shrink-0 items-center justify-center rounded-full border border-border bg-background outline-none",
|
|
1100
|
+
"data-checked:border-primary data-checked:bg-primary",
|
|
1101
|
+
"focus-visible:ring-2 focus-visible:ring-ring",
|
|
1102
|
+
"data-disabled:opacity-50 data-disabled:cursor-not-allowed",
|
|
1103
|
+
className
|
|
1104
|
+
),
|
|
1105
|
+
...props,
|
|
1106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radio.Radio.Indicator, { className: "size-1.5 rounded-full bg-primary-foreground data-unchecked:hidden" })
|
|
1107
|
+
}
|
|
1108
|
+
);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
// src/toast/index.tsx
|
|
1112
|
+
var import_toast = require("@base-ui/react/toast");
|
|
1113
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1114
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1115
|
+
function useToast() {
|
|
1116
|
+
return import_toast.Toast.useToastManager();
|
|
1117
|
+
}
|
|
1118
|
+
function ToastList() {
|
|
1119
|
+
const { toasts } = import_toast.Toast.useToastManager();
|
|
1120
|
+
return toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1121
|
+
import_toast.Toast.Root,
|
|
1122
|
+
{
|
|
1123
|
+
toast,
|
|
1124
|
+
className: cn(
|
|
1125
|
+
"relative flex items-start gap-3 rounded-lg bg-popover p-3.5 pr-9 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/10",
|
|
1126
|
+
"transition-all duration-200",
|
|
1127
|
+
"data-[starting-style]:translate-x-full data-[starting-style]:opacity-0",
|
|
1128
|
+
"data-[ending-style]:translate-x-full data-[ending-style]:opacity-0",
|
|
1129
|
+
"data-[swipe-direction=right]:data-[ending-style]:translate-x-full"
|
|
1130
|
+
),
|
|
1131
|
+
children: [
|
|
1132
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_toast.Toast.Title, { className: "text-sm font-medium text-foreground" }),
|
|
1134
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_toast.Toast.Description, { className: "mt-0.5 text-sm text-muted-foreground" }),
|
|
1135
|
+
toast.actionProps && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1136
|
+
import_toast.Toast.Action,
|
|
1137
|
+
{
|
|
1138
|
+
...toast.actionProps,
|
|
1139
|
+
className: cn(
|
|
1140
|
+
"mt-2 text-sm font-medium text-primary underline underline-offset-2 hover:text-primary/80",
|
|
1141
|
+
toast.actionProps.className
|
|
1142
|
+
)
|
|
1143
|
+
}
|
|
1144
|
+
)
|
|
1145
|
+
] }),
|
|
1146
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1147
|
+
import_toast.Toast.Close,
|
|
1148
|
+
{
|
|
1149
|
+
"aria-label": "Close",
|
|
1150
|
+
className: "absolute right-2 top-2 rounded-md p-1 text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
|
|
1151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.X, { className: "size-4" })
|
|
1152
|
+
}
|
|
1153
|
+
)
|
|
1154
|
+
]
|
|
1155
|
+
},
|
|
1156
|
+
toast.id
|
|
1157
|
+
));
|
|
1158
|
+
}
|
|
1159
|
+
function ToastProvider({
|
|
1160
|
+
children,
|
|
1161
|
+
className,
|
|
1162
|
+
...props
|
|
1163
|
+
}) {
|
|
1164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_toast.Toast.Provider, { ...props, children: [
|
|
1165
|
+
children,
|
|
1166
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_toast.Toast.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1167
|
+
import_toast.Toast.Viewport,
|
|
1168
|
+
{
|
|
1169
|
+
className: cn(
|
|
1170
|
+
"fixed right-4 top-4 z-[100] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2 outline-none",
|
|
1171
|
+
className
|
|
1172
|
+
),
|
|
1173
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ToastList, {})
|
|
1174
|
+
}
|
|
1175
|
+
) })
|
|
1176
|
+
] });
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
// src/slider/index.tsx
|
|
1180
|
+
var import_slider = require("@base-ui/react/slider");
|
|
1181
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1182
|
+
function Slider({ className, ...props }) {
|
|
1183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_slider.Slider.Root, { "data-slot": "slider", className: cn("w-full", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_slider.Slider.Control, { className: "flex w-full touch-none items-center py-2 select-none", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_slider.Slider.Track, { className: "relative h-1.5 w-full rounded-full bg-muted", children: [
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_slider.Slider.Indicator, { className: "absolute rounded-full bg-primary" }),
|
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_slider.Slider.Thumb, { className: "size-4 rounded-full border-2 border-primary bg-background shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-ring data-dragging:scale-110 transition-transform" })
|
|
1186
|
+
] }) }) });
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
// src/toggle/index.tsx
|
|
1190
|
+
var import_toggle = require("@base-ui/react/toggle");
|
|
1191
|
+
var import_toggle_group = require("@base-ui/react/toggle-group");
|
|
1192
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
1193
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1194
|
+
var toggleVariants = (0, import_class_variance_authority4.cva)(
|
|
1195
|
+
"inline-flex items-center justify-center gap-1.5 rounded-md text-sm font-medium outline-none transition-colors select-none cursor-pointer disabled:pointer-events-none disabled:opacity-50 hover:bg-muted hover:text-foreground data-pressed:bg-primary/15 data-pressed:text-primary focus-visible:ring-2 focus-visible:ring-ring [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1196
|
+
{
|
|
1197
|
+
variants: {
|
|
1198
|
+
variant: {
|
|
1199
|
+
default: "bg-transparent",
|
|
1200
|
+
outline: "border border-border bg-transparent"
|
|
1201
|
+
},
|
|
1202
|
+
size: {
|
|
1203
|
+
sm: "h-7 px-2",
|
|
1204
|
+
default: "h-8 px-2.5",
|
|
1205
|
+
lg: "h-9 px-3"
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
defaultVariants: { variant: "default", size: "default" }
|
|
1209
|
+
}
|
|
1210
|
+
);
|
|
1211
|
+
function Toggle({
|
|
1212
|
+
className,
|
|
1213
|
+
variant,
|
|
1214
|
+
size,
|
|
1215
|
+
...props
|
|
1216
|
+
}) {
|
|
1217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1218
|
+
import_toggle.Toggle,
|
|
1219
|
+
{
|
|
1220
|
+
"data-slot": "toggle",
|
|
1221
|
+
className: cn(toggleVariants({ variant, size }), className),
|
|
1222
|
+
...props
|
|
1223
|
+
}
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1226
|
+
function ToggleGroup({ className, ...props }) {
|
|
1227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1228
|
+
import_toggle_group.ToggleGroup,
|
|
1229
|
+
{
|
|
1230
|
+
"data-slot": "toggle-group",
|
|
1231
|
+
className: cn("inline-flex items-center gap-1 rounded-lg bg-muted p-1", className),
|
|
1232
|
+
...props
|
|
1233
|
+
}
|
|
1234
|
+
);
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
// src/scroll-area/index.tsx
|
|
1238
|
+
var import_scroll_area = require("@base-ui/react/scroll-area");
|
|
1239
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1240
|
+
function ScrollArea({
|
|
1241
|
+
className,
|
|
1242
|
+
children,
|
|
1243
|
+
...props
|
|
1244
|
+
}) {
|
|
1245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1246
|
+
import_scroll_area.ScrollArea.Root,
|
|
1247
|
+
{
|
|
1248
|
+
"data-slot": "scroll-area",
|
|
1249
|
+
className: cn("relative overflow-hidden", className),
|
|
1250
|
+
...props,
|
|
1251
|
+
children: [
|
|
1252
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_scroll_area.ScrollArea.Viewport, { className: "size-full rounded-[inherit] outline-none", children }),
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1254
|
+
import_scroll_area.ScrollArea.Scrollbar,
|
|
1255
|
+
{
|
|
1256
|
+
orientation: "vertical",
|
|
1257
|
+
className: "flex w-2 touch-none select-none p-0.5 transition-opacity data-[orientation=vertical]:h-full",
|
|
1258
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_scroll_area.ScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1259
|
+
}
|
|
1260
|
+
),
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1262
|
+
import_scroll_area.ScrollArea.Scrollbar,
|
|
1263
|
+
{
|
|
1264
|
+
orientation: "horizontal",
|
|
1265
|
+
className: "flex h-2 touch-none select-none p-0.5 transition-opacity",
|
|
1266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_scroll_area.ScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1267
|
+
}
|
|
1268
|
+
)
|
|
1269
|
+
]
|
|
1270
|
+
}
|
|
1271
|
+
);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
// src/alert-dialog/index.tsx
|
|
1275
|
+
var import_alert_dialog = require("@base-ui/react/alert-dialog");
|
|
1276
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1277
|
+
function AlertDialog({ ...props }) {
|
|
1278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_alert_dialog.AlertDialog.Root, { "data-slot": "alert-dialog", ...props });
|
|
1279
|
+
}
|
|
1280
|
+
function AlertDialogTrigger({ ...props }) {
|
|
1281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_alert_dialog.AlertDialog.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
1282
|
+
}
|
|
1283
|
+
function AlertDialogPortal({ ...props }) {
|
|
1284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_alert_dialog.AlertDialog.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
1285
|
+
}
|
|
1286
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
1287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1288
|
+
import_alert_dialog.AlertDialog.Backdrop,
|
|
1289
|
+
{
|
|
1290
|
+
"data-slot": "dialog-overlay",
|
|
1291
|
+
className: cn(
|
|
1292
|
+
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs",
|
|
1293
|
+
className
|
|
1294
|
+
),
|
|
1295
|
+
...props
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
function AlertDialogContent({ className, children, ...props }) {
|
|
1300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(AlertDialogPortal, { children: [
|
|
1301
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlertDialogOverlay, {}),
|
|
1302
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1303
|
+
import_alert_dialog.AlertDialog.Popup,
|
|
1304
|
+
{
|
|
1305
|
+
"data-slot": "dialog-content",
|
|
1306
|
+
className: cn(
|
|
1307
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm",
|
|
1308
|
+
className
|
|
1309
|
+
),
|
|
1310
|
+
...props,
|
|
1311
|
+
children
|
|
1312
|
+
}
|
|
1313
|
+
)
|
|
1314
|
+
] });
|
|
1315
|
+
}
|
|
1316
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
1317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { "data-slot": "alert-dialog-header", className: cn("flex flex-col gap-2", className), ...props });
|
|
1318
|
+
}
|
|
1319
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
1320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1321
|
+
"div",
|
|
1322
|
+
{
|
|
1323
|
+
"data-slot": "alert-dialog-footer",
|
|
1324
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
1325
|
+
...props
|
|
1326
|
+
}
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1329
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
1330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1331
|
+
import_alert_dialog.AlertDialog.Title,
|
|
1332
|
+
{
|
|
1333
|
+
"data-slot": "alert-dialog-title",
|
|
1334
|
+
className: cn("font-heading text-base leading-none font-medium", className),
|
|
1335
|
+
...props
|
|
1336
|
+
}
|
|
1337
|
+
);
|
|
1338
|
+
}
|
|
1339
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
1340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1341
|
+
import_alert_dialog.AlertDialog.Description,
|
|
1342
|
+
{
|
|
1343
|
+
"data-slot": "alert-dialog-description",
|
|
1344
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1345
|
+
...props
|
|
1346
|
+
}
|
|
1347
|
+
);
|
|
1348
|
+
}
|
|
1349
|
+
function AlertDialogAction({
|
|
1350
|
+
className,
|
|
1351
|
+
variant = "default",
|
|
1352
|
+
...props
|
|
1353
|
+
}) {
|
|
1354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1355
|
+
import_alert_dialog.AlertDialog.Close,
|
|
1356
|
+
{
|
|
1357
|
+
"data-slot": "alert-dialog-action",
|
|
1358
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant, className }),
|
|
1359
|
+
...props
|
|
1360
|
+
}
|
|
1361
|
+
);
|
|
1362
|
+
}
|
|
1363
|
+
function AlertDialogCancel({ className, ...props }) {
|
|
1364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1365
|
+
import_alert_dialog.AlertDialog.Close,
|
|
1366
|
+
{
|
|
1367
|
+
"data-slot": "alert-dialog-cancel",
|
|
1368
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "outline", className }),
|
|
1369
|
+
...props
|
|
1370
|
+
}
|
|
1371
|
+
);
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
// src/card/index.tsx
|
|
1375
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1376
|
+
function Card({
|
|
1377
|
+
className,
|
|
1378
|
+
size = "default",
|
|
1379
|
+
...props
|
|
1380
|
+
}) {
|
|
1381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1382
|
+
"div",
|
|
1383
|
+
{
|
|
1384
|
+
"data-slot": "card",
|
|
1385
|
+
"data-size": size,
|
|
1386
|
+
className: cn(
|
|
1387
|
+
"group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
1388
|
+
className
|
|
1389
|
+
),
|
|
1390
|
+
...props
|
|
1391
|
+
}
|
|
1392
|
+
);
|
|
1393
|
+
}
|
|
1394
|
+
function CardHeader({ className, ...props }) {
|
|
1395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1396
|
+
"div",
|
|
1397
|
+
{
|
|
1398
|
+
"data-slot": "card-header",
|
|
1399
|
+
className: cn(
|
|
1400
|
+
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",
|
|
1401
|
+
className
|
|
1402
|
+
),
|
|
1403
|
+
...props
|
|
1404
|
+
}
|
|
1405
|
+
);
|
|
1406
|
+
}
|
|
1407
|
+
function CardTitle({ className, ...props }) {
|
|
1408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1409
|
+
"div",
|
|
1410
|
+
{
|
|
1411
|
+
"data-slot": "card-title",
|
|
1412
|
+
className: cn(
|
|
1413
|
+
"font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
|
|
1414
|
+
className
|
|
1415
|
+
),
|
|
1416
|
+
...props
|
|
1417
|
+
}
|
|
1418
|
+
);
|
|
1419
|
+
}
|
|
1420
|
+
function CardDescription({ className, ...props }) {
|
|
1421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1422
|
+
"div",
|
|
1423
|
+
{
|
|
1424
|
+
"data-slot": "card-description",
|
|
1425
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1426
|
+
...props
|
|
1427
|
+
}
|
|
1428
|
+
);
|
|
1429
|
+
}
|
|
1430
|
+
function CardAction({ className, ...props }) {
|
|
1431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1432
|
+
"div",
|
|
1433
|
+
{
|
|
1434
|
+
"data-slot": "card-action",
|
|
1435
|
+
className: cn(
|
|
1436
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
1437
|
+
className
|
|
1438
|
+
),
|
|
1439
|
+
...props
|
|
1440
|
+
}
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
function CardContent({ className, ...props }) {
|
|
1444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1445
|
+
"div",
|
|
1446
|
+
{
|
|
1447
|
+
"data-slot": "card-content",
|
|
1448
|
+
className: cn("px-4 group-data-[size=sm]/card:px-3", className),
|
|
1449
|
+
...props
|
|
1450
|
+
}
|
|
1451
|
+
);
|
|
1452
|
+
}
|
|
1453
|
+
function CardFooter({ className, ...props }) {
|
|
1454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1455
|
+
"div",
|
|
1456
|
+
{
|
|
1457
|
+
"data-slot": "card-footer",
|
|
1458
|
+
className: cn(
|
|
1459
|
+
"flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",
|
|
1460
|
+
className
|
|
1461
|
+
),
|
|
1462
|
+
...props
|
|
1463
|
+
}
|
|
1464
|
+
);
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
// src/checkbox/index.tsx
|
|
1468
|
+
var import_checkbox = require("@base-ui/react/checkbox");
|
|
1469
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1470
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1471
|
+
function Checkbox({ className, ...props }) {
|
|
1472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1473
|
+
import_checkbox.Checkbox.Root,
|
|
1474
|
+
{
|
|
1475
|
+
"data-slot": "checkbox",
|
|
1476
|
+
className: cn(
|
|
1477
|
+
"peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
1478
|
+
className
|
|
1479
|
+
),
|
|
1480
|
+
...props,
|
|
1481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1482
|
+
import_checkbox.Checkbox.Indicator,
|
|
1483
|
+
{
|
|
1484
|
+
"data-slot": "checkbox-indicator",
|
|
1485
|
+
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
1486
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react6.CheckIcon, {})
|
|
1487
|
+
}
|
|
1488
|
+
)
|
|
1489
|
+
}
|
|
1490
|
+
);
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
// src/dialog/index.tsx
|
|
1494
|
+
var import_dialog3 = require("@base-ui/react/dialog");
|
|
1495
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1496
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1497
|
+
function Dialog({ ...props }) {
|
|
1498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_dialog3.Dialog.Root, { "data-slot": "dialog", ...props });
|
|
1499
|
+
}
|
|
1500
|
+
function DialogTrigger({ ...props }) {
|
|
1501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_dialog3.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
1502
|
+
}
|
|
1503
|
+
function DialogPortal({ ...props }) {
|
|
1504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_dialog3.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
|
|
1505
|
+
}
|
|
1506
|
+
function DialogClose({ ...props }) {
|
|
1507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_dialog3.Dialog.Close, { "data-slot": "dialog-close", ...props });
|
|
1508
|
+
}
|
|
1509
|
+
function DialogOverlay({
|
|
1510
|
+
className,
|
|
1511
|
+
...props
|
|
1512
|
+
}) {
|
|
1513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1514
|
+
import_dialog3.Dialog.Backdrop,
|
|
1515
|
+
{
|
|
1516
|
+
"data-slot": "dialog-overlay",
|
|
1517
|
+
className: cn(
|
|
1518
|
+
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
1519
|
+
className
|
|
1520
|
+
),
|
|
1521
|
+
...props
|
|
1522
|
+
}
|
|
1523
|
+
);
|
|
1524
|
+
}
|
|
1525
|
+
function DialogContent({
|
|
1526
|
+
className,
|
|
1527
|
+
children,
|
|
1528
|
+
showCloseButton = true,
|
|
1529
|
+
...props
|
|
1530
|
+
}) {
|
|
1531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogPortal, { children: [
|
|
1532
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogOverlay, {}),
|
|
1533
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1534
|
+
import_dialog3.Dialog.Popup,
|
|
1535
|
+
{
|
|
1536
|
+
"data-slot": "dialog-content",
|
|
1537
|
+
className: cn(
|
|
1538
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
1539
|
+
className
|
|
1540
|
+
),
|
|
1541
|
+
...props,
|
|
1542
|
+
children: [
|
|
1543
|
+
children,
|
|
1544
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1545
|
+
import_dialog3.Dialog.Close,
|
|
1546
|
+
{
|
|
1547
|
+
"data-slot": "dialog-close",
|
|
1548
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1549
|
+
Button,
|
|
1550
|
+
{
|
|
1551
|
+
variant: "ghost",
|
|
1552
|
+
className: "absolute top-2 right-2",
|
|
1553
|
+
size: "icon-sm"
|
|
1554
|
+
}
|
|
1555
|
+
),
|
|
1556
|
+
children: [
|
|
1557
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react7.XIcon, {}),
|
|
1558
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1559
|
+
]
|
|
1560
|
+
}
|
|
1561
|
+
)
|
|
1562
|
+
]
|
|
1563
|
+
}
|
|
1564
|
+
)
|
|
1565
|
+
] });
|
|
1566
|
+
}
|
|
1567
|
+
function DialogHeader({ className, ...props }) {
|
|
1568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1569
|
+
"div",
|
|
1570
|
+
{
|
|
1571
|
+
"data-slot": "dialog-header",
|
|
1572
|
+
className: cn("flex flex-col gap-2", className),
|
|
1573
|
+
...props
|
|
1574
|
+
}
|
|
1575
|
+
);
|
|
1576
|
+
}
|
|
1577
|
+
function DialogFooter({
|
|
1578
|
+
className,
|
|
1579
|
+
showCloseButton = false,
|
|
1580
|
+
children,
|
|
1581
|
+
...props
|
|
1582
|
+
}) {
|
|
1583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1584
|
+
"div",
|
|
1585
|
+
{
|
|
1586
|
+
"data-slot": "dialog-footer",
|
|
1587
|
+
className: cn(
|
|
1588
|
+
"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
|
|
1589
|
+
className
|
|
1590
|
+
),
|
|
1591
|
+
...props,
|
|
1592
|
+
children: [
|
|
1593
|
+
children,
|
|
1594
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_dialog3.Dialog.Close, { render: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "outline" }), children: "Close" })
|
|
1595
|
+
]
|
|
1596
|
+
}
|
|
1597
|
+
);
|
|
1598
|
+
}
|
|
1599
|
+
function DialogTitle({ className, ...props }) {
|
|
1600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1601
|
+
import_dialog3.Dialog.Title,
|
|
1602
|
+
{
|
|
1603
|
+
"data-slot": "dialog-title",
|
|
1604
|
+
className: cn(
|
|
1605
|
+
"font-heading text-base leading-none font-medium",
|
|
1606
|
+
className
|
|
1607
|
+
),
|
|
1608
|
+
...props
|
|
1609
|
+
}
|
|
1610
|
+
);
|
|
1611
|
+
}
|
|
1612
|
+
function DialogDescription({
|
|
1613
|
+
className,
|
|
1614
|
+
...props
|
|
1615
|
+
}) {
|
|
1616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1617
|
+
import_dialog3.Dialog.Description,
|
|
1618
|
+
{
|
|
1619
|
+
"data-slot": "dialog-description",
|
|
1620
|
+
className: cn(
|
|
1621
|
+
"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
1622
|
+
className
|
|
1623
|
+
),
|
|
1624
|
+
...props
|
|
1625
|
+
}
|
|
1626
|
+
);
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
// src/input/index.tsx
|
|
1630
|
+
var import_input = require("@base-ui/react/input");
|
|
1631
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1632
|
+
function Input({ className, type, ...props }) {
|
|
1633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1634
|
+
import_input.Input,
|
|
1635
|
+
{
|
|
1636
|
+
type,
|
|
1637
|
+
"data-slot": "input",
|
|
1638
|
+
className: cn(
|
|
1639
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
1640
|
+
className
|
|
1641
|
+
),
|
|
1642
|
+
...props
|
|
1643
|
+
}
|
|
1644
|
+
);
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
// src/popover/index.tsx
|
|
1648
|
+
var import_popover = require("@base-ui/react/popover");
|
|
1649
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1650
|
+
function Popover({ ...props }) {
|
|
1651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
1652
|
+
}
|
|
1653
|
+
function PopoverTrigger({ ...props }) {
|
|
1654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1655
|
+
}
|
|
1656
|
+
function PopoverContent({
|
|
1657
|
+
className,
|
|
1658
|
+
align = "center",
|
|
1659
|
+
alignOffset = 0,
|
|
1660
|
+
side = "bottom",
|
|
1661
|
+
sideOffset = 4,
|
|
1662
|
+
...props
|
|
1663
|
+
}) {
|
|
1664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1665
|
+
import_popover.Popover.Positioner,
|
|
1666
|
+
{
|
|
1667
|
+
align,
|
|
1668
|
+
alignOffset,
|
|
1669
|
+
side,
|
|
1670
|
+
sideOffset,
|
|
1671
|
+
className: "isolate z-50",
|
|
1672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1673
|
+
import_popover.Popover.Popup,
|
|
1674
|
+
{
|
|
1675
|
+
"data-slot": "popover-content",
|
|
1676
|
+
className: cn(
|
|
1677
|
+
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
1678
|
+
className
|
|
1679
|
+
),
|
|
1680
|
+
...props
|
|
1681
|
+
}
|
|
1682
|
+
)
|
|
1683
|
+
}
|
|
1684
|
+
) });
|
|
1685
|
+
}
|
|
1686
|
+
function PopoverHeader({ className, ...props }) {
|
|
1687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1688
|
+
"div",
|
|
1689
|
+
{
|
|
1690
|
+
"data-slot": "popover-header",
|
|
1691
|
+
className: cn("flex flex-col gap-0.5 text-sm", className),
|
|
1692
|
+
...props
|
|
1693
|
+
}
|
|
1694
|
+
);
|
|
1695
|
+
}
|
|
1696
|
+
function PopoverTitle({ className, ...props }) {
|
|
1697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1698
|
+
import_popover.Popover.Title,
|
|
1699
|
+
{
|
|
1700
|
+
"data-slot": "popover-title",
|
|
1701
|
+
className: cn("font-heading font-medium", className),
|
|
1702
|
+
...props
|
|
1703
|
+
}
|
|
1704
|
+
);
|
|
1705
|
+
}
|
|
1706
|
+
function PopoverDescription({
|
|
1707
|
+
className,
|
|
1708
|
+
...props
|
|
1709
|
+
}) {
|
|
1710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1711
|
+
import_popover.Popover.Description,
|
|
1712
|
+
{
|
|
1713
|
+
"data-slot": "popover-description",
|
|
1714
|
+
className: cn("text-muted-foreground", className),
|
|
1715
|
+
...props
|
|
1716
|
+
}
|
|
1717
|
+
);
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
// src/select/index.tsx
|
|
1721
|
+
var import_select = require("@base-ui/react/select");
|
|
1722
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1723
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1724
|
+
var Select = import_select.Select.Root;
|
|
1725
|
+
function SelectGroup({ className, ...props }) {
|
|
1726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1727
|
+
import_select.Select.Group,
|
|
1728
|
+
{
|
|
1729
|
+
"data-slot": "select-group",
|
|
1730
|
+
className: cn("scroll-my-1 p-1", className),
|
|
1731
|
+
...props
|
|
1732
|
+
}
|
|
1733
|
+
);
|
|
1734
|
+
}
|
|
1735
|
+
function SelectValue({ className, ...props }) {
|
|
1736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1737
|
+
import_select.Select.Value,
|
|
1738
|
+
{
|
|
1739
|
+
"data-slot": "select-value",
|
|
1740
|
+
className: cn("flex flex-1 text-left", className),
|
|
1741
|
+
...props
|
|
1742
|
+
}
|
|
1743
|
+
);
|
|
1744
|
+
}
|
|
1745
|
+
function SelectTrigger({
|
|
1746
|
+
className,
|
|
1747
|
+
size = "default",
|
|
1748
|
+
children,
|
|
1749
|
+
...props
|
|
1750
|
+
}) {
|
|
1751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1752
|
+
import_select.Select.Trigger,
|
|
1753
|
+
{
|
|
1754
|
+
"data-slot": "select-trigger",
|
|
1755
|
+
"data-size": size,
|
|
1756
|
+
className: cn(
|
|
1757
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1758
|
+
className
|
|
1759
|
+
),
|
|
1760
|
+
...props,
|
|
1761
|
+
children: [
|
|
1762
|
+
children,
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1764
|
+
import_select.Select.Icon,
|
|
1765
|
+
{
|
|
1766
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
1767
|
+
}
|
|
1768
|
+
)
|
|
1769
|
+
]
|
|
1770
|
+
}
|
|
1771
|
+
);
|
|
1772
|
+
}
|
|
1773
|
+
function SelectContent({
|
|
1774
|
+
className,
|
|
1775
|
+
children,
|
|
1776
|
+
side = "bottom",
|
|
1777
|
+
sideOffset = 4,
|
|
1778
|
+
align = "center",
|
|
1779
|
+
alignOffset = 0,
|
|
1780
|
+
alignItemWithTrigger = true,
|
|
1781
|
+
...props
|
|
1782
|
+
}) {
|
|
1783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1784
|
+
import_select.Select.Positioner,
|
|
1785
|
+
{
|
|
1786
|
+
side,
|
|
1787
|
+
sideOffset,
|
|
1788
|
+
align,
|
|
1789
|
+
alignOffset,
|
|
1790
|
+
alignItemWithTrigger,
|
|
1791
|
+
className: "isolate z-50",
|
|
1792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1793
|
+
import_select.Select.Popup,
|
|
1794
|
+
{
|
|
1795
|
+
"data-slot": "select-content",
|
|
1796
|
+
"data-align-trigger": alignItemWithTrigger,
|
|
1797
|
+
className: cn(
|
|
1798
|
+
"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
1799
|
+
className
|
|
1800
|
+
),
|
|
1801
|
+
...props,
|
|
1802
|
+
children: [
|
|
1803
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectScrollUpButton, {}),
|
|
1804
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_select.Select.List, { children }),
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectScrollDownButton, {})
|
|
1806
|
+
]
|
|
1807
|
+
}
|
|
1808
|
+
)
|
|
1809
|
+
}
|
|
1810
|
+
) });
|
|
1811
|
+
}
|
|
1812
|
+
function SelectLabel({
|
|
1813
|
+
className,
|
|
1814
|
+
...props
|
|
1815
|
+
}) {
|
|
1816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1817
|
+
import_select.Select.GroupLabel,
|
|
1818
|
+
{
|
|
1819
|
+
"data-slot": "select-label",
|
|
1820
|
+
className: cn("px-1.5 py-1 text-xs text-muted-foreground", className),
|
|
1821
|
+
...props
|
|
1822
|
+
}
|
|
1823
|
+
);
|
|
1824
|
+
}
|
|
1825
|
+
function SelectItem({
|
|
1826
|
+
className,
|
|
1827
|
+
children,
|
|
1828
|
+
...props
|
|
1829
|
+
}) {
|
|
1830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1831
|
+
import_select.Select.Item,
|
|
1832
|
+
{
|
|
1833
|
+
"data-slot": "select-item",
|
|
1834
|
+
className: cn(
|
|
1835
|
+
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1836
|
+
className
|
|
1837
|
+
),
|
|
1838
|
+
...props,
|
|
1839
|
+
children: [
|
|
1840
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_select.Select.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
|
|
1841
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1842
|
+
import_select.Select.ItemIndicator,
|
|
1843
|
+
{
|
|
1844
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
1845
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.CheckIcon, { className: "pointer-events-none" })
|
|
1846
|
+
}
|
|
1847
|
+
)
|
|
1848
|
+
]
|
|
1849
|
+
}
|
|
1850
|
+
);
|
|
1851
|
+
}
|
|
1852
|
+
function SelectSeparator({
|
|
1853
|
+
className,
|
|
1854
|
+
...props
|
|
1855
|
+
}) {
|
|
1856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1857
|
+
import_select.Select.Separator,
|
|
1858
|
+
{
|
|
1859
|
+
"data-slot": "select-separator",
|
|
1860
|
+
className: cn(
|
|
1861
|
+
"pointer-events-none -mx-1 my-1 h-px bg-border",
|
|
1862
|
+
className
|
|
1863
|
+
),
|
|
1864
|
+
...props
|
|
1865
|
+
}
|
|
1866
|
+
);
|
|
1867
|
+
}
|
|
1868
|
+
function SelectScrollUpButton({
|
|
1869
|
+
className,
|
|
1870
|
+
...props
|
|
1871
|
+
}) {
|
|
1872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1873
|
+
import_select.Select.ScrollUpArrow,
|
|
1874
|
+
{
|
|
1875
|
+
"data-slot": "select-scroll-up-button",
|
|
1876
|
+
className: cn(
|
|
1877
|
+
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
1878
|
+
className
|
|
1879
|
+
),
|
|
1880
|
+
...props,
|
|
1881
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.ChevronUpIcon, {})
|
|
1882
|
+
}
|
|
1883
|
+
);
|
|
1884
|
+
}
|
|
1885
|
+
function SelectScrollDownButton({
|
|
1886
|
+
className,
|
|
1887
|
+
...props
|
|
1888
|
+
}) {
|
|
1889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1890
|
+
import_select.Select.ScrollDownArrow,
|
|
1891
|
+
{
|
|
1892
|
+
"data-slot": "select-scroll-down-button",
|
|
1893
|
+
className: cn(
|
|
1894
|
+
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
1895
|
+
className
|
|
1896
|
+
),
|
|
1897
|
+
...props,
|
|
1898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.ChevronDownIcon, {})
|
|
1899
|
+
}
|
|
1900
|
+
);
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
// src/separator/index.tsx
|
|
1904
|
+
var import_separator = require("@base-ui/react/separator");
|
|
1905
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1906
|
+
function Separator({
|
|
1907
|
+
className,
|
|
1908
|
+
orientation = "horizontal",
|
|
1909
|
+
...props
|
|
1910
|
+
}) {
|
|
1911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1912
|
+
import_separator.Separator,
|
|
1913
|
+
{
|
|
1914
|
+
"data-slot": "separator",
|
|
1915
|
+
orientation,
|
|
1916
|
+
className: cn(
|
|
1917
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
1918
|
+
className
|
|
1919
|
+
),
|
|
1920
|
+
...props
|
|
1921
|
+
}
|
|
1922
|
+
);
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
// src/switch/index.tsx
|
|
1926
|
+
var import_switch = require("@base-ui/react/switch");
|
|
1927
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1928
|
+
function Switch({
|
|
1929
|
+
className,
|
|
1930
|
+
size = "default",
|
|
1931
|
+
...props
|
|
1932
|
+
}) {
|
|
1933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1934
|
+
import_switch.Switch.Root,
|
|
1935
|
+
{
|
|
1936
|
+
"data-slot": "switch",
|
|
1937
|
+
"data-size": size,
|
|
1938
|
+
className: cn(
|
|
1939
|
+
"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
1940
|
+
className
|
|
1941
|
+
),
|
|
1942
|
+
...props,
|
|
1943
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1944
|
+
import_switch.Switch.Thumb,
|
|
1945
|
+
{
|
|
1946
|
+
"data-slot": "switch-thumb",
|
|
1947
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
1948
|
+
}
|
|
1949
|
+
)
|
|
1950
|
+
}
|
|
1951
|
+
);
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
// src/tooltip/index.tsx
|
|
1955
|
+
var import_tooltip = require("@base-ui/react/tooltip");
|
|
1956
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1957
|
+
function TooltipProvider({
|
|
1958
|
+
delay = 0,
|
|
1959
|
+
...props
|
|
1960
|
+
}) {
|
|
1961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1962
|
+
import_tooltip.Tooltip.Provider,
|
|
1963
|
+
{
|
|
1964
|
+
"data-slot": "tooltip-provider",
|
|
1965
|
+
delay,
|
|
1966
|
+
...props
|
|
1967
|
+
}
|
|
1968
|
+
);
|
|
1969
|
+
}
|
|
1970
|
+
function Tooltip({ ...props }) {
|
|
1971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props });
|
|
1972
|
+
}
|
|
1973
|
+
function TooltipTrigger({ ...props }) {
|
|
1974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1975
|
+
}
|
|
1976
|
+
function TooltipContent({
|
|
1977
|
+
className,
|
|
1978
|
+
side = "top",
|
|
1979
|
+
sideOffset = 4,
|
|
1980
|
+
align = "center",
|
|
1981
|
+
alignOffset = 0,
|
|
1982
|
+
children,
|
|
1983
|
+
...props
|
|
1984
|
+
}) {
|
|
1985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1986
|
+
import_tooltip.Tooltip.Positioner,
|
|
1987
|
+
{
|
|
1988
|
+
align,
|
|
1989
|
+
alignOffset,
|
|
1990
|
+
side,
|
|
1991
|
+
sideOffset,
|
|
1992
|
+
className: "isolate z-50",
|
|
1993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1994
|
+
import_tooltip.Tooltip.Popup,
|
|
1995
|
+
{
|
|
1996
|
+
"data-slot": "tooltip-content",
|
|
1997
|
+
className: cn(
|
|
1998
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
1999
|
+
className
|
|
2000
|
+
),
|
|
2001
|
+
...props,
|
|
2002
|
+
children: [
|
|
2003
|
+
children,
|
|
2004
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
|
|
2005
|
+
]
|
|
2006
|
+
}
|
|
2007
|
+
)
|
|
2008
|
+
}
|
|
2009
|
+
) });
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
// src/breadcrumb/index.tsx
|
|
2013
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2014
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2015
|
+
function Breadcrumb({ ...props }) {
|
|
2016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
2017
|
+
}
|
|
2018
|
+
function BreadcrumbList({ className, ...props }) {
|
|
2019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2020
|
+
"ol",
|
|
2021
|
+
{
|
|
2022
|
+
"data-slot": "breadcrumb-list",
|
|
2023
|
+
className: cn(
|
|
2024
|
+
"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground sm:gap-2.5",
|
|
2025
|
+
className
|
|
2026
|
+
),
|
|
2027
|
+
...props
|
|
2028
|
+
}
|
|
2029
|
+
);
|
|
2030
|
+
}
|
|
2031
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
2032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2033
|
+
"li",
|
|
2034
|
+
{
|
|
2035
|
+
"data-slot": "breadcrumb-item",
|
|
2036
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
2037
|
+
...props
|
|
2038
|
+
}
|
|
2039
|
+
);
|
|
2040
|
+
}
|
|
2041
|
+
function BreadcrumbLink({ className, href, renderLink, children, ...props }) {
|
|
2042
|
+
const cls = cn("transition-colors hover:text-foreground", className);
|
|
2043
|
+
if (renderLink) return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: renderLink({ href, className: cls, children }) });
|
|
2044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { "data-slot": "breadcrumb-link", href, className: cls, ...props, children });
|
|
2045
|
+
}
|
|
2046
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
2047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2048
|
+
"span",
|
|
2049
|
+
{
|
|
2050
|
+
"data-slot": "breadcrumb-page",
|
|
2051
|
+
role: "link",
|
|
2052
|
+
"aria-disabled": "true",
|
|
2053
|
+
"aria-current": "page",
|
|
2054
|
+
className: cn("font-medium text-foreground", className),
|
|
2055
|
+
...props
|
|
2056
|
+
}
|
|
2057
|
+
);
|
|
2058
|
+
}
|
|
2059
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
2060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2061
|
+
"li",
|
|
2062
|
+
{
|
|
2063
|
+
"data-slot": "breadcrumb-separator",
|
|
2064
|
+
role: "presentation",
|
|
2065
|
+
"aria-hidden": "true",
|
|
2066
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
2067
|
+
...props,
|
|
2068
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react9.ChevronRight, {})
|
|
2069
|
+
}
|
|
2070
|
+
);
|
|
2071
|
+
}
|
|
2072
|
+
function BreadcrumbEllipsis({ className, ...props }) {
|
|
2073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2074
|
+
"span",
|
|
2075
|
+
{
|
|
2076
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
2077
|
+
role: "presentation",
|
|
2078
|
+
"aria-hidden": "true",
|
|
2079
|
+
className: cn("flex size-6 items-center justify-center", className),
|
|
2080
|
+
...props,
|
|
2081
|
+
children: [
|
|
2082
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react9.MoreHorizontal, { className: "size-4" }),
|
|
2083
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "sr-only", children: "More" })
|
|
2084
|
+
]
|
|
2085
|
+
}
|
|
2086
|
+
);
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
// src/kbd/index.tsx
|
|
2090
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2091
|
+
function Kbd({ className, ...props }) {
|
|
2092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2093
|
+
"kbd",
|
|
2094
|
+
{
|
|
2095
|
+
"data-slot": "kbd",
|
|
2096
|
+
className: cn(
|
|
2097
|
+
"pointer-events-none inline-flex h-5 min-w-5 select-none items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground",
|
|
2098
|
+
className
|
|
2099
|
+
),
|
|
2100
|
+
...props
|
|
2101
|
+
}
|
|
2102
|
+
);
|
|
2103
|
+
}
|
|
2104
|
+
function KbdGroup({ className, ...props }) {
|
|
2105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2106
|
+
"div",
|
|
2107
|
+
{
|
|
2108
|
+
"data-slot": "kbd-group",
|
|
2109
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
2110
|
+
...props
|
|
2111
|
+
}
|
|
2112
|
+
);
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
// src/pagination/index.tsx
|
|
2116
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2117
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2118
|
+
function Pagination({ className, ...props }) {
|
|
2119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2120
|
+
"nav",
|
|
2121
|
+
{
|
|
2122
|
+
"aria-label": "pagination",
|
|
2123
|
+
"data-slot": "pagination",
|
|
2124
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
2125
|
+
...props
|
|
2126
|
+
}
|
|
2127
|
+
);
|
|
2128
|
+
}
|
|
2129
|
+
function PaginationContent({ className, ...props }) {
|
|
2130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2131
|
+
"ul",
|
|
2132
|
+
{
|
|
2133
|
+
"data-slot": "pagination-content",
|
|
2134
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
2135
|
+
...props
|
|
2136
|
+
}
|
|
2137
|
+
);
|
|
2138
|
+
}
|
|
2139
|
+
function PaginationItem({ ...props }) {
|
|
2140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
2141
|
+
}
|
|
2142
|
+
function PaginationLink({ className, isActive, size = "icon-sm", ...props }) {
|
|
2143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2144
|
+
"button",
|
|
2145
|
+
{
|
|
2146
|
+
type: "button",
|
|
2147
|
+
"data-slot": "pagination-link",
|
|
2148
|
+
"data-active": isActive,
|
|
2149
|
+
"aria-current": isActive ? "page" : void 0,
|
|
2150
|
+
className: cn(buttonVariants({ variant: isActive ? "outline" : "ghost", size }), className),
|
|
2151
|
+
...props
|
|
2152
|
+
}
|
|
2153
|
+
);
|
|
2154
|
+
}
|
|
2155
|
+
function PaginationPrevious({ className, ...props }) {
|
|
2156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2157
|
+
PaginationLink,
|
|
2158
|
+
{
|
|
2159
|
+
"aria-label": "Go to previous page",
|
|
2160
|
+
size: "default",
|
|
2161
|
+
className: cn("gap-1 px-2.5", className),
|
|
2162
|
+
...props,
|
|
2163
|
+
children: [
|
|
2164
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react10.ChevronLeft, { className: "size-4" }),
|
|
2165
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "hidden sm:inline", children: "Previous" })
|
|
2166
|
+
]
|
|
2167
|
+
}
|
|
2168
|
+
);
|
|
2169
|
+
}
|
|
2170
|
+
function PaginationNext({ className, ...props }) {
|
|
2171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2172
|
+
PaginationLink,
|
|
2173
|
+
{
|
|
2174
|
+
"aria-label": "Go to next page",
|
|
2175
|
+
size: "default",
|
|
2176
|
+
className: cn("gap-1 px-2.5", className),
|
|
2177
|
+
...props,
|
|
2178
|
+
children: [
|
|
2179
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "hidden sm:inline", children: "Next" }),
|
|
2180
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react10.ChevronRight, { className: "size-4" })
|
|
2181
|
+
]
|
|
2182
|
+
}
|
|
2183
|
+
);
|
|
2184
|
+
}
|
|
2185
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
2186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2187
|
+
"span",
|
|
2188
|
+
{
|
|
2189
|
+
"aria-hidden": true,
|
|
2190
|
+
"data-slot": "pagination-ellipsis",
|
|
2191
|
+
className: cn("flex size-8 items-center justify-center", className),
|
|
2192
|
+
...props,
|
|
2193
|
+
children: [
|
|
2194
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react10.MoreHorizontal, { className: "size-4" }),
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
2196
|
+
]
|
|
2197
|
+
}
|
|
2198
|
+
);
|
|
2199
|
+
}
|
|
2200
|
+
function getPaginationRange(page, pageCount, siblingCount = 1) {
|
|
2201
|
+
const totalSlots = siblingCount * 2 + 5;
|
|
2202
|
+
if (pageCount <= totalSlots) return Array.from({ length: pageCount }, (_, i) => i + 1);
|
|
2203
|
+
const leftSibling = Math.max(page - siblingCount, 1);
|
|
2204
|
+
const rightSibling = Math.min(page + siblingCount, pageCount);
|
|
2205
|
+
const showLeftEllipsis = leftSibling > 2;
|
|
2206
|
+
const showRightEllipsis = rightSibling < pageCount - 1;
|
|
2207
|
+
const range = [1];
|
|
2208
|
+
if (showLeftEllipsis) range.push("ellipsis");
|
|
2209
|
+
for (let i = leftSibling === 1 ? 2 : leftSibling; i <= (rightSibling === pageCount ? pageCount - 1 : rightSibling); i++) {
|
|
2210
|
+
if (i > 1 && i < pageCount) range.push(i);
|
|
2211
|
+
}
|
|
2212
|
+
if (showRightEllipsis) range.push("ellipsis");
|
|
2213
|
+
range.push(pageCount);
|
|
2214
|
+
return range;
|
|
2215
|
+
}
|
|
2216
|
+
function PaginationBar({ page, pageCount, onPageChange, siblingCount, className }) {
|
|
2217
|
+
if (pageCount <= 1) return null;
|
|
2218
|
+
const range = getPaginationRange(page, pageCount, siblingCount);
|
|
2219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Pagination, { className, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(PaginationContent, { children: [
|
|
2220
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2221
|
+
PaginationPrevious,
|
|
2222
|
+
{
|
|
2223
|
+
disabled: page <= 1,
|
|
2224
|
+
onClick: () => onPageChange(page - 1)
|
|
2225
|
+
}
|
|
2226
|
+
) }),
|
|
2227
|
+
range.map(
|
|
2228
|
+
(p, i) => p === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaginationEllipsis, {}) }, `ellipsis-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaginationLink, { isActive: p === page, onClick: () => onPageChange(p), children: p }) }, p)
|
|
2229
|
+
),
|
|
2230
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2231
|
+
PaginationNext,
|
|
2232
|
+
{
|
|
2233
|
+
disabled: page >= pageCount,
|
|
2234
|
+
onClick: () => onPageChange(page + 1)
|
|
2235
|
+
}
|
|
2236
|
+
) })
|
|
2237
|
+
] }) });
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
// src/hover-card/index.tsx
|
|
2241
|
+
var import_preview_card = require("@base-ui/react/preview-card");
|
|
2242
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2243
|
+
function HoverCard({ ...props }) {
|
|
2244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_preview_card.PreviewCard.Root, { "data-slot": "hover-card", ...props });
|
|
2245
|
+
}
|
|
2246
|
+
function HoverCardTrigger({ ...props }) {
|
|
2247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_preview_card.PreviewCard.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
2248
|
+
}
|
|
2249
|
+
function HoverCardContent({
|
|
2250
|
+
className,
|
|
2251
|
+
align = "center",
|
|
2252
|
+
sideOffset = 8,
|
|
2253
|
+
side = "bottom",
|
|
2254
|
+
...props
|
|
2255
|
+
}) {
|
|
2256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_preview_card.PreviewCard.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2257
|
+
import_preview_card.PreviewCard.Positioner,
|
|
2258
|
+
{
|
|
2259
|
+
align,
|
|
2260
|
+
sideOffset,
|
|
2261
|
+
side,
|
|
2262
|
+
className: "isolate z-50",
|
|
2263
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2264
|
+
import_preview_card.PreviewCard.Popup,
|
|
2265
|
+
{
|
|
2266
|
+
"data-slot": "hover-card-content",
|
|
2267
|
+
className: cn(
|
|
2268
|
+
"z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-3 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
2269
|
+
className
|
|
2270
|
+
),
|
|
2271
|
+
...props
|
|
2272
|
+
}
|
|
2273
|
+
)
|
|
2274
|
+
}
|
|
2275
|
+
) });
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
// src/context-menu/index.tsx
|
|
2279
|
+
var import_context_menu = require("@base-ui/react/context-menu");
|
|
2280
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2281
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2282
|
+
function ContextMenu({ ...props }) {
|
|
2283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_context_menu.ContextMenu.Root, { "data-slot": "context-menu", ...props });
|
|
2284
|
+
}
|
|
2285
|
+
function ContextMenuTrigger({ ...props }) {
|
|
2286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_context_menu.ContextMenu.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
2287
|
+
}
|
|
2288
|
+
function ContextMenuGroup({ ...props }) {
|
|
2289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_context_menu.ContextMenu.Group, { "data-slot": "context-menu-group", ...props });
|
|
2290
|
+
}
|
|
2291
|
+
var popupClasses2 = "z-50 min-w-40 origin-(--transform-origin) rounded-lg bg-popover p-1 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95";
|
|
2292
|
+
function ContextMenuContent({
|
|
2293
|
+
className,
|
|
2294
|
+
...props
|
|
2295
|
+
}) {
|
|
2296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_context_menu.ContextMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_context_menu.ContextMenu.Positioner, { className: "isolate z-50", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2297
|
+
import_context_menu.ContextMenu.Popup,
|
|
2298
|
+
{
|
|
2299
|
+
"data-slot": "context-menu-content",
|
|
2300
|
+
className: cn(popupClasses2, className),
|
|
2301
|
+
...props
|
|
2302
|
+
}
|
|
2303
|
+
) }) });
|
|
2304
|
+
}
|
|
2305
|
+
var itemClasses2 = "relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden data-highlighted:bg-muted data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0";
|
|
2306
|
+
function ContextMenuItem({
|
|
2307
|
+
className,
|
|
2308
|
+
...props
|
|
2309
|
+
}) {
|
|
2310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2311
|
+
import_context_menu.ContextMenu.Item,
|
|
2312
|
+
{
|
|
2313
|
+
"data-slot": "context-menu-item",
|
|
2314
|
+
className: cn(itemClasses2, className),
|
|
2315
|
+
...props
|
|
2316
|
+
}
|
|
2317
|
+
);
|
|
2318
|
+
}
|
|
2319
|
+
function ContextMenuCheckboxItem({
|
|
2320
|
+
className,
|
|
2321
|
+
children,
|
|
2322
|
+
...props
|
|
2323
|
+
}) {
|
|
2324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2325
|
+
import_context_menu.ContextMenu.CheckboxItem,
|
|
2326
|
+
{
|
|
2327
|
+
"data-slot": "context-menu-checkbox-item",
|
|
2328
|
+
className: cn(itemClasses2, "pl-7", className),
|
|
2329
|
+
...props,
|
|
2330
|
+
children: [
|
|
2331
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "absolute left-1.5 flex size-4 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_context_menu.ContextMenu.CheckboxItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react11.Check, { className: "size-3.5" }) }) }),
|
|
2332
|
+
children
|
|
2333
|
+
]
|
|
2334
|
+
}
|
|
2335
|
+
);
|
|
2336
|
+
}
|
|
2337
|
+
function ContextMenuLabel({
|
|
2338
|
+
className,
|
|
2339
|
+
...props
|
|
2340
|
+
}) {
|
|
2341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2342
|
+
import_context_menu.ContextMenu.GroupLabel,
|
|
2343
|
+
{
|
|
2344
|
+
"data-slot": "context-menu-label",
|
|
2345
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className),
|
|
2346
|
+
...props
|
|
2347
|
+
}
|
|
2348
|
+
);
|
|
2349
|
+
}
|
|
2350
|
+
function ContextMenuSeparator({
|
|
2351
|
+
className,
|
|
2352
|
+
...props
|
|
2353
|
+
}) {
|
|
2354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2355
|
+
import_context_menu.ContextMenu.Separator,
|
|
2356
|
+
{
|
|
2357
|
+
"data-slot": "context-menu-separator",
|
|
2358
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
2359
|
+
...props
|
|
2360
|
+
}
|
|
2361
|
+
);
|
|
2362
|
+
}
|
|
2363
|
+
function ContextMenuSub({ ...props }) {
|
|
2364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_context_menu.ContextMenu.SubmenuRoot, { ...props });
|
|
2365
|
+
}
|
|
2366
|
+
function ContextMenuSubTrigger({
|
|
2367
|
+
className,
|
|
2368
|
+
children,
|
|
2369
|
+
...props
|
|
2370
|
+
}) {
|
|
2371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2372
|
+
import_context_menu.ContextMenu.SubmenuTrigger,
|
|
2373
|
+
{
|
|
2374
|
+
"data-slot": "context-menu-sub-trigger",
|
|
2375
|
+
className: cn(itemClasses2, "data-popup-open:bg-muted", className),
|
|
2376
|
+
...props,
|
|
2377
|
+
children: [
|
|
2378
|
+
children,
|
|
2379
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react11.ChevronRight, { className: "ml-auto size-4" })
|
|
2380
|
+
]
|
|
2381
|
+
}
|
|
2382
|
+
);
|
|
2383
|
+
}
|
|
2384
|
+
function ContextMenuSubContent({
|
|
2385
|
+
className,
|
|
2386
|
+
...props
|
|
2387
|
+
}) {
|
|
2388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_context_menu.ContextMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_context_menu.ContextMenu.Positioner, { className: "isolate z-50", side: "inline-end", sideOffset: 4, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2389
|
+
import_context_menu.ContextMenu.Popup,
|
|
2390
|
+
{
|
|
2391
|
+
"data-slot": "context-menu-sub-content",
|
|
2392
|
+
className: cn(popupClasses2, className),
|
|
2393
|
+
...props
|
|
2394
|
+
}
|
|
2395
|
+
) }) });
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
// src/combobox/index.tsx
|
|
2399
|
+
var import_combobox = require("@base-ui/react/combobox");
|
|
2400
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2401
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2402
|
+
function Combobox({
|
|
2403
|
+
...props
|
|
2404
|
+
}) {
|
|
2405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_combobox.Combobox.Root, { "data-slot": "combobox", ...props });
|
|
2406
|
+
}
|
|
2407
|
+
function ComboboxInputGroup({ className, ...props }) {
|
|
2408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2409
|
+
import_combobox.Combobox.InputGroup,
|
|
2410
|
+
{
|
|
2411
|
+
"data-slot": "combobox-input-group",
|
|
2412
|
+
className: cn("relative flex items-center", className),
|
|
2413
|
+
...props
|
|
2414
|
+
}
|
|
2415
|
+
);
|
|
2416
|
+
}
|
|
2417
|
+
function ComboboxInput({ className, ...props }) {
|
|
2418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2419
|
+
import_combobox.Combobox.Input,
|
|
2420
|
+
{
|
|
2421
|
+
"data-slot": "combobox-input",
|
|
2422
|
+
className: cn(
|
|
2423
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 pr-8 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2424
|
+
className
|
|
2425
|
+
),
|
|
2426
|
+
...props
|
|
2427
|
+
}
|
|
2428
|
+
);
|
|
2429
|
+
}
|
|
2430
|
+
function ComboboxTrigger({ className, ...props }) {
|
|
2431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2432
|
+
import_combobox.Combobox.Trigger,
|
|
2433
|
+
{
|
|
2434
|
+
"data-slot": "combobox-trigger",
|
|
2435
|
+
className: cn(
|
|
2436
|
+
"absolute right-1.5 inline-flex size-5 items-center justify-center rounded text-muted-foreground outline-none hover:text-foreground",
|
|
2437
|
+
className
|
|
2438
|
+
),
|
|
2439
|
+
...props,
|
|
2440
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react12.ChevronsUpDown, { className: "size-3.5" })
|
|
2441
|
+
}
|
|
2442
|
+
);
|
|
2443
|
+
}
|
|
2444
|
+
function ComboboxClear({ className, ...props }) {
|
|
2445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2446
|
+
import_combobox.Combobox.Clear,
|
|
2447
|
+
{
|
|
2448
|
+
"data-slot": "combobox-clear",
|
|
2449
|
+
className: cn(
|
|
2450
|
+
"absolute right-1.5 inline-flex size-5 items-center justify-center rounded text-muted-foreground outline-none hover:text-foreground",
|
|
2451
|
+
className
|
|
2452
|
+
),
|
|
2453
|
+
...props,
|
|
2454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react12.X, { className: "size-3.5" })
|
|
2455
|
+
}
|
|
2456
|
+
);
|
|
2457
|
+
}
|
|
2458
|
+
function ComboboxPortal({ ...props }) {
|
|
2459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_combobox.Combobox.Portal, { ...props });
|
|
2460
|
+
}
|
|
2461
|
+
function ComboboxPositioner({
|
|
2462
|
+
className,
|
|
2463
|
+
align = "start",
|
|
2464
|
+
sideOffset = 4,
|
|
2465
|
+
...props
|
|
2466
|
+
}) {
|
|
2467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2468
|
+
import_combobox.Combobox.Positioner,
|
|
2469
|
+
{
|
|
2470
|
+
"data-slot": "combobox-positioner",
|
|
2471
|
+
align,
|
|
2472
|
+
sideOffset,
|
|
2473
|
+
className: cn("isolate z-50", className),
|
|
2474
|
+
...props
|
|
2475
|
+
}
|
|
2476
|
+
);
|
|
2477
|
+
}
|
|
2478
|
+
function ComboboxPopup({ className, ...props }) {
|
|
2479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2480
|
+
import_combobox.Combobox.Popup,
|
|
2481
|
+
{
|
|
2482
|
+
"data-slot": "combobox-popup",
|
|
2483
|
+
className: cn(
|
|
2484
|
+
"z-50 max-h-72 w-(--anchor-width) min-w-40 origin-(--transform-origin) overflow-auto rounded-lg bg-popover p-1 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
2485
|
+
className
|
|
2486
|
+
),
|
|
2487
|
+
...props
|
|
2488
|
+
}
|
|
2489
|
+
);
|
|
2490
|
+
}
|
|
2491
|
+
function ComboboxList({ ...props }) {
|
|
2492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_combobox.Combobox.List, { "data-slot": "combobox-list", ...props });
|
|
2493
|
+
}
|
|
2494
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
2495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2496
|
+
import_combobox.Combobox.Empty,
|
|
2497
|
+
{
|
|
2498
|
+
"data-slot": "combobox-empty",
|
|
2499
|
+
className: cn("px-2 py-4 text-center text-sm text-muted-foreground", className),
|
|
2500
|
+
...props
|
|
2501
|
+
}
|
|
2502
|
+
);
|
|
2503
|
+
}
|
|
2504
|
+
function ComboboxGroup({ ...props }) {
|
|
2505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_combobox.Combobox.Group, { "data-slot": "combobox-group", ...props });
|
|
2506
|
+
}
|
|
2507
|
+
function ComboboxGroupLabel({ className, ...props }) {
|
|
2508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2509
|
+
import_combobox.Combobox.GroupLabel,
|
|
2510
|
+
{
|
|
2511
|
+
"data-slot": "combobox-group-label",
|
|
2512
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className),
|
|
2513
|
+
...props
|
|
2514
|
+
}
|
|
2515
|
+
);
|
|
2516
|
+
}
|
|
2517
|
+
function ComboboxItem({ className, children, ...props }) {
|
|
2518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2519
|
+
import_combobox.Combobox.Item,
|
|
2520
|
+
{
|
|
2521
|
+
"data-slot": "combobox-item",
|
|
2522
|
+
className: cn(
|
|
2523
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-md py-1.5 pl-7 pr-2 text-sm outline-hidden data-highlighted:bg-muted data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2524
|
+
className
|
|
2525
|
+
),
|
|
2526
|
+
...props,
|
|
2527
|
+
children: [
|
|
2528
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "absolute left-1.5 flex size-4 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_combobox.Combobox.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react12.Check, { className: "size-3.5" }) }) }),
|
|
2529
|
+
children
|
|
2530
|
+
]
|
|
2531
|
+
}
|
|
2532
|
+
);
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
// src/carousel/index.tsx
|
|
2536
|
+
var React3 = __toESM(require("react"));
|
|
2537
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2538
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2539
|
+
var CarouselContext = React3.createContext(null);
|
|
2540
|
+
function useCarousel() {
|
|
2541
|
+
const ctx = React3.useContext(CarouselContext);
|
|
2542
|
+
if (!ctx) throw new Error("Carousel parts must be used within <Carousel>");
|
|
2543
|
+
return ctx;
|
|
2544
|
+
}
|
|
2545
|
+
function Carousel({ orientation = "horizontal", className, children, ...props }) {
|
|
2546
|
+
const trackRef = React3.useRef(null);
|
|
2547
|
+
const [canScrollPrev, setCanScrollPrev] = React3.useState(false);
|
|
2548
|
+
const [canScrollNext, setCanScrollNext] = React3.useState(false);
|
|
2549
|
+
const updateScrollState = React3.useCallback(() => {
|
|
2550
|
+
const el = trackRef.current;
|
|
2551
|
+
if (!el) return;
|
|
2552
|
+
if (orientation === "horizontal") {
|
|
2553
|
+
setCanScrollPrev(el.scrollLeft > 4);
|
|
2554
|
+
setCanScrollNext(el.scrollLeft < el.scrollWidth - el.clientWidth - 4);
|
|
2555
|
+
} else {
|
|
2556
|
+
setCanScrollPrev(el.scrollTop > 4);
|
|
2557
|
+
setCanScrollNext(el.scrollTop < el.scrollHeight - el.clientHeight - 4);
|
|
2558
|
+
}
|
|
2559
|
+
}, [orientation]);
|
|
2560
|
+
React3.useEffect(() => {
|
|
2561
|
+
const el = trackRef.current;
|
|
2562
|
+
if (!el) return;
|
|
2563
|
+
updateScrollState();
|
|
2564
|
+
el.addEventListener("scroll", updateScrollState, { passive: true });
|
|
2565
|
+
const ro = new ResizeObserver(updateScrollState);
|
|
2566
|
+
ro.observe(el);
|
|
2567
|
+
return () => {
|
|
2568
|
+
el.removeEventListener("scroll", updateScrollState);
|
|
2569
|
+
ro.disconnect();
|
|
2570
|
+
};
|
|
2571
|
+
}, [updateScrollState]);
|
|
2572
|
+
const scrollByAmount = React3.useCallback(
|
|
2573
|
+
(dir) => {
|
|
2574
|
+
const el = trackRef.current;
|
|
2575
|
+
if (!el) return;
|
|
2576
|
+
const amount = (orientation === "horizontal" ? el.clientWidth : el.clientHeight) * 0.9 * dir;
|
|
2577
|
+
el.scrollBy(
|
|
2578
|
+
orientation === "horizontal" ? { left: amount, behavior: "smooth" } : { top: amount, behavior: "smooth" }
|
|
2579
|
+
);
|
|
2580
|
+
},
|
|
2581
|
+
[orientation]
|
|
2582
|
+
);
|
|
2583
|
+
const onKeyDown = (e) => {
|
|
2584
|
+
if (orientation === "horizontal" && e.key === "ArrowLeft") scrollByAmount(-1);
|
|
2585
|
+
else if (orientation === "horizontal" && e.key === "ArrowRight") scrollByAmount(1);
|
|
2586
|
+
else if (orientation === "vertical" && e.key === "ArrowUp") scrollByAmount(-1);
|
|
2587
|
+
else if (orientation === "vertical" && e.key === "ArrowDown") scrollByAmount(1);
|
|
2588
|
+
else return;
|
|
2589
|
+
e.preventDefault();
|
|
2590
|
+
};
|
|
2591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CarouselContext.Provider, { value: { trackRef, orientation, scrollByAmount, canScrollPrev, canScrollNext }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2592
|
+
"div",
|
|
2593
|
+
{
|
|
2594
|
+
"data-slot": "carousel",
|
|
2595
|
+
role: "region",
|
|
2596
|
+
"aria-roledescription": "carousel",
|
|
2597
|
+
className: cn("relative", className),
|
|
2598
|
+
onKeyDownCapture: onKeyDown,
|
|
2599
|
+
...props,
|
|
2600
|
+
children
|
|
2601
|
+
}
|
|
2602
|
+
) });
|
|
2603
|
+
}
|
|
2604
|
+
function CarouselContent({ className, ...props }) {
|
|
2605
|
+
const { trackRef, orientation } = useCarousel();
|
|
2606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2607
|
+
"div",
|
|
2608
|
+
{
|
|
2609
|
+
ref: trackRef,
|
|
2610
|
+
"data-slot": "carousel-content",
|
|
2611
|
+
className: cn(
|
|
2612
|
+
"flex snap-x snap-mandatory overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
2613
|
+
orientation === "vertical" && "snap-y flex-col overflow-y-auto",
|
|
2614
|
+
className
|
|
2615
|
+
),
|
|
2616
|
+
...props
|
|
2617
|
+
}
|
|
2618
|
+
) });
|
|
2619
|
+
}
|
|
2620
|
+
function CarouselItem({ className, ...props }) {
|
|
2621
|
+
const { orientation } = useCarousel();
|
|
2622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2623
|
+
"div",
|
|
2624
|
+
{
|
|
2625
|
+
"data-slot": "carousel-item",
|
|
2626
|
+
role: "group",
|
|
2627
|
+
"aria-roledescription": "slide",
|
|
2628
|
+
className: cn(
|
|
2629
|
+
"min-w-0 shrink-0 grow-0 snap-start basis-full",
|
|
2630
|
+
orientation === "vertical" && "basis-auto",
|
|
2631
|
+
className
|
|
2632
|
+
),
|
|
2633
|
+
...props
|
|
2634
|
+
}
|
|
2635
|
+
);
|
|
2636
|
+
}
|
|
2637
|
+
function CarouselPrevious({ className, ...props }) {
|
|
2638
|
+
const { scrollByAmount, canScrollPrev, orientation } = useCarousel();
|
|
2639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2640
|
+
"button",
|
|
2641
|
+
{
|
|
2642
|
+
type: "button",
|
|
2643
|
+
"data-slot": "carousel-previous",
|
|
2644
|
+
"aria-label": "Previous slide",
|
|
2645
|
+
disabled: !canScrollPrev,
|
|
2646
|
+
onClick: () => scrollByAmount(-1),
|
|
2647
|
+
className: cn(
|
|
2648
|
+
buttonVariants({ variant: "outline", size: "icon-sm" }),
|
|
2649
|
+
"absolute rounded-full",
|
|
2650
|
+
orientation === "horizontal" ? "top-1/2 left-2 -translate-y-1/2" : "top-2 left-1/2 -translate-x-1/2 rotate-90",
|
|
2651
|
+
className
|
|
2652
|
+
),
|
|
2653
|
+
...props,
|
|
2654
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react13.ChevronLeft, { className: "size-4" })
|
|
2655
|
+
}
|
|
2656
|
+
);
|
|
2657
|
+
}
|
|
2658
|
+
function CarouselNext({ className, ...props }) {
|
|
2659
|
+
const { scrollByAmount, canScrollNext, orientation } = useCarousel();
|
|
2660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2661
|
+
"button",
|
|
2662
|
+
{
|
|
2663
|
+
type: "button",
|
|
2664
|
+
"data-slot": "carousel-next",
|
|
2665
|
+
"aria-label": "Next slide",
|
|
2666
|
+
disabled: !canScrollNext,
|
|
2667
|
+
onClick: () => scrollByAmount(1),
|
|
2668
|
+
className: cn(
|
|
2669
|
+
buttonVariants({ variant: "outline", size: "icon-sm" }),
|
|
2670
|
+
"absolute rounded-full",
|
|
2671
|
+
orientation === "horizontal" ? "top-1/2 right-2 -translate-y-1/2" : "bottom-2 left-1/2 -translate-x-1/2 rotate-90",
|
|
2672
|
+
className
|
|
2673
|
+
),
|
|
2674
|
+
...props,
|
|
2675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react13.ChevronRight, { className: "size-4" })
|
|
2676
|
+
}
|
|
2677
|
+
);
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
// src/calendar/index.tsx
|
|
2681
|
+
var React4 = __toESM(require("react"));
|
|
2682
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2683
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2684
|
+
var WEEKDAY_LABELS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
2685
|
+
function startOfDay(d) {
|
|
2686
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
2687
|
+
}
|
|
2688
|
+
function isSameDay(a, b) {
|
|
2689
|
+
return !!a && !!b && startOfDay(a).getTime() === startOfDay(b).getTime();
|
|
2690
|
+
}
|
|
2691
|
+
function isBetween(d, from, to) {
|
|
2692
|
+
if (!from || !to) return false;
|
|
2693
|
+
const t = startOfDay(d).getTime();
|
|
2694
|
+
return t > startOfDay(from).getTime() && t < startOfDay(to).getTime();
|
|
2695
|
+
}
|
|
2696
|
+
function getMonthGrid(year, month) {
|
|
2697
|
+
const first = new Date(year, month, 1);
|
|
2698
|
+
const gridStart = new Date(year, month, 1 - first.getDay());
|
|
2699
|
+
return Array.from({ length: 42 }, (_, i) => {
|
|
2700
|
+
const d = new Date(gridStart);
|
|
2701
|
+
d.setDate(gridStart.getDate() + i);
|
|
2702
|
+
return d;
|
|
2703
|
+
});
|
|
2704
|
+
}
|
|
2705
|
+
function Calendar(props) {
|
|
2706
|
+
const { className, minDate, maxDate, disabled } = props;
|
|
2707
|
+
const [uncontrolledMonth, setUncontrolledMonth] = React4.useState(
|
|
2708
|
+
() => props.defaultMonth ?? props.month ?? /* @__PURE__ */ new Date()
|
|
2709
|
+
);
|
|
2710
|
+
const month = props.month ?? uncontrolledMonth;
|
|
2711
|
+
const setMonth = (next) => {
|
|
2712
|
+
setUncontrolledMonth(next);
|
|
2713
|
+
props.onMonthChange?.(next);
|
|
2714
|
+
};
|
|
2715
|
+
const isDisabled = (d) => {
|
|
2716
|
+
if (minDate && startOfDay(d) < startOfDay(minDate)) return true;
|
|
2717
|
+
if (maxDate && startOfDay(d) > startOfDay(maxDate)) return true;
|
|
2718
|
+
return disabled?.(d) ?? false;
|
|
2719
|
+
};
|
|
2720
|
+
const handleSelect = (d) => {
|
|
2721
|
+
if (isDisabled(d)) return;
|
|
2722
|
+
if (props.mode === "range") {
|
|
2723
|
+
const current = props.selected;
|
|
2724
|
+
if (!current?.from || current.from && current.to) {
|
|
2725
|
+
props.onSelect?.({ from: d, to: void 0 });
|
|
2726
|
+
} else if (startOfDay(d) < startOfDay(current.from)) {
|
|
2727
|
+
props.onSelect?.({ from: d, to: current.from });
|
|
2728
|
+
} else {
|
|
2729
|
+
props.onSelect?.({ from: current.from, to: d });
|
|
2730
|
+
}
|
|
2731
|
+
} else {
|
|
2732
|
+
props.onSelect?.(isSameDay(props.selected, d) ? void 0 : d);
|
|
2733
|
+
}
|
|
2734
|
+
};
|
|
2735
|
+
const grid = getMonthGrid(month.getFullYear(), month.getMonth());
|
|
2736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { "data-slot": "calendar", className: cn("w-fit p-2", className), children: [
|
|
2737
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { "data-slot": "calendar-header", className: "flex items-center justify-between px-1 pb-2", children: [
|
|
2738
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2739
|
+
"button",
|
|
2740
|
+
{
|
|
2741
|
+
type: "button",
|
|
2742
|
+
"aria-label": "Previous month",
|
|
2743
|
+
onClick: () => setMonth(new Date(month.getFullYear(), month.getMonth() - 1, 1)),
|
|
2744
|
+
className: cn(buttonVariants({ variant: "ghost", size: "icon-sm" })),
|
|
2745
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react14.ChevronLeft, { className: "size-4" })
|
|
2746
|
+
}
|
|
2747
|
+
),
|
|
2748
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "calendar-label", className: "text-sm font-medium", children: month.toLocaleDateString(void 0, { month: "long", year: "numeric" }) }),
|
|
2749
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2750
|
+
"button",
|
|
2751
|
+
{
|
|
2752
|
+
type: "button",
|
|
2753
|
+
"aria-label": "Next month",
|
|
2754
|
+
onClick: () => setMonth(new Date(month.getFullYear(), month.getMonth() + 1, 1)),
|
|
2755
|
+
className: cn(buttonVariants({ variant: "ghost", size: "icon-sm" })),
|
|
2756
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react14.ChevronRight, { className: "size-4" })
|
|
2757
|
+
}
|
|
2758
|
+
)
|
|
2759
|
+
] }),
|
|
2760
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "calendar-weekdays", className: "grid grid-cols-7 gap-0.5 px-1", children: WEEKDAY_LABELS.map((w) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex h-8 items-center justify-center text-xs font-medium text-muted-foreground", children: w }, w)) }),
|
|
2761
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "calendar-grid", className: "grid grid-cols-7 gap-0.5 px-1", children: grid.map((d) => {
|
|
2762
|
+
const outsideMonth = d.getMonth() !== month.getMonth();
|
|
2763
|
+
const isSelected = props.mode === "range" ? isSameDay(d, props.selected?.from) || isSameDay(d, props.selected?.to) : isSameDay(d, props.selected);
|
|
2764
|
+
const inRange = props.mode === "range" && isBetween(d, props.selected?.from, props.selected?.to);
|
|
2765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2766
|
+
"button",
|
|
2767
|
+
{
|
|
2768
|
+
type: "button",
|
|
2769
|
+
"data-slot": "calendar-day",
|
|
2770
|
+
"data-selected": isSelected || void 0,
|
|
2771
|
+
"data-outside-month": outsideMonth || void 0,
|
|
2772
|
+
disabled: isDisabled(d),
|
|
2773
|
+
"aria-label": d.toDateString(),
|
|
2774
|
+
"aria-current": isSameDay(d, /* @__PURE__ */ new Date()) ? "date" : void 0,
|
|
2775
|
+
onClick: () => handleSelect(d),
|
|
2776
|
+
className: cn(
|
|
2777
|
+
"flex h-8 w-8 items-center justify-center rounded-md text-sm transition-colors hover:bg-muted disabled:pointer-events-none disabled:opacity-40",
|
|
2778
|
+
outsideMonth && "text-muted-foreground/50",
|
|
2779
|
+
inRange && "rounded-none bg-primary/10",
|
|
2780
|
+
isSelected && "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
2781
|
+
),
|
|
2782
|
+
children: d.getDate()
|
|
2783
|
+
},
|
|
2784
|
+
d.toISOString()
|
|
2785
|
+
);
|
|
2786
|
+
}) })
|
|
2787
|
+
] });
|
|
2788
|
+
}
|
|
2789
|
+
|
|
2790
|
+
// src/date-range-input/index.tsx
|
|
2791
|
+
var React5 = __toESM(require("react"));
|
|
2792
|
+
var import_lucide_react15 = require("lucide-react");
|
|
2793
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2794
|
+
function defaultFormat(d) {
|
|
2795
|
+
return d.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
|
|
2796
|
+
}
|
|
2797
|
+
function DateRangeInput({
|
|
2798
|
+
value,
|
|
2799
|
+
onChange,
|
|
2800
|
+
placeholder = "Pick a date range",
|
|
2801
|
+
minDate,
|
|
2802
|
+
maxDate,
|
|
2803
|
+
disabled,
|
|
2804
|
+
className,
|
|
2805
|
+
formatDate = defaultFormat
|
|
2806
|
+
}) {
|
|
2807
|
+
const [open, setOpen] = React5.useState(false);
|
|
2808
|
+
const label = value?.from ? value.to ? `${formatDate(value.from)} \u2013 ${formatDate(value.to)}` : formatDate(value.from) : placeholder;
|
|
2809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
2810
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2811
|
+
PopoverTrigger,
|
|
2812
|
+
{
|
|
2813
|
+
"data-slot": "date-range-input-trigger",
|
|
2814
|
+
disabled,
|
|
2815
|
+
className: cn(
|
|
2816
|
+
buttonVariants({ variant: "outline" }),
|
|
2817
|
+
"w-full justify-start gap-2 font-normal",
|
|
2818
|
+
!value?.from && "text-muted-foreground",
|
|
2819
|
+
className
|
|
2820
|
+
),
|
|
2821
|
+
children: [
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react15.CalendarDays, { className: "size-4" }),
|
|
2823
|
+
label
|
|
2824
|
+
]
|
|
2825
|
+
}
|
|
2826
|
+
),
|
|
2827
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PopoverContent, { align: "start", className: "w-auto p-0", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2828
|
+
Calendar,
|
|
2829
|
+
{
|
|
2830
|
+
mode: "range",
|
|
2831
|
+
selected: value ?? { from: void 0, to: void 0 },
|
|
2832
|
+
onSelect: (range) => {
|
|
2833
|
+
onChange?.(range);
|
|
2834
|
+
if (range.from && range.to) setOpen(false);
|
|
2835
|
+
},
|
|
2836
|
+
minDate,
|
|
2837
|
+
maxDate
|
|
2838
|
+
}
|
|
2839
|
+
) })
|
|
2840
|
+
] });
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
// src/resizable/index.tsx
|
|
2844
|
+
var import_lucide_react16 = require("lucide-react");
|
|
2845
|
+
var import_react_resizable_panels = require("react-resizable-panels");
|
|
2846
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2847
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
2848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2849
|
+
import_react_resizable_panels.PanelGroup,
|
|
2850
|
+
{
|
|
2851
|
+
"data-slot": "resizable-panel-group",
|
|
2852
|
+
className: cn(
|
|
2853
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
2854
|
+
className
|
|
2855
|
+
),
|
|
2856
|
+
...props
|
|
2857
|
+
}
|
|
2858
|
+
);
|
|
2859
|
+
}
|
|
2860
|
+
function ResizablePanel({ ...props }) {
|
|
2861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_resizable_panels.Panel, { "data-slot": "resizable-panel", ...props });
|
|
2862
|
+
}
|
|
2863
|
+
function ResizableHandle({
|
|
2864
|
+
withHandle,
|
|
2865
|
+
className,
|
|
2866
|
+
...props
|
|
2867
|
+
}) {
|
|
2868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2869
|
+
import_react_resizable_panels.PanelResizeHandle,
|
|
2870
|
+
{
|
|
2871
|
+
"data-slot": "resizable-handle",
|
|
2872
|
+
className: cn(
|
|
2873
|
+
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2",
|
|
2874
|
+
className
|
|
2875
|
+
),
|
|
2876
|
+
...props,
|
|
2877
|
+
children: withHandle && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border border-border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react16.GripVertical, { className: "size-2.5" }) })
|
|
2878
|
+
}
|
|
2879
|
+
);
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
// src/lightbox/index.tsx
|
|
2883
|
+
var import_dialog4 = require("@base-ui/react/dialog");
|
|
2884
|
+
var import_lucide_react17 = require("lucide-react");
|
|
2885
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2886
|
+
function Lightbox({ ...props }) {
|
|
2887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_dialog4.Dialog.Root, { "data-slot": "lightbox", ...props });
|
|
2888
|
+
}
|
|
2889
|
+
function LightboxTrigger({ ...props }) {
|
|
2890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_dialog4.Dialog.Trigger, { "data-slot": "lightbox-trigger", ...props });
|
|
2891
|
+
}
|
|
2892
|
+
function LightboxPortal({ ...props }) {
|
|
2893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_dialog4.Dialog.Portal, { "data-slot": "lightbox-portal", ...props });
|
|
2894
|
+
}
|
|
2895
|
+
function LightboxClose({ ...props }) {
|
|
2896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_dialog4.Dialog.Close, { "data-slot": "lightbox-close", ...props });
|
|
2897
|
+
}
|
|
2898
|
+
function LightboxOverlay({ className, ...props }) {
|
|
2899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2900
|
+
import_dialog4.Dialog.Backdrop,
|
|
2901
|
+
{
|
|
2902
|
+
"data-slot": "lightbox-overlay",
|
|
2903
|
+
className: cn(
|
|
2904
|
+
"fixed inset-0 z-50 bg-black/90 duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
2905
|
+
className
|
|
2906
|
+
),
|
|
2907
|
+
...props
|
|
2908
|
+
}
|
|
2909
|
+
);
|
|
2910
|
+
}
|
|
2911
|
+
function LightboxContent({ className, children, ...props }) {
|
|
2912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(LightboxPortal, { children: [
|
|
2913
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LightboxOverlay, {}),
|
|
2914
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2915
|
+
import_dialog4.Dialog.Popup,
|
|
2916
|
+
{
|
|
2917
|
+
"data-slot": "lightbox-content",
|
|
2918
|
+
className: cn(
|
|
2919
|
+
"fixed inset-0 z-50 flex flex-col items-center justify-center gap-4 p-4 outline-none duration-150 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
2920
|
+
className
|
|
2921
|
+
),
|
|
2922
|
+
...props,
|
|
2923
|
+
children: [
|
|
2924
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2925
|
+
LightboxClose,
|
|
2926
|
+
{
|
|
2927
|
+
"aria-label": "Close",
|
|
2928
|
+
className: "absolute right-4 top-4 z-10 inline-flex size-9 items-center justify-center rounded-full bg-white/10 text-white outline-none transition-colors hover:bg-white/20",
|
|
2929
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react17.X, { className: "size-5" })
|
|
2930
|
+
}
|
|
2931
|
+
),
|
|
2932
|
+
children
|
|
2933
|
+
]
|
|
2934
|
+
}
|
|
2935
|
+
)
|
|
2936
|
+
] });
|
|
2937
|
+
}
|
|
2938
|
+
function LightboxImage({ className, alt = "", ...props }) {
|
|
2939
|
+
return (
|
|
2940
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2942
|
+
"img",
|
|
2943
|
+
{
|
|
2944
|
+
"data-slot": "lightbox-image",
|
|
2945
|
+
alt,
|
|
2946
|
+
className: cn("max-h-[85vh] max-w-full rounded-md object-contain", className),
|
|
2947
|
+
...props
|
|
2948
|
+
}
|
|
2949
|
+
)
|
|
2950
|
+
);
|
|
2951
|
+
}
|
|
2952
|
+
function LightboxNavButton({ direction, className, ...props }) {
|
|
2953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2954
|
+
"button",
|
|
2955
|
+
{
|
|
2956
|
+
type: "button",
|
|
2957
|
+
"data-slot": `lightbox-${direction}`,
|
|
2958
|
+
"aria-label": direction === "prev" ? "Previous image" : "Next image",
|
|
2959
|
+
className: cn(
|
|
2960
|
+
"absolute top-1/2 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full bg-white/10 text-white outline-none transition-colors hover:bg-white/20 disabled:pointer-events-none disabled:opacity-30",
|
|
2961
|
+
direction === "prev" ? "left-2 sm:left-4" : "right-2 sm:right-4",
|
|
2962
|
+
className
|
|
2963
|
+
),
|
|
2964
|
+
...props,
|
|
2965
|
+
children: direction === "prev" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react17.ChevronLeft, { className: "size-5" }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react17.ChevronRight, { className: "size-5" })
|
|
2966
|
+
}
|
|
2967
|
+
);
|
|
2968
|
+
}
|
|
2969
|
+
function LightboxCaption({ className, ...props }) {
|
|
2970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2971
|
+
"p",
|
|
2972
|
+
{
|
|
2973
|
+
"data-slot": "lightbox-caption",
|
|
2974
|
+
className: cn("text-center text-sm text-white/80", className),
|
|
2975
|
+
...props
|
|
2976
|
+
}
|
|
2977
|
+
);
|
|
2978
|
+
}
|
|
2979
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2980
|
+
0 && (module.exports = {
|
|
2981
|
+
Accordion,
|
|
2982
|
+
AccordionContent,
|
|
2983
|
+
AccordionItem,
|
|
2984
|
+
AccordionTrigger,
|
|
2985
|
+
AlertDialog,
|
|
2986
|
+
AlertDialogAction,
|
|
2987
|
+
AlertDialogCancel,
|
|
2988
|
+
AlertDialogContent,
|
|
2989
|
+
AlertDialogDescription,
|
|
2990
|
+
AlertDialogFooter,
|
|
2991
|
+
AlertDialogHeader,
|
|
2992
|
+
AlertDialogOverlay,
|
|
2993
|
+
AlertDialogPortal,
|
|
2994
|
+
AlertDialogTitle,
|
|
2995
|
+
AlertDialogTrigger,
|
|
2996
|
+
Avatar,
|
|
2997
|
+
AvatarGroup,
|
|
2998
|
+
Badge,
|
|
2999
|
+
Breadcrumb,
|
|
3000
|
+
BreadcrumbEllipsis,
|
|
3001
|
+
BreadcrumbItem,
|
|
3002
|
+
BreadcrumbLink,
|
|
3003
|
+
BreadcrumbList,
|
|
3004
|
+
BreadcrumbPage,
|
|
3005
|
+
BreadcrumbSeparator,
|
|
3006
|
+
Button,
|
|
3007
|
+
Calendar,
|
|
3008
|
+
Card,
|
|
3009
|
+
CardAction,
|
|
3010
|
+
CardContent,
|
|
3011
|
+
CardDescription,
|
|
3012
|
+
CardFooter,
|
|
3013
|
+
CardHeader,
|
|
3014
|
+
CardTitle,
|
|
3015
|
+
Carousel,
|
|
3016
|
+
CarouselContent,
|
|
3017
|
+
CarouselItem,
|
|
3018
|
+
CarouselNext,
|
|
3019
|
+
CarouselPrevious,
|
|
3020
|
+
Checkbox,
|
|
3021
|
+
Collapsible,
|
|
3022
|
+
CollapsibleContent,
|
|
3023
|
+
CollapsibleTrigger,
|
|
3024
|
+
Combobox,
|
|
3025
|
+
ComboboxClear,
|
|
3026
|
+
ComboboxEmpty,
|
|
3027
|
+
ComboboxGroup,
|
|
3028
|
+
ComboboxGroupLabel,
|
|
3029
|
+
ComboboxInput,
|
|
3030
|
+
ComboboxInputGroup,
|
|
3031
|
+
ComboboxItem,
|
|
3032
|
+
ComboboxList,
|
|
3033
|
+
ComboboxPopup,
|
|
3034
|
+
ComboboxPortal,
|
|
3035
|
+
ComboboxPositioner,
|
|
3036
|
+
ComboboxTrigger,
|
|
3037
|
+
ContextMenu,
|
|
3038
|
+
ContextMenuCheckboxItem,
|
|
3039
|
+
ContextMenuContent,
|
|
3040
|
+
ContextMenuGroup,
|
|
3041
|
+
ContextMenuItem,
|
|
3042
|
+
ContextMenuLabel,
|
|
3043
|
+
ContextMenuSeparator,
|
|
3044
|
+
ContextMenuSub,
|
|
3045
|
+
ContextMenuSubContent,
|
|
3046
|
+
ContextMenuSubTrigger,
|
|
3047
|
+
ContextMenuTrigger,
|
|
3048
|
+
DateRangeInput,
|
|
3049
|
+
Dialog,
|
|
3050
|
+
DialogClose,
|
|
3051
|
+
DialogContent,
|
|
3052
|
+
DialogDescription,
|
|
3053
|
+
DialogFooter,
|
|
3054
|
+
DialogHeader,
|
|
3055
|
+
DialogOverlay,
|
|
3056
|
+
DialogPortal,
|
|
3057
|
+
DialogTitle,
|
|
3058
|
+
DialogTrigger,
|
|
3059
|
+
DropdownMenu,
|
|
3060
|
+
DropdownMenuCheckboxItem,
|
|
3061
|
+
DropdownMenuContent,
|
|
3062
|
+
DropdownMenuGroup,
|
|
3063
|
+
DropdownMenuItem,
|
|
3064
|
+
DropdownMenuLabel,
|
|
3065
|
+
DropdownMenuSeparator,
|
|
3066
|
+
DropdownMenuSub,
|
|
3067
|
+
DropdownMenuSubContent,
|
|
3068
|
+
DropdownMenuSubTrigger,
|
|
3069
|
+
DropdownMenuTrigger,
|
|
3070
|
+
Field,
|
|
3071
|
+
FieldControl,
|
|
3072
|
+
FieldDescription,
|
|
3073
|
+
FieldError,
|
|
3074
|
+
FieldLabel,
|
|
3075
|
+
HoverCard,
|
|
3076
|
+
HoverCardContent,
|
|
3077
|
+
HoverCardTrigger,
|
|
3078
|
+
Input,
|
|
3079
|
+
Kbd,
|
|
3080
|
+
KbdGroup,
|
|
3081
|
+
Lightbox,
|
|
3082
|
+
LightboxCaption,
|
|
3083
|
+
LightboxClose,
|
|
3084
|
+
LightboxContent,
|
|
3085
|
+
LightboxImage,
|
|
3086
|
+
LightboxNavButton,
|
|
3087
|
+
LightboxOverlay,
|
|
3088
|
+
LightboxPortal,
|
|
3089
|
+
LightboxTrigger,
|
|
3090
|
+
Pagination,
|
|
3091
|
+
PaginationBar,
|
|
3092
|
+
PaginationContent,
|
|
3093
|
+
PaginationEllipsis,
|
|
3094
|
+
PaginationItem,
|
|
3095
|
+
PaginationLink,
|
|
3096
|
+
PaginationNext,
|
|
3097
|
+
PaginationPrevious,
|
|
3098
|
+
Popover,
|
|
3099
|
+
PopoverContent,
|
|
3100
|
+
PopoverDescription,
|
|
3101
|
+
PopoverHeader,
|
|
3102
|
+
PopoverTitle,
|
|
3103
|
+
PopoverTrigger,
|
|
3104
|
+
Progress,
|
|
3105
|
+
RadioGroup,
|
|
3106
|
+
RadioGroupItem,
|
|
3107
|
+
ResizableHandle,
|
|
3108
|
+
ResizablePanel,
|
|
3109
|
+
ResizablePanelGroup,
|
|
3110
|
+
ScrollArea,
|
|
3111
|
+
Select,
|
|
3112
|
+
SelectContent,
|
|
3113
|
+
SelectGroup,
|
|
3114
|
+
SelectItem,
|
|
3115
|
+
SelectLabel,
|
|
3116
|
+
SelectScrollDownButton,
|
|
3117
|
+
SelectScrollUpButton,
|
|
3118
|
+
SelectSeparator,
|
|
3119
|
+
SelectTrigger,
|
|
3120
|
+
SelectValue,
|
|
3121
|
+
Separator,
|
|
3122
|
+
Sheet,
|
|
3123
|
+
SheetClose,
|
|
3124
|
+
SheetContent,
|
|
3125
|
+
SheetDescription,
|
|
3126
|
+
SheetFooter,
|
|
3127
|
+
SheetHeader,
|
|
3128
|
+
SheetOverlay,
|
|
3129
|
+
SheetPortal,
|
|
3130
|
+
SheetTitle,
|
|
3131
|
+
SheetTrigger,
|
|
3132
|
+
Skeleton,
|
|
3133
|
+
SkeletonCard,
|
|
3134
|
+
SkeletonRow,
|
|
3135
|
+
SlideOver,
|
|
3136
|
+
SlideOverClose,
|
|
3137
|
+
SlideOverColumns,
|
|
3138
|
+
SlideOverContent,
|
|
3139
|
+
SlideOverDescription,
|
|
3140
|
+
SlideOverFooter,
|
|
3141
|
+
SlideOverHeader,
|
|
3142
|
+
SlideOverOverlay,
|
|
3143
|
+
SlideOverPortal,
|
|
3144
|
+
SlideOverTitle,
|
|
3145
|
+
SlideOverTrigger,
|
|
3146
|
+
Slider,
|
|
3147
|
+
Switch,
|
|
3148
|
+
Tabs,
|
|
3149
|
+
TabsContent,
|
|
3150
|
+
TabsList,
|
|
3151
|
+
TabsTrigger,
|
|
3152
|
+
ToastProvider,
|
|
3153
|
+
Toggle,
|
|
3154
|
+
ToggleGroup,
|
|
3155
|
+
Tooltip,
|
|
3156
|
+
TooltipContent,
|
|
3157
|
+
TooltipProvider,
|
|
3158
|
+
TooltipTrigger,
|
|
3159
|
+
badgeVariants,
|
|
3160
|
+
buttonVariants,
|
|
3161
|
+
cn,
|
|
3162
|
+
getPaginationRange,
|
|
3163
|
+
toggleVariants,
|
|
3164
|
+
useCarousel,
|
|
3165
|
+
useRecordNav,
|
|
3166
|
+
useToast
|
|
3167
|
+
});
|