@blips/ui 0.0.1 → 2.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/index.cjs +4308 -2010
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +435 -411
- package/dist/index.d.ts +435 -411
- package/dist/index.js +4244 -2008
- package/dist/index.js.map +1 -1
- package/package.json +18 -4
- package/src/components/accordion.tsx +58 -48
- package/src/components/alert-dialog.tsx +170 -112
- package/src/components/alert.tsx +49 -42
- package/src/components/aspect-ratio.tsx +9 -3
- package/src/components/avatar.tsx +109 -50
- package/src/components/badge.tsx +29 -17
- package/src/components/breadcrumb.tsx +81 -87
- package/src/components/button-group.tsx +83 -0
- package/src/components/button.tsx +40 -32
- package/src/components/calendar.tsx +49 -45
- package/src/components/card.tsx +77 -71
- package/src/components/carousel.tsx +150 -168
- package/src/components/chart.tsx +357 -0
- package/src/components/checkbox.tsx +28 -24
- package/src/components/collapsible.tsx +28 -6
- package/src/components/command.tsx +144 -110
- package/src/components/context-menu.tsx +220 -166
- package/src/components/dialog.tsx +131 -95
- package/src/components/drawer.tsx +105 -86
- package/src/components/dropdown-menu.tsx +234 -177
- package/src/components/form.tsx +167 -0
- package/src/components/hover-card.tsx +39 -22
- package/src/components/input-group.tsx +175 -0
- package/src/components/input-otp.tsx +56 -48
- package/src/components/input.tsx +18 -19
- package/src/components/kbd.tsx +28 -0
- package/src/components/label.tsx +20 -22
- package/src/components/menubar.tsx +221 -199
- package/src/components/navigation-menu.tsx +144 -102
- package/src/components/pagination.tsx +102 -91
- package/src/components/popover.tsx +86 -26
- package/src/components/progress.tsx +27 -24
- package/src/components/radio-group.tsx +28 -25
- package/src/components/resizable.tsx +42 -34
- package/src/components/scroll-area.tsx +54 -42
- package/src/components/select.tsx +165 -135
- package/src/components/separator.tsx +16 -17
- package/src/components/sheet.tsx +116 -113
- package/src/components/sidebar.tsx +726 -0
- package/src/components/skeleton.tsx +6 -8
- package/src/components/slider.tsx +60 -23
- package/src/components/sonner.tsx +25 -30
- package/src/components/spinner.tsx +16 -0
- package/src/components/switch.tsx +30 -22
- package/src/components/table.tsx +96 -97
- package/src/components/tabs.tsx +91 -53
- package/src/components/textarea.tsx +8 -12
- package/src/components/toggle-group.tsx +60 -37
- package/src/components/toggle.tsx +28 -24
- package/src/components/tooltip.tsx +50 -23
- package/src/globals.css +230 -68
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/index.ts +105 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blips/ui",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Blips UI Component Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"./globals.css": "./src/globals.css",
|
|
21
|
+
"./postcss.config": "./postcss.config.mjs",
|
|
21
22
|
"./lib/utils": "./src/lib/utils.ts",
|
|
22
23
|
"./components/accordion": "./src/components/accordion.tsx",
|
|
23
24
|
"./components/alert": "./src/components/alert.tsx",
|
|
@@ -61,7 +62,15 @@
|
|
|
61
62
|
"./components/textarea": "./src/components/textarea.tsx",
|
|
62
63
|
"./components/toggle": "./src/components/toggle.tsx",
|
|
63
64
|
"./components/toggle-group": "./src/components/toggle-group.tsx",
|
|
64
|
-
"./components/tooltip": "./src/components/tooltip.tsx"
|
|
65
|
+
"./components/tooltip": "./src/components/tooltip.tsx",
|
|
66
|
+
"./components/button-group": "./src/components/button-group.tsx",
|
|
67
|
+
"./components/chart": "./src/components/chart.tsx",
|
|
68
|
+
"./components/form": "./src/components/form.tsx",
|
|
69
|
+
"./components/input-group": "./src/components/input-group.tsx",
|
|
70
|
+
"./components/kbd": "./src/components/kbd.tsx",
|
|
71
|
+
"./components/sidebar": "./src/components/sidebar.tsx",
|
|
72
|
+
"./components/spinner": "./src/components/spinner.tsx",
|
|
73
|
+
"./hooks/use-mobile": "./src/hooks/use-mobile.tsx"
|
|
65
74
|
},
|
|
66
75
|
"files": [
|
|
67
76
|
"dist",
|
|
@@ -83,6 +92,8 @@
|
|
|
83
92
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
84
93
|
},
|
|
85
94
|
"dependencies": {
|
|
95
|
+
"@hookform/resolvers": "^5.2.2",
|
|
96
|
+
"@phosphor-icons/react": "^2.1.10",
|
|
86
97
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
87
98
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
88
99
|
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
@@ -115,13 +126,16 @@
|
|
|
115
126
|
"date-fns": "^4.1.0",
|
|
116
127
|
"embla-carousel-react": "^8.6.0",
|
|
117
128
|
"input-otp": "^1.4.2",
|
|
118
|
-
"lucide-react": "^0.468.0",
|
|
119
129
|
"next-themes": "^0.4.6",
|
|
120
130
|
"react-day-picker": "^9.13.0",
|
|
131
|
+
"react-hook-form": "^7.71.1",
|
|
121
132
|
"react-resizable-panels": "^4.5.9",
|
|
133
|
+
"recharts": "2.15.4",
|
|
122
134
|
"sonner": "^2.0.7",
|
|
123
135
|
"tailwind-merge": "^2.6.0",
|
|
124
|
-
"
|
|
136
|
+
"tw-animate-css": "^1.4.0",
|
|
137
|
+
"vaul": "^1.1.2",
|
|
138
|
+
"zod": "^4.3.6"
|
|
125
139
|
},
|
|
126
140
|
"devDependencies": {
|
|
127
141
|
"@types/node": "^22.10.2",
|
|
@@ -1,56 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
import { ChevronDown } from "lucide-react";
|
|
3
|
-
import * as React from "react";
|
|
1
|
+
"use client"
|
|
4
2
|
|
|
5
|
-
import
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { CaretDown } from "@phosphor-icons/react"
|
|
5
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion"
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
import { cn } from "../lib/utils"
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ref={ref}
|
|
15
|
-
className={cn("border-b", className)}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
));
|
|
19
|
-
AccordionItem.displayName = "AccordionItem";
|
|
9
|
+
function Accordion({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
12
|
+
return <AccordionPrimitive.Root data-slot="accordion" {...props} />
|
|
13
|
+
}
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<AccordionPrimitive.
|
|
27
|
-
|
|
28
|
-
className={cn(
|
|
29
|
-
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
30
|
-
className
|
|
31
|
-
)}
|
|
15
|
+
function AccordionItem({
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Item>) {
|
|
19
|
+
return (
|
|
20
|
+
<AccordionPrimitive.Item
|
|
21
|
+
data-slot="accordion-item"
|
|
22
|
+
className={cn("border-b last:border-b-0", className)}
|
|
32
23
|
{...props}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</AccordionPrimitive.Trigger>
|
|
37
|
-
</AccordionPrimitive.Header>
|
|
38
|
-
));
|
|
39
|
-
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
24
|
+
/>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
40
27
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
className="
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
28
|
+
function AccordionTrigger({
|
|
29
|
+
className,
|
|
30
|
+
children,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
33
|
+
return (
|
|
34
|
+
<AccordionPrimitive.Header className="flex">
|
|
35
|
+
<AccordionPrimitive.Trigger
|
|
36
|
+
data-slot="accordion-trigger"
|
|
37
|
+
className={cn(
|
|
38
|
+
"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
39
|
+
className
|
|
40
|
+
)}
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
{children}
|
|
44
|
+
<CaretDown className="pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200" />
|
|
45
|
+
</AccordionPrimitive.Trigger>
|
|
46
|
+
</AccordionPrimitive.Header>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
53
49
|
|
|
54
|
-
AccordionContent
|
|
50
|
+
function AccordionContent({
|
|
51
|
+
className,
|
|
52
|
+
children,
|
|
53
|
+
...props
|
|
54
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
55
|
+
return (
|
|
56
|
+
<AccordionPrimitive.Content
|
|
57
|
+
data-slot="accordion-content"
|
|
58
|
+
className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
59
|
+
{...props}
|
|
60
|
+
>
|
|
61
|
+
<div className={cn("pt-0 pb-4", className)}>{children}</div>
|
|
62
|
+
</AccordionPrimitive.Content>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
55
65
|
|
|
56
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
66
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
@@ -1,138 +1,196 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { buttonVariants } from "./button";
|
|
4
|
-
import { cn } from "../lib/utils";
|
|
1
|
+
"use client"
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
import { cn } from "../lib/utils"
|
|
7
|
+
import { Button } from "./button"
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
function AlertDialog({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
12
|
+
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function AlertDialogTrigger({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
18
|
+
return (
|
|
19
|
+
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function AlertDialogPortal({
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
26
|
+
return (
|
|
27
|
+
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function AlertDialogOverlay({
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
35
|
+
return (
|
|
36
|
+
<AlertDialogPrimitive.Overlay
|
|
37
|
+
data-slot="alert-dialog-overlay"
|
|
38
|
+
className={cn(
|
|
39
|
+
"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
40
|
+
className
|
|
41
|
+
)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
11
46
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
47
|
+
function AlertDialogContent({
|
|
48
|
+
className,
|
|
49
|
+
size = "default",
|
|
50
|
+
...props
|
|
51
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
52
|
+
size?: "default" | "sm"
|
|
53
|
+
}) {
|
|
54
|
+
return (
|
|
55
|
+
<AlertDialogPortal>
|
|
56
|
+
<AlertDialogOverlay />
|
|
57
|
+
<AlertDialogPrimitive.Content
|
|
58
|
+
data-slot="alert-dialog-content"
|
|
59
|
+
data-size={size}
|
|
60
|
+
className={cn(
|
|
61
|
+
"group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg",
|
|
62
|
+
className
|
|
63
|
+
)}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
</AlertDialogPortal>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
26
69
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
ref={ref}
|
|
70
|
+
function AlertDialogHeader({
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
}: React.ComponentProps<"div">) {
|
|
74
|
+
return (
|
|
75
|
+
<div
|
|
76
|
+
data-slot="alert-dialog-header"
|
|
35
77
|
className={cn(
|
|
36
|
-
"
|
|
78
|
+
"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-6 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]",
|
|
37
79
|
className
|
|
38
80
|
)}
|
|
39
81
|
{...props}
|
|
40
82
|
/>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
83
|
+
)
|
|
84
|
+
}
|
|
44
85
|
|
|
45
|
-
|
|
86
|
+
function AlertDialogFooter({
|
|
46
87
|
className,
|
|
47
88
|
...props
|
|
48
|
-
}: React.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
className
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
89
|
+
}: React.ComponentProps<"div">) {
|
|
90
|
+
return (
|
|
91
|
+
<div
|
|
92
|
+
data-slot="alert-dialog-footer"
|
|
93
|
+
className={cn(
|
|
94
|
+
"flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
95
|
+
className
|
|
96
|
+
)}
|
|
97
|
+
{...props}
|
|
98
|
+
/>
|
|
99
|
+
)
|
|
100
|
+
}
|
|
58
101
|
|
|
59
|
-
|
|
102
|
+
function AlertDialogTitle({
|
|
60
103
|
className,
|
|
61
104
|
...props
|
|
62
|
-
}: React.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
className
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
105
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
106
|
+
return (
|
|
107
|
+
<AlertDialogPrimitive.Title
|
|
108
|
+
data-slot="alert-dialog-title"
|
|
109
|
+
className={cn(
|
|
110
|
+
"text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
111
|
+
className
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
/>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
72
117
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
118
|
+
function AlertDialogDescription({
|
|
119
|
+
className,
|
|
120
|
+
...props
|
|
121
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
122
|
+
return (
|
|
123
|
+
<AlertDialogPrimitive.Description
|
|
124
|
+
data-slot="alert-dialog-description"
|
|
125
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
126
|
+
{...props}
|
|
127
|
+
/>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
84
130
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
131
|
+
function AlertDialogMedia({
|
|
132
|
+
className,
|
|
133
|
+
...props
|
|
134
|
+
}: React.ComponentProps<"div">) {
|
|
135
|
+
return (
|
|
136
|
+
<div
|
|
137
|
+
data-slot="alert-dialog-media"
|
|
138
|
+
className={cn(
|
|
139
|
+
"mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",
|
|
140
|
+
className
|
|
141
|
+
)}
|
|
142
|
+
{...props}
|
|
143
|
+
/>
|
|
144
|
+
)
|
|
145
|
+
}
|
|
97
146
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
147
|
+
function AlertDialogAction({
|
|
148
|
+
className,
|
|
149
|
+
variant = "default",
|
|
150
|
+
size = "default",
|
|
151
|
+
...props
|
|
152
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &
|
|
153
|
+
Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
|
|
154
|
+
return (
|
|
155
|
+
<Button variant={variant} size={size} asChild>
|
|
156
|
+
<AlertDialogPrimitive.Action
|
|
157
|
+
data-slot="alert-dialog-action"
|
|
158
|
+
className={cn(className)}
|
|
159
|
+
{...props}
|
|
160
|
+
/>
|
|
161
|
+
</Button>
|
|
162
|
+
)
|
|
163
|
+
}
|
|
109
164
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
165
|
+
function AlertDialogCancel({
|
|
166
|
+
className,
|
|
167
|
+
variant = "outline",
|
|
168
|
+
size = "default",
|
|
169
|
+
...props
|
|
170
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &
|
|
171
|
+
Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
|
|
172
|
+
return (
|
|
173
|
+
<Button variant={variant} size={size} asChild>
|
|
174
|
+
<AlertDialogPrimitive.Cancel
|
|
175
|
+
data-slot="alert-dialog-cancel"
|
|
176
|
+
className={cn(className)}
|
|
177
|
+
{...props}
|
|
178
|
+
/>
|
|
179
|
+
</Button>
|
|
180
|
+
)
|
|
181
|
+
}
|
|
125
182
|
|
|
126
183
|
export {
|
|
127
184
|
AlertDialog,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
AlertDialogTrigger,
|
|
185
|
+
AlertDialogAction,
|
|
186
|
+
AlertDialogCancel,
|
|
131
187
|
AlertDialogContent,
|
|
132
|
-
|
|
188
|
+
AlertDialogDescription,
|
|
133
189
|
AlertDialogFooter,
|
|
190
|
+
AlertDialogHeader,
|
|
191
|
+
AlertDialogMedia,
|
|
192
|
+
AlertDialogOverlay,
|
|
193
|
+
AlertDialogPortal,
|
|
134
194
|
AlertDialogTitle,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
AlertDialogCancel,
|
|
138
|
-
};
|
|
195
|
+
AlertDialogTrigger,
|
|
196
|
+
}
|
package/src/components/alert.tsx
CHANGED
|
@@ -1,59 +1,66 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
3
|
|
|
4
|
-
import { cn } from "../lib/utils"
|
|
4
|
+
import { cn } from "../lib/utils"
|
|
5
5
|
|
|
6
6
|
const alertVariants = cva(
|
|
7
|
-
"relative w-full rounded-lg border
|
|
7
|
+
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-
|
|
11
|
+
default: "bg-card text-card-foreground",
|
|
12
12
|
destructive:
|
|
13
|
-
"
|
|
13
|
+
"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current",
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
|
17
17
|
variant: "default",
|
|
18
18
|
},
|
|
19
19
|
}
|
|
20
|
-
)
|
|
20
|
+
)
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
function Alert({
|
|
23
|
+
className,
|
|
24
|
+
variant,
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
|
|
27
|
+
return (
|
|
28
|
+
<div
|
|
29
|
+
data-slot="alert"
|
|
30
|
+
role="alert"
|
|
31
|
+
className={cn(alertVariants({ variant }), className)}
|
|
32
|
+
{...props}
|
|
33
|
+
/>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
data-slot="alert-title"
|
|
41
|
+
className={cn(
|
|
42
|
+
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
43
|
+
className
|
|
44
|
+
)}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
46
49
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
function AlertDescription({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}: React.ComponentProps<"div">) {
|
|
54
|
+
return (
|
|
55
|
+
<div
|
|
56
|
+
data-slot="alert-description"
|
|
57
|
+
className={cn(
|
|
58
|
+
"col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",
|
|
59
|
+
className
|
|
60
|
+
)}
|
|
61
|
+
{...props}
|
|
62
|
+
/>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
58
65
|
|
|
59
|
-
export { Alert, AlertTitle, AlertDescription }
|
|
66
|
+
export { Alert, AlertTitle, AlertDescription }
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use client"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function AspectRatio({
|
|
6
|
+
...props
|
|
7
|
+
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
|
|
8
|
+
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { AspectRatio }
|