create-tauri-ui 0.2.0 → 0.3.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/README.md +22 -11
- package/dist/index.mjs +26 -26
- package/package.json +3 -2
- package/templates/.shared/app-icon.png +0 -0
- package/templates/.shared/src-tauri/Cargo.lock +270 -139
- package/templates/.shared/src-tauri/Cargo.toml +39 -36
- package/templates/.shared/src-tauri/src/main.rs +3 -0
- package/templates/.shared/src-tauri/tauri.conf.json +71 -79
- package/templates/next/components.json +15 -15
- package/templates/next/next.config.js +14 -14
- package/templates/next/package.json +18 -14
- package/templates/next/pnpm-lock.yaml +608 -566
- package/templates/next/src/app/examples/cards/components/date-picker.tsx +3 -1
- package/templates/next/src/app/examples/cards/components/github-card.tsx +2 -0
- package/templates/next/src/app/examples/cards/components/notifications.tsx +2 -0
- package/templates/next/src/app/examples/cards/components/payment-method.tsx +3 -1
- package/templates/next/src/app/examples/cards/components/team-members.tsx +3 -5
- package/templates/next/src/app/examples/forms/page.tsx +1 -1
- package/templates/next/src/app/layout.tsx +47 -47
- package/templates/next/src/assets/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/templates/next/src/components/about-dialog.tsx +111 -0
- package/templates/next/src/components/icons.tsx +156 -154
- package/templates/next/src/components/menu-mode-toggle.tsx +47 -46
- package/templates/next/src/components/menu.tsx +223 -259
- package/templates/next/src/components/page-header.tsx +2 -0
- package/templates/next/src/components/ui/accordion.tsx +60 -60
- package/templates/next/src/components/ui/alert-dialog.tsx +145 -145
- package/templates/next/src/components/ui/alert.tsx +59 -59
- package/templates/next/src/components/ui/aspect-ratio.tsx +7 -7
- package/templates/next/src/components/ui/avatar.tsx +50 -50
- package/templates/next/src/components/ui/badge.tsx +36 -36
- package/templates/next/src/components/ui/button.tsx +56 -56
- package/templates/next/src/components/ui/calendar.tsx +64 -64
- package/templates/next/src/components/ui/card.tsx +79 -79
- package/templates/next/src/components/ui/checkbox.tsx +30 -30
- package/templates/next/src/components/ui/collapsible.tsx +11 -11
- package/templates/next/src/components/ui/command.tsx +155 -155
- package/templates/next/src/components/ui/context-menu.tsx +200 -200
- package/templates/next/src/components/ui/dialog.tsx +123 -123
- package/templates/next/src/components/ui/dropdown-menu.tsx +200 -200
- package/templates/next/src/components/ui/form.tsx +176 -176
- package/templates/next/src/components/ui/hover-card.tsx +29 -29
- package/templates/next/src/components/ui/input.tsx +25 -25
- package/templates/next/src/components/ui/label.tsx +26 -26
- package/templates/next/src/components/ui/menubar.tsx +236 -236
- package/templates/next/src/components/ui/navigation-menu.tsx +128 -128
- package/templates/next/src/components/ui/popover.tsx +31 -31
- package/templates/next/src/components/ui/progress.tsx +28 -28
- package/templates/next/src/components/ui/radio-group.tsx +44 -44
- package/templates/next/src/components/ui/scroll-area.tsx +48 -48
- package/templates/next/src/components/ui/select.tsx +121 -121
- package/templates/next/src/components/ui/separator.tsx +31 -31
- package/templates/next/src/components/ui/sheet.tsx +144 -144
- package/templates/next/src/components/ui/skeleton.tsx +15 -15
- package/templates/next/src/components/ui/slider.tsx +28 -28
- package/templates/next/src/components/ui/switch.tsx +29 -29
- package/templates/next/src/components/ui/table.tsx +114 -114
- package/templates/next/src/components/ui/tabs.tsx +55 -55
- package/templates/next/src/components/ui/textarea.tsx +24 -24
- package/templates/next/src/components/ui/toast.tsx +127 -127
- package/templates/next/src/components/ui/toaster.tsx +35 -35
- package/templates/next/src/components/ui/toggle.tsx +45 -45
- package/templates/next/src/components/ui/tooltip.tsx +30 -30
- package/templates/next/src/components/ui/use-toast.ts +192 -192
- package/templates/next/src/lib/utils.ts +6 -6
- package/templates/next/src/styles/globals.css +88 -86
- package/templates/next/src-tauri/Cargo.lock +3832 -3701
- package/templates/next/src-tauri/Cargo.toml +4 -1
- package/templates/next/src-tauri/src/main.rs +22 -19
- package/templates/next/src-tauri/tauri.conf.json +71 -79
- package/templates/next/tailwind.config.js +77 -77
- package/templates/next/tsconfig.json +34 -34
- package/templates/sveltekit/.github/workflows/release.yml +108 -108
- package/templates/sveltekit/package.json +22 -22
- package/templates/sveltekit/pnpm-lock.yaml +1069 -691
- package/templates/sveltekit/src/app.html +1 -1
- package/templates/sveltekit/src-tauri/Cargo.lock +136 -136
- package/templates/sveltekit/src-tauri/tauri.conf.json +2 -10
- package/templates/sveltekit/static/favicon.ico +0 -0
- package/templates/sveltekit/vite.config.js +10 -6
- package/templates/vite/components.json +15 -15
- package/templates/vite/index.html +1 -1
- package/templates/vite/package.json +20 -13
- package/templates/vite/pnpm-lock.yaml +598 -530
- package/templates/vite/src/assets/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/templates/vite/src/components/about-dialog.tsx +101 -0
- package/templates/vite/src/components/icons.tsx +2 -2
- package/templates/vite/src/components/menu-mode-toggle.tsx +4 -3
- package/templates/vite/src/components/menu.tsx +177 -197
- package/templates/vite/src/components/ui/accordion.tsx +1 -3
- package/templates/vite/src/components/ui/alert-dialog.tsx +3 -10
- package/templates/vite/src/components/ui/alert.tsx +3 -5
- package/templates/vite/src/components/ui/aspect-ratio.tsx +0 -2
- package/templates/vite/src/components/ui/avatar.tsx +0 -2
- package/templates/vite/src/components/ui/badge.tsx +5 -5
- package/templates/vite/src/components/ui/button.tsx +15 -10
- package/templates/vite/src/components/ui/calendar.tsx +0 -2
- package/templates/vite/src/components/ui/card.tsx +1 -3
- package/templates/vite/src/components/ui/checkbox.tsx +2 -4
- package/templates/vite/src/components/ui/collapsible.tsx +0 -2
- package/templates/vite/src/components/ui/command.tsx +2 -4
- package/templates/vite/src/components/ui/context-menu.tsx +6 -8
- package/templates/vite/src/components/ui/dialog.tsx +4 -11
- package/templates/vite/src/components/ui/dropdown-menu.tsx +6 -8
- package/templates/vite/src/components/ui/form.tsx +176 -0
- package/templates/vite/src/components/ui/hover-card.tsx +1 -3
- package/templates/vite/src/components/ui/input.tsx +1 -3
- package/templates/vite/src/components/ui/label.tsx +1 -3
- package/templates/vite/src/components/ui/menubar.tsx +7 -9
- package/templates/vite/src/components/ui/navigation-menu.tsx +2 -4
- package/templates/vite/src/components/ui/popover.tsx +1 -3
- package/templates/vite/src/components/ui/progress.tsx +0 -2
- package/templates/vite/src/components/ui/radio-group.tsx +2 -4
- package/templates/vite/src/components/ui/scroll-area.tsx +0 -2
- package/templates/vite/src/components/ui/select.tsx +4 -5
- package/templates/vite/src/components/ui/separator.tsx +0 -2
- package/templates/vite/src/components/ui/sheet.tsx +22 -110
- package/templates/vite/src/components/ui/skeleton.tsx +0 -2
- package/templates/vite/src/components/ui/slider.tsx +0 -2
- package/templates/vite/src/components/ui/switch.tsx +1 -3
- package/templates/vite/src/components/ui/table.tsx +1 -1
- package/templates/vite/src/components/ui/tabs.tsx +1 -3
- package/templates/vite/src/components/ui/textarea.tsx +1 -3
- package/templates/vite/src/components/ui/toast.tsx +6 -8
- package/templates/vite/src/components/ui/toaster.tsx +0 -2
- package/templates/vite/src/components/ui/toggle.tsx +3 -5
- package/templates/vite/src/components/ui/tooltip.tsx +1 -3
- package/templates/vite/src/components/ui/use-toast.ts +5 -4
- package/templates/vite/src/styles/globals.css +5 -3
- package/templates/vite/src-tauri/Cargo.lock +270 -139
- package/templates/vite/src-tauri/Cargo.toml +4 -1
- package/templates/vite/src-tauri/src/main.rs +8 -2
- package/templates/vite/src-tauri/tauri.conf.json +71 -79
- package/templates/vite/vite.config.ts +2 -2
- package/templates/next/src/assets/Inter.var.woff2 +0 -0
- package/templates/vite/src/assets/Inter.var.woff2 +0 -0
- package/templates/viteuno/.github/workflows/release.yml +0 -108
- package/templates/viteuno/.vscode/extensions.json +0 -3
- package/templates/viteuno/README.md +0 -1
- package/templates/viteuno/app-icon.png +0 -0
- package/templates/viteuno/components.json +0 -16
- package/templates/viteuno/index.html +0 -16
- package/templates/viteuno/package.json +0 -73
- package/templates/viteuno/pnpm-lock.yaml +0 -5298
- package/templates/viteuno/preset.shadcn.ts +0 -160
- package/templates/viteuno/prettier.config.cjs +0 -34
- package/templates/viteuno/public/avatars/01.png +0 -0
- package/templates/viteuno/public/avatars/02.png +0 -0
- package/templates/viteuno/public/avatars/03.png +0 -0
- package/templates/viteuno/public/avatars/04.png +0 -0
- package/templates/viteuno/public/avatars/05.png +0 -0
- package/templates/viteuno/src/App.tsx +0 -39
- package/templates/viteuno/src/assets/Inter.var.woff2 +0 -0
- package/templates/viteuno/src/components/icons.tsx +0 -154
- package/templates/viteuno/src/components/menu-mode-toggle.tsx +0 -46
- package/templates/viteuno/src/components/menu.tsx +0 -232
- package/templates/viteuno/src/components/tailwind-indicator.tsx +0 -18
- package/templates/viteuno/src/components/theme-provider.tsx +0 -9
- package/templates/viteuno/src/components/ui/accordion.tsx +0 -60
- package/templates/viteuno/src/components/ui/alert-dialog.tsx +0 -150
- package/templates/viteuno/src/components/ui/alert.tsx +0 -61
- package/templates/viteuno/src/components/ui/aspect-ratio.tsx +0 -7
- package/templates/viteuno/src/components/ui/avatar.tsx +0 -50
- package/templates/viteuno/src/components/ui/badge.tsx +0 -36
- package/templates/viteuno/src/components/ui/button.tsx +0 -51
- package/templates/viteuno/src/components/ui/calendar.tsx +0 -64
- package/templates/viteuno/src/components/ui/card.tsx +0 -81
- package/templates/viteuno/src/components/ui/checkbox.tsx +0 -30
- package/templates/viteuno/src/components/ui/collapsible.tsx +0 -11
- package/templates/viteuno/src/components/ui/command.tsx +0 -155
- package/templates/viteuno/src/components/ui/context-menu.tsx +0 -200
- package/templates/viteuno/src/components/ui/dialog.tsx +0 -128
- package/templates/viteuno/src/components/ui/dropdown-menu.tsx +0 -200
- package/templates/viteuno/src/components/ui/hover-card.tsx +0 -29
- package/templates/viteuno/src/components/ui/index.ts +0 -0
- package/templates/viteuno/src/components/ui/input.tsx +0 -27
- package/templates/viteuno/src/components/ui/label.tsx +0 -26
- package/templates/viteuno/src/components/ui/menubar.tsx +0 -236
- package/templates/viteuno/src/components/ui/navigation-menu.tsx +0 -130
- package/templates/viteuno/src/components/ui/popover.tsx +0 -31
- package/templates/viteuno/src/components/ui/progress.tsx +0 -28
- package/templates/viteuno/src/components/ui/radio-group.tsx +0 -44
- package/templates/viteuno/src/components/ui/scroll-area.tsx +0 -48
- package/templates/viteuno/src/components/ui/select.tsx +0 -120
- package/templates/viteuno/src/components/ui/separator.tsx +0 -31
- package/templates/viteuno/src/components/ui/sheet.tsx +0 -230
- package/templates/viteuno/src/components/ui/skeleton.tsx +0 -17
- package/templates/viteuno/src/components/ui/slider.tsx +0 -28
- package/templates/viteuno/src/components/ui/switch.tsx +0 -29
- package/templates/viteuno/src/components/ui/table.tsx +0 -114
- package/templates/viteuno/src/components/ui/tabs.tsx +0 -55
- package/templates/viteuno/src/components/ui/textarea.tsx +0 -26
- package/templates/viteuno/src/components/ui/toast.tsx +0 -129
- package/templates/viteuno/src/components/ui/toaster.tsx +0 -35
- package/templates/viteuno/src/components/ui/toggle.tsx +0 -45
- package/templates/viteuno/src/components/ui/tooltip.tsx +0 -30
- package/templates/viteuno/src/components/ui/use-toast.ts +0 -191
- package/templates/viteuno/src/dashboard/components/date-range-picker.tsx +0 -66
- package/templates/viteuno/src/dashboard/components/main-nav.tsx +0 -38
- package/templates/viteuno/src/dashboard/components/overview.tsx +0 -78
- package/templates/viteuno/src/dashboard/components/recent-sales.tsx +0 -67
- package/templates/viteuno/src/dashboard/components/search.tsx +0 -13
- package/templates/viteuno/src/dashboard/components/team-switcher.tsx +0 -205
- package/templates/viteuno/src/dashboard/components/user-nav.tsx +0 -67
- package/templates/viteuno/src/dashboard/page.tsx +0 -140
- package/templates/viteuno/src/lib/utils.ts +0 -19
- package/templates/viteuno/src/main.tsx +0 -14
- package/templates/viteuno/src/styles/globals.css +0 -4
- package/templates/viteuno/src/vite-env.d.ts +0 -1
- package/templates/viteuno/src-tauri/Cargo.lock +0 -3701
- package/templates/viteuno/src-tauri/Cargo.toml +0 -36
- package/templates/viteuno/src-tauri/build.rs +0 -3
- package/templates/viteuno/src-tauri/icons/128x128.png +0 -0
- package/templates/viteuno/src-tauri/icons/128x128@2x.png +0 -0
- package/templates/viteuno/src-tauri/icons/32x32.png +0 -0
- package/templates/viteuno/src-tauri/icons/Square107x107Logo.png +0 -0
- package/templates/viteuno/src-tauri/icons/Square142x142Logo.png +0 -0
- package/templates/viteuno/src-tauri/icons/Square150x150Logo.png +0 -0
- package/templates/viteuno/src-tauri/icons/Square284x284Logo.png +0 -0
- package/templates/viteuno/src-tauri/icons/Square30x30Logo.png +0 -0
- package/templates/viteuno/src-tauri/icons/Square310x310Logo.png +0 -0
- package/templates/viteuno/src-tauri/icons/Square44x44Logo.png +0 -0
- package/templates/viteuno/src-tauri/icons/Square71x71Logo.png +0 -0
- package/templates/viteuno/src-tauri/icons/Square89x89Logo.png +0 -0
- package/templates/viteuno/src-tauri/icons/StoreLogo.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/viteuno/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/templates/viteuno/src-tauri/icons/icon.icns +0 -0
- package/templates/viteuno/src-tauri/icons/icon.ico +0 -0
- package/templates/viteuno/src-tauri/icons/icon.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-20x20@1x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-20x20@2x-1.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-20x20@2x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-20x20@3x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-29x29@1x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-29x29@2x-1.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-29x29@2x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-29x29@3x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-40x40@1x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-40x40@2x-1.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-40x40@2x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-40x40@3x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-512@2x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-60x60@2x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-60x60@3x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-76x76@1x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-76x76@2x.png +0 -0
- package/templates/viteuno/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png +0 -0
- package/templates/viteuno/src-tauri/src/main.rs +0 -16
- package/templates/viteuno/src-tauri/tauri.conf.json +0 -79
- package/templates/viteuno/tsconfig.json +0 -26
- package/templates/viteuno/tsconfig.node.json +0 -9
- package/templates/viteuno/uno.config.ts +0 -111
- package/templates/viteuno/vite.config.ts +0 -33
- /package/templates/next/src/app/examples/forms/{profile-form.tsx → components/profile-form.tsx} +0 -0
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion"
|
|
5
|
-
import { ChevronDown } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
const Accordion = AccordionPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const AccordionItem = React.forwardRef<
|
|
12
|
-
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
13
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
14
|
-
>(({ className, ...props }, ref) => (
|
|
15
|
-
<AccordionPrimitive.Item
|
|
16
|
-
ref={ref}
|
|
17
|
-
className={cn("border-b", className)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
))
|
|
21
|
-
AccordionItem.displayName = "AccordionItem"
|
|
22
|
-
|
|
23
|
-
const AccordionTrigger = React.forwardRef<
|
|
24
|
-
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
25
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
26
|
-
>(({ className, children, ...props }, ref) => (
|
|
27
|
-
<AccordionPrimitive.Header className="flex">
|
|
28
|
-
<AccordionPrimitive.Trigger
|
|
29
|
-
ref={ref}
|
|
30
|
-
className={cn(
|
|
31
|
-
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
|
|
38
|
-
</AccordionPrimitive.Trigger>
|
|
39
|
-
</AccordionPrimitive.Header>
|
|
40
|
-
))
|
|
41
|
-
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
|
|
42
|
-
|
|
43
|
-
const AccordionContent = React.forwardRef<
|
|
44
|
-
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
45
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
46
|
-
>(({ className, children, ...props }, ref) => (
|
|
47
|
-
<AccordionPrimitive.Content
|
|
48
|
-
ref={ref}
|
|
49
|
-
className={cn(
|
|
50
|
-
"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
51
|
-
className
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
>
|
|
55
|
-
<div className="pb-4 pt-0">{children}</div>
|
|
56
|
-
</AccordionPrimitive.Content>
|
|
57
|
-
))
|
|
58
|
-
AccordionContent.displayName = AccordionPrimitive.Content.displayName
|
|
59
|
-
|
|
60
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion"
|
|
5
|
+
import { ChevronDown } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
8
|
+
|
|
9
|
+
const Accordion = AccordionPrimitive.Root
|
|
10
|
+
|
|
11
|
+
const AccordionItem = React.forwardRef<
|
|
12
|
+
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
13
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
14
|
+
>(({ className, ...props }, ref) => (
|
|
15
|
+
<AccordionPrimitive.Item
|
|
16
|
+
ref={ref}
|
|
17
|
+
className={cn("border-b", className)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
))
|
|
21
|
+
AccordionItem.displayName = "AccordionItem"
|
|
22
|
+
|
|
23
|
+
const AccordionTrigger = React.forwardRef<
|
|
24
|
+
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
25
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
26
|
+
>(({ className, children, ...props }, ref) => (
|
|
27
|
+
<AccordionPrimitive.Header className="flex">
|
|
28
|
+
<AccordionPrimitive.Trigger
|
|
29
|
+
ref={ref}
|
|
30
|
+
className={cn(
|
|
31
|
+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
32
|
+
className
|
|
33
|
+
)}
|
|
34
|
+
{...props}
|
|
35
|
+
>
|
|
36
|
+
{children}
|
|
37
|
+
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
|
|
38
|
+
</AccordionPrimitive.Trigger>
|
|
39
|
+
</AccordionPrimitive.Header>
|
|
40
|
+
))
|
|
41
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
|
|
42
|
+
|
|
43
|
+
const AccordionContent = React.forwardRef<
|
|
44
|
+
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
45
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
46
|
+
>(({ className, children, ...props }, ref) => (
|
|
47
|
+
<AccordionPrimitive.Content
|
|
48
|
+
ref={ref}
|
|
49
|
+
className={cn(
|
|
50
|
+
"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
51
|
+
className
|
|
52
|
+
)}
|
|
53
|
+
{...props}
|
|
54
|
+
>
|
|
55
|
+
<div className="pb-4 pt-0">{children}</div>
|
|
56
|
+
</AccordionPrimitive.Content>
|
|
57
|
+
))
|
|
58
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName
|
|
59
|
+
|
|
60
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
@@ -1,145 +1,145 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
import { buttonVariants } from "@/components/ui/button"
|
|
8
|
-
|
|
9
|
-
const AlertDialog = AlertDialogPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const AlertDialogTrigger = AlertDialogPrimitive.Trigger
|
|
12
|
-
|
|
13
|
-
const AlertDialogPortal = ({
|
|
14
|
-
className,
|
|
15
|
-
...props
|
|
16
|
-
}: AlertDialogPrimitive.AlertDialogPortalProps) => (
|
|
17
|
-
<AlertDialogPrimitive.Portal className={cn(className)} {...props} />
|
|
18
|
-
)
|
|
19
|
-
AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName
|
|
20
|
-
|
|
21
|
-
const AlertDialogOverlay = React.forwardRef<
|
|
22
|
-
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
23
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
24
|
-
>(({ className, children, ...props }, ref) => (
|
|
25
|
-
<AlertDialogPrimitive.Overlay
|
|
26
|
-
className={cn(
|
|
27
|
-
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
28
|
-
className
|
|
29
|
-
)}
|
|
30
|
-
{...props}
|
|
31
|
-
ref={ref}
|
|
32
|
-
/>
|
|
33
|
-
))
|
|
34
|
-
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName
|
|
35
|
-
|
|
36
|
-
const AlertDialogContent = React.forwardRef<
|
|
37
|
-
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
38
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
|
|
39
|
-
>(({ className, ...props }, ref) => (
|
|
40
|
-
<AlertDialogPortal>
|
|
41
|
-
<AlertDialogOverlay />
|
|
42
|
-
<AlertDialogPrimitive.Content
|
|
43
|
-
ref={ref}
|
|
44
|
-
className={cn(
|
|
45
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
|
|
46
|
-
className
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
</AlertDialogPortal>
|
|
51
|
-
))
|
|
52
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
|
|
53
|
-
|
|
54
|
-
const AlertDialogHeader = ({
|
|
55
|
-
className,
|
|
56
|
-
...props
|
|
57
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
58
|
-
<div
|
|
59
|
-
className={cn(
|
|
60
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
61
|
-
className
|
|
62
|
-
)}
|
|
63
|
-
{...props}
|
|
64
|
-
/>
|
|
65
|
-
)
|
|
66
|
-
AlertDialogHeader.displayName = "AlertDialogHeader"
|
|
67
|
-
|
|
68
|
-
const AlertDialogFooter = ({
|
|
69
|
-
className,
|
|
70
|
-
...props
|
|
71
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
72
|
-
<div
|
|
73
|
-
className={cn(
|
|
74
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
75
|
-
className
|
|
76
|
-
)}
|
|
77
|
-
{...props}
|
|
78
|
-
/>
|
|
79
|
-
)
|
|
80
|
-
AlertDialogFooter.displayName = "AlertDialogFooter"
|
|
81
|
-
|
|
82
|
-
const AlertDialogTitle = React.forwardRef<
|
|
83
|
-
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
84
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
85
|
-
>(({ className, ...props }, ref) => (
|
|
86
|
-
<AlertDialogPrimitive.Title
|
|
87
|
-
ref={ref}
|
|
88
|
-
className={cn("text-lg font-semibold", className)}
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
))
|
|
92
|
-
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName
|
|
93
|
-
|
|
94
|
-
const AlertDialogDescription = React.forwardRef<
|
|
95
|
-
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
96
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
97
|
-
>(({ className, ...props }, ref) => (
|
|
98
|
-
<AlertDialogPrimitive.Description
|
|
99
|
-
ref={ref}
|
|
100
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
101
|
-
{...props}
|
|
102
|
-
/>
|
|
103
|
-
))
|
|
104
|
-
AlertDialogDescription.displayName =
|
|
105
|
-
AlertDialogPrimitive.Description.displayName
|
|
106
|
-
|
|
107
|
-
const AlertDialogAction = React.forwardRef<
|
|
108
|
-
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
109
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
|
110
|
-
>(({ className, ...props }, ref) => (
|
|
111
|
-
<AlertDialogPrimitive.Action
|
|
112
|
-
ref={ref}
|
|
113
|
-
className={cn(buttonVariants(), className)}
|
|
114
|
-
{...props}
|
|
115
|
-
/>
|
|
116
|
-
))
|
|
117
|
-
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName
|
|
118
|
-
|
|
119
|
-
const AlertDialogCancel = React.forwardRef<
|
|
120
|
-
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
121
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
|
122
|
-
>(({ className, ...props }, ref) => (
|
|
123
|
-
<AlertDialogPrimitive.Cancel
|
|
124
|
-
ref={ref}
|
|
125
|
-
className={cn(
|
|
126
|
-
buttonVariants({ variant: "outline" }),
|
|
127
|
-
"mt-2 sm:mt-0",
|
|
128
|
-
className
|
|
129
|
-
)}
|
|
130
|
-
{...props}
|
|
131
|
-
/>
|
|
132
|
-
))
|
|
133
|
-
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName
|
|
134
|
-
|
|
135
|
-
export {
|
|
136
|
-
AlertDialog,
|
|
137
|
-
AlertDialogTrigger,
|
|
138
|
-
AlertDialogContent,
|
|
139
|
-
AlertDialogHeader,
|
|
140
|
-
AlertDialogFooter,
|
|
141
|
-
AlertDialogTitle,
|
|
142
|
-
AlertDialogDescription,
|
|
143
|
-
AlertDialogAction,
|
|
144
|
-
AlertDialogCancel,
|
|
145
|
-
}
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
import { buttonVariants } from "@/components/ui/button"
|
|
8
|
+
|
|
9
|
+
const AlertDialog = AlertDialogPrimitive.Root
|
|
10
|
+
|
|
11
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger
|
|
12
|
+
|
|
13
|
+
const AlertDialogPortal = ({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: AlertDialogPrimitive.AlertDialogPortalProps) => (
|
|
17
|
+
<AlertDialogPrimitive.Portal className={cn(className)} {...props} />
|
|
18
|
+
)
|
|
19
|
+
AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName
|
|
20
|
+
|
|
21
|
+
const AlertDialogOverlay = React.forwardRef<
|
|
22
|
+
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
23
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
24
|
+
>(({ className, children, ...props }, ref) => (
|
|
25
|
+
<AlertDialogPrimitive.Overlay
|
|
26
|
+
className={cn(
|
|
27
|
+
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
30
|
+
{...props}
|
|
31
|
+
ref={ref}
|
|
32
|
+
/>
|
|
33
|
+
))
|
|
34
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName
|
|
35
|
+
|
|
36
|
+
const AlertDialogContent = React.forwardRef<
|
|
37
|
+
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
38
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
|
|
39
|
+
>(({ className, ...props }, ref) => (
|
|
40
|
+
<AlertDialogPortal>
|
|
41
|
+
<AlertDialogOverlay />
|
|
42
|
+
<AlertDialogPrimitive.Content
|
|
43
|
+
ref={ref}
|
|
44
|
+
className={cn(
|
|
45
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
|
|
46
|
+
className
|
|
47
|
+
)}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
</AlertDialogPortal>
|
|
51
|
+
))
|
|
52
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
|
|
53
|
+
|
|
54
|
+
const AlertDialogHeader = ({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
58
|
+
<div
|
|
59
|
+
className={cn(
|
|
60
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
61
|
+
className
|
|
62
|
+
)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
)
|
|
66
|
+
AlertDialogHeader.displayName = "AlertDialogHeader"
|
|
67
|
+
|
|
68
|
+
const AlertDialogFooter = ({
|
|
69
|
+
className,
|
|
70
|
+
...props
|
|
71
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
72
|
+
<div
|
|
73
|
+
className={cn(
|
|
74
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
75
|
+
className
|
|
76
|
+
)}
|
|
77
|
+
{...props}
|
|
78
|
+
/>
|
|
79
|
+
)
|
|
80
|
+
AlertDialogFooter.displayName = "AlertDialogFooter"
|
|
81
|
+
|
|
82
|
+
const AlertDialogTitle = React.forwardRef<
|
|
83
|
+
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
84
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
85
|
+
>(({ className, ...props }, ref) => (
|
|
86
|
+
<AlertDialogPrimitive.Title
|
|
87
|
+
ref={ref}
|
|
88
|
+
className={cn("text-lg font-semibold", className)}
|
|
89
|
+
{...props}
|
|
90
|
+
/>
|
|
91
|
+
))
|
|
92
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName
|
|
93
|
+
|
|
94
|
+
const AlertDialogDescription = React.forwardRef<
|
|
95
|
+
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
96
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
97
|
+
>(({ className, ...props }, ref) => (
|
|
98
|
+
<AlertDialogPrimitive.Description
|
|
99
|
+
ref={ref}
|
|
100
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
101
|
+
{...props}
|
|
102
|
+
/>
|
|
103
|
+
))
|
|
104
|
+
AlertDialogDescription.displayName =
|
|
105
|
+
AlertDialogPrimitive.Description.displayName
|
|
106
|
+
|
|
107
|
+
const AlertDialogAction = React.forwardRef<
|
|
108
|
+
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
109
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
|
110
|
+
>(({ className, ...props }, ref) => (
|
|
111
|
+
<AlertDialogPrimitive.Action
|
|
112
|
+
ref={ref}
|
|
113
|
+
className={cn(buttonVariants(), className)}
|
|
114
|
+
{...props}
|
|
115
|
+
/>
|
|
116
|
+
))
|
|
117
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName
|
|
118
|
+
|
|
119
|
+
const AlertDialogCancel = React.forwardRef<
|
|
120
|
+
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
121
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
|
122
|
+
>(({ className, ...props }, ref) => (
|
|
123
|
+
<AlertDialogPrimitive.Cancel
|
|
124
|
+
ref={ref}
|
|
125
|
+
className={cn(
|
|
126
|
+
buttonVariants({ variant: "outline" }),
|
|
127
|
+
"mt-2 sm:mt-0",
|
|
128
|
+
className
|
|
129
|
+
)}
|
|
130
|
+
{...props}
|
|
131
|
+
/>
|
|
132
|
+
))
|
|
133
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName
|
|
134
|
+
|
|
135
|
+
export {
|
|
136
|
+
AlertDialog,
|
|
137
|
+
AlertDialogTrigger,
|
|
138
|
+
AlertDialogContent,
|
|
139
|
+
AlertDialogHeader,
|
|
140
|
+
AlertDialogFooter,
|
|
141
|
+
AlertDialogTitle,
|
|
142
|
+
AlertDialogDescription,
|
|
143
|
+
AlertDialogAction,
|
|
144
|
+
AlertDialogCancel,
|
|
145
|
+
}
|
|
@@ -1,59 +1,59 @@
|
|
|
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 p-4 [
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "bg-background text-foreground",
|
|
12
|
-
destructive:
|
|
13
|
-
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
variant: "default",
|
|
18
|
-
},
|
|
19
|
-
}
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
const Alert = React.forwardRef<
|
|
23
|
-
HTMLDivElement,
|
|
24
|
-
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
25
|
-
>(({ className, variant, ...props }, ref) => (
|
|
26
|
-
<div
|
|
27
|
-
ref={ref}
|
|
28
|
-
role="alert"
|
|
29
|
-
className={cn(alertVariants({ variant }), className)}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
))
|
|
33
|
-
Alert.displayName = "Alert"
|
|
34
|
-
|
|
35
|
-
const AlertTitle = React.forwardRef<
|
|
36
|
-
HTMLParagraphElement,
|
|
37
|
-
React.HTMLAttributes<HTMLHeadingElement>
|
|
38
|
-
>(({ className, ...props }, ref) => (
|
|
39
|
-
<h5
|
|
40
|
-
ref={ref}
|
|
41
|
-
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
42
|
-
{...props}
|
|
43
|
-
/>
|
|
44
|
-
))
|
|
45
|
-
AlertTitle.displayName = "AlertTitle"
|
|
46
|
-
|
|
47
|
-
const AlertDescription = React.forwardRef<
|
|
48
|
-
HTMLParagraphElement,
|
|
49
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
50
|
-
>(({ className, ...props }, ref) => (
|
|
51
|
-
<div
|
|
52
|
-
ref={ref}
|
|
53
|
-
className={cn("text-sm [&_p]:leading-relaxed", className)}
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
))
|
|
57
|
-
AlertDescription.displayName = "AlertDescription"
|
|
58
|
-
|
|
59
|
-
export { Alert, AlertTitle, AlertDescription }
|
|
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 p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-background text-foreground",
|
|
12
|
+
destructive:
|
|
13
|
+
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "default",
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
const Alert = React.forwardRef<
|
|
23
|
+
HTMLDivElement,
|
|
24
|
+
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
25
|
+
>(({ className, variant, ...props }, ref) => (
|
|
26
|
+
<div
|
|
27
|
+
ref={ref}
|
|
28
|
+
role="alert"
|
|
29
|
+
className={cn(alertVariants({ variant }), className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
))
|
|
33
|
+
Alert.displayName = "Alert"
|
|
34
|
+
|
|
35
|
+
const AlertTitle = React.forwardRef<
|
|
36
|
+
HTMLParagraphElement,
|
|
37
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
38
|
+
>(({ className, ...props }, ref) => (
|
|
39
|
+
<h5
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
))
|
|
45
|
+
AlertTitle.displayName = "AlertTitle"
|
|
46
|
+
|
|
47
|
+
const AlertDescription = React.forwardRef<
|
|
48
|
+
HTMLParagraphElement,
|
|
49
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
50
|
+
>(({ className, ...props }, ref) => (
|
|
51
|
+
<div
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn("text-sm [&_p]:leading-relaxed", className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
))
|
|
57
|
+
AlertDescription.displayName = "AlertDescription"
|
|
58
|
+
|
|
59
|
+
export { Alert, AlertTitle, AlertDescription }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
|
|
4
|
-
|
|
5
|
-
const AspectRatio = AspectRatioPrimitive.Root
|
|
6
|
-
|
|
7
|
-
export { AspectRatio }
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
|
|
4
|
+
|
|
5
|
+
const AspectRatio = AspectRatioPrimitive.Root
|
|
6
|
+
|
|
7
|
+
export { AspectRatio }
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const Avatar = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof AvatarPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
11
|
-
>(({ className, ...props }, ref) => (
|
|
12
|
-
<AvatarPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn(
|
|
15
|
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
))
|
|
21
|
-
Avatar.displayName = AvatarPrimitive.Root.displayName
|
|
22
|
-
|
|
23
|
-
const AvatarImage = React.forwardRef<
|
|
24
|
-
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
25
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
26
|
-
>(({ className, ...props }, ref) => (
|
|
27
|
-
<AvatarPrimitive.Image
|
|
28
|
-
ref={ref}
|
|
29
|
-
className={cn("aspect-square h-full w-full", className)}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
))
|
|
33
|
-
AvatarImage.displayName = AvatarPrimitive.Image.displayName
|
|
34
|
-
|
|
35
|
-
const AvatarFallback = React.forwardRef<
|
|
36
|
-
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
37
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
38
|
-
>(({ className, ...props }, ref) => (
|
|
39
|
-
<AvatarPrimitive.Fallback
|
|
40
|
-
ref={ref}
|
|
41
|
-
className={cn(
|
|
42
|
-
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
))
|
|
48
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
|
|
49
|
-
|
|
50
|
-
export { Avatar, AvatarImage, AvatarFallback }
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const Avatar = React.forwardRef<
|
|
9
|
+
React.ElementRef<typeof AvatarPrimitive.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
11
|
+
>(({ className, ...props }, ref) => (
|
|
12
|
+
<AvatarPrimitive.Root
|
|
13
|
+
ref={ref}
|
|
14
|
+
className={cn(
|
|
15
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
))
|
|
21
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName
|
|
22
|
+
|
|
23
|
+
const AvatarImage = React.forwardRef<
|
|
24
|
+
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
25
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
26
|
+
>(({ className, ...props }, ref) => (
|
|
27
|
+
<AvatarPrimitive.Image
|
|
28
|
+
ref={ref}
|
|
29
|
+
className={cn("aspect-square h-full w-full", className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
))
|
|
33
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName
|
|
34
|
+
|
|
35
|
+
const AvatarFallback = React.forwardRef<
|
|
36
|
+
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
37
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
38
|
+
>(({ className, ...props }, ref) => (
|
|
39
|
+
<AvatarPrimitive.Fallback
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={cn(
|
|
42
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
43
|
+
className
|
|
44
|
+
)}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
))
|
|
48
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
|
|
49
|
+
|
|
50
|
+
export { Avatar, AvatarImage, AvatarFallback }
|