@ichaingo/ui 1.1.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/.babelrc +12 -0
- package/README.md +103 -0
- package/components.json +21 -0
- package/dist/accordion.d.ts +13 -0
- package/dist/accordion.mjs +64 -0
- package/dist/alert-dialog.d.ts +27 -0
- package/dist/alert-dialog.mjs +146 -0
- package/dist/alert.d.ts +16 -0
- package/dist/alert.mjs +66 -0
- package/dist/aspect-ratio.d.ts +6 -0
- package/dist/aspect-ratio.mjs +10 -0
- package/dist/avatar.d.ts +11 -0
- package/dist/avatar.mjs +53 -0
- package/dist/badge.d.ts +14 -0
- package/dist/badge.mjs +39 -0
- package/dist/breadcrumb.d.ts +20 -0
- package/dist/breadcrumb.mjs +102 -0
- package/dist/button.d.ts +15 -0
- package/dist/button.mjs +49 -0
- package/dist/calendar.d.ts +23 -0
- package/dist/calendar.mjs +173 -0
- package/dist/card.d.ts +18 -0
- package/dist/card.mjs +90 -0
- package/dist/carousel.d.ts +42 -0
- package/dist/carousel.mjs +177 -0
- package/dist/checkbox.d.ts +7 -0
- package/dist/checkbox.mjs +31 -0
- package/dist/collapsible.d.ts +10 -0
- package/dist/collapsible.mjs +34 -0
- package/dist/command.d.ts +31 -0
- package/dist/command.mjs +170 -0
- package/dist/context-menu.d.ts +42 -0
- package/dist/context-menu.mjs +223 -0
- package/dist/dialog.d.ts +27 -0
- package/dist/dialog.mjs +136 -0
- package/dist/dropdown-menu.d.ts +42 -0
- package/dist/dropdown-menu.mjs +231 -0
- package/dist/form.d.ts +38 -0
- package/dist/form.mjs +101 -0
- package/dist/hover-card.d.ts +11 -0
- package/dist/hover-card.mjs +38 -0
- package/dist/input.d.ts +6 -0
- package/dist/input.mjs +21 -0
- package/dist/label.d.ts +7 -0
- package/dist/label.mjs +23 -0
- package/dist/menubar.d.ts +44 -0
- package/dist/menubar.mjs +251 -0
- package/dist/navigation-menu.d.ts +26 -0
- package/dist/navigation-menu.mjs +170 -0
- package/dist/pagination.d.ts +33 -0
- package/dist/pagination.mjs +116 -0
- package/dist/popover.d.ts +13 -0
- package/dist/popover.mjs +44 -0
- package/dist/progress.d.ts +7 -0
- package/dist/progress.mjs +31 -0
- package/dist/radio-group.d.ts +9 -0
- package/dist/radio-group.mjs +45 -0
- package/dist/resizable.d.ts +13 -0
- package/dist/resizable.mjs +48 -0
- package/dist/scroll-area.d.ts +9 -0
- package/dist/scroll-area.mjs +60 -0
- package/dist/select.d.ts +27 -0
- package/dist/select.mjs +169 -0
- package/dist/separator.d.ts +7 -0
- package/dist/separator.mjs +26 -0
- package/dist/sheet.d.ts +23 -0
- package/dist/sheet.mjs +126 -0
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.mjs +15 -0
- package/dist/slider.d.ts +7 -0
- package/dist/slider.mjs +63 -0
- package/dist/sonner.d.ts +6 -0
- package/dist/sonner.mjs +22 -0
- package/dist/switch.d.ts +7 -0
- package/dist/switch.mjs +31 -0
- package/dist/table.d.ts +20 -0
- package/dist/table.mjs +114 -0
- package/dist/tabs.d.ts +13 -0
- package/dist/tabs.mjs +67 -0
- package/dist/textarea.d.ts +6 -0
- package/dist/textarea.mjs +18 -0
- package/dist/toggle-group.d.ts +16 -0
- package/dist/toggle-group.mjs +62 -0
- package/dist/toggle.d.ts +14 -0
- package/dist/toggle.mjs +43 -0
- package/dist/tooltip.d.ts +13 -0
- package/dist/tooltip.mjs +55 -0
- package/dist/utils-B7J70Nno.js +8 -0
- package/eslint.config.mjs +12 -0
- package/package.json +273 -0
- package/postcss.config.js +6 -0
- package/src/components/ui/accordion.tsx +64 -0
- package/src/components/ui/alert-dialog.tsx +155 -0
- package/src/components/ui/alert.tsx +66 -0
- package/src/components/ui/aspect-ratio.tsx +9 -0
- package/src/components/ui/avatar.tsx +51 -0
- package/src/components/ui/badge.tsx +46 -0
- package/src/components/ui/breadcrumb.tsx +109 -0
- package/src/components/ui/button.tsx +59 -0
- package/src/components/ui/calendar.tsx +211 -0
- package/src/components/ui/card.tsx +92 -0
- package/src/components/ui/carousel.tsx +239 -0
- package/src/components/ui/checkbox.tsx +30 -0
- package/src/components/ui/collapsible.tsx +31 -0
- package/src/components/ui/command.tsx +182 -0
- package/src/components/ui/context-menu.tsx +250 -0
- package/src/components/ui/dialog.tsx +141 -0
- package/src/components/ui/dropdown-menu.tsx +255 -0
- package/src/components/ui/form.tsx +165 -0
- package/src/components/ui/hover-card.tsx +42 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/menubar.tsx +274 -0
- package/src/components/ui/navigation-menu.tsx +168 -0
- package/src/components/ui/pagination.tsx +125 -0
- package/src/components/ui/popover.tsx +46 -0
- package/src/components/ui/progress.tsx +29 -0
- package/src/components/ui/radio-group.tsx +43 -0
- package/src/components/ui/resizable.tsx +54 -0
- package/src/components/ui/scroll-area.tsx +56 -0
- package/src/components/ui/select.tsx +183 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +137 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +61 -0
- package/src/components/ui/sonner.tsx +23 -0
- package/src/components/ui/switch.tsx +29 -0
- package/src/components/ui/table.tsx +114 -0
- package/src/components/ui/tabs.tsx +64 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toggle-group.tsx +71 -0
- package/src/components/ui/toggle.tsx +45 -0
- package/src/components/ui/tooltip.tsx +59 -0
- package/src/index.ts +46 -0
- package/src/lib/utils.ts +6 -0
- package/src/style.css +0 -0
- package/tailwind.config.js +52 -0
- package/tsconfig.json +19 -0
- package/tsconfig.lib.json +54 -0
- package/tsconfig.spec.json +32 -0
- package/vite.config.ts +136 -0
package/package.json
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ichaingo/ui",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
"./package.json": "./package.json",
|
|
7
|
+
"./accordion": {
|
|
8
|
+
"types": "./dist/accordion.d.ts",
|
|
9
|
+
"import": "./dist/accordion.mjs",
|
|
10
|
+
"default": "./dist/accordion.mjs"
|
|
11
|
+
},
|
|
12
|
+
"./alert": {
|
|
13
|
+
"types": "./dist/alert.d.ts",
|
|
14
|
+
"import": "./dist/alert.mjs",
|
|
15
|
+
"default": "./dist/alert.mjs"
|
|
16
|
+
},
|
|
17
|
+
"./alert-dialog": {
|
|
18
|
+
"types": "./dist/alert-dialog.d.ts",
|
|
19
|
+
"import": "./dist/alert-dialog.mjs",
|
|
20
|
+
"default": "./dist/alert-dialog.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./aspect-ratio": {
|
|
23
|
+
"types": "./dist/aspect-ratio.d.ts",
|
|
24
|
+
"import": "./dist/aspect-ratio.mjs",
|
|
25
|
+
"default": "./dist/aspect-ratio.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./avatar": {
|
|
28
|
+
"types": "./dist/avatar.d.ts",
|
|
29
|
+
"import": "./dist/avatar.mjs",
|
|
30
|
+
"default": "./dist/avatar.mjs"
|
|
31
|
+
},
|
|
32
|
+
"./badge": {
|
|
33
|
+
"types": "./dist/badge.d.ts",
|
|
34
|
+
"import": "./dist/badge.mjs",
|
|
35
|
+
"default": "./dist/badge.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./breadcrumb": {
|
|
38
|
+
"types": "./dist/breadcrumb.d.ts",
|
|
39
|
+
"import": "./dist/breadcrumb.mjs",
|
|
40
|
+
"default": "./dist/breadcrumb.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./button": {
|
|
43
|
+
"types": "./dist/button.d.ts",
|
|
44
|
+
"import": "./dist/button.mjs",
|
|
45
|
+
"default": "./dist/button.mjs"
|
|
46
|
+
},
|
|
47
|
+
"./calendar": {
|
|
48
|
+
"types": "./dist/calendar.d.ts",
|
|
49
|
+
"import": "./dist/calendar.mjs",
|
|
50
|
+
"default": "./dist/calendar.mjs"
|
|
51
|
+
},
|
|
52
|
+
"./card": {
|
|
53
|
+
"types": "./dist/card.d.ts",
|
|
54
|
+
"import": "./dist/card.mjs",
|
|
55
|
+
"default": "./dist/card.mjs"
|
|
56
|
+
},
|
|
57
|
+
"./carousel": {
|
|
58
|
+
"types": "./dist/carousel.d.ts",
|
|
59
|
+
"import": "./dist/carousel.mjs",
|
|
60
|
+
"default": "./dist/carousel.mjs"
|
|
61
|
+
},
|
|
62
|
+
"./checkbox": {
|
|
63
|
+
"types": "./dist/checkbox.d.ts",
|
|
64
|
+
"import": "./dist/checkbox.mjs",
|
|
65
|
+
"default": "./dist/checkbox.mjs"
|
|
66
|
+
},
|
|
67
|
+
"./collapsible": {
|
|
68
|
+
"types": "./dist/collapsible.d.ts",
|
|
69
|
+
"import": "./dist/collapsible.mjs",
|
|
70
|
+
"default": "./dist/collapsible.mjs"
|
|
71
|
+
},
|
|
72
|
+
"./command": {
|
|
73
|
+
"types": "./dist/command.d.ts",
|
|
74
|
+
"import": "./dist/command.mjs",
|
|
75
|
+
"default": "./dist/command.mjs"
|
|
76
|
+
},
|
|
77
|
+
"./context-menu": {
|
|
78
|
+
"types": "./dist/context-menu.d.ts",
|
|
79
|
+
"import": "./dist/context-menu.mjs",
|
|
80
|
+
"default": "./dist/context-menu.mjs"
|
|
81
|
+
},
|
|
82
|
+
"./dialog": {
|
|
83
|
+
"types": "./dist/dialog.d.ts",
|
|
84
|
+
"import": "./dist/dialog.mjs",
|
|
85
|
+
"default": "./dist/dialog.mjs"
|
|
86
|
+
},
|
|
87
|
+
"./dropdown-menu": {
|
|
88
|
+
"types": "./dist/dropdown-menu.d.ts",
|
|
89
|
+
"import": "./dist/dropdown-menu.mjs",
|
|
90
|
+
"default": "./dist/dropdown-menu.mjs"
|
|
91
|
+
},
|
|
92
|
+
"./form": {
|
|
93
|
+
"types": "./dist/form.d.ts",
|
|
94
|
+
"import": "./dist/form.mjs",
|
|
95
|
+
"default": "./dist/form.mjs"
|
|
96
|
+
},
|
|
97
|
+
"./hover-card": {
|
|
98
|
+
"types": "./dist/hover-card.d.ts",
|
|
99
|
+
"import": "./dist/hover-card.mjs",
|
|
100
|
+
"default": "./dist/hover-card.mjs"
|
|
101
|
+
},
|
|
102
|
+
"./input": {
|
|
103
|
+
"types": "./dist/input.d.ts",
|
|
104
|
+
"import": "./dist/input.mjs",
|
|
105
|
+
"default": "./dist/input.mjs"
|
|
106
|
+
},
|
|
107
|
+
"./label": {
|
|
108
|
+
"types": "./dist/label.d.ts",
|
|
109
|
+
"import": "./dist/label.mjs",
|
|
110
|
+
"default": "./dist/label.mjs"
|
|
111
|
+
},
|
|
112
|
+
"./menubar": {
|
|
113
|
+
"types": "./dist/menubar.d.ts",
|
|
114
|
+
"import": "./dist/menubar.mjs",
|
|
115
|
+
"default": "./dist/menubar.mjs"
|
|
116
|
+
},
|
|
117
|
+
"./navigation-menu": {
|
|
118
|
+
"types": "./dist/navigation-menu.d.ts",
|
|
119
|
+
"import": "./dist/navigation-menu.mjs",
|
|
120
|
+
"default": "./dist/navigation-menu.mjs"
|
|
121
|
+
},
|
|
122
|
+
"./pagination": {
|
|
123
|
+
"types": "./dist/pagination.d.ts",
|
|
124
|
+
"import": "./dist/pagination.mjs",
|
|
125
|
+
"default": "./dist/pagination.mjs"
|
|
126
|
+
},
|
|
127
|
+
"./popover": {
|
|
128
|
+
"types": "./dist/popover.d.ts",
|
|
129
|
+
"import": "./dist/popover.mjs",
|
|
130
|
+
"default": "./dist/popover.mjs"
|
|
131
|
+
},
|
|
132
|
+
"./progress": {
|
|
133
|
+
"types": "./dist/progress.d.ts",
|
|
134
|
+
"import": "./dist/progress.mjs",
|
|
135
|
+
"default": "./dist/progress.mjs"
|
|
136
|
+
},
|
|
137
|
+
"./radio-group": {
|
|
138
|
+
"types": "./dist/radio-group.d.ts",
|
|
139
|
+
"import": "./dist/radio-group.mjs",
|
|
140
|
+
"default": "./dist/radio-group.mjs"
|
|
141
|
+
},
|
|
142
|
+
"./resizable": {
|
|
143
|
+
"types": "./dist/resizable.d.ts",
|
|
144
|
+
"import": "./dist/resizable.mjs",
|
|
145
|
+
"default": "./dist/resizable.mjs"
|
|
146
|
+
},
|
|
147
|
+
"./scroll-area": {
|
|
148
|
+
"types": "./dist/scroll-area.d.ts",
|
|
149
|
+
"import": "./dist/scroll-area.mjs",
|
|
150
|
+
"default": "./dist/scroll-area.mjs"
|
|
151
|
+
},
|
|
152
|
+
"./select": {
|
|
153
|
+
"types": "./dist/select.d.ts",
|
|
154
|
+
"import": "./dist/select.mjs",
|
|
155
|
+
"default": "./dist/select.mjs"
|
|
156
|
+
},
|
|
157
|
+
"./separator": {
|
|
158
|
+
"types": "./dist/separator.d.ts",
|
|
159
|
+
"import": "./dist/separator.mjs",
|
|
160
|
+
"default": "./dist/separator.mjs"
|
|
161
|
+
},
|
|
162
|
+
"./sheet": {
|
|
163
|
+
"types": "./dist/sheet.d.ts",
|
|
164
|
+
"import": "./dist/sheet.mjs",
|
|
165
|
+
"default": "./dist/sheet.mjs"
|
|
166
|
+
},
|
|
167
|
+
"./skeleton": {
|
|
168
|
+
"types": "./dist/skeleton.d.ts",
|
|
169
|
+
"import": "./dist/skeleton.mjs",
|
|
170
|
+
"default": "./dist/skeleton.mjs"
|
|
171
|
+
},
|
|
172
|
+
"./slider": {
|
|
173
|
+
"types": "./dist/slider.d.ts",
|
|
174
|
+
"import": "./dist/slider.mjs",
|
|
175
|
+
"default": "./dist/slider.mjs"
|
|
176
|
+
},
|
|
177
|
+
"./sonner": {
|
|
178
|
+
"types": "./dist/sonner.d.ts",
|
|
179
|
+
"import": "./dist/sonner.mjs",
|
|
180
|
+
"default": "./dist/sonner.mjs"
|
|
181
|
+
},
|
|
182
|
+
"./switch": {
|
|
183
|
+
"types": "./dist/switch.d.ts",
|
|
184
|
+
"import": "./dist/switch.mjs",
|
|
185
|
+
"default": "./dist/switch.mjs"
|
|
186
|
+
},
|
|
187
|
+
"./table": {
|
|
188
|
+
"types": "./dist/table.d.ts",
|
|
189
|
+
"import": "./dist/table.mjs",
|
|
190
|
+
"default": "./dist/table.mjs"
|
|
191
|
+
},
|
|
192
|
+
"./tabs": {
|
|
193
|
+
"types": "./dist/tabs.d.ts",
|
|
194
|
+
"import": "./dist/tabs.mjs",
|
|
195
|
+
"default": "./dist/tabs.mjs"
|
|
196
|
+
},
|
|
197
|
+
"./textarea": {
|
|
198
|
+
"types": "./dist/textarea.d.ts",
|
|
199
|
+
"import": "./dist/textarea.mjs",
|
|
200
|
+
"default": "./dist/textarea.mjs"
|
|
201
|
+
},
|
|
202
|
+
"./toggle-group": {
|
|
203
|
+
"types": "./dist/toggle-group.d.ts",
|
|
204
|
+
"import": "./dist/toggle-group.mjs",
|
|
205
|
+
"default": "./dist/toggle-group.mjs"
|
|
206
|
+
},
|
|
207
|
+
"./toggle": {
|
|
208
|
+
"types": "./dist/toggle.d.ts",
|
|
209
|
+
"import": "./dist/toggle.mjs",
|
|
210
|
+
"default": "./dist/toggle.mjs"
|
|
211
|
+
},
|
|
212
|
+
"./tooltip": {
|
|
213
|
+
"types": "./dist/tooltip.d.ts",
|
|
214
|
+
"import": "./dist/tooltip.mjs",
|
|
215
|
+
"default": "./dist/tooltip.mjs"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"dependencies": {
|
|
219
|
+
"@hookform/resolvers": "^5.2.1",
|
|
220
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
221
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
222
|
+
"@radix-ui/react-aspect-ratio": "^1.1.7",
|
|
223
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
224
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
225
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
226
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
227
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
228
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
229
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
230
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
231
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
232
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
233
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
234
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
235
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
236
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
237
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
238
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
239
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
240
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
241
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
242
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
243
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
244
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
245
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
246
|
+
"class-variance-authority": "^0.7.1",
|
|
247
|
+
"clsx": "^2.1.1",
|
|
248
|
+
"cmdk": "^1.1.1",
|
|
249
|
+
"date-fns": "^4.1.0",
|
|
250
|
+
"embla-carousel-react": "^8.6.0",
|
|
251
|
+
"lucide-react": "^0.539.0",
|
|
252
|
+
"next-themes": "^0.4.6",
|
|
253
|
+
"react-day-picker": "^9.8.1",
|
|
254
|
+
"react-hook-form": "^7.62.0",
|
|
255
|
+
"react-resizable-panels": "^3.0.4",
|
|
256
|
+
"sonner": "^2.0.7",
|
|
257
|
+
"tailwind-merge": "^3.3.1",
|
|
258
|
+
"tailwindcss-animate": "^1.0.7",
|
|
259
|
+
"zod": "^4.0.17"
|
|
260
|
+
},
|
|
261
|
+
"devDependencies": {
|
|
262
|
+
"@tailwindcss/postcss": "^4.1.12",
|
|
263
|
+
"@tailwindcss/vite": "^4.1.12",
|
|
264
|
+
"@types/node": "^20.19.11",
|
|
265
|
+
"autoprefixer": "^10.4.21",
|
|
266
|
+
"postcss": "^8.5.6",
|
|
267
|
+
"shadcn-ui": "^0.9.5",
|
|
268
|
+
"tailwindcss": "^4.1.12",
|
|
269
|
+
"ts-node": "10.9.1",
|
|
270
|
+
"tw-animate-css": "^1.3.6",
|
|
271
|
+
"rollup-plugin-preserve-use-client": "^1.0.0"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion"
|
|
3
|
+
import { ChevronDownIcon } from "lucide-react"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
function Accordion({
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
10
|
+
return <AccordionPrimitive.Root data-slot="accordion" {...props} />
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function AccordionItem({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Item>) {
|
|
17
|
+
return (
|
|
18
|
+
<AccordionPrimitive.Item
|
|
19
|
+
data-slot="accordion-item"
|
|
20
|
+
className={cn("border-b last:border-b-0", className)}
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function AccordionTrigger({
|
|
27
|
+
className,
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
31
|
+
return (
|
|
32
|
+
<AccordionPrimitive.Header className="flex">
|
|
33
|
+
<AccordionPrimitive.Trigger
|
|
34
|
+
data-slot="accordion-trigger"
|
|
35
|
+
className={cn(
|
|
36
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 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:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
37
|
+
className
|
|
38
|
+
)}
|
|
39
|
+
{...props}
|
|
40
|
+
>
|
|
41
|
+
{children}
|
|
42
|
+
<ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
|
|
43
|
+
</AccordionPrimitive.Trigger>
|
|
44
|
+
</AccordionPrimitive.Header>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function AccordionContent({
|
|
49
|
+
className,
|
|
50
|
+
children,
|
|
51
|
+
...props
|
|
52
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
53
|
+
return (
|
|
54
|
+
<AccordionPrimitive.Content
|
|
55
|
+
data-slot="accordion-content"
|
|
56
|
+
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
|
|
57
|
+
{...props}
|
|
58
|
+
>
|
|
59
|
+
<div className={cn("pt-0 pb-4", className)}>{children}</div>
|
|
60
|
+
</AccordionPrimitive.Content>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
import { buttonVariants } from "@/components/ui/button"
|
|
6
|
+
|
|
7
|
+
function AlertDialog({
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
10
|
+
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function AlertDialogTrigger({
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
16
|
+
return (
|
|
17
|
+
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function AlertDialogPortal({
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
24
|
+
return (
|
|
25
|
+
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function AlertDialogOverlay({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
33
|
+
return (
|
|
34
|
+
<AlertDialogPrimitive.Overlay
|
|
35
|
+
data-slot="alert-dialog-overlay"
|
|
36
|
+
className={cn(
|
|
37
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
38
|
+
className
|
|
39
|
+
)}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function AlertDialogContent({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
|
|
49
|
+
return (
|
|
50
|
+
<AlertDialogPortal>
|
|
51
|
+
<AlertDialogOverlay />
|
|
52
|
+
<AlertDialogPrimitive.Content
|
|
53
|
+
data-slot="alert-dialog-content"
|
|
54
|
+
className={cn(
|
|
55
|
+
"bg-background 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 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 p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
56
|
+
className
|
|
57
|
+
)}
|
|
58
|
+
{...props}
|
|
59
|
+
/>
|
|
60
|
+
</AlertDialogPortal>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function AlertDialogHeader({
|
|
65
|
+
className,
|
|
66
|
+
...props
|
|
67
|
+
}: React.ComponentProps<"div">) {
|
|
68
|
+
return (
|
|
69
|
+
<div
|
|
70
|
+
data-slot="alert-dialog-header"
|
|
71
|
+
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function AlertDialogFooter({
|
|
78
|
+
className,
|
|
79
|
+
...props
|
|
80
|
+
}: React.ComponentProps<"div">) {
|
|
81
|
+
return (
|
|
82
|
+
<div
|
|
83
|
+
data-slot="alert-dialog-footer"
|
|
84
|
+
className={cn(
|
|
85
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
86
|
+
className
|
|
87
|
+
)}
|
|
88
|
+
{...props}
|
|
89
|
+
/>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function AlertDialogTitle({
|
|
94
|
+
className,
|
|
95
|
+
...props
|
|
96
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
97
|
+
return (
|
|
98
|
+
<AlertDialogPrimitive.Title
|
|
99
|
+
data-slot="alert-dialog-title"
|
|
100
|
+
className={cn("text-lg font-semibold", className)}
|
|
101
|
+
{...props}
|
|
102
|
+
/>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function AlertDialogDescription({
|
|
107
|
+
className,
|
|
108
|
+
...props
|
|
109
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
110
|
+
return (
|
|
111
|
+
<AlertDialogPrimitive.Description
|
|
112
|
+
data-slot="alert-dialog-description"
|
|
113
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
114
|
+
{...props}
|
|
115
|
+
/>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function AlertDialogAction({
|
|
120
|
+
className,
|
|
121
|
+
...props
|
|
122
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
|
|
123
|
+
return (
|
|
124
|
+
<AlertDialogPrimitive.Action
|
|
125
|
+
className={cn(buttonVariants(), className)}
|
|
126
|
+
{...props}
|
|
127
|
+
/>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function AlertDialogCancel({
|
|
132
|
+
className,
|
|
133
|
+
...props
|
|
134
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
|
|
135
|
+
return (
|
|
136
|
+
<AlertDialogPrimitive.Cancel
|
|
137
|
+
className={cn(buttonVariants({ variant: "outline" }), className)}
|
|
138
|
+
{...props}
|
|
139
|
+
/>
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export {
|
|
144
|
+
AlertDialog,
|
|
145
|
+
AlertDialogPortal,
|
|
146
|
+
AlertDialogOverlay,
|
|
147
|
+
AlertDialogTrigger,
|
|
148
|
+
AlertDialogContent,
|
|
149
|
+
AlertDialogHeader,
|
|
150
|
+
AlertDialogFooter,
|
|
151
|
+
AlertDialogTitle,
|
|
152
|
+
AlertDialogDescription,
|
|
153
|
+
AlertDialogAction,
|
|
154
|
+
AlertDialogCancel,
|
|
155
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
const alertVariants = cva(
|
|
7
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-card text-card-foreground",
|
|
12
|
+
destructive:
|
|
13
|
+
"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "default",
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
|
|
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
|
+
}
|
|
36
|
+
|
|
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
|
+
}
|
|
49
|
+
|
|
50
|
+
function AlertDescription({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}: React.ComponentProps<"div">) {
|
|
54
|
+
return (
|
|
55
|
+
<div
|
|
56
|
+
data-slot="alert-description"
|
|
57
|
+
className={cn(
|
|
58
|
+
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
59
|
+
className
|
|
60
|
+
)}
|
|
61
|
+
{...props}
|
|
62
|
+
/>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { Alert, AlertTitle, AlertDescription }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
|
|
2
|
+
|
|
3
|
+
function AspectRatio({
|
|
4
|
+
...props
|
|
5
|
+
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
|
|
6
|
+
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { AspectRatio }
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
function Avatar({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
|
|
10
|
+
return (
|
|
11
|
+
<AvatarPrimitive.Root
|
|
12
|
+
data-slot="avatar"
|
|
13
|
+
className={cn(
|
|
14
|
+
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function AvatarImage({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
26
|
+
return (
|
|
27
|
+
<AvatarPrimitive.Image
|
|
28
|
+
data-slot="avatar-image"
|
|
29
|
+
className={cn("aspect-square size-full", className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function AvatarFallback({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
39
|
+
return (
|
|
40
|
+
<AvatarPrimitive.Fallback
|
|
41
|
+
data-slot="avatar-fallback"
|
|
42
|
+
className={cn(
|
|
43
|
+
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
44
|
+
className
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { Avatar, AvatarImage, AvatarFallback }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
const badgeVariants = cva(
|
|
8
|
+
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default:
|
|
13
|
+
"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
14
|
+
secondary:
|
|
15
|
+
"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
16
|
+
destructive:
|
|
17
|
+
"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
18
|
+
outline:
|
|
19
|
+
"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
function Badge({
|
|
29
|
+
className,
|
|
30
|
+
variant,
|
|
31
|
+
asChild = false,
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<"span"> &
|
|
34
|
+
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
35
|
+
const Comp = asChild ? Slot : "span"
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Comp
|
|
39
|
+
data-slot="badge"
|
|
40
|
+
className={cn(badgeVariants({ variant }), className)}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { Badge, badgeVariants }
|