@codefast/ui 0.0.8 → 0.0.9
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/dist/accordion.d.mts +5 -1
- package/dist/accordion.d.ts +5 -1
- package/dist/accordion.js.map +1 -1
- package/dist/accordion.mjs.map +1 -1
- package/dist/alert-dialog.d.mts +12 -3
- package/dist/alert-dialog.d.ts +12 -3
- package/dist/alert-dialog.js +3 -3
- package/dist/alert-dialog.js.map +1 -1
- package/dist/alert-dialog.mjs +1 -1
- package/dist/alert-dialog.mjs.map +1 -1
- package/dist/alert.d.mts +10 -5
- package/dist/alert.d.ts +10 -5
- package/dist/alert.js +22 -18
- package/dist/alert.js.map +1 -1
- package/dist/alert.mjs +22 -18
- package/dist/alert.mjs.map +1 -1
- package/dist/aspect-ratio.d.mts +2 -1
- package/dist/aspect-ratio.d.ts +2 -1
- package/dist/aspect-ratio.js.map +1 -1
- package/dist/aspect-ratio.mjs.map +1 -1
- package/dist/avatar.d.mts +4 -1
- package/dist/avatar.d.ts +4 -1
- package/dist/avatar.js.map +1 -1
- package/dist/avatar.mjs.map +1 -1
- package/dist/badge.d.mts +5 -2
- package/dist/badge.d.ts +5 -2
- package/dist/badge.js.map +1 -1
- package/dist/badge.mjs.map +1 -1
- package/dist/blockquote.d.mts +5 -4
- package/dist/blockquote.d.ts +5 -4
- package/dist/blockquote.js +6 -4
- package/dist/blockquote.js.map +1 -1
- package/dist/blockquote.mjs +6 -4
- package/dist/blockquote.mjs.map +1 -1
- package/dist/box.d.mts +1 -1
- package/dist/box.d.ts +1 -1
- package/dist/box.js.map +1 -1
- package/dist/box.mjs.map +1 -1
- package/dist/breadcrumb.d.mts +18 -11
- package/dist/breadcrumb.d.ts +18 -11
- package/dist/breadcrumb.js +49 -39
- package/dist/breadcrumb.js.map +1 -1
- package/dist/breadcrumb.mjs +49 -39
- package/dist/breadcrumb.mjs.map +1 -1
- package/dist/button.d.mts +3 -2
- package/dist/button.d.ts +3 -2
- package/dist/button.js +2 -2
- package/dist/button.mjs +1 -1
- package/dist/calendar.d.mts +3 -2
- package/dist/calendar.d.ts +3 -2
- package/dist/calendar.js +3 -3
- package/dist/calendar.js.map +1 -1
- package/dist/calendar.mjs +1 -1
- package/dist/calendar.mjs.map +1 -1
- package/dist/card.d.mts +13 -7
- package/dist/card.d.ts +13 -7
- package/dist/card.js +47 -37
- package/dist/card.js.map +1 -1
- package/dist/card.mjs +47 -37
- package/dist/card.mjs.map +1 -1
- package/dist/carousel.d.mts +13 -8
- package/dist/carousel.d.ts +13 -8
- package/dist/carousel.js +63 -57
- package/dist/carousel.js.map +1 -1
- package/dist/carousel.mjs +62 -56
- package/dist/carousel.mjs.map +1 -1
- package/dist/checkbox.d.mts +2 -1
- package/dist/checkbox.d.ts +2 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/checkbox.mjs.map +1 -1
- package/dist/{chunk-OCLLX7EY.js → chunk-3BDLWZ3W.js} +1 -1
- package/dist/chunk-3BDLWZ3W.js.map +1 -0
- package/dist/{chunk-2D7SRYKN.js → chunk-43YGVOCO.js} +1 -1
- package/dist/chunk-43YGVOCO.js.map +1 -0
- package/dist/{chunk-EIHWTXQ4.mjs → chunk-AJLEALVP.mjs} +1 -1
- package/dist/chunk-AJLEALVP.mjs.map +1 -0
- package/dist/{chunk-LDYBRDAY.js → chunk-D6NQEMTJ.js} +1 -1
- package/dist/chunk-D6NQEMTJ.js.map +1 -0
- package/dist/{chunk-KW5FJ62U.mjs → chunk-FATZHRHR.mjs} +1 -1
- package/dist/chunk-FATZHRHR.mjs.map +1 -0
- package/dist/{chunk-RTKEO347.js → chunk-GRKABVK4.js} +1 -1
- package/dist/chunk-GRKABVK4.js.map +1 -0
- package/dist/{chunk-U2WDUCW3.js → chunk-JOJW7BBY.js} +1 -1
- package/dist/{chunk-U2WDUCW3.js.map → chunk-JOJW7BBY.js.map} +1 -1
- package/dist/{chunk-ESWGFN3R.mjs → chunk-KV4VL2ZF.mjs} +1 -1
- package/dist/chunk-KV4VL2ZF.mjs.map +1 -0
- package/dist/{chunk-T52N6ZBP.mjs → chunk-MJDKD2K4.mjs} +1 -1
- package/dist/{chunk-T52N6ZBP.mjs.map → chunk-MJDKD2K4.mjs.map} +1 -1
- package/dist/{chunk-EDVCMWDT.mjs → chunk-NCEN3XBK.mjs} +1 -1
- package/dist/chunk-NCEN3XBK.mjs.map +1 -0
- package/dist/{chunk-PTD4AMHI.mjs → chunk-PIU627A3.mjs} +1 -1
- package/dist/chunk-PIU627A3.mjs.map +1 -0
- package/dist/{chunk-5GHZ6EXI.js → chunk-PKB2G726.js} +1 -1
- package/dist/{chunk-5GHZ6EXI.js.map → chunk-PKB2G726.js.map} +1 -1
- package/dist/code.d.mts +5 -4
- package/dist/code.d.ts +5 -4
- package/dist/code.js +6 -4
- package/dist/code.js.map +1 -1
- package/dist/code.mjs +6 -4
- package/dist/code.mjs.map +1 -1
- package/dist/collapsible.d.mts +4 -1
- package/dist/collapsible.d.ts +4 -1
- package/dist/collapsible.js.map +1 -1
- package/dist/collapsible.mjs.map +1 -1
- package/dist/command.d.mts +14 -3
- package/dist/command.d.ts +14 -3
- package/dist/command.js +6 -3
- package/dist/command.js.map +1 -1
- package/dist/command.mjs +5 -2
- package/dist/command.mjs.map +1 -1
- package/dist/container.d.mts +5 -4
- package/dist/container.d.ts +5 -4
- package/dist/container.js +6 -4
- package/dist/container.js.map +1 -1
- package/dist/container.mjs +6 -4
- package/dist/container.mjs.map +1 -1
- package/dist/context-menu.d.mts +26 -11
- package/dist/context-menu.d.ts +26 -11
- package/dist/context-menu.js.map +1 -1
- package/dist/context-menu.mjs.map +1 -1
- package/dist/data-table.d.mts +10 -7
- package/dist/data-table.d.ts +10 -7
- package/dist/data-table.js +25 -25
- package/dist/data-table.js.map +1 -1
- package/dist/data-table.mjs +3 -3
- package/dist/data-table.mjs.map +1 -1
- package/dist/dialog.d.mts +11 -3
- package/dist/dialog.d.ts +11 -3
- package/dist/dialog.js +2 -2
- package/dist/dialog.mjs +1 -1
- package/dist/drawer.d.mts +12 -4
- package/dist/drawer.d.ts +12 -4
- package/dist/drawer.js.map +1 -1
- package/dist/drawer.mjs.map +1 -1
- package/dist/dropdown-menu.d.mts +25 -11
- package/dist/dropdown-menu.d.ts +25 -11
- package/dist/dropdown-menu.js +2 -2
- package/dist/dropdown-menu.mjs +1 -1
- package/dist/em.d.mts +5 -4
- package/dist/em.d.ts +5 -4
- package/dist/em.js +6 -4
- package/dist/em.js.map +1 -1
- package/dist/em.mjs +6 -4
- package/dist/em.mjs.map +1 -1
- package/dist/form.d.mts +14 -6
- package/dist/form.d.ts +14 -6
- package/dist/form.js +26 -22
- package/dist/form.js.map +1 -1
- package/dist/form.mjs +25 -21
- package/dist/form.mjs.map +1 -1
- package/dist/heading.d.mts +6 -5
- package/dist/heading.d.ts +6 -5
- package/dist/heading.js +6 -4
- package/dist/heading.js.map +1 -1
- package/dist/heading.mjs +6 -4
- package/dist/heading.mjs.map +1 -1
- package/dist/hover-card.d.mts +4 -1
- package/dist/hover-card.d.ts +4 -1
- package/dist/hover-card.js.map +1 -1
- package/dist/hover-card.mjs.map +1 -1
- package/dist/input-otp.d.mts +12 -32
- package/dist/input-otp.d.ts +12 -32
- package/dist/input-otp.js +30 -22
- package/dist/input-otp.js.map +1 -1
- package/dist/input-otp.mjs +29 -21
- package/dist/input-otp.mjs.map +1 -1
- package/dist/input.d.mts +6 -3
- package/dist/input.d.ts +6 -3
- package/dist/input.js +13 -11
- package/dist/input.js.map +1 -1
- package/dist/input.mjs +13 -11
- package/dist/input.mjs.map +1 -1
- package/dist/kbd.d.mts +5 -4
- package/dist/kbd.d.ts +5 -4
- package/dist/kbd.js +16 -14
- package/dist/kbd.js.map +1 -1
- package/dist/kbd.mjs +16 -14
- package/dist/kbd.mjs.map +1 -1
- package/dist/label.d.mts +2 -1
- package/dist/label.d.ts +2 -1
- package/dist/label.js +2 -2
- package/dist/label.mjs +1 -1
- package/dist/menubar.d.mts +27 -12
- package/dist/menubar.d.ts +27 -12
- package/dist/menubar.js.map +1 -1
- package/dist/menubar.mjs.map +1 -1
- package/dist/navigation-menu.d.mts +9 -1
- package/dist/navigation-menu.d.ts +9 -1
- package/dist/navigation-menu.js.map +1 -1
- package/dist/navigation-menu.mjs.map +1 -1
- package/dist/pagination.d.mts +13 -7
- package/dist/pagination.d.ts +13 -7
- package/dist/pagination.js +5 -3
- package/dist/pagination.js.map +1 -1
- package/dist/pagination.mjs +4 -2
- package/dist/pagination.mjs.map +1 -1
- package/dist/popover.d.mts +6 -1
- package/dist/popover.d.ts +6 -1
- package/dist/popover.js.map +1 -1
- package/dist/popover.mjs.map +1 -1
- package/dist/pre.d.mts +5 -4
- package/dist/pre.d.ts +5 -4
- package/dist/pre.js +6 -4
- package/dist/pre.js.map +1 -1
- package/dist/pre.mjs +6 -4
- package/dist/pre.mjs.map +1 -1
- package/dist/progress.d.mts +2 -1
- package/dist/progress.d.ts +2 -1
- package/dist/progress.js +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/progress.mjs +1 -1
- package/dist/progress.mjs.map +1 -1
- package/dist/quote.d.mts +5 -4
- package/dist/quote.d.ts +5 -4
- package/dist/quote.js +6 -4
- package/dist/quote.js.map +1 -1
- package/dist/quote.mjs +6 -4
- package/dist/quote.mjs.map +1 -1
- package/dist/radio-group.d.mts +3 -1
- package/dist/radio-group.d.ts +3 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/radio-group.mjs.map +1 -1
- package/dist/resizable.d.mts +4 -4
- package/dist/resizable.d.ts +4 -4
- package/dist/resizable.js +1 -1
- package/dist/resizable.js.map +1 -1
- package/dist/resizable.mjs +1 -1
- package/dist/resizable.mjs.map +1 -1
- package/dist/scroll-area.d.mts +4 -2
- package/dist/scroll-area.d.ts +4 -2
- package/dist/scroll-area.js +6 -6
- package/dist/scroll-area.js.map +1 -1
- package/dist/scroll-area.mjs +6 -6
- package/dist/scroll-area.mjs.map +1 -1
- package/dist/section.d.mts +5 -4
- package/dist/section.d.ts +5 -4
- package/dist/section.js +6 -4
- package/dist/section.js.map +1 -1
- package/dist/section.mjs +6 -4
- package/dist/section.mjs.map +1 -1
- package/dist/select.d.mts +11 -1
- package/dist/select.d.ts +11 -1
- package/dist/select.js +2 -2
- package/dist/select.mjs +1 -1
- package/dist/separator.d.mts +2 -1
- package/dist/separator.d.ts +2 -1
- package/dist/separator.js.map +1 -1
- package/dist/separator.mjs.map +1 -1
- package/dist/sheet.d.mts +18 -8
- package/dist/sheet.d.ts +18 -8
- package/dist/sheet.js.map +1 -1
- package/dist/sheet.mjs.map +1 -1
- package/dist/skeleton.d.mts +3 -2
- package/dist/skeleton.d.ts +3 -2
- package/dist/skeleton.js +1 -4
- package/dist/skeleton.js.map +1 -1
- package/dist/skeleton.mjs +1 -4
- package/dist/skeleton.mjs.map +1 -1
- package/dist/slider.d.mts +2 -1
- package/dist/slider.d.ts +2 -1
- package/dist/slider.js.map +1 -1
- package/dist/slider.mjs.map +1 -1
- package/dist/sonner.d.mts +1 -1
- package/dist/sonner.d.ts +1 -1
- package/dist/sonner.js.map +1 -1
- package/dist/sonner.mjs.map +1 -1
- package/dist/strong.d.mts +5 -4
- package/dist/strong.d.ts +5 -4
- package/dist/strong.js +6 -4
- package/dist/strong.js.map +1 -1
- package/dist/strong.mjs +6 -4
- package/dist/strong.mjs.map +1 -1
- package/dist/switch.d.mts +2 -1
- package/dist/switch.d.ts +2 -1
- package/dist/switch.js.map +1 -1
- package/dist/switch.mjs.map +1 -1
- package/dist/table.d.mts +17 -9
- package/dist/table.d.ts +17 -9
- package/dist/table.js +75 -58
- package/dist/table.js.map +1 -1
- package/dist/table.mjs +75 -58
- package/dist/table.mjs.map +1 -1
- package/dist/tabs.d.mts +5 -1
- package/dist/tabs.d.ts +5 -1
- package/dist/tabs.js.map +1 -1
- package/dist/tabs.mjs.map +1 -1
- package/dist/text.d.mts +1 -1
- package/dist/text.d.ts +1 -1
- package/dist/text.js.map +1 -1
- package/dist/text.mjs.map +1 -1
- package/dist/textarea.d.mts +3 -2
- package/dist/textarea.d.ts +3 -2
- package/dist/textarea.js +15 -13
- package/dist/textarea.js.map +1 -1
- package/dist/textarea.mjs +15 -13
- package/dist/textarea.mjs.map +1 -1
- package/dist/toggle-group.d.mts +4 -2
- package/dist/toggle-group.d.ts +4 -2
- package/dist/toggle-group.js +2 -2
- package/dist/toggle-group.js.map +1 -1
- package/dist/toggle-group.mjs +1 -1
- package/dist/toggle-group.mjs.map +1 -1
- package/dist/toggle.d.mts +2 -1
- package/dist/toggle.d.ts +2 -1
- package/dist/toggle.js +2 -2
- package/dist/toggle.mjs +1 -1
- package/dist/tooltip.d.mts +6 -1
- package/dist/tooltip.d.ts +6 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.mjs.map +1 -1
- package/package.json +6 -6
- package/src/accordion.tsx +17 -4
- package/src/alert-dialog.tsx +26 -7
- package/src/alert.tsx +35 -25
- package/src/aspect-ratio.tsx +2 -1
- package/src/avatar.tsx +13 -3
- package/src/badge.tsx +6 -3
- package/src/blockquote.tsx +11 -10
- package/src/box.tsx +1 -1
- package/src/breadcrumb.tsx +70 -60
- package/src/button.tsx +4 -2
- package/src/calendar.tsx +3 -2
- package/src/card.tsx +59 -52
- package/src/carousel.tsx +76 -72
- package/src/checkbox.tsx +3 -2
- package/src/code.tsx +10 -8
- package/src/collapsible.tsx +11 -1
- package/src/command.tsx +47 -10
- package/src/container.tsx +10 -10
- package/src/context-menu.tsx +52 -16
- package/src/data-table.tsx +23 -11
- package/src/dialog.tsx +21 -5
- package/src/drawer.tsx +28 -6
- package/src/dropdown-menu.tsx +51 -15
- package/src/em.tsx +10 -8
- package/src/form.tsx +55 -38
- package/src/heading.tsx +11 -11
- package/src/hover-card.tsx +12 -2
- package/src/input-otp.tsx +45 -33
- package/src/input.tsx +17 -15
- package/src/kbd.tsx +19 -17
- package/src/label.tsx +3 -2
- package/src/menubar.tsx +48 -17
- package/src/navigation-menu.tsx +25 -5
- package/src/pagination.tsx +21 -9
- package/src/popover.tsx +18 -2
- package/src/pre.tsx +10 -8
- package/src/progress.tsx +4 -3
- package/src/quote.tsx +10 -8
- package/src/radio-group.tsx +10 -3
- package/src/resizable.tsx +2 -1
- package/src/scroll-area.tsx +18 -11
- package/src/section.tsx +10 -10
- package/src/select.tsx +27 -7
- package/src/separator.tsx +3 -2
- package/src/sheet.tsx +23 -5
- package/src/skeleton.tsx +3 -5
- package/src/slider.tsx +3 -2
- package/src/sonner.tsx +1 -1
- package/src/strong.tsx +10 -8
- package/src/switch.tsx +3 -2
- package/src/table.tsx +90 -78
- package/src/tabs.tsx +17 -4
- package/src/text.tsx +1 -1
- package/src/textarea.tsx +16 -16
- package/src/toggle-group.tsx +14 -4
- package/src/toggle.tsx +3 -2
- package/src/tooltip.tsx +12 -2
- package/dist/chunk-2D7SRYKN.js.map +0 -1
- package/dist/chunk-EDVCMWDT.mjs.map +0 -1
- package/dist/chunk-EIHWTXQ4.mjs.map +0 -1
- package/dist/chunk-ESWGFN3R.mjs.map +0 -1
- package/dist/chunk-KW5FJ62U.mjs.map +0 -1
- package/dist/chunk-LDYBRDAY.js.map +0 -1
- package/dist/chunk-OCLLX7EY.js.map +0 -1
- package/dist/chunk-PTD4AMHI.mjs.map +0 -1
- package/dist/chunk-RTKEO347.js.map +0 -1
package/dist/menubar.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/menubar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarMenu\n * -------------------------------------------------------------------------- */\n\nconst MenubarMenu = MenubarPrimitive.Menu;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarGroup\n * -------------------------------------------------------------------------- */\n\nconst MenubarGroup = MenubarPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSub\n * -------------------------------------------------------------------------- */\n\nconst MenubarSub = MenubarPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioGroup\n * -------------------------------------------------------------------------- */\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: Menubar\n * -------------------------------------------------------------------------- */\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n MenubarPrimitive.MenubarProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"bg-background flex h-10 items-center space-x-1 rounded-md border p-1 shadow-sm\",\n className,\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarTrigger\n * -------------------------------------------------------------------------- */\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n MenubarPrimitive.MenubarTriggerProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium focus:outline-none\",\n className,\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n MenubarPrimitive.MenubarSubTriggerProps & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubContent\n * -------------------------------------------------------------------------- */\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n MenubarPrimitive.MenubarSubContentProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarContent\n * -------------------------------------------------------------------------- */\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n MenubarPrimitive.MenubarContentProps\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref,\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarItem\n * -------------------------------------------------------------------------- */\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n MenubarPrimitive.MenubarItemProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarCheckboxItem\n * -------------------------------------------------------------------------- */\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n MenubarPrimitive.MenubarCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioItem\n * -------------------------------------------------------------------------- */\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n MenubarPrimitive.MenubarRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarLabel\n * -------------------------------------------------------------------------- */\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n MenubarPrimitive.MenubarLabelProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSeparator\n * -------------------------------------------------------------------------- */\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"bg-muted -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarShortcut\n * -------------------------------------------------------------------------- */\n\nfunction MenubarShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n};\n"],"mappings":"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","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/menubar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarMenu\n * -------------------------------------------------------------------------- */\n\ntype MenubarMenuProps = MenubarPrimitive.MenubarMenuProps;\nconst MenubarMenu = MenubarPrimitive.Menu;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarGroupProps = MenubarPrimitive.MenubarGroupProps;\nconst MenubarGroup = MenubarPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSub\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubProps = MenubarPrimitive.MenubarSubProps;\nconst MenubarSub = MenubarPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioGroupProps = MenubarPrimitive.MenubarRadioGroupProps;\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: Menubar\n * -------------------------------------------------------------------------- */\n\ntype MenubarProps = MenubarPrimitive.MenubarProps;\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n MenubarProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"bg-background flex h-10 items-center space-x-1 rounded-md border p-1 shadow-sm\",\n className,\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarTriggerProps = MenubarPrimitive.MenubarTriggerProps;\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n MenubarTriggerProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium focus:outline-none\",\n className,\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubTrigger\n * -------------------------------------------------------------------------- */\n\ninterface MenubarSubTriggerProps\n extends MenubarPrimitive.MenubarSubTriggerProps {\n inset?: boolean;\n}\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n MenubarSubTriggerProps\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubContentProps = MenubarPrimitive.MenubarSubContentProps;\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n MenubarSubContentProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarContentProps = MenubarPrimitive.MenubarContentProps;\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n MenubarContentProps\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref,\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarItem\n * -------------------------------------------------------------------------- */\n\ninterface MenubarItemProps extends MenubarPrimitive.MenubarItemProps {\n inset?: boolean;\n}\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n MenubarItemProps\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarCheckboxItemProps = MenubarPrimitive.MenubarCheckboxItemProps;\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n MenubarCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioItemProps = MenubarPrimitive.MenubarRadioItemProps;\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n MenubarRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarLabel\n * -------------------------------------------------------------------------- */\n\ninterface MenubarLabelProps extends MenubarPrimitive.MenubarLabelProps {\n inset?: boolean;\n}\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n MenubarLabelProps\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSeparator\n * -------------------------------------------------------------------------- */\n\ntype MenubarSeparatorProps = MenubarPrimitive.MenubarSeparatorProps;\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n MenubarSeparatorProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"bg-muted -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarShortcut\n * -------------------------------------------------------------------------- */\n\ntype MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\nfunction MenubarShortcut({\n className,\n ...props\n}: MenubarShortcutProps): React.JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n type MenubarProps,\n type MenubarMenuProps,\n type MenubarTriggerProps,\n type MenubarContentProps,\n type MenubarItemProps,\n type MenubarSeparatorProps,\n type MenubarLabelProps,\n type MenubarCheckboxItemProps,\n type MenubarRadioGroupProps,\n type MenubarRadioItemProps,\n type MenubarSubContentProps,\n type MenubarSubTriggerProps,\n type MenubarGroupProps,\n type MenubarSubProps,\n type MenubarShortcutProps,\n};\n"],"mappings":"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","names":[]}
|
|
@@ -56,13 +56,21 @@ declare const navigationMenuTriggerStyle: (props?: ({
|
|
|
56
56
|
[x: string]: any;
|
|
57
57
|
} | null | undefined;
|
|
58
58
|
}) | undefined) => string;
|
|
59
|
+
type NavigationMenuProps = NavigationMenuPrimitive.NavigationMenuProps;
|
|
59
60
|
declare const NavigationMenu: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>>;
|
|
61
|
+
type NavigationMenuListProps = NavigationMenuPrimitive.NavigationMenuListProps;
|
|
60
62
|
declare const NavigationMenuList: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>>;
|
|
63
|
+
type NavigationMenuItemProps = NavigationMenuPrimitive.NavigationMenuItemProps;
|
|
61
64
|
declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
65
|
+
type NavigationMenuTriggerProps = NavigationMenuPrimitive.NavigationMenuTriggerProps;
|
|
62
66
|
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
67
|
+
type NavigationMenuContentProps = NavigationMenuPrimitive.NavigationMenuContentProps;
|
|
63
68
|
declare const NavigationMenuContent: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
type NavigationMenuLinkProps = NavigationMenuPrimitive.NavigationMenuLinkProps;
|
|
64
70
|
declare const NavigationMenuLink: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
71
|
+
type NavigationMenuViewportProps = NavigationMenuPrimitive.NavigationMenuViewportProps;
|
|
65
72
|
declare const NavigationMenuViewport: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
type NavigationMenuIndicatorProps = NavigationMenuPrimitive.NavigationMenuIndicatorProps;
|
|
66
74
|
declare const NavigationMenuIndicator: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
75
|
|
|
68
|
-
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle };
|
|
76
|
+
export { NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuIndicator, type NavigationMenuIndicatorProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, NavigationMenuViewport, type NavigationMenuViewportProps, navigationMenuTriggerStyle };
|
|
@@ -56,13 +56,21 @@ declare const navigationMenuTriggerStyle: (props?: ({
|
|
|
56
56
|
[x: string]: any;
|
|
57
57
|
} | null | undefined;
|
|
58
58
|
}) | undefined) => string;
|
|
59
|
+
type NavigationMenuProps = NavigationMenuPrimitive.NavigationMenuProps;
|
|
59
60
|
declare const NavigationMenu: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>>;
|
|
61
|
+
type NavigationMenuListProps = NavigationMenuPrimitive.NavigationMenuListProps;
|
|
60
62
|
declare const NavigationMenuList: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>>;
|
|
63
|
+
type NavigationMenuItemProps = NavigationMenuPrimitive.NavigationMenuItemProps;
|
|
61
64
|
declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
65
|
+
type NavigationMenuTriggerProps = NavigationMenuPrimitive.NavigationMenuTriggerProps;
|
|
62
66
|
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
67
|
+
type NavigationMenuContentProps = NavigationMenuPrimitive.NavigationMenuContentProps;
|
|
63
68
|
declare const NavigationMenuContent: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
type NavigationMenuLinkProps = NavigationMenuPrimitive.NavigationMenuLinkProps;
|
|
64
70
|
declare const NavigationMenuLink: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
71
|
+
type NavigationMenuViewportProps = NavigationMenuPrimitive.NavigationMenuViewportProps;
|
|
65
72
|
declare const NavigationMenuViewport: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
type NavigationMenuIndicatorProps = NavigationMenuPrimitive.NavigationMenuIndicatorProps;
|
|
66
74
|
declare const NavigationMenuIndicator: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
75
|
|
|
68
|
-
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle };
|
|
76
|
+
export { NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuIndicator, type NavigationMenuIndicatorProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, NavigationMenuViewport, type NavigationMenuViewportProps, navigationMenuTriggerStyle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/navigation-menu.tsx"],"names":[],"mappings":";;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,YAAY,6BAA6B;
|
|
1
|
+
{"version":3,"sources":["../src/navigation-menu.tsx"],"names":[],"mappings":";;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,YAAY,6BAA6B;AAoBvC,SASE,KATF;AAbF,IAAM,6BAA6B,IAAI;AAAA,EACrC,MAAM;AACR,CAAC;AAOD,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,0BAAuB;AAAA;AAAA;AAC1B,CACD;AACD,eAAe,cAAsC,6BAAK;AAO1D,IAAM,qBAA2B,iBAG/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,mBAAmB,cAAsC,6BAAK;AAO9D,IAAM,qBAA6C;AAQnD,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW,2BAA2B;AAAA,MACpC,WAAW,CAAC,SAAS,SAAS;AAAA,IAChC,CAAC;AAAA,IACA,GAAG;AAAA,IAEH;AAAA;AAAA,MAAU;AAAA,MACX;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,UACF;AAAA,UACA,eAAY;AAAA;AAAA,MACd;AAAA;AAAA;AACF,CACD;AACD,sBAAsB,cAAsC,gCAAQ;AAQpE,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,sBAAsB,cAAsC,gCAAQ;AAOpE,IAAM,qBAA6C;AAQnD,IAAM,yBAA+B,iBAGnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,IACF;AAAA,IAEA;AAAA,MAAyB;AAAA,MAAxB;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA;AACF,CACD;AACD,uBAAuB,cACG,iCAAS;AAQnC,IAAM,0BAAgC,iBAGpC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,8BAAC,SAAI,WAAU,0EAAyE;AAAA;AAC1F,CACD;AACD,wBAAwB,cACE,kCAAU","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cn, cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: NavigationMenu\n * -------------------------------------------------------------------------- */\n\nconst navigationMenuTriggerStyle = cva({\n base: \"bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 group inline-flex h-10 w-max items-center justify-center rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50\",\n});\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenu\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuProps = NavigationMenuPrimitive.NavigationMenuProps;\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n NavigationMenuProps\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuList\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuListProps = NavigationMenuPrimitive.NavigationMenuListProps;\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n NavigationMenuListProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1\",\n className,\n )}\n {...props}\n />\n));\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuItem\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuItemProps = NavigationMenuPrimitive.NavigationMenuItemProps;\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuTriggerProps =\n NavigationMenuPrimitive.NavigationMenuTriggerProps;\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n NavigationMenuPrimitive.NavigationMenuTriggerProps\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={navigationMenuTriggerStyle({\n className: [\"group\", className],\n })}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className={cn(\n \"relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180\",\n )}\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n));\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuContentProps =\n NavigationMenuPrimitive.NavigationMenuContentProps;\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n NavigationMenuContentProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 left-0 top-0 w-full focus:outline-none md:absolute md:w-auto\",\n className,\n )}\n {...props}\n />\n));\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuLink\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuLinkProps = NavigationMenuPrimitive.NavigationMenuLinkProps;\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuViewport\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuViewportProps =\n NavigationMenuPrimitive.NavigationMenuViewportProps;\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n NavigationMenuViewportProps\n>(({ className, ...props }, ref) => (\n <div\n className={cn(\n \"perspective-[2000px] absolute left-0 top-full flex justify-center\",\n )}\n >\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:zoom-in-90 data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full origin-[top_center] overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className,\n )}\n ref={ref}\n {...props}\n />\n </div>\n));\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuIndicator\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuIndicatorProps =\n NavigationMenuPrimitive.NavigationMenuIndicatorProps;\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n NavigationMenuIndicatorProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"data-[state=visible]:animate-in data-[state=visible]:fade-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden transition\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n));\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n type NavigationMenuProps,\n type NavigationMenuListProps,\n type NavigationMenuItemProps,\n type NavigationMenuContentProps,\n type NavigationMenuTriggerProps,\n type NavigationMenuLinkProps,\n type NavigationMenuIndicatorProps,\n type NavigationMenuViewportProps,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/navigation-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cn, cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: NavigationMenu\n * -------------------------------------------------------------------------- */\n\nconst navigationMenuTriggerStyle = cva({\n base: \"bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 group inline-flex h-10 w-max items-center justify-center rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50\",\n});\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenu\n * -------------------------------------------------------------------------- */\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n
|
|
1
|
+
{"version":3,"sources":["../src/navigation-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cn, cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: NavigationMenu\n * -------------------------------------------------------------------------- */\n\nconst navigationMenuTriggerStyle = cva({\n base: \"bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 group inline-flex h-10 w-max items-center justify-center rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50\",\n});\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenu\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuProps = NavigationMenuPrimitive.NavigationMenuProps;\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n NavigationMenuProps\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuList\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuListProps = NavigationMenuPrimitive.NavigationMenuListProps;\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n NavigationMenuListProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1\",\n className,\n )}\n {...props}\n />\n));\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuItem\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuItemProps = NavigationMenuPrimitive.NavigationMenuItemProps;\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuTriggerProps =\n NavigationMenuPrimitive.NavigationMenuTriggerProps;\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n NavigationMenuPrimitive.NavigationMenuTriggerProps\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={navigationMenuTriggerStyle({\n className: [\"group\", className],\n })}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className={cn(\n \"relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180\",\n )}\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n));\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuContentProps =\n NavigationMenuPrimitive.NavigationMenuContentProps;\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n NavigationMenuContentProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 left-0 top-0 w-full focus:outline-none md:absolute md:w-auto\",\n className,\n )}\n {...props}\n />\n));\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuLink\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuLinkProps = NavigationMenuPrimitive.NavigationMenuLinkProps;\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuViewport\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuViewportProps =\n NavigationMenuPrimitive.NavigationMenuViewportProps;\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n NavigationMenuViewportProps\n>(({ className, ...props }, ref) => (\n <div\n className={cn(\n \"perspective-[2000px] absolute left-0 top-full flex justify-center\",\n )}\n >\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:zoom-in-90 data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full origin-[top_center] overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className,\n )}\n ref={ref}\n {...props}\n />\n </div>\n));\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuIndicator\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuIndicatorProps =\n NavigationMenuPrimitive.NavigationMenuIndicatorProps;\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n NavigationMenuIndicatorProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"data-[state=visible]:animate-in data-[state=visible]:fade-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden transition\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n));\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n type NavigationMenuProps,\n type NavigationMenuListProps,\n type NavigationMenuItemProps,\n type NavigationMenuContentProps,\n type NavigationMenuTriggerProps,\n type NavigationMenuLinkProps,\n type NavigationMenuIndicatorProps,\n type NavigationMenuViewportProps,\n};\n"],"mappings":";;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,YAAY,6BAA6B;AAoBvC,SASE,KATF;AAbF,IAAM,6BAA6B,IAAI;AAAA,EACrC,MAAM;AACR,CAAC;AAOD,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,0BAAuB;AAAA;AAAA;AAC1B,CACD;AACD,eAAe,cAAsC,6BAAK;AAO1D,IAAM,qBAA2B,iBAG/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,mBAAmB,cAAsC,6BAAK;AAO9D,IAAM,qBAA6C;AAQnD,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW,2BAA2B;AAAA,MACpC,WAAW,CAAC,SAAS,SAAS;AAAA,IAChC,CAAC;AAAA,IACA,GAAG;AAAA,IAEH;AAAA;AAAA,MAAU;AAAA,MACX;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,UACF;AAAA,UACA,eAAY;AAAA;AAAA,MACd;AAAA;AAAA;AACF,CACD;AACD,sBAAsB,cAAsC,gCAAQ;AAQpE,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,sBAAsB,cAAsC,gCAAQ;AAOpE,IAAM,qBAA6C;AAQnD,IAAM,yBAA+B,iBAGnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,IACF;AAAA,IAEA;AAAA,MAAyB;AAAA,MAAxB;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA;AACF,CACD;AACD,uBAAuB,cACG,iCAAS;AAQnC,IAAM,0BAAgC,iBAGpC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,8BAAC,SAAI,WAAU,0EAAyE;AAAA;AAC1F,CACD;AACD,wBAAwB,cACE,kCAAU;","names":[]}
|
package/dist/pagination.d.mts
CHANGED
|
@@ -2,15 +2,21 @@ import * as React from 'react';
|
|
|
2
2
|
import { ButtonProps } from './button.mjs';
|
|
3
3
|
import 'cva';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
declare
|
|
7
|
-
|
|
5
|
+
type PaginationProps = React.HTMLAttributes<HTMLElement>;
|
|
6
|
+
declare function Pagination({ className, ...props }: PaginationProps): React.JSX.Element;
|
|
7
|
+
type PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;
|
|
8
|
+
declare const PaginationContent: React.ForwardRefExoticComponent<PaginationContentProps & React.RefAttributes<HTMLUListElement>>;
|
|
9
|
+
type PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;
|
|
10
|
+
declare const PaginationItem: React.ForwardRefExoticComponent<PaginationItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
8
11
|
interface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, "size"> {
|
|
9
12
|
isActive?: boolean;
|
|
10
13
|
}
|
|
11
14
|
declare function PaginationLink({ className, isActive, size, children, ...props }: PaginationLinkProps): React.JSX.Element;
|
|
12
|
-
|
|
13
|
-
declare function
|
|
14
|
-
|
|
15
|
+
type PaginationPreviousProps = PaginationLinkProps;
|
|
16
|
+
declare function PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element;
|
|
17
|
+
type PaginationNextProps = PaginationLinkProps;
|
|
18
|
+
declare function PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element;
|
|
19
|
+
type PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
20
|
+
declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element;
|
|
15
21
|
|
|
16
|
-
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
22
|
+
export { Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps };
|
package/dist/pagination.d.ts
CHANGED
|
@@ -2,15 +2,21 @@ import * as React from 'react';
|
|
|
2
2
|
import { ButtonProps } from './button.js';
|
|
3
3
|
import 'cva';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
declare
|
|
7
|
-
|
|
5
|
+
type PaginationProps = React.HTMLAttributes<HTMLElement>;
|
|
6
|
+
declare function Pagination({ className, ...props }: PaginationProps): React.JSX.Element;
|
|
7
|
+
type PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;
|
|
8
|
+
declare const PaginationContent: React.ForwardRefExoticComponent<PaginationContentProps & React.RefAttributes<HTMLUListElement>>;
|
|
9
|
+
type PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;
|
|
10
|
+
declare const PaginationItem: React.ForwardRefExoticComponent<PaginationItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
8
11
|
interface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, "size"> {
|
|
9
12
|
isActive?: boolean;
|
|
10
13
|
}
|
|
11
14
|
declare function PaginationLink({ className, isActive, size, children, ...props }: PaginationLinkProps): React.JSX.Element;
|
|
12
|
-
|
|
13
|
-
declare function
|
|
14
|
-
|
|
15
|
+
type PaginationPreviousProps = PaginationLinkProps;
|
|
16
|
+
declare function PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element;
|
|
17
|
+
type PaginationNextProps = PaginationLinkProps;
|
|
18
|
+
declare function PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element;
|
|
19
|
+
type PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
20
|
+
declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element;
|
|
15
21
|
|
|
16
|
-
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
22
|
+
export { Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps };
|
package/dist/pagination.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJOJW7BBYjs = require('./chunk-JOJW7BBY.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkG3NP7M2Njs = require('./chunk-G3NP7M2N.js');
|
|
@@ -36,7 +36,9 @@ var PaginationContent = React.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
36
36
|
}
|
|
37
37
|
));
|
|
38
38
|
PaginationContent.displayName = "PaginationContent";
|
|
39
|
-
var PaginationItem = React.forwardRef(
|
|
39
|
+
var PaginationItem = React.forwardRef(
|
|
40
|
+
(props, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ref, ...props })
|
|
41
|
+
);
|
|
40
42
|
PaginationItem.displayName = "PaginationItem";
|
|
41
43
|
function PaginationLink({
|
|
42
44
|
className,
|
|
@@ -49,7 +51,7 @@ function PaginationLink({
|
|
|
49
51
|
"a",
|
|
50
52
|
{
|
|
51
53
|
"aria-current": isActive ? "page" : void 0,
|
|
52
|
-
className:
|
|
54
|
+
className: _chunkJOJW7BBYjs.buttonVariants.call(void 0, {
|
|
53
55
|
variant: isActive ? "outline" : "ghost",
|
|
54
56
|
size,
|
|
55
57
|
className
|
package/dist/pagination.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pagination.tsx"],"names":[],"mappings":";;;;;;;;AAAA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;
|
|
1
|
+
{"version":3,"sources":["../src/pagination.tsx"],"names":[],"mappings":";;;;;;;;AAAA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAcH,cA8EA,YA9EA;AALJ,SAAS,WAAW;AAAA,EAClB;AAAA,EACA,GAAG;AACL,GAAuC;AACrC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,WAAW,GAAG,sCAAsC,SAAS;AAAA,MAC5D,GAAG;AAAA;AAAA,EACN;AAEJ;AAOA,IAAM,oBAA0B,iBAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,oCAAoC,SAAS;AAAA,IAC1D,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc;AAOhC,IAAM,iBAAuB;AAAA,EAC3B,CAAC,OAAO,QAAQ,oBAAC,QAAG,KAAW,GAAG,OAAO;AAC3C;AACA,eAAe,cAAc;AAY7B,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAA2C;AACzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAc,WAAW,SAAS;AAAA,MAClC,WAAW,eAAe;AAAA,QACxB,SAAS,WAAW,YAAY;AAAA,QAChC;AAAA,QACA;AAAA,MACF,CAAC;AAAA,MACA,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAOA,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAA+C;AAC7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAW,GAAG,gBAAgB,SAAS;AAAA,MACtC,GAAG;AAAA,MAEJ;AAAA,4BAAC,mBAAgB,WAAU,UAAS;AAAA,QACpC,oBAAC,UAAK,sBAAQ;AAAA;AAAA;AAAA,EAChB;AAEJ;AAOA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA,GAAG;AACL,GAA2C;AACzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAW,GAAG,gBAAgB,SAAS;AAAA,MACtC,GAAG;AAAA,MAEJ;AAAA,4BAAC,UAAK,kBAAI;AAAA,QACV,oBAAC,oBAAiB,WAAU,UAAS;AAAA;AAAA;AAAA,EACvC;AAEJ;AAOA,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAA+C;AAC7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,MACX,WAAW,GAAG,4CAA4C,SAAS;AAAA,MAClE,GAAG;AAAA,MAEJ;AAAA,4BAAC,sBAAmB,WAAU,UAAS;AAAA,QACvC,oBAAC,UAAK,WAAU,WAAU,wBAAU;AAAA;AAAA;AAAA,EACtC;AAEJ","sourcesContent":["import * as React from \"react\";\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n DotsHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\nimport { type ButtonProps, buttonVariants } from \"./button\";\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\nfunction Pagination({\n className,\n ...props\n}: PaginationProps): React.JSX.Element {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n PaginationContentProps\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n));\nPaginationContent.displayName = \"PaginationContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\nconst PaginationItem = React.forwardRef<HTMLLIElement, PaginationItemProps>(\n (props, ref) => <li ref={ref} {...props} />,\n);\nPaginationItem.displayName = \"PaginationItem\";\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement>,\n Pick<ButtonProps, \"size\"> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon\",\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\nfunction PaginationPrevious({\n className,\n ...props\n}: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 pl-2.5\", className)}\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\nfunction PaginationNext({\n className,\n ...props\n}: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 pr-2.5\", className)}\n {...props}\n >\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\nfunction PaginationEllipsis({\n className,\n ...props\n}: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span\n aria-hidden\n className={cn(\"flex size-10 items-center justify-center\", className)}\n {...props}\n >\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"]}
|
package/dist/pagination.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buttonVariants
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FATZHRHR.mjs";
|
|
4
4
|
import {
|
|
5
5
|
cn
|
|
6
6
|
} from "./chunk-UG3URV2Z.mjs";
|
|
@@ -36,7 +36,9 @@ var PaginationContent = React.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
36
36
|
}
|
|
37
37
|
));
|
|
38
38
|
PaginationContent.displayName = "PaginationContent";
|
|
39
|
-
var PaginationItem = React.forwardRef(
|
|
39
|
+
var PaginationItem = React.forwardRef(
|
|
40
|
+
(props, ref) => /* @__PURE__ */ jsx("li", { ref, ...props })
|
|
41
|
+
);
|
|
40
42
|
PaginationItem.displayName = "PaginationItem";
|
|
41
43
|
function PaginationLink({
|
|
42
44
|
className,
|
package/dist/pagination.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pagination.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n DotsHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\nimport { type ButtonProps, buttonVariants } from \"./button\";\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\nfunction Pagination({\n className,\n ...props\n}:
|
|
1
|
+
{"version":3,"sources":["../src/pagination.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n DotsHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\nimport { type ButtonProps, buttonVariants } from \"./button\";\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\nfunction Pagination({\n className,\n ...props\n}: PaginationProps): React.JSX.Element {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n PaginationContentProps\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n));\nPaginationContent.displayName = \"PaginationContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\nconst PaginationItem = React.forwardRef<HTMLLIElement, PaginationItemProps>(\n (props, ref) => <li ref={ref} {...props} />,\n);\nPaginationItem.displayName = \"PaginationItem\";\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement>,\n Pick<ButtonProps, \"size\"> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon\",\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\nfunction PaginationPrevious({\n className,\n ...props\n}: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 pl-2.5\", className)}\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\nfunction PaginationNext({\n className,\n ...props\n}: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 pr-2.5\", className)}\n {...props}\n >\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\nfunction PaginationEllipsis({\n className,\n ...props\n}: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span\n aria-hidden\n className={cn(\"flex size-10 items-center justify-center\", className)}\n {...props}\n >\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"],"mappings":";;;;;;;;AAAA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAcH,cA8EA,YA9EA;AALJ,SAAS,WAAW;AAAA,EAClB;AAAA,EACA,GAAG;AACL,GAAuC;AACrC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,WAAW,GAAG,sCAAsC,SAAS;AAAA,MAC5D,GAAG;AAAA;AAAA,EACN;AAEJ;AAOA,IAAM,oBAA0B,iBAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,oCAAoC,SAAS;AAAA,IAC1D,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc;AAOhC,IAAM,iBAAuB;AAAA,EAC3B,CAAC,OAAO,QAAQ,oBAAC,QAAG,KAAW,GAAG,OAAO;AAC3C;AACA,eAAe,cAAc;AAY7B,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAA2C;AACzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAc,WAAW,SAAS;AAAA,MAClC,WAAW,eAAe;AAAA,QACxB,SAAS,WAAW,YAAY;AAAA,QAChC;AAAA,QACA;AAAA,MACF,CAAC;AAAA,MACA,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAOA,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAA+C;AAC7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAW,GAAG,gBAAgB,SAAS;AAAA,MACtC,GAAG;AAAA,MAEJ;AAAA,4BAAC,mBAAgB,WAAU,UAAS;AAAA,QACpC,oBAAC,UAAK,sBAAQ;AAAA;AAAA;AAAA,EAChB;AAEJ;AAOA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA,GAAG;AACL,GAA2C;AACzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAW,GAAG,gBAAgB,SAAS;AAAA,MACtC,GAAG;AAAA,MAEJ;AAAA,4BAAC,UAAK,kBAAI;AAAA,QACV,oBAAC,oBAAiB,WAAU,UAAS;AAAA;AAAA;AAAA,EACvC;AAEJ;AAOA,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAA+C;AAC7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,MACX,WAAW,GAAG,4CAA4C,SAAS;AAAA,MAClE,GAAG;AAAA,MAEJ;AAAA,4BAAC,sBAAmB,WAAU,UAAS;AAAA,QACvC,oBAAC,UAAK,WAAU,WAAU,wBAAU;AAAA;AAAA;AAAA,EACtC;AAEJ;","names":[]}
|
package/dist/popover.d.mts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
3
|
|
|
4
|
+
type PopoverProps = PopoverPrimitive.PopoverProps;
|
|
4
5
|
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
6
|
+
type PopoverTriggerProps = PopoverPrimitive.PopoverTriggerProps;
|
|
5
7
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
type PopoverAnchorProps = PopoverPrimitive.PopoverAnchorProps;
|
|
6
9
|
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
type PopoverContentProps = PopoverPrimitive.PopoverContentProps;
|
|
7
11
|
declare const PopoverContent: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
type PopoverArrowProps = PopoverPrimitive.PopoverArrowProps;
|
|
8
13
|
declare const PopoverArrow: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
9
14
|
|
|
10
|
-
export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
|
|
15
|
+
export { Popover, PopoverAnchor, type PopoverAnchorProps, PopoverArrow, type PopoverArrowProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps };
|
package/dist/popover.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
3
|
|
|
4
|
+
type PopoverProps = PopoverPrimitive.PopoverProps;
|
|
4
5
|
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
6
|
+
type PopoverTriggerProps = PopoverPrimitive.PopoverTriggerProps;
|
|
5
7
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
type PopoverAnchorProps = PopoverPrimitive.PopoverAnchorProps;
|
|
6
9
|
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
type PopoverContentProps = PopoverPrimitive.PopoverContentProps;
|
|
7
11
|
declare const PopoverContent: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
type PopoverArrowProps = PopoverPrimitive.PopoverArrowProps;
|
|
8
13
|
declare const PopoverArrow: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
9
14
|
|
|
10
|
-
export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
|
|
15
|
+
export { Popover, PopoverAnchor, type PopoverAnchorProps, PopoverArrow, type PopoverArrowProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps };
|
package/dist/popover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/popover.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,sBAAsB;
|
|
1
|
+
{"version":3,"sources":["../src/popover.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,sBAAsB;AAkC9B;AA1BJ,IAAM,UAA2B;AAOjC,IAAM,iBAAkC;AAOxC,IAAM,gBAAiC;AAOvC,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,MAAM,GAAG,QAC5D,oBAAkB,yBAAjB,EACC;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,eAAe,cAA+B,yBAAQ;AAOtD,IAAM,eAAqB,iBAGzB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,gBAAgB,SAAS;AAAA,IACtC,GAAG;AAAA;AACN,CACD;AACD,aAAa,cAA+B,uBAAM","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Popover\n * -------------------------------------------------------------------------- */\n\ntype PopoverProps = PopoverPrimitive.PopoverProps;\nconst Popover = PopoverPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverTrigger\n * -------------------------------------------------------------------------- */\n\ntype PopoverTriggerProps = PopoverPrimitive.PopoverTriggerProps;\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverAnchor\n * -------------------------------------------------------------------------- */\n\ntype PopoverAnchorProps = PopoverPrimitive.PopoverAnchorProps;\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverContent\n * -------------------------------------------------------------------------- */\n\ntype PopoverContentProps = PopoverPrimitive.PopoverContentProps;\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n PopoverPrimitive.PopoverContentProps\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-[8rem] rounded-md border p-4 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverArrow\n * -------------------------------------------------------------------------- */\n\ntype PopoverArrowProps = PopoverPrimitive.PopoverArrowProps;\nconst PopoverArrow = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Arrow>,\n PopoverArrowProps\n>(({ className, ...props }, ref) => (\n <PopoverPrimitive.Arrow\n ref={ref}\n className={cn(\"fill-popover\", className)}\n {...props}\n />\n));\nPopoverArrow.displayName = PopoverPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n PopoverArrow,\n type PopoverProps,\n type PopoverTriggerProps,\n type PopoverContentProps,\n type PopoverAnchorProps,\n type PopoverArrowProps,\n};\n"]}
|
package/dist/popover.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Popover\n * -------------------------------------------------------------------------- */\n\nconst Popover = PopoverPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverTrigger\n * -------------------------------------------------------------------------- */\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverAnchor\n * -------------------------------------------------------------------------- */\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverContent\n * -------------------------------------------------------------------------- */\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n PopoverPrimitive.PopoverContentProps\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-[8rem] rounded-md border p-4 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverArrow\n * -------------------------------------------------------------------------- */\n\nconst PopoverArrow = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Arrow>,\n
|
|
1
|
+
{"version":3,"sources":["../src/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Popover\n * -------------------------------------------------------------------------- */\n\ntype PopoverProps = PopoverPrimitive.PopoverProps;\nconst Popover = PopoverPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverTrigger\n * -------------------------------------------------------------------------- */\n\ntype PopoverTriggerProps = PopoverPrimitive.PopoverTriggerProps;\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverAnchor\n * -------------------------------------------------------------------------- */\n\ntype PopoverAnchorProps = PopoverPrimitive.PopoverAnchorProps;\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverContent\n * -------------------------------------------------------------------------- */\n\ntype PopoverContentProps = PopoverPrimitive.PopoverContentProps;\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n PopoverPrimitive.PopoverContentProps\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-[8rem] rounded-md border p-4 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: PopoverArrow\n * -------------------------------------------------------------------------- */\n\ntype PopoverArrowProps = PopoverPrimitive.PopoverArrowProps;\nconst PopoverArrow = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Arrow>,\n PopoverArrowProps\n>(({ className, ...props }, ref) => (\n <PopoverPrimitive.Arrow\n ref={ref}\n className={cn(\"fill-popover\", className)}\n {...props}\n />\n));\nPopoverArrow.displayName = PopoverPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n PopoverArrow,\n type PopoverProps,\n type PopoverTriggerProps,\n type PopoverContentProps,\n type PopoverAnchorProps,\n type PopoverArrowProps,\n};\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,sBAAsB;AAkC9B;AA1BJ,IAAM,UAA2B;AAOjC,IAAM,iBAAkC;AAOxC,IAAM,gBAAiC;AAOvC,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,MAAM,GAAG,QAC5D,oBAAkB,yBAAjB,EACC;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,eAAe,cAA+B,yBAAQ;AAOtD,IAAM,eAAqB,iBAGzB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,gBAAgB,SAAS;AAAA,IACtC,GAAG;AAAA;AACN,CACD;AACD,aAAa,cAA+B,uBAAM;","names":[]}
|
package/dist/pre.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
asChild?: boolean
|
|
5
|
-
}
|
|
3
|
+
interface PreProps extends React.HTMLAttributes<HTMLPreElement> {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Pre: React.ForwardRefExoticComponent<PreProps & React.RefAttributes<HTMLPreElement>>;
|
|
6
7
|
|
|
7
|
-
export { Pre };
|
|
8
|
+
export { Pre, type PreProps };
|
package/dist/pre.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
asChild?: boolean
|
|
5
|
-
}
|
|
3
|
+
interface PreProps extends React.HTMLAttributes<HTMLPreElement> {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Pre: React.ForwardRefExoticComponent<PreProps & React.RefAttributes<HTMLPreElement>>;
|
|
6
7
|
|
|
7
|
-
export { Pre };
|
|
8
|
+
export { Pre, type PreProps };
|
package/dist/pre.js
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
var _react = require('react'); var React = _interopRequireWildcard(_react);
|
|
3
3
|
var _reactslot = require('@radix-ui/react-slot');
|
|
4
4
|
var _jsxruntime = require('react/jsx-runtime');
|
|
5
|
-
var Pre = React.forwardRef(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
5
|
+
var Pre = React.forwardRef(
|
|
6
|
+
({ asChild, ...props }, ref) => {
|
|
7
|
+
const Comp = asChild ? _reactslot.Slot : "pre";
|
|
8
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Comp, { ref, ...props });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
9
11
|
Pre.displayName = "Pre";
|
|
10
12
|
|
|
11
13
|
|
package/dist/pre.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pre.tsx"],"names":[],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;
|
|
1
|
+
{"version":3,"sources":["../src/pre.tsx"],"names":[],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AAaV;AAJX,IAAM,MAAY;AAAA,EAChB,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC9B,UAAM,OAAO,UAAU,OAAO;AAE9B,WAAO,oBAAC,QAAK,KAAW,GAAG,OAAO;AAAA,EACpC;AACF;AACA,IAAI,cAAc","sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Pre\n * -------------------------------------------------------------------------- */\n\ninterface PreProps extends React.HTMLAttributes<HTMLPreElement> {\n asChild?: boolean;\n}\nconst Pre = React.forwardRef<HTMLPreElement, PreProps>(\n ({ asChild, ...props }, ref) => {\n const Comp = asChild ? Slot : \"pre\";\n\n return <Comp ref={ref} {...props} />;\n },\n);\nPre.displayName = \"Pre\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Pre, type PreProps };\n"]}
|
package/dist/pre.mjs
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
var Pre = React.forwardRef(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
5
|
+
var Pre = React.forwardRef(
|
|
6
|
+
({ asChild, ...props }, ref) => {
|
|
7
|
+
const Comp = asChild ? Slot : "pre";
|
|
8
|
+
return /* @__PURE__ */ jsx(Comp, { ref, ...props });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
9
11
|
Pre.displayName = "Pre";
|
|
10
12
|
export {
|
|
11
13
|
Pre
|
package/dist/pre.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pre.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Pre\n * -------------------------------------------------------------------------- */\n\
|
|
1
|
+
{"version":3,"sources":["../src/pre.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Pre\n * -------------------------------------------------------------------------- */\n\ninterface PreProps extends React.HTMLAttributes<HTMLPreElement> {\n asChild?: boolean;\n}\nconst Pre = React.forwardRef<HTMLPreElement, PreProps>(\n ({ asChild, ...props }, ref) => {\n const Comp = asChild ? Slot : \"pre\";\n\n return <Comp ref={ref} {...props} />;\n },\n);\nPre.displayName = \"Pre\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Pre, type PreProps };\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AAaV;AAJX,IAAM,MAAY;AAAA,EAChB,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC9B,UAAM,OAAO,UAAU,OAAO;AAE9B,WAAO,oBAAC,QAAK,KAAW,GAAG,OAAO;AAAA,EACpC;AACF;AACA,IAAI,cAAc;","names":[]}
|
package/dist/progress.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
3
3
|
|
|
4
|
+
type ProgressProps = ProgressPrimitive.ProgressProps;
|
|
4
5
|
declare const Progress: React.ForwardRefExoticComponent<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
6
|
|
|
6
|
-
export { Progress };
|
|
7
|
+
export { Progress, type ProgressProps };
|