@betterstart/cli 0.1.28 → 0.1.29
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 +742 -869
- 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/package.json
CHANGED
|
@@ -1,52 +1,83 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { cn } from '@cms/utils/cn'
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import * as React from 'react'
|
|
4
|
+
import { ChevronDown, ChevronUp } from 'lucide-react'
|
|
5
|
+
import { Accordion as AccordionPrimitive } from 'radix-ui'
|
|
6
|
+
import type * as React from 'react'
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function Accordion({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
9
|
+
return (
|
|
10
|
+
<AccordionPrimitive.Root
|
|
11
|
+
data-slot="accordion"
|
|
12
|
+
className={cn('flex w-full flex-col', className)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function AccordionItem({
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Item>) {
|
|
22
|
+
return (
|
|
23
|
+
<AccordionPrimitive.Item
|
|
24
|
+
data-slot="accordion-item"
|
|
25
|
+
className={cn('not-last:border-b', className)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
9
30
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
function AccordionTrigger({
|
|
32
|
+
className,
|
|
33
|
+
children,
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
36
|
+
return (
|
|
37
|
+
<AccordionPrimitive.Header className="flex">
|
|
38
|
+
<AccordionPrimitive.Trigger
|
|
39
|
+
data-slot="accordion-trigger"
|
|
40
|
+
className={cn(
|
|
41
|
+
'focus-visible:ring-ring/50 focus-visible:border-ring focus-visible:after:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4',
|
|
42
|
+
className
|
|
43
|
+
)}
|
|
44
|
+
{...props}
|
|
45
|
+
>
|
|
46
|
+
{children}
|
|
47
|
+
<ChevronDown
|
|
48
|
+
data-slot="accordion-trigger-icon"
|
|
49
|
+
className="pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
|
|
50
|
+
/>
|
|
51
|
+
<ChevronUp
|
|
52
|
+
data-slot="accordion-trigger-icon"
|
|
53
|
+
className="pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
|
|
54
|
+
/>
|
|
55
|
+
</AccordionPrimitive.Trigger>
|
|
56
|
+
</AccordionPrimitive.Header>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
17
59
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
className
|
|
28
|
-
)}
|
|
60
|
+
function AccordionContent({
|
|
61
|
+
className,
|
|
62
|
+
children,
|
|
63
|
+
...props
|
|
64
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
65
|
+
return (
|
|
66
|
+
<AccordionPrimitive.Content
|
|
67
|
+
data-slot="accordion-content"
|
|
68
|
+
className="data-open:animate-accordion-down data-closed:animate-accordion-up overflow-hidden text-sm"
|
|
29
69
|
{...props}
|
|
30
70
|
>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<AccordionPrimitive.Content
|
|
43
|
-
ref={ref}
|
|
44
|
-
className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
45
|
-
{...props}
|
|
46
|
-
>
|
|
47
|
-
<div className={cn('pb-4 pt-0', className)}>{children}</div>
|
|
48
|
-
</AccordionPrimitive.Content>
|
|
49
|
-
))
|
|
50
|
-
AccordionContent.displayName = AccordionPrimitive.Content.displayName
|
|
71
|
+
<div
|
|
72
|
+
className={cn(
|
|
73
|
+
'[&_a]:hover:text-foreground h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4',
|
|
74
|
+
className
|
|
75
|
+
)}
|
|
76
|
+
>
|
|
77
|
+
{children}
|
|
78
|
+
</div>
|
|
79
|
+
</AccordionPrimitive.Content>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
51
82
|
|
|
52
83
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
@@ -1,116 +1,181 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import { Button } from '@cms/components/ui/button'
|
|
3
4
|
import { cn } from '@cms/utils/cn'
|
|
4
|
-
import
|
|
5
|
-
import * as React from 'react'
|
|
6
|
-
import { buttonVariants } from './button'
|
|
5
|
+
import { AlertDialog as AlertDialogPrimitive } from 'radix-ui'
|
|
6
|
+
import type * as React from 'react'
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
9
|
+
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function AlertDialogTrigger({
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
15
|
+
return <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
16
|
+
}
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
19
|
+
return <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
20
|
+
}
|
|
11
21
|
|
|
12
|
-
|
|
22
|
+
function AlertDialogOverlay({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
26
|
+
return (
|
|
27
|
+
<AlertDialogPrimitive.Overlay
|
|
28
|
+
data-slot="alert-dialog-overlay"
|
|
29
|
+
className={cn(
|
|
30
|
+
'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 duration-100 supports-backdrop-filter:backdrop-blur-xs',
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
13
37
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
38
|
+
function AlertDialogContent({
|
|
39
|
+
className,
|
|
40
|
+
size = 'default',
|
|
41
|
+
...props
|
|
42
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
43
|
+
size?: 'default' | 'sm'
|
|
44
|
+
}) {
|
|
45
|
+
return (
|
|
46
|
+
<AlertDialogPortal>
|
|
47
|
+
<AlertDialogOverlay />
|
|
48
|
+
<AlertDialogPrimitive.Content
|
|
49
|
+
data-slot="alert-dialog-content"
|
|
50
|
+
data-size={size}
|
|
51
|
+
className={cn(
|
|
52
|
+
'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 bg-background ring-foreground/10 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 ring-1 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm',
|
|
53
|
+
className
|
|
54
|
+
)}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
</AlertDialogPortal>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
28
60
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<AlertDialogPortal>
|
|
34
|
-
<AlertDialogOverlay />
|
|
35
|
-
<AlertDialogPrimitive.Content
|
|
36
|
-
ref={ref}
|
|
61
|
+
function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
62
|
+
return (
|
|
63
|
+
<div
|
|
64
|
+
data-slot="alert-dialog-header"
|
|
37
65
|
className={cn(
|
|
38
|
-
'
|
|
66
|
+
'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',
|
|
39
67
|
className
|
|
40
68
|
)}
|
|
41
69
|
{...props}
|
|
42
70
|
/>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
|
|
71
|
+
)
|
|
72
|
+
}
|
|
46
73
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
74
|
+
function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
75
|
+
return (
|
|
76
|
+
<div
|
|
77
|
+
data-slot="alert-dialog-footer"
|
|
78
|
+
className={cn(
|
|
79
|
+
'bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',
|
|
80
|
+
className
|
|
81
|
+
)}
|
|
82
|
+
{...props}
|
|
83
|
+
/>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
51
86
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
)
|
|
58
|
-
|
|
87
|
+
function AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>) {
|
|
88
|
+
return (
|
|
89
|
+
<div
|
|
90
|
+
data-slot="alert-dialog-media"
|
|
91
|
+
className={cn(
|
|
92
|
+
"bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
|
|
93
|
+
className
|
|
94
|
+
)}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
)
|
|
98
|
+
}
|
|
59
99
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
100
|
+
function AlertDialogTitle({
|
|
101
|
+
className,
|
|
102
|
+
...props
|
|
103
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
104
|
+
return (
|
|
105
|
+
<AlertDialogPrimitive.Title
|
|
106
|
+
data-slot="alert-dialog-title"
|
|
107
|
+
className={cn(
|
|
108
|
+
'text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',
|
|
109
|
+
className
|
|
110
|
+
)}
|
|
111
|
+
{...props}
|
|
112
|
+
/>
|
|
113
|
+
)
|
|
114
|
+
}
|
|
71
115
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
116
|
+
function AlertDialogDescription({
|
|
117
|
+
className,
|
|
118
|
+
...props
|
|
119
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
120
|
+
return (
|
|
121
|
+
<AlertDialogPrimitive.Description
|
|
122
|
+
data-slot="alert-dialog-description"
|
|
123
|
+
className={cn(
|
|
124
|
+
'text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3',
|
|
125
|
+
className
|
|
126
|
+
)}
|
|
127
|
+
{...props}
|
|
128
|
+
/>
|
|
129
|
+
)
|
|
130
|
+
}
|
|
83
131
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
132
|
+
function AlertDialogAction({
|
|
133
|
+
className,
|
|
134
|
+
variant = 'default',
|
|
135
|
+
size = 'default',
|
|
136
|
+
...props
|
|
137
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &
|
|
138
|
+
Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {
|
|
139
|
+
return (
|
|
140
|
+
<Button variant={variant} size={size} asChild>
|
|
141
|
+
<AlertDialogPrimitive.Action
|
|
142
|
+
data-slot="alert-dialog-action"
|
|
143
|
+
className={cn(className)}
|
|
144
|
+
{...props}
|
|
145
|
+
/>
|
|
146
|
+
</Button>
|
|
147
|
+
)
|
|
148
|
+
}
|
|
91
149
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
150
|
+
function AlertDialogCancel({
|
|
151
|
+
className,
|
|
152
|
+
variant = 'outline',
|
|
153
|
+
size = 'default',
|
|
154
|
+
...props
|
|
155
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &
|
|
156
|
+
Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {
|
|
157
|
+
return (
|
|
158
|
+
<Button variant={variant} size={size} asChild>
|
|
159
|
+
<AlertDialogPrimitive.Cancel
|
|
160
|
+
data-slot="alert-dialog-cancel"
|
|
161
|
+
className={cn(className)}
|
|
162
|
+
{...props}
|
|
163
|
+
/>
|
|
164
|
+
</Button>
|
|
165
|
+
)
|
|
166
|
+
}
|
|
103
167
|
|
|
104
168
|
export {
|
|
105
169
|
AlertDialog,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
AlertDialogTrigger,
|
|
170
|
+
AlertDialogAction,
|
|
171
|
+
AlertDialogCancel,
|
|
109
172
|
AlertDialogContent,
|
|
110
|
-
|
|
173
|
+
AlertDialogDescription,
|
|
111
174
|
AlertDialogFooter,
|
|
175
|
+
AlertDialogHeader,
|
|
176
|
+
AlertDialogMedia,
|
|
177
|
+
AlertDialogOverlay,
|
|
178
|
+
AlertDialogPortal,
|
|
112
179
|
AlertDialogTitle,
|
|
113
|
-
|
|
114
|
-
AlertDialogAction,
|
|
115
|
-
AlertDialogCancel
|
|
180
|
+
AlertDialogTrigger
|
|
116
181
|
}
|
package/templates/ui/alert.tsx
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { cn } from '@cms/utils/cn'
|
|
2
2
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
3
|
-
import * as React from 'react'
|
|
3
|
+
import type * as React from 'react'
|
|
4
4
|
|
|
5
5
|
const alertVariants = cva(
|
|
6
|
-
|
|
6
|
+
"grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default: 'bg-
|
|
10
|
+
default: 'bg-card text-card-foreground',
|
|
11
11
|
destructive:
|
|
12
|
-
'
|
|
12
|
+
'text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current'
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
defaultVariants: {
|
|
@@ -18,31 +18,51 @@ const alertVariants = cva(
|
|
|
18
18
|
}
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
function Alert({
|
|
22
|
+
className,
|
|
23
|
+
variant,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {
|
|
26
|
+
return (
|
|
27
|
+
<div
|
|
28
|
+
data-slot="alert"
|
|
29
|
+
role="alert"
|
|
30
|
+
className={cn(alertVariants({ variant }), className)}
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
28
35
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
className={cn(
|
|
36
|
+
function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
|
37
|
+
return (
|
|
38
|
+
<div
|
|
39
|
+
data-slot="alert-title"
|
|
40
|
+
className={cn(
|
|
41
|
+
'[&_a]:hover:text-foreground font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3',
|
|
42
|
+
className
|
|
43
|
+
)}
|
|
34
44
|
{...props}
|
|
35
45
|
/>
|
|
36
46
|
)
|
|
37
|
-
|
|
38
|
-
AlertTitle.displayName = 'AlertTitle'
|
|
47
|
+
}
|
|
39
48
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
)
|
|
46
|
-
|
|
49
|
+
function AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {
|
|
50
|
+
return (
|
|
51
|
+
<div
|
|
52
|
+
data-slot="alert-description"
|
|
53
|
+
className={cn(
|
|
54
|
+
'text-muted-foreground [&_a]:hover:text-foreground text-sm text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4',
|
|
55
|
+
className
|
|
56
|
+
)}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function AlertAction({ className, ...props }: React.ComponentProps<'div'>) {
|
|
63
|
+
return (
|
|
64
|
+
<div data-slot="alert-action" className={cn('absolute top-2 right-2', className)} {...props} />
|
|
65
|
+
)
|
|
66
|
+
}
|
|
47
67
|
|
|
48
|
-
export { Alert, AlertTitle, AlertDescription }
|
|
68
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction }
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { AspectRatio as AspectRatioPrimitive } from 'radix-ui'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function AspectRatio({ ...props }: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
|
|
6
|
+
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />
|
|
7
|
+
}
|
|
6
8
|
|
|
7
9
|
export { AspectRatio }
|