@betterstart/cli 0.1.28 → 0.1.30
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/{chunk-SAPJG4NO.js → chunk-6JCWMKSY.js} +7 -4
- package/dist/{chunk-SAPJG4NO.js.map → chunk-6JCWMKSY.js.map} +1 -1
- package/dist/cli.js +749 -866
- package/dist/cli.js.map +1 -1
- package/dist/drizzle-config-EDKOEZ6G.js +7 -0
- package/package.json +1 -1
- package/templates/ui/accordion.tsx +73 -42
- package/templates/ui/alert-dialog.tsx +155 -90
- package/templates/ui/alert.tsx +46 -26
- package/templates/ui/aspect-ratio.tsx +4 -2
- package/templates/ui/avatar.tsx +92 -43
- package/templates/ui/badge.tsx +27 -12
- package/templates/ui/breadcrumb.tsx +63 -60
- package/templates/ui/button-group.tsx +8 -8
- package/templates/ui/button.tsx +44 -26
- package/templates/ui/calendar.tsx +43 -34
- package/templates/ui/card.tsx +71 -34
- package/templates/ui/carousel.tsx +111 -115
- package/templates/ui/chart.tsx +197 -207
- package/templates/ui/checkbox.tsx +21 -20
- package/templates/ui/collapsible.tsx +14 -4
- package/templates/ui/combobox.tsx +272 -0
- package/templates/ui/command.tsx +139 -101
- package/templates/ui/context-menu.tsx +214 -156
- package/templates/ui/dialog.tsx +118 -77
- package/templates/ui/direction.tsx +20 -0
- package/templates/ui/drawer.tsx +89 -69
- package/templates/ui/dropdown-menu.tsx +228 -164
- package/templates/ui/empty.tsx +8 -5
- package/templates/ui/field.tsx +25 -32
- package/templates/ui/hover-card.tsx +29 -20
- package/templates/ui/input-group.tsx +20 -37
- package/templates/ui/input-otp.tsx +57 -42
- package/templates/ui/input.tsx +14 -17
- package/templates/ui/item.tsx +27 -17
- package/templates/ui/kbd.tsx +1 -3
- package/templates/ui/label.tsx +14 -14
- package/templates/ui/markdown-editor.tsx +1 -1
- package/templates/ui/menubar.tsx +220 -188
- package/templates/ui/native-select.tsx +42 -0
- package/templates/ui/navigation-menu.tsx +130 -90
- package/templates/ui/pagination.tsx +88 -73
- package/templates/ui/popover.tsx +67 -26
- package/templates/ui/progress.tsx +24 -18
- package/templates/ui/radio-group.tsx +26 -20
- package/templates/ui/resizable.tsx +29 -29
- package/templates/ui/scroll-area.tsx +47 -38
- package/templates/ui/select.tsx +158 -125
- package/templates/ui/separator.tsx +21 -19
- package/templates/ui/sheet.tsx +104 -95
- package/templates/ui/sidebar.tsx +77 -183
- package/templates/ui/skeleton.tsx +8 -2
- package/templates/ui/slider.tsx +46 -17
- package/templates/ui/sonner.tsx +19 -9
- package/templates/ui/spinner.tsx +2 -2
- package/templates/ui/switch.tsx +24 -20
- package/templates/ui/table.tsx +68 -73
- package/templates/ui/tabs.tsx +71 -46
- package/templates/ui/textarea.tsx +13 -16
- package/templates/ui/toggle-group.tsx +57 -28
- package/templates/ui/toggle.tsx +21 -20
- package/templates/ui/tooltip.tsx +44 -23
- package/dist/drizzle-config-KISB26BA.js +0 -7
- package/templates/ui/use-mobile.tsx +0 -19
- /package/dist/{drizzle-config-KISB26BA.js.map → drizzle-config-EDKOEZ6G.js.map} +0 -0
package/templates/ui/drawer.tsx
CHANGED
|
@@ -1,89 +1,109 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { cn } from '@cms/utils/cn'
|
|
4
|
-
import * as React from 'react'
|
|
4
|
+
import type * as React from 'react'
|
|
5
5
|
import { Drawer as DrawerPrimitive } from 'vaul'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
|
|
11
|
-
<DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />
|
|
12
|
-
)
|
|
13
|
-
Drawer.displayName = 'Drawer'
|
|
14
|
-
|
|
15
|
-
const DrawerTrigger = DrawerPrimitive.Trigger
|
|
7
|
+
function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
8
|
+
return <DrawerPrimitive.Root data-slot="drawer" {...props} />
|
|
9
|
+
}
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
|
|
12
|
+
return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
|
|
13
|
+
}
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
|
|
16
|
+
return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
|
|
17
|
+
}
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
>(({ className, ...props }, ref) => (
|
|
25
|
-
<DrawerPrimitive.Overlay
|
|
26
|
-
ref={ref}
|
|
27
|
-
className={cn('fixed inset-0 z-50 bg-black/80', className)}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
))
|
|
31
|
-
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName
|
|
19
|
+
function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
|
|
20
|
+
return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
|
|
21
|
+
}
|
|
32
22
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
ref={ref}
|
|
23
|
+
function DrawerOverlay({
|
|
24
|
+
className,
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
|
|
27
|
+
return (
|
|
28
|
+
<DrawerPrimitive.Overlay
|
|
29
|
+
data-slot="drawer-overlay"
|
|
41
30
|
className={cn(
|
|
42
|
-
'
|
|
31
|
+
'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs',
|
|
43
32
|
className
|
|
44
33
|
)}
|
|
45
34
|
{...props}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</DrawerPrimitive.Content>
|
|
50
|
-
</DrawerPortal>
|
|
51
|
-
))
|
|
52
|
-
DrawerContent.displayName = 'DrawerContent'
|
|
35
|
+
/>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
53
38
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
39
|
+
function DrawerContent({
|
|
40
|
+
className,
|
|
41
|
+
children,
|
|
42
|
+
...props
|
|
43
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
|
|
44
|
+
return (
|
|
45
|
+
<DrawerPortal data-slot="drawer-portal">
|
|
46
|
+
<DrawerOverlay />
|
|
47
|
+
<DrawerPrimitive.Content
|
|
48
|
+
data-slot="drawer-content"
|
|
49
|
+
className={cn(
|
|
50
|
+
'bg-background group/drawer-content fixed z-50 flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm',
|
|
51
|
+
className
|
|
52
|
+
)}
|
|
53
|
+
{...props}
|
|
54
|
+
>
|
|
55
|
+
<div className="bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
|
|
56
|
+
{children}
|
|
57
|
+
</DrawerPrimitive.Content>
|
|
58
|
+
</DrawerPortal>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
63
|
+
return (
|
|
64
|
+
<div
|
|
65
|
+
data-slot="drawer-header"
|
|
66
|
+
className={cn(
|
|
67
|
+
'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-0.5 md:text-left',
|
|
68
|
+
className
|
|
69
|
+
)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
63
74
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
))
|
|
74
|
-
DrawerTitle.displayName = DrawerPrimitive.Title.displayName
|
|
75
|
+
function DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
76
|
+
return (
|
|
77
|
+
<div
|
|
78
|
+
data-slot="drawer-footer"
|
|
79
|
+
className={cn('mt-auto flex flex-col gap-2 p-4', className)}
|
|
80
|
+
{...props}
|
|
81
|
+
/>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
75
84
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
DrawerDescription
|
|
85
|
+
function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {
|
|
86
|
+
return (
|
|
87
|
+
<DrawerPrimitive.Title
|
|
88
|
+
data-slot="drawer-title"
|
|
89
|
+
className={cn('text-foreground text-base font-medium', className)}
|
|
90
|
+
{...props}
|
|
91
|
+
/>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function DrawerDescription({
|
|
96
|
+
className,
|
|
97
|
+
...props
|
|
98
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Description>) {
|
|
99
|
+
return (
|
|
100
|
+
<DrawerPrimitive.Description
|
|
101
|
+
data-slot="drawer-description"
|
|
102
|
+
className={cn('text-muted-foreground text-sm', className)}
|
|
103
|
+
{...props}
|
|
104
|
+
/>
|
|
105
|
+
)
|
|
106
|
+
}
|
|
87
107
|
|
|
88
108
|
export {
|
|
89
109
|
Drawer,
|
|
@@ -1,185 +1,249 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { cn } from '@cms/utils/cn'
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import * as React from 'react'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
4
|
+
import { Check, ChevronRight } from 'lucide-react'
|
|
5
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'
|
|
6
|
+
import type * as React from 'react'
|
|
7
|
+
|
|
8
|
+
function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
9
|
+
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function DropdownMenuPortal({
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
15
|
+
return <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function DropdownMenuTrigger({
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
21
|
+
return <DropdownMenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function DropdownMenuContent({
|
|
25
|
+
className,
|
|
26
|
+
align = 'start',
|
|
27
|
+
sideOffset = 4,
|
|
28
|
+
...props
|
|
29
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
30
|
+
return (
|
|
31
|
+
<DropdownMenuPrimitive.Portal>
|
|
32
|
+
<DropdownMenuPrimitive.Content
|
|
33
|
+
data-slot="dropdown-menu-content"
|
|
34
|
+
sideOffset={sideOffset}
|
|
35
|
+
align={align}
|
|
36
|
+
className={cn(
|
|
37
|
+
'data-open:animate-in data-closed:animate-out 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 ring-foreground/10 bg-popover text-popover-foreground z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100 data-[state=closed]:overflow-hidden',
|
|
38
|
+
className
|
|
39
|
+
)}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
</DropdownMenuPrimitive.Portal>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
47
|
+
return <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function DropdownMenuItem({
|
|
51
|
+
className,
|
|
52
|
+
inset,
|
|
53
|
+
variant = 'default',
|
|
54
|
+
...props
|
|
55
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
56
|
+
inset?: boolean
|
|
57
|
+
variant?: 'default' | 'destructive'
|
|
58
|
+
}) {
|
|
59
|
+
return (
|
|
60
|
+
<DropdownMenuPrimitive.Item
|
|
61
|
+
data-slot="dropdown-menu-item"
|
|
62
|
+
data-inset={inset}
|
|
63
|
+
data-variant={variant}
|
|
64
64
|
className={cn(
|
|
65
|
-
|
|
66
|
-
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]',
|
|
65
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
67
66
|
className
|
|
68
67
|
)}
|
|
69
68
|
{...props}
|
|
70
69
|
/>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function DropdownMenuCheckboxItem({
|
|
74
|
+
className,
|
|
75
|
+
children,
|
|
76
|
+
checked,
|
|
77
|
+
inset,
|
|
78
|
+
...props
|
|
79
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
|
|
80
|
+
inset?: boolean
|
|
81
|
+
}) {
|
|
82
|
+
return (
|
|
83
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
84
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
85
|
+
data-inset={inset}
|
|
86
|
+
className={cn(
|
|
87
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
88
|
+
className
|
|
89
|
+
)}
|
|
90
|
+
checked={checked}
|
|
91
|
+
{...props}
|
|
92
|
+
>
|
|
93
|
+
<span
|
|
94
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
95
|
+
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
96
|
+
>
|
|
97
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
98
|
+
<Check />
|
|
99
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
100
|
+
</span>
|
|
101
|
+
{children}
|
|
102
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function DropdownMenuRadioGroup({
|
|
107
|
+
...props
|
|
108
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
109
|
+
return <DropdownMenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function DropdownMenuRadioItem({
|
|
113
|
+
className,
|
|
114
|
+
children,
|
|
115
|
+
inset,
|
|
116
|
+
...props
|
|
117
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
|
|
118
|
+
inset?: boolean
|
|
119
|
+
}) {
|
|
120
|
+
return (
|
|
121
|
+
<DropdownMenuPrimitive.RadioItem
|
|
122
|
+
data-slot="dropdown-menu-radio-item"
|
|
123
|
+
data-inset={inset}
|
|
124
|
+
className={cn(
|
|
125
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
126
|
+
className
|
|
127
|
+
)}
|
|
128
|
+
{...props}
|
|
129
|
+
>
|
|
130
|
+
<span
|
|
131
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
132
|
+
data-slot="dropdown-menu-radio-item-indicator"
|
|
133
|
+
>
|
|
134
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
135
|
+
<Check />
|
|
136
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
137
|
+
</span>
|
|
138
|
+
{children}
|
|
139
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function DropdownMenuLabel({
|
|
144
|
+
className,
|
|
145
|
+
inset,
|
|
146
|
+
...props
|
|
147
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
148
|
+
inset?: boolean
|
|
149
|
+
}) {
|
|
150
|
+
return (
|
|
151
|
+
<DropdownMenuPrimitive.Label
|
|
152
|
+
data-slot="dropdown-menu-label"
|
|
153
|
+
data-inset={inset}
|
|
154
|
+
className={cn(
|
|
155
|
+
'text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7',
|
|
156
|
+
className
|
|
157
|
+
)}
|
|
158
|
+
{...props}
|
|
159
|
+
/>
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function DropdownMenuSeparator({
|
|
164
|
+
className,
|
|
165
|
+
...props
|
|
166
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
167
|
+
return (
|
|
168
|
+
<DropdownMenuPrimitive.Separator
|
|
169
|
+
data-slot="dropdown-menu-separator"
|
|
170
|
+
className={cn('bg-border -mx-1 my-1 h-px', className)}
|
|
171
|
+
{...props}
|
|
172
|
+
/>
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {
|
|
177
|
+
return (
|
|
178
|
+
<span
|
|
179
|
+
data-slot="dropdown-menu-shortcut"
|
|
180
|
+
className={cn(
|
|
181
|
+
'text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest',
|
|
182
|
+
className
|
|
183
|
+
)}
|
|
184
|
+
{...props}
|
|
185
|
+
/>
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
190
|
+
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function DropdownMenuSubTrigger({
|
|
194
|
+
className,
|
|
195
|
+
inset,
|
|
196
|
+
children,
|
|
197
|
+
...props
|
|
198
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
199
|
+
inset?: boolean
|
|
200
|
+
}) {
|
|
201
|
+
return (
|
|
202
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
203
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
204
|
+
data-inset={inset}
|
|
205
|
+
className={cn(
|
|
206
|
+
"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
207
|
+
className
|
|
208
|
+
)}
|
|
209
|
+
{...props}
|
|
210
|
+
>
|
|
211
|
+
{children}
|
|
212
|
+
<ChevronRight className="ml-auto" />
|
|
213
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
214
|
+
)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function DropdownMenuSubContent({
|
|
218
|
+
className,
|
|
219
|
+
...props
|
|
220
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
221
|
+
return (
|
|
222
|
+
<DropdownMenuPrimitive.SubContent
|
|
223
|
+
data-slot="dropdown-menu-sub-content"
|
|
224
|
+
className={cn(
|
|
225
|
+
'data-open:animate-in data-closed:animate-out 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 ring-foreground/10 bg-popover text-popover-foreground z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg p-1 shadow-lg ring-1 duration-100',
|
|
226
|
+
className
|
|
227
|
+
)}
|
|
228
|
+
{...props}
|
|
229
|
+
/>
|
|
230
|
+
)
|
|
231
|
+
}
|
|
168
232
|
|
|
169
233
|
export {
|
|
170
234
|
DropdownMenu,
|
|
235
|
+
DropdownMenuPortal,
|
|
171
236
|
DropdownMenuTrigger,
|
|
172
237
|
DropdownMenuContent,
|
|
238
|
+
DropdownMenuGroup,
|
|
239
|
+
DropdownMenuLabel,
|
|
173
240
|
DropdownMenuItem,
|
|
174
241
|
DropdownMenuCheckboxItem,
|
|
242
|
+
DropdownMenuRadioGroup,
|
|
175
243
|
DropdownMenuRadioItem,
|
|
176
|
-
DropdownMenuLabel,
|
|
177
244
|
DropdownMenuSeparator,
|
|
178
245
|
DropdownMenuShortcut,
|
|
179
|
-
DropdownMenuGroup,
|
|
180
|
-
DropdownMenuPortal,
|
|
181
246
|
DropdownMenuSub,
|
|
182
|
-
DropdownMenuSubContent,
|
|
183
247
|
DropdownMenuSubTrigger,
|
|
184
|
-
|
|
248
|
+
DropdownMenuSubContent
|
|
185
249
|
}
|
package/templates/ui/empty.tsx
CHANGED
|
@@ -6,7 +6,7 @@ function Empty({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
6
6
|
<div
|
|
7
7
|
data-slot="empty"
|
|
8
8
|
className={cn(
|
|
9
|
-
'flex min-w-0 flex-1 flex-col items-center justify-center gap-
|
|
9
|
+
'flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance',
|
|
10
10
|
className
|
|
11
11
|
)}
|
|
12
12
|
{...props}
|
|
@@ -18,7 +18,7 @@ function EmptyHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
18
18
|
return (
|
|
19
19
|
<div
|
|
20
20
|
data-slot="empty-header"
|
|
21
|
-
className={cn('flex max-w-sm flex-col items-center gap-2
|
|
21
|
+
className={cn('flex max-w-sm flex-col items-center gap-2', className)}
|
|
22
22
|
{...props}
|
|
23
23
|
/>
|
|
24
24
|
)
|
|
@@ -30,7 +30,7 @@ const emptyMediaVariants = cva(
|
|
|
30
30
|
variants: {
|
|
31
31
|
variant: {
|
|
32
32
|
default: 'bg-transparent',
|
|
33
|
-
icon: "bg-muted text-foreground flex size-
|
|
33
|
+
icon: "bg-muted text-foreground flex size-8 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-4"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
defaultVariants: {
|
|
@@ -58,7 +58,7 @@ function EmptyTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
58
58
|
return (
|
|
59
59
|
<div
|
|
60
60
|
data-slot="empty-title"
|
|
61
|
-
className={cn('text-
|
|
61
|
+
className={cn('text-sm font-medium tracking-tight', className)}
|
|
62
62
|
{...props}
|
|
63
63
|
/>
|
|
64
64
|
)
|
|
@@ -81,7 +81,10 @@ function EmptyContent({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
81
81
|
return (
|
|
82
82
|
<div
|
|
83
83
|
data-slot="empty-content"
|
|
84
|
-
className={cn(
|
|
84
|
+
className={cn(
|
|
85
|
+
'flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance',
|
|
86
|
+
className
|
|
87
|
+
)}
|
|
85
88
|
{...props}
|
|
86
89
|
/>
|
|
87
90
|
)
|