@lark-apaas/coding-templates 0.1.2 → 0.1.4
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/package.json +2 -3
- package/template-html/README.md +1 -1
- package/template-vite-react/_gitignore +24 -0
- package/template-vite-react/client/index.html +13 -0
- package/template-vite-react/client/public/favicon.svg +1 -0
- package/template-vite-react/client/public/icons.svg +24 -0
- package/template-vite-react/client/src/api/index.ts +7 -0
- package/template-vite-react/client/src/app.tsx +17 -0
- package/{template-nextjs-static → template-vite-react/client}/src/components/header.tsx +5 -13
- package/template-vite-react/client/src/components/layout.tsx +13 -0
- package/template-vite-react/client/src/components/theme-provider.tsx +45 -0
- package/template-vite-react/client/src/components/ui/accordion.tsx +72 -0
- package/template-vite-react/client/src/components/ui/alert-dialog.tsx +187 -0
- package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/alert.tsx +15 -10
- package/template-vite-react/client/src/components/ui/aspect-ratio.tsx +22 -0
- package/template-vite-react/client/src/components/ui/avatar.tsx +109 -0
- package/template-vite-react/client/src/components/ui/badge.tsx +52 -0
- package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/breadcrumb.tsx +39 -23
- package/template-vite-react/client/src/components/ui/button.tsx +58 -0
- package/{template-nextjs-static → template-vite-react/client}/src/components/ui/calendar.tsx +43 -37
- package/template-vite-react/client/src/components/ui/card.tsx +103 -0
- package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/carousel.tsx +8 -7
- package/{template-nextjs-static → template-vite-react/client}/src/components/ui/chart.tsx +49 -35
- package/template-vite-react/client/src/components/ui/checkbox.tsx +29 -0
- package/template-vite-react/client/src/components/ui/collapsible.tsx +19 -0
- package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/command.tsx +40 -52
- package/template-vite-react/client/src/components/ui/context-menu.tsx +271 -0
- package/template-vite-react/client/src/components/ui/dialog.tsx +158 -0
- package/{template-nextjs-static → template-vite-react/client}/src/components/ui/drawer.tsx +9 -12
- package/template-vite-react/client/src/components/ui/dropdown-menu.tsx +268 -0
- package/template-vite-react/client/src/components/ui/hover-card.tsx +49 -0
- package/template-vite-react/client/src/components/ui/input-group.tsx +156 -0
- package/{template-nextjs-static → template-vite-react/client}/src/components/ui/input-otp.tsx +17 -7
- package/template-vite-react/client/src/components/ui/input.tsx +20 -0
- package/template-vite-react/client/src/components/ui/label.tsx +18 -0
- package/template-vite-react/client/src/components/ui/menubar.tsx +280 -0
- package/template-vite-react/client/src/components/ui/navigation-menu.tsx +168 -0
- package/{template-nextjs-static → template-vite-react/client}/src/components/ui/pagination.tsx +35 -32
- package/template-vite-react/client/src/components/ui/popover.tsx +90 -0
- package/template-vite-react/client/src/components/ui/progress.tsx +81 -0
- package/template-vite-react/client/src/components/ui/radio-group.tsx +38 -0
- package/template-vite-react/client/src/components/ui/resizable.tsx +48 -0
- package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/scroll-area.tsx +10 -13
- package/template-vite-react/client/src/components/ui/select.tsx +199 -0
- package/template-vite-react/client/src/components/ui/separator.tsx +25 -0
- package/template-vite-react/client/src/components/ui/sheet.tsx +138 -0
- package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/sidebar.tsx +156 -162
- package/{template-nextjs-static → template-vite-react/client}/src/components/ui/skeleton.tsx +1 -1
- package/template-vite-react/client/src/components/ui/slider.tsx +57 -0
- package/template-vite-react/client/src/components/ui/sonner.tsx +49 -0
- package/template-vite-react/client/src/components/ui/switch.tsx +30 -0
- package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/table.tsx +5 -5
- package/template-vite-react/client/src/components/ui/tabs.tsx +80 -0
- package/template-vite-react/client/src/components/ui/textarea.tsx +18 -0
- package/template-vite-react/client/src/components/ui/toggle-group.tsx +89 -0
- package/template-vite-react/client/src/components/ui/toggle.tsx +44 -0
- package/template-vite-react/client/src/components/ui/tooltip.tsx +64 -0
- package/template-vite-react/client/src/index.css +1 -0
- package/template-vite-react/client/src/main.tsx +13 -0
- package/template-vite-react/client/src/pages/home/index.tsx +12 -0
- package/template-vite-react/client/src/pages/not-found/index.tsx +11 -0
- package/template-vite-react/client/src/types/index.ts +1 -0
- package/{template-nextjs-static → template-vite-react}/components.json +2 -2
- package/template-vite-react/eslint.config.js +23 -0
- package/template-vite-react/package.json +58 -0
- package/template-vite-react/scripts/build.sh +40 -0
- package/template-vite-react/shared/types.ts +1 -0
- package/template-vite-react/tsconfig.app.json +33 -0
- package/template-vite-react/tsconfig.json +14 -0
- package/template-vite-react/tsconfig.node.json +26 -0
- package/template-vite-react/vite.config.ts +17 -0
- package/template-nextjs-fullstack/README.md +0 -169
- package/template-nextjs-fullstack/_env.local.example +0 -1
- package/template-nextjs-fullstack/_gitignore +0 -41
- package/template-nextjs-fullstack/components.json +0 -25
- package/template-nextjs-fullstack/drizzle.config.ts +0 -10
- package/template-nextjs-fullstack/eslint.config.js +0 -15
- package/template-nextjs-fullstack/next.config.ts +0 -5
- package/template-nextjs-fullstack/package.json +0 -85
- package/template-nextjs-fullstack/postcss.config.js +0 -8
- package/template-nextjs-fullstack/scripts/build.sh +0 -37
- package/template-nextjs-fullstack/src/app/favicon.ico +0 -0
- package/template-nextjs-fullstack/src/app/globals.css +0 -130
- package/template-nextjs-fullstack/src/app/layout.tsx +0 -24
- package/template-nextjs-fullstack/src/app/page.tsx +0 -69
- package/template-nextjs-fullstack/src/app/todos/actions.ts +0 -37
- package/template-nextjs-fullstack/src/app/todos/page.tsx +0 -26
- package/template-nextjs-fullstack/src/app/todos/todo-form.tsx +0 -27
- package/template-nextjs-fullstack/src/app/todos/todo-list.tsx +0 -44
- package/template-nextjs-fullstack/src/components/header.tsx +0 -32
- package/template-nextjs-fullstack/src/components/theme-provider.tsx +0 -8
- package/template-nextjs-fullstack/src/components/ui/README.md +0 -134
- package/template-nextjs-fullstack/src/components/ui/accordion.tsx +0 -66
- package/template-nextjs-fullstack/src/components/ui/alert-dialog.tsx +0 -157
- package/template-nextjs-fullstack/src/components/ui/aspect-ratio.tsx +0 -11
- package/template-nextjs-fullstack/src/components/ui/avatar.tsx +0 -53
- package/template-nextjs-fullstack/src/components/ui/badge.tsx +0 -42
- package/template-nextjs-fullstack/src/components/ui/button.tsx +0 -69
- package/template-nextjs-fullstack/src/components/ui/calendar.tsx +0 -213
- package/template-nextjs-fullstack/src/components/ui/card.tsx +0 -82
- package/template-nextjs-fullstack/src/components/ui/chart.tsx +0 -357
- package/template-nextjs-fullstack/src/components/ui/checkbox.tsx +0 -32
- package/template-nextjs-fullstack/src/components/ui/collapsible.tsx +0 -33
- package/template-nextjs-fullstack/src/components/ui/context-menu.tsx +0 -324
- package/template-nextjs-fullstack/src/components/ui/dialog.tsx +0 -143
- package/template-nextjs-fullstack/src/components/ui/drawer.tsx +0 -135
- package/template-nextjs-fullstack/src/components/ui/dropdown-menu.tsx +0 -329
- package/template-nextjs-fullstack/src/components/ui/hover-card.tsx +0 -44
- package/template-nextjs-fullstack/src/components/ui/input-group.tsx +0 -166
- package/template-nextjs-fullstack/src/components/ui/input-otp.tsx +0 -77
- package/template-nextjs-fullstack/src/components/ui/input.tsx +0 -21
- package/template-nextjs-fullstack/src/components/ui/label.tsx +0 -24
- package/template-nextjs-fullstack/src/components/ui/menubar.tsx +0 -348
- package/template-nextjs-fullstack/src/components/ui/navigation-menu.tsx +0 -168
- package/template-nextjs-fullstack/src/components/ui/pagination.tsx +0 -127
- package/template-nextjs-fullstack/src/components/ui/popover.tsx +0 -48
- package/template-nextjs-fullstack/src/components/ui/progress.tsx +0 -31
- package/template-nextjs-fullstack/src/components/ui/radio-group.tsx +0 -45
- package/template-nextjs-fullstack/src/components/ui/resizable.tsx +0 -56
- package/template-nextjs-fullstack/src/components/ui/select.tsx +0 -243
- package/template-nextjs-fullstack/src/components/ui/separator.tsx +0 -28
- package/template-nextjs-fullstack/src/components/ui/sheet.tsx +0 -139
- package/template-nextjs-fullstack/src/components/ui/skeleton.tsx +0 -13
- package/template-nextjs-fullstack/src/components/ui/slider.tsx +0 -87
- package/template-nextjs-fullstack/src/components/ui/sonner.tsx +0 -67
- package/template-nextjs-fullstack/src/components/ui/switch.tsx +0 -31
- package/template-nextjs-fullstack/src/components/ui/tabs.tsx +0 -66
- package/template-nextjs-fullstack/src/components/ui/textarea.tsx +0 -18
- package/template-nextjs-fullstack/src/components/ui/toggle-group.tsx +0 -83
- package/template-nextjs-fullstack/src/components/ui/toggle.tsx +0 -47
- package/template-nextjs-fullstack/src/components/ui/tooltip.tsx +0 -61
- package/template-nextjs-fullstack/src/db/index.ts +0 -8
- package/template-nextjs-fullstack/src/db/schema.ts +0 -11
- package/template-nextjs-fullstack/tailwind.config.ts +0 -10
- package/template-nextjs-fullstack/tsconfig.json +0 -34
- package/template-nextjs-static/README.md +0 -80
- package/template-nextjs-static/_gitignore +0 -41
- package/template-nextjs-static/eslint.config.js +0 -15
- package/template-nextjs-static/next.config.ts +0 -8
- package/template-nextjs-static/package.json +0 -77
- package/template-nextjs-static/postcss.config.js +0 -8
- package/template-nextjs-static/public/favicon.ico +0 -0
- package/template-nextjs-static/scripts/build.sh +0 -36
- package/template-nextjs-static/src/components/theme-provider.tsx +0 -6
- package/template-nextjs-static/src/components/ui/README.md +0 -134
- package/template-nextjs-static/src/components/ui/accordion.tsx +0 -66
- package/template-nextjs-static/src/components/ui/alert-dialog.tsx +0 -157
- package/template-nextjs-static/src/components/ui/alert.tsx +0 -71
- package/template-nextjs-static/src/components/ui/aspect-ratio.tsx +0 -11
- package/template-nextjs-static/src/components/ui/avatar.tsx +0 -53
- package/template-nextjs-static/src/components/ui/badge.tsx +0 -42
- package/template-nextjs-static/src/components/ui/breadcrumb.tsx +0 -109
- package/template-nextjs-static/src/components/ui/button-group.tsx +0 -83
- package/template-nextjs-static/src/components/ui/button.tsx +0 -69
- package/template-nextjs-static/src/components/ui/card.tsx +0 -82
- package/template-nextjs-static/src/components/ui/carousel.tsx +0 -241
- package/template-nextjs-static/src/components/ui/checkbox.tsx +0 -32
- package/template-nextjs-static/src/components/ui/collapsible.tsx +0 -33
- package/template-nextjs-static/src/components/ui/command.tsx +0 -208
- package/template-nextjs-static/src/components/ui/context-menu.tsx +0 -324
- package/template-nextjs-static/src/components/ui/dialog.tsx +0 -143
- package/template-nextjs-static/src/components/ui/dropdown-menu.tsx +0 -329
- package/template-nextjs-static/src/components/ui/empty.tsx +0 -104
- package/template-nextjs-static/src/components/ui/field.tsx +0 -248
- package/template-nextjs-static/src/components/ui/form.tsx +0 -167
- package/template-nextjs-static/src/components/ui/hover-card.tsx +0 -44
- package/template-nextjs-static/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -21
- package/template-nextjs-static/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -36
- package/template-nextjs-static/src/components/ui/icons/file-android-colorful-icon.tsx +0 -33
- package/template-nextjs-static/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -21
- package/template-nextjs-static/src/components/ui/icons/file-code-colorful-icon.tsx +0 -28
- package/template-nextjs-static/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -21
- package/template-nextjs-static/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -29
- package/template-nextjs-static/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -25
- package/template-nextjs-static/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -29
- package/template-nextjs-static/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -29
- package/template-nextjs-static/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -21
- package/template-nextjs-static/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -21
- package/template-nextjs-static/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -21
- package/template-nextjs-static/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -29
- package/template-nextjs-static/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -23
- package/template-nextjs-static/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -27
- package/template-nextjs-static/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -20
- package/template-nextjs-static/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -21
- package/template-nextjs-static/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -12
- package/template-nextjs-static/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -14
- package/template-nextjs-static/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -23
- package/template-nextjs-static/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -38
- package/template-nextjs-static/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -21
- package/template-nextjs-static/src/components/ui/image.tsx +0 -183
- package/template-nextjs-static/src/components/ui/input-group.tsx +0 -166
- package/template-nextjs-static/src/components/ui/input.tsx +0 -21
- package/template-nextjs-static/src/components/ui/item.tsx +0 -193
- package/template-nextjs-static/src/components/ui/kbd.tsx +0 -28
- package/template-nextjs-static/src/components/ui/label.tsx +0 -24
- package/template-nextjs-static/src/components/ui/menubar.tsx +0 -348
- package/template-nextjs-static/src/components/ui/native-select.tsx +0 -48
- package/template-nextjs-static/src/components/ui/navigation-menu.tsx +0 -168
- package/template-nextjs-static/src/components/ui/popover.tsx +0 -48
- package/template-nextjs-static/src/components/ui/progress.tsx +0 -31
- package/template-nextjs-static/src/components/ui/radio-group.tsx +0 -45
- package/template-nextjs-static/src/components/ui/resizable.tsx +0 -56
- package/template-nextjs-static/src/components/ui/scroll-area.tsx +0 -58
- package/template-nextjs-static/src/components/ui/select.tsx +0 -243
- package/template-nextjs-static/src/components/ui/separator.tsx +0 -28
- package/template-nextjs-static/src/components/ui/sheet.tsx +0 -139
- package/template-nextjs-static/src/components/ui/sidebar.tsx +0 -727
- package/template-nextjs-static/src/components/ui/slider.tsx +0 -87
- package/template-nextjs-static/src/components/ui/sonner.tsx +0 -67
- package/template-nextjs-static/src/components/ui/spinner.tsx +0 -16
- package/template-nextjs-static/src/components/ui/streamdown.tsx +0 -186
- package/template-nextjs-static/src/components/ui/switch.tsx +0 -31
- package/template-nextjs-static/src/components/ui/table.tsx +0 -116
- package/template-nextjs-static/src/components/ui/tabs.tsx +0 -66
- package/template-nextjs-static/src/components/ui/textarea.tsx +0 -18
- package/template-nextjs-static/src/components/ui/toggle-group.tsx +0 -83
- package/template-nextjs-static/src/components/ui/toggle.tsx +0 -47
- package/template-nextjs-static/src/components/ui/tooltip.tsx +0 -61
- package/template-nextjs-static/src/hooks/use-mobile.ts +0 -19
- package/template-nextjs-static/src/lib/utils.ts +0 -6
- package/template-nextjs-static/src/pages/_app.tsx +0 -11
- package/template-nextjs-static/src/pages/_document.tsx +0 -13
- package/template-nextjs-static/src/pages/hello.tsx +0 -32
- package/template-nextjs-static/src/pages/index.tsx +0 -76
- package/template-nextjs-static/src/styles/globals.css +0 -143
- package/template-nextjs-static/tailwind.config.ts +0 -10
- package/template-nextjs-static/tsconfig.json +0 -34
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/button-group.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/empty.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/field.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/form.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-android-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-code-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/image.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/item.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/kbd.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/native-select.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/spinner.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/streamdown.tsx +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/hooks/use-mobile.ts +0 -0
- /package/{template-nextjs-fullstack → template-vite-react/client}/src/lib/utils.ts +0 -0
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as MenubarPrimitive from "@radix-ui/react-menubar"
|
|
5
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
function Menubar({
|
|
10
|
-
className,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Root>) {
|
|
13
|
-
return (
|
|
14
|
-
<MenubarPrimitive.Root
|
|
15
|
-
data-slot="menubar"
|
|
16
|
-
className={cn(
|
|
17
|
-
"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function MenubarMenu({
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Menu>) {
|
|
28
|
-
return <MenubarPrimitive.Menu data-slot="menubar-menu" {...props} />
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function MenubarGroup({
|
|
32
|
-
...props
|
|
33
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Group>) {
|
|
34
|
-
return <MenubarPrimitive.Group data-slot="menubar-group" {...props} />
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function MenubarPortal({
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {
|
|
40
|
-
return <MenubarPrimitive.Portal data-slot="menubar-portal" {...props} />
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function MenubarRadioGroup({
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {
|
|
46
|
-
return (
|
|
47
|
-
<MenubarPrimitive.RadioGroup data-slot="menubar-radio-group" {...props} />
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function MenubarTrigger({
|
|
52
|
-
className,
|
|
53
|
-
...props
|
|
54
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {
|
|
55
|
-
return (
|
|
56
|
-
<MenubarPrimitive.Trigger
|
|
57
|
-
data-slot="menubar-trigger"
|
|
58
|
-
className={cn(
|
|
59
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
60
|
-
className
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
/>
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function MenubarContent({
|
|
68
|
-
className,
|
|
69
|
-
align = "start",
|
|
70
|
-
alignOffset = -4,
|
|
71
|
-
sideOffset = 8,
|
|
72
|
-
...props
|
|
73
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Content>) {
|
|
74
|
-
return (
|
|
75
|
-
<MenubarPortal>
|
|
76
|
-
<MenubarPrimitive.Content
|
|
77
|
-
data-slot="menubar-content"
|
|
78
|
-
align={align}
|
|
79
|
-
alignOffset={alignOffset}
|
|
80
|
-
sideOffset={sideOffset}
|
|
81
|
-
className={cn(
|
|
82
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in 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 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
|
|
83
|
-
className
|
|
84
|
-
)}
|
|
85
|
-
{...props}
|
|
86
|
-
/>
|
|
87
|
-
</MenubarPortal>
|
|
88
|
-
)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function MenubarItem({
|
|
92
|
-
className,
|
|
93
|
-
inset,
|
|
94
|
-
variant = "default",
|
|
95
|
-
disabled,
|
|
96
|
-
onClick,
|
|
97
|
-
onMouseDown,
|
|
98
|
-
onKeyDown,
|
|
99
|
-
onKeyUp,
|
|
100
|
-
onPointerDown,
|
|
101
|
-
...props
|
|
102
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Item> & {
|
|
103
|
-
inset?: boolean
|
|
104
|
-
variant?: "default" | "destructive"
|
|
105
|
-
}) {
|
|
106
|
-
return (
|
|
107
|
-
<MenubarPrimitive.Item
|
|
108
|
-
data-slot="menubar-item"
|
|
109
|
-
data-inset={inset}
|
|
110
|
-
data-variant={variant}
|
|
111
|
-
className={cn(
|
|
112
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
113
|
-
className
|
|
114
|
-
)}
|
|
115
|
-
disabled={disabled}
|
|
116
|
-
onClick={(event) => {
|
|
117
|
-
if (disabled) {
|
|
118
|
-
event.preventDefault()
|
|
119
|
-
return
|
|
120
|
-
}
|
|
121
|
-
onClick?.(event)
|
|
122
|
-
}}
|
|
123
|
-
onMouseDown={disabled ? undefined : onMouseDown}
|
|
124
|
-
onKeyDown={disabled ? undefined : onKeyDown}
|
|
125
|
-
onKeyUp={disabled ? undefined : onKeyUp}
|
|
126
|
-
onPointerDown={(event) => {
|
|
127
|
-
if (disabled) {
|
|
128
|
-
event.preventDefault()
|
|
129
|
-
return
|
|
130
|
-
}
|
|
131
|
-
onPointerDown?.(event)
|
|
132
|
-
}}
|
|
133
|
-
{...props}
|
|
134
|
-
/>
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function MenubarCheckboxItem({
|
|
139
|
-
className,
|
|
140
|
-
children,
|
|
141
|
-
checked,
|
|
142
|
-
disabled,
|
|
143
|
-
onClick,
|
|
144
|
-
onMouseDown,
|
|
145
|
-
onKeyDown,
|
|
146
|
-
onKeyUp,
|
|
147
|
-
onPointerDown,
|
|
148
|
-
...props
|
|
149
|
-
}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>) {
|
|
150
|
-
return (
|
|
151
|
-
<MenubarPrimitive.CheckboxItem
|
|
152
|
-
data-slot="menubar-checkbox-item"
|
|
153
|
-
className={cn(
|
|
154
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
155
|
-
className
|
|
156
|
-
)}
|
|
157
|
-
checked={checked}
|
|
158
|
-
disabled={disabled}
|
|
159
|
-
onClick={(event) => {
|
|
160
|
-
if (disabled) {
|
|
161
|
-
event.preventDefault()
|
|
162
|
-
return
|
|
163
|
-
}
|
|
164
|
-
onClick?.(event)
|
|
165
|
-
}}
|
|
166
|
-
onMouseDown={disabled ? undefined : onMouseDown}
|
|
167
|
-
onKeyDown={disabled ? undefined : onKeyDown}
|
|
168
|
-
onKeyUp={disabled ? undefined : onKeyUp}
|
|
169
|
-
onPointerDown={(event) => {
|
|
170
|
-
if (disabled) {
|
|
171
|
-
event.preventDefault()
|
|
172
|
-
return
|
|
173
|
-
}
|
|
174
|
-
onPointerDown?.(event)
|
|
175
|
-
}}
|
|
176
|
-
{...props}
|
|
177
|
-
>
|
|
178
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
179
|
-
<MenubarPrimitive.ItemIndicator>
|
|
180
|
-
<CheckIcon className="size-4" />
|
|
181
|
-
</MenubarPrimitive.ItemIndicator>
|
|
182
|
-
</span>
|
|
183
|
-
{children}
|
|
184
|
-
</MenubarPrimitive.CheckboxItem>
|
|
185
|
-
)
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
function MenubarRadioItem({
|
|
189
|
-
className,
|
|
190
|
-
children,
|
|
191
|
-
disabled,
|
|
192
|
-
onClick,
|
|
193
|
-
onMouseDown,
|
|
194
|
-
onKeyDown,
|
|
195
|
-
onKeyUp,
|
|
196
|
-
onPointerDown,
|
|
197
|
-
...props
|
|
198
|
-
}: React.ComponentProps<typeof MenubarPrimitive.RadioItem>) {
|
|
199
|
-
return (
|
|
200
|
-
<MenubarPrimitive.RadioItem
|
|
201
|
-
data-slot="menubar-radio-item"
|
|
202
|
-
className={cn(
|
|
203
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
204
|
-
className
|
|
205
|
-
)}
|
|
206
|
-
disabled={disabled}
|
|
207
|
-
onClick={(event) => {
|
|
208
|
-
if (disabled) {
|
|
209
|
-
event.preventDefault()
|
|
210
|
-
return
|
|
211
|
-
}
|
|
212
|
-
onClick?.(event)
|
|
213
|
-
}}
|
|
214
|
-
onMouseDown={disabled ? undefined : onMouseDown}
|
|
215
|
-
onKeyDown={disabled ? undefined : onKeyDown}
|
|
216
|
-
onKeyUp={disabled ? undefined : onKeyUp}
|
|
217
|
-
onPointerDown={(event) => {
|
|
218
|
-
if (disabled) {
|
|
219
|
-
event.preventDefault()
|
|
220
|
-
return
|
|
221
|
-
}
|
|
222
|
-
onPointerDown?.(event)
|
|
223
|
-
}}
|
|
224
|
-
{...props}
|
|
225
|
-
>
|
|
226
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
227
|
-
<MenubarPrimitive.ItemIndicator>
|
|
228
|
-
<CircleIcon className="size-2 fill-current" />
|
|
229
|
-
</MenubarPrimitive.ItemIndicator>
|
|
230
|
-
</span>
|
|
231
|
-
{children}
|
|
232
|
-
</MenubarPrimitive.RadioItem>
|
|
233
|
-
)
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
function MenubarLabel({
|
|
237
|
-
className,
|
|
238
|
-
inset,
|
|
239
|
-
...props
|
|
240
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Label> & {
|
|
241
|
-
inset?: boolean
|
|
242
|
-
}) {
|
|
243
|
-
return (
|
|
244
|
-
<MenubarPrimitive.Label
|
|
245
|
-
data-slot="menubar-label"
|
|
246
|
-
data-inset={inset}
|
|
247
|
-
className={cn(
|
|
248
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
249
|
-
className
|
|
250
|
-
)}
|
|
251
|
-
{...props}
|
|
252
|
-
/>
|
|
253
|
-
)
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
function MenubarSeparator({
|
|
257
|
-
className,
|
|
258
|
-
...props
|
|
259
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Separator>) {
|
|
260
|
-
return (
|
|
261
|
-
<MenubarPrimitive.Separator
|
|
262
|
-
data-slot="menubar-separator"
|
|
263
|
-
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
264
|
-
{...props}
|
|
265
|
-
/>
|
|
266
|
-
)
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
function MenubarShortcut({
|
|
270
|
-
className,
|
|
271
|
-
...props
|
|
272
|
-
}: React.ComponentProps<"span">) {
|
|
273
|
-
return (
|
|
274
|
-
<span
|
|
275
|
-
data-slot="menubar-shortcut"
|
|
276
|
-
className={cn(
|
|
277
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
278
|
-
className
|
|
279
|
-
)}
|
|
280
|
-
{...props}
|
|
281
|
-
/>
|
|
282
|
-
)
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
function MenubarSub({
|
|
286
|
-
...props
|
|
287
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Sub>) {
|
|
288
|
-
return <MenubarPrimitive.Sub data-slot="menubar-sub" {...props} />
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
function MenubarSubTrigger({
|
|
292
|
-
className,
|
|
293
|
-
inset,
|
|
294
|
-
children,
|
|
295
|
-
...props
|
|
296
|
-
}: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
|
297
|
-
inset?: boolean
|
|
298
|
-
}) {
|
|
299
|
-
return (
|
|
300
|
-
<MenubarPrimitive.SubTrigger
|
|
301
|
-
data-slot="menubar-sub-trigger"
|
|
302
|
-
data-inset={inset}
|
|
303
|
-
className={cn(
|
|
304
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
|
|
305
|
-
className
|
|
306
|
-
)}
|
|
307
|
-
{...props}
|
|
308
|
-
>
|
|
309
|
-
{children}
|
|
310
|
-
<ChevronRightIcon className="ml-auto h-4 w-4" />
|
|
311
|
-
</MenubarPrimitive.SubTrigger>
|
|
312
|
-
)
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
function MenubarSubContent({
|
|
316
|
-
className,
|
|
317
|
-
...props
|
|
318
|
-
}: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {
|
|
319
|
-
return (
|
|
320
|
-
<MenubarPrimitive.SubContent
|
|
321
|
-
data-slot="menubar-sub-content"
|
|
322
|
-
className={cn(
|
|
323
|
-
"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
324
|
-
className
|
|
325
|
-
)}
|
|
326
|
-
{...props}
|
|
327
|
-
/>
|
|
328
|
-
)
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
export {
|
|
332
|
-
Menubar,
|
|
333
|
-
MenubarPortal,
|
|
334
|
-
MenubarMenu,
|
|
335
|
-
MenubarTrigger,
|
|
336
|
-
MenubarContent,
|
|
337
|
-
MenubarGroup,
|
|
338
|
-
MenubarSeparator,
|
|
339
|
-
MenubarLabel,
|
|
340
|
-
MenubarItem,
|
|
341
|
-
MenubarShortcut,
|
|
342
|
-
MenubarCheckboxItem,
|
|
343
|
-
MenubarRadioGroup,
|
|
344
|
-
MenubarRadioItem,
|
|
345
|
-
MenubarSub,
|
|
346
|
-
MenubarSubTrigger,
|
|
347
|
-
MenubarSubContent,
|
|
348
|
-
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"
|
|
3
|
-
import { cva } from "class-variance-authority"
|
|
4
|
-
import { ChevronDownIcon } from "lucide-react"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
function NavigationMenu({
|
|
9
|
-
className,
|
|
10
|
-
children,
|
|
11
|
-
viewport = true,
|
|
12
|
-
...props
|
|
13
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
14
|
-
viewport?: boolean
|
|
15
|
-
}) {
|
|
16
|
-
return (
|
|
17
|
-
<NavigationMenuPrimitive.Root
|
|
18
|
-
data-slot="navigation-menu"
|
|
19
|
-
data-viewport={viewport}
|
|
20
|
-
className={cn(
|
|
21
|
-
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
22
|
-
className
|
|
23
|
-
)}
|
|
24
|
-
{...props}
|
|
25
|
-
>
|
|
26
|
-
{children}
|
|
27
|
-
{viewport && <NavigationMenuViewport />}
|
|
28
|
-
</NavigationMenuPrimitive.Root>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function NavigationMenuList({
|
|
33
|
-
className,
|
|
34
|
-
...props
|
|
35
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
|
|
36
|
-
return (
|
|
37
|
-
<NavigationMenuPrimitive.List
|
|
38
|
-
data-slot="navigation-menu-list"
|
|
39
|
-
className={cn(
|
|
40
|
-
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
41
|
-
className
|
|
42
|
-
)}
|
|
43
|
-
{...props}
|
|
44
|
-
/>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function NavigationMenuItem({
|
|
49
|
-
className,
|
|
50
|
-
...props
|
|
51
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
|
|
52
|
-
return (
|
|
53
|
-
<NavigationMenuPrimitive.Item
|
|
54
|
-
data-slot="navigation-menu-item"
|
|
55
|
-
className={cn("relative", className)}
|
|
56
|
-
{...props}
|
|
57
|
-
/>
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const navigationMenuTriggerStyle = cva(
|
|
62
|
-
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium enabled:hover:bg-accent enabled:hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50 enabled:data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/20 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
function NavigationMenuTrigger({
|
|
66
|
-
className,
|
|
67
|
-
children,
|
|
68
|
-
...props
|
|
69
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
|
|
70
|
-
return (
|
|
71
|
-
<NavigationMenuPrimitive.Trigger
|
|
72
|
-
data-slot="navigation-menu-trigger"
|
|
73
|
-
className={cn(navigationMenuTriggerStyle(), "group", className)}
|
|
74
|
-
{...props}
|
|
75
|
-
>
|
|
76
|
-
{children}{" "}
|
|
77
|
-
<ChevronDownIcon
|
|
78
|
-
className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
|
|
79
|
-
aria-hidden="true"
|
|
80
|
-
/>
|
|
81
|
-
</NavigationMenuPrimitive.Trigger>
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function NavigationMenuContent({
|
|
86
|
-
className,
|
|
87
|
-
...props
|
|
88
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
|
|
89
|
-
return (
|
|
90
|
-
<NavigationMenuPrimitive.Content
|
|
91
|
-
data-slot="navigation-menu-content"
|
|
92
|
-
className={cn(
|
|
93
|
-
"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 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
94
|
-
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
95
|
-
className
|
|
96
|
-
)}
|
|
97
|
-
{...props}
|
|
98
|
-
/>
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function NavigationMenuViewport({
|
|
103
|
-
className,
|
|
104
|
-
...props
|
|
105
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
|
|
106
|
-
return (
|
|
107
|
-
<div
|
|
108
|
-
className={cn(
|
|
109
|
-
"absolute top-full left-0 isolate z-50 flex justify-center"
|
|
110
|
-
)}
|
|
111
|
-
>
|
|
112
|
-
<NavigationMenuPrimitive.Viewport
|
|
113
|
-
data-slot="navigation-menu-viewport"
|
|
114
|
-
className={cn(
|
|
115
|
-
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
116
|
-
className
|
|
117
|
-
)}
|
|
118
|
-
{...props}
|
|
119
|
-
/>
|
|
120
|
-
</div>
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function NavigationMenuLink({
|
|
125
|
-
className,
|
|
126
|
-
...props
|
|
127
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
|
|
128
|
-
return (
|
|
129
|
-
<NavigationMenuPrimitive.Link
|
|
130
|
-
data-slot="navigation-menu-link"
|
|
131
|
-
className={cn(
|
|
132
|
-
"data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/20 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
|
|
133
|
-
className
|
|
134
|
-
)}
|
|
135
|
-
{...props}
|
|
136
|
-
/>
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function NavigationMenuIndicator({
|
|
141
|
-
className,
|
|
142
|
-
...props
|
|
143
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
|
|
144
|
-
return (
|
|
145
|
-
<NavigationMenuPrimitive.Indicator
|
|
146
|
-
data-slot="navigation-menu-indicator"
|
|
147
|
-
className={cn(
|
|
148
|
-
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
|
|
149
|
-
className
|
|
150
|
-
)}
|
|
151
|
-
{...props}
|
|
152
|
-
>
|
|
153
|
-
<div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" />
|
|
154
|
-
</NavigationMenuPrimitive.Indicator>
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export {
|
|
159
|
-
NavigationMenu,
|
|
160
|
-
NavigationMenuList,
|
|
161
|
-
NavigationMenuItem,
|
|
162
|
-
NavigationMenuContent,
|
|
163
|
-
NavigationMenuTrigger,
|
|
164
|
-
NavigationMenuLink,
|
|
165
|
-
NavigationMenuIndicator,
|
|
166
|
-
NavigationMenuViewport,
|
|
167
|
-
navigationMenuTriggerStyle,
|
|
168
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import {
|
|
3
|
-
ChevronLeftIcon,
|
|
4
|
-
ChevronRightIcon,
|
|
5
|
-
MoreHorizontalIcon,
|
|
6
|
-
} from "lucide-react"
|
|
7
|
-
|
|
8
|
-
import { cn } from "@/lib/utils"
|
|
9
|
-
import { Button, buttonVariants } from "@/components/ui/button"
|
|
10
|
-
|
|
11
|
-
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
12
|
-
return (
|
|
13
|
-
<nav
|
|
14
|
-
role="navigation"
|
|
15
|
-
aria-label="pagination"
|
|
16
|
-
data-slot="pagination"
|
|
17
|
-
className={cn("mx-auto flex w-full justify-center", className)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function PaginationContent({
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<"ul">) {
|
|
27
|
-
return (
|
|
28
|
-
<ul
|
|
29
|
-
data-slot="pagination-content"
|
|
30
|
-
className={cn("flex flex-row items-center gap-1", className)}
|
|
31
|
-
{...props}
|
|
32
|
-
/>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function PaginationItem({ ...props }: React.ComponentProps<"li">) {
|
|
37
|
-
return <li data-slot="pagination-item" {...props} />
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
type PaginationLinkProps = {
|
|
41
|
-
isActive?: boolean
|
|
42
|
-
} & Pick<React.ComponentProps<typeof Button>, "size"> &
|
|
43
|
-
React.ComponentProps<"a">
|
|
44
|
-
|
|
45
|
-
function PaginationLink({
|
|
46
|
-
className,
|
|
47
|
-
isActive,
|
|
48
|
-
size = "icon",
|
|
49
|
-
...props
|
|
50
|
-
}: PaginationLinkProps) {
|
|
51
|
-
return (
|
|
52
|
-
<a
|
|
53
|
-
aria-current={isActive ? "page" : undefined}
|
|
54
|
-
data-slot="pagination-link"
|
|
55
|
-
data-active={isActive}
|
|
56
|
-
className={cn(
|
|
57
|
-
buttonVariants({
|
|
58
|
-
variant: isActive ? "outline" : "ghost",
|
|
59
|
-
size,
|
|
60
|
-
}),
|
|
61
|
-
className
|
|
62
|
-
)}
|
|
63
|
-
{...props}
|
|
64
|
-
/>
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function PaginationPrevious({
|
|
69
|
-
className,
|
|
70
|
-
...props
|
|
71
|
-
}: React.ComponentProps<typeof PaginationLink>) {
|
|
72
|
-
return (
|
|
73
|
-
<PaginationLink
|
|
74
|
-
aria-label="Go to previous page"
|
|
75
|
-
size="default"
|
|
76
|
-
className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
|
|
77
|
-
{...props}
|
|
78
|
-
>
|
|
79
|
-
<ChevronLeftIcon />
|
|
80
|
-
<span className="hidden">Previous</span>
|
|
81
|
-
</PaginationLink>
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function PaginationNext({
|
|
86
|
-
className,
|
|
87
|
-
...props
|
|
88
|
-
}: React.ComponentProps<typeof PaginationLink>) {
|
|
89
|
-
return (
|
|
90
|
-
<PaginationLink
|
|
91
|
-
aria-label="Go to next page"
|
|
92
|
-
size="default"
|
|
93
|
-
className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
|
|
94
|
-
{...props}
|
|
95
|
-
>
|
|
96
|
-
<span className="hidden">Next</span>
|
|
97
|
-
<ChevronRightIcon />
|
|
98
|
-
</PaginationLink>
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function PaginationEllipsis({
|
|
103
|
-
className,
|
|
104
|
-
...props
|
|
105
|
-
}: React.ComponentProps<"span">) {
|
|
106
|
-
return (
|
|
107
|
-
<span
|
|
108
|
-
aria-hidden
|
|
109
|
-
data-slot="pagination-ellipsis"
|
|
110
|
-
className={cn("flex size-9 items-center justify-center", className)}
|
|
111
|
-
{...props}
|
|
112
|
-
>
|
|
113
|
-
<MoreHorizontalIcon className="size-4" />
|
|
114
|
-
<span className="sr-only">More pages</span>
|
|
115
|
-
</span>
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export {
|
|
120
|
-
Pagination,
|
|
121
|
-
PaginationContent,
|
|
122
|
-
PaginationLink,
|
|
123
|
-
PaginationItem,
|
|
124
|
-
PaginationPrevious,
|
|
125
|
-
PaginationNext,
|
|
126
|
-
PaginationEllipsis,
|
|
127
|
-
}
|
|
@@ -1,48 +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
|
-
function Popover({
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
11
|
-
return <PopoverPrimitive.Root data-slot="popover" {...props} />
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function PopoverTrigger({
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
17
|
-
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function PopoverContent({
|
|
21
|
-
className,
|
|
22
|
-
align = "center",
|
|
23
|
-
sideOffset = 4,
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
26
|
-
return (
|
|
27
|
-
<PopoverPrimitive.Portal>
|
|
28
|
-
<PopoverPrimitive.Content
|
|
29
|
-
data-slot="popover-content"
|
|
30
|
-
align={align}
|
|
31
|
-
sideOffset={sideOffset}
|
|
32
|
-
className={cn(
|
|
33
|
-
"bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
34
|
-
className
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
</PopoverPrimitive.Portal>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function PopoverAnchor({
|
|
43
|
-
...props
|
|
44
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
45
|
-
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }
|