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,28 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as ProgressPrimitive from "@radix-ui/react-progress"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const Progress = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof ProgressPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
|
|
11
|
-
>(({ className, value, ...props }, ref) => (
|
|
12
|
-
<ProgressPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn(
|
|
15
|
-
"relative h-4 w-full overflow-hidden rounded-full bg-secondary",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
<ProgressPrimitive.Indicator
|
|
21
|
-
className="h-full w-full flex-1 bg-primary transition-all"
|
|
22
|
-
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
23
|
-
/>
|
|
24
|
-
</ProgressPrimitive.Root>
|
|
25
|
-
))
|
|
26
|
-
Progress.displayName = ProgressPrimitive.Root.displayName
|
|
27
|
-
|
|
28
|
-
export { Progress }
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"
|
|
5
|
-
import { Circle } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
const RadioGroup = React.forwardRef<
|
|
10
|
-
React.ElementRef<typeof RadioGroupPrimitive.Root>,
|
|
11
|
-
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
|
|
12
|
-
>(({ className, ...props }, ref) => {
|
|
13
|
-
return (
|
|
14
|
-
<RadioGroupPrimitive.Root
|
|
15
|
-
className={cn("grid gap-2", className)}
|
|
16
|
-
{...props}
|
|
17
|
-
ref={ref}
|
|
18
|
-
/>
|
|
19
|
-
)
|
|
20
|
-
})
|
|
21
|
-
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName
|
|
22
|
-
|
|
23
|
-
const RadioGroupItem = React.forwardRef<
|
|
24
|
-
React.ElementRef<typeof RadioGroupPrimitive.Item>,
|
|
25
|
-
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
|
|
26
|
-
>(({ className, children, ...props }, ref) => {
|
|
27
|
-
return (
|
|
28
|
-
<RadioGroupPrimitive.Item
|
|
29
|
-
ref={ref}
|
|
30
|
-
className={cn(
|
|
31
|
-
"h-4 w-4 rounded-full border border-input ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
|
|
37
|
-
<Circle className="h-2.5 w-2.5 fill-primary text-primary" />
|
|
38
|
-
</RadioGroupPrimitive.Indicator>
|
|
39
|
-
</RadioGroupPrimitive.Item>
|
|
40
|
-
)
|
|
41
|
-
})
|
|
42
|
-
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName
|
|
43
|
-
|
|
44
|
-
export { RadioGroup, RadioGroupItem }
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const ScrollArea = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
|
|
11
|
-
>(({ className, children, ...props }, ref) => (
|
|
12
|
-
<ScrollAreaPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn("relative overflow-hidden", className)}
|
|
15
|
-
{...props}
|
|
16
|
-
>
|
|
17
|
-
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
|
|
18
|
-
{children}
|
|
19
|
-
</ScrollAreaPrimitive.Viewport>
|
|
20
|
-
<ScrollBar />
|
|
21
|
-
<ScrollAreaPrimitive.Corner />
|
|
22
|
-
</ScrollAreaPrimitive.Root>
|
|
23
|
-
))
|
|
24
|
-
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
|
|
25
|
-
|
|
26
|
-
const ScrollBar = React.forwardRef<
|
|
27
|
-
React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
|
|
28
|
-
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
29
|
-
>(({ className, orientation = "vertical", ...props }, ref) => (
|
|
30
|
-
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
31
|
-
ref={ref}
|
|
32
|
-
orientation={orientation}
|
|
33
|
-
className={cn(
|
|
34
|
-
"flex touch-none select-none transition-colors",
|
|
35
|
-
orientation === "vertical" &&
|
|
36
|
-
"h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
37
|
-
orientation === "horizontal" &&
|
|
38
|
-
"h-2.5 border-t border-t-transparent p-[1px]",
|
|
39
|
-
className
|
|
40
|
-
)}
|
|
41
|
-
{...props}
|
|
42
|
-
>
|
|
43
|
-
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
|
|
44
|
-
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
45
|
-
))
|
|
46
|
-
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
|
|
47
|
-
|
|
48
|
-
export { ScrollArea, ScrollBar }
|
|
@@ -1,120 +0,0 @@
|
|
|
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 animate-in fade-in-80",
|
|
44
|
-
position === "popper" && "translate-y-1",
|
|
45
|
-
className
|
|
46
|
-
)}
|
|
47
|
-
position={position}
|
|
48
|
-
{...props}
|
|
49
|
-
>
|
|
50
|
-
<SelectPrimitive.Viewport
|
|
51
|
-
className={cn(
|
|
52
|
-
"p-1",
|
|
53
|
-
position === "popper" &&
|
|
54
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
55
|
-
)}
|
|
56
|
-
>
|
|
57
|
-
{children}
|
|
58
|
-
</SelectPrimitive.Viewport>
|
|
59
|
-
</SelectPrimitive.Content>
|
|
60
|
-
</SelectPrimitive.Portal>
|
|
61
|
-
))
|
|
62
|
-
SelectContent.displayName = SelectPrimitive.Content.displayName
|
|
63
|
-
|
|
64
|
-
const SelectLabel = React.forwardRef<
|
|
65
|
-
React.ElementRef<typeof SelectPrimitive.Label>,
|
|
66
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
67
|
-
>(({ className, ...props }, ref) => (
|
|
68
|
-
<SelectPrimitive.Label
|
|
69
|
-
ref={ref}
|
|
70
|
-
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
))
|
|
74
|
-
SelectLabel.displayName = SelectPrimitive.Label.displayName
|
|
75
|
-
|
|
76
|
-
const SelectItem = React.forwardRef<
|
|
77
|
-
React.ElementRef<typeof SelectPrimitive.Item>,
|
|
78
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
|
|
79
|
-
>(({ className, children, ...props }, ref) => (
|
|
80
|
-
<SelectPrimitive.Item
|
|
81
|
-
ref={ref}
|
|
82
|
-
className={cn(
|
|
83
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
84
|
-
className
|
|
85
|
-
)}
|
|
86
|
-
{...props}
|
|
87
|
-
>
|
|
88
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
89
|
-
<SelectPrimitive.ItemIndicator>
|
|
90
|
-
<Check className="h-4 w-4" />
|
|
91
|
-
</SelectPrimitive.ItemIndicator>
|
|
92
|
-
</span>
|
|
93
|
-
|
|
94
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
95
|
-
</SelectPrimitive.Item>
|
|
96
|
-
))
|
|
97
|
-
SelectItem.displayName = SelectPrimitive.Item.displayName
|
|
98
|
-
|
|
99
|
-
const SelectSeparator = React.forwardRef<
|
|
100
|
-
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
101
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
102
|
-
>(({ className, ...props }, ref) => (
|
|
103
|
-
<SelectPrimitive.Separator
|
|
104
|
-
ref={ref}
|
|
105
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
106
|
-
{...props}
|
|
107
|
-
/>
|
|
108
|
-
))
|
|
109
|
-
SelectSeparator.displayName = SelectPrimitive.Separator.displayName
|
|
110
|
-
|
|
111
|
-
export {
|
|
112
|
-
Select,
|
|
113
|
-
SelectGroup,
|
|
114
|
-
SelectValue,
|
|
115
|
-
SelectTrigger,
|
|
116
|
-
SelectContent,
|
|
117
|
-
SelectLabel,
|
|
118
|
-
SelectItem,
|
|
119
|
-
SelectSeparator,
|
|
120
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
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,230 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog"
|
|
5
|
-
import { VariantProps, cva } 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 portalVariants = cva("fixed inset-0 z-50 flex", {
|
|
15
|
-
variants: {
|
|
16
|
-
position: {
|
|
17
|
-
top: "items-start",
|
|
18
|
-
bottom: "items-end",
|
|
19
|
-
left: "justify-start",
|
|
20
|
-
right: "justify-end",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
defaultVariants: { position: "right" },
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
interface SheetPortalProps
|
|
27
|
-
extends SheetPrimitive.DialogPortalProps,
|
|
28
|
-
VariantProps<typeof portalVariants> {}
|
|
29
|
-
|
|
30
|
-
const SheetPortal = ({
|
|
31
|
-
position,
|
|
32
|
-
className,
|
|
33
|
-
children,
|
|
34
|
-
...props
|
|
35
|
-
}: SheetPortalProps) => (
|
|
36
|
-
<SheetPrimitive.Portal className={cn(className)} {...props}>
|
|
37
|
-
<div className={portalVariants({ position })}>{children}</div>
|
|
38
|
-
</SheetPrimitive.Portal>
|
|
39
|
-
)
|
|
40
|
-
SheetPortal.displayName = SheetPrimitive.Portal.displayName
|
|
41
|
-
|
|
42
|
-
const SheetOverlay = React.forwardRef<
|
|
43
|
-
React.ElementRef<typeof SheetPrimitive.Overlay>,
|
|
44
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
|
|
45
|
-
>(({ className, children, ...props }, ref) => (
|
|
46
|
-
<SheetPrimitive.Overlay
|
|
47
|
-
className={cn(
|
|
48
|
-
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",
|
|
49
|
-
className
|
|
50
|
-
)}
|
|
51
|
-
{...props}
|
|
52
|
-
ref={ref}
|
|
53
|
-
/>
|
|
54
|
-
))
|
|
55
|
-
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
|
|
56
|
-
|
|
57
|
-
const sheetVariants = cva(
|
|
58
|
-
"fixed z-50 scale-100 gap-4 bg-background p-6 opacity-100 shadow-lg border",
|
|
59
|
-
{
|
|
60
|
-
variants: {
|
|
61
|
-
position: {
|
|
62
|
-
top: "animate-in slide-in-from-top w-full duration-300",
|
|
63
|
-
bottom: "animate-in slide-in-from-bottom w-full duration-300",
|
|
64
|
-
left: "animate-in slide-in-from-left h-full duration-300",
|
|
65
|
-
right: "animate-in slide-in-from-right h-full duration-300",
|
|
66
|
-
},
|
|
67
|
-
size: {
|
|
68
|
-
content: "",
|
|
69
|
-
default: "",
|
|
70
|
-
sm: "",
|
|
71
|
-
lg: "",
|
|
72
|
-
xl: "",
|
|
73
|
-
full: "",
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
compoundVariants: [
|
|
77
|
-
{
|
|
78
|
-
position: ["top", "bottom"],
|
|
79
|
-
size: "content",
|
|
80
|
-
class: "max-h-screen",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
position: ["top", "bottom"],
|
|
84
|
-
size: "default",
|
|
85
|
-
class: "h-1/3",
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
position: ["top", "bottom"],
|
|
89
|
-
size: "sm",
|
|
90
|
-
class: "h-1/4",
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
position: ["top", "bottom"],
|
|
94
|
-
size: "lg",
|
|
95
|
-
class: "h-1/2",
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
position: ["top", "bottom"],
|
|
99
|
-
size: "xl",
|
|
100
|
-
class: "h-5/6",
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
position: ["top", "bottom"],
|
|
104
|
-
size: "full",
|
|
105
|
-
class: "h-screen",
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
position: ["right", "left"],
|
|
109
|
-
size: "content",
|
|
110
|
-
class: "max-w-screen",
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
position: ["right", "left"],
|
|
114
|
-
size: "default",
|
|
115
|
-
class: "w-1/3",
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
position: ["right", "left"],
|
|
119
|
-
size: "sm",
|
|
120
|
-
class: "w-1/4",
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
position: ["right", "left"],
|
|
124
|
-
size: "lg",
|
|
125
|
-
class: "w-1/2",
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
position: ["right", "left"],
|
|
129
|
-
size: "xl",
|
|
130
|
-
class: "w-5/6",
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
position: ["right", "left"],
|
|
134
|
-
size: "full",
|
|
135
|
-
class: "w-screen",
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
defaultVariants: {
|
|
139
|
-
position: "right",
|
|
140
|
-
size: "default",
|
|
141
|
-
},
|
|
142
|
-
}
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
export interface DialogContentProps
|
|
146
|
-
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
|
|
147
|
-
VariantProps<typeof sheetVariants> {}
|
|
148
|
-
|
|
149
|
-
const SheetContent = React.forwardRef<
|
|
150
|
-
React.ElementRef<typeof SheetPrimitive.Content>,
|
|
151
|
-
DialogContentProps
|
|
152
|
-
>(({ position, size, className, children, ...props }, ref) => (
|
|
153
|
-
<SheetPortal position={position}>
|
|
154
|
-
<SheetOverlay />
|
|
155
|
-
<SheetPrimitive.Content
|
|
156
|
-
ref={ref}
|
|
157
|
-
className={cn(sheetVariants({ position, size }), className)}
|
|
158
|
-
{...props}
|
|
159
|
-
>
|
|
160
|
-
{children}
|
|
161
|
-
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none">
|
|
162
|
-
<X className="h-4 w-4" />
|
|
163
|
-
<span className="sr-only">Close</span>
|
|
164
|
-
</SheetPrimitive.Close>
|
|
165
|
-
</SheetPrimitive.Content>
|
|
166
|
-
</SheetPortal>
|
|
167
|
-
))
|
|
168
|
-
SheetContent.displayName = SheetPrimitive.Content.displayName
|
|
169
|
-
|
|
170
|
-
const SheetHeader = ({
|
|
171
|
-
className,
|
|
172
|
-
...props
|
|
173
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
174
|
-
<div
|
|
175
|
-
className={cn(
|
|
176
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
177
|
-
className
|
|
178
|
-
)}
|
|
179
|
-
{...props}
|
|
180
|
-
/>
|
|
181
|
-
)
|
|
182
|
-
SheetHeader.displayName = "SheetHeader"
|
|
183
|
-
|
|
184
|
-
const SheetFooter = ({
|
|
185
|
-
className,
|
|
186
|
-
...props
|
|
187
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
188
|
-
<div
|
|
189
|
-
className={cn(
|
|
190
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
191
|
-
className
|
|
192
|
-
)}
|
|
193
|
-
{...props}
|
|
194
|
-
/>
|
|
195
|
-
)
|
|
196
|
-
SheetFooter.displayName = "SheetFooter"
|
|
197
|
-
|
|
198
|
-
const SheetTitle = React.forwardRef<
|
|
199
|
-
React.ElementRef<typeof SheetPrimitive.Title>,
|
|
200
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
|
|
201
|
-
>(({ className, ...props }, ref) => (
|
|
202
|
-
<SheetPrimitive.Title
|
|
203
|
-
ref={ref}
|
|
204
|
-
className={cn("text-lg font-semibold text-foreground", className)}
|
|
205
|
-
{...props}
|
|
206
|
-
/>
|
|
207
|
-
))
|
|
208
|
-
SheetTitle.displayName = SheetPrimitive.Title.displayName
|
|
209
|
-
|
|
210
|
-
const SheetDescription = React.forwardRef<
|
|
211
|
-
React.ElementRef<typeof SheetPrimitive.Description>,
|
|
212
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
|
|
213
|
-
>(({ className, ...props }, ref) => (
|
|
214
|
-
<SheetPrimitive.Description
|
|
215
|
-
ref={ref}
|
|
216
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
217
|
-
{...props}
|
|
218
|
-
/>
|
|
219
|
-
))
|
|
220
|
-
SheetDescription.displayName = SheetPrimitive.Description.displayName
|
|
221
|
-
|
|
222
|
-
export {
|
|
223
|
-
Sheet,
|
|
224
|
-
SheetTrigger,
|
|
225
|
-
SheetContent,
|
|
226
|
-
SheetHeader,
|
|
227
|
-
SheetFooter,
|
|
228
|
-
SheetTitle,
|
|
229
|
-
SheetDescription,
|
|
230
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
function Skeleton({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
9
|
-
return (
|
|
10
|
-
<div
|
|
11
|
-
className={cn("animate-pulse rounded-md bg-muted", className)}
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
14
|
-
)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { Skeleton }
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as SliderPrimitive from "@radix-ui/react-slider"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const Slider = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof SliderPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
|
|
11
|
-
>(({ className, ...props }, ref) => (
|
|
12
|
-
<SliderPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn(
|
|
15
|
-
"relative flex w-full touch-none select-none items-center",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
|
|
21
|
-
<SliderPrimitive.Range className="absolute h-full bg-primary" />
|
|
22
|
-
</SliderPrimitive.Track>
|
|
23
|
-
<SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
|
|
24
|
-
</SliderPrimitive.Root>
|
|
25
|
-
))
|
|
26
|
-
Slider.displayName = SliderPrimitive.Root.displayName
|
|
27
|
-
|
|
28
|
-
export { Slider }
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as SwitchPrimitives from "@radix-ui/react-switch"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const Switch = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof SwitchPrimitives.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
|
|
11
|
-
>(({ className, ...props }, ref) => (
|
|
12
|
-
<SwitchPrimitives.Root
|
|
13
|
-
className={cn(
|
|
14
|
-
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
-
className
|
|
16
|
-
)}
|
|
17
|
-
{...props}
|
|
18
|
-
ref={ref}
|
|
19
|
-
>
|
|
20
|
-
<SwitchPrimitives.Thumb
|
|
21
|
-
className={cn(
|
|
22
|
-
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
23
|
-
)}
|
|
24
|
-
/>
|
|
25
|
-
</SwitchPrimitives.Root>
|
|
26
|
-
))
|
|
27
|
-
Switch.displayName = SwitchPrimitives.Root.displayName
|
|
28
|
-
|
|
29
|
-
export { Switch }
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const Table = React.forwardRef<
|
|
6
|
-
HTMLTableElement,
|
|
7
|
-
React.HTMLAttributes<HTMLTableElement>
|
|
8
|
-
>(({ className, ...props }, ref) => (
|
|
9
|
-
<div className="w-full overflow-auto">
|
|
10
|
-
<table
|
|
11
|
-
ref={ref}
|
|
12
|
-
className={cn("w-full caption-bottom text-sm", className)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
</div>
|
|
16
|
-
))
|
|
17
|
-
Table.displayName = "Table"
|
|
18
|
-
|
|
19
|
-
const TableHeader = React.forwardRef<
|
|
20
|
-
HTMLTableSectionElement,
|
|
21
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
22
|
-
>(({ className, ...props }, ref) => (
|
|
23
|
-
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
|
|
24
|
-
))
|
|
25
|
-
TableHeader.displayName = "TableHeader"
|
|
26
|
-
|
|
27
|
-
const TableBody = React.forwardRef<
|
|
28
|
-
HTMLTableSectionElement,
|
|
29
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
30
|
-
>(({ className, ...props }, ref) => (
|
|
31
|
-
<tbody
|
|
32
|
-
ref={ref}
|
|
33
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
36
|
-
))
|
|
37
|
-
TableBody.displayName = "TableBody"
|
|
38
|
-
|
|
39
|
-
const TableFooter = React.forwardRef<
|
|
40
|
-
HTMLTableSectionElement,
|
|
41
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
42
|
-
>(({ className, ...props }, ref) => (
|
|
43
|
-
<tfoot
|
|
44
|
-
ref={ref}
|
|
45
|
-
className={cn("bg-primary font-medium text-primary-foreground", className)}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
48
|
-
))
|
|
49
|
-
TableFooter.displayName = "TableFooter"
|
|
50
|
-
|
|
51
|
-
const TableRow = React.forwardRef<
|
|
52
|
-
HTMLTableRowElement,
|
|
53
|
-
React.HTMLAttributes<HTMLTableRowElement>
|
|
54
|
-
>(({ className, ...props }, ref) => (
|
|
55
|
-
<tr
|
|
56
|
-
ref={ref}
|
|
57
|
-
className={cn(
|
|
58
|
-
"border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",
|
|
59
|
-
className
|
|
60
|
-
)}
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
))
|
|
64
|
-
TableRow.displayName = "TableRow"
|
|
65
|
-
|
|
66
|
-
const TableHead = React.forwardRef<
|
|
67
|
-
HTMLTableCellElement,
|
|
68
|
-
React.ThHTMLAttributes<HTMLTableCellElement>
|
|
69
|
-
>(({ className, ...props }, ref) => (
|
|
70
|
-
<th
|
|
71
|
-
ref={ref}
|
|
72
|
-
className={cn(
|
|
73
|
-
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
74
|
-
className
|
|
75
|
-
)}
|
|
76
|
-
{...props}
|
|
77
|
-
/>
|
|
78
|
-
))
|
|
79
|
-
TableHead.displayName = "TableHead"
|
|
80
|
-
|
|
81
|
-
const TableCell = React.forwardRef<
|
|
82
|
-
HTMLTableCellElement,
|
|
83
|
-
React.TdHTMLAttributes<HTMLTableCellElement>
|
|
84
|
-
>(({ className, ...props }, ref) => (
|
|
85
|
-
<td
|
|
86
|
-
ref={ref}
|
|
87
|
-
className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
|
|
88
|
-
{...props}
|
|
89
|
-
/>
|
|
90
|
-
))
|
|
91
|
-
TableCell.displayName = "TableCell"
|
|
92
|
-
|
|
93
|
-
const TableCaption = React.forwardRef<
|
|
94
|
-
HTMLTableCaptionElement,
|
|
95
|
-
React.HTMLAttributes<HTMLTableCaptionElement>
|
|
96
|
-
>(({ className, ...props }, ref) => (
|
|
97
|
-
<caption
|
|
98
|
-
ref={ref}
|
|
99
|
-
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
100
|
-
{...props}
|
|
101
|
-
/>
|
|
102
|
-
))
|
|
103
|
-
TableCaption.displayName = "TableCaption"
|
|
104
|
-
|
|
105
|
-
export {
|
|
106
|
-
Table,
|
|
107
|
-
TableHeader,
|
|
108
|
-
TableBody,
|
|
109
|
-
TableFooter,
|
|
110
|
-
TableHead,
|
|
111
|
-
TableRow,
|
|
112
|
-
TableCell,
|
|
113
|
-
TableCaption,
|
|
114
|
-
}
|