@stagewise/ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +135 -0
- package/package.json +80 -0
- package/src/components/ui/accordion.tsx +66 -0
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +76 -0
- package/src/components/ui/aspect-ratio.tsx +22 -0
- package/src/components/ui/avatar.tsx +107 -0
- package/src/components/ui/badge.tsx +52 -0
- package/src/components/ui/breadcrumb.tsx +125 -0
- package/src/components/ui/bubble.tsx +128 -0
- package/src/components/ui/button-group.tsx +87 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/calendar.tsx +221 -0
- package/src/components/ui/card.tsx +103 -0
- package/src/components/ui/carousel.tsx +240 -0
- package/src/components/ui/chart.tsx +371 -0
- package/src/components/ui/checkbox.tsx +30 -0
- package/src/components/ui/collapsible.tsx +19 -0
- package/src/components/ui/combobox.tsx +295 -0
- package/src/components/ui/command.tsx +348 -0
- package/src/components/ui/context-menu.tsx +271 -0
- package/src/components/ui/dialog.tsx +160 -0
- package/src/components/ui/direction.tsx +4 -0
- package/src/components/ui/drawer.tsx +228 -0
- package/src/components/ui/dropdown-menu.tsx +266 -0
- package/src/components/ui/empty.tsx +104 -0
- package/src/components/ui/field.tsx +236 -0
- package/src/components/ui/hover-card.tsx +51 -0
- package/src/components/ui/input-group.tsx +158 -0
- package/src/components/ui/input-otp.tsx +85 -0
- package/src/components/ui/input.tsx +20 -0
- package/src/components/ui/item.tsx +201 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/label.tsx +20 -0
- package/src/components/ui/marker.tsx +71 -0
- package/src/components/ui/menubar.tsx +280 -0
- package/src/components/ui/message.tsx +92 -0
- package/src/components/ui/native-select.tsx +61 -0
- package/src/components/ui/navigation-menu.tsx +168 -0
- package/src/components/ui/pagination.tsx +130 -0
- package/src/components/ui/popover.tsx +88 -0
- package/src/components/ui/progress.tsx +83 -0
- package/src/components/ui/questionnaire.tsx +324 -0
- package/src/components/ui/radio-group.tsx +36 -0
- package/src/components/ui/resizable.tsx +50 -0
- package/src/components/ui/scroll-area.tsx +53 -0
- package/src/components/ui/select.tsx +201 -0
- package/src/components/ui/separator.tsx +23 -0
- package/src/components/ui/sheet.tsx +136 -0
- package/src/components/ui/sidebar.tsx +723 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +52 -0
- package/src/components/ui/spinner.tsx +10 -0
- package/src/components/ui/switch.tsx +32 -0
- package/src/components/ui/table.tsx +114 -0
- package/src/components/ui/tabs.tsx +82 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toast.tsx +234 -0
- package/src/components/ui/toggle-group.tsx +87 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +66 -0
- package/src/fonts/OFL.txt +92 -0
- package/src/fonts/geist-variable-italic.woff2 +0 -0
- package/src/fonts/geist-variable.woff2 +0 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/icons/custom/index.ts +1 -0
- package/src/icons/custom/ui-outline-18/Icon.tsx +28 -0
- package/src/icons/custom/ui-outline-18/IconBrowserTab.tsx +40 -0
- package/src/icons/custom/ui-outline-18/IconNewTerminal.tsx +77 -0
- package/src/icons/custom/ui-outline-18/index.ts +3 -0
- package/src/icons/index.ts +52 -0
- package/src/icons/nucleo/LICENSE.md +29 -0
- package/src/icons/nucleo/core-outline-24/Icon.tsx +27 -0
- package/src/icons/nucleo/core-outline-24/IconArrowUpOutline24.tsx +36 -0
- package/src/icons/nucleo/core-outline-24/IconBluetoothOutline24.tsx +26 -0
- package/src/icons/nucleo/core-outline-24/IconTrash2Outline24.tsx +76 -0
- package/src/icons/nucleo/core-outline-24/IconUsbOutline24.tsx +64 -0
- package/src/icons/nucleo/core-outline-24/index.ts +5 -0
- package/src/icons/nucleo/index.ts +48 -0
- package/src/icons/nucleo/micro-bold/Icon.tsx +27 -0
- package/src/icons/nucleo/micro-bold/IconArrowLeft.tsx +28 -0
- package/src/icons/nucleo/micro-bold/IconArrowRight.tsx +28 -0
- package/src/icons/nucleo/micro-bold/IconArrowRotateAnticlockwise.tsx +27 -0
- package/src/icons/nucleo/micro-bold/IconChevronLeft.tsx +16 -0
- package/src/icons/nucleo/micro-bold/IconChevronRight.tsx +16 -0
- package/src/icons/nucleo/micro-bold/IconClipboardContent.tsx +59 -0
- package/src/icons/nucleo/micro-bold/IconMagicWandSparkle.tsx +44 -0
- package/src/icons/nucleo/micro-bold/IconTriangleWarning.tsx +30 -0
- package/src/icons/nucleo/micro-bold/IconXmark.tsx +31 -0
- package/src/icons/nucleo/micro-bold/index.ts +10 -0
- package/src/icons/nucleo/social-media/Icon.tsx +27 -0
- package/src/icons/nucleo/social-media/IconApple.tsx +12 -0
- package/src/icons/nucleo/social-media/IconGithub.tsx +11 -0
- package/src/icons/nucleo/social-media/IconGoogle.tsx +20 -0
- package/src/icons/nucleo/social-media/index.ts +4 -0
- package/src/icons/nucleo/ui-fill-18/Icon.tsx +27 -0
- package/src/icons/nucleo/ui-fill-18/IconArrowLeftFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconArrowRightFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconCheckFill18.tsx +12 -0
- package/src/icons/nucleo/ui-fill-18/IconChevronDownFill18.tsx +12 -0
- package/src/icons/nucleo/ui-fill-18/IconGlobe2Fill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconLinkFill18.tsx +21 -0
- package/src/icons/nucleo/ui-fill-18/IconMediaStopFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconPinTackFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconPlusFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconVolumeUpFill18.tsx +22 -0
- package/src/icons/nucleo/ui-fill-18/IconVolumeXmarkFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconXmarkFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/index.ts +13 -0
- package/src/icons/nucleo/ui-fill-duo-18/Icon.tsx +27 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconBrainNodesFillDuo18.tsx +32 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconCloudeCodeFillDuo18.tsx +25 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconDatabaseFillDuo18.tsx +24 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconDownload4FillDuo18.tsx +18 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconEarthFillDuo18.tsx +20 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconFinderFillDuo18.tsx +36 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconFolderContent2FillDuo18.tsx +22 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconGear3FillDuo18.tsx +18 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconHistoryFillDuo18.tsx +20 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconLockKeyFillDuo18.tsx +24 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconNoteFillDuo18.tsx +34 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconPenDrawSparkleFillDuo18.tsx +34 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconServerFillDuo18.tsx +22 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconSpace3dFillDuo18.tsx +24 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconTriangleWarningFillDuo18.tsx +24 -0
- package/src/icons/nucleo/ui-fill-duo-18/index.ts +16 -0
- package/src/icons/nucleo/ui-outline-18/Icon.tsx +27 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowDownOutline18.tsx +33 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowRightOutline18.tsx +34 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowUpRightOutline18.tsx +34 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowsOppositeDirectionXOutline18.tsx +54 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowsToCenterOutline18.tsx +101 -0
- package/src/icons/nucleo/ui-outline-18/IconBanOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconBellDotOutline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconBookOpen5Outline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconBookOpenOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconBooks2Outline18.tsx +100 -0
- package/src/icons/nucleo/ui-outline-18/IconBoxSparkleOutline18.tsx +75 -0
- package/src/icons/nucleo/ui-outline-18/IconBrainOutline18.tsx +57 -0
- package/src/icons/nucleo/ui-outline-18/IconBranchOutOutline18.tsx +52 -0
- package/src/icons/nucleo/ui-outline-18/IconBugOutline18.tsx +98 -0
- package/src/icons/nucleo/ui-outline-18/IconCameraOutline18.tsx +42 -0
- package/src/icons/nucleo/ui-outline-18/IconChartPieOutline18.tsx +30 -0
- package/src/icons/nucleo/ui-outline-18/IconCheck2Outline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconCheckOutline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronDownOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronExpandYOutline18.tsx +31 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronLeftOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronReduceYOutline18.tsx +31 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronRightOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronUpOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconCircleCheckOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconCircleInfoOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconCircleQuestionOutline18.tsx +39 -0
- package/src/icons/nucleo/ui-outline-18/IconClipboardContentOutline18.tsx +60 -0
- package/src/icons/nucleo/ui-outline-18/IconClipboardOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconClone2Outline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconCloneDashed2Outline18.tsx +49 -0
- package/src/icons/nucleo/ui-outline-18/IconCodeBranchOutline18.tsx +65 -0
- package/src/icons/nucleo/ui-outline-18/IconCodeCommitOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconColorPaletteOutline18.tsx +56 -0
- package/src/icons/nucleo/ui-outline-18/IconConnection2Outline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconCopyIdOutline18.tsx +52 -0
- package/src/icons/nucleo/ui-outline-18/IconCopyOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconCreditCardOutline18.tsx +61 -0
- package/src/icons/nucleo/ui-outline-18/IconDatabaseSearchOutline18.tsx +64 -0
- package/src/icons/nucleo/ui-outline-18/IconDotsOutline18.tsx +46 -0
- package/src/icons/nucleo/ui-outline-18/IconDownload4Outline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconEarthOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconEarthSearchOutline18.tsx +61 -0
- package/src/icons/nucleo/ui-outline-18/IconEnvelopeOutline18.tsx +38 -0
- package/src/icons/nucleo/ui-outline-18/IconEye2Outline18.tsx +34 -0
- package/src/icons/nucleo/ui-outline-18/IconEyeOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconFilePenOutline18.tsx +56 -0
- package/src/icons/nucleo/ui-outline-18/IconFileSearchOutline18.tsx +64 -0
- package/src/icons/nucleo/ui-outline-18/IconFloppyDiskOutline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconFolder5Outline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderCloudOutline18.tsx +39 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderOpenOutline18.tsx +31 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderPenOutline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderPlusOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderSearchOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconGear2Outline18.tsx +193 -0
- package/src/icons/nucleo/ui-outline-18/IconGear3Outline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconGlobe3Outline18.tsx +61 -0
- package/src/icons/nucleo/ui-outline-18/IconGripDotsVerticalOutline18.tsx +74 -0
- package/src/icons/nucleo/ui-outline-18/IconHardDriveOutline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconHelpChatOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconHotDrinkOutline18.tsx +60 -0
- package/src/icons/nucleo/ui-outline-18/IconImageSparkle3Outline18.tsx +41 -0
- package/src/icons/nucleo/ui-outline-18/IconKey2Outline18.tsx +61 -0
- package/src/icons/nucleo/ui-outline-18/IconLoader6Outline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconLocation2Outline18.tsx +45 -0
- package/src/icons/nucleo/ui-outline-18/IconLockKeyOutline18.tsx +58 -0
- package/src/icons/nucleo/ui-outline-18/IconMagicWandOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconMagnifierMinusOutline18.tsx +39 -0
- package/src/icons/nucleo/ui-outline-18/IconMagnifierOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconMagnifierPlusOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconMicrophone3Outline18.tsx +57 -0
- package/src/icons/nucleo/ui-outline-18/IconMinusOutline18.tsx +25 -0
- package/src/icons/nucleo/ui-outline-18/IconMoonOutline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconMsgSleepOutline18.tsx +41 -0
- package/src/icons/nucleo/ui-outline-18/IconMsgWritingOutline18.tsx +42 -0
- package/src/icons/nucleo/ui-outline-18/IconMusicOutline18.tsx +67 -0
- package/src/icons/nucleo/ui-outline-18/IconOctagonWarningOutline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconOpenExternalOutline18.tsx +51 -0
- package/src/icons/nucleo/ui-outline-18/IconOpenRectArrowInOutline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconPanelLeftOutline18.tsx +39 -0
- package/src/icons/nucleo/ui-outline-18/IconPaperclip2Outline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconPen2Outline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconPenDrawSparkleOutline18.tsx +46 -0
- package/src/icons/nucleo/ui-outline-18/IconPenOutline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconPenPlusOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconPenWriting3Outline18.tsx +31 -0
- package/src/icons/nucleo/ui-outline-18/IconPhoneOutline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconPinTackOutline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconPinTackSlashOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconPlusOutline18.tsx +38 -0
- package/src/icons/nucleo/ui-outline-18/IconPowerOffOutline18.tsx +36 -0
- package/src/icons/nucleo/ui-outline-18/IconPresentationScreenVideoOutline18.tsx +55 -0
- package/src/icons/nucleo/ui-outline-18/IconPuzzlePieceOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconRedoOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconRefreshAnticlockwiseOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconReuseOutline18.tsx +50 -0
- package/src/icons/nucleo/ui-outline-18/IconSearchContentOutline18.tsx +81 -0
- package/src/icons/nucleo/ui-outline-18/IconServerOutline18.tsx +73 -0
- package/src/icons/nucleo/ui-outline-18/IconSideProfileSparkleOutline18.tsx +28 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarLeftHideOutline18.tsx +49 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarLeftShowOutline18.tsx +49 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarRightHideOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarRightShowOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconSparkleOutline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconSpeakerOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconSplitViewOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconSquareCodeOutline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconSquareDashedOutline18.tsx +94 -0
- package/src/icons/nucleo/ui-outline-18/IconSquareTerminalOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconSunOutline18.tsx +121 -0
- package/src/icons/nucleo/ui-outline-18/IconTerminalOutline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconTextAlignLeft2Outline18.tsx +60 -0
- package/src/icons/nucleo/ui-outline-18/IconTextBgColorOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconTextColorOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconThumbsDownOutline18.tsx +36 -0
- package/src/icons/nucleo/ui-outline-18/IconThumbsUpOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconTrashOutline18.tsx +41 -0
- package/src/icons/nucleo/ui-outline-18/IconTriangleWarningOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconUndoOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconVersionsOutline18.tsx +46 -0
- package/src/icons/nucleo/ui-outline-18/IconVideoOutline18.tsx +45 -0
- package/src/icons/nucleo/ui-outline-18/IconWaveformLinesOutline18.tsx +80 -0
- package/src/icons/nucleo/ui-outline-18/IconWindowCodeOutline18.tsx +62 -0
- package/src/icons/nucleo/ui-outline-18/IconWindowPointerOutline18.tsx +51 -0
- package/src/icons/nucleo/ui-outline-18/IconXmarkOutline18.tsx +38 -0
- package/src/icons/nucleo/ui-outline-18/index.ts +128 -0
- package/src/index.ts +66 -0
- package/src/lib/utils.ts +6 -0
- package/src/plugin/index.ts +611 -0
- package/src/styles/animations.css +59 -0
- package/src/styles/bridge.css +117 -0
- package/src/styles/derived-utilities.css +179 -0
- package/src/styles/fonts.css +23 -0
- package/src/styles/index.css +72 -0
- package/src/styles/palette.css +189 -0
- package/src/styles/tailwind-tokens.css +56 -0
- package/src/styles/theme.css +103 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu"
|
|
5
|
+
import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar"
|
|
6
|
+
|
|
7
|
+
import { cn } from "../../lib/utils"
|
|
8
|
+
import {
|
|
9
|
+
DropdownMenu,
|
|
10
|
+
DropdownMenuContent,
|
|
11
|
+
DropdownMenuGroup,
|
|
12
|
+
DropdownMenuItem,
|
|
13
|
+
DropdownMenuLabel,
|
|
14
|
+
DropdownMenuPortal,
|
|
15
|
+
DropdownMenuRadioGroup,
|
|
16
|
+
DropdownMenuSeparator,
|
|
17
|
+
DropdownMenuShortcut,
|
|
18
|
+
DropdownMenuSub,
|
|
19
|
+
DropdownMenuSubContent,
|
|
20
|
+
DropdownMenuSubTrigger,
|
|
21
|
+
DropdownMenuTrigger,
|
|
22
|
+
} from "./dropdown-menu"
|
|
23
|
+
import { IconCheckOutline18 } from "../../icons"
|
|
24
|
+
|
|
25
|
+
function Menubar({ className, ...props }: MenubarPrimitive.Props) {
|
|
26
|
+
return (
|
|
27
|
+
<MenubarPrimitive
|
|
28
|
+
data-slot="menubar"
|
|
29
|
+
className={cn(
|
|
30
|
+
"flex h-8 items-center gap-0.5 rounded-lg border p-[3px]",
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function MenubarMenu({ ...props }: React.ComponentProps<typeof DropdownMenu>) {
|
|
39
|
+
return <DropdownMenu data-slot="menubar-menu" {...props} />
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function MenubarGroup({
|
|
43
|
+
...props
|
|
44
|
+
}: React.ComponentProps<typeof DropdownMenuGroup>) {
|
|
45
|
+
return <DropdownMenuGroup data-slot="menubar-group" {...props} />
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function MenubarPortal({
|
|
49
|
+
...props
|
|
50
|
+
}: React.ComponentProps<typeof DropdownMenuPortal>) {
|
|
51
|
+
return <DropdownMenuPortal data-slot="menubar-portal" {...props} />
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function MenubarTrigger({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: React.ComponentProps<typeof DropdownMenuTrigger>) {
|
|
58
|
+
return (
|
|
59
|
+
<DropdownMenuTrigger
|
|
60
|
+
data-slot="menubar-trigger"
|
|
61
|
+
className={cn(
|
|
62
|
+
"flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",
|
|
63
|
+
className
|
|
64
|
+
)}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function MenubarContent({
|
|
71
|
+
className,
|
|
72
|
+
align = "start",
|
|
73
|
+
alignOffset = -4,
|
|
74
|
+
sideOffset = 8,
|
|
75
|
+
...props
|
|
76
|
+
}: React.ComponentProps<typeof DropdownMenuContent>) {
|
|
77
|
+
return (
|
|
78
|
+
<DropdownMenuContent
|
|
79
|
+
data-slot="menubar-content"
|
|
80
|
+
align={align}
|
|
81
|
+
alignOffset={alignOffset}
|
|
82
|
+
sideOffset={sideOffset}
|
|
83
|
+
className={cn("min-w-36 rounded-lg p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!", className )}
|
|
84
|
+
{...props}
|
|
85
|
+
/>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function MenubarItem({
|
|
90
|
+
className,
|
|
91
|
+
inset,
|
|
92
|
+
variant = "default",
|
|
93
|
+
...props
|
|
94
|
+
}: React.ComponentProps<typeof DropdownMenuItem>) {
|
|
95
|
+
return (
|
|
96
|
+
<DropdownMenuItem
|
|
97
|
+
data-slot="menubar-item"
|
|
98
|
+
data-inset={inset}
|
|
99
|
+
data-variant={variant}
|
|
100
|
+
className={cn(
|
|
101
|
+
"group/menubar-item gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
102
|
+
className
|
|
103
|
+
)}
|
|
104
|
+
{...props}
|
|
105
|
+
/>
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function MenubarCheckboxItem({
|
|
110
|
+
className,
|
|
111
|
+
children,
|
|
112
|
+
checked,
|
|
113
|
+
inset,
|
|
114
|
+
...props
|
|
115
|
+
}: MenuPrimitive.CheckboxItem.Props & {
|
|
116
|
+
inset?: boolean
|
|
117
|
+
}) {
|
|
118
|
+
return (
|
|
119
|
+
<MenuPrimitive.CheckboxItem
|
|
120
|
+
data-slot="menubar-checkbox-item"
|
|
121
|
+
data-inset={inset}
|
|
122
|
+
className={cn(
|
|
123
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
124
|
+
className
|
|
125
|
+
)}
|
|
126
|
+
checked={checked}
|
|
127
|
+
{...props}
|
|
128
|
+
>
|
|
129
|
+
<span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
|
|
130
|
+
<MenuPrimitive.CheckboxItemIndicator>
|
|
131
|
+
<IconCheckOutline18
|
|
132
|
+
/>
|
|
133
|
+
</MenuPrimitive.CheckboxItemIndicator>
|
|
134
|
+
</span>
|
|
135
|
+
{children}
|
|
136
|
+
</MenuPrimitive.CheckboxItem>
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function MenubarRadioGroup({
|
|
141
|
+
...props
|
|
142
|
+
}: React.ComponentProps<typeof DropdownMenuRadioGroup>) {
|
|
143
|
+
return <DropdownMenuRadioGroup data-slot="menubar-radio-group" {...props} />
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function MenubarRadioItem({
|
|
147
|
+
className,
|
|
148
|
+
children,
|
|
149
|
+
inset,
|
|
150
|
+
...props
|
|
151
|
+
}: MenuPrimitive.RadioItem.Props & {
|
|
152
|
+
inset?: boolean
|
|
153
|
+
}) {
|
|
154
|
+
return (
|
|
155
|
+
<MenuPrimitive.RadioItem
|
|
156
|
+
data-slot="menubar-radio-item"
|
|
157
|
+
data-inset={inset}
|
|
158
|
+
className={cn(
|
|
159
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
160
|
+
className
|
|
161
|
+
)}
|
|
162
|
+
{...props}
|
|
163
|
+
>
|
|
164
|
+
<span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
|
|
165
|
+
<MenuPrimitive.RadioItemIndicator>
|
|
166
|
+
<IconCheckOutline18
|
|
167
|
+
/>
|
|
168
|
+
</MenuPrimitive.RadioItemIndicator>
|
|
169
|
+
</span>
|
|
170
|
+
{children}
|
|
171
|
+
</MenuPrimitive.RadioItem>
|
|
172
|
+
)
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function MenubarLabel({
|
|
176
|
+
className,
|
|
177
|
+
inset,
|
|
178
|
+
...props
|
|
179
|
+
}: React.ComponentProps<typeof DropdownMenuLabel> & {
|
|
180
|
+
inset?: boolean
|
|
181
|
+
}) {
|
|
182
|
+
return (
|
|
183
|
+
<DropdownMenuLabel
|
|
184
|
+
data-slot="menubar-label"
|
|
185
|
+
data-inset={inset}
|
|
186
|
+
className={cn(
|
|
187
|
+
"px-1.5 py-1 text-sm font-medium data-inset:pl-7",
|
|
188
|
+
className
|
|
189
|
+
)}
|
|
190
|
+
{...props}
|
|
191
|
+
/>
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function MenubarSeparator({
|
|
196
|
+
className,
|
|
197
|
+
...props
|
|
198
|
+
}: React.ComponentProps<typeof DropdownMenuSeparator>) {
|
|
199
|
+
return (
|
|
200
|
+
<DropdownMenuSeparator
|
|
201
|
+
data-slot="menubar-separator"
|
|
202
|
+
className={cn("-mx-1 my-1 h-px bg-border", className)}
|
|
203
|
+
{...props}
|
|
204
|
+
/>
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function MenubarShortcut({
|
|
209
|
+
className,
|
|
210
|
+
...props
|
|
211
|
+
}: React.ComponentProps<typeof DropdownMenuShortcut>) {
|
|
212
|
+
return (
|
|
213
|
+
<DropdownMenuShortcut
|
|
214
|
+
data-slot="menubar-shortcut"
|
|
215
|
+
className={cn(
|
|
216
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
|
|
217
|
+
className
|
|
218
|
+
)}
|
|
219
|
+
{...props}
|
|
220
|
+
/>
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function MenubarSub({
|
|
225
|
+
...props
|
|
226
|
+
}: React.ComponentProps<typeof DropdownMenuSub>) {
|
|
227
|
+
return <DropdownMenuSub data-slot="menubar-sub" {...props} />
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function MenubarSubTrigger({
|
|
231
|
+
className,
|
|
232
|
+
inset,
|
|
233
|
+
...props
|
|
234
|
+
}: React.ComponentProps<typeof DropdownMenuSubTrigger> & {
|
|
235
|
+
inset?: boolean
|
|
236
|
+
}) {
|
|
237
|
+
return (
|
|
238
|
+
<DropdownMenuSubTrigger
|
|
239
|
+
data-slot="menubar-sub-trigger"
|
|
240
|
+
data-inset={inset}
|
|
241
|
+
className={cn(
|
|
242
|
+
"gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
243
|
+
className
|
|
244
|
+
)}
|
|
245
|
+
{...props}
|
|
246
|
+
/>
|
|
247
|
+
)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function MenubarSubContent({
|
|
251
|
+
className,
|
|
252
|
+
...props
|
|
253
|
+
}: React.ComponentProps<typeof DropdownMenuSubContent>) {
|
|
254
|
+
return (
|
|
255
|
+
<DropdownMenuSubContent
|
|
256
|
+
data-slot="menubar-sub-content"
|
|
257
|
+
className={cn("min-w-32 rounded-lg p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!", className )}
|
|
258
|
+
{...props}
|
|
259
|
+
/>
|
|
260
|
+
)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export {
|
|
264
|
+
Menubar,
|
|
265
|
+
MenubarPortal,
|
|
266
|
+
MenubarMenu,
|
|
267
|
+
MenubarTrigger,
|
|
268
|
+
MenubarContent,
|
|
269
|
+
MenubarGroup,
|
|
270
|
+
MenubarSeparator,
|
|
271
|
+
MenubarLabel,
|
|
272
|
+
MenubarItem,
|
|
273
|
+
MenubarShortcut,
|
|
274
|
+
MenubarCheckboxItem,
|
|
275
|
+
MenubarRadioGroup,
|
|
276
|
+
MenubarRadioItem,
|
|
277
|
+
MenubarSub,
|
|
278
|
+
MenubarSubTrigger,
|
|
279
|
+
MenubarSubContent,
|
|
280
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../lib/utils"
|
|
4
|
+
|
|
5
|
+
function MessageGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
data-slot="message-group"
|
|
9
|
+
className={cn("flex min-w-0 flex-col gap-2", className)}
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function Message({
|
|
16
|
+
className,
|
|
17
|
+
align = "start",
|
|
18
|
+
...props
|
|
19
|
+
}: React.ComponentProps<"div"> & { align?: "start" | "end" }) {
|
|
20
|
+
return (
|
|
21
|
+
<div
|
|
22
|
+
data-slot="message"
|
|
23
|
+
data-align={align}
|
|
24
|
+
className={cn(
|
|
25
|
+
"group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse",
|
|
26
|
+
className
|
|
27
|
+
)}
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function MessageAvatar({ className, ...props }: React.ComponentProps<"div">) {
|
|
34
|
+
return (
|
|
35
|
+
<div
|
|
36
|
+
data-slot="message-avatar"
|
|
37
|
+
className={cn(
|
|
38
|
+
"flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8",
|
|
39
|
+
className
|
|
40
|
+
)}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function MessageContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
47
|
+
return (
|
|
48
|
+
<div
|
|
49
|
+
data-slot="message-content"
|
|
50
|
+
className={cn(
|
|
51
|
+
"flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end",
|
|
52
|
+
className
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function MessageHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
60
|
+
return (
|
|
61
|
+
<div
|
|
62
|
+
data-slot="message-header"
|
|
63
|
+
className={cn(
|
|
64
|
+
"flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0",
|
|
65
|
+
className
|
|
66
|
+
)}
|
|
67
|
+
{...props}
|
|
68
|
+
/>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function MessageFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
73
|
+
return (
|
|
74
|
+
<div
|
|
75
|
+
data-slot="message-footer"
|
|
76
|
+
className={cn(
|
|
77
|
+
"flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end",
|
|
78
|
+
className
|
|
79
|
+
)}
|
|
80
|
+
{...props}
|
|
81
|
+
/>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export {
|
|
86
|
+
MessageGroup,
|
|
87
|
+
Message,
|
|
88
|
+
MessageAvatar,
|
|
89
|
+
MessageContent,
|
|
90
|
+
MessageFooter,
|
|
91
|
+
MessageHeader,
|
|
92
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../lib/utils"
|
|
4
|
+
import { IconChevronDownOutline18 } from "../../icons"
|
|
5
|
+
|
|
6
|
+
type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
|
|
7
|
+
size?: "sm" | "default"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function NativeSelect({
|
|
11
|
+
className,
|
|
12
|
+
size = "default",
|
|
13
|
+
...props
|
|
14
|
+
}: NativeSelectProps) {
|
|
15
|
+
return (
|
|
16
|
+
<div
|
|
17
|
+
className={cn(
|
|
18
|
+
"group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
data-slot="native-select-wrapper"
|
|
22
|
+
data-size={size}
|
|
23
|
+
>
|
|
24
|
+
<select
|
|
25
|
+
data-slot="native-select"
|
|
26
|
+
data-size={size}
|
|
27
|
+
className="h-8 w-full min-w-0 appearance-none rounded-lg border border-derived-strong bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
<IconChevronDownOutline18 className="pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none" aria-hidden="true" data-slot="native-select-icon" />
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function NativeSelectOption({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: React.ComponentProps<"option">) {
|
|
39
|
+
return (
|
|
40
|
+
<option
|
|
41
|
+
data-slot="native-select-option"
|
|
42
|
+
className={cn("bg-[Canvas] text-[CanvasText]", className)}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function NativeSelectOptGroup({
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}: React.ComponentProps<"optgroup">) {
|
|
52
|
+
return (
|
|
53
|
+
<optgroup
|
|
54
|
+
data-slot="native-select-optgroup"
|
|
55
|
+
className={cn("bg-[Canvas] text-[CanvasText]", className)}
|
|
56
|
+
{...props}
|
|
57
|
+
/>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption }
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu"
|
|
2
|
+
import { cva } from "class-variance-authority"
|
|
3
|
+
|
|
4
|
+
import { cn } from "../../lib/utils"
|
|
5
|
+
import { IconChevronDownOutline18 } from "../../icons"
|
|
6
|
+
|
|
7
|
+
function NavigationMenu({
|
|
8
|
+
align = "start",
|
|
9
|
+
className,
|
|
10
|
+
children,
|
|
11
|
+
...props
|
|
12
|
+
}: NavigationMenuPrimitive.Root.Props &
|
|
13
|
+
Pick<NavigationMenuPrimitive.Positioner.Props, "align">) {
|
|
14
|
+
return (
|
|
15
|
+
<NavigationMenuPrimitive.Root
|
|
16
|
+
data-slot="navigation-menu"
|
|
17
|
+
className={cn(
|
|
18
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
<NavigationMenuPositioner align={align} />
|
|
25
|
+
</NavigationMenuPrimitive.Root>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function NavigationMenuList({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.List>) {
|
|
33
|
+
return (
|
|
34
|
+
<NavigationMenuPrimitive.List
|
|
35
|
+
data-slot="navigation-menu-list"
|
|
36
|
+
className={cn(
|
|
37
|
+
"group flex flex-1 list-none items-center justify-center gap-0",
|
|
38
|
+
className
|
|
39
|
+
)}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function NavigationMenuItem({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Item>) {
|
|
49
|
+
return (
|
|
50
|
+
<NavigationMenuPrimitive.Item
|
|
51
|
+
data-slot="navigation-menu-item"
|
|
52
|
+
className={cn("relative", className)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const navigationMenuTriggerStyle = cva(
|
|
59
|
+
"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted"
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
function NavigationMenuTrigger({
|
|
63
|
+
className,
|
|
64
|
+
children,
|
|
65
|
+
...props
|
|
66
|
+
}: NavigationMenuPrimitive.Trigger.Props) {
|
|
67
|
+
return (
|
|
68
|
+
<NavigationMenuPrimitive.Trigger
|
|
69
|
+
data-slot="navigation-menu-trigger"
|
|
70
|
+
className={cn(navigationMenuTriggerStyle(), "group", className)}
|
|
71
|
+
{...props}
|
|
72
|
+
>
|
|
73
|
+
{children}{" "}
|
|
74
|
+
<IconChevronDownOutline18 className="relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180" aria-hidden="true" />
|
|
75
|
+
</NavigationMenuPrimitive.Trigger>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function NavigationMenuContent({
|
|
80
|
+
className,
|
|
81
|
+
...props
|
|
82
|
+
}: NavigationMenuPrimitive.Content.Props) {
|
|
83
|
+
return (
|
|
84
|
+
<NavigationMenuPrimitive.Content
|
|
85
|
+
data-slot="navigation-menu-content"
|
|
86
|
+
className={cn(
|
|
87
|
+
"data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 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 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
|
|
88
|
+
className
|
|
89
|
+
)}
|
|
90
|
+
{...props}
|
|
91
|
+
/>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function NavigationMenuPositioner({
|
|
96
|
+
className,
|
|
97
|
+
side = "bottom",
|
|
98
|
+
sideOffset = 8,
|
|
99
|
+
align = "start",
|
|
100
|
+
alignOffset = 0,
|
|
101
|
+
...props
|
|
102
|
+
}: NavigationMenuPrimitive.Positioner.Props) {
|
|
103
|
+
return (
|
|
104
|
+
<NavigationMenuPrimitive.Portal>
|
|
105
|
+
<NavigationMenuPrimitive.Positioner
|
|
106
|
+
side={side}
|
|
107
|
+
sideOffset={sideOffset}
|
|
108
|
+
align={align}
|
|
109
|
+
alignOffset={alignOffset}
|
|
110
|
+
className={cn(
|
|
111
|
+
"isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0",
|
|
112
|
+
className
|
|
113
|
+
)}
|
|
114
|
+
{...props}
|
|
115
|
+
>
|
|
116
|
+
<NavigationMenuPrimitive.Popup className="data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0">
|
|
117
|
+
<NavigationMenuPrimitive.Viewport className="relative size-full overflow-hidden" />
|
|
118
|
+
</NavigationMenuPrimitive.Popup>
|
|
119
|
+
</NavigationMenuPrimitive.Positioner>
|
|
120
|
+
</NavigationMenuPrimitive.Portal>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function NavigationMenuLink({
|
|
125
|
+
className,
|
|
126
|
+
...props
|
|
127
|
+
}: NavigationMenuPrimitive.Link.Props) {
|
|
128
|
+
return (
|
|
129
|
+
<NavigationMenuPrimitive.Link
|
|
130
|
+
data-slot="navigation-menu-link"
|
|
131
|
+
className={cn(
|
|
132
|
+
"flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
133
|
+
className
|
|
134
|
+
)}
|
|
135
|
+
{...props}
|
|
136
|
+
/>
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function NavigationMenuIndicator({
|
|
141
|
+
className,
|
|
142
|
+
...props
|
|
143
|
+
}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Icon>) {
|
|
144
|
+
return (
|
|
145
|
+
<NavigationMenuPrimitive.Icon
|
|
146
|
+
data-slot="navigation-menu-indicator"
|
|
147
|
+
className={cn(
|
|
148
|
+
"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
|
|
149
|
+
className
|
|
150
|
+
)}
|
|
151
|
+
{...props}
|
|
152
|
+
>
|
|
153
|
+
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
|
|
154
|
+
</NavigationMenuPrimitive.Icon>
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export {
|
|
159
|
+
NavigationMenu,
|
|
160
|
+
NavigationMenuContent,
|
|
161
|
+
NavigationMenuIndicator,
|
|
162
|
+
NavigationMenuItem,
|
|
163
|
+
NavigationMenuLink,
|
|
164
|
+
NavigationMenuList,
|
|
165
|
+
NavigationMenuTrigger,
|
|
166
|
+
navigationMenuTriggerStyle,
|
|
167
|
+
NavigationMenuPositioner,
|
|
168
|
+
}
|