@lark-apaas/coding-templates 0.1.3 → 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-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,193 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
import { Separator } from "@/components/ui/separator"
|
|
7
|
-
|
|
8
|
-
function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
9
|
-
return (
|
|
10
|
-
<div
|
|
11
|
-
role="list"
|
|
12
|
-
data-slot="item-group"
|
|
13
|
-
className={cn("group/item-group flex flex-col", className)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function ItemSeparator({
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}: React.ComponentProps<typeof Separator>) {
|
|
23
|
-
return (
|
|
24
|
-
<Separator
|
|
25
|
-
data-slot="item-separator"
|
|
26
|
-
orientation="horizontal"
|
|
27
|
-
className={cn("my-0", className)}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const itemVariants = cva(
|
|
34
|
-
"group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[3px]",
|
|
35
|
-
{
|
|
36
|
-
variants: {
|
|
37
|
-
variant: {
|
|
38
|
-
default: "bg-transparent",
|
|
39
|
-
outline: "border-border",
|
|
40
|
-
muted: "bg-muted/50",
|
|
41
|
-
},
|
|
42
|
-
size: {
|
|
43
|
-
default: "p-4 gap-4 ",
|
|
44
|
-
sm: "py-3 px-4 gap-2.5",
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
defaultVariants: {
|
|
48
|
-
variant: "default",
|
|
49
|
-
size: "default",
|
|
50
|
-
},
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
function Item({
|
|
55
|
-
className,
|
|
56
|
-
variant = "default",
|
|
57
|
-
size = "default",
|
|
58
|
-
asChild = false,
|
|
59
|
-
...props
|
|
60
|
-
}: React.ComponentProps<"div"> &
|
|
61
|
-
VariantProps<typeof itemVariants> & { asChild?: boolean }) {
|
|
62
|
-
const Comp = asChild ? Slot : "div"
|
|
63
|
-
return (
|
|
64
|
-
<Comp
|
|
65
|
-
data-slot="item"
|
|
66
|
-
data-variant={variant}
|
|
67
|
-
data-size={size}
|
|
68
|
-
className={cn(itemVariants({ variant, size, className }))}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const itemMediaVariants = cva(
|
|
75
|
-
"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",
|
|
76
|
-
{
|
|
77
|
-
variants: {
|
|
78
|
-
variant: {
|
|
79
|
-
default: "bg-transparent",
|
|
80
|
-
icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
81
|
-
image:
|
|
82
|
-
"size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover",
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
defaultVariants: {
|
|
86
|
-
variant: "default",
|
|
87
|
-
},
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
function ItemMedia({
|
|
92
|
-
className,
|
|
93
|
-
variant = "default",
|
|
94
|
-
...props
|
|
95
|
-
}: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>) {
|
|
96
|
-
return (
|
|
97
|
-
<div
|
|
98
|
-
data-slot="item-media"
|
|
99
|
-
data-variant={variant}
|
|
100
|
-
className={cn(itemMediaVariants({ variant, className }))}
|
|
101
|
-
{...props}
|
|
102
|
-
/>
|
|
103
|
-
)
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function ItemContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
107
|
-
return (
|
|
108
|
-
<div
|
|
109
|
-
data-slot="item-content"
|
|
110
|
-
className={cn(
|
|
111
|
-
"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
|
|
112
|
-
className
|
|
113
|
-
)}
|
|
114
|
-
{...props}
|
|
115
|
-
/>
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
120
|
-
return (
|
|
121
|
-
<div
|
|
122
|
-
data-slot="item-title"
|
|
123
|
-
className={cn(
|
|
124
|
-
"flex w-fit items-center gap-2 text-sm leading-snug font-medium",
|
|
125
|
-
className
|
|
126
|
-
)}
|
|
127
|
-
{...props}
|
|
128
|
-
/>
|
|
129
|
-
)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
133
|
-
return (
|
|
134
|
-
<p
|
|
135
|
-
data-slot="item-description"
|
|
136
|
-
className={cn(
|
|
137
|
-
"text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
|
|
138
|
-
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
139
|
-
className
|
|
140
|
-
)}
|
|
141
|
-
{...props}
|
|
142
|
-
/>
|
|
143
|
-
)
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
function ItemActions({ className, ...props }: React.ComponentProps<"div">) {
|
|
147
|
-
return (
|
|
148
|
-
<div
|
|
149
|
-
data-slot="item-actions"
|
|
150
|
-
className={cn("flex items-center gap-2", className)}
|
|
151
|
-
{...props}
|
|
152
|
-
/>
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function ItemHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
157
|
-
return (
|
|
158
|
-
<div
|
|
159
|
-
data-slot="item-header"
|
|
160
|
-
className={cn(
|
|
161
|
-
"flex basis-full items-center justify-between gap-2",
|
|
162
|
-
className
|
|
163
|
-
)}
|
|
164
|
-
{...props}
|
|
165
|
-
/>
|
|
166
|
-
)
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
170
|
-
return (
|
|
171
|
-
<div
|
|
172
|
-
data-slot="item-footer"
|
|
173
|
-
className={cn(
|
|
174
|
-
"flex basis-full items-center justify-between gap-2",
|
|
175
|
-
className
|
|
176
|
-
)}
|
|
177
|
-
{...props}
|
|
178
|
-
/>
|
|
179
|
-
)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export {
|
|
183
|
-
Item,
|
|
184
|
-
ItemMedia,
|
|
185
|
-
ItemContent,
|
|
186
|
-
ItemActions,
|
|
187
|
-
ItemGroup,
|
|
188
|
-
ItemSeparator,
|
|
189
|
-
ItemTitle,
|
|
190
|
-
ItemDescription,
|
|
191
|
-
ItemHeader,
|
|
192
|
-
ItemFooter,
|
|
193
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { cn } from "@/lib/utils"
|
|
2
|
-
|
|
3
|
-
function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
|
|
4
|
-
return (
|
|
5
|
-
<kbd
|
|
6
|
-
data-slot="kbd"
|
|
7
|
-
className={cn(
|
|
8
|
-
"bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none",
|
|
9
|
-
"[&_svg:not([class*='size-'])]:size-3",
|
|
10
|
-
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
11
|
-
className
|
|
12
|
-
)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
19
|
-
return (
|
|
20
|
-
<kbd
|
|
21
|
-
data-slot="kbd-group"
|
|
22
|
-
className={cn("inline-flex items-center gap-1", className)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { Kbd, KbdGroup }
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
function Label({
|
|
9
|
-
className,
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
12
|
-
return (
|
|
13
|
-
<LabelPrimitive.Root
|
|
14
|
-
data-slot="label"
|
|
15
|
-
className={cn(
|
|
16
|
-
"flex items-center gap-2 text-sm leading-none font-normal select-none group-data-[disabled=true]:cursor-not-allowed group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { Label }
|
|
@@ -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,48 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { ChevronDownIcon } from "lucide-react"
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils"
|
|
5
|
-
|
|
6
|
-
function NativeSelect({ className, ...props }: React.ComponentProps<"select">) {
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
className="group/native-select relative w-fit has-[select:disabled]:opacity-50"
|
|
10
|
-
data-slot="native-select-wrapper"
|
|
11
|
-
>
|
|
12
|
-
<select
|
|
13
|
-
data-slot="native-select"
|
|
14
|
-
className={cn(
|
|
15
|
-
"border-input placeholder:text-muted-foreground not-[[multiple]]:has-[option[value='']:checked]:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:enabled:hover:bg-input/50 h-9 w-full min-w-0 appearance-none rounded-md border bg-transparent px-3 py-2 pr-9 text-sm leading-5 transition-[color,box-shadow] outline-none disabled:cursor-not-allowed",
|
|
16
|
-
"focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[3px]",
|
|
17
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
<ChevronDownIcon
|
|
23
|
-
className="text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none"
|
|
24
|
-
aria-hidden="true"
|
|
25
|
-
data-slot="native-select-icon"
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function NativeSelectOption({ ...props }: React.ComponentProps<"option">) {
|
|
32
|
-
return <option data-slot="native-select-option" {...props} />
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function NativeSelectOptGroup({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: React.ComponentProps<"optgroup">) {
|
|
39
|
-
return (
|
|
40
|
-
<optgroup
|
|
41
|
-
data-slot="native-select-optgroup"
|
|
42
|
-
className={cn(className)}
|
|
43
|
-
{...props}
|
|
44
|
-
/>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption }
|