@coston/ui 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -10
- package/dist/{button-CJvoztqg.js → button-BJdMtkHX.js} +3 -3
- package/dist/button-BJdMtkHX.js.map +1 -0
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +4 -4
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +3 -3
- package/dist/components/alert-dialog.js +5 -5
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +2 -2
- package/dist/components/alert.js +3 -3
- package/dist/components/alert.js.map +1 -1
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +2 -2
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.d.ts +5 -5
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +4 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +3 -3
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/button.js +2 -2
- package/dist/components/calendar.d.ts +2 -2
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/card.d.ts +4 -1
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +5 -5
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel.js +2 -2
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/checkbox.js +3 -3
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/command.d.ts +75 -10
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +3 -3
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.d.ts +2 -2
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu.js +3 -3
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.d.ts +3 -3
- package/dist/components/dialog.js +2 -2
- package/dist/components/drawer.d.ts +13 -11
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +2 -2
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +2 -2
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +3 -3
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/hover-card.js +2 -2
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +1 -1
- package/dist/components/menubar.js +4 -4
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +2 -2
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.d.ts +6 -6
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +2 -2
- package/dist/components/popover.js +2 -2
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.js +2 -2
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/resizable.d.ts +5 -5
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +4 -4
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.js +2 -2
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.js +2 -2
- package/dist/components/sheet.d.ts +6 -6
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +8 -8
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.js +5 -5
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +3 -3
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.d.ts +2 -2
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/switch.js +3 -3
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +2 -2
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +2 -2
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/toggle-group.d.ts +3 -3
- package/dist/components/toggle-group.js +2 -2
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/toggle.js +2 -2
- package/dist/components/tooltip.js +2 -2
- package/dist/{dialog-B_8jhMOs.js → dialog-COSqOqbH.js} +6 -6
- package/dist/dialog-COSqOqbH.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/{separator-9lzFsfCC.js → separator-C3mBJ8ik.js} +2 -2
- package/dist/{separator-9lzFsfCC.js.map → separator-C3mBJ8ik.js.map} +1 -1
- package/dist/{toggle-BpKiTVe4.js → toggle-CD9xIRlr.js} +3 -3
- package/dist/toggle-CD9xIRlr.js.map +1 -0
- package/dist/{tooltip-CXS6wR7g.js → tooltip-PxI7r4yP.js} +3 -3
- package/dist/tooltip-PxI7r4yP.js.map +1 -0
- package/dist/{utils-C0f9Ma6r.js → utils-CyPJ3VV3.js} +3 -2
- package/dist/utils-CyPJ3VV3.js.map +1 -0
- package/llms.txt +989 -0
- package/package.json +52 -14
- package/source.css +40 -0
- package/dist/button-CJvoztqg.js.map +0 -1
- package/dist/dialog-B_8jhMOs.js.map +0 -1
- package/dist/toggle-BpKiTVe4.js.map +0 -1
- package/dist/tooltip-CXS6wR7g.js.map +0 -1
- package/dist/utils-C0f9Ma6r.js.map +0 -1
- package/src/components/accordion.tsx +0 -51
- package/src/components/alert-dialog.tsx +0 -115
- package/src/components/alert.tsx +0 -49
- package/src/components/aspect-ratio.tsx +0 -5
- package/src/components/avatar.tsx +0 -44
- package/src/components/badge.tsx +0 -32
- package/src/components/breadcrumb.tsx +0 -101
- package/src/components/button.tsx +0 -48
- package/src/components/calendar.tsx +0 -76
- package/src/components/card.tsx +0 -60
- package/src/components/carousel.tsx +0 -240
- package/src/components/chart.tsx +0 -232
- package/src/components/checkbox.tsx +0 -25
- package/src/components/collapsible.tsx +0 -11
- package/src/components/command.tsx +0 -136
- package/src/components/context-menu.tsx +0 -187
- package/src/components/dialog.tsx +0 -105
- package/src/components/drawer.tsx +0 -98
- package/src/components/dropdown-menu.tsx +0 -185
- package/src/components/hover-card.tsx +0 -29
- package/src/components/input.tsx +0 -24
- package/src/components/label.tsx +0 -19
- package/src/components/menubar.tsx +0 -219
- package/src/components/navigation-menu.tsx +0 -120
- package/src/components/pagination.tsx +0 -98
- package/src/components/popover.tsx +0 -27
- package/src/components/progress.tsx +0 -23
- package/src/components/radio-group.tsx +0 -35
- package/src/components/resizable.tsx +0 -38
- package/src/components/scroll-area.tsx +0 -43
- package/src/components/select.tsx +0 -147
- package/src/components/separator.tsx +0 -23
- package/src/components/sheet.tsx +0 -122
- package/src/components/sidebar.tsx +0 -507
- package/src/components/skeleton.tsx +0 -7
- package/src/components/slider.tsx +0 -23
- package/src/components/sonner.tsx +0 -26
- package/src/components/switch.tsx +0 -26
- package/src/components/table.tsx +0 -95
- package/src/components/tabs.tsx +0 -53
- package/src/components/textarea.tsx +0 -20
- package/src/components/toggle-group.tsx +0 -54
- package/src/components/toggle.tsx +0 -40
- package/src/components/tooltip.tsx +0 -27
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/lib/utils.ts +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cn } from "../utils-
|
|
2
|
-
import { Button } from "../button-
|
|
3
|
-
import { Separator } from "../separator-
|
|
4
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../tooltip-
|
|
1
|
+
import { cn } from "../utils-CyPJ3VV3.js";
|
|
2
|
+
import { Button } from "../button-BJdMtkHX.js";
|
|
3
|
+
import { Separator } from "../separator-C3mBJ8ik.js";
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../tooltip-PxI7r4yP.js";
|
|
5
5
|
import { useIsMobile } from "../use-mobile-CixTQBWA.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { PanelLeft } from "lucide-react";
|
|
@@ -117,7 +117,7 @@ const Sidebar = React.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
117
117
|
className: cn("relative h-svh bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:!w-0", "group-data-[side=right]:rotate-180")
|
|
118
118
|
}), /* @__PURE__ */ jsx("div", {
|
|
119
119
|
style: { width: "var(--sidebar-width)" },
|
|
120
|
-
className: cn("fixed inset-y-0 z-10 hidden h-svh transition-[left,right,width] duration-200 ease-linear md:flex", "group-data-[collapsible=offcanvas]:!w-0", side === "left" ? "left-0 group-data-[collapsible=offcanvas]:-left-[var(--sidebar-width)]" : "right-0 group-data-[collapsible=offcanvas]:-right-[var(--sidebar-width)]", variant === "floating" || variant === "inset" ? "p-2" : "group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
|
|
120
|
+
className: cn("fixed inset-y-0 z-10 hidden h-svh transition-[left,right,width] duration-200 ease-linear md:flex", "group-data-[collapsible=offcanvas]:!w-0", side === "left" ? "left-0 group-data-[collapsible=offcanvas]:-left-[var(--sidebar-width)]" : "right-0 group-data-[collapsible=offcanvas]:-right-[var(--sidebar-width)]", variant === "floating" || variant === "inset" ? "p-2" : "group-data-[side=left]:border-r group-data-[side=right]:border-l border-border", className),
|
|
121
121
|
...props,
|
|
122
122
|
children: /* @__PURE__ */ jsx("div", {
|
|
123
123
|
"data-sidebar": "sidebar",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.js","names":["value: boolean | ((value: boolean) => boolean)","open","event: KeyboardEvent"],"sources":["../../src/components/sidebar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { PanelLeft } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { Button } from './button';\nimport { Separator } from './separator';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip';\nimport { useIsMobile } from '../hooks/use-mobile';\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state';\nconst SIDEBAR_WIDTH = '16rem';\nconst SIDEBAR_WIDTH_ICON = '3rem';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\n\ntype SidebarContext = {\n state: 'expanded' | 'collapsed';\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n};\n\nconst SidebarContext = React.createContext<SidebarContext | null>(null);\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n return context;\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = React.useState(false);\n\n const [_open, _setOpen] = React.useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value;\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n _setOpen(openState);\n }\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${60 * 60 * 24 * 7}`;\n },\n [setOpenProp, open]\n );\n\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile(open => !open) : setOpen(open => !open);\n }, [isMobile, setOpen, setOpenMobile]);\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [toggleSidebar]);\n\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = React.useMemo<SidebarContext>(\n () => ({ state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n ref={ref}\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n 'group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar',\n className\n )}\n data-collapsible={state === 'collapsed' ? 'icon' : ''}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n );\n }\n);\nSidebarProvider.displayName = 'SidebarProvider';\n\nconst Sidebar = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n collapsible?: 'offcanvas' | 'icon' | 'none';\n }\n>(\n (\n {\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <div\n className={cn('flex h-full flex-col bg-sidebar text-sidebar-foreground', className)}\n style={{ width: 'var(--sidebar-width)' }}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <>\n {openMobile && (\n <div className=\"fixed inset-0 z-50 bg-black/50\" onClick={() => setOpenMobile(false)} />\n )}\n <div\n ref={ref}\n data-variant={variant}\n style={{ width: 'var(--sidebar-width)' }}\n className={cn(\n 'fixed inset-y-0 z-50 flex h-svh flex-col bg-sidebar text-sidebar-foreground transition-transform duration-200',\n side === 'left' ? 'left-0' : 'right-0',\n openMobile\n ? 'translate-x-0'\n : side === 'left'\n ? '-translate-x-full'\n : 'translate-x-full',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </>\n );\n }\n\n return (\n <div\n ref={ref}\n className=\"group peer hidden md:block text-sidebar-foreground\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n >\n {/* Gap on side to keep layout */}\n <div\n style={{ width: 'var(--sidebar-width)' }}\n className={cn(\n 'relative h-svh bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:!w-0',\n 'group-data-[side=right]:rotate-180'\n )}\n />\n <div\n style={{ width: 'var(--sidebar-width)' }}\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh transition-[left,right,width] duration-200 ease-linear md:flex',\n 'group-data-[collapsible=offcanvas]:!w-0',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:-left-[var(--sidebar-width)]'\n : 'right-0 group-data-[collapsible=offcanvas]:-right-[var(--sidebar-width)]',\n variant === 'floating' || variant === 'inset'\n ? 'p-2'\n : 'group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n }\n);\nSidebar.displayName = 'Sidebar';\n\nconst SidebarTrigger = React.forwardRef<\n React.ComponentRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('h-6 w-6 text-muted-foreground', className)}\n onClick={event => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n});\nSidebarTrigger.displayName = 'SidebarTrigger';\n\nconst SidebarInset = React.forwardRef<HTMLDivElement, React.ComponentProps<'main'>>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n 'relative flex min-h-svh flex-1 flex-col bg-background',\n 'peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow md:peer-data-[variant=inset]:border md:peer-data-[variant=inset]:border-sidebar-border',\n className\n )}\n {...props}\n />\n );\n }\n);\nSidebarInset.displayName = 'SidebarInset';\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n);\nSidebarHeader.displayName = 'SidebarHeader';\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n);\nSidebarFooter.displayName = 'SidebarFooter';\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n);\nSidebarContent.displayName = 'SidebarContent';\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn('relative flex w-full min-w-0 flex-col p-2', className)}\n {...props}\n />\n )\n);\nSidebarGroup.displayName = 'SidebarGroup';\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n );\n});\nSidebarGroupLabel.displayName = 'SidebarGroupLabel';\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn('w-full text-sm', className)}\n {...props}\n />\n )\n);\nSidebarGroupContent.displayName = 'SidebarGroupContent';\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, React.ComponentProps<'ul'>>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n )\n);\nSidebarMenu.displayName = 'SidebarMenu';\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(\n ({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n);\nSidebarMenuItem.displayName = 'SidebarMenuItem';\n\nconst sidebarMenuButtonVariants = {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n};\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'> & {\n asChild?: boolean;\n isActive?: boolean;\n variant?: 'default' | 'outline';\n tooltip?: string | React.ComponentProps<typeof TooltipContent>;\n size?: 'default' | 'sm' | 'lg';\n }\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : 'button';\n const { isMobile, state } = useSidebar();\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n data-slot=\"sidebar-menu-button\"\n className={cn(\n 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-primary data-[active=true]:font-medium data-[active=true]:text-sidebar-primary-foreground data-[active=true]:hover:bg-sidebar-primary/90 data-[active=true]:hover:text-sidebar-primary-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n size === 'sm' && 'text-xs',\n size === 'lg' &&\n 'group-data-[collapsible=icon]:!p-0 data-[size=lg]:h-12 data-[size=lg]:text-sm',\n sidebarMenuButtonVariants[variant],\n className\n )}\n {...props}\n />\n );\n\n if (!tooltip) return button;\n\n const tooltipProps = typeof tooltip === 'string' ? { children: tooltip } : tooltip;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed' || isMobile}\n {...tooltipProps}\n />\n </Tooltip>\n );\n }\n);\nSidebarMenuButton.displayName = 'SidebarMenuButton';\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'> & {\n asChild?: boolean;\n showOnHover?: boolean;\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0',\n className\n )}\n {...props}\n />\n );\n});\nSidebarMenuAction.displayName = 'SidebarMenuAction';\n\nconst SidebarSeparator = React.forwardRef<\n React.ComponentRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn('mx-2 w-auto bg-sidebar-border', className)}\n {...props}\n />\n));\nSidebarSeparator.displayName = 'SidebarSeparator';\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n};\n"],"mappings":";;;;;;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AAQ,WACjB,SAAS,QACP,iFACF,0BAA0B,UAC1B,UACD;EACD,GAAI;GACJ;AAGJ,MAAK,QAAS,QAAO;CAErB,MAAM,sBAAsB,YAAY,WAAW,EAAE,UAAU,QAAS,IAAG;AAE3E,wBACE,KAAC,sCACC,IAAC;EAAe;YAAS;GAAwB,kBACjD,IAAC;EACC,MAAK;EACL,OAAM;EACN,QAAQ,UAAU,eAAe;EACjC,GAAI;GACJ,IACM;AAEb,EACF;AACD,kBAAkB,cAAc;AAEhC,MAAM,oBAAoB,MAAM,WAM9B,CAAC,EAAE,WAAW,UAAU,OAAO,cAAc,MAAO,GAAG,OAAO,EAAE,QAAQ;CACxE,MAAM,OAAO,UAAU,OAAO;AAE9B,wBACE,IAAC;EACM;EACL,gBAAa;EACb,WAAW,GACT,kVACA,iDACA,wCACA,eACE,4LACF,UACD;EACD,GAAI;GACJ;AAEL,EAAC;AACF,kBAAkB,cAAc;AAEhC,MAAM,mBAAmB,MAAM,WAG7B,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC;CACM;CACL,gBAAa;CACb,WAAW,GAAG,iCAAiC,UAAU;CACzD,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc"}
|
|
1
|
+
{"version":3,"file":"sidebar.js","names":["value: boolean | ((value: boolean) => boolean)","open","event: KeyboardEvent"],"sources":["../../src/components/sidebar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { PanelLeft } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { Button } from './button';\nimport { Separator } from './separator';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip';\nimport { useIsMobile } from '../hooks/use-mobile';\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state';\nconst SIDEBAR_WIDTH = '16rem';\nconst SIDEBAR_WIDTH_ICON = '3rem';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\n\ntype SidebarContext = {\n state: 'expanded' | 'collapsed';\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n};\n\nconst SidebarContext = React.createContext<SidebarContext | null>(null);\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n return context;\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = React.useState(false);\n\n const [_open, _setOpen] = React.useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value;\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n _setOpen(openState);\n }\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${60 * 60 * 24 * 7}`;\n },\n [setOpenProp, open]\n );\n\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile(open => !open) : setOpen(open => !open);\n }, [isMobile, setOpen, setOpenMobile]);\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [toggleSidebar]);\n\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = React.useMemo<SidebarContext>(\n () => ({ state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n ref={ref}\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n 'group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar',\n className\n )}\n data-collapsible={state === 'collapsed' ? 'icon' : ''}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n );\n }\n);\nSidebarProvider.displayName = 'SidebarProvider';\n\nconst Sidebar = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n collapsible?: 'offcanvas' | 'icon' | 'none';\n }\n>(\n (\n {\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <div\n className={cn('flex h-full flex-col bg-sidebar text-sidebar-foreground', className)}\n style={{ width: 'var(--sidebar-width)' }}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <>\n {openMobile && (\n <div className=\"fixed inset-0 z-50 bg-black/50\" onClick={() => setOpenMobile(false)} />\n )}\n <div\n ref={ref}\n data-variant={variant}\n style={{ width: 'var(--sidebar-width)' }}\n className={cn(\n 'fixed inset-y-0 z-50 flex h-svh flex-col bg-sidebar text-sidebar-foreground transition-transform duration-200',\n side === 'left' ? 'left-0' : 'right-0',\n openMobile\n ? 'translate-x-0'\n : side === 'left'\n ? '-translate-x-full'\n : 'translate-x-full',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </>\n );\n }\n\n return (\n <div\n ref={ref}\n className=\"group peer hidden md:block text-sidebar-foreground\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n >\n {/* Gap on side to keep layout */}\n <div\n style={{ width: 'var(--sidebar-width)' }}\n className={cn(\n 'relative h-svh bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:!w-0',\n 'group-data-[side=right]:rotate-180'\n )}\n />\n <div\n style={{ width: 'var(--sidebar-width)' }}\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh transition-[left,right,width] duration-200 ease-linear md:flex',\n 'group-data-[collapsible=offcanvas]:!w-0',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:-left-[var(--sidebar-width)]'\n : 'right-0 group-data-[collapsible=offcanvas]:-right-[var(--sidebar-width)]',\n variant === 'floating' || variant === 'inset'\n ? 'p-2'\n : 'group-data-[side=left]:border-r group-data-[side=right]:border-l border-border',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n }\n);\nSidebar.displayName = 'Sidebar';\n\nconst SidebarTrigger = React.forwardRef<\n React.ComponentRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('h-6 w-6 text-muted-foreground', className)}\n onClick={event => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n});\nSidebarTrigger.displayName = 'SidebarTrigger';\n\nconst SidebarInset = React.forwardRef<HTMLDivElement, React.ComponentProps<'main'>>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n 'relative flex min-h-svh flex-1 flex-col bg-background',\n 'peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow md:peer-data-[variant=inset]:border md:peer-data-[variant=inset]:border-sidebar-border',\n className\n )}\n {...props}\n />\n );\n }\n);\nSidebarInset.displayName = 'SidebarInset';\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n);\nSidebarHeader.displayName = 'SidebarHeader';\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n);\nSidebarFooter.displayName = 'SidebarFooter';\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n);\nSidebarContent.displayName = 'SidebarContent';\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn('relative flex w-full min-w-0 flex-col p-2', className)}\n {...props}\n />\n )\n);\nSidebarGroup.displayName = 'SidebarGroup';\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n );\n});\nSidebarGroupLabel.displayName = 'SidebarGroupLabel';\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn('w-full text-sm', className)}\n {...props}\n />\n )\n);\nSidebarGroupContent.displayName = 'SidebarGroupContent';\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, React.ComponentProps<'ul'>>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n )\n);\nSidebarMenu.displayName = 'SidebarMenu';\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(\n ({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n);\nSidebarMenuItem.displayName = 'SidebarMenuItem';\n\nconst sidebarMenuButtonVariants = {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n};\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'> & {\n asChild?: boolean;\n isActive?: boolean;\n variant?: 'default' | 'outline';\n tooltip?: string | React.ComponentProps<typeof TooltipContent>;\n size?: 'default' | 'sm' | 'lg';\n }\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : 'button';\n const { isMobile, state } = useSidebar();\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n data-slot=\"sidebar-menu-button\"\n className={cn(\n 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-primary data-[active=true]:font-medium data-[active=true]:text-sidebar-primary-foreground data-[active=true]:hover:bg-sidebar-primary/90 data-[active=true]:hover:text-sidebar-primary-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n size === 'sm' && 'text-xs',\n size === 'lg' &&\n 'group-data-[collapsible=icon]:!p-0 data-[size=lg]:h-12 data-[size=lg]:text-sm',\n sidebarMenuButtonVariants[variant],\n className\n )}\n {...props}\n />\n );\n\n if (!tooltip) return button;\n\n const tooltipProps = typeof tooltip === 'string' ? { children: tooltip } : tooltip;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed' || isMobile}\n {...tooltipProps}\n />\n </Tooltip>\n );\n }\n);\nSidebarMenuButton.displayName = 'SidebarMenuButton';\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'> & {\n asChild?: boolean;\n showOnHover?: boolean;\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0',\n className\n )}\n {...props}\n />\n );\n});\nSidebarMenuAction.displayName = 'SidebarMenuAction';\n\nconst SidebarSeparator = React.forwardRef<\n React.ComponentRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn('mx-2 w-auto bg-sidebar-border', className)}\n {...props}\n />\n));\nSidebarSeparator.displayName = 'SidebarSeparator';\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n};\n"],"mappings":";;;;;;;;;;;AASA,MAAM,sBAAsB;AAC5B,MAAM,gBAAgB;AACtB,MAAM,qBAAqB;AAC3B,MAAM,4BAA4B;AAYlC,MAAM,iBAAiB,MAAM,cAAqC,KAAK;AAEvE,SAAS,aAAa;CACpB,MAAM,UAAU,MAAM,WAAW,eAAe;AAChD,MAAK,QACH,OAAM,IAAI,MAAM;AAElB,QAAO;AACR;AAED,MAAM,kBAAkB,MAAM,WA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AAI;GACJ,IACM;AAEb,EACF;AACD,kBAAkB,cAAc;AAEhC,MAAM,oBAAoB,MAAM,WAM9B,CAAC,EAAE,WAAW,UAAU,OAAO,cAAc,MAAO,GAAG,OAAO,EAAE,QAAQ;CACxE,MAAM,OAAO,UAAU,OAAO;AAE9B,wBACE,IAAC;EACM;EACL,gBAAa;EACb,WAAW,GACT,kVACA,iDACA,wCACA,eACE,4LACF,UACD;EACD,GAAI;GACJ;AAEL,EAAC;AACF,kBAAkB,cAAc;AAEhC,MAAM,mBAAmB,MAAM,WAG7B,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC;CACM;CACL,gBAAa;CACb,WAAW,GAAG,iCAAiC,UAAU;CACzD,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/skeleton.d.ts
|
|
4
4
|
declare function Skeleton({
|
|
5
5
|
className,
|
|
6
6
|
...props
|
|
7
|
-
}: React.HTMLAttributes<HTMLDivElement>):
|
|
7
|
+
}: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime14.JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Skeleton };
|
|
10
10
|
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "../utils-
|
|
1
|
+
import { cn } from "../utils-CyPJ3VV3.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
@@ -10,8 +10,8 @@ const Slider = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */
|
|
|
10
10
|
...props,
|
|
11
11
|
children: [/* @__PURE__ */ jsx(SliderPrimitive.Track, {
|
|
12
12
|
className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",
|
|
13
|
-
children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" })
|
|
14
|
-
}), /* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-
|
|
13
|
+
children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary transition-all duration-150 ease-out" })
|
|
14
|
+
}), /* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-[color,background-color,box-shadow] duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })]
|
|
15
15
|
}));
|
|
16
16
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
17
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","names":[],"sources":["../../src/components/slider.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as SliderPrimitive from '@radix-ui/react-slider';\n\nimport { cn } from '../lib/utils';\n\nconst Slider = React.forwardRef<\n React.ElementRef<typeof SliderPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <SliderPrimitive.Root\n ref={ref}\n className={cn('relative flex w-full touch-none select-none items-center', className)}\n {...props}\n >\n <SliderPrimitive.Track className=\"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary\">\n <SliderPrimitive.Range className=\"absolute h-full bg-primary\" />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb className=\"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-
|
|
1
|
+
{"version":3,"file":"slider.js","names":[],"sources":["../../src/components/slider.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as SliderPrimitive from '@radix-ui/react-slider';\n\nimport { cn } from '../lib/utils';\n\nconst Slider = React.forwardRef<\n React.ElementRef<typeof SliderPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <SliderPrimitive.Root\n ref={ref}\n className={cn('relative flex w-full touch-none select-none items-center', className)}\n {...props}\n >\n <SliderPrimitive.Track className=\"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary\">\n <SliderPrimitive.Range className=\"absolute h-full bg-primary transition-all duration-150 ease-out\" />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb className=\"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-[color,background-color,box-shadow] duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\" />\n </SliderPrimitive.Root>\n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n"],"mappings":";;;;;;AAKA,MAAM,SAAS,MAAM,WAGnB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,KAAC,gBAAgB;CACV;CACL,WAAW,GAAG,4DAA4D,UAAU;CACpF,GAAI;4BAEJ,IAAC,gBAAgB;EAAM,WAAU;4BAC/B,IAAC,gBAAgB,SAAM,WAAU,oEAAoE;GAC/E,kBACxB,IAAC,gBAAgB,SAAM,WAAU,6SAA6S;EACzT,CACvB;AACF,OAAO,cAAc,gBAAgB,KAAK"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
import { Toaster as Toaster$1 } from "sonner";
|
|
3
3
|
|
|
4
4
|
//#region src/components/sonner.d.ts
|
|
5
5
|
type ToasterProps = React.ComponentProps<typeof Toaster$1>;
|
|
6
6
|
declare const Toaster: ({
|
|
7
7
|
...props
|
|
8
|
-
}: ToasterProps) =>
|
|
8
|
+
}: ToasterProps) => react_jsx_runtime4.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Toaster };
|
|
11
11
|
//# sourceMappingURL=sonner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sonner.d.ts","names":[],"sources":["../../src/components/sonner.tsx"],"sourcesContent":[],"mappings":";;;;KAEK,YAAA,GAAe,KAAA,CAAM,sBAAsB;cAE1C;;GAAyB,iBAAY,
|
|
1
|
+
{"version":3,"file":"sonner.d.ts","names":[],"sources":["../../src/components/sonner.tsx"],"sourcesContent":[],"mappings":";;;;KAEK,YAAA,GAAe,KAAA,CAAM,sBAAsB;cAE1C;;GAAyB,iBAAY,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { cn } from "../utils-
|
|
1
|
+
import { cn } from "../utils-CyPJ3VV3.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
5
5
|
|
|
6
6
|
//#region src/components/switch.tsx
|
|
7
7
|
const Switch = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(SwitchPrimitives.Root, {
|
|
8
|
-
className: cn("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className),
|
|
8
|
+
className: cn("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className),
|
|
9
9
|
...props,
|
|
10
10
|
ref,
|
|
11
|
-
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
|
|
11
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform duration-200 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
|
|
12
12
|
}));
|
|
13
13
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","names":[],"sources":["../../src/components/switch.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as SwitchPrimitives from '@radix-ui/react-switch';\nimport { cn } from '../lib/utils';\n\nconst Switch = React.forwardRef<\n React.ComponentRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n 'peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',\n className\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n 'pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0'\n )}\n />\n </SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n"],"mappings":";;;;;;AAIA,MAAM,SAAS,MAAM,WAGnB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,iBAAiB;CAChB,WAAW,GACT,
|
|
1
|
+
{"version":3,"file":"switch.js","names":[],"sources":["../../src/components/switch.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as SwitchPrimitives from '@radix-ui/react-switch';\nimport { cn } from '../lib/utils';\n\nconst Switch = React.forwardRef<\n React.ComponentRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n 'peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',\n className\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n 'pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform duration-200 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0'\n )}\n />\n </SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n"],"mappings":";;;;;;AAIA,MAAM,SAAS,MAAM,WAGnB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,iBAAiB;CAChB,WAAW,GACT,mYACA,UACD;CACD,GAAI;CACC;2BAEL,IAAC,iBAAiB,SAChB,WAAW,GACT,0LACD,GACD;EACoB,CACxB;AACF,OAAO,cAAc,iBAAiB,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","names":[],"sources":["../../src/components/table.tsx"],"sourcesContent":[],"mappings":";;;cAGM,OAAK,KAAA,CAAA,0BAAA,KAAA,CAAA,eAAA,oBAAA,KAAA,CAAA,cAAA;cASL,aAAW,KAAA,CAAA,0BAAA,KAAA,CAAA,eAAA,2BAAA,KAAA,CAAA,cAAA;AAZc,cAwBzB,SAfL,EAec,KAAA,CAAA,yBAfd,CAec,KAAA,CAAA,cAfd,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sFO,KAAA,CAAA,cAtFP,CAsFO,uBAtFP,CAAA,GAsFO,KAAA,CAAA,aAtFP,CAsFO,uBAtFP,CAAA,CAAA"}
|
package/dist/components/table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "../utils-
|
|
1
|
+
import { cn } from "../utils-CyPJ3VV3.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
|
|
@@ -26,7 +26,7 @@ const TableBody = React.forwardRef(({ className,...props }, ref) => /* @__PURE__
|
|
|
26
26
|
TableBody.displayName = "TableBody";
|
|
27
27
|
const TableFooter = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("tfoot", {
|
|
28
28
|
ref,
|
|
29
|
-
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
29
|
+
className: cn("border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
30
30
|
...props
|
|
31
31
|
}));
|
|
32
32
|
TableFooter.displayName = "TableFooter";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","names":[],"sources":["../../src/components/table.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nconst Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n )\n);\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead\n ref={ref}\n className={cn('[&_tr]:border-b [&_tr]:border-border/50', className)}\n {...props}\n />\n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />\n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0'
|
|
1
|
+
{"version":3,"file":"table.js","names":[],"sources":["../../src/components/table.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nconst Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n )\n);\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead\n ref={ref}\n className={cn('[&_tr]:border-b [&_tr]:border-border/50', className)}\n {...props}\n />\n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />\n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n 'border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0',\n className\n )}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n 'border-b border-border/50 transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',\n className\n )}\n {...props}\n />\n )\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n 'h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0',\n className\n )}\n {...props}\n />\n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n data-slot=\"table-cell\"\n className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)}\n {...props}\n />\n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={cn('mt-4 text-sm text-muted-foreground', className)} {...props} />\n));\nTableCaption.displayName = 'TableCaption';\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n"],"mappings":";;;;;AAGA,MAAM,QAAQ,MAAM,WAClB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CAAI,WAAU;2BACb,IAAC;EAAW;EAAK,WAAW,GAAG,iCAAiC,UAAU;EAAE,GAAI;GAAS;EACrF,CAET;AACD,MAAM,cAAc;AAEpB,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC;CACM;CACL,WAAW,GAAG,2CAA2C,UAAU;CACnE,GAAI;EACJ,CACF;AACF,YAAY,cAAc;AAE1B,MAAM,YAAY,MAAM,WAGtB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC;CAAW;CAAK,WAAW,GAAG,8BAA8B,UAAU;CAAE,GAAI;EAAS,CACtF;AACF,UAAU,cAAc;AAExB,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC;CACM;CACL,WAAW,GACT,yEACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc;AAE1B,MAAM,WAAW,MAAM,WACrB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CACM;CACL,WAAW,GACT,gGACA,UACD;CACD,GAAI;EACJ,CAEL;AACD,SAAS,cAAc;AAEvB,MAAM,YAAY,MAAM,WAGtB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC;CACM;CACL,WAAW,GACT,oGACA,UACD;CACD,GAAI;EACJ,CACF;AACF,UAAU,cAAc;AAExB,MAAM,YAAY,MAAM,WAGtB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC;CACM;CACL,aAAU;CACV,WAAW,GAAG,kDAAkD,UAAU;CAC1E,GAAI;EACJ,CACF;AACF,UAAU,cAAc;AAExB,MAAM,eAAe,MAAM,WAGzB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC;CAAa;CAAK,WAAW,GAAG,sCAAsC,UAAU;CAAE,GAAI;EAAS,CAChG;AACF,aAAa,cAAc"}
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "../utils-
|
|
1
|
+
import { cn } from "../utils-CyPJ3VV3.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
@@ -19,7 +19,7 @@ const TabsTrigger = React.forwardRef(({ className,...props }, ref) => /* @__PURE
|
|
|
19
19
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
20
20
|
const TabsContent = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, {
|
|
21
21
|
ref,
|
|
22
|
-
className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className),
|
|
22
|
+
className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:duration-200", className),
|
|
23
23
|
...props
|
|
24
24
|
}));
|
|
25
25
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","names":[],"sources":["../../src/components/tabs.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '../lib/utils';\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n 'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',\n className\n )}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n 'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',\n className\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n 'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',\n className\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"mappings":";;;;;;AAKA,MAAM,OAAO,cAAc;AAE3B,MAAM,WAAW,MAAM,WAGrB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,cAAc;CACR;CACL,WAAW,GACT,8FACA,UACD;CACD,GAAI;EACJ,CACF;AACF,SAAS,cAAc,cAAc,KAAK;AAE1C,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,cAAc;CACR;CACL,WAAW,GACT,uYACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,cAAc,QAAQ;AAEhD,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,cAAc;CACR;CACL,WAAW,GACT,
|
|
1
|
+
{"version":3,"file":"tabs.js","names":[],"sources":["../../src/components/tabs.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '../lib/utils';\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n 'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',\n className\n )}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n 'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',\n className\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n 'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:duration-200',\n className\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"mappings":";;;;;;AAKA,MAAM,OAAO,cAAc;AAE3B,MAAM,WAAW,MAAM,WAGrB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,cAAc;CACR;CACL,WAAW,GACT,8FACA,UACD;CACD,GAAI;EACJ,CACF;AACF,SAAS,cAAc,cAAc,KAAK;AAE1C,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,cAAc;CACR;CACL,WAAW,GACT,uYACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,cAAc,QAAQ;AAEhD,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,cAAc;CACR;CACL,WAAW,GACT,iOACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,cAAc,QAAQ"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
4
|
-
import * as
|
|
4
|
+
import * as class_variance_authority_types4 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region src/components/toggle-group.d.ts
|
|
7
7
|
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
8
8
|
variant?: "default" | "outline" | null | undefined;
|
|
9
9
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
-
} &
|
|
10
|
+
} & class_variance_authority_types4.ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
12
12
|
variant?: "default" | "outline" | null | undefined;
|
|
13
13
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
14
|
-
} &
|
|
14
|
+
} & class_variance_authority_types4.ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { ToggleGroup, ToggleGroupItem };
|
|
17
17
|
//# sourceMappingURL=toggle-group.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn } from "../utils-
|
|
2
|
-
import { toggleVariants } from "../toggle-
|
|
1
|
+
import { cn } from "../utils-CyPJ3VV3.js";
|
|
2
|
+
import { toggleVariants } from "../toggle-CD9xIRlr.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
4
|
-
import * as
|
|
4
|
+
import * as class_variance_authority_types2 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region src/components/toggle.d.ts
|
|
7
7
|
declare const toggleVariants: (props?: ({
|
|
8
8
|
variant?: "default" | "outline" | null | undefined;
|
|
9
9
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
-
} &
|
|
10
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
11
11
|
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
12
12
|
variant?: "default" | "outline" | null | undefined;
|
|
13
13
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
14
|
-
} &
|
|
14
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { Toggle, toggleVariants };
|
|
17
17
|
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../utils-
|
|
2
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../tooltip-
|
|
1
|
+
import "../utils-CyPJ3VV3.js";
|
|
2
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../tooltip-PxI7r4yP.js";
|
|
3
3
|
|
|
4
4
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "./utils-
|
|
1
|
+
import { cn, overlayBorder } from "./utils-CyPJ3VV3.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { X } from "lucide-react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -17,10 +17,10 @@ const DialogOverlay = React.forwardRef(({ className,...props }, ref) => /* @__PU
|
|
|
17
17
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
18
18
|
const DialogContent = React.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
19
19
|
ref,
|
|
20
|
-
className: cn(
|
|
20
|
+
className: cn(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 ${overlayBorder} bg-popover p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`, className),
|
|
21
21
|
...props,
|
|
22
22
|
children: [children, /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
23
|
-
className: "absolute right-4 top-4 rounded-
|
|
23
|
+
className: "absolute right-4 top-4 inline-flex h-10 w-10 items-center justify-center rounded-md opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
24
24
|
children: [/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
25
25
|
className: "sr-only",
|
|
26
26
|
children: "Close"
|
|
@@ -40,17 +40,17 @@ const DialogFooter = ({ className,...props }) => /* @__PURE__ */ jsx("div", {
|
|
|
40
40
|
DialogFooter.displayName = "DialogFooter";
|
|
41
41
|
const DialogTitle = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
42
42
|
ref,
|
|
43
|
-
className: cn("text-lg font-semibold leading-none tracking-tight text-popover-foreground", className),
|
|
43
|
+
className: cn("text-lg font-semibold leading-none tracking-tight text-popover-foreground text-balance", className),
|
|
44
44
|
...props
|
|
45
45
|
}));
|
|
46
46
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
47
47
|
const DialogDescription = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
48
48
|
ref,
|
|
49
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
49
|
+
className: cn("text-sm text-muted-foreground text-pretty", className),
|
|
50
50
|
...props
|
|
51
51
|
}));
|
|
52
52
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
53
53
|
|
|
54
54
|
//#endregion
|
|
55
55
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
56
|
-
//# sourceMappingURL=dialog-
|
|
56
|
+
//# sourceMappingURL=dialog-COSqOqbH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-COSqOqbH.js","names":[],"sources":["../src/components/dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X } from 'lucide-react';\n\nimport { cn, overlayBorder } from '../lib/utils';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n `fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 ${overlayBorder} bg-popover p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 inline-flex h-10 w-10 items-center justify-center rounded-md opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n 'text-lg font-semibold leading-none tracking-tight text-popover-foreground text-balance',\n className\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground text-pretty', className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":";;;;;;;AAMA,MAAM,SAAS,gBAAgB;AAE/B,MAAM,gBAAgB,gBAAgB;AAEtC,MAAM,eAAe,gBAAgB;AAErC,MAAM,cAAc,gBAAgB;AAEpC,MAAM,gBAAgB,MAAM,WAG1B,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,gBAAgB;CACV;CACL,WAAW,GACT,gLACA,UACD;CACD,GAAI;EACJ,CACF;AACF,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,MAAM,gBAAgB,MAAM,WAG1B,CAAC,EAAE,WAAW,SAAU,GAAG,OAAO,EAAE,wBACpC,KAAC,2CACC,IAAC,kBAAgB,kBACjB,KAAC,gBAAgB;CACV;CACL,WAAW,IACR,mGAAmG,cAAc,oZAClH,UACD;CACD,GAAI;YAEH,0BACD,KAAC,gBAAgB;EAAM,WAAU;6BAC/B,IAAC,KAAE,WAAU,YAAY,kBACzB,IAAC;GAAK,WAAU;aAAU;IAAY;GAChB;EACA,IACb,CACf;AACF,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,MAAM,eAAe,CAAC,EAAE,UAAW,GAAG,OAA6C,qBACjF,IAAC;CAAI,WAAW,GAAG,sDAAsD,UAAU;CAAE,GAAI;EAAS;AAEpG,aAAa,cAAc;AAE3B,MAAM,eAAe,CAAC,EAAE,UAAW,GAAG,OAA6C,qBACjF,IAAC;CACC,WAAW,GAAG,iEAAiE,UAAU;CACzF,GAAI;EACJ;AAEJ,aAAa,cAAc;AAE3B,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,gBAAgB;CACV;CACL,WAAW,GACT,0FACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,gBAAgB,MAAM;AAEhD,MAAM,oBAAoB,MAAM,WAG9B,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC,gBAAgB;CACV;CACL,WAAW,GAAG,6CAA6C,UAAU;CACrE,GAAI;EACJ,CACF;AACF,kBAAkB,cAAc,gBAAgB,YAAY"}
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { ClassValue } from "clsx";
|
|
|
2
2
|
|
|
3
3
|
//#region src/lib/utils.d.ts
|
|
4
4
|
declare function cn(...inputs: ClassValue[]): string;
|
|
5
|
+
declare const overlayBorder = "border border-border";
|
|
5
6
|
//# sourceMappingURL=utils.d.ts.map
|
|
6
7
|
|
|
7
8
|
//#endregion
|
|
8
|
-
export { cn };
|
|
9
|
+
export { cn, overlayBorder };
|
|
9
10
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/lib/utils.ts"],"sourcesContent":[],"mappings":";;;iBAGgB,EAAA,YAAc"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/lib/utils.ts"],"sourcesContent":[],"mappings":";;;iBAGgB,EAAA,YAAc;cAKjB,aAAA;AALb"}
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { cn } from "../utils-
|
|
1
|
+
import { cn, overlayBorder } from "../utils-CyPJ3VV3.js";
|
|
2
2
|
|
|
3
|
-
export { cn };
|
|
3
|
+
export { cn, overlayBorder };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "./utils-
|
|
1
|
+
import { cn } from "./utils-CyPJ3VV3.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
@@ -15,4 +15,4 @@ Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
17
17
|
export { Separator };
|
|
18
|
-
//# sourceMappingURL=separator-
|
|
18
|
+
//# sourceMappingURL=separator-C3mBJ8ik.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator-
|
|
1
|
+
{"version":3,"file":"separator-C3mBJ8ik.js","names":[],"sources":["../src/components/separator.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport { cn } from '../lib/utils';\n\nconst Separator = React.forwardRef<\n React.ComponentRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'shrink-0 bg-border',\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\n className\n )}\n {...props}\n />\n));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"],"mappings":";;;;;;AAIA,MAAM,YAAY,MAAM,WAGtB,CAAC,EAAE,WAAW,cAAc,cAAc,aAAa,KAAM,GAAG,OAAO,EAAE,wBACzE,IAAC,mBAAmB;CACb;CACO;CACC;CACb,WAAW,GACT,sBACA,gBAAgB,eAAe,mBAAmB,kBAClD,UACD;CACD,GAAI;EACJ,CACF;AACF,UAAU,cAAc,mBAAmB,KAAK"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { cn } from "./utils-
|
|
1
|
+
import { cn } from "./utils-CyPJ3VV3.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
6
6
|
|
|
7
7
|
//#region src/components/toggle.tsx
|
|
8
|
-
const toggleVariants = cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-
|
|
8
|
+
const toggleVariants = cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition active:scale-[0.96] hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-transparent",
|
|
@@ -35,4 +35,4 @@ Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
export { Toggle, toggleVariants };
|
|
38
|
-
//# sourceMappingURL=toggle-
|
|
38
|
+
//# sourceMappingURL=toggle-CD9xIRlr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-CD9xIRlr.js","names":[],"sources":["../src/components/toggle.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\n\nconst toggleVariants = cva(\n 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition active:scale-[0.96] hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline: 'border border-input bg-transparent hover:bg-accent hover:text-accent-foreground',\n },\n size: {\n default: 'h-10 px-3 min-w-10',\n sm: 'h-9 px-2.5 min-w-9',\n lg: 'h-11 px-5 min-w-11',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nconst Toggle = React.forwardRef<\n React.ComponentRef<typeof TogglePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root\n ref={ref}\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n"],"mappings":";;;;;;;AAKA,MAAM,iBAAiB,IACrB,icACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SAAS;EACV;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;EACL;CACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;CACP;AACF,EACF;AAED,MAAM,SAAS,MAAM,WAGnB,CAAC,EAAE,WAAW,SAAS,KAAM,GAAG,OAAO,EAAE,wBACzC,IAAC,gBAAgB;CACV;CACL,WAAW,GAAG,eAAe;EAAE;EAAS;EAAM;CAAW,EAAC,CAAC;CAC3D,GAAI;EACJ,CACF;AAEF,OAAO,cAAc,gBAAgB,KAAK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "./utils-
|
|
1
|
+
import { cn, overlayBorder } from "./utils-CyPJ3VV3.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
@@ -10,11 +10,11 @@ const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
|
10
10
|
const TooltipContent = React.forwardRef(({ className, sideOffset = 4,...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
|
|
11
11
|
ref,
|
|
12
12
|
sideOffset,
|
|
13
|
-
className: cn(
|
|
13
|
+
className: cn(`z-50 overflow-hidden rounded-md ${overlayBorder} bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md duration-150 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`, className),
|
|
14
14
|
...props
|
|
15
15
|
}) }));
|
|
16
16
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
20
|
-
//# sourceMappingURL=tooltip-
|
|
20
|
+
//# sourceMappingURL=tooltip-PxI7r4yP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip-PxI7r4yP.js","names":[],"sources":["../src/components/tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn, overlayBorder } from '../lib/utils';\n\nconst TooltipProvider = TooltipPrimitive.Provider;\nconst Tooltip = TooltipPrimitive.Root;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\nconst TooltipContent = React.forwardRef<\n React.ComponentRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n `z-50 overflow-hidden rounded-md ${overlayBorder} bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md duration-150 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"mappings":";;;;;;AAIA,MAAM,kBAAkB,iBAAiB;AACzC,MAAM,UAAU,iBAAiB;AACjC,MAAM,iBAAiB,iBAAiB;AAExC,MAAM,iBAAiB,MAAM,WAG3B,CAAC,EAAE,WAAW,aAAa,EAAG,GAAG,OAAO,EAAE,wBAC1C,IAAC,iBAAiB,oCAChB,IAAC,iBAAiB;CACX;CACO;CACZ,WAAW,IACR,kCAAkC,cAAc,gNACjD,UACD;CACD,GAAI;EACJ,GACsB,CAC1B;AACF,eAAe,cAAc,iBAAiB,QAAQ"}
|
|
@@ -5,7 +5,8 @@ import { twMerge } from "tailwind-merge";
|
|
|
5
5
|
function cn(...inputs) {
|
|
6
6
|
return twMerge(clsx(inputs));
|
|
7
7
|
}
|
|
8
|
+
const overlayBorder = "border border-border";
|
|
8
9
|
|
|
9
10
|
//#endregion
|
|
10
|
-
export { cn };
|
|
11
|
-
//# sourceMappingURL=utils-
|
|
11
|
+
export { cn, overlayBorder };
|
|
12
|
+
//# sourceMappingURL=utils-CyPJ3VV3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-CyPJ3VV3.js","names":[],"sources":["../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n// Shared border token for all floating overlay surfaces (dropdowns, popovers, dialogs, etc.)\nexport const overlayBorder = 'border border-border';\n"],"mappings":";;;;AAGA,SAAgB,GAAG,GAAG,QAAsB;AAC1C,QAAO,QAAQ,KAAK,OAAO,CAAC;AAC7B;AAGD,MAAa,gBAAgB"}
|