@mesob/ui 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/alert-dialog.js +10 -10
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/alert.js.map +1 -1
- package/dist/components/animated-tabs.js +1 -1
- package/dist/components/animated-tabs.js.map +1 -1
- package/dist/components/app-header-actions.js +68 -53
- package/dist/components/app-header-actions.js.map +1 -1
- package/dist/components/app-sidebar.js +33 -28
- package/dist/components/app-sidebar.js.map +1 -1
- package/dist/components/button-group.js +1 -1
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.d.ts +6 -3
- package/dist/components/button.js +15 -7
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.js +15 -7
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel.js +18 -10
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/command.js +5 -5
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.js +2 -2
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/data-table/index.js +129 -120
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/dialog.js +2 -2
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.js +2 -2
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/entity/index.js +138 -133
- package/dist/components/entity/index.js.map +1 -1
- package/dist/components/hover-card.js +1 -1
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.js +15 -7
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/item.d.ts +1 -1
- package/dist/components/menubar.js +3 -3
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/page/index.js +24 -16
- package/dist/components/page/index.js.map +1 -1
- package/dist/components/pagination.js +10 -10
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/section/index.js +19 -11
- package/dist/components/section/index.js.map +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/sheet.js +2 -2
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/shell.js +44 -31
- package/dist/components/shell.js.map +1 -1
- package/dist/components/sidebar-context.d.ts +19 -0
- package/dist/components/sidebar-context.js +17 -0
- package/dist/components/sidebar-context.js.map +1 -0
- package/dist/components/sidebar.d.ts +2 -15
- package/dist/components/sidebar.js +51 -38
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/spotlight-search.js +38 -30
- package/dist/components/spotlight-search.js.map +1 -1
- package/dist/components/theme-toggle.js +17 -9
- package/dist/components/theme-toggle.js.map +1 -1
- package/dist/hooks/use-translation.js +3 -2
- package/dist/hooks/use-translation.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +94 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/theme-schema.d.ts +21 -0
- package/dist/lib/theme-schema.js +95 -0
- package/dist/lib/theme-schema.js.map +1 -0
- package/package.json +2 -5
- package/src/styles/globals.css +0 -130
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts","../../src/components/avatar.tsx","../../src/components/button.tsx","../../src/components/dropdown-menu.tsx","../../src/components/tooltip.tsx","../../src/components/mesob-context.tsx","../../src/components/link.tsx","../../src/components/dialog.tsx","../../src/components/command.tsx","../../src/components/spotlight-search.tsx","../../src/components/app-header-actions.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport { cn } from '@mesob/ui/lib/utils';\nimport * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport type * as React from 'react';\n\nfunction Avatar({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n 'relative flex size-8 shrink-0 overflow-hidden rounded-full',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn('aspect-square size-full', className)}\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n 'bg-muted flex size-full items-center justify-center rounded-full',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarImage, AvatarFallback };\n","import { cn } from '@mesob/ui/lib/utils';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type * as React from 'react';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost:\n 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n 'icon-sm': 'size-8',\n 'icon-lg': 'size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n","'use client';\n\nimport { cn } from '@mesob/ui/lib/utils';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { IconCheck, IconChevronRight, IconCircle } from '@tabler/icons-react';\nimport type * as React from 'react';\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n );\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCircle className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n 'px-2 py-1.5 text-sm font-medium data-[inset]:pl-8',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <IconChevronRight className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","'use client';\n\nimport { cn } from '@mesob/ui/lib/utils';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport type * as React from 'react';\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props}>\n {children}\n </TooltipPrimitive.Root>\n );\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n","'use client';\n\nimport { TooltipProvider } from '@mesob/ui/components/tooltip';\nimport {\n type ComponentType,\n createContext,\n type ReactNode,\n useContext,\n useMemo,\n} from 'react';\n\nexport type MesobLinkProps = {\n href: string;\n children: ReactNode;\n className?: string;\n onClick?: () => void;\n};\n\nexport type Router = {\n push: (href: string) => void;\n replace: (href: string) => void;\n back: () => void;\n forward: () => void;\n refresh: () => void;\n prefetch: (href: string) => void;\n};\n\nexport type MesobContextValue = {\n linkComponent?: ComponentType<MesobLinkProps>;\n t?: (key: string, params?: Record<string, string | number>) => string;\n router?: Router;\n};\n\nconst MesobContext = createContext<MesobContextValue | null>(null);\n\nexport type MesobProviderProps = {\n children: ReactNode;\n linkComponent?: ComponentType<MesobLinkProps>;\n /** Hook that returns the app's t function (e.g. from next-intl useTranslations()). */\n useTranslation?: () => (\n key: string,\n params?: Record<string, string | number>,\n ) => string;\n /** Hook that returns the app's router (e.g. from next-intl useRouter()). */\n useRouter?: () => Router;\n};\n\nexport function MesobProvider({\n children,\n linkComponent,\n useTranslation,\n useRouter,\n}: MesobProviderProps) {\n const t = useTranslation?.();\n const router = useRouter?.();\n const value = useMemo<MesobContextValue>(\n () => ({ linkComponent, t: t ?? undefined, router: router ?? undefined }),\n [linkComponent, t, router],\n );\n return (\n <MesobContext.Provider value={value}>\n <TooltipProvider delayDuration={0}>{children}</TooltipProvider>\n </MesobContext.Provider>\n );\n}\n\nexport function useMesob(): MesobContextValue | null {\n return useContext(MesobContext);\n}\n","'use client';\n\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useMesob } from './mesob-context';\n\nexport type LinkProps = {\n href: string;\n children: ReactNode;\n className?: string;\n onClick?: () => void;\n};\n\nexport function Link({\n href,\n children,\n className,\n onClick,\n ...props\n}: LinkProps & ComponentProps<'a'>) {\n const mesob = useMesob();\n const LinkComponent = mesob?.linkComponent ?? 'a';\n\n if (LinkComponent === 'a') {\n return (\n <a href={href} className={className} onClick={onClick} {...props}>\n {children}\n </a>\n );\n }\n\n return (\n <LinkComponent\n href={href}\n className={className}\n onClick={onClick}\n {...props}\n >\n {children}\n </LinkComponent>\n );\n}\n","'use client';\n\nimport { cn } from '@mesob/ui/lib/utils';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { IconX } from '@tabler/icons-react';\nimport type * as React from 'react';\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <IconX />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-lg leading-none font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","'use client';\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '@mesob/ui/components/dialog';\nimport { cn } from '@mesob/ui/lib/utils';\nimport { IconSearch } from '@tabler/icons-react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport type * as React from 'react';\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('overflow-hidden p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"flex h-9 items-center gap-2 border-b px-3\"\n >\n <IconSearch className=\"size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n );\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","'use client';\n\nimport { Button } from '@mesob/ui/components/button';\nimport {\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n} from '@mesob/ui/components/command';\nimport { cn } from '@mesob/ui/lib/utils';\nimport { IconSearch } from '@tabler/icons-react';\nimport * as React from 'react';\n\ntype SpotlightItem = {\n id: string;\n title: string;\n icon?: React.ReactNode;\n shortcut?: string;\n onSelect?: () => void;\n};\n\ntype SpotlightGroup = {\n heading: string;\n items: SpotlightItem[];\n};\n\ntype SpotlightSearchProps = {\n groups?: SpotlightGroup[];\n placeholder?: string;\n emptyMessage?: string;\n className?: string;\n triggerClassName?: string;\n onSearch?: (query: string) => void;\n};\n\nexport function SpotlightSearch({\n groups = [],\n placeholder = 'Search...',\n emptyMessage = 'No results found.',\n className,\n triggerClassName,\n onSearch,\n}: SpotlightSearchProps) {\n const [open, setOpen] = React.useState(false);\n\n React.useEffect(() => {\n const down = (e: KeyboardEvent) => {\n if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n setOpen((open) => !open);\n }\n };\n\n document.addEventListener('keydown', down);\n return () => document.removeEventListener('keydown', down);\n }, []);\n\n return (\n <>\n <Button\n variant=\"outline\"\n className={cn(\n 'relative h-9 w-9 p-0 xl:h-9 xl:w-60 xl:justify-start xl:px-3 xl:py-2',\n triggerClassName,\n )}\n onClick={() => setOpen(true)}\n >\n <IconSearch className=\"h-4 w-4 xl:mr-2\" />\n <span className=\"hidden xl:inline-flex\">Search...</span>\n <kbd className=\"pointer-events-none absolute right-1.5 top-1/2 hidden h-5 -translate-y-1/2 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex\">\n <span className=\"text-xs\">⌘</span>K\n </kbd>\n </Button>\n <CommandDialog\n open={open}\n onOpenChange={setOpen}\n title=\"Search\"\n description=\"Search for pages, actions, and more\"\n showCloseButton={false}\n className={className}\n >\n <CommandInput placeholder={placeholder} onValueChange={onSearch} />\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n {groups.map((group, index) => (\n <React.Fragment key={group.heading}>\n {index > 0 && <CommandSeparator />}\n <CommandGroup heading={group.heading}>\n {group.items.map((item) => (\n <CommandItem\n key={item.id}\n onSelect={() => {\n item.onSelect?.();\n setOpen(false);\n }}\n >\n {item.icon}\n <span>{item.title}</span>\n {item.shortcut && (\n <kbd className=\"pointer-events-none ml-auto hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex\">\n {item.shortcut}\n </kbd>\n )}\n </CommandItem>\n ))}\n </CommandGroup>\n </React.Fragment>\n ))}\n </CommandList>\n </CommandDialog>\n </>\n );\n}\n","'use client';\n\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from '@mesob/ui/components/avatar';\nimport { Button } from '@mesob/ui/components/button';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@mesob/ui/components/dropdown-menu';\nimport { Link } from '@mesob/ui/components/link';\nimport { SpotlightSearch } from '@mesob/ui/components/spotlight-search';\nimport { IconBell, IconLogout } from '@tabler/icons-react';\nimport type * as React from 'react';\n\ntype MenuItem = {\n label: string;\n icon?: React.ReactNode;\n href?: string;\n onClick?: () => void;\n variant?: 'default' | 'destructive';\n};\n\ntype SpotlightGroup = {\n heading: string;\n items: Array<{\n id: string;\n title: string;\n icon?: React.ReactNode;\n shortcut?: string;\n onSelect?: () => void;\n }>;\n};\n\ntype AppHeaderActionsProps = {\n user?: {\n fullName?: string | null;\n email?: string | null;\n phone?: string | null;\n handle?: string | null;\n image?: string | null;\n };\n onLogout?: () => void | Promise<void>;\n isLoggingOut?: boolean;\n searchGroups?: SpotlightGroup[];\n menuItems?: MenuItem[];\n topMenuItems?: MenuItem[];\n actions?: React.ReactNode;\n accountMenuFooter?: React.ReactNode;\n};\n\nexport function AppHeaderActions({\n user,\n onLogout,\n isLoggingOut = false,\n searchGroups = [],\n menuItems = [],\n topMenuItems = [],\n actions,\n accountMenuFooter,\n}: AppHeaderActionsProps) {\n const initials =\n user?.fullName\n ?.split(' ')\n .map((n) => n[0])\n .join('')\n .toUpperCase()\n .slice(0, 2) || 'U';\n\n const displayName = user?.fullName ?? 'Account';\n const displaySubtext = user?.email ?? user?.phone ?? user?.handle ?? '';\n\n return (\n <div className=\"flex items-center gap-2\">\n <SpotlightSearch groups={searchGroups} />\n {actions}\n <Button variant=\"ghost\" size=\"icon\" className=\"relative\">\n <IconBell className=\"size-5\" />\n </Button>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" className=\"flex items-center gap-2 px-2\">\n <Avatar className=\"size-8\">\n <AvatarImage src={user?.image ?? undefined} />\n <AvatarFallback className=\"text-xs\">{initials}</AvatarFallback>\n </Avatar>\n <div className=\"hidden flex-col items-start text-left md:flex\">\n <span className=\"text-sm font-medium\">{displayName}</span>\n <span className=\"text-xs text-muted-foreground\">\n {displaySubtext}\n </span>\n </div>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n {topMenuItems.map((item) => (\n <DropdownMenuItem\n key={item.href ?? item.label}\n onClick={item.onClick}\n variant={item.variant}\n asChild={item.href ? true : undefined}\n >\n {item.href ? (\n <Link href={item.href} onClick={item.onClick}>\n {item.icon && <span className=\"mr-2\">{item.icon}</span>}\n {item.label}\n </Link>\n ) : (\n <>\n {item.icon && <span className=\"mr-2\">{item.icon}</span>}\n {item.label}\n </>\n )}\n </DropdownMenuItem>\n ))}\n {topMenuItems.length > 0 && menuItems.length > 0 && (\n <DropdownMenuSeparator />\n )}\n {menuItems.map((item) => (\n <DropdownMenuItem\n key={item.href ?? item.label}\n onClick={item.onClick}\n variant={item.variant}\n asChild={item.href ? true : undefined}\n >\n {item.href ? (\n <Link href={item.href} onClick={item.onClick}>\n {item.icon && <span className=\"mr-2\">{item.icon}</span>}\n {item.label}\n </Link>\n ) : (\n <>\n {item.icon && <span className=\"mr-2\">{item.icon}</span>}\n {item.label}\n </>\n )}\n </DropdownMenuItem>\n ))}\n {accountMenuFooter &&\n (topMenuItems.length > 0 || menuItems.length > 0) && (\n <DropdownMenuSeparator />\n )}\n {accountMenuFooter}\n {onLogout && (\n <>\n {(topMenuItems.length > 0 ||\n menuItems.length > 0 ||\n accountMenuFooter) && <DropdownMenuSeparator />}\n <DropdownMenuItem onClick={onLogout} variant=\"destructive\">\n {isLoggingOut ? (\n <span className=\"mr-2\">...</span>\n ) : (\n <IconLogout className=\"mr-2 size-4\" />\n )}\n Log out\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n"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K,QAAQ,gBAAAC,MAAC,UAAK,WAAU,QAAQ,eAAK,MAAK;AAAA,cAC/C,KAAK;AAAA,eACR;AAAA;AAAA,UAdG,KAAK,QAAQ,KAAK;AAAA,QAgBzB,CACD;AAAA,QACA,sBACE,aAAa,SAAS,KAAK,UAAU,SAAS,MAC7C,gBAAAA,MAAC,yBAAsB;AAAA,QAE1B;AAAA,QACA,YACC,gBAAAC,MAAAF,WAAA,EACI;AAAA,wBAAa,SAAS,KACtB,UAAU,SAAS,KACnB,sBAAsB,gBAAAC,MAAC,yBAAsB;AAAA,UAC/C,gBAAAC,MAAC,oBAAiB,SAAS,UAAU,SAAQ,eAC1C;AAAA,2BACC,gBAAAD,MAAC,UAAK,WAAU,QAAO,iBAAG,IAE1B,gBAAAA,MAAC,cAAW,WAAU,eAAc;AAAA,YACpC;AAAA,aAEJ;AAAA,WACF;AAAA,SAEJ;AAAA,OACF;AAAA,KACF;AAEJ;","names":["jsx","jsx","jsx","jsx","jsx","jsx","jsxs","jsx","jsx","jsx","jsxs","jsx","jsx","jsxs","jsx","jsx","jsxs","IconSearch","Fragment","jsx","jsxs","open","Fragment","jsx","jsxs"]}
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/components/avatar.tsx","../../src/components/button.tsx","../../src/components/dropdown-menu.tsx","../../src/components/tooltip.tsx","../../src/components/mesob-context.tsx","../../src/components/link.tsx","../../src/components/dialog.tsx","../../src/components/command.tsx","../../src/components/spotlight-search.tsx","../../src/components/app-header-actions.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport { cn } from '@mesob/ui/lib/utils';\nimport * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport type * as React from 'react';\n\nfunction Avatar({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n 'relative flex size-8 shrink-0 overflow-hidden rounded-full',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn('aspect-square size-full', className)}\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n 'bg-muted flex size-full items-center justify-center rounded-full',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarImage, AvatarFallback };\n","import { cn } from '@mesob/ui/lib/utils';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type * as React from 'react';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground hover:bg-primary-600 dark:hover:bg-primary-400',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n outline:\n 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary-600 dark:hover:bg-secondary-400',\n ghost:\n 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:text-primary-600 dark:hover:text-primary-400 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n 'icon-sm': 'size-8',\n 'icon-lg': 'size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\ntype ButtonProps = React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n };\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n leftIcon,\n rightIcon,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {leftIcon}\n {children}\n {rightIcon}\n </>\n )}\n </Comp>\n );\n}\n\nexport { Button, buttonVariants };\n","'use client';\n\nimport { cn } from '@mesob/ui/lib/utils';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { IconCheck, IconChevronRight, IconCircle } from '@tabler/icons-react';\nimport type * as React from 'react';\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground border-border data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n );\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCircle className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n 'px-2 py-1.5 text-sm font-medium data-[inset]:pl-8',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <IconChevronRight className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground border-border data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","'use client';\n\nimport { cn } from '@mesob/ui/lib/utils';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport type * as React from 'react';\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props}>\n {children}\n </TooltipPrimitive.Root>\n );\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n","'use client';\n\nimport { TooltipProvider } from '@mesob/ui/components/tooltip';\nimport {\n type ComponentType,\n createContext,\n type ReactNode,\n useContext,\n useMemo,\n} from 'react';\n\nexport type MesobLinkProps = {\n href: string;\n children: ReactNode;\n className?: string;\n onClick?: () => void;\n};\n\nexport type Router = {\n push: (href: string) => void;\n replace: (href: string) => void;\n back: () => void;\n forward: () => void;\n refresh: () => void;\n prefetch: (href: string) => void;\n};\n\nexport type MesobContextValue = {\n linkComponent?: ComponentType<MesobLinkProps>;\n t?: (key: string, params?: Record<string, string | number>) => string;\n router?: Router;\n};\n\nconst MesobContext = createContext<MesobContextValue | null>(null);\n\nexport type MesobProviderProps = {\n children: ReactNode;\n linkComponent?: ComponentType<MesobLinkProps>;\n /** Hook that returns the app's t function (e.g. from next-intl useTranslations()). */\n useTranslation?: () => (\n key: string,\n params?: Record<string, string | number>,\n ) => string;\n /** Hook that returns the app's router (e.g. from next-intl useRouter()). */\n useRouter?: () => Router;\n};\n\nexport function MesobProvider({\n children,\n linkComponent,\n useTranslation,\n useRouter,\n}: MesobProviderProps) {\n const t = useTranslation?.();\n const router = useRouter?.();\n const value = useMemo<MesobContextValue>(\n () => ({ linkComponent, t: t ?? undefined, router: router ?? undefined }),\n [linkComponent, t, router],\n );\n return (\n <MesobContext.Provider value={value}>\n <TooltipProvider delayDuration={0}>{children}</TooltipProvider>\n </MesobContext.Provider>\n );\n}\n\nexport function useMesob(): MesobContextValue | null {\n return useContext(MesobContext);\n}\n","'use client';\n\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useMesob } from './mesob-context';\n\nexport type LinkProps = {\n href: string;\n children: ReactNode;\n className?: string;\n onClick?: () => void;\n};\n\nexport function Link({\n href,\n children,\n className,\n onClick,\n ...props\n}: LinkProps & ComponentProps<'a'>) {\n const mesob = useMesob();\n const LinkComponent = mesob?.linkComponent ?? 'a';\n\n if (LinkComponent === 'a') {\n return (\n <a href={href} className={className} onClick={onClick} {...props}>\n {children}\n </a>\n );\n }\n\n return (\n <LinkComponent\n href={href}\n className={className}\n onClick={onClick}\n {...props}\n >\n {children}\n </LinkComponent>\n );\n}\n","'use client';\n\nimport { cn } from '@mesob/ui/lib/utils';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { IconX } from '@tabler/icons-react';\nimport type * as React from 'react';\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:opacity-100 fixed inset-0 z-50 bg-[var(--overlay,oklch(0_0_0/0.5))]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'bg-background text-foreground border-border data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[51] grid w-full min-w-[280px] max-w-[calc(100vw-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:min-w-[320px] sm:max-w-[32rem]',\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <IconX />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-lg leading-none font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","'use client';\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '@mesob/ui/components/dialog';\nimport { cn } from '@mesob/ui/lib/utils';\nimport { IconSearch } from '@tabler/icons-react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport type * as React from 'react';\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex h-full min-h-0 w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('overflow-hidden p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"border-border flex h-9 items-center gap-2 border-b px-3\"\n >\n <IconSearch className=\"size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"text-muted-foreground py-6 text-center text-sm\"\n {...props}\n />\n );\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","'use client';\n\nimport { Button } from '@mesob/ui/components/button';\nimport {\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n} from '@mesob/ui/components/command';\nimport { cn } from '@mesob/ui/lib/utils';\nimport { IconSearch } from '@tabler/icons-react';\nimport * as React from 'react';\n\ntype SpotlightItem = {\n id: string;\n title: string;\n icon?: React.ReactNode;\n shortcut?: string;\n onSelect?: () => void;\n};\n\ntype SpotlightGroup = {\n heading: string;\n items: SpotlightItem[];\n};\n\ntype SpotlightSearchProps = {\n groups?: SpotlightGroup[];\n placeholder?: string;\n emptyMessage?: string;\n className?: string;\n triggerClassName?: string;\n onSearch?: (query: string) => void;\n};\n\nexport function SpotlightSearch({\n groups = [],\n placeholder = 'Search...',\n emptyMessage = 'No results found.',\n className,\n triggerClassName,\n onSearch,\n}: SpotlightSearchProps) {\n const [open, setOpen] = React.useState(false);\n\n React.useEffect(() => {\n const down = (e: KeyboardEvent) => {\n if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n setOpen((open) => !open);\n }\n };\n\n document.addEventListener('keydown', down);\n return () => document.removeEventListener('keydown', down);\n }, []);\n\n return (\n <>\n <Button\n variant=\"outline\"\n className={cn(\n 'relative h-9 min-w-9 p-0 xl:h-9 xl:min-w-[12rem] xl:w-60 xl:justify-start xl:px-3 xl:py-2',\n triggerClassName,\n )}\n onClick={() => setOpen(true)}\n >\n <IconSearch className=\"h-4 w-4 xl:mr-2\" />\n <span className=\"hidden xl:inline-flex\">Search...</span>\n <kbd className=\"border-border pointer-events-none absolute right-1.5 top-1/2 hidden h-5 -translate-y-1/2 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex\">\n <span className=\"text-xs\">⌘</span>K\n </kbd>\n </Button>\n <CommandDialog\n open={open}\n onOpenChange={setOpen}\n title=\"Search\"\n description=\"Search for pages, actions, and more\"\n showCloseButton={false}\n className={className}\n >\n <CommandInput placeholder={placeholder} onValueChange={onSearch} />\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n {groups.map((group, index) => (\n <React.Fragment key={group.heading}>\n {index > 0 && <CommandSeparator />}\n <CommandGroup heading={group.heading}>\n {group.items.map((item) => (\n <CommandItem\n key={item.id}\n onSelect={() => {\n item.onSelect?.();\n setOpen(false);\n }}\n >\n {item.icon}\n <span>{item.title}</span>\n {item.shortcut && (\n <kbd className=\"border-border pointer-events-none ml-auto hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex\">\n {item.shortcut}\n </kbd>\n )}\n </CommandItem>\n ))}\n </CommandGroup>\n </React.Fragment>\n ))}\n </CommandList>\n </CommandDialog>\n </>\n );\n}\n","'use client';\n\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from '@mesob/ui/components/avatar';\nimport { Button } from '@mesob/ui/components/button';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@mesob/ui/components/dropdown-menu';\nimport { Link } from '@mesob/ui/components/link';\nimport { SpotlightSearch } from '@mesob/ui/components/spotlight-search';\nimport { IconBell, IconLogout } from '@tabler/icons-react';\nimport type * as React from 'react';\n\ntype MenuItem = {\n label: string;\n icon?: React.ReactNode;\n href?: string;\n onClick?: () => void;\n variant?: 'default' | 'destructive';\n};\n\ntype SpotlightGroup = {\n heading: string;\n items: Array<{\n id: string;\n title: string;\n icon?: React.ReactNode;\n shortcut?: string;\n onSelect?: () => void;\n }>;\n};\n\ntype AppHeaderActionsProps = {\n user?: {\n fullName?: string | null;\n email?: string | null;\n phone?: string | null;\n handle?: string | null;\n image?: string | null;\n };\n onLogout?: () => void | Promise<void>;\n isLoggingOut?: boolean;\n searchGroups?: SpotlightGroup[];\n menuItems?: MenuItem[];\n topMenuItems?: MenuItem[];\n actions?: React.ReactNode;\n accountMenuFooter?: React.ReactNode;\n};\n\nexport function AppHeaderActions({\n user,\n onLogout,\n isLoggingOut = false,\n searchGroups = [],\n menuItems = [],\n topMenuItems = [],\n actions,\n accountMenuFooter,\n}: AppHeaderActionsProps) {\n const initials =\n user?.fullName\n ?.split(' ')\n .map((n) => n[0])\n .join('')\n .toUpperCase()\n .slice(0, 2) || 'U';\n\n const displayName = user?.fullName ?? 'Account';\n const displaySubtext = user?.email ?? user?.phone ?? user?.handle ?? '';\n\n return (\n <div className=\"flex items-center gap-2\">\n <SpotlightSearch groups={searchGroups} />\n {actions}\n <Button variant=\"ghost\" size=\"icon\" className=\"relative\">\n <IconBell className=\"size-5\" />\n </Button>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n className=\"flex items-center gap-3 px-3 py-2 h-auto rounded-md min-h-9 hover:bg-accent/70 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\"\n >\n <Avatar className=\"size-8 shrink-0\">\n <AvatarImage src={user?.image ?? undefined} />\n <AvatarFallback className=\"text-xs\">{initials}</AvatarFallback>\n </Avatar>\n <div className=\"hidden flex-col items-start text-left md:flex min-w-0\">\n <span className=\"text-sm font-medium\">{displayName}</span>\n <span className=\"text-xs text-muted-foreground\">\n {displaySubtext}\n </span>\n </div>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n {topMenuItems.map((item) => (\n <DropdownMenuItem\n key={item.href ?? item.label}\n onClick={item.onClick}\n variant={item.variant}\n asChild={item.href ? true : undefined}\n >\n {item.href ? (\n <Link href={item.href} onClick={item.onClick}>\n {item.icon && <span className=\"mr-2\">{item.icon}</span>}\n {item.label}\n </Link>\n ) : (\n <>\n {item.icon && <span className=\"mr-2\">{item.icon}</span>}\n {item.label}\n </>\n )}\n </DropdownMenuItem>\n ))}\n {topMenuItems.length > 0 && menuItems.length > 0 && (\n <DropdownMenuSeparator />\n )}\n {menuItems.map((item) => (\n <DropdownMenuItem\n key={item.href ?? item.label}\n onClick={item.onClick}\n variant={item.variant}\n asChild={item.href ? true : undefined}\n >\n {item.href ? (\n <Link href={item.href} onClick={item.onClick}>\n {item.icon && <span className=\"mr-2\">{item.icon}</span>}\n {item.label}\n </Link>\n ) : (\n <>\n {item.icon && <span className=\"mr-2\">{item.icon}</span>}\n {item.label}\n </>\n )}\n </DropdownMenuItem>\n ))}\n {accountMenuFooter &&\n (topMenuItems.length > 0 || menuItems.length > 0) && (\n <DropdownMenuSeparator />\n )}\n {accountMenuFooter}\n {onLogout && (\n <>\n {(topMenuItems.length > 0 ||\n menuItems.length > 0 ||\n accountMenuFooter) && <DropdownMenuSeparator />}\n <DropdownMenuItem onClick={onLogout} variant=\"destructive\">\n {isLoggingOut ? (\n <span className=\"mr-2\">...</span>\n ) : (\n <IconLogout className=\"mr-2 size-4\" />\n )}\n Log out\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n"],"mappings":";;;AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACFA,YAAY,qBAAqB;AAQ7B;AALJ,SAAS,OAAO;AAAA,EACd;AAAA,EACA,GAAG;AACL,GAAsD;AACpD,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA,GAAG;AACL,GAAuD;AACrD,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,2BAA2B,SAAS;AAAA,MACjD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA,GAAG;AACL,GAA0D;AACxD,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;;;AChDA,SAAS,YAAY;AACrB,SAAS,WAA8B;AAwDnC,SAQI,UARJ,OAAAA,MAQI,YARJ;AArDJ,IAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,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18 +86,18 @@ function Link({
|
|
|
86
86
|
// src/components/button.tsx
|
|
87
87
|
import { Slot } from "@radix-ui/react-slot";
|
|
88
88
|
import { cva } from "class-variance-authority";
|
|
89
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
89
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
90
90
|
var buttonVariants = cva(
|
|
91
91
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
92
92
|
{
|
|
93
93
|
variants: {
|
|
94
94
|
variant: {
|
|
95
|
-
default: "bg-primary text-primary-foreground hover:bg-primary
|
|
96
|
-
destructive: "bg-destructive text-
|
|
97
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
98
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary
|
|
95
|
+
default: "bg-primary text-primary-foreground hover:bg-primary-600 dark:hover:bg-primary-400",
|
|
96
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
97
|
+
outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
98
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary-600 dark:hover:bg-secondary-400",
|
|
99
99
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
100
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
100
|
+
link: "text-primary underline-offset-4 hover:text-primary-600 dark:hover:text-primary-400 hover:underline"
|
|
101
101
|
},
|
|
102
102
|
size: {
|
|
103
103
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
@@ -125,7 +125,7 @@ import { jsx as jsx6 } from "react/jsx-runtime";
|
|
|
125
125
|
// src/components/sheet.tsx
|
|
126
126
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
127
127
|
import { IconX } from "@tabler/icons-react";
|
|
128
|
-
import { jsx as jsx7, jsxs as
|
|
128
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
129
129
|
function Sheet({ ...props }) {
|
|
130
130
|
return /* @__PURE__ */ jsx7(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
131
131
|
}
|
|
@@ -143,7 +143,7 @@ function SheetOverlay({
|
|
|
143
143
|
{
|
|
144
144
|
"data-slot": "sheet-overlay",
|
|
145
145
|
className: cn(
|
|
146
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-
|
|
146
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:opacity-100 fixed inset-0 z-50 bg-[var(--overlay,oklch(0_0_0/0.5))]",
|
|
147
147
|
className
|
|
148
148
|
),
|
|
149
149
|
...props
|
|
@@ -156,14 +156,14 @@ function SheetContent({
|
|
|
156
156
|
side = "right",
|
|
157
157
|
...props
|
|
158
158
|
}) {
|
|
159
|
-
return /* @__PURE__ */
|
|
159
|
+
return /* @__PURE__ */ jsxs3(SheetPortal, { children: [
|
|
160
160
|
/* @__PURE__ */ jsx7(SheetOverlay, {}),
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ jsxs3(
|
|
162
162
|
SheetPrimitive.Content,
|
|
163
163
|
{
|
|
164
164
|
"data-slot": "sheet-content",
|
|
165
165
|
className: cn(
|
|
166
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-
|
|
166
|
+
"bg-background text-foreground border-border data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:opacity-100 fixed z-[51] flex min-w-0 flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
167
167
|
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
168
168
|
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
169
169
|
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
@@ -173,7 +173,7 @@ function SheetContent({
|
|
|
173
173
|
...props,
|
|
174
174
|
children: [
|
|
175
175
|
children,
|
|
176
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ jsxs3(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
177
177
|
/* @__PURE__ */ jsx7(IconX, { className: "size-4" }),
|
|
178
178
|
/* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Close" })
|
|
179
179
|
] })
|
|
@@ -229,10 +229,10 @@ import * as React from "react";
|
|
|
229
229
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
230
230
|
import { IconMenu2 } from "@tabler/icons-react";
|
|
231
231
|
import { cva as cva2 } from "class-variance-authority";
|
|
232
|
+
import * as React3 from "react";
|
|
233
|
+
|
|
234
|
+
// src/components/sidebar-context.tsx
|
|
232
235
|
import * as React2 from "react";
|
|
233
|
-
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
234
|
-
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
235
|
-
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
236
236
|
var SidebarContext = React2.createContext(null);
|
|
237
237
|
function useSidebar() {
|
|
238
238
|
const context = React2.useContext(SidebarContext);
|
|
@@ -241,6 +241,11 @@ function useSidebar() {
|
|
|
241
241
|
}
|
|
242
242
|
return context;
|
|
243
243
|
}
|
|
244
|
+
|
|
245
|
+
// src/components/sidebar.tsx
|
|
246
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
247
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
248
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
244
249
|
function Sidebar({
|
|
245
250
|
side = "left",
|
|
246
251
|
variant = "sidebar",
|
|
@@ -265,7 +270,7 @@ function Sidebar({
|
|
|
265
270
|
);
|
|
266
271
|
}
|
|
267
272
|
if (isMobile) {
|
|
268
|
-
return /* @__PURE__ */ jsx9(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */
|
|
273
|
+
return /* @__PURE__ */ jsx9(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs4(
|
|
269
274
|
SheetContent,
|
|
270
275
|
{
|
|
271
276
|
"data-sidebar": "sidebar",
|
|
@@ -277,7 +282,7 @@ function Sidebar({
|
|
|
277
282
|
},
|
|
278
283
|
side,
|
|
279
284
|
children: [
|
|
280
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ jsxs4(SheetHeader, { className: "sr-only", children: [
|
|
281
286
|
/* @__PURE__ */ jsx9(SheetTitle, { children: "Sidebar" }),
|
|
282
287
|
/* @__PURE__ */ jsx9(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
283
288
|
] }),
|
|
@@ -286,7 +291,7 @@ function Sidebar({
|
|
|
286
291
|
}
|
|
287
292
|
) });
|
|
288
293
|
}
|
|
289
|
-
return /* @__PURE__ */
|
|
294
|
+
return /* @__PURE__ */ jsxs4(
|
|
290
295
|
"div",
|
|
291
296
|
{
|
|
292
297
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -441,7 +446,7 @@ var sidebarMenuButtonVariants = cva2(
|
|
|
441
446
|
import { IconChevronDown } from "@tabler/icons-react";
|
|
442
447
|
import { useEffect as useEffect3, useRef, useState as useState3 } from "react";
|
|
443
448
|
import { useToggle } from "react-use";
|
|
444
|
-
import { Fragment, jsx as jsx10, jsxs as
|
|
449
|
+
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
445
450
|
function isLinkActive(pathname, href, pathMatch = "prefix") {
|
|
446
451
|
if (!pathname) {
|
|
447
452
|
return false;
|
|
@@ -498,13 +503,13 @@ function TruncationTooltip({
|
|
|
498
503
|
if (!showTooltip) {
|
|
499
504
|
return inner;
|
|
500
505
|
}
|
|
501
|
-
return /* @__PURE__ */
|
|
506
|
+
return /* @__PURE__ */ jsxs5(Tooltip, { children: [
|
|
502
507
|
/* @__PURE__ */ jsx10(TooltipTrigger, { asChild: true, children: inner }),
|
|
503
508
|
/* @__PURE__ */ jsx10(TooltipContent, { side: "right", sideOffset: 8, children: text })
|
|
504
509
|
] });
|
|
505
510
|
}
|
|
506
511
|
function MenuLabel({ icon: Icon, label }) {
|
|
507
|
-
return /* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ jsxs5("div", { className: "text-sidebar-foreground flex min-h-0 min-w-0 flex-1 cursor-pointer items-center gap-2 text-sm", children: [
|
|
508
513
|
Icon ? /* @__PURE__ */ jsx10(Icon, { className: "size-4 shrink-0" }) : null,
|
|
509
514
|
/* @__PURE__ */ jsx10(TruncationTooltip, { text: label, children: label })
|
|
510
515
|
] });
|
|
@@ -514,7 +519,7 @@ function RowContent({
|
|
|
514
519
|
hasChildren,
|
|
515
520
|
showChildren
|
|
516
521
|
}) {
|
|
517
|
-
return /* @__PURE__ */
|
|
522
|
+
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
518
523
|
/* @__PURE__ */ jsx10(MenuLabel, { icon: item.icon, label: item.title }),
|
|
519
524
|
hasChildren && /* @__PURE__ */ jsx10(
|
|
520
525
|
IconChevronDown,
|
|
@@ -550,7 +555,7 @@ function NavItemRow({
|
|
|
550
555
|
"hover:bg-sidebar-active",
|
|
551
556
|
isActive && "bg-sidebar-active text-sidebar-primary"
|
|
552
557
|
);
|
|
553
|
-
const rowContent = /* @__PURE__ */
|
|
558
|
+
const rowContent = /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
554
559
|
isActive && /* @__PURE__ */ jsx10(
|
|
555
560
|
"div",
|
|
556
561
|
{
|
|
@@ -567,7 +572,7 @@ function NavItemRow({
|
|
|
567
572
|
}
|
|
568
573
|
)
|
|
569
574
|
] });
|
|
570
|
-
return /* @__PURE__ */
|
|
575
|
+
return /* @__PURE__ */ jsxs5("li", { className: "relative mt-1", children: [
|
|
571
576
|
item.href ? /* @__PURE__ */ jsx10(
|
|
572
577
|
Link,
|
|
573
578
|
{
|
|
@@ -590,7 +595,7 @@ function NavItemRow({
|
|
|
590
595
|
children: rowContent
|
|
591
596
|
}
|
|
592
597
|
),
|
|
593
|
-
showChildren && /* @__PURE__ */
|
|
598
|
+
showChildren && /* @__PURE__ */ jsxs5("ul", { className: "relative mt-1", children: [
|
|
594
599
|
/* @__PURE__ */ jsx10(
|
|
595
600
|
"div",
|
|
596
601
|
{
|
|
@@ -637,14 +642,14 @@ function AppSidebar({
|
|
|
637
642
|
},
|
|
638
643
|
{}
|
|
639
644
|
);
|
|
640
|
-
return /* @__PURE__ */
|
|
645
|
+
return /* @__PURE__ */ jsxs5(Sidebar, { children: [
|
|
641
646
|
/* @__PURE__ */ jsx10(SidebarHeader, { children: logo }),
|
|
642
647
|
/* @__PURE__ */ jsx10(SidebarContent, { children: /* @__PURE__ */ jsx10(
|
|
643
648
|
"nav",
|
|
644
649
|
{
|
|
645
650
|
"aria-label": "Main navigation",
|
|
646
|
-
className: "flex min-h-0 min-w-0 flex-1 flex-col
|
|
647
|
-
children: Object.entries(groupedItems).map(([groupName, items]) => /* @__PURE__ */
|
|
651
|
+
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto",
|
|
652
|
+
children: Object.entries(groupedItems).map(([groupName, items]) => /* @__PURE__ */ jsxs5(SidebarGroup, { className: "py-0", children: [
|
|
648
653
|
groupName !== "default" && /* @__PURE__ */ jsx10(SidebarGroupLabel, { className: "uppercase tracking-wide", children: groupName }),
|
|
649
654
|
/* @__PURE__ */ jsx10(SidebarGroupContent, { children: /* @__PURE__ */ jsx10("ul", { className: "flex w-full min-w-0 list-none flex-col gap-0 p-0", children: items.map((item) => /* @__PURE__ */ jsx10(
|
|
650
655
|
NavItemRow,
|