create-tauri-ui 0.2.1 → 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 +19 -10
- package/dist/index.mjs +26 -26
- package/package.json +55 -54
- package/templates/.shared/app-icon.png +0 -0
- package/templates/.shared/src-tauri/Cargo.lock +3832 -3701
- package/templates/.shared/src-tauri/Cargo.toml +4 -1
- package/templates/.shared/src-tauri/src/main.rs +3 -0
- package/templates/.shared/src-tauri/tauri.conf.json +1 -9
- package/templates/next/components.json +1 -1
- package/templates/next/package.json +87 -83
- 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/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 +178 -214
- 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/styles/globals.css +5 -3
- package/templates/next/src-tauri/Cargo.lock +270 -139
- package/templates/next/src-tauri/Cargo.toml +39 -36
- package/templates/next/src-tauri/src/main.rs +22 -19
- package/templates/next/src-tauri/tauri.conf.json +1 -9
- package/templates/sveltekit/.github/workflows/release.yml +108 -108
- package/templates/sveltekit/package.json +84 -84
- package/templates/sveltekit/pnpm-lock.yaml +1069 -691
- package/templates/sveltekit/src/app.html +1 -1
- package/templates/sveltekit/src-tauri/Cargo.lock +3701 -3701
- package/templates/sveltekit/src-tauri/Cargo.toml +36 -36
- package/templates/sveltekit/src-tauri/tauri.conf.json +71 -79
- package/templates/sveltekit/static/favicon.ico +0 -0
- package/templates/sveltekit/vite.config.js +10 -6
- package/templates/vite/index.html +1 -1
- package/templates/vite/package.json +83 -76
- package/templates/vite/pnpm-lock.yaml +5178 -5110
- 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 +3832 -3701
- package/templates/vite/src-tauri/Cargo.toml +39 -36
- package/templates/vite/src-tauri/src/main.rs +8 -2
- package/templates/vite/src-tauri/tauri.conf.json +1 -9
- 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,121 +1,121 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as SelectPrimitive from "@radix-ui/react-select"
|
|
5
|
-
import { Check, ChevronDown } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
const Select = SelectPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const SelectGroup = SelectPrimitive.Group
|
|
12
|
-
|
|
13
|
-
const SelectValue = SelectPrimitive.Value
|
|
14
|
-
|
|
15
|
-
const SelectTrigger = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
|
17
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
|
18
|
-
>(({ className, children, ...props }, ref) => (
|
|
19
|
-
<SelectPrimitive.Trigger
|
|
20
|
-
ref={ref}
|
|
21
|
-
className={cn(
|
|
22
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
>
|
|
27
|
-
{children}
|
|
28
|
-
<SelectPrimitive.Icon asChild>
|
|
29
|
-
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
30
|
-
</SelectPrimitive.Icon>
|
|
31
|
-
</SelectPrimitive.Trigger>
|
|
32
|
-
))
|
|
33
|
-
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
|
34
|
-
|
|
35
|
-
const SelectContent = React.forwardRef<
|
|
36
|
-
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
37
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
|
38
|
-
>(({ className, children, position = "popper", ...props }, ref) => (
|
|
39
|
-
<SelectPrimitive.Portal>
|
|
40
|
-
<SelectPrimitive.Content
|
|
41
|
-
ref={ref}
|
|
42
|
-
className={cn(
|
|
43
|
-
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
44
|
-
position === "popper" &&
|
|
45
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
46
|
-
className
|
|
47
|
-
)}
|
|
48
|
-
position={position}
|
|
49
|
-
{...props}
|
|
50
|
-
>
|
|
51
|
-
<SelectPrimitive.Viewport
|
|
52
|
-
className={cn(
|
|
53
|
-
"p-1",
|
|
54
|
-
position === "popper" &&
|
|
55
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
56
|
-
)}
|
|
57
|
-
>
|
|
58
|
-
{children}
|
|
59
|
-
</SelectPrimitive.Viewport>
|
|
60
|
-
</SelectPrimitive.Content>
|
|
61
|
-
</SelectPrimitive.Portal>
|
|
62
|
-
))
|
|
63
|
-
SelectContent.displayName = SelectPrimitive.Content.displayName
|
|
64
|
-
|
|
65
|
-
const SelectLabel = React.forwardRef<
|
|
66
|
-
React.ElementRef<typeof SelectPrimitive.Label>,
|
|
67
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
68
|
-
>(({ className, ...props }, ref) => (
|
|
69
|
-
<SelectPrimitive.Label
|
|
70
|
-
ref={ref}
|
|
71
|
-
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
))
|
|
75
|
-
SelectLabel.displayName = SelectPrimitive.Label.displayName
|
|
76
|
-
|
|
77
|
-
const SelectItem = React.forwardRef<
|
|
78
|
-
React.ElementRef<typeof SelectPrimitive.Item>,
|
|
79
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
|
|
80
|
-
>(({ className, children, ...props }, ref) => (
|
|
81
|
-
<SelectPrimitive.Item
|
|
82
|
-
ref={ref}
|
|
83
|
-
className={cn(
|
|
84
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
85
|
-
className
|
|
86
|
-
)}
|
|
87
|
-
{...props}
|
|
88
|
-
>
|
|
89
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
90
|
-
<SelectPrimitive.ItemIndicator>
|
|
91
|
-
<Check className="h-4 w-4" />
|
|
92
|
-
</SelectPrimitive.ItemIndicator>
|
|
93
|
-
</span>
|
|
94
|
-
|
|
95
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
96
|
-
</SelectPrimitive.Item>
|
|
97
|
-
))
|
|
98
|
-
SelectItem.displayName = SelectPrimitive.Item.displayName
|
|
99
|
-
|
|
100
|
-
const SelectSeparator = React.forwardRef<
|
|
101
|
-
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
102
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
103
|
-
>(({ className, ...props }, ref) => (
|
|
104
|
-
<SelectPrimitive.Separator
|
|
105
|
-
ref={ref}
|
|
106
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
107
|
-
{...props}
|
|
108
|
-
/>
|
|
109
|
-
))
|
|
110
|
-
SelectSeparator.displayName = SelectPrimitive.Separator.displayName
|
|
111
|
-
|
|
112
|
-
export {
|
|
113
|
-
Select,
|
|
114
|
-
SelectGroup,
|
|
115
|
-
SelectValue,
|
|
116
|
-
SelectTrigger,
|
|
117
|
-
SelectContent,
|
|
118
|
-
SelectLabel,
|
|
119
|
-
SelectItem,
|
|
120
|
-
SelectSeparator,
|
|
121
|
-
}
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as SelectPrimitive from "@radix-ui/react-select"
|
|
5
|
+
import { Check, ChevronDown } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
8
|
+
|
|
9
|
+
const Select = SelectPrimitive.Root
|
|
10
|
+
|
|
11
|
+
const SelectGroup = SelectPrimitive.Group
|
|
12
|
+
|
|
13
|
+
const SelectValue = SelectPrimitive.Value
|
|
14
|
+
|
|
15
|
+
const SelectTrigger = React.forwardRef<
|
|
16
|
+
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
|
17
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
|
18
|
+
>(({ className, children, ...props }, ref) => (
|
|
19
|
+
<SelectPrimitive.Trigger
|
|
20
|
+
ref={ref}
|
|
21
|
+
className={cn(
|
|
22
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
>
|
|
27
|
+
{children}
|
|
28
|
+
<SelectPrimitive.Icon asChild>
|
|
29
|
+
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
30
|
+
</SelectPrimitive.Icon>
|
|
31
|
+
</SelectPrimitive.Trigger>
|
|
32
|
+
))
|
|
33
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
|
34
|
+
|
|
35
|
+
const SelectContent = React.forwardRef<
|
|
36
|
+
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
37
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
|
38
|
+
>(({ className, children, position = "popper", ...props }, ref) => (
|
|
39
|
+
<SelectPrimitive.Portal>
|
|
40
|
+
<SelectPrimitive.Content
|
|
41
|
+
ref={ref}
|
|
42
|
+
className={cn(
|
|
43
|
+
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
44
|
+
position === "popper" &&
|
|
45
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
46
|
+
className
|
|
47
|
+
)}
|
|
48
|
+
position={position}
|
|
49
|
+
{...props}
|
|
50
|
+
>
|
|
51
|
+
<SelectPrimitive.Viewport
|
|
52
|
+
className={cn(
|
|
53
|
+
"p-1",
|
|
54
|
+
position === "popper" &&
|
|
55
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
56
|
+
)}
|
|
57
|
+
>
|
|
58
|
+
{children}
|
|
59
|
+
</SelectPrimitive.Viewport>
|
|
60
|
+
</SelectPrimitive.Content>
|
|
61
|
+
</SelectPrimitive.Portal>
|
|
62
|
+
))
|
|
63
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName
|
|
64
|
+
|
|
65
|
+
const SelectLabel = React.forwardRef<
|
|
66
|
+
React.ElementRef<typeof SelectPrimitive.Label>,
|
|
67
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
68
|
+
>(({ className, ...props }, ref) => (
|
|
69
|
+
<SelectPrimitive.Label
|
|
70
|
+
ref={ref}
|
|
71
|
+
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
))
|
|
75
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName
|
|
76
|
+
|
|
77
|
+
const SelectItem = React.forwardRef<
|
|
78
|
+
React.ElementRef<typeof SelectPrimitive.Item>,
|
|
79
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
|
|
80
|
+
>(({ className, children, ...props }, ref) => (
|
|
81
|
+
<SelectPrimitive.Item
|
|
82
|
+
ref={ref}
|
|
83
|
+
className={cn(
|
|
84
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
85
|
+
className
|
|
86
|
+
)}
|
|
87
|
+
{...props}
|
|
88
|
+
>
|
|
89
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
90
|
+
<SelectPrimitive.ItemIndicator>
|
|
91
|
+
<Check className="h-4 w-4" />
|
|
92
|
+
</SelectPrimitive.ItemIndicator>
|
|
93
|
+
</span>
|
|
94
|
+
|
|
95
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
96
|
+
</SelectPrimitive.Item>
|
|
97
|
+
))
|
|
98
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName
|
|
99
|
+
|
|
100
|
+
const SelectSeparator = React.forwardRef<
|
|
101
|
+
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
102
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
103
|
+
>(({ className, ...props }, ref) => (
|
|
104
|
+
<SelectPrimitive.Separator
|
|
105
|
+
ref={ref}
|
|
106
|
+
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
107
|
+
{...props}
|
|
108
|
+
/>
|
|
109
|
+
))
|
|
110
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName
|
|
111
|
+
|
|
112
|
+
export {
|
|
113
|
+
Select,
|
|
114
|
+
SelectGroup,
|
|
115
|
+
SelectValue,
|
|
116
|
+
SelectTrigger,
|
|
117
|
+
SelectContent,
|
|
118
|
+
SelectLabel,
|
|
119
|
+
SelectItem,
|
|
120
|
+
SelectSeparator,
|
|
121
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const Separator = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
|
11
|
-
>(
|
|
12
|
-
(
|
|
13
|
-
{ className, orientation = "horizontal", decorative = true, ...props },
|
|
14
|
-
ref
|
|
15
|
-
) => (
|
|
16
|
-
<SeparatorPrimitive.Root
|
|
17
|
-
ref={ref}
|
|
18
|
-
decorative={decorative}
|
|
19
|
-
orientation={orientation}
|
|
20
|
-
className={cn(
|
|
21
|
-
"shrink-0 bg-border",
|
|
22
|
-
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
)
|
|
28
|
-
)
|
|
29
|
-
Separator.displayName = SeparatorPrimitive.Root.displayName
|
|
30
|
-
|
|
31
|
-
export { Separator }
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const Separator = React.forwardRef<
|
|
9
|
+
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
|
11
|
+
>(
|
|
12
|
+
(
|
|
13
|
+
{ className, orientation = "horizontal", decorative = true, ...props },
|
|
14
|
+
ref
|
|
15
|
+
) => (
|
|
16
|
+
<SeparatorPrimitive.Root
|
|
17
|
+
ref={ref}
|
|
18
|
+
decorative={decorative}
|
|
19
|
+
orientation={orientation}
|
|
20
|
+
className={cn(
|
|
21
|
+
"shrink-0 bg-border",
|
|
22
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
)
|
|
29
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName
|
|
30
|
+
|
|
31
|
+
export { Separator }
|
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog"
|
|
5
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
|
-
import { X } from "lucide-react"
|
|
7
|
-
|
|
8
|
-
import { cn } from "@/lib/utils"
|
|
9
|
-
|
|
10
|
-
const Sheet = SheetPrimitive.Root
|
|
11
|
-
|
|
12
|
-
const SheetTrigger = SheetPrimitive.Trigger
|
|
13
|
-
|
|
14
|
-
const SheetClose = SheetPrimitive.Close
|
|
15
|
-
|
|
16
|
-
const SheetPortal = ({
|
|
17
|
-
className,
|
|
18
|
-
...props
|
|
19
|
-
}: SheetPrimitive.DialogPortalProps) => (
|
|
20
|
-
<SheetPrimitive.Portal className={cn(className)} {...props} />
|
|
21
|
-
)
|
|
22
|
-
SheetPortal.displayName = SheetPrimitive.Portal.displayName
|
|
23
|
-
|
|
24
|
-
const SheetOverlay = React.forwardRef<
|
|
25
|
-
React.ElementRef<typeof SheetPrimitive.Overlay>,
|
|
26
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
|
|
27
|
-
>(({ className, ...props }, ref) => (
|
|
28
|
-
<SheetPrimitive.Overlay
|
|
29
|
-
className={cn(
|
|
30
|
-
"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",
|
|
31
|
-
className
|
|
32
|
-
)}
|
|
33
|
-
{...props}
|
|
34
|
-
ref={ref}
|
|
35
|
-
/>
|
|
36
|
-
))
|
|
37
|
-
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
|
|
38
|
-
|
|
39
|
-
const sheetVariants = cva(
|
|
40
|
-
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
41
|
-
{
|
|
42
|
-
variants: {
|
|
43
|
-
side: {
|
|
44
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
45
|
-
bottom:
|
|
46
|
-
"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
47
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
48
|
-
right:
|
|
49
|
-
"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
defaultVariants: {
|
|
53
|
-
side: "right",
|
|
54
|
-
},
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
interface SheetContentProps
|
|
59
|
-
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
|
|
60
|
-
VariantProps<typeof sheetVariants> {}
|
|
61
|
-
|
|
62
|
-
const SheetContent = React.forwardRef<
|
|
63
|
-
React.ElementRef<typeof SheetPrimitive.Content>,
|
|
64
|
-
SheetContentProps
|
|
65
|
-
>(({ side = "right", className, children, ...props }, ref) => (
|
|
66
|
-
<SheetPortal>
|
|
67
|
-
<SheetOverlay />
|
|
68
|
-
<SheetPrimitive.Content
|
|
69
|
-
ref={ref}
|
|
70
|
-
className={cn(sheetVariants({ side }), className)}
|
|
71
|
-
{...props}
|
|
72
|
-
>
|
|
73
|
-
{children}
|
|
74
|
-
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
|
|
75
|
-
<X className="h-4 w-4" />
|
|
76
|
-
<span className="sr-only">Close</span>
|
|
77
|
-
</SheetPrimitive.Close>
|
|
78
|
-
</SheetPrimitive.Content>
|
|
79
|
-
</SheetPortal>
|
|
80
|
-
))
|
|
81
|
-
SheetContent.displayName = SheetPrimitive.Content.displayName
|
|
82
|
-
|
|
83
|
-
const SheetHeader = ({
|
|
84
|
-
className,
|
|
85
|
-
...props
|
|
86
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
87
|
-
<div
|
|
88
|
-
className={cn(
|
|
89
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
90
|
-
className
|
|
91
|
-
)}
|
|
92
|
-
{...props}
|
|
93
|
-
/>
|
|
94
|
-
)
|
|
95
|
-
SheetHeader.displayName = "SheetHeader"
|
|
96
|
-
|
|
97
|
-
const SheetFooter = ({
|
|
98
|
-
className,
|
|
99
|
-
...props
|
|
100
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
101
|
-
<div
|
|
102
|
-
className={cn(
|
|
103
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
104
|
-
className
|
|
105
|
-
)}
|
|
106
|
-
{...props}
|
|
107
|
-
/>
|
|
108
|
-
)
|
|
109
|
-
SheetFooter.displayName = "SheetFooter"
|
|
110
|
-
|
|
111
|
-
const SheetTitle = React.forwardRef<
|
|
112
|
-
React.ElementRef<typeof SheetPrimitive.Title>,
|
|
113
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
|
|
114
|
-
>(({ className, ...props }, ref) => (
|
|
115
|
-
<SheetPrimitive.Title
|
|
116
|
-
ref={ref}
|
|
117
|
-
className={cn("text-lg font-semibold text-foreground", className)}
|
|
118
|
-
{...props}
|
|
119
|
-
/>
|
|
120
|
-
))
|
|
121
|
-
SheetTitle.displayName = SheetPrimitive.Title.displayName
|
|
122
|
-
|
|
123
|
-
const SheetDescription = React.forwardRef<
|
|
124
|
-
React.ElementRef<typeof SheetPrimitive.Description>,
|
|
125
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
|
|
126
|
-
>(({ className, ...props }, ref) => (
|
|
127
|
-
<SheetPrimitive.Description
|
|
128
|
-
ref={ref}
|
|
129
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
130
|
-
{...props}
|
|
131
|
-
/>
|
|
132
|
-
))
|
|
133
|
-
SheetDescription.displayName = SheetPrimitive.Description.displayName
|
|
134
|
-
|
|
135
|
-
export {
|
|
136
|
-
Sheet,
|
|
137
|
-
SheetTrigger,
|
|
138
|
-
SheetClose,
|
|
139
|
-
SheetContent,
|
|
140
|
-
SheetHeader,
|
|
141
|
-
SheetFooter,
|
|
142
|
-
SheetTitle,
|
|
143
|
-
SheetDescription,
|
|
144
|
-
}
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog"
|
|
5
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
|
+
import { X } from "lucide-react"
|
|
7
|
+
|
|
8
|
+
import { cn } from "@/lib/utils"
|
|
9
|
+
|
|
10
|
+
const Sheet = SheetPrimitive.Root
|
|
11
|
+
|
|
12
|
+
const SheetTrigger = SheetPrimitive.Trigger
|
|
13
|
+
|
|
14
|
+
const SheetClose = SheetPrimitive.Close
|
|
15
|
+
|
|
16
|
+
const SheetPortal = ({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: SheetPrimitive.DialogPortalProps) => (
|
|
20
|
+
<SheetPrimitive.Portal className={cn(className)} {...props} />
|
|
21
|
+
)
|
|
22
|
+
SheetPortal.displayName = SheetPrimitive.Portal.displayName
|
|
23
|
+
|
|
24
|
+
const SheetOverlay = React.forwardRef<
|
|
25
|
+
React.ElementRef<typeof SheetPrimitive.Overlay>,
|
|
26
|
+
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
|
|
27
|
+
>(({ className, ...props }, ref) => (
|
|
28
|
+
<SheetPrimitive.Overlay
|
|
29
|
+
className={cn(
|
|
30
|
+
"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",
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
ref={ref}
|
|
35
|
+
/>
|
|
36
|
+
))
|
|
37
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
|
|
38
|
+
|
|
39
|
+
const sheetVariants = cva(
|
|
40
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
41
|
+
{
|
|
42
|
+
variants: {
|
|
43
|
+
side: {
|
|
44
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
45
|
+
bottom:
|
|
46
|
+
"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
47
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
48
|
+
right:
|
|
49
|
+
"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
side: "right",
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
interface SheetContentProps
|
|
59
|
+
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
|
|
60
|
+
VariantProps<typeof sheetVariants> {}
|
|
61
|
+
|
|
62
|
+
const SheetContent = React.forwardRef<
|
|
63
|
+
React.ElementRef<typeof SheetPrimitive.Content>,
|
|
64
|
+
SheetContentProps
|
|
65
|
+
>(({ side = "right", className, children, ...props }, ref) => (
|
|
66
|
+
<SheetPortal>
|
|
67
|
+
<SheetOverlay />
|
|
68
|
+
<SheetPrimitive.Content
|
|
69
|
+
ref={ref}
|
|
70
|
+
className={cn(sheetVariants({ side }), className)}
|
|
71
|
+
{...props}
|
|
72
|
+
>
|
|
73
|
+
{children}
|
|
74
|
+
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
|
|
75
|
+
<X className="h-4 w-4" />
|
|
76
|
+
<span className="sr-only">Close</span>
|
|
77
|
+
</SheetPrimitive.Close>
|
|
78
|
+
</SheetPrimitive.Content>
|
|
79
|
+
</SheetPortal>
|
|
80
|
+
))
|
|
81
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName
|
|
82
|
+
|
|
83
|
+
const SheetHeader = ({
|
|
84
|
+
className,
|
|
85
|
+
...props
|
|
86
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
87
|
+
<div
|
|
88
|
+
className={cn(
|
|
89
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
90
|
+
className
|
|
91
|
+
)}
|
|
92
|
+
{...props}
|
|
93
|
+
/>
|
|
94
|
+
)
|
|
95
|
+
SheetHeader.displayName = "SheetHeader"
|
|
96
|
+
|
|
97
|
+
const SheetFooter = ({
|
|
98
|
+
className,
|
|
99
|
+
...props
|
|
100
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
101
|
+
<div
|
|
102
|
+
className={cn(
|
|
103
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
104
|
+
className
|
|
105
|
+
)}
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
108
|
+
)
|
|
109
|
+
SheetFooter.displayName = "SheetFooter"
|
|
110
|
+
|
|
111
|
+
const SheetTitle = React.forwardRef<
|
|
112
|
+
React.ElementRef<typeof SheetPrimitive.Title>,
|
|
113
|
+
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
|
|
114
|
+
>(({ className, ...props }, ref) => (
|
|
115
|
+
<SheetPrimitive.Title
|
|
116
|
+
ref={ref}
|
|
117
|
+
className={cn("text-lg font-semibold text-foreground", className)}
|
|
118
|
+
{...props}
|
|
119
|
+
/>
|
|
120
|
+
))
|
|
121
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName
|
|
122
|
+
|
|
123
|
+
const SheetDescription = React.forwardRef<
|
|
124
|
+
React.ElementRef<typeof SheetPrimitive.Description>,
|
|
125
|
+
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
|
|
126
|
+
>(({ className, ...props }, ref) => (
|
|
127
|
+
<SheetPrimitive.Description
|
|
128
|
+
ref={ref}
|
|
129
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
130
|
+
{...props}
|
|
131
|
+
/>
|
|
132
|
+
))
|
|
133
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName
|
|
134
|
+
|
|
135
|
+
export {
|
|
136
|
+
Sheet,
|
|
137
|
+
SheetTrigger,
|
|
138
|
+
SheetClose,
|
|
139
|
+
SheetContent,
|
|
140
|
+
SheetHeader,
|
|
141
|
+
SheetFooter,
|
|
142
|
+
SheetTitle,
|
|
143
|
+
SheetDescription,
|
|
144
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { cn } from "@/lib/utils"
|
|
2
|
-
|
|
3
|
-
function Skeleton({
|
|
4
|
-
className,
|
|
5
|
-
...props
|
|
6
|
-
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
className={cn("animate-pulse rounded-md bg-muted", className)}
|
|
10
|
-
{...props}
|
|
11
|
-
/>
|
|
12
|
-
)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { Skeleton }
|
|
1
|
+
import { cn } from "@/lib/utils"
|
|
2
|
+
|
|
3
|
+
function Skeleton({
|
|
4
|
+
className,
|
|
5
|
+
...props
|
|
6
|
+
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
7
|
+
return (
|
|
8
|
+
<div
|
|
9
|
+
className={cn("animate-pulse rounded-md bg-muted", className)}
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { Skeleton }
|