@kubetail/ui 2.0.3 → 2.0.4-rc1

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.
Files changed (98) hide show
  1. package/dist/_virtual/rolldown:runtime.cjs +1 -0
  2. package/dist/elements/button.cjs +2 -2
  3. package/dist/elements/button.cjs.map +1 -1
  4. package/dist/elements/button.js +39 -42
  5. package/dist/elements/button.js.map +1 -1
  6. package/dist/elements/calendar.cjs +2 -2
  7. package/dist/elements/calendar.cjs.map +1 -1
  8. package/dist/elements/calendar.js +23 -27
  9. package/dist/elements/calendar.js.map +1 -1
  10. package/dist/elements/card.cjs +2 -2
  11. package/dist/elements/card.cjs.map +1 -1
  12. package/dist/elements/card.js +47 -50
  13. package/dist/elements/card.js.map +1 -1
  14. package/dist/elements/checkbox.cjs +2 -2
  15. package/dist/elements/checkbox.cjs.map +1 -1
  16. package/dist/elements/checkbox.js +19 -28
  17. package/dist/elements/checkbox.js.map +1 -1
  18. package/dist/elements/dialog.cjs +2 -2
  19. package/dist/elements/dialog.cjs.map +1 -1
  20. package/dist/elements/dialog.js +75 -107
  21. package/dist/elements/dialog.js.map +1 -1
  22. package/dist/elements/dropdown-menu.cjs +2 -2
  23. package/dist/elements/dropdown-menu.cjs.map +1 -1
  24. package/dist/elements/dropdown-menu.js +107 -181
  25. package/dist/elements/dropdown-menu.js.map +1 -1
  26. package/dist/elements/form.cjs +2 -2
  27. package/dist/elements/form.cjs.map +1 -1
  28. package/dist/elements/form.js +73 -76
  29. package/dist/elements/form.js.map +1 -1
  30. package/dist/elements/input.cjs +2 -2
  31. package/dist/elements/input.cjs.map +1 -1
  32. package/dist/elements/input.js +12 -21
  33. package/dist/elements/input.js.map +1 -1
  34. package/dist/elements/label.cjs +2 -2
  35. package/dist/elements/label.cjs.map +1 -1
  36. package/dist/elements/label.js +13 -19
  37. package/dist/elements/label.js.map +1 -1
  38. package/dist/elements/pagination.cjs +2 -2
  39. package/dist/elements/pagination.cjs.map +1 -1
  40. package/dist/elements/pagination.js +71 -89
  41. package/dist/elements/pagination.js.map +1 -1
  42. package/dist/elements/popover.cjs +2 -2
  43. package/dist/elements/popover.cjs.map +1 -1
  44. package/dist/elements/popover.js +31 -37
  45. package/dist/elements/popover.js.map +1 -1
  46. package/dist/elements/search-box.cjs +2 -2
  47. package/dist/elements/search-box.cjs.map +1 -1
  48. package/dist/elements/search-box.js +25 -28
  49. package/dist/elements/search-box.js.map +1 -1
  50. package/dist/elements/select.cjs +2 -2
  51. package/dist/elements/select.cjs.map +1 -1
  52. package/dist/elements/select.js +89 -136
  53. package/dist/elements/select.js.map +1 -1
  54. package/dist/elements/separator.cjs +2 -2
  55. package/dist/elements/separator.cjs.map +1 -1
  56. package/dist/elements/separator.js +15 -26
  57. package/dist/elements/separator.js.map +1 -1
  58. package/dist/elements/sheet.cjs +2 -2
  59. package/dist/elements/sheet.cjs.map +1 -1
  60. package/dist/elements/sheet.js +71 -88
  61. package/dist/elements/sheet.js.map +1 -1
  62. package/dist/elements/sidebar.cjs +2 -2
  63. package/dist/elements/sidebar.cjs.map +1 -1
  64. package/dist/elements/sidebar.js +323 -535
  65. package/dist/elements/sidebar.js.map +1 -1
  66. package/dist/elements/skeleton.cjs +2 -2
  67. package/dist/elements/skeleton.cjs.map +1 -1
  68. package/dist/elements/skeleton.js +11 -8
  69. package/dist/elements/skeleton.js.map +1 -1
  70. package/dist/elements/spinner.cjs +2 -2
  71. package/dist/elements/spinner.cjs.map +1 -1
  72. package/dist/elements/spinner.js +30 -39
  73. package/dist/elements/spinner.js.map +1 -1
  74. package/dist/elements/table.cjs +2 -2
  75. package/dist/elements/table.cjs.map +1 -1
  76. package/dist/elements/table.js +58 -63
  77. package/dist/elements/table.js.map +1 -1
  78. package/dist/elements/tabs.cjs +2 -2
  79. package/dist/elements/tabs.cjs.map +1 -1
  80. package/dist/elements/tabs.js +31 -38
  81. package/dist/elements/tabs.js.map +1 -1
  82. package/dist/elements/tooltip.cjs +2 -2
  83. package/dist/elements/tooltip.cjs.map +1 -1
  84. package/dist/elements/tooltip.js +31 -38
  85. package/dist/elements/tooltip.js.map +1 -1
  86. package/dist/hooks/use-mobile.cjs +2 -2
  87. package/dist/hooks/use-mobile.cjs.map +1 -1
  88. package/dist/hooks/use-mobile.js +13 -14
  89. package/dist/hooks/use-mobile.js.map +1 -1
  90. package/dist/index.cjs +0 -2
  91. package/dist/index.js +0 -2
  92. package/dist/lib/utils.cjs +2 -2
  93. package/dist/lib/utils.cjs.map +1 -1
  94. package/dist/lib/utils.js +7 -8
  95. package/dist/lib/utils.js.map +1 -1
  96. package/package.json +42 -42
  97. package/dist/index.cjs.map +0 -1
  98. package/dist/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.js","sources":["../../src/elements/sidebar.tsx"],"sourcesContent":["'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\nimport { PanelLeftIcon } from 'lucide-react';\nimport { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\n\nimport { Button } from '@/elements/button';\nimport { Input } from '@/elements/input';\nimport { useIsMobile } from '@/hooks/use-mobile';\nimport { cn } from '@/lib/utils';\nimport { Separator } from '@/elements/separator';\nimport { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from '@/elements/sheet';\nimport { Skeleton } from '@/elements/skeleton';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/elements/tooltip';\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state';\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = '16rem';\nconst SIDEBAR_WIDTH_MOBILE = '18rem';\nconst SIDEBAR_WIDTH_ICON = '3rem';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\n\ntype SidebarContextProps = {\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 = createContext<SidebarContextProps | null>(null);\n\nfunction useSidebar() {\n const context = useContext(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n\n return context;\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}) {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n // eslint-disable-next-line\n const [_open, _setOpen] = useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = 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\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n },\n [setOpenProp, open],\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(\n () => (isMobile ? setOpenMobile((val) => !val) : setOpen((val) => !val)),\n [isMobile, setOpen, setOpenMobile],\n );\n\n // Adds a keyboard shortcut to toggle the sidebar.\n 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\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n data-slot=\"sidebar-wrapper\"\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('group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full', className)}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n );\n}\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n collapsible?: 'offcanvas' | 'icon' | 'none';\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn('bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col', className)}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <div\n className=\"group peer text-sidebar-foreground hidden md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) 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 data-slot=\"sidebar-inner\"\n className=\"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\n\nfunction SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-7', className)}\n onClick={(event) => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <button\n type=\"button\"\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n 'hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<'main'>) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n 'bg-background relative flex w-full flex-1 flex-col',\n 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn('bg-background h-8 w-full shadow-none', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn('bg-sidebar-border mx-2 w-auto', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-content\"\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}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn('relative flex w-full min-w-0 flex-col p-2', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n className={cn(\n 'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] 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}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"sidebar-group-action\"\n data-sidebar=\"group-action\"\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn('w-full text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n );\n}\n\nconst sidebarMenuButtonVariants = cva(\n 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground 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-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-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 {\n variants: {\n variant: {\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 size: {\n default: 'h-8 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean;\n isActive?: boolean;\n tooltip?: string | React.ComponentProps<typeof TooltipContent>;\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button';\n const { isMobile, state } = useSidebar();\n\n const button = (\n <Comp\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n );\n\n if (!tooltip) {\n return button;\n }\n\n const tooltipProps =\n typeof tooltip === 'string'\n ? {\n children: tooltip,\n }\n : tooltip;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent side=\"right\" align=\"center\" hidden={state !== 'collapsed' || isMobile} {...tooltipProps} />\n </Tooltip>\n );\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean;\n showOnHover?: boolean;\n}) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuBadge({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n 'text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<'div'> & {\n showIcon?: boolean;\n}) {\n // Random width between 50 to 90%.\n const width = useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as React.CSSProperties\n }\n />\n </div>\n );\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = 'md',\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<'a'> & {\n asChild?: boolean;\n size?: 'sm' | 'md';\n isActive?: boolean;\n}) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"sidebar-menu-sub-button\"\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n size === 'sm' && 'text-xs',\n size === 'md' && 'text-sm',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n};\n"],"names":["SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","createContext","useSidebar","context","useContext","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","children","props","isMobile","useIsMobile","openMobile","setOpenMobile","useState","_open","_setOpen","open","setOpen","useCallback","value","openState","toggleSidebar","val","useEffect","handleKeyDown","event","state","contextValue","useMemo","jsx","TooltipProvider","cn","Sidebar","side","variant","collapsible","Sheet","jsxs","SheetContent","SheetHeader","SheetTitle","SheetDescription","SidebarTrigger","onClick","Button","PanelLeftIcon","SidebarRail","SidebarInset","SidebarInput","Input","SidebarHeader","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","asChild","Slot","SidebarGroupAction","SidebarGroupContent","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","cva","SidebarMenuButton","isActive","size","tooltip","Comp","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuBadge","SidebarMenuSkeleton","showIcon","width","Skeleton","SidebarMenuSub","SidebarMenuSubItem","SidebarMenuSubButton"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMA,IAAsB,iBACtBC,IAAyB,KAAK,KAAK,KAAK,GACxCC,IAAgB,SAChBC,IAAuB,SACvBC,IAAqB,QACrBC,I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AAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,gBAAa;AAAA,YACb,OACE;AAAA,cACE,oBAAoBD;AAAA,YAAA;AAAA,UACtB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,SAASE,GAAe,EAAE,WAAA5E,GAAW,GAAGG,KAAqC;AAC3E,SACE,gBAAAqB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,gBAAa;AAAA,MACb,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,QACA1B;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAAS0E,GAAmB,EAAE,WAAA7E,GAAW,GAAGG,KAAqC;AAC/E,SACE,gBAAAqB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,gBAAa;AAAA,MACb,WAAWE,EAAG,gCAAgC1B,CAAS;AAAA,MACtD,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAAS2E,GAAqB;AAAA,EAC5B,SAAA1B,IAAU;AAAA,EACV,MAAAU,IAAO;AAAA,EACP,UAAAD,IAAW;AAAA,EACX,WAAA7D;AAAA,EACA,GAAGG;AACL,GAIG;AAGD,SACE,gBAAAqB;AAAA,IAHW4B,IAAUC,IAAO;AAAA,IAG3B;AAAA,MACC,aAAU;AAAA,MACV,gBAAa;AAAA,MACb,aAAWS;AAAA,MACX,eAAaD;AAAA,MACb,WAAWnC;AAAA,QACT;AAAA,QACA;AAAA,QACAoC,MAAS,QAAQ;AAAA,QACjBA,MAAS,QAAQ;AAAA,QACjB;AAAA,QACA9D;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"sidebar.js","names":[],"sources":["../../src/elements/sidebar.tsx"],"sourcesContent":["'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\nimport { PanelLeftIcon } from 'lucide-react';\nimport { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\n\nimport { Button } from '@/elements/button';\nimport { Input } from '@/elements/input';\nimport { useIsMobile } from '@/hooks/use-mobile';\nimport { cn } from '@/lib/utils';\nimport { Separator } from '@/elements/separator';\nimport { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from '@/elements/sheet';\nimport { Skeleton } from '@/elements/skeleton';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/elements/tooltip';\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state';\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = '16rem';\nconst SIDEBAR_WIDTH_MOBILE = '18rem';\nconst SIDEBAR_WIDTH_ICON = '3rem';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\n\ntype SidebarContextProps = {\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 = createContext<SidebarContextProps | null>(null);\n\nfunction useSidebar() {\n const context = useContext(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n\n return context;\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}) {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n // eslint-disable-next-line\n const [_open, _setOpen] = useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = 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\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n },\n [setOpenProp, open],\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(\n () => (isMobile ? setOpenMobile((val) => !val) : setOpen((val) => !val)),\n [isMobile, setOpen, setOpenMobile],\n );\n\n // Adds a keyboard shortcut to toggle the sidebar.\n 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\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n data-slot=\"sidebar-wrapper\"\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('group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full', className)}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n );\n}\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n collapsible?: 'offcanvas' | 'icon' | 'none';\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn('bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col', className)}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <div\n className=\"group peer text-sidebar-foreground hidden md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) 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 data-slot=\"sidebar-inner\"\n className=\"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\n\nfunction SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-7', className)}\n onClick={(event) => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <button\n type=\"button\"\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n 'hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<'main'>) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n 'bg-background relative flex w-full flex-1 flex-col',\n 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn('bg-background h-8 w-full shadow-none', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn('bg-sidebar-border mx-2 w-auto', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-content\"\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}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn('relative flex w-full min-w-0 flex-col p-2', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n className={cn(\n 'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] 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}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"sidebar-group-action\"\n data-sidebar=\"group-action\"\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn('w-full text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n );\n}\n\nconst sidebarMenuButtonVariants = cva(\n 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground 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-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-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 {\n variants: {\n variant: {\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 size: {\n default: 'h-8 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean;\n isActive?: boolean;\n tooltip?: string | React.ComponentProps<typeof TooltipContent>;\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button';\n const { isMobile, state } = useSidebar();\n\n const button = (\n <Comp\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n );\n\n if (!tooltip) {\n return button;\n }\n\n const tooltipProps =\n typeof tooltip === 'string'\n ? {\n children: tooltip,\n }\n : tooltip;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent side=\"right\" align=\"center\" hidden={state !== 'collapsed' || isMobile} {...tooltipProps} />\n </Tooltip>\n );\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean;\n showOnHover?: boolean;\n}) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuBadge({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n 'text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<'div'> & {\n showIcon?: boolean;\n}) {\n // Random width between 50 to 90%.\n const width = useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as React.CSSProperties\n }\n />\n </div>\n );\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = 'md',\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<'a'> & {\n asChild?: boolean;\n size?: 'sm' | 'md';\n isActive?: boolean;\n}) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"sidebar-menu-sub-button\"\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n size === 'sm' && 'text-xs',\n size === 'md' && 'text-sm',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n};\n"],"mappings":";;;;;;;;;;;;;;AAiBA,IAAM,sBAAsB,iBACtB,yBAAyB,OAAU,KAAK,GACxC,gBAAgB,SAChB,uBAAuB,SACvB,qBAAqB,QACrB,4BAA4B,KAY5B,iBAAiB,cAA0C,KAAK;AAEtE,SAAS,aAAa;CACpB,IAAM,IAAU,WAAW,eAAe;AAC1C,KAAI,CAAC,EACH,OAAU,MAAM,oDAA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IN,SAAS,mBAAmB,EAAE,cAAW,GAAG,KAAqC;AAC/E,QACE,oBAAC,MAAA;EACC,aAAU;EACV,gBAAa;EACb,WAAW,GAAG,gCAAgC,EAAU;EACxD,GAAI;GACJ;;AAIN,SAAS,qBAAqB,EAC5B,aAAU,IACV,UAAO,MACP,cAAW,IACX,cACA,GAAG,KAKF;AAGD,QACE,oBAHW,IAAU,OAAO,KAG3B;EACC,aAAU;EACV,gBAAa;EACb,aAAW;EACX,eAAa;EACb,WAAW,GACT,ifACA,0FACA,MAAS,QAAQ,WACjB,MAAS,QAAQ,WACjB,wCACA,EACD;EACD,GAAI;GACJ"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("../lib/utils.cjs");function s({className:e,...t}){return n.jsx("div",{"data-slot":"skeleton",className:o.cn("bg-accent animate-pulse rounded-md",e),...t})}exports.Skeleton=s;
2
- //# sourceMappingURL=skeleton.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`);function r({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`skeleton`,className:t.cn(`bg-accent animate-pulse rounded-md`,e),...r})}exports.Skeleton=r;
2
+ //# sourceMappingURL=skeleton.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.cjs","sources":["../../src/elements/skeleton.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"skeleton\" className={cn('bg-accent animate-pulse rounded-md', className)} {...props} />;\n}\n\nexport { Skeleton };\n"],"names":["Skeleton","className","props","jsx","cn"],"mappings":"mJAEA,SAASA,EAAS,CAAE,UAAAC,EAAW,GAAGC,GAAsC,CACtE,OAAOC,MAAC,MAAA,CAAI,YAAU,WAAW,UAAWC,EAAAA,GAAG,qCAAsCH,CAAS,EAAI,GAAGC,CAAA,CAAO,CAC9G"}
1
+ {"version":3,"file":"skeleton.cjs","names":[],"sources":["../../src/elements/skeleton.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"skeleton\" className={cn('bg-accent animate-pulse rounded-md', className)} {...props} />;\n}\n\nexport { Skeleton };\n"],"mappings":"wLAEA,SAAS,EAAS,CAAE,YAAW,GAAG,GAAsC,CACtE,OAAO,EAAA,EAAA,KAAC,MAAA,CAAI,YAAU,WAAW,UAAW,EAAA,GAAG,qCAAsC,EAAU,CAAE,GAAI,GAAS"}
@@ -1,9 +1,12 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { cn as n } from "../lib/utils.js";
3
- function m({ className: e, ...t }) {
4
- return /* @__PURE__ */ o("div", { "data-slot": "skeleton", className: n("bg-accent animate-pulse rounded-md", e), ...t });
1
+ import { cn } from "../lib/utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ function Skeleton({ className: n, ...r }) {
4
+ return /* @__PURE__ */ jsx("div", {
5
+ "data-slot": "skeleton",
6
+ className: cn("bg-accent animate-pulse rounded-md", n),
7
+ ...r
8
+ });
5
9
  }
6
- export {
7
- m as Skeleton
8
- };
9
- //# sourceMappingURL=skeleton.js.map
10
+ export { Skeleton };
11
+
12
+ //# sourceMappingURL=skeleton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.js","sources":["../../src/elements/skeleton.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"skeleton\" className={cn('bg-accent animate-pulse rounded-md', className)} {...props} />;\n}\n\nexport { Skeleton };\n"],"names":["Skeleton","className","props","jsx","cn"],"mappings":";;AAEA,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAAsC;AACtE,SAAO,gBAAAC,EAAC,OAAA,EAAI,aAAU,YAAW,WAAWC,EAAG,sCAAsCH,CAAS,GAAI,GAAGC,EAAA,CAAO;AAC9G;"}
1
+ {"version":3,"file":"skeleton.js","names":[],"sources":["../../src/elements/skeleton.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"skeleton\" className={cn('bg-accent animate-pulse rounded-md', className)} {...props} />;\n}\n\nexport { Skeleton };\n"],"mappings":";;AAEA,SAAS,SAAS,EAAE,cAAW,GAAG,KAAsC;AACtE,QAAO,oBAAC,OAAA;EAAI,aAAU;EAAW,WAAW,GAAG,sCAAsC,EAAU;EAAE,GAAI;GAAS"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../lib/utils.cjs"),t="animate-spin mr-2 text-chrome-200 fill-chrome-500",i={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},l=({className:n,size:s="md"})=>e.jsxs("div",{role:"status",children:[e.jsxs("svg",{"aria-hidden":"true",className:r.cn(t,s&&i[s],n),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),e.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),e.jsx("span",{className:"sr-only",children:"Loading..."})]});exports.Spinner=l;
2
- //# sourceMappingURL=spinner.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`);var r=`animate-spin mr-2 text-chrome-200 fill-chrome-500`,i={xs:`w-4 h-4`,sm:`w-6 h-6`,md:`w-8 h-8`,lg:`w-10 h-10`};const a=({className:e,size:a=`md`})=>(0,n.jsxs)(`div`,{role:`status`,children:[(0,n.jsxs)(`svg`,{"aria-hidden":`true`,className:t.cn(r,a&&i[a],e),viewBox:`0 0 100 101`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,n.jsx)(`path`,{d:`M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z`,fill:`currentFill`})]}),(0,n.jsx)(`span`,{className:`sr-only`,children:`Loading...`})]});exports.Spinner=a;
2
+ //# sourceMappingURL=spinner.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.cjs","sources":["../../src/elements/spinner.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCN = 'animate-spin mr-2 text-chrome-200 fill-chrome-500';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst sizeCNMap: Record<SpinnerSize, string> = {\n xs: 'w-4 h-4',\n sm: 'w-6 h-6',\n md: 'w-8 h-8',\n lg: 'w-10 h-10',\n};\n\ntype Props = {\n className?: string;\n size?: SpinnerSize;\n};\n\nexport const Spinner = ({ className, size = 'md' }: Props) => (\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className={cn(baseCN, size && sizeCNMap[size], className)}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n <span className=\"sr-only\">Loading...</span>\n </div>\n);\n"],"names":["baseCN","sizeCNMap","Spinner","className","size","jsxs","cn","jsx"],"mappings":"mJAgBMA,EAAS,oDAITC,EAAyC,CAC7C,GAAI,UACJ,GAAI,UACJ,GAAI,UACJ,GAAI,WACN,EAOaC,EAAU,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,QAC1CC,EAAAA,KAAC,MAAA,CAAI,KAAK,SACR,SAAA,CAAAA,EAAAA,KAAC,MAAA,CACC,cAAY,OACZ,UAAWC,EAAAA,GAAGN,EAAQI,GAAQH,EAAUG,CAAI,EAAGD,CAAS,EACxD,QAAQ,cACR,KAAK,OACL,MAAM,6BAEN,SAAA,CAAAI,EAAAA,IAAC,OAAA,CACC,EAAE,+WACF,KAAK,cAAA,CAAA,EAEPA,EAAAA,IAAC,OAAA,CACC,EAAE,glBACF,KAAK,aAAA,CAAA,CACP,CAAA,CAAA,EAEFA,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,YAAA,CAAU,CAAA,CAAA,CACtC"}
1
+ {"version":3,"file":"spinner.cjs","names":["sizeCNMap: Record<SpinnerSize, string>"],"sources":["../../src/elements/spinner.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCN = 'animate-spin mr-2 text-chrome-200 fill-chrome-500';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst sizeCNMap: Record<SpinnerSize, string> = {\n xs: 'w-4 h-4',\n sm: 'w-6 h-6',\n md: 'w-8 h-8',\n lg: 'w-10 h-10',\n};\n\ntype Props = {\n className?: string;\n size?: SpinnerSize;\n};\n\nexport const Spinner = ({ className, size = 'md' }: Props) => (\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className={cn(baseCN, size && sizeCNMap[size], className)}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n <span className=\"sr-only\">Loading...</span>\n </div>\n);\n"],"mappings":"wLAgBA,IAAM,EAAS,oDAITA,EAAyC,CAC7C,GAAI,UACJ,GAAI,UACJ,GAAI,UACJ,GAAI,YACL,CAOD,MAAa,GAAW,CAAE,YAAW,OAAO,SAC1C,EAAA,EAAA,MAAC,MAAA,CAAI,KAAK,oBACR,EAAA,EAAA,MAAC,MAAA,CACC,cAAY,OACZ,UAAW,EAAA,GAAG,EAAQ,GAAQ,EAAU,GAAO,EAAU,CACzD,QAAQ,cACR,KAAK,OACL,MAAM,wCAEN,EAAA,EAAA,KAAC,OAAA,CACC,EAAE,+WACF,KAAK,gBACL,EACF,EAAA,EAAA,KAAC,OAAA,CACC,EAAE,glBACF,KAAK,eACL,CAAA,EACE,EACN,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,mBAAU,cAAiB,CAAA,EACvC"}
@@ -1,40 +1,31 @@
1
- import { jsxs as s, jsx as C } from "react/jsx-runtime";
2
- import { cn as n } from "../lib/utils.js";
3
- const e = "animate-spin mr-2 text-chrome-200 fill-chrome-500", i = {
4
- xs: "w-4 h-4",
5
- sm: "w-6 h-6",
6
- md: "w-8 h-8",
7
- lg: "w-10 h-10"
8
- }, a = ({ className: l, size: r = "md" }) => /* @__PURE__ */ s("div", { role: "status", children: [
9
- /* @__PURE__ */ s(
10
- "svg",
11
- {
12
- "aria-hidden": "true",
13
- className: n(e, r && i[r], l),
14
- viewBox: "0 0 100 101",
15
- fill: "none",
16
- xmlns: "http://www.w3.org/2000/svg",
17
- children: [
18
- /* @__PURE__ */ C(
19
- "path",
20
- {
21
- d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
22
- fill: "currentColor"
23
- }
24
- ),
25
- /* @__PURE__ */ C(
26
- "path",
27
- {
28
- d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
29
- fill: "currentFill"
30
- }
31
- )
32
- ]
33
- }
34
- ),
35
- /* @__PURE__ */ C("span", { className: "sr-only", children: "Loading..." })
36
- ] });
37
- export {
38
- a as Spinner
1
+ import { cn } from "../lib/utils.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ var baseCN = "animate-spin mr-2 text-chrome-200 fill-chrome-500", sizeCNMap = {
4
+ xs: "w-4 h-4",
5
+ sm: "w-6 h-6",
6
+ md: "w-8 h-8",
7
+ lg: "w-10 h-10"
39
8
  };
40
- //# sourceMappingURL=spinner.js.map
9
+ const Spinner = ({ className: a, size: o = "md" }) => /* @__PURE__ */ jsxs("div", {
10
+ role: "status",
11
+ children: [/* @__PURE__ */ jsxs("svg", {
12
+ "aria-hidden": "true",
13
+ className: cn(baseCN, o && sizeCNMap[o], a),
14
+ viewBox: "0 0 100 101",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ children: [/* @__PURE__ */ jsx("path", {
18
+ d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
19
+ fill: "currentColor"
20
+ }), /* @__PURE__ */ jsx("path", {
21
+ d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
22
+ fill: "currentFill"
23
+ })]
24
+ }), /* @__PURE__ */ jsx("span", {
25
+ className: "sr-only",
26
+ children: "Loading..."
27
+ })]
28
+ });
29
+ export { Spinner };
30
+
31
+ //# sourceMappingURL=spinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.js","sources":["../../src/elements/spinner.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCN = 'animate-spin mr-2 text-chrome-200 fill-chrome-500';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst sizeCNMap: Record<SpinnerSize, string> = {\n xs: 'w-4 h-4',\n sm: 'w-6 h-6',\n md: 'w-8 h-8',\n lg: 'w-10 h-10',\n};\n\ntype Props = {\n className?: string;\n size?: SpinnerSize;\n};\n\nexport const Spinner = ({ className, size = 'md' }: Props) => (\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className={cn(baseCN, size && sizeCNMap[size], className)}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n <span className=\"sr-only\">Loading...</span>\n </div>\n);\n"],"names":["baseCN","sizeCNMap","Spinner","className","size","jsxs","cn","jsx"],"mappings":";;AAgBA,MAAMA,IAAS,qDAITC,IAAyC;AAAA,EAC7C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAOaC,IAAU,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,WAC1C,gBAAAC,EAAC,OAAA,EAAI,MAAK,UACR,UAAA;AAAA,EAAA,gBAAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWC,EAAGN,GAAQI,KAAQH,EAAUG,CAAI,GAAGD,CAAS;AAAA,MACxD,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MAEN,UAAA;AAAA,QAAA,gBAAAI;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEP,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACP;AAAA,IAAA;AAAA,EAAA;AAAA,EAEF,gBAAAA,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,aAAA,CAAU;AAAA,EAAA,CACtC;"}
1
+ {"version":3,"file":"spinner.js","names":["sizeCNMap: Record<SpinnerSize, string>"],"sources":["../../src/elements/spinner.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCN = 'animate-spin mr-2 text-chrome-200 fill-chrome-500';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst sizeCNMap: Record<SpinnerSize, string> = {\n xs: 'w-4 h-4',\n sm: 'w-6 h-6',\n md: 'w-8 h-8',\n lg: 'w-10 h-10',\n};\n\ntype Props = {\n className?: string;\n size?: SpinnerSize;\n};\n\nexport const Spinner = ({ className, size = 'md' }: Props) => (\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className={cn(baseCN, size && sizeCNMap[size], className)}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n <span className=\"sr-only\">Loading...</span>\n </div>\n);\n"],"mappings":";;AAgBA,IAAM,SAAS,qDAITA,YAAyC;CAC7C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAOD,MAAa,WAAW,EAAE,cAAW,UAAO,WAC1C,qBAAC,OAAA;CAAI,MAAK;YACR,qBAAC,OAAA;EACC,eAAY;EACZ,WAAW,GAAG,QAAQ,KAAQ,UAAU,IAAO,EAAU;EACzD,SAAQ;EACR,MAAK;EACL,OAAM;aAEN,oBAAC,QAAA;GACC,GAAE;GACF,MAAK;IACL,EACF,oBAAC,QAAA;GACC,GAAE;GACF,MAAK;IACL,CAAA;GACE,EACN,oBAAC,QAAA;EAAK,WAAU;YAAU;GAAiB,CAAA;EACvC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("../lib/utils.cjs");function r({className:e,containerClassName:t,...o}){return a.jsx("div",{"data-slot":"table-container",className:l.cn("relative w-full overflow-x-auto",t),children:a.jsx("table",{"data-slot":"table",className:l.cn("w-full caption-bottom text-sm",e),...o})})}function n({className:e,...t}){return a.jsx("thead",{"data-slot":"table-header",className:l.cn("[&_tr]:border-b",e),...t})}function s({className:e,...t}){return a.jsx("tbody",{"data-slot":"table-body",className:l.cn("[&_tr:last-child]:border-0",e),...t})}function c({className:e,...t}){return a.jsx("tfoot",{"data-slot":"table-footer",className:l.cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function b({className:e,...t}){return a.jsx("tr",{"data-slot":"table-row",className:l.cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function d({className:e,...t}){return a.jsx("th",{"data-slot":"table-head",className:l.cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function i({className:e,...t}){return a.jsx("td",{"data-slot":"table-cell",className:l.cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function u({className:e,...t}){return a.jsx("caption",{"data-slot":"table-caption",className:l.cn("text-muted-foreground mt-4 text-sm",e),...t})}exports.Table=r;exports.TableBody=s;exports.TableCaption=u;exports.TableCell=i;exports.TableFooter=c;exports.TableHead=d;exports.TableHeader=n;exports.TableRow=b;
2
- //# sourceMappingURL=table.cjs.map
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`);function r({className:e,containerClassName:r,...i}){return(0,n.jsx)(`div`,{"data-slot":`table-container`,className:t.cn(`relative w-full overflow-x-auto`,r),children:(0,n.jsx)(`table`,{"data-slot":`table`,className:t.cn(`w-full caption-bottom text-sm`,e),...i})})}function i({className:e,...r}){return(0,n.jsx)(`thead`,{"data-slot":`table-header`,className:t.cn(`[&_tr]:border-b`,e),...r})}function a({className:e,...r}){return(0,n.jsx)(`tbody`,{"data-slot":`table-body`,className:t.cn(`[&_tr:last-child]:border-0`,e),...r})}function o({className:e,...r}){return(0,n.jsx)(`tfoot`,{"data-slot":`table-footer`,className:t.cn(`bg-muted/50 border-t font-medium [&>tr]:last:border-b-0`,e),...r})}function s({className:e,...r}){return(0,n.jsx)(`tr`,{"data-slot":`table-row`,className:t.cn(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors`,e),...r})}function c({className:e,...r}){return(0,n.jsx)(`th`,{"data-slot":`table-head`,className:t.cn(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...r})}function l({className:e,...r}){return(0,n.jsx)(`td`,{"data-slot":`table-cell`,className:t.cn(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...r})}function u({className:e,...r}){return(0,n.jsx)(`caption`,{"data-slot":`table-caption`,className:t.cn(`text-muted-foreground mt-4 text-sm`,e),...r})}exports.Table=r,exports.TableBody=a,exports.TableCaption=u,exports.TableCell=l,exports.TableFooter=o,exports.TableHead=c,exports.TableHeader=i,exports.TableRow=s;
2
+ //# sourceMappingURL=table.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.cjs","sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"names":["Table","className","containerClassName","props","jsx","cn","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],"mappings":"mJAQA,SAASA,EAAM,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,GAAqB,CACtE,OACEC,MAAC,OAAI,YAAU,kBAAkB,UAAWC,EAAAA,GAAG,kCAAmCH,CAAkB,EAClG,SAAAE,EAAAA,IAAC,SAAM,YAAU,QAAQ,UAAWC,EAAAA,GAAG,gCAAiCJ,CAAS,EAAI,GAAGE,EAAO,EACjG,CAEJ,CAEA,SAASG,EAAY,CAAE,UAAAL,EAAW,GAAGE,GAAwC,CAC3E,OAAOC,MAAC,QAAA,CAAM,YAAU,eAAe,UAAWC,EAAAA,GAAG,kBAAmBJ,CAAS,EAAI,GAAGE,CAAA,CAAO,CACjG,CAEA,SAASI,EAAU,CAAE,UAAAN,EAAW,GAAGE,GAAwC,CACzE,OAAOC,MAAC,QAAA,CAAM,YAAU,aAAa,UAAWC,EAAAA,GAAG,6BAA8BJ,CAAS,EAAI,GAAGE,CAAA,CAAO,CAC1G,CAEA,SAASK,EAAY,CAAE,UAAAP,EAAW,GAAGE,GAAwC,CAC3E,OACEC,EAAAA,IAAC,QAAA,CACC,YAAU,eACV,UAAWC,EAAAA,GAAG,0DAA2DJ,CAAS,EACjF,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASM,EAAS,CAAE,UAAAR,EAAW,GAAGE,GAAqC,CACrE,OACEC,EAAAA,IAAC,KAAA,CACC,YAAU,YACV,UAAWC,EAAAA,GAAG,8EAA+EJ,CAAS,EACrG,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASO,EAAU,CAAE,UAAAT,EAAW,GAAGE,GAAqC,CACtE,OACEC,EAAAA,IAAC,KAAA,CACC,YAAU,aACV,UAAWC,EAAAA,GACT,qJACAJ,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASQ,EAAU,CAAE,UAAAV,EAAW,GAAGE,GAAqC,CACtE,OACEC,EAAAA,IAAC,KAAA,CACC,YAAU,aACV,UAAWC,EAAAA,GACT,yGACAJ,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASS,EAAa,CAAE,UAAAX,EAAW,GAAGE,GAA0C,CAC9E,OACEC,MAAC,UAAA,CAAQ,YAAU,gBAAgB,UAAWC,EAAAA,GAAG,qCAAsCJ,CAAS,EAAI,GAAGE,CAAA,CAAO,CAElH"}
1
+ {"version":3,"file":"table.cjs","names":[],"sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell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Q,YAAU,gBAAgB,UAAW,EAAA,GAAG,qCAAsC,EAAU,CAAE,GAAI,GAAS"}
@@ -1,71 +1,66 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { cn as o } from "../lib/utils.js";
3
- function s({ className: t, containerClassName: e, ...l }) {
4
- return /* @__PURE__ */ a("div", { "data-slot": "table-container", className: o("relative w-full overflow-x-auto", e), children: /* @__PURE__ */ a("table", { "data-slot": "table", className: o("w-full caption-bottom text-sm", t), ...l }) });
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ function Table({ className: s, containerClassName: c, ...l }) {
5
+ return /* @__PURE__ */ jsx("div", {
6
+ "data-slot": "table-container",
7
+ className: cn("relative w-full overflow-x-auto", c),
8
+ children: /* @__PURE__ */ jsx("table", {
9
+ "data-slot": "table",
10
+ className: cn("w-full caption-bottom text-sm", s),
11
+ ...l
12
+ })
13
+ });
5
14
  }
6
- function d({ className: t, ...e }) {
7
- return /* @__PURE__ */ a("thead", { "data-slot": "table-header", className: o("[&_tr]:border-b", t), ...e });
15
+ function TableHeader({ className: s, ...c }) {
16
+ return /* @__PURE__ */ jsx("thead", {
17
+ "data-slot": "table-header",
18
+ className: cn("[&_tr]:border-b", s),
19
+ ...c
20
+ });
8
21
  }
9
- function c({ className: t, ...e }) {
10
- return /* @__PURE__ */ a("tbody", { "data-slot": "table-body", className: o("[&_tr:last-child]:border-0", t), ...e });
22
+ function TableBody({ className: s, ...c }) {
23
+ return /* @__PURE__ */ jsx("tbody", {
24
+ "data-slot": "table-body",
25
+ className: cn("[&_tr:last-child]:border-0", s),
26
+ ...c
27
+ });
11
28
  }
12
- function b({ className: t, ...e }) {
13
- return /* @__PURE__ */ a(
14
- "tfoot",
15
- {
16
- "data-slot": "table-footer",
17
- className: o("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", t),
18
- ...e
19
- }
20
- );
29
+ function TableFooter({ className: s, ...c }) {
30
+ return /* @__PURE__ */ jsx("tfoot", {
31
+ "data-slot": "table-footer",
32
+ className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", s),
33
+ ...c
34
+ });
21
35
  }
22
- function i({ className: t, ...e }) {
23
- return /* @__PURE__ */ a(
24
- "tr",
25
- {
26
- "data-slot": "table-row",
27
- className: o("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", t),
28
- ...e
29
- }
30
- );
36
+ function TableRow({ className: s, ...c }) {
37
+ return /* @__PURE__ */ jsx("tr", {
38
+ "data-slot": "table-row",
39
+ className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", s),
40
+ ...c
41
+ });
31
42
  }
32
- function m({ className: t, ...e }) {
33
- return /* @__PURE__ */ a(
34
- "th",
35
- {
36
- "data-slot": "table-head",
37
- className: o(
38
- "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
39
- t
40
- ),
41
- ...e
42
- }
43
- );
43
+ function TableHead({ className: s, ...c }) {
44
+ return /* @__PURE__ */ jsx("th", {
45
+ "data-slot": "table-head",
46
+ className: cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", s),
47
+ ...c
48
+ });
44
49
  }
45
- function u({ className: t, ...e }) {
46
- return /* @__PURE__ */ a(
47
- "td",
48
- {
49
- "data-slot": "table-cell",
50
- className: o(
51
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
52
- t
53
- ),
54
- ...e
55
- }
56
- );
50
+ function TableCell({ className: s, ...c }) {
51
+ return /* @__PURE__ */ jsx("td", {
52
+ "data-slot": "table-cell",
53
+ className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", s),
54
+ ...c
55
+ });
57
56
  }
58
- function f({ className: t, ...e }) {
59
- return /* @__PURE__ */ a("caption", { "data-slot": "table-caption", className: o("text-muted-foreground mt-4 text-sm", t), ...e });
57
+ function TableCaption({ className: s, ...c }) {
58
+ return /* @__PURE__ */ jsx("caption", {
59
+ "data-slot": "table-caption",
60
+ className: cn("text-muted-foreground mt-4 text-sm", s),
61
+ ...c
62
+ });
60
63
  }
61
- export {
62
- s as Table,
63
- c as TableBody,
64
- f as TableCaption,
65
- u as TableCell,
66
- b as TableFooter,
67
- m as TableHead,
68
- d as TableHeader,
69
- i as TableRow
70
- };
71
- //# sourceMappingURL=table.js.map
64
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
65
+
66
+ //# sourceMappingURL=table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"names":["Table","className","containerClassName","props","jsx","cn","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],"mappings":";;AAQA,SAASA,EAAM,EAAE,WAAAC,GAAW,oBAAAC,GAAoB,GAAGC,KAAqB;AACtE,SACE,gBAAAC,EAAC,SAAI,aAAU,mBAAkB,WAAWC,EAAG,mCAAmCH,CAAkB,GAClG,UAAA,gBAAAE,EAAC,WAAM,aAAU,SAAQ,WAAWC,EAAG,iCAAiCJ,CAAS,GAAI,GAAGE,GAAO,GACjG;AAEJ;AAEA,SAASG,EAAY,EAAE,WAAAL,GAAW,GAAGE,KAAwC;AAC3E,SAAO,gBAAAC,EAAC,SAAA,EAAM,aAAU,gBAAe,WAAWC,EAAG,mBAAmBJ,CAAS,GAAI,GAAGE,EAAA,CAAO;AACjG;AAEA,SAASI,EAAU,EAAE,WAAAN,GAAW,GAAGE,KAAwC;AACzE,SAAO,gBAAAC,EAAC,SAAA,EAAM,aAAU,cAAa,WAAWC,EAAG,8BAA8BJ,CAAS,GAAI,GAAGE,EAAA,CAAO;AAC1G;AAEA,SAASK,EAAY,EAAE,WAAAP,GAAW,GAAGE,KAAwC;AAC3E,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,2DAA2DJ,CAAS;AAAA,MACjF,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASM,EAAS,EAAE,WAAAR,GAAW,GAAGE,KAAqC;AACrE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,+EAA+EJ,CAAS;AAAA,MACrG,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASO,EAAU,EAAE,WAAAT,GAAW,GAAGE,KAAqC;AACtE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASQ,EAAU,EAAE,WAAAV,GAAW,GAAGE,KAAqC;AACtE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASS,EAAa,EAAE,WAAAX,GAAW,GAAGE,KAA0C;AAC9E,SACE,gBAAAC,EAAC,WAAA,EAAQ,aAAU,iBAAgB,WAAWC,EAAG,sCAAsCJ,CAAS,GAAI,GAAGE,EAAA,CAAO;AAElH;"}
1
+ {"version":3,"file":"table.js","names":[],"sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"mappings":";;;AAQA,SAAS,MAAM,EAAE,cAAW,uBAAoB,GAAG,KAAqB;AACtE,QACE,oBAAC,OAAA;EAAI,aAAU;EAAkB,WAAW,GAAG,mCAAmC,EAAmB;YACnG,oBAAC,SAAA;GAAM,aAAU;GAAQ,WAAW,GAAG,iCAAiC,EAAU;GAAE,GAAI;IAAS;GAC7F;;AAIV,SAAS,YAAY,EAAE,cAAW,GAAG,KAAwC;AAC3E,QAAO,oBAAC,SAAA;EAAM,aAAU;EAAe,WAAW,GAAG,mBAAmB,EAAU;EAAE,GAAI;GAAS;;AAGnG,SAAS,UAAU,EAAE,cAAW,GAAG,KAAwC;AACzE,QAAO,oBAAC,SAAA;EAAM,aAAU;EAAa,WAAW,GAAG,8BAA8B,EAAU;EAAE,GAAI;GAAS;;AAG5G,SAAS,YAAY,EAAE,cAAW,GAAG,KAAwC;AAC3E,QACE,oBAAC,SAAA;EACC,aAAU;EACV,WAAW,GAAG,2DAA2D,EAAU;EACnF,GAAI;GACJ;;AAIN,SAAS,SAAS,EAAE,cAAW,GAAG,KAAqC;AACrE,QACE,oBAAC,MAAA;EACC,aAAU;EACV,WAAW,GAAG,+EAA+E,EAAU;EACvG,GAAI;GACJ;;AAIN,SAAS,UAAU,EAAE,cAAW,GAAG,KAAqC;AACtE,QACE,oBAAC,MAAA;EACC,aAAU;EACV,WAAW,GACT,sJACA,EACD;EACD,GAAI;GACJ;;AAIN,SAAS,UAAU,EAAE,cAAW,GAAG,KAAqC;AACtE,QACE,oBAAC,MAAA;EACC,aAAU;EACV,WAAW,GACT,0GACA,EACD;EACD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,cAAW,GAAG,KAA0C;AAC9E,QACE,oBAAC,WAAA;EAAQ,aAAU;EAAgB,WAAW,GAAG,sCAAsC,EAAU;EAAE,GAAI;GAAS"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("@radix-ui/react-tabs"),r=require("../lib/utils.cjs");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=c(o);function u({className:e,...t}){return s.jsx(a.Root,{"data-slot":"tabs",className:r.cn("flex flex-col gap-2",e),...t})}function l({className:e,...t}){return s.jsx(a.List,{"data-slot":"tabs-list",className:r.cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function d({className:e,...t}){return s.jsx(a.Trigger,{"data-slot":"tabs-trigger",className:r.cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function b({className:e,...t}){return s.jsx(a.Content,{"data-slot":"tabs-content",className:r.cn("flex-1 outline-none",e),...t})}exports.Tabs=u;exports.TabsContent=b;exports.TabsList=l;exports.TabsTrigger=d;
2
- //# sourceMappingURL=tabs.cjs.map
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-tabs`);r=e.__toESM(r);function i({className:e,...i}){return(0,n.jsx)(r.Root,{"data-slot":`tabs`,className:t.cn(`flex flex-col gap-2`,e),...i})}function a({className:e,...i}){return(0,n.jsx)(r.List,{"data-slot":`tabs-list`,className:t.cn(`bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]`,e),...i})}function o({className:e,...i}){return(0,n.jsx)(r.Trigger,{"data-slot":`tabs-trigger`,className:t.cn(`data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...i})}function s({className:e,...i}){return(0,n.jsx)(r.Content,{"data-slot":`tabs-content`,className:t.cn(`flex-1 outline-none`,e),...i})}exports.Tabs=i,exports.TabsContent=s,exports.TabsList=a,exports.TabsTrigger=o;
2
+ //# sourceMappingURL=tabs.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.cjs","sources":["../../src/elements/tabs.tsx"],"sourcesContent":["'use client';\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return <TabsPrimitive.Root data-slot=\"tabs\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content data-slot=\"tabs-content\" className={cn('flex-1 outline-none', className)} {...props} />;\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"names":["Tabs","className","props","jsx","TabsPrimitive","cn","TabsList","TabsTrigger","TabsContent"],"mappings":"+cAMA,SAASA,EAAK,CAAE,UAAAC,EAAW,GAAGC,GAA0D,CACtF,OAAOC,EAAAA,IAACC,EAAc,KAAd,CAAmB,YAAU,OAAO,UAAWC,EAAAA,GAAG,sBAAuBJ,CAAS,EAAI,GAAGC,CAAA,CAAO,CAC1G,CAEA,SAASI,EAAS,CAAE,UAAAL,EAAW,GAAGC,GAA0D,CAC1F,OACEC,EAAAA,IAACC,EAAc,KAAd,CACC,YAAU,YACV,UAAWC,EAAAA,GACT,sGACAJ,CAAA,EAED,GAAGC,CAAA,CAAA,CAGV,CAEA,SAASK,EAAY,CAAE,UAAAN,EAAW,GAAGC,GAA6D,CAChG,OACEC,EAAAA,IAACC,EAAc,QAAd,CACC,YAAU,eACV,UAAWC,EAAAA,GACT,kqBACAJ,CAAA,EAED,GAAGC,CAAA,CAAA,CAGV,CAEA,SAASM,EAAY,CAAE,UAAAP,EAAW,GAAGC,GAA6D,CAChG,OAAOC,EAAAA,IAACC,EAAc,QAAd,CAAsB,YAAU,eAAe,UAAWC,EAAAA,GAAG,sBAAuBJ,CAAS,EAAI,GAAGC,CAAA,CAAO,CACrH"}
1
+ {"version":3,"file":"tabs.cjs","names":[],"sources":["../../src/elements/tabs.tsx"],"sourcesContent":["'use client';\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return <TabsPrimitive.Root data-slot=\"tabs\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content data-slot=\"tabs-content\" className={cn('flex-1 outline-none', className)} {...props} />;\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"mappings":"sPAMA,SAAS,EAAK,CAAE,YAAW,GAAG,GAA0D,CACtF,OAAO,EAAA,EAAA,KAAC,EAAc,KAAA,CAAK,YAAU,OAAO,UAAW,EAAA,GAAG,sBAAuB,EAAU,CAAE,GAAI,GAAS,CAG5G,SAAS,EAAS,CAAE,YAAW,GAAG,GAA0D,CAC1F,OACE,EAAA,EAAA,KAAC,EAAc,KAAA,CACb,YAAU,YACV,UAAW,EAAA,GACT,sGACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OACE,EAAA,EAAA,KAAC,EAAc,QAAA,CACb,YAAU,eACV,UAAW,EAAA,GACT,kqBACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAAA,EAAA,KAAC,EAAc,QAAA,CAAQ,YAAU,eAAe,UAAW,EAAA,GAAG,sBAAuB,EAAU,CAAE,GAAI,GAAS"}