create-tauri-ui 0.2.1 → 0.3.1
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 +85 -84
- package/templates/sveltekit/pnpm-lock.yaml +1543 -2703
- package/templates/sveltekit/src/app.html +1 -1
- package/templates/sveltekit/src/routes/+layout.svelte +4 -3
- package/templates/sveltekit/src-tauri/Cargo.lock +3832 -3701
- package/templates/sveltekit/src-tauri/Cargo.toml +39 -36
- package/templates/sveltekit/src-tauri/src/main.rs +8 -2
- 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,200 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
|
|
5
|
-
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
const DropdownMenu = DropdownMenuPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
|
|
12
|
-
|
|
13
|
-
const DropdownMenuGroup = DropdownMenuPrimitive.Group
|
|
14
|
-
|
|
15
|
-
const DropdownMenuPortal = DropdownMenuPrimitive.Portal
|
|
16
|
-
|
|
17
|
-
const DropdownMenuSub = DropdownMenuPrimitive.Sub
|
|
18
|
-
|
|
19
|
-
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
|
|
20
|
-
|
|
21
|
-
const DropdownMenuSubTrigger = React.forwardRef<
|
|
22
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
23
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
24
|
-
inset?: boolean
|
|
25
|
-
}
|
|
26
|
-
>(({ className, inset, children, ...props }, ref) => (
|
|
27
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
28
|
-
ref={ref}
|
|
29
|
-
className={cn(
|
|
30
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",
|
|
31
|
-
inset && "pl-8",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
<ChevronRight className="ml-auto h-4 w-4" />
|
|
38
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
39
|
-
))
|
|
40
|
-
DropdownMenuSubTrigger.displayName =
|
|
41
|
-
DropdownMenuPrimitive.SubTrigger.displayName
|
|
42
|
-
|
|
43
|
-
const DropdownMenuSubContent = React.forwardRef<
|
|
44
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
45
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
46
|
-
>(({ className, ...props }, ref) => (
|
|
47
|
-
<DropdownMenuPrimitive.SubContent
|
|
48
|
-
ref={ref}
|
|
49
|
-
className={cn(
|
|
50
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
|
51
|
-
className
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
))
|
|
56
|
-
DropdownMenuSubContent.displayName =
|
|
57
|
-
DropdownMenuPrimitive.SubContent.displayName
|
|
58
|
-
|
|
59
|
-
const DropdownMenuContent = React.forwardRef<
|
|
60
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
61
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
62
|
-
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
63
|
-
<DropdownMenuPrimitive.Portal>
|
|
64
|
-
<DropdownMenuPrimitive.Content
|
|
65
|
-
ref={ref}
|
|
66
|
-
sideOffset={sideOffset}
|
|
67
|
-
className={cn(
|
|
68
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in 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",
|
|
69
|
-
className
|
|
70
|
-
)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
</DropdownMenuPrimitive.Portal>
|
|
74
|
-
))
|
|
75
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
|
|
76
|
-
|
|
77
|
-
const DropdownMenuItem = React.forwardRef<
|
|
78
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
79
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
80
|
-
inset?: boolean
|
|
81
|
-
}
|
|
82
|
-
>(({ className, inset, ...props }, ref) => (
|
|
83
|
-
<DropdownMenuPrimitive.Item
|
|
84
|
-
ref={ref}
|
|
85
|
-
className={cn(
|
|
86
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
87
|
-
inset && "pl-8",
|
|
88
|
-
className
|
|
89
|
-
)}
|
|
90
|
-
{...props}
|
|
91
|
-
/>
|
|
92
|
-
))
|
|
93
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
|
|
94
|
-
|
|
95
|
-
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
96
|
-
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
97
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
98
|
-
>(({ className, children, checked, ...props }, ref) => (
|
|
99
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
100
|
-
ref={ref}
|
|
101
|
-
className={cn(
|
|
102
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
103
|
-
className
|
|
104
|
-
)}
|
|
105
|
-
checked={checked}
|
|
106
|
-
{...props}
|
|
107
|
-
>
|
|
108
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
109
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
110
|
-
<Check className="h-4 w-4" />
|
|
111
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
112
|
-
</span>
|
|
113
|
-
{children}
|
|
114
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
115
|
-
))
|
|
116
|
-
DropdownMenuCheckboxItem.displayName =
|
|
117
|
-
DropdownMenuPrimitive.CheckboxItem.displayName
|
|
118
|
-
|
|
119
|
-
const DropdownMenuRadioItem = React.forwardRef<
|
|
120
|
-
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
121
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
122
|
-
>(({ className, children, ...props }, ref) => (
|
|
123
|
-
<DropdownMenuPrimitive.RadioItem
|
|
124
|
-
ref={ref}
|
|
125
|
-
className={cn(
|
|
126
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
127
|
-
className
|
|
128
|
-
)}
|
|
129
|
-
{...props}
|
|
130
|
-
>
|
|
131
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
132
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
133
|
-
<Circle className="h-2 w-2 fill-current" />
|
|
134
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
135
|
-
</span>
|
|
136
|
-
{children}
|
|
137
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
138
|
-
))
|
|
139
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
|
|
140
|
-
|
|
141
|
-
const DropdownMenuLabel = React.forwardRef<
|
|
142
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
143
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
144
|
-
inset?: boolean
|
|
145
|
-
}
|
|
146
|
-
>(({ className, inset, ...props }, ref) => (
|
|
147
|
-
<DropdownMenuPrimitive.Label
|
|
148
|
-
ref={ref}
|
|
149
|
-
className={cn(
|
|
150
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
151
|
-
inset && "pl-8",
|
|
152
|
-
className
|
|
153
|
-
)}
|
|
154
|
-
{...props}
|
|
155
|
-
/>
|
|
156
|
-
))
|
|
157
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
|
|
158
|
-
|
|
159
|
-
const DropdownMenuSeparator = React.forwardRef<
|
|
160
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
161
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
162
|
-
>(({ className, ...props }, ref) => (
|
|
163
|
-
<DropdownMenuPrimitive.Separator
|
|
164
|
-
ref={ref}
|
|
165
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
166
|
-
{...props}
|
|
167
|
-
/>
|
|
168
|
-
))
|
|
169
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
|
|
170
|
-
|
|
171
|
-
const DropdownMenuShortcut = ({
|
|
172
|
-
className,
|
|
173
|
-
...props
|
|
174
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
175
|
-
return (
|
|
176
|
-
<span
|
|
177
|
-
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
|
|
178
|
-
{...props}
|
|
179
|
-
/>
|
|
180
|
-
)
|
|
181
|
-
}
|
|
182
|
-
DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
|
|
183
|
-
|
|
184
|
-
export {
|
|
185
|
-
DropdownMenu,
|
|
186
|
-
DropdownMenuTrigger,
|
|
187
|
-
DropdownMenuContent,
|
|
188
|
-
DropdownMenuItem,
|
|
189
|
-
DropdownMenuCheckboxItem,
|
|
190
|
-
DropdownMenuRadioItem,
|
|
191
|
-
DropdownMenuLabel,
|
|
192
|
-
DropdownMenuSeparator,
|
|
193
|
-
DropdownMenuShortcut,
|
|
194
|
-
DropdownMenuGroup,
|
|
195
|
-
DropdownMenuPortal,
|
|
196
|
-
DropdownMenuSub,
|
|
197
|
-
DropdownMenuSubContent,
|
|
198
|
-
DropdownMenuSubTrigger,
|
|
199
|
-
DropdownMenuRadioGroup,
|
|
200
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const HoverCard = HoverCardPrimitive.Root
|
|
9
|
-
|
|
10
|
-
const HoverCardTrigger = HoverCardPrimitive.Trigger
|
|
11
|
-
|
|
12
|
-
const HoverCardContent = React.forwardRef<
|
|
13
|
-
React.ElementRef<typeof HoverCardPrimitive.Content>,
|
|
14
|
-
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
|
|
15
|
-
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
|
16
|
-
<HoverCardPrimitive.Content
|
|
17
|
-
ref={ref}
|
|
18
|
-
align={align}
|
|
19
|
-
sideOffset={sideOffset}
|
|
20
|
-
className={cn(
|
|
21
|
-
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in zoom-in-90",
|
|
22
|
-
className
|
|
23
|
-
)}
|
|
24
|
-
{...props}
|
|
25
|
-
/>
|
|
26
|
-
))
|
|
27
|
-
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName
|
|
28
|
-
|
|
29
|
-
export { HoverCard, HoverCardTrigger, HoverCardContent }
|
|
File without changes
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
export interface InputProps
|
|
8
|
-
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
9
|
-
|
|
10
|
-
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
11
|
-
({ className, type, ...props }, ref) => {
|
|
12
|
-
return (
|
|
13
|
-
<input
|
|
14
|
-
type={type}
|
|
15
|
-
className={cn(
|
|
16
|
-
"flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
ref={ref}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
)
|
|
25
|
-
Input.displayName = "Input"
|
|
26
|
-
|
|
27
|
-
export { Input }
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
5
|
-
import { VariantProps, cva } from "class-variance-authority"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
const labelVariants = cva(
|
|
10
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
const Label = React.forwardRef<
|
|
14
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
15
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
16
|
-
VariantProps<typeof labelVariants>
|
|
17
|
-
>(({ className, ...props }, ref) => (
|
|
18
|
-
<LabelPrimitive.Root
|
|
19
|
-
ref={ref}
|
|
20
|
-
className={cn(labelVariants(), className)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
))
|
|
24
|
-
Label.displayName = LabelPrimitive.Root.displayName
|
|
25
|
-
|
|
26
|
-
export { Label }
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as MenubarPrimitive from "@radix-ui/react-menubar"
|
|
5
|
-
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
const MenubarMenu = MenubarPrimitive.Menu
|
|
10
|
-
|
|
11
|
-
const MenubarGroup = MenubarPrimitive.Group
|
|
12
|
-
|
|
13
|
-
const MenubarPortal = MenubarPrimitive.Portal
|
|
14
|
-
|
|
15
|
-
const MenubarSub = MenubarPrimitive.Sub
|
|
16
|
-
|
|
17
|
-
const MenubarRadioGroup = MenubarPrimitive.RadioGroup
|
|
18
|
-
|
|
19
|
-
const Menubar = React.forwardRef<
|
|
20
|
-
React.ElementRef<typeof MenubarPrimitive.Root>,
|
|
21
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>
|
|
22
|
-
>(({ className, ...props }, ref) => (
|
|
23
|
-
<MenubarPrimitive.Root
|
|
24
|
-
ref={ref}
|
|
25
|
-
className={cn(
|
|
26
|
-
"flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
|
|
27
|
-
className
|
|
28
|
-
)}
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
))
|
|
32
|
-
Menubar.displayName = MenubarPrimitive.Root.displayName
|
|
33
|
-
|
|
34
|
-
const MenubarTrigger = React.forwardRef<
|
|
35
|
-
React.ElementRef<typeof MenubarPrimitive.Trigger>,
|
|
36
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>
|
|
37
|
-
>(({ className, ...props }, ref) => (
|
|
38
|
-
<MenubarPrimitive.Trigger
|
|
39
|
-
ref={ref}
|
|
40
|
-
className={cn(
|
|
41
|
-
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
42
|
-
className
|
|
43
|
-
)}
|
|
44
|
-
{...props}
|
|
45
|
-
/>
|
|
46
|
-
))
|
|
47
|
-
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName
|
|
48
|
-
|
|
49
|
-
const MenubarSubTrigger = React.forwardRef<
|
|
50
|
-
React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
|
|
51
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {
|
|
52
|
-
inset?: boolean
|
|
53
|
-
}
|
|
54
|
-
>(({ className, inset, children, ...props }, ref) => (
|
|
55
|
-
<MenubarPrimitive.SubTrigger
|
|
56
|
-
ref={ref}
|
|
57
|
-
className={cn(
|
|
58
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
59
|
-
inset && "pl-8",
|
|
60
|
-
className
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
>
|
|
64
|
-
{children}
|
|
65
|
-
<ChevronRight className="ml-auto h-4 w-4" />
|
|
66
|
-
</MenubarPrimitive.SubTrigger>
|
|
67
|
-
))
|
|
68
|
-
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName
|
|
69
|
-
|
|
70
|
-
const MenubarSubContent = React.forwardRef<
|
|
71
|
-
React.ElementRef<typeof MenubarPrimitive.SubContent>,
|
|
72
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>
|
|
73
|
-
>(({ className, ...props }, ref) => (
|
|
74
|
-
<MenubarPrimitive.SubContent
|
|
75
|
-
ref={ref}
|
|
76
|
-
className={cn(
|
|
77
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
|
78
|
-
className
|
|
79
|
-
)}
|
|
80
|
-
{...props}
|
|
81
|
-
/>
|
|
82
|
-
))
|
|
83
|
-
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName
|
|
84
|
-
|
|
85
|
-
const MenubarContent = React.forwardRef<
|
|
86
|
-
React.ElementRef<typeof MenubarPrimitive.Content>,
|
|
87
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
|
|
88
|
-
>(
|
|
89
|
-
(
|
|
90
|
-
{ className, align = "start", alignOffset = -4, sideOffset = 8, ...props },
|
|
91
|
-
ref
|
|
92
|
-
) => (
|
|
93
|
-
<MenubarPrimitive.Portal>
|
|
94
|
-
<MenubarPrimitive.Content
|
|
95
|
-
ref={ref}
|
|
96
|
-
align={align}
|
|
97
|
-
alignOffset={alignOffset}
|
|
98
|
-
sideOffset={sideOffset}
|
|
99
|
-
className={cn(
|
|
100
|
-
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in slide-in-from-top-1",
|
|
101
|
-
className
|
|
102
|
-
)}
|
|
103
|
-
{...props}
|
|
104
|
-
/>
|
|
105
|
-
</MenubarPrimitive.Portal>
|
|
106
|
-
)
|
|
107
|
-
)
|
|
108
|
-
MenubarContent.displayName = MenubarPrimitive.Content.displayName
|
|
109
|
-
|
|
110
|
-
const MenubarItem = React.forwardRef<
|
|
111
|
-
React.ElementRef<typeof MenubarPrimitive.Item>,
|
|
112
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {
|
|
113
|
-
inset?: boolean
|
|
114
|
-
}
|
|
115
|
-
>(({ className, inset, ...props }, ref) => (
|
|
116
|
-
<MenubarPrimitive.Item
|
|
117
|
-
ref={ref}
|
|
118
|
-
className={cn(
|
|
119
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
120
|
-
inset && "pl-8",
|
|
121
|
-
className
|
|
122
|
-
)}
|
|
123
|
-
{...props}
|
|
124
|
-
/>
|
|
125
|
-
))
|
|
126
|
-
MenubarItem.displayName = MenubarPrimitive.Item.displayName
|
|
127
|
-
|
|
128
|
-
const MenubarCheckboxItem = React.forwardRef<
|
|
129
|
-
React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
|
|
130
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>
|
|
131
|
-
>(({ className, children, checked, ...props }, ref) => (
|
|
132
|
-
<MenubarPrimitive.CheckboxItem
|
|
133
|
-
ref={ref}
|
|
134
|
-
className={cn(
|
|
135
|
-
"relative flex 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",
|
|
136
|
-
className
|
|
137
|
-
)}
|
|
138
|
-
checked={checked}
|
|
139
|
-
{...props}
|
|
140
|
-
>
|
|
141
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
142
|
-
<MenubarPrimitive.ItemIndicator>
|
|
143
|
-
<Check className="h-4 w-4" />
|
|
144
|
-
</MenubarPrimitive.ItemIndicator>
|
|
145
|
-
</span>
|
|
146
|
-
{children}
|
|
147
|
-
</MenubarPrimitive.CheckboxItem>
|
|
148
|
-
))
|
|
149
|
-
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName
|
|
150
|
-
|
|
151
|
-
const MenubarRadioItem = React.forwardRef<
|
|
152
|
-
React.ElementRef<typeof MenubarPrimitive.RadioItem>,
|
|
153
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>
|
|
154
|
-
>(({ className, children, ...props }, ref) => (
|
|
155
|
-
<MenubarPrimitive.RadioItem
|
|
156
|
-
ref={ref}
|
|
157
|
-
className={cn(
|
|
158
|
-
"relative flex 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",
|
|
159
|
-
className
|
|
160
|
-
)}
|
|
161
|
-
{...props}
|
|
162
|
-
>
|
|
163
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
164
|
-
<MenubarPrimitive.ItemIndicator>
|
|
165
|
-
<Circle className="h-2 w-2 fill-current" />
|
|
166
|
-
</MenubarPrimitive.ItemIndicator>
|
|
167
|
-
</span>
|
|
168
|
-
{children}
|
|
169
|
-
</MenubarPrimitive.RadioItem>
|
|
170
|
-
))
|
|
171
|
-
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName
|
|
172
|
-
|
|
173
|
-
const MenubarLabel = React.forwardRef<
|
|
174
|
-
React.ElementRef<typeof MenubarPrimitive.Label>,
|
|
175
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {
|
|
176
|
-
inset?: boolean
|
|
177
|
-
}
|
|
178
|
-
>(({ className, inset, ...props }, ref) => (
|
|
179
|
-
<MenubarPrimitive.Label
|
|
180
|
-
ref={ref}
|
|
181
|
-
className={cn(
|
|
182
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
183
|
-
inset && "pl-8",
|
|
184
|
-
className
|
|
185
|
-
)}
|
|
186
|
-
{...props}
|
|
187
|
-
/>
|
|
188
|
-
))
|
|
189
|
-
MenubarLabel.displayName = MenubarPrimitive.Label.displayName
|
|
190
|
-
|
|
191
|
-
const MenubarSeparator = React.forwardRef<
|
|
192
|
-
React.ElementRef<typeof MenubarPrimitive.Separator>,
|
|
193
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>
|
|
194
|
-
>(({ className, ...props }, ref) => (
|
|
195
|
-
<MenubarPrimitive.Separator
|
|
196
|
-
ref={ref}
|
|
197
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
198
|
-
{...props}
|
|
199
|
-
/>
|
|
200
|
-
))
|
|
201
|
-
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName
|
|
202
|
-
|
|
203
|
-
const MenubarShortcut = ({
|
|
204
|
-
className,
|
|
205
|
-
...props
|
|
206
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
207
|
-
return (
|
|
208
|
-
<span
|
|
209
|
-
className={cn(
|
|
210
|
-
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
211
|
-
className
|
|
212
|
-
)}
|
|
213
|
-
{...props}
|
|
214
|
-
/>
|
|
215
|
-
)
|
|
216
|
-
}
|
|
217
|
-
MenubarShortcut.displayname = "MenubarShortcut"
|
|
218
|
-
|
|
219
|
-
export {
|
|
220
|
-
Menubar,
|
|
221
|
-
MenubarMenu,
|
|
222
|
-
MenubarTrigger,
|
|
223
|
-
MenubarContent,
|
|
224
|
-
MenubarItem,
|
|
225
|
-
MenubarSeparator,
|
|
226
|
-
MenubarLabel,
|
|
227
|
-
MenubarCheckboxItem,
|
|
228
|
-
MenubarRadioGroup,
|
|
229
|
-
MenubarRadioItem,
|
|
230
|
-
MenubarPortal,
|
|
231
|
-
MenubarSubContent,
|
|
232
|
-
MenubarSubTrigger,
|
|
233
|
-
MenubarGroup,
|
|
234
|
-
MenubarSub,
|
|
235
|
-
MenubarShortcut,
|
|
236
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"
|
|
5
|
-
import { cva } from "class-variance-authority"
|
|
6
|
-
import { ChevronDown } from "lucide-react"
|
|
7
|
-
|
|
8
|
-
import { cn } from "@/lib/utils"
|
|
9
|
-
|
|
10
|
-
const NavigationMenu = React.forwardRef<
|
|
11
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Root>,
|
|
12
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
|
|
13
|
-
>(({ className, children, ...props }, ref) => (
|
|
14
|
-
<NavigationMenuPrimitive.Root
|
|
15
|
-
ref={ref}
|
|
16
|
-
className={cn(
|
|
17
|
-
"relative z-10 flex flex-1 items-center justify-center",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
>
|
|
22
|
-
{children}
|
|
23
|
-
<NavigationMenuViewport />
|
|
24
|
-
</NavigationMenuPrimitive.Root>
|
|
25
|
-
))
|
|
26
|
-
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName
|
|
27
|
-
|
|
28
|
-
const NavigationMenuList = React.forwardRef<
|
|
29
|
-
React.ElementRef<typeof NavigationMenuPrimitive.List>,
|
|
30
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
|
|
31
|
-
>(({ className, ...props }, ref) => (
|
|
32
|
-
<NavigationMenuPrimitive.List
|
|
33
|
-
ref={ref}
|
|
34
|
-
className={cn(
|
|
35
|
-
"group flex flex-1 list-none items-center justify-center space-x-1",
|
|
36
|
-
className
|
|
37
|
-
)}
|
|
38
|
-
{...props}
|
|
39
|
-
/>
|
|
40
|
-
))
|
|
41
|
-
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName
|
|
42
|
-
|
|
43
|
-
const NavigationMenuItem = NavigationMenuPrimitive.Item
|
|
44
|
-
|
|
45
|
-
const navigationMenuTriggerStyle = cva(
|
|
46
|
-
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:bg-accent focus:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 h-10 py-2 px-4 group w-max"
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
const NavigationMenuTrigger = React.forwardRef<
|
|
50
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
|
|
51
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
|
|
52
|
-
>(({ className, children, ...props }, ref) => (
|
|
53
|
-
<NavigationMenuPrimitive.Trigger
|
|
54
|
-
ref={ref}
|
|
55
|
-
className={cn(navigationMenuTriggerStyle(), "group", className)}
|
|
56
|
-
{...props}
|
|
57
|
-
>
|
|
58
|
-
{children}{" "}
|
|
59
|
-
<ChevronDown
|
|
60
|
-
className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
|
|
61
|
-
aria-hidden="true"
|
|
62
|
-
/>
|
|
63
|
-
</NavigationMenuPrimitive.Trigger>
|
|
64
|
-
))
|
|
65
|
-
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName
|
|
66
|
-
|
|
67
|
-
const NavigationMenuContent = React.forwardRef<
|
|
68
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Content>,
|
|
69
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
|
|
70
|
-
>(({ className, ...props }, ref) => (
|
|
71
|
-
<NavigationMenuPrimitive.Content
|
|
72
|
-
ref={ref}
|
|
73
|
-
className={cn(
|
|
74
|
-
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
|
|
75
|
-
className
|
|
76
|
-
)}
|
|
77
|
-
{...props}
|
|
78
|
-
/>
|
|
79
|
-
))
|
|
80
|
-
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName
|
|
81
|
-
|
|
82
|
-
const NavigationMenuLink = NavigationMenuPrimitive.Link
|
|
83
|
-
|
|
84
|
-
const NavigationMenuViewport = React.forwardRef<
|
|
85
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
|
|
86
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
|
|
87
|
-
>(({ className, ...props }, ref) => (
|
|
88
|
-
<div className={cn("absolute left-0 top-full flex justify-center")}>
|
|
89
|
-
<NavigationMenuPrimitive.Viewport
|
|
90
|
-
className={cn(
|
|
91
|
-
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
92
|
-
className
|
|
93
|
-
)}
|
|
94
|
-
ref={ref}
|
|
95
|
-
{...props}
|
|
96
|
-
/>
|
|
97
|
-
</div>
|
|
98
|
-
))
|
|
99
|
-
NavigationMenuViewport.displayName =
|
|
100
|
-
NavigationMenuPrimitive.Viewport.displayName
|
|
101
|
-
|
|
102
|
-
const NavigationMenuIndicator = React.forwardRef<
|
|
103
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
|
|
104
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
|
|
105
|
-
>(({ className, ...props }, ref) => (
|
|
106
|
-
<NavigationMenuPrimitive.Indicator
|
|
107
|
-
ref={ref}
|
|
108
|
-
className={cn(
|
|
109
|
-
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
110
|
-
className
|
|
111
|
-
)}
|
|
112
|
-
{...props}
|
|
113
|
-
>
|
|
114
|
-
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
|
|
115
|
-
</NavigationMenuPrimitive.Indicator>
|
|
116
|
-
))
|
|
117
|
-
NavigationMenuIndicator.displayName =
|
|
118
|
-
NavigationMenuPrimitive.Indicator.displayName
|
|
119
|
-
|
|
120
|
-
export {
|
|
121
|
-
navigationMenuTriggerStyle,
|
|
122
|
-
NavigationMenu,
|
|
123
|
-
NavigationMenuList,
|
|
124
|
-
NavigationMenuItem,
|
|
125
|
-
NavigationMenuContent,
|
|
126
|
-
NavigationMenuTrigger,
|
|
127
|
-
NavigationMenuLink,
|
|
128
|
-
NavigationMenuIndicator,
|
|
129
|
-
NavigationMenuViewport,
|
|
130
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const Popover = PopoverPrimitive.Root
|
|
9
|
-
|
|
10
|
-
const PopoverTrigger = PopoverPrimitive.Trigger
|
|
11
|
-
|
|
12
|
-
const PopoverContent = React.forwardRef<
|
|
13
|
-
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
14
|
-
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
|
15
|
-
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
|
16
|
-
<PopoverPrimitive.Portal>
|
|
17
|
-
<PopoverPrimitive.Content
|
|
18
|
-
ref={ref}
|
|
19
|
-
align={align}
|
|
20
|
-
sideOffset={sideOffset}
|
|
21
|
-
className={cn(
|
|
22
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in 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",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
</PopoverPrimitive.Portal>
|
|
28
|
-
))
|
|
29
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName
|
|
30
|
-
|
|
31
|
-
export { Popover, PopoverTrigger, PopoverContent }
|