@hobenakicoffee/libraries 1.28.0 → 1.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/package.json +5 -39
  2. package/src/nuqs/common.ts +12 -0
  3. package/src/nuqs/index.ts +2 -0
  4. package/src/nuqs/transactions.ts +31 -0
  5. package/src/components/ui/alert-dialog.tsx +0 -196
  6. package/src/components/ui/alert.tsx +0 -76
  7. package/src/components/ui/avatar.tsx +0 -110
  8. package/src/components/ui/badge.tsx +0 -49
  9. package/src/components/ui/breadcrumb.tsx +0 -122
  10. package/src/components/ui/button-group.tsx +0 -82
  11. package/src/components/ui/card.tsx +0 -100
  12. package/src/components/ui/chart.tsx +0 -364
  13. package/src/components/ui/checkbox.tsx +0 -30
  14. package/src/components/ui/dialog.tsx +0 -162
  15. package/src/components/ui/drawer.tsx +0 -126
  16. package/src/components/ui/dropdown-menu.tsx +0 -267
  17. package/src/components/ui/empty-minimal.tsx +0 -20
  18. package/src/components/ui/empty.tsx +0 -101
  19. package/src/components/ui/field.tsx +0 -235
  20. package/src/components/ui/input-group.tsx +0 -170
  21. package/src/components/ui/input-otp.tsx +0 -84
  22. package/src/components/ui/input.tsx +0 -37
  23. package/src/components/ui/item.tsx +0 -196
  24. package/src/components/ui/label.tsx +0 -19
  25. package/src/components/ui/popover.tsx +0 -87
  26. package/src/components/ui/radio-group.tsx +0 -47
  27. package/src/components/ui/select.tsx +0 -205
  28. package/src/components/ui/separator.tsx +0 -26
  29. package/src/components/ui/sheet.tsx +0 -141
  30. package/src/components/ui/sidebar.tsx +0 -699
  31. package/src/components/ui/skeleton.tsx +0 -13
  32. package/src/components/ui/sonner.tsx +0 -74
  33. package/src/components/ui/table.tsx +0 -114
  34. package/src/components/ui/tabs.tsx +0 -88
  35. package/src/components/ui/textarea.tsx +0 -35
  36. package/src/components/ui/toggle-group.tsx +0 -91
  37. package/src/components/ui/toggle.tsx +0 -44
  38. package/src/components/ui/tooltip.tsx +0 -59
@@ -1,162 +0,0 @@
1
- import { Cancel01Icon } from "@hugeicons/core-free-icons";
2
- import { HugeiconsIcon } from "@hugeicons/react";
3
- import { Dialog as DialogPrimitive } from "radix-ui";
4
- import type * as React from "react";
5
- import { Button } from "@/components/ui/button";
6
- import { cn } from "@/lib/utils";
7
-
8
- function Dialog({
9
- ...props
10
- }: React.ComponentProps<typeof DialogPrimitive.Root>) {
11
- return <DialogPrimitive.Root data-slot="dialog" {...props} />;
12
- }
13
-
14
- function DialogTrigger({
15
- ...props
16
- }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
17
- return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
18
- }
19
-
20
- function DialogPortal({
21
- ...props
22
- }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
23
- return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
24
- }
25
-
26
- function DialogClose({
27
- ...props
28
- }: React.ComponentProps<typeof DialogPrimitive.Close>) {
29
- return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
30
- }
31
-
32
- function DialogOverlay({
33
- className,
34
- ...props
35
- }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
36
- return (
37
- <DialogPrimitive.Overlay
38
- className={cn(
39
- "data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 isolate z-50 bg-black/70 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs",
40
- className
41
- )}
42
- data-slot="dialog-overlay"
43
- {...props}
44
- />
45
- );
46
- }
47
-
48
- function DialogContent({
49
- className,
50
- children,
51
- showCloseButton = true,
52
- ...props
53
- }: React.ComponentProps<typeof DialogPrimitive.Content> & {
54
- showCloseButton?: boolean;
55
- }) {
56
- return (
57
- <DialogPortal>
58
- <DialogOverlay />
59
- <DialogPrimitive.Content
60
- className={cn(
61
- "data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 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-6 rounded-xl bg-background p-6 text-sm ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in sm:max-w-md",
62
- className
63
- )}
64
- data-slot="dialog-content"
65
- {...props}
66
- >
67
- {children}
68
- {showCloseButton && (
69
- <DialogPrimitive.Close asChild data-slot="dialog-close">
70
- <Button
71
- className="absolute top-4 right-4"
72
- size="icon-sm"
73
- variant="ghost"
74
- >
75
- <HugeiconsIcon icon={Cancel01Icon} strokeWidth={2} />
76
- <span className="sr-only">Close</span>
77
- </Button>
78
- </DialogPrimitive.Close>
79
- )}
80
- </DialogPrimitive.Content>
81
- </DialogPortal>
82
- );
83
- }
84
-
85
- function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
86
- return (
87
- <div
88
- className={cn("flex flex-col gap-2", className)}
89
- data-slot="dialog-header"
90
- {...props}
91
- />
92
- );
93
- }
94
-
95
- function DialogFooter({
96
- className,
97
- showCloseButton = false,
98
- children,
99
- ...props
100
- }: React.ComponentProps<"div"> & {
101
- showCloseButton?: boolean;
102
- }) {
103
- return (
104
- <div
105
- className={cn(
106
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-between",
107
- className
108
- )}
109
- data-slot="dialog-footer"
110
- {...props}
111
- >
112
- {children}
113
- {showCloseButton && (
114
- <DialogPrimitive.Close asChild>
115
- <Button variant="outline">Close</Button>
116
- </DialogPrimitive.Close>
117
- )}
118
- </div>
119
- );
120
- }
121
-
122
- function DialogTitle({
123
- className,
124
- ...props
125
- }: React.ComponentProps<typeof DialogPrimitive.Title>) {
126
- return (
127
- <DialogPrimitive.Title
128
- className={cn("font-medium text-xl leading-none", className)}
129
- data-slot="dialog-title"
130
- {...props}
131
- />
132
- );
133
- }
134
-
135
- function DialogDescription({
136
- className,
137
- ...props
138
- }: React.ComponentProps<typeof DialogPrimitive.Description>) {
139
- return (
140
- <DialogPrimitive.Description
141
- className={cn(
142
- "text-muted-foreground text-sm *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
143
- className
144
- )}
145
- data-slot="dialog-description"
146
- {...props}
147
- />
148
- );
149
- }
150
-
151
- export {
152
- Dialog,
153
- DialogClose,
154
- DialogContent,
155
- DialogDescription,
156
- DialogFooter,
157
- DialogHeader,
158
- DialogOverlay,
159
- DialogPortal,
160
- DialogTitle,
161
- DialogTrigger,
162
- };
@@ -1,126 +0,0 @@
1
- import type { ComponentProps } from "react";
2
- import { Drawer as DrawerPrimitive } from "vaul";
3
- import { cn } from "@/lib/utils";
4
-
5
- function Drawer({ ...props }: ComponentProps<typeof DrawerPrimitive.Root>) {
6
- return <DrawerPrimitive.Root data-slot="drawer" {...props} />;
7
- }
8
-
9
- function DrawerTrigger({
10
- ...props
11
- }: ComponentProps<typeof DrawerPrimitive.Trigger>) {
12
- return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />;
13
- }
14
-
15
- function DrawerPortal({
16
- ...props
17
- }: ComponentProps<typeof DrawerPrimitive.Portal>) {
18
- return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />;
19
- }
20
-
21
- function DrawerClose({
22
- ...props
23
- }: ComponentProps<typeof DrawerPrimitive.Close>) {
24
- return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />;
25
- }
26
-
27
- function DrawerOverlay({
28
- className,
29
- ...props
30
- }: ComponentProps<typeof DrawerPrimitive.Overlay>) {
31
- return (
32
- <DrawerPrimitive.Overlay
33
- className={cn(
34
- "data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/10 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs",
35
- className
36
- )}
37
- data-slot="drawer-overlay"
38
- {...props}
39
- />
40
- );
41
- }
42
-
43
- function DrawerContent({
44
- className,
45
- children,
46
- ...props
47
- }: ComponentProps<typeof DrawerPrimitive.Content>) {
48
- return (
49
- <DrawerPortal data-slot="drawer-portal">
50
- <DrawerOverlay />
51
- <DrawerPrimitive.Content
52
- className={cn(
53
- "group/drawer-content fixed z-50 flex h-auto flex-col bg-background text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
54
- className
55
- )}
56
- data-slot="drawer-content"
57
- {...props}
58
- >
59
- <div className="mx-auto mt-4 hidden h-1.5 w-25 shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
60
- {children}
61
- </DrawerPrimitive.Content>
62
- </DrawerPortal>
63
- );
64
- }
65
-
66
- function DrawerHeader({ className, ...props }: ComponentProps<"div">) {
67
- return (
68
- <div
69
- className={cn(
70
- "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
71
- className
72
- )}
73
- data-slot="drawer-header"
74
- {...props}
75
- />
76
- );
77
- }
78
-
79
- function DrawerFooter({ className, ...props }: ComponentProps<"div">) {
80
- return (
81
- <div
82
- className={cn("mt-auto flex flex-col gap-2 p-4", className)}
83
- data-slot="drawer-footer"
84
- {...props}
85
- />
86
- );
87
- }
88
-
89
- function DrawerTitle({
90
- className,
91
- ...props
92
- }: ComponentProps<typeof DrawerPrimitive.Title>) {
93
- return (
94
- <DrawerPrimitive.Title
95
- className={cn("font-medium text-foreground", className)}
96
- data-slot="drawer-title"
97
- {...props}
98
- />
99
- );
100
- }
101
-
102
- function DrawerDescription({
103
- className,
104
- ...props
105
- }: ComponentProps<typeof DrawerPrimitive.Description>) {
106
- return (
107
- <DrawerPrimitive.Description
108
- className={cn("text-muted-foreground text-sm", className)}
109
- data-slot="drawer-description"
110
- {...props}
111
- />
112
- );
113
- }
114
-
115
- export {
116
- Drawer,
117
- DrawerPortal,
118
- DrawerOverlay,
119
- DrawerTrigger,
120
- DrawerClose,
121
- DrawerContent,
122
- DrawerHeader,
123
- DrawerFooter,
124
- DrawerTitle,
125
- DrawerDescription,
126
- };
@@ -1,267 +0,0 @@
1
- import { ArrowRight01Icon, Tick02Icon } from "@hugeicons/core-free-icons";
2
- import { HugeiconsIcon } from "@hugeicons/react";
3
- import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
4
- import type * as React from "react";
5
- import { cn } from "@/lib/utils";
6
-
7
- function DropdownMenu({
8
- ...props
9
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
10
- return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
11
- }
12
-
13
- function DropdownMenuPortal({
14
- ...props
15
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
16
- return (
17
- <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
18
- );
19
- }
20
-
21
- function DropdownMenuTrigger({
22
- ...props
23
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
24
- return (
25
- <DropdownMenuPrimitive.Trigger
26
- data-slot="dropdown-menu-trigger"
27
- {...props}
28
- />
29
- );
30
- }
31
-
32
- function DropdownMenuContent({
33
- className,
34
- align = "start",
35
- sideOffset = 4,
36
- ...props
37
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
38
- return (
39
- <DropdownMenuPrimitive.Portal>
40
- <DropdownMenuPrimitive.Content
41
- align={align}
42
- className={cn(
43
- "data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-48 origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-xl bg-popover p-1 text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-closed:animate-out data-open:animate-in data-[state=closed]:overflow-hidden",
44
- className
45
- )}
46
- data-slot="dropdown-menu-content"
47
- sideOffset={sideOffset}
48
- {...props}
49
- />
50
- </DropdownMenuPrimitive.Portal>
51
- );
52
- }
53
-
54
- function DropdownMenuGroup({
55
- ...props
56
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
57
- return (
58
- <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
59
- );
60
- }
61
-
62
- function DropdownMenuItem({
63
- className,
64
- inset,
65
- variant = "default",
66
- ...props
67
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
68
- inset?: boolean;
69
- variant?: "default" | "destructive";
70
- }) {
71
- return (
72
- <DropdownMenuPrimitive.Item
73
- className={cn(
74
- "group/dropdown-menu-item relative flex cursor-default select-none items-center gap-2.5 rounded-lg px-4 py-3 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-8 data-[variant=destructive]:text-destructive data-disabled:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[variant=destructive]:*:[svg]:text-destructive",
75
- className
76
- )}
77
- data-inset={inset}
78
- data-slot="dropdown-menu-item"
79
- data-variant={variant}
80
- {...props}
81
- />
82
- );
83
- }
84
-
85
- function DropdownMenuCheckboxItem({
86
- className,
87
- children,
88
- checked,
89
- ...props
90
- }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
91
- return (
92
- <DropdownMenuPrimitive.CheckboxItem
93
- checked={checked}
94
- className={cn(
95
- "relative flex cursor-default select-none items-center gap-2.5 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
96
- className
97
- )}
98
- data-slot="dropdown-menu-checkbox-item"
99
- {...props}
100
- >
101
- <span
102
- className="pointer-events-none absolute right-2 flex items-center justify-center"
103
- data-slot="dropdown-menu-checkbox-item-indicator"
104
- >
105
- <DropdownMenuPrimitive.ItemIndicator>
106
- <HugeiconsIcon icon={Tick02Icon} strokeWidth={2} />
107
- </DropdownMenuPrimitive.ItemIndicator>
108
- </span>
109
- {children}
110
- </DropdownMenuPrimitive.CheckboxItem>
111
- );
112
- }
113
-
114
- function DropdownMenuRadioGroup({
115
- ...props
116
- }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
117
- return (
118
- <DropdownMenuPrimitive.RadioGroup
119
- data-slot="dropdown-menu-radio-group"
120
- {...props}
121
- />
122
- );
123
- }
124
-
125
- function DropdownMenuRadioItem({
126
- className,
127
- children,
128
- ...props
129
- }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
130
- return (
131
- <DropdownMenuPrimitive.RadioItem
132
- className={cn(
133
- "relative flex cursor-default select-none items-center gap-2.5 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
134
- className
135
- )}
136
- data-slot="dropdown-menu-radio-item"
137
- {...props}
138
- >
139
- <span
140
- className="pointer-events-none absolute right-2 flex items-center justify-center"
141
- data-slot="dropdown-menu-radio-item-indicator"
142
- >
143
- <DropdownMenuPrimitive.ItemIndicator>
144
- <HugeiconsIcon icon={Tick02Icon} strokeWidth={2} />
145
- </DropdownMenuPrimitive.ItemIndicator>
146
- </span>
147
- {children}
148
- </DropdownMenuPrimitive.RadioItem>
149
- );
150
- }
151
-
152
- function DropdownMenuLabel({
153
- className,
154
- inset,
155
- ...props
156
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
157
- inset?: boolean;
158
- }) {
159
- return (
160
- <DropdownMenuPrimitive.Label
161
- className={cn(
162
- "px-3 py-2.5 text-muted-foreground text-xs data-inset:pl-8",
163
- className
164
- )}
165
- data-inset={inset}
166
- data-slot="dropdown-menu-label"
167
- {...props}
168
- />
169
- );
170
- }
171
-
172
- function DropdownMenuSeparator({
173
- className,
174
- ...props
175
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
176
- return (
177
- <DropdownMenuPrimitive.Separator
178
- className={cn("-mx-1 my-1 h-px bg-border/50", className)}
179
- data-slot="dropdown-menu-separator"
180
- {...props}
181
- />
182
- );
183
- }
184
-
185
- function DropdownMenuShortcut({
186
- className,
187
- ...props
188
- }: React.ComponentProps<"span">) {
189
- return (
190
- <span
191
- className={cn(
192
- "ml-auto text-muted-foreground text-xs tracking-widest group-focus/dropdown-menu-item:text-accent-foreground",
193
- className
194
- )}
195
- data-slot="dropdown-menu-shortcut"
196
- {...props}
197
- />
198
- );
199
- }
200
-
201
- function DropdownMenuSub({
202
- ...props
203
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
204
- return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
205
- }
206
-
207
- function DropdownMenuSubTrigger({
208
- className,
209
- inset,
210
- children,
211
- ...props
212
- }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
213
- inset?: boolean;
214
- }) {
215
- return (
216
- <DropdownMenuPrimitive.SubTrigger
217
- className={cn(
218
- "flex cursor-default select-none items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-open:bg-accent data-inset:pl-8 data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
219
- className
220
- )}
221
- data-inset={inset}
222
- data-slot="dropdown-menu-sub-trigger"
223
- {...props}
224
- >
225
- {children}
226
- <HugeiconsIcon
227
- className="ml-auto"
228
- icon={ArrowRight01Icon}
229
- strokeWidth={2}
230
- />
231
- </DropdownMenuPrimitive.SubTrigger>
232
- );
233
- }
234
-
235
- function DropdownMenuSubContent({
236
- className,
237
- ...props
238
- }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
239
- return (
240
- <DropdownMenuPrimitive.SubContent
241
- className={cn(
242
- "data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-36 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-closed:animate-out data-open:animate-in",
243
- className
244
- )}
245
- data-slot="dropdown-menu-sub-content"
246
- {...props}
247
- />
248
- );
249
- }
250
-
251
- export {
252
- DropdownMenu,
253
- DropdownMenuPortal,
254
- DropdownMenuTrigger,
255
- DropdownMenuContent,
256
- DropdownMenuGroup,
257
- DropdownMenuLabel,
258
- DropdownMenuItem,
259
- DropdownMenuCheckboxItem,
260
- DropdownMenuRadioGroup,
261
- DropdownMenuRadioItem,
262
- DropdownMenuSeparator,
263
- DropdownMenuShortcut,
264
- DropdownMenuSub,
265
- DropdownMenuSubTrigger,
266
- DropdownMenuSubContent,
267
- };
@@ -1,20 +0,0 @@
1
- import { cn } from "@/lib/utils";
2
-
3
- export function EmptyMinimal({
4
- className,
5
- children,
6
- ...props
7
- }: React.ComponentProps<"div">) {
8
- return (
9
- <div
10
- className={cn(
11
- "h-fit rounded-lg border border-dashed py-8 text-center text-muted-foreground text-sm",
12
- className
13
- )}
14
- data-slot="empty"
15
- {...props}
16
- >
17
- {children}
18
- </div>
19
- );
20
- }
@@ -1,101 +0,0 @@
1
- import { cva, type VariantProps } from "class-variance-authority";
2
-
3
- import { cn } from "@/lib/utils";
4
-
5
- function Empty({ className, ...props }: React.ComponentProps<"div">) {
6
- return (
7
- <div
8
- className={cn(
9
- "flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 text-balance rounded-lg border-dashed p-12 text-center",
10
- className
11
- )}
12
- data-slot="empty"
13
- {...props}
14
- />
15
- );
16
- }
17
-
18
- function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
19
- return (
20
- <div
21
- className={cn("flex max-w-sm flex-col items-center gap-2", className)}
22
- data-slot="empty-header"
23
- {...props}
24
- />
25
- );
26
- }
27
-
28
- const emptyMediaVariants = cva(
29
- "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
30
- {
31
- variants: {
32
- variant: {
33
- default: "bg-transparent",
34
- icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6",
35
- },
36
- },
37
- defaultVariants: {
38
- variant: "default",
39
- },
40
- }
41
- );
42
-
43
- function EmptyMedia({
44
- className,
45
- variant = "default",
46
- ...props
47
- }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>) {
48
- return (
49
- <div
50
- className={cn(emptyMediaVariants({ variant, className }))}
51
- data-slot="empty-icon"
52
- data-variant={variant}
53
- {...props}
54
- />
55
- );
56
- }
57
-
58
- function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) {
59
- return (
60
- <div
61
- className={cn("font-medium text-lg tracking-tight", className)}
62
- data-slot="empty-title"
63
- {...props}
64
- />
65
- );
66
- }
67
-
68
- function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
69
- return (
70
- <div
71
- className={cn(
72
- "text-muted-foreground text-sm/relaxed [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
73
- className
74
- )}
75
- data-slot="empty-description"
76
- {...props}
77
- />
78
- );
79
- }
80
-
81
- function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
82
- return (
83
- <div
84
- className={cn(
85
- "flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",
86
- className
87
- )}
88
- data-slot="empty-content"
89
- {...props}
90
- />
91
- );
92
- }
93
-
94
- export {
95
- Empty,
96
- EmptyHeader,
97
- EmptyTitle,
98
- EmptyDescription,
99
- EmptyContent,
100
- EmptyMedia,
101
- };