@crazy-staff/ui 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/LICENSE +21 -0
- package/README.md +51 -2
- package/dist/index.d.ts +3887 -0
- package/dist/index.js +7687 -0
- package/dist/index.js.map +1 -0
- package/package.json +80 -4
- package/src/styles/theme.css +247 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["BaseButton","BaseInput","BaseSwitch","styles","EASE","styles","BaseField","styles","BaseCheckbox","BaseCheckboxGroup","styles","BaseRadio","BaseRadioGroup","styles","BaseSelect","styles","BaseSlider","BaseToggle","glide","BaseToggle","BaseToggleGroup","SizeContext","BaseInput","SizeContext","BaseNumberField","styles","BaseTooltip","styles","BasePopover","styles","BaseDialog","styles","BaseAlertDialog","styles","BaseDialog","styles","BaseDrawer","styles","styles","BaseContextMenu","styles","styles","BaseToast","ICONS","OptionsContext","useStyles","BaseTabs","BaseAccordion","s","BaseCollapsible","SizeContext","BaseAvatar","BaseSeparator","BaseProgress","s","s","s","s","BaseScrollArea","styles","styles","SizeContext","BaseCombobox","styles","BaseDialog","styles","BaseMenubar","BaseNav","TanStackRendererChart","TanStackChart","motion","s","s","Separator","s","BaseDialog","s","Kbd"],"sources":["../src/lib/tv.ts","../src/lib/squircle.ts","../src/components/button/button.styles.ts","../src/components/button/button.tsx","../src/components/chip/chip.styles.ts","../src/components/chip/chip.tsx","../src/components/input/input.styles.ts","../src/components/input/input.tsx","../src/components/switch/switch.styles.ts","../src/components/switch/switch.tsx","../src/components/card/card.styles.ts","../src/components/card/card.tsx","../src/components/reveal/reveal.tsx","../src/components/label/label.styles.ts","../src/components/label/label.tsx","../src/components/field/field.styles.ts","../src/components/field/field.tsx","../src/components/textarea/textarea.styles.ts","../src/components/textarea/textarea.tsx","../src/components/checkbox/checkbox.styles.ts","../src/components/checkbox/checkbox.tsx","../src/components/radio-group/radio-group.styles.ts","../src/components/radio-group/radio-group.tsx","../src/components/select/select.styles.ts","../src/components/select/select.tsx","../src/components/slider/slider.styles.ts","../src/components/slider/slider.tsx","../src/components/toggle/toggle.styles.ts","../src/components/toggle/toggle.tsx","../src/components/sidebar/glide.ts","../src/components/toggle-group/toggle-group.styles.ts","../src/components/toggle-group/toggle-group.tsx","../src/components/kbd/kbd.styles.ts","../src/components/kbd/kbd.tsx","../src/components/input-group/input-group.styles.ts","../src/components/input-group/input-group.tsx","../src/components/button-group/button-group.styles.ts","../src/components/button-group/button-group.tsx","../src/components/number-field/number-field.styles.ts","../src/components/number-field/number-field.tsx","../src/components/popover/popover.styles.ts","../src/components/tooltip/tooltip.styles.ts","../src/components/tooltip/tooltip.tsx","../src/components/popover/popover.tsx","../src/components/dialog/dialog.styles.ts","../src/components/dialog/dialog.tsx","../src/components/alert-dialog/alert-dialog.styles.ts","../src/components/alert-dialog/alert-dialog.tsx","../src/components/sheet/sheet.styles.ts","../src/components/sheet/sheet.tsx","../src/components/drawer/drawer.styles.ts","../src/components/drawer/drawer.tsx","../src/components/dropdown-menu/dropdown-menu.styles.ts","../src/components/dropdown-menu/dropdown-menu.tsx","../src/components/context-menu/context-menu.styles.ts","../src/components/context-menu/context-menu.tsx","../src/components/hover-card/hover-card.styles.ts","../src/components/hover-card/hover-card.tsx","../src/components/toast/toast.styles.ts","../src/components/toast/toast.tsx","../src/components/tabs/tabs.styles.ts","../src/components/tabs/tabs.tsx","../src/components/accordion/accordion.styles.ts","../src/components/accordion/accordion.tsx","../src/components/collapsible/collapsible.styles.ts","../src/components/collapsible/collapsible.tsx","../src/components/avatar/avatar.styles.ts","../src/components/avatar/avatar.tsx","../src/components/alert/alert.styles.ts","../src/components/alert/alert.tsx","../src/components/separator/separator.styles.ts","../src/components/separator/separator.tsx","../src/components/skeleton/skeleton.styles.ts","../src/components/skeleton/skeleton.tsx","../src/components/spinner/spinner.styles.ts","../src/components/spinner/spinner.tsx","../src/components/progress/progress.styles.ts","../src/components/progress/progress.tsx","../src/components/breadcrumb/breadcrumb.styles.ts","../src/components/breadcrumb/breadcrumb.tsx","../src/components/pagination/pagination.styles.ts","../src/components/pagination/pagination.tsx","../src/components/empty/empty.styles.ts","../src/components/empty/empty.tsx","../src/components/scroll-area/scroll-area.styles.ts","../src/components/scroll-area/scroll-area.tsx","../src/components/table/table.styles.ts","../src/components/table/table.tsx","../src/components/aspect-ratio/aspect-ratio.styles.ts","../src/components/aspect-ratio/aspect-ratio.tsx","../src/components/calendar/calendar.styles.ts","../src/components/calendar/calendar.tsx","../src/components/date-picker/date-picker.styles.ts","../src/components/date-picker/date-picker.tsx","../src/components/combobox/combobox.styles.ts","../src/components/combobox/combobox.tsx","../src/components/command/command.styles.ts","../src/components/command/command.tsx","../src/components/input-otp/input-otp.styles.ts","../src/components/input-otp/input-otp.tsx","../src/components/native-select/native-select.styles.ts","../src/components/native-select/native-select.tsx","../src/components/menubar/menubar.styles.ts","../src/components/menubar/menubar.tsx","../src/components/navigation-menu/navigation-menu.styles.ts","../src/components/navigation-menu/navigation-menu.tsx","../src/components/carousel/carousel.styles.ts","../src/components/carousel/carousel.tsx","../src/components/chart/chart.styles.ts","../src/components/chart/curves.ts","../src/components/chart/format.ts","../src/components/chart/chart.tsx","../src/components/code-block/code-block.styles.ts","../src/components/code-block/code-block.tsx","../src/components/data-table/data-table.styles.ts","../src/components/data-table/data-table.tsx","../src/components/resizable/resizable.styles.ts","../src/components/resizable/resizable.tsx","../src/components/sidebar/sidebar.styles.ts","../src/components/sidebar/sidebar.tsx","../src/components/typography/typography.styles.ts","../src/components/typography/typography.tsx","../src/components/item/item.styles.ts","../src/components/item/item.tsx","../src/components/progressive-blur/progressive-blur.styles.ts","../src/components/progressive-blur/progressive-blur.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\nimport { createTV } from 'tailwind-variants/config';\n\n/**\n * tailwind-merge has to know our theme keys, otherwise it can't tell that\n * `rounded-card` overrides `rounded-control` or that `h-control` is a height.\n * The same config feeds both `cn()` and the `tv()` factory so a single merge\n * table is used everywhere.\n */\nexport const twMergeConfig = {\n extend: {\n theme: {\n color: [\n 'background',\n 'foreground',\n 'frame',\n 'popover',\n 'hover',\n 'surface',\n 'surface-2',\n 'muted',\n 'border',\n 'border-strong',\n 'input',\n 'input-border',\n 'ring',\n 'accent',\n 'accent-foreground',\n 'accent-soft',\n 'accent-soft-foreground',\n 'danger',\n 'danger-foreground',\n 'success',\n 'warning',\n ],\n radius: ['chip', 'control-sm', 'control', 'control-lg', 'item', 'card', 'panel', 'switch'],\n shadow: ['control', 'button', 'glow', 'card', 'card-hover', 'overlay'],\n font: ['sans', 'mono', 'heading'],\n spacing: ['control', 'control-sm', 'control-lg'],\n ease: ['ui', 'spring'],\n },\n },\n} as const;\n\nconst twMerge = extendTailwindMerge(twMergeConfig);\n\n/** Join class names and resolve Tailwind conflicts (last one wins). */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/** `tv` preconfigured with our tailwind-merge table. */\nexport const tv = createTV({ twMergeConfig });\n\nexport type { VariantProps } from 'tailwind-variants';\n","import { registerHyperellipse } from 'hyperellipse';\n\ntype Options = Parameters<typeof registerHyperellipse>[0];\nlet fallback: boolean | undefined;\n\n/**\n * Turns on squircle corners everywhere the `squircle` class is used. Chromium renders the CSS\n * `corner-shape` property natively; Firefox (Zen) and Safari get the `hyperellipse` fallback.\n * Call once on the client; calling again returns the same controller. No-op during SSR.\n *\n * When the fallback runs, `<html data-squircle-fallback>` is set. The theme then stops\n * transitioning background, border and shadow on squircle elements: the fallback paints them\n * into an SVG layer from the computed style and would capture a half-way (transparent) colour.\n */\nexport function registerSquircles(options?: Options) {\n const controller = registerHyperellipse(options);\n if (typeof document !== 'undefined') {\n fallback ??= Boolean(options?.force) || !controller.supported;\n document.documentElement.toggleAttribute('data-squircle-fallback', fallback);\n }\n return controller;\n}\n","import { tv } from '../../lib/tv';\n\nexport const buttonStyles = tv({\n base: [\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap select-none',\n 'squircle border font-[weight:var(--cui-control-weight)]',\n 'outline-none transition-[transform,background-color,border-color,box-shadow,color]',\n 'duration-[var(--cui-duration-fast)] ease-spring',\n 'focus-visible:ring-[3px] focus-visible:ring-ring',\n 'active:scale-[var(--cui-press-scale)]',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n ],\n variants: {\n variant: {\n solid: 'border-transparent bg-accent text-accent-foreground shadow-button hover:brightness-105',\n soft: 'border-transparent bg-accent-soft text-accent-soft-foreground hover:brightness-105',\n outline:\n 'border-border-strong bg-transparent text-foreground hover:bg-surface-2',\n ghost: 'border-transparent bg-transparent text-foreground hover:bg-surface-2',\n danger: 'border-transparent bg-danger text-danger-foreground hover:brightness-105',\n },\n size: {\n sm: 'h-control-sm rounded-control-sm px-3 text-xs [&_svg]:size-3.5',\n md: 'h-control rounded-control px-4 text-sm [&_svg]:size-4',\n lg: 'h-control-lg rounded-control-lg px-5 text-base [&_svg]:size-5',\n icon: 'h-control w-control rounded-control [&_svg]:size-4',\n 'icon-sm': 'h-control-sm w-control-sm rounded-control-sm [&_svg]:size-3.5',\n },\n /** A soft accent glow under solid buttons. Off by default; use it for the one main action. */\n glow: {\n true: 'shadow-glow',\n false: '',\n },\n },\n defaultVariants: {\n variant: 'solid',\n size: 'md',\n glow: false,\n },\n});\n","import { Button as BaseButton } from '@base-ui/react/button';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { buttonStyles } from './button.styles';\n\nexport interface ButtonProps\n extends React.ComponentPropsWithRef<typeof BaseButton>,\n VariantProps<typeof buttonStyles> {}\n\n/**\n * The primary action control. Token-driven: radius, height, shadow and accent\n * all come from `--cui-*`, so an app restyles every button by overriding tokens.\n */\nexport function Button({ className, variant, size, glow, ...props }: ButtonProps) {\n return <BaseButton className={cn(buttonStyles({ variant, size, glow }), className)} {...props} />;\n}\n","import { tv } from '../../lib/tv';\n\nexport const chipStyles = tv({\n base: [\n 'squircle inline-flex items-center gap-1 rounded-chip whitespace-nowrap font-medium',\n '[&_svg]:shrink-0',\n ],\n variants: {\n variant: {\n soft: 'bg-accent-soft text-accent-soft-foreground',\n solid: 'bg-accent text-accent-foreground',\n outline: 'border border-border-strong text-muted',\n neutral: 'bg-surface-2 text-muted',\n /** Status chips: a faint tint of the status colour with the colour itself as ink. */\n success: 'bg-success/12 text-success',\n warning: 'bg-warning/12 text-warning',\n danger: 'bg-danger/12 text-danger',\n },\n size: {\n sm: 'h-5 px-1.5 text-[0.6875rem] [&_svg]:size-3',\n md: 'h-6 px-2 text-xs [&_svg]:size-3.5',\n },\n },\n defaultVariants: { variant: 'soft', size: 'md' },\n});\n","import * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { chipStyles } from './chip.styles';\n\nexport interface ChipProps extends React.ComponentPropsWithRef<'span'>, VariantProps<typeof chipStyles> {}\n\n/** A small status label (\"verified\", \"new\", a tag). Smallest radius of the scale. */\nexport function Chip({ className, variant, size, ...props }: ChipProps) {\n return <span className={cn(chipStyles({ variant, size }), className)} {...props} />;\n}\n","import { tv } from '../../lib/tv';\n\nexport const inputStyles = tv({\n base: [\n 'squircle flex w-full items-center border border-input-border bg-input',\n 'text-foreground text-sm placeholder:text-muted',\n // focus and invalid show on the border only: no ring or shadow on a squircle <input>\n 'outline-none transition-[border-color] duration-[var(--cui-duration-fast)] ease-ui',\n 'focus-visible:border-accent disabled:cursor-not-allowed disabled:opacity-50',\n 'read-only:bg-surface-2/60',\n // no native spinner buttons on type=number: use NumberField for steppers\n '[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n 'aria-[invalid=true]:border-danger data-[invalid]:border-danger',\n ],\n variants: {\n size: {\n sm: 'h-control-sm rounded-control-sm px-2.5',\n md: 'h-control rounded-control px-3.5',\n lg: 'h-control-lg rounded-control-lg px-4 text-base',\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { Input as BaseInput } from '@base-ui/react/input';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { inputStyles } from './input.styles';\n\nexport interface InputProps\n extends Omit<React.ComponentPropsWithRef<typeof BaseInput>, 'size'>,\n VariantProps<typeof inputStyles> {}\n\n/** A single-line text field. Works standalone or inside a Base UI `Field`. */\nexport function Input({ className, size, ...props }: InputProps) {\n return <BaseInput className={cn(inputStyles({ size }), className)} {...props} />;\n}\n","import { tv } from '../../lib/tv';\n\nexport const switchStyles = tv({\n slots: {\n root: [\n 'group relative inline-flex shrink-0 items-center rounded-switch p-0.5',\n 'border border-transparent bg-border-strong',\n 'outline-none transition-colors duration-[var(--cui-duration-normal)] ease-ui',\n 'focus-visible:ring-[3px] focus-visible:ring-ring',\n 'data-[checked]:bg-accent',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n 'data-[invalid]:border-danger',\n ],\n thumb: [\n 'block rounded-switch bg-background shadow-control',\n 'transition-transform duration-[var(--cui-duration-normal)] ease-spring',\n 'data-[checked]:bg-accent-foreground',\n ],\n label: [\n 'flex cursor-pointer items-center justify-between gap-4 text-sm text-foreground select-none',\n 'has-[[data-disabled]]:cursor-not-allowed has-[[data-disabled]]:opacity-50',\n ],\n text: 'flex flex-col gap-0.5',\n description: 'text-xs text-muted',\n },\n variants: {\n size: {\n sm: { root: 'h-4 w-7', thumb: 'size-3 data-[checked]:translate-x-3' },\n md: { root: 'h-5 w-9', thumb: 'size-4 data-[checked]:translate-x-4' },\n lg: { root: 'h-6 w-11', thumb: 'size-5 data-[checked]:translate-x-5' },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { Switch as BaseSwitch } from '@base-ui/react/switch';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { switchStyles } from './switch.styles';\n\nexport interface SwitchProps\n extends Omit<React.ComponentPropsWithRef<typeof BaseSwitch.Root>, 'className'>,\n VariantProps<typeof switchStyles> {\n /** Text next to the switch; the whole row becomes clickable. */\n label?: React.ReactNode;\n /** A muted line under the label. */\n description?: React.ReactNode;\n /** Classes for the row (or the switch, without a label), merged last. */\n className?: string;\n /** Override individual slot class names. */\n classNames?: { root?: string; thumb?: string; label?: string; description?: string };\n}\n\n/**\n * An on/off switch. The thumb glides with a spring ease (zeroed by reduced motion through the tokens).\n * With `label`, the switch sits at the end of a clickable row, like a settings list.\n */\nexport function Switch({ className, classNames, size, label, description, ...props }: SwitchProps) {\n const styles = switchStyles({ size });\n const control = (\n <BaseSwitch.Root className={cn(styles.root(), classNames?.root, !label && className)} {...props}>\n <BaseSwitch.Thumb className={cn(styles.thumb(), classNames?.thumb)} />\n </BaseSwitch.Root>\n );\n if (!label) return control;\n return (\n <label className={cn(styles.label(), classNames?.label, className)}>\n <span className={styles.text()}>\n {label}\n {description && <span className={cn(styles.description(), classNames?.description)}>{description}</span>}\n </span>\n {control}\n </label>\n );\n}\n","import { tv } from '../../lib/tv';\n\nexport const cardStyles = tv({\n slots: {\n root: [\n 'squircle rounded-card border border-border bg-surface text-foreground shadow-card',\n 'transition-[box-shadow,transform,border-color] duration-[var(--cui-duration-normal)] ease-ui',\n ],\n header: 'flex flex-col gap-1 p-5 pb-0',\n title: 'font-heading font-[weight:var(--cui-heading-weight)] tracking-[var(--cui-heading-tracking)] text-base',\n description: 'text-sm text-muted',\n body: 'p-5',\n footer: 'flex items-center gap-2 p-5 pt-0',\n },\n variants: {\n interactive: {\n true: {\n root: 'cursor-pointer hover:border-border-strong hover:shadow-card-hover hover:-translate-y-[var(--cui-card-lift)]',\n },\n },\n },\n});\n","import * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { cardStyles } from './card.styles';\n\nconst styles = cardStyles();\n\ntype DivProps = React.ComponentPropsWithRef<'div'>;\n\nexport interface CardRootProps extends DivProps, VariantProps<typeof cardStyles> {}\n\nexport interface CardProps extends Omit<CardRootProps, 'title'> {\n /** Heading of the card. With a title or description, children go into `Card.Body`. */\n title?: React.ReactNode;\n description?: React.ReactNode;\n /** Actions at the bottom (buttons, links). */\n footer?: React.ReactNode;\n classNames?: { header?: string; title?: string; description?: string; body?: string; footer?: string };\n}\n\nfunction CardRoot({ className, interactive, ...props }: CardRootProps) {\n return <div className={cn(cardStyles({ interactive }).root(), className)} {...props} />;\n}\n\nfunction CardHeader({ className, ...props }: DivProps) {\n return <div className={cn(styles.header(), className)} {...props} />;\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentPropsWithRef<'h3'>) {\n return <h3 className={cn(styles.title(), className)} {...props} />;\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentPropsWithRef<'p'>) {\n return <p className={cn(styles.description(), className)} {...props} />;\n}\n\nfunction CardBody({ className, ...props }: DivProps) {\n return <div className={cn(styles.body(), className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: DivProps) {\n return <div className={cn(styles.footer(), className)} {...props} />;\n}\n\n/**\n * Short form: `<Card title=\"Infinite mana\" description=\"…\" footer={<Button>Enable</Button>}>…</Card>`.\n * Without `title`, `description` or `footer` it is just the surface and children render as they are.\n */\nfunction CardSimple({ title, description, footer, classNames, children, ...props }: CardProps) {\n if (title == null && description == null && footer == null) {\n return <CardRoot {...props}>{children}</CardRoot>;\n }\n const hasHeader = title != null || description != null;\n return (\n <CardRoot {...props}>\n {hasHeader && (\n <CardHeader className={classNames?.header}>\n {title != null && <CardTitle className={classNames?.title}>{title}</CardTitle>}\n {description != null && <CardDescription className={classNames?.description}>{description}</CardDescription>}\n </CardHeader>\n )}\n {children != null && <CardBody className={classNames?.body}>{children}</CardBody>}\n {footer != null && (\n <CardFooter className={cn(children == null && hasHeader && 'pt-5', classNames?.footer)}>{footer}</CardFooter>\n )}\n </CardRoot>\n );\n}\n\n/**\n * A surface that groups content.\n * <Card title=\"Infinite mana\" footer={…}>…</Card>\n * or compound: <Card.Root><Card.Header>…</Card.Header><Card.Body>…</Card.Body></Card.Root>\n */\nexport const Card = Object.assign(CardSimple, {\n Root: CardRoot,\n Header: CardHeader,\n Title: CardTitle,\n Description: CardDescription,\n Body: CardBody,\n Footer: CardFooter,\n});\n","import { type HTMLMotionProps, motion, useReducedMotion, type Variants } from 'motion/react';\n\n\nconst EASE = [0.22, 1, 0.36, 1] as const;\n\nconst item: Variants = {\n hidden: { opacity: 0, y: 14, filter: 'blur(4px)' },\n shown: { opacity: 1, y: 0, filter: 'blur(0px)', transition: { duration: 0.5, ease: EASE } },\n};\n\nexport interface RevealProps extends HTMLMotionProps<'div'> {\n /** Seconds before the element starts to appear. */\n delay?: number;\n /** Animate only the first time it scrolls into view. @default true */\n once?: boolean;\n}\n\n/** Fades and lifts its content in when it scrolls into view. Static with reduced motion. */\nfunction RevealRoot({ delay = 0, once = true, transition, ...props }: RevealProps) {\n const reduce = useReducedMotion();\n if (reduce) return <motion.div {...props} />;\n return (\n <motion.div\n initial=\"hidden\"\n whileInView=\"shown\"\n viewport={{ once, margin: '0px 0px -48px 0px' }}\n variants={item}\n transition={{ delay, ...transition }}\n {...props}\n />\n );\n}\n\nexport interface RevealGroupProps extends HTMLMotionProps<'div'> {\n /** Seconds between two children. @default 0.06 */\n stagger?: number;\n once?: boolean;\n}\n\n/** Reveals its `Reveal.Item` children one after another (cards in a grid, list rows). */\nfunction RevealGroup({ stagger = 0.06, once = true, ...props }: RevealGroupProps) {\n const reduce = useReducedMotion();\n if (reduce) return <motion.div {...props} />;\n return (\n <motion.div\n initial=\"hidden\"\n whileInView=\"shown\"\n viewport={{ once, margin: '0px 0px -48px 0px' }}\n variants={{ hidden: {}, shown: { transition: { staggerChildren: stagger } } }}\n {...props}\n />\n );\n}\n\nfunction RevealItem(props: HTMLMotionProps<'div'>) {\n const reduce = useReducedMotion();\n return <motion.div variants={reduce ? undefined : item} {...props} />;\n}\n\nexport const Reveal = Object.assign(RevealRoot, { Group: RevealGroup, Item: RevealItem });\nexport type { Variants };\nexport const revealEase = EASE;\n\n","import { tv } from '../../lib/tv';\n\nexport const labelStyles = tv({\n slots: {\n base: [\n 'inline-flex items-center gap-1 text-sm font-medium text-foreground select-none',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n ],\n required: 'text-danger',\n },\n});\n","import * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { labelStyles } from './label.styles';\n\nexport interface LabelProps extends React.ComponentPropsWithRef<'label'> {\n /** Adds a required marker after the text. Put `required` on the control too. */\n required?: boolean;\n /** Dims the label to match a disabled control. */\n disabled?: boolean;\n}\n\n/** A label for a form control. Inside a `Field`, use `Field.Label` instead. */\nexport function Label({ className, required, disabled, children, ...props }: LabelProps) {\n return (\n <label data-disabled={disabled ? '' : undefined} className={cn(labelStyles().base(), className)} {...props}>\n {children}\n {required && <RequiredMark />}\n </label>\n );\n}\n\n/** The red asterisk after a required label. Hidden from screen readers: the control says it. */\nexport function RequiredMark({ className }: { className?: string }) {\n return (\n <span aria-hidden className={cn(labelStyles().required(), className)}>\n *\n </span>\n );\n}\n","import { tv } from '../../lib/tv';\n\nexport const fieldStyles = tv({\n slots: {\n root: 'flex flex-col gap-1.5',\n label: 'inline-flex items-center gap-1 text-sm font-medium text-foreground data-[disabled]:opacity-50',\n description: 'text-xs text-muted',\n error: 'text-xs font-medium text-danger',\n },\n});\n","import { Field as BaseField } from '@base-ui/react/field';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { inputStyles } from '../input/input.styles';\nimport { RequiredMark } from '../label/label';\nimport { fieldStyles } from './field.styles';\n\nconst styles = fieldStyles();\n\nfunction FieldRoot({ className, ...props }: React.ComponentPropsWithRef<typeof BaseField.Root>) {\n return <BaseField.Root className={cn(styles.root(), className as string)} {...props} />;\n}\nfunction FieldLabel({\n className,\n required,\n children,\n ...props\n}: React.ComponentPropsWithRef<typeof BaseField.Label> & { required?: boolean }) {\n return (\n <BaseField.Label className={cn(styles.label(), className as string)} {...props}>\n {children}\n {required && <RequiredMark />}\n </BaseField.Label>\n );\n}\n/**\n * The text input of the field, styled like `Input`. To put another text control in a field, pass it\n * as `render` (e.g. `render={<Textarea />}`): it then keeps its own styles.\n */\nfunction FieldControl({ className, render, ...props }: React.ComponentPropsWithRef<typeof BaseField.Control>) {\n return <BaseField.Control render={render} className={cn(!render && inputStyles(), className as string)} {...props} />;\n}\nfunction FieldDescription({ className, ...props }: React.ComponentPropsWithRef<typeof BaseField.Description>) {\n return <BaseField.Description className={cn(styles.description(), className as string)} {...props} />;\n}\nfunction FieldError({ className, ...props }: React.ComponentPropsWithRef<typeof BaseField.Error>) {\n return <BaseField.Error className={cn(styles.error(), className as string)} {...props} />;\n}\n\nexport interface FieldProps extends Omit<React.ComponentPropsWithRef<typeof BaseField.Root>, 'className'> {\n /** The label above the control. */\n label?: React.ReactNode;\n /** Adds a required marker to the label. Put `required` on the control too. */\n required?: boolean;\n /** Help text under the control, linked with `aria-describedby`. */\n description?: React.ReactNode;\n /** Shown when the control is invalid (or always, with `match={true}` via `errorMatch`). */\n error?: React.ReactNode;\n /** Passed to `Field.Error`'s `match` (e.g. `'valueMissing'`, or `true` to always show). */\n errorMatch?: React.ComponentProps<typeof BaseField.Error>['match'];\n className?: string;\n classNames?: { root?: string; label?: string; description?: string; error?: string };\n children?: React.ReactNode;\n}\n\n/**\n * A labelled form field. Short form: `<Field label=\"Name\" description=\"…\"><Field.Control /></Field>`.\n * Compound: `Field.Root`, `Field.Label`, `Field.Control`, `Field.Description`, `Field.Error`.\n */\nfunction FieldSimple({ label, required, description, error, errorMatch, className, classNames, children, ...props }: FieldProps) {\n return (\n <FieldRoot className={cn(classNames?.root, className)} {...props}>\n {label && (\n <FieldLabel className={classNames?.label} required={required}>\n {label}\n </FieldLabel>\n )}\n {children}\n {description && <FieldDescription className={classNames?.description}>{description}</FieldDescription>}\n {error && (\n <FieldError className={classNames?.error} match={errorMatch}>\n {error}\n </FieldError>\n )}\n </FieldRoot>\n );\n}\n\nexport const Field = Object.assign(FieldSimple, {\n Root: FieldRoot,\n Label: FieldLabel,\n Control: FieldControl,\n Description: FieldDescription,\n Error: FieldError,\n});\n","import { tv } from '../../lib/tv';\n\n/**\n * The native resize grip is off (`resize-none`): with squircle corners the polyfill in Firefox/Safari\n * draws stray lines around it. A small grip of our own sits in the bottom-right padding instead.\n */\nexport const textareaStyles = tv({\n slots: {\n // a flex row: the grip follows the textarea's real right edge, even when a class narrows it\n root: 'flex w-full items-end',\n textarea: [\n 'squircle block min-h-24 w-full resize-none rounded-control border border-input-border bg-input px-3.5 py-2.5',\n 'text-sm text-foreground placeholder:text-muted outline-none',\n 'transition-[border-color] duration-[var(--cui-duration-fast)] ease-ui',\n 'focus-visible:border-accent disabled:cursor-not-allowed disabled:opacity-50',\n 'read-only:bg-surface-2/60',\n 'aria-[invalid=true]:border-danger data-[invalid]:border-danger',\n ],\n grip: [\n 'relative z-10 -ms-5 mb-1 flex size-4 shrink-0 cursor-ns-resize touch-none items-center justify-center',\n 'rounded-[calc(var(--radius-chip)*0.5)] text-muted/70 outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui hover:text-foreground',\n 'focus-visible:text-accent focus-visible:outline-2 focus-visible:outline-accent',\n 'data-[dragging]:text-accent [&_svg]:size-2.5',\n ],\n },\n variants: {\n resize: {\n none: {},\n vertical: { textarea: 'pe-5' },\n },\n },\n defaultVariants: { resize: 'vertical' },\n});\n","import * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { textareaStyles } from './textarea.styles';\n\nconst KEY_STEP = 16;\n\nexport interface TextareaProps\n extends Omit<React.ComponentPropsWithRef<'textarea'>, 'className'>,\n VariantProps<typeof textareaStyles> {\n /** Grow (and shrink) with the content. Cap it with a `max-h-*` class; past that it scrolls. */\n autoResize?: boolean;\n /** Classes for the `<textarea>`, merged last. */\n className?: string;\n /** Classes per slot: `root` (the wrapper), `textarea`, `grip`. */\n classNames?: { root?: string; textarea?: string; grip?: string };\n}\n\nfunction setRef<T>(ref: React.Ref<T> | undefined, value: T | null) {\n if (typeof ref === 'function') ref(value);\n else if (ref) (ref as React.RefObject<T | null>).current = value;\n}\n\n/**\n * A multi-line text field. With `resize=\"vertical\"` (default) a small grip in the bottom-right corner\n * changes the height by dragging it or with the arrow keys; `autoResize` grows it with the content.\n * No shadow and no native grip (squircle polyfill rules).\n */\nexport function Textarea({\n className,\n classNames,\n resize = 'vertical',\n autoResize = false,\n ref,\n onInput,\n disabled,\n value,\n ...props\n}: TextareaProps) {\n const styles = textareaStyles({ resize });\n const area = React.useRef<HTMLTextAreaElement | null>(null);\n // the height the user picked with the grip; with `autoResize` it is a floor, not a fixed size\n const manual = React.useRef<number | null>(null);\n const [height, setHeight] = React.useState<number | null>(null);\n const [dragging, setDragging] = React.useState(false);\n\n const fit = React.useCallback(() => {\n const el = area.current;\n if (!el) return;\n if (!autoResize) {\n if (manual.current != null) el.style.height = `${manual.current}px`;\n return;\n }\n el.style.height = 'auto';\n const borders = el.offsetHeight - el.clientHeight;\n const next = Math.max(el.scrollHeight + borders, manual.current ?? 0);\n el.style.height = `${next}px`;\n }, [autoResize]);\n\n React.useLayoutEffect(fit, [fit, value]);\n React.useEffect(() => {\n if (area.current) setHeight(area.current.offsetHeight);\n }, []);\n\n const setArea = React.useCallback(\n (node: HTMLTextAreaElement | null) => {\n area.current = node;\n setRef(ref, node);\n },\n [ref],\n );\n\n const minHeight = () => {\n const el = area.current;\n if (!el) return 0;\n return Number.parseFloat(getComputedStyle(el).minHeight) || 0;\n };\n\n const resizeTo = (next: number) => {\n const el = area.current;\n if (!el) return;\n const h = Math.max(Math.round(next), minHeight());\n manual.current = h;\n el.style.height = `${h}px`;\n if (autoResize) fit();\n setHeight(el.offsetHeight);\n };\n\n const onPointerDown = (event: React.PointerEvent<HTMLSpanElement>) => {\n const el = area.current;\n if (!el || disabled || event.button !== 0) return;\n event.preventDefault();\n const startY = event.clientY;\n const startHeight = el.offsetHeight;\n const grip = event.currentTarget;\n grip.setPointerCapture(event.pointerId);\n setDragging(true);\n const move = (e: PointerEvent) => resizeTo(startHeight + e.clientY - startY);\n const up = () => {\n setDragging(false);\n grip.removeEventListener('pointermove', move);\n grip.removeEventListener('pointerup', up);\n grip.removeEventListener('pointercancel', up);\n };\n grip.addEventListener('pointermove', move);\n grip.addEventListener('pointerup', up);\n grip.addEventListener('pointercancel', up);\n };\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLSpanElement>) => {\n const el = area.current;\n if (!el || disabled) return;\n const step = event.shiftKey ? KEY_STEP * 4 : KEY_STEP;\n if (event.key === 'ArrowDown') resizeTo(el.offsetHeight + step);\n else if (event.key === 'ArrowUp') resizeTo(el.offsetHeight - step);\n else if (event.key === 'Home') resizeTo(0);\n else return;\n event.preventDefault();\n };\n\n return (\n <div className={cn(styles.root(), classNames?.root)} data-disabled={disabled ? '' : undefined}>\n <textarea\n ref={setArea}\n disabled={disabled}\n value={value}\n onInput={(event) => {\n onInput?.(event);\n if (autoResize) fit();\n }}\n className={cn(styles.textarea(), autoResize && 'overflow-y-auto', classNames?.textarea, className)}\n {...props}\n />\n {resize === 'vertical' && !disabled && (\n <span\n role=\"separator\"\n aria-orientation=\"horizontal\"\n aria-label=\"Resize\"\n aria-valuenow={height ?? undefined}\n aria-valuemin={0}\n tabIndex={0}\n data-dragging={dragging ? '' : undefined}\n className={cn(styles.grip(), classNames?.grip)}\n onPointerDown={onPointerDown}\n onKeyDown={onKeyDown}\n >\n <svg viewBox=\"0 0 10 10\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M9 3 3 9M9 7 7 9\" />\n </svg>\n </span>\n )}\n </div>\n );\n}\n","import { tv } from '../../lib/tv';\n\nexport const checkboxStyles = tv({\n slots: {\n root: [\n 'squircle peer group/checkbox inline-flex size-[1.125rem] shrink-0 items-center justify-center',\n 'rounded-[calc(var(--radius-chip)*0.75)] border border-muted/70 bg-input text-accent-foreground',\n 'outline-none transition-[background-color,border-color] duration-[var(--cui-duration-fast)] ease-ui',\n 'focus-visible:border-accent data-[checked]:border-accent data-[checked]:bg-accent',\n 'data-[indeterminate]:border-accent data-[indeterminate]:bg-accent',\n 'data-[invalid]:border-danger data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n ],\n indicator: [\n 'flex [&_svg]:size-3.5 [&_svg]:stroke-[3]',\n 'data-[unchecked]:[&:not([data-indeterminate])]:hidden',\n ],\n check: 'group-data-[indeterminate]/checkbox:hidden',\n dash: 'hidden group-data-[indeterminate]/checkbox:block',\n label: [\n 'inline-flex cursor-pointer items-start gap-2.5 text-sm text-foreground select-none',\n 'has-[[data-disabled]]:cursor-not-allowed has-[[data-disabled]]:opacity-50',\n ],\n text: 'flex flex-col gap-0.5 leading-[1.125rem]',\n description: 'text-xs text-muted',\n group: 'flex flex-col gap-2.5',\n },\n});\n","import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport { CheckboxGroup as BaseCheckboxGroup } from '@base-ui/react/checkbox-group';\nimport { Check, Minus } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { checkboxStyles } from './checkbox.styles';\n\nconst styles = checkboxStyles();\n\ntype RootProps = Omit<React.ComponentPropsWithRef<typeof BaseCheckbox.Root>, 'className'> & { className?: string };\n\n/** The box itself, without the label row. Renders a `<span role=\"checkbox\">` and a hidden input. */\nfunction CheckboxRoot({ className, ...props }: RootProps) {\n return <BaseCheckbox.Root className={cn(styles.root(), className)} {...props} />;\n}\n\ntype IndicatorProps = Omit<React.ComponentPropsWithRef<typeof BaseCheckbox.Indicator>, 'className'> & {\n className?: string;\n};\n\n/** The tick (or the dash when indeterminate). Without children it draws the default icons. */\nfunction CheckboxIndicator({ className, children, ...props }: IndicatorProps) {\n return (\n <BaseCheckbox.Indicator keepMounted className={cn(styles.indicator(), className)} {...props}>\n {children ?? (\n <>\n <Check className={styles.check()} />\n <Minus className={styles.dash()} />\n </>\n )}\n </BaseCheckbox.Indicator>\n );\n}\n\nexport interface CheckboxProps extends RootProps {\n /** Text next to the box; the whole row becomes clickable. */\n label?: React.ReactNode;\n /** A muted line under the label. */\n description?: React.ReactNode;\n /** Classes for the row (or the box, without a label), merged last. */\n className?: string;\n /** Classes per slot. */\n classNames?: { root?: string; indicator?: string; label?: string; description?: string };\n}\n\n/** A box to tick. `indeterminate` (or a `parent` box in a group) shows a dash. */\nfunction CheckboxSimple({ label, description, className, classNames, ...props }: CheckboxProps) {\n const box = (\n <CheckboxRoot className={cn(classNames?.root, !label && className)} {...props}>\n <CheckboxIndicator className={classNames?.indicator} />\n </CheckboxRoot>\n );\n if (!label) return box;\n return (\n <label className={cn(styles.label(), classNames?.label, className)}>\n {box}\n {description ? (\n <span className={styles.text()}>\n {label}\n <span className={cn(styles.description(), classNames?.description)}>{description}</span>\n </span>\n ) : (\n label\n )}\n </label>\n );\n}\n\nexport interface CheckboxGroupProps extends Omit<React.ComponentPropsWithRef<typeof BaseCheckboxGroup>, 'className'> {\n className?: string;\n}\n\n/** Several checkboxes sharing one array value. */\nexport function CheckboxGroup({ className, ...props }: CheckboxGroupProps) {\n return <BaseCheckboxGroup className={cn(styles.group(), className)} {...props} />;\n}\n\nexport const Checkbox = Object.assign(CheckboxSimple, {\n Root: CheckboxRoot,\n Indicator: CheckboxIndicator,\n});\n","import { tv } from '../../lib/tv';\n\nexport const radioGroupStyles = tv({\n slots: {\n group: 'flex flex-col gap-2.5',\n radio: [\n 'inline-flex size-[1.125rem] shrink-0 items-center justify-center rounded-full',\n 'border border-muted/70 bg-input outline-none',\n 'transition-[background-color,border-color] duration-[var(--cui-duration-fast)] ease-ui',\n 'focus-visible:border-accent data-[checked]:border-accent data-[checked]:bg-accent',\n 'data-[invalid]:border-danger data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n ],\n indicator: [\n 'size-2 rounded-full bg-accent-foreground',\n 'transition-transform duration-[var(--cui-duration-normal)] ease-spring',\n 'data-[unchecked]:scale-0 data-[starting-style]:scale-0',\n ],\n item: 'flex cursor-pointer items-start gap-2.5 text-sm text-foreground select-none has-[[data-disabled]]:cursor-not-allowed has-[[data-disabled]]:opacity-50',\n text: 'flex flex-col gap-0.5 leading-[1.125rem]',\n description: 'text-xs text-muted',\n },\n});\n","import { Radio as BaseRadio } from '@base-ui/react/radio';\nimport { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { radioGroupStyles } from './radio-group.styles';\n\nconst styles = radioGroupStyles();\n\nexport interface RadioProps extends Omit<React.ComponentPropsWithRef<typeof BaseRadio.Root>, 'className'> {\n label?: React.ReactNode;\n description?: React.ReactNode;\n className?: string;\n classNames?: { item?: string; radio?: string; indicator?: string; description?: string };\n}\n\n/** One option of a `RadioGroup`. */\nexport function Radio({ label, description, className, classNames, ...props }: RadioProps) {\n const radio = (\n <BaseRadio.Root className={cn(styles.radio(), classNames?.radio, !label && className)} {...props}>\n <BaseRadio.Indicator keepMounted className={cn(styles.indicator(), classNames?.indicator)} />\n </BaseRadio.Root>\n );\n if (!label) return radio;\n return (\n <label className={cn(styles.item(), classNames?.item, className)}>\n {radio}\n <span className={styles.text()}>\n {label}\n {description && <span className={cn(styles.description(), classNames?.description)}>{description}</span>}\n </span>\n </label>\n );\n}\n\nexport interface RadioGroupItem {\n value: string;\n label: React.ReactNode;\n description?: React.ReactNode;\n disabled?: boolean;\n}\n\nexport interface RadioGroupProps extends Omit<React.ComponentPropsWithRef<typeof BaseRadioGroup>, 'className'> {\n /** Short form: the options. Or pass `<Radio>` children. */\n items?: RadioGroupItem[];\n className?: string;\n}\n\n/** Pick one option. `<RadioGroup items={[…]} />` or `<RadioGroup><Radio value=\"a\" label=\"A\" /></RadioGroup>`. */\nexport function RadioGroup({ items, className, children, ...props }: RadioGroupProps) {\n return (\n <BaseRadioGroup className={cn(styles.group(), className)} {...props}>\n {items\n ? items.map((i) => <Radio key={i.value} value={i.value} label={i.label} description={i.description} disabled={i.disabled} />)\n : children}\n </BaseRadioGroup>\n );\n}\n","import { tv } from '../../lib/tv';\n\nexport const selectStyles = tv({\n slots: {\n trigger: [\n 'squircle inline-flex min-w-44 items-center justify-between gap-2',\n 'border border-input-border bg-input text-foreground outline-none select-none',\n 'transition-[border-color] duration-[var(--cui-duration-fast)] ease-ui',\n 'focus-visible:border-accent data-[popup-open]:border-accent data-[invalid]:border-danger',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n ],\n value: 'truncate data-[placeholder]:text-muted',\n icon: 'flex text-muted [&_svg]:size-4',\n positioner: 'z-50 outline-none',\n popup: [\n 'squircle min-w-[var(--anchor-width)] max-h-[var(--available-height)] overflow-y-auto',\n 'rounded-control border border-border bg-popover p-1 text-sm text-foreground shadow-overlay outline-none',\n 'origin-[var(--transform-origin)] transition-[transform,opacity] duration-[var(--cui-duration-fast)] ease-ui',\n 'data-[starting-style]:scale-95 data-[starting-style]:opacity-0',\n 'data-[ending-style]:scale-95 data-[ending-style]:opacity-0',\n ],\n item: [\n 'squircle relative flex min-h-8 cursor-default items-center gap-2 rounded-item py-1.5 ps-2.5 pe-8 outline-none select-none',\n 'data-[highlighted]:bg-hover data-[disabled]:opacity-50',\n 'data-[selected]:font-medium data-[selected]:text-accent-soft-foreground',\n ],\n itemIndicator: 'absolute end-2.5 flex text-accent-soft-foreground [&_svg]:size-4',\n groupLabel: 'px-2.5 pt-2 pb-1 text-xs font-medium text-muted',\n separator: 'mx-1 my-1 h-px bg-border',\n },\n variants: {\n size: {\n sm: { trigger: 'h-control-sm rounded-control-sm px-2.5 text-xs' },\n md: { trigger: 'h-control rounded-control px-3.5 text-sm' },\n lg: { trigger: 'h-control-lg rounded-control-lg px-4 text-base' },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { Select as BaseSelect } from '@base-ui/react/select';\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { selectStyles } from './select.styles';\n\nconst styles = selectStyles();\n\ntype Cls = { className?: string };\ntype Props<C extends React.ElementType> = Omit<React.ComponentPropsWithRef<C>, 'className'> & Cls;\n\nfunction SelectTrigger({\n className,\n children,\n size,\n ...props\n}: Props<typeof BaseSelect.Trigger> & VariantProps<typeof selectStyles>) {\n return (\n <BaseSelect.Trigger className={cn(selectStyles({ size }).trigger(), className)} {...props}>\n {children}\n <BaseSelect.Icon className={styles.icon()}>\n <ChevronsUpDown />\n </BaseSelect.Icon>\n </BaseSelect.Trigger>\n );\n}\n\nfunction SelectValue({ className, ...props }: Props<typeof BaseSelect.Value>) {\n return <BaseSelect.Value className={cn(styles.value(), className)} {...props} />;\n}\n\n/** The popup: portal + positioner + popup + list in one. */\nfunction SelectContent({\n className,\n children,\n sideOffset = 6,\n alignItemWithTrigger = false,\n ...props\n}: Props<typeof BaseSelect.Popup> & {\n sideOffset?: number;\n alignItemWithTrigger?: boolean;\n}) {\n return (\n <BaseSelect.Portal>\n <BaseSelect.Positioner className={styles.positioner()} sideOffset={sideOffset} alignItemWithTrigger={alignItemWithTrigger}>\n <BaseSelect.Popup className={cn(styles.popup(), className)} {...props}>\n <BaseSelect.List>{children}</BaseSelect.List>\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n );\n}\n\nfunction SelectItem({ className, children, ...props }: Props<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item className={cn(styles.item(), className)} {...props}>\n <BaseSelect.ItemText>{children}</BaseSelect.ItemText>\n <BaseSelect.ItemIndicator className={styles.itemIndicator()}>\n <Check />\n </BaseSelect.ItemIndicator>\n </BaseSelect.Item>\n );\n}\n\nfunction SelectGroupLabel({ className, ...props }: Props<typeof BaseSelect.GroupLabel>) {\n return <BaseSelect.GroupLabel className={cn(styles.groupLabel(), className)} {...props} />;\n}\n\nfunction SelectSeparator({ className, ...props }: Props<typeof BaseSelect.Separator>) {\n return <BaseSelect.Separator className={cn(styles.separator(), className)} {...props} />;\n}\n\nexport interface SelectOption {\n value: string;\n label: React.ReactNode;\n disabled?: boolean;\n}\n\nexport interface SelectProps extends VariantProps<typeof selectStyles> {\n /** The options. */\n items: SelectOption[];\n /** Shown in the trigger while nothing is picked. */\n placeholder?: React.ReactNode;\n /** The picked value (controlled). */\n value?: string | null;\n /** The value picked at first (uncontrolled). */\n defaultValue?: string | null;\n /** Called with the new value. */\n onValueChange?: (value: string | null) => void;\n /** Called when the popup opens or closes. */\n onOpenChange?: (open: boolean) => void;\n /** Turns the whole select off. */\n disabled?: boolean;\n /** Shows the value but blocks changes. */\n readOnly?: boolean;\n /** Field name, for native form submission. */\n name?: string;\n /** A value must be picked before the form submits. */\n required?: boolean;\n /** Id of the trigger, for an external `<Label htmlFor>`. */\n id?: string;\n 'aria-label'?: string;\n /** Classes for the trigger, merged last. */\n className?: string;\n /** Classes per slot. */\n classNames?: { trigger?: string; popup?: string; item?: string };\n}\n\n/**\n * Pick one value. Short form: `<Select items={[{ value, label }]} placeholder=\"…\" />`.\n * Compound: `Select.Root`, `Select.Trigger`, `Select.Value`, `Select.Content`, `Select.Item`,\n * `Select.Group`, `Select.GroupLabel`, `Select.Separator`.\n */\nfunction SelectSimple({\n items,\n placeholder,\n className,\n classNames,\n 'aria-label': ariaLabel,\n id,\n size,\n onValueChange,\n onOpenChange,\n ...props\n}: SelectProps) {\n return (\n <BaseSelect.Root\n items={items.map((i) => ({ value: i.value, label: i.label }))}\n onValueChange={(v) => onValueChange?.(v as string | null)}\n onOpenChange={onOpenChange ? (open) => onOpenChange(open) : undefined}\n {...props}\n >\n <SelectTrigger id={id} size={size} aria-label={ariaLabel} className={cn(classNames?.trigger, className)}>\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent className={classNames?.popup}>\n {items.map((i) => (\n <SelectItem key={i.value} value={i.value} disabled={i.disabled} className={classNames?.item}>\n {i.label}\n </SelectItem>\n ))}\n </SelectContent>\n </BaseSelect.Root>\n );\n}\n\nexport const Select = Object.assign(SelectSimple, {\n Root: BaseSelect.Root,\n Trigger: SelectTrigger,\n Value: SelectValue,\n Content: SelectContent,\n Item: SelectItem,\n Group: BaseSelect.Group,\n GroupLabel: SelectGroupLabel,\n Separator: SelectSeparator,\n});\n","import { tv } from '../../lib/tv';\n\nexport const sliderStyles = tv({\n slots: {\n root: 'flex w-full flex-col gap-2 data-[disabled]:opacity-50',\n header: 'flex items-center justify-between text-sm',\n label: 'font-medium text-foreground',\n value: 'font-mono text-xs text-muted tabular-nums',\n control: 'flex h-5 w-full touch-none items-center select-none',\n track: 'relative h-1.5 w-full rounded-full bg-surface-2 border border-border',\n indicator: 'rounded-full bg-accent',\n thumb: [\n 'size-4 rounded-full border-2 border-accent bg-background outline-none',\n 'transition-transform duration-[var(--cui-duration-fast)] ease-ui',\n 'hover:scale-110 data-[dragging]:scale-110',\n 'has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-accent',\n ],\n },\n});\n","import { Slider as BaseSlider } from '@base-ui/react/slider';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { sliderStyles } from './slider.styles';\n\nconst styles = sliderStyles();\n\nexport interface SliderProps extends Omit<React.ComponentPropsWithRef<typeof BaseSlider.Root>, 'className'> {\n /** Text above the track. */\n label?: React.ReactNode;\n /** Show the current value next to the label. */\n showValue?: boolean;\n /** Classes for the root, merged last. */\n className?: string;\n /** Classes per slot. */\n classNames?: { root?: string; label?: string; value?: string; track?: string; indicator?: string; thumb?: string };\n}\n\n/**\n * Pick a value on a track. Pass an array as `defaultValue` for a range (two thumbs).\n * Compound parts (styled): `Slider.Root`, `Slider.Label`, `Slider.Value`, `Slider.Control`, `Slider.Track`,\n * `Slider.Indicator`, `Slider.Thumb`.\n */\nfunction SliderSimple({ label, showValue = false, className, classNames, defaultValue, value, ...props }: SliderProps) {\n const initial = value ?? defaultValue;\n const thumbs = Array.isArray(initial) ? initial.length : 1;\n return (\n <BaseSlider.Root\n defaultValue={defaultValue}\n value={value}\n className={cn(styles.root(), classNames?.root, className)}\n {...props}\n >\n {(label || showValue) && (\n <div className={styles.header()}>\n {label && <BaseSlider.Label className={cn(styles.label(), classNames?.label)}>{label}</BaseSlider.Label>}\n {showValue && <BaseSlider.Value className={cn(styles.value(), classNames?.value)} />}\n </div>\n )}\n <BaseSlider.Control className={styles.control()}>\n <BaseSlider.Track className={cn(styles.track(), classNames?.track)}>\n <BaseSlider.Indicator className={cn(styles.indicator(), classNames?.indicator)} />\n {Array.from({ length: thumbs }, (_, i) => (\n <BaseSlider.Thumb key={i} index={thumbs > 1 ? i : undefined} className={cn(styles.thumb(), classNames?.thumb)} />\n ))}\n </BaseSlider.Track>\n </BaseSlider.Control>\n </BaseSlider.Root>\n );\n}\n\ntype Part<C extends React.ElementType> = Omit<React.ComponentPropsWithRef<C>, 'className'> & { className?: string };\n\nfunction SliderRoot({ className, ...props }: Part<typeof BaseSlider.Root>) {\n return <BaseSlider.Root className={cn(styles.root(), className)} {...props} />;\n}\nfunction SliderLabel({ className, ...props }: Part<typeof BaseSlider.Label>) {\n return <BaseSlider.Label className={cn(styles.label(), className)} {...props} />;\n}\nfunction SliderValue({ className, ...props }: Part<typeof BaseSlider.Value>) {\n return <BaseSlider.Value className={cn(styles.value(), className)} {...props} />;\n}\nfunction SliderControl({ className, ...props }: Part<typeof BaseSlider.Control>) {\n return <BaseSlider.Control className={cn(styles.control(), className)} {...props} />;\n}\nfunction SliderTrack({ className, ...props }: Part<typeof BaseSlider.Track>) {\n return <BaseSlider.Track className={cn(styles.track(), className)} {...props} />;\n}\nfunction SliderIndicator({ className, ...props }: Part<typeof BaseSlider.Indicator>) {\n return <BaseSlider.Indicator className={cn(styles.indicator(), className)} {...props} />;\n}\nfunction SliderThumb({ className, ...props }: Part<typeof BaseSlider.Thumb>) {\n return <BaseSlider.Thumb className={cn(styles.thumb(), className)} {...props} />;\n}\n\nexport const Slider = Object.assign(SliderSimple, {\n Root: SliderRoot,\n Label: SliderLabel,\n Value: SliderValue,\n Control: SliderControl,\n Track: SliderTrack,\n Indicator: SliderIndicator,\n Thumb: SliderThumb,\n});\n","import { tv } from '../../lib/tv';\n\nexport const toggleStyles = tv({\n base: [\n // every variant has a border (transparent when not shown), so switching variant never shifts layout\n 'squircle inline-flex items-center justify-center gap-2 whitespace-nowrap select-none border border-transparent',\n 'font-[weight:var(--cui-control-weight)] text-muted outline-none',\n 'transition-[background-color,color,transform] duration-[var(--cui-duration-fast)] ease-ui',\n 'hover:bg-hover hover:text-foreground',\n // an outline, not a ring: a ring is a box-shadow, which the squircle polyfill paints as a filled\n // shape on a transparent background\n 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent',\n 'active:scale-[var(--cui-press-scale)]',\n 'data-[pressed]:bg-accent-soft data-[pressed]:text-accent-soft-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n ],\n variants: {\n variant: {\n ghost: '',\n outline: 'border-border-strong data-[pressed]:border-transparent',\n },\n size: {\n sm: 'h-control-sm rounded-control-sm px-2.5 text-xs [&_svg]:size-3.5',\n md: 'h-control rounded-control px-3 text-sm [&_svg]:size-4',\n lg: 'h-control-lg rounded-control-lg px-4 text-base [&_svg]:size-5',\n 'icon-sm': 'size-control-sm rounded-control-sm [&_svg]:size-3.5',\n icon: 'size-control rounded-control [&_svg]:size-4',\n 'icon-lg': 'size-control-lg rounded-control-lg [&_svg]:size-5',\n },\n },\n defaultVariants: { variant: 'ghost', size: 'md' },\n});\n","import { Toggle as BaseToggle } from '@base-ui/react/toggle';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { toggleStyles } from './toggle.styles';\n\nexport interface ToggleProps\n extends Omit<React.ComponentPropsWithRef<typeof BaseToggle>, 'className'>,\n VariantProps<typeof toggleStyles> {\n className?: string;\n}\n\n/** A button that stays pressed (bold, show grid…). Pressed state uses the soft accent. */\nexport function Toggle({ className, variant, size, ...props }: ToggleProps) {\n return <BaseToggle className={cn(toggleStyles({ variant, size }), className)} {...props} />;\n}\n","import * as React from 'react';\n\n/**\n * The hover of a menu column (from crazy-hub, which took it from Fumadocs): one neutral block per area\n * glides to the row under the mouse or the keyboard focus. Rows that already show their own fill (the\n * active row) count as empty space, so the block never paints over the accent and never starts its\n * slide from there: leaving the active row, the block fades in at the next row instead of sliding.\n */\nexport const glideBlockClass = [\n 'squircle-motion pointer-events-none absolute top-0 left-0 z-0 rounded-item bg-hover opacity-0',\n 'transition-opacity duration-[var(--cui-duration-normal)] ease-ui motion-safe:transition-[translate,width,height,opacity]',\n].join(' ');\n\n/** Rows with their own fill: the block never goes there. */\nconst FILLED = '[data-active=true], [aria-pressed=true], [aria-selected=true], [data-no-glide]';\nconst ROW = 'a[href], button, [role=menuitem], [role=option]';\n\n/**\n * Starts the glide in `area`; returns a cleanup. The block is the area's child with\n * `[data-glide-block]`. Rows inside `[data-no-glide-area]` are ignored.\n */\nexport function glide(area: HTMLElement) {\n const block = area.querySelector<HTMLElement>(':scope > [data-glide-block]');\n if (!block) return () => {};\n let current: Element | null = null;\n const show = (target: Element | null) => {\n const item = target && target.matches(FILLED) ? null : target;\n if (item === current) return;\n // from nothing (or from the active row) the block only fades in at the row: no slide\n block.style.transitionProperty = current ? '' : 'opacity';\n current = item;\n if (!item) {\n block.style.opacity = '0';\n return;\n }\n const rect = item.getBoundingClientRect();\n const origin = area.getBoundingClientRect();\n block.style.translate = `${rect.left - origin.left}px ${rect.top - origin.top}px`;\n block.style.width = `${rect.width}px`;\n block.style.height = `${rect.height}px`;\n block.style.opacity = '1';\n };\n const rowOf = (target: EventTarget | null) => {\n if (!(target instanceof Element)) return null;\n const item = target.closest(ROW);\n return item && area.contains(item) && !item.closest('[data-no-glide-area]') ? item : null;\n };\n const controller = new AbortController();\n const { signal } = controller;\n let hide: ReturnType<typeof setTimeout> | undefined;\n area.addEventListener(\n 'pointerover',\n (e) => {\n // crossing the gap between two rows must not hide the block (it would fade in at the next\n // row instead of gliding): leaving a row hides it only after a short grace period\n const item = rowOf(e.target);\n clearTimeout(hide);\n if (item && e.pointerType === 'mouse') show(item);\n else if (!item) hide = setTimeout(() => show(null), 90);\n },\n { signal },\n );\n area.addEventListener('pointerleave', () => show(null), { signal });\n area.addEventListener('scroll', () => show(null), { signal, capture: true });\n area.addEventListener('click', () => requestAnimationFrame(() => current?.matches(FILLED) && show(null)), { signal });\n area.addEventListener(\n 'focusin',\n (e) => {\n if (e.target instanceof Element && e.target.matches(':focus-visible')) show(rowOf(e.target));\n },\n { signal },\n );\n area.addEventListener('focusout', () => !area.matches(':hover') && show(null), { signal });\n return () => controller.abort();\n}\n\n/** A ref callback that runs `glide` on the element while it is mounted. */\nexport function useGlide<T extends HTMLElement>() {\n const cleanup = React.useRef<() => void>(undefined);\n return React.useCallback((node: T | null) => {\n cleanup.current?.();\n cleanup.current = node ? glide(node) : undefined;\n }, []);\n}\n","import { tv } from '../../lib/tv';\n\n/**\n * Looks like a row of `Toggle`s: transparent items, muted text, and the pressed one on the soft\n * accent fill. In single mode the fill glides from item to item (a `motion` layout animation on\n * transform only); with `multiple` each pressed item gets its own fill.\n */\nexport const toggleGroupStyles = tv({\n slots: {\n root: 'squircle relative isolate inline-flex items-center gap-1 p-1 data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n item: [\n 'squircle-motion relative isolate z-10 inline-flex items-center justify-center gap-2 whitespace-nowrap select-none border border-transparent',\n 'font-[weight:var(--cui-control-weight)] text-muted outline-none',\n 'transition-[background-color,color,transform] duration-[var(--cui-duration-fast)] ease-ui',\n // the hover fill is the group's gliding block (like the docs sidebar), not a per-item background\n 'hover:text-foreground',\n 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent',\n 'active:scale-[var(--cui-press-scale)]',\n 'data-[pressed]:text-accent-soft-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n ],\n // -inset-px: cover the item's (transparent) border too, so the fill has the item's exact outline\n indicator: 'squircle-motion pointer-events-none absolute -inset-px -z-10 bg-accent-soft',\n /** The neutral hover block that glides between items (`glideBlockClass` + the item radius). */\n hover: '',\n },\n variants: {\n variant: {\n /** A thin frame around the items, for a segmented control. */\n outline: { root: 'border border-border' },\n /** No frame: a bare row of toggles, for toolbars. */\n ghost: { root: 'p-0' },\n },\n size: {\n sm: {\n root: 'rounded-[calc(var(--radius-control-sm)+5px)]',\n item: 'h-control-sm rounded-control-sm px-2.5 text-xs [&_svg]:size-3.5',\n indicator: 'rounded-control-sm',\n hover: 'rounded-control-sm',\n },\n md: {\n root: 'rounded-[calc(var(--radius-control)+5px)]',\n item: 'h-control rounded-control px-3.5 text-sm [&_svg]:size-4',\n indicator: 'rounded-control',\n hover: 'rounded-control',\n },\n lg: {\n root: 'rounded-[calc(var(--radius-control-lg)+5px)]',\n item: 'h-control-lg rounded-control-lg px-4 text-base [&_svg]:size-5',\n indicator: 'rounded-control-lg',\n hover: 'rounded-control-lg',\n },\n },\n iconOnly: {\n true: { item: 'aspect-square px-0' },\n },\n },\n compoundVariants: [{ variant: 'ghost', size: ['sm', 'md', 'lg'], class: { root: 'rounded-none' } }],\n defaultVariants: { variant: 'outline', size: 'md' },\n});\n","import { Toggle as BaseToggle } from '@base-ui/react/toggle';\nimport { ToggleGroup as BaseToggleGroup } from '@base-ui/react/toggle-group';\nimport { motion, useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { glideBlockClass, useGlide } from '../sidebar/glide';\nimport { toggleGroupStyles } from './toggle-group.styles';\n\ntype Styles = VariantProps<typeof toggleGroupStyles>;\n\ninterface GroupContextValue {\n id: string;\n multiple: boolean;\n size: Styles['size'];\n variant: Styles['variant'];\n iconOnly: boolean;\n classNames?: { item?: string; indicator?: string };\n}\n\nconst GroupContext = React.createContext<GroupContextValue | null>(null);\n\nconst glide = { type: 'spring', stiffness: 520, damping: 42 } as const;\nconst fade = { duration: 0.15 } as const;\n\nexport interface ToggleGroupItemProps extends Omit<BaseToggle.Props<string>, 'className' | 'render'> {\n /** The value this item adds to the group's value when pressed. */\n value: string;\n className?: string;\n}\n\n/** One toggle in a `ToggleGroup`. Renders a `<button>` with `aria-pressed`. */\nfunction ToggleGroupItem({ className, children, ...props }: ToggleGroupItemProps) {\n const ctx = React.useContext(GroupContext);\n const reduce = useReducedMotion();\n const styles = toggleGroupStyles({ size: ctx?.size, variant: ctx?.variant, iconOnly: ctx?.iconOnly });\n return (\n <BaseToggle\n className={cn(styles.item(), ctx?.classNames?.item, className)}\n render={(buttonProps, state) => (\n <button {...buttonProps} type=\"button\">\n {state.pressed && (\n <motion.span\n aria-hidden\n layoutId={ctx && !ctx.multiple ? `toggle-group-${ctx.id}` : undefined}\n initial={ctx?.multiple && !reduce ? { opacity: 0 } : false}\n animate={{ opacity: 1 }}\n transition={reduce ? { duration: 0 } : ctx?.multiple ? fade : glide}\n className={cn(styles.indicator(), ctx?.classNames?.indicator)}\n />\n )}\n {buttonProps.children}\n </button>\n )}\n {...props}\n >\n {children}\n </BaseToggle>\n );\n}\n\nexport interface ToggleGroupItem {\n value: string;\n label: React.ReactNode;\n disabled?: boolean;\n 'aria-label'?: string;\n}\n\nexport interface ToggleGroupProps extends Omit<BaseToggleGroup.Props<string>, 'className'>, Styles {\n /** Short form: the options. Or pass `<ToggleGroup.Item value=\"…\">` children. */\n items?: ToggleGroupItem[];\n className?: string;\n classNames?: { root?: string; item?: string; indicator?: string; hover?: string };\n}\n\n/**\n * A row of toggles. Single (default): a segmented control whose soft accent fill glides to the\n * pressed item. `multiple`: a toolbar where any number of items can be pressed.\n * Short form: `<ToggleGroup items={[{ value, label }]} />`. Compound: `ToggleGroup.Item`.\n */\nfunction ToggleGroupRoot({\n items,\n size = 'md',\n variant = 'outline',\n iconOnly = false,\n multiple = false,\n className,\n classNames,\n children,\n ref,\n ...props\n}: ToggleGroupProps) {\n const id = React.useId();\n const glideRef = useGlide<HTMLDivElement>();\n const mergedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n glideRef(node);\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.RefObject<HTMLDivElement | null>).current = node;\n },\n [glideRef, ref],\n );\n const styles = toggleGroupStyles({ size, variant, iconOnly });\n const ctx = React.useMemo<GroupContextValue>(\n () => ({ id, multiple, size, variant, iconOnly: Boolean(iconOnly), classNames }),\n [id, multiple, size, variant, iconOnly, classNames],\n );\n return (\n <GroupContext value={ctx}>\n <BaseToggleGroup ref={mergedRef} multiple={multiple} className={cn(styles.root(), classNames?.root, className)} {...props}>\n <span data-glide-block aria-hidden className={cn(glideBlockClass, styles.hover(), classNames?.hover)} />\n {items\n ? items.map((i) => (\n <ToggleGroupItem key={i.value} value={i.value} disabled={i.disabled} aria-label={i['aria-label']}>\n {i.label}\n </ToggleGroupItem>\n ))\n : children}\n </BaseToggleGroup>\n </GroupContext>\n );\n}\n\nexport const ToggleGroup = Object.assign(ToggleGroupRoot, { Item: ToggleGroupItem });\n","import { tv } from '../../lib/tv';\n\nexport const kbdStyles = tv({\n base: [\n 'squircle inline-flex min-w-5 items-center justify-center gap-0.5 rounded-[calc(var(--radius-chip)*0.75)]',\n 'border border-border-strong bg-surface-2 px-1.5 font-mono font-medium text-muted',\n '[&_svg]:size-3',\n ],\n variants: {\n size: {\n sm: 'h-[1.125rem] text-[0.625rem]',\n md: 'h-5 text-[0.6875rem]',\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { kbdStyles } from './kbd.styles';\n\nexport interface KbdProps extends React.ComponentPropsWithRef<'kbd'>, VariantProps<typeof kbdStyles> {}\n\n/** A keyboard key: `<Kbd>Ctrl</Kbd><Kbd>K</Kbd>`. */\nexport function Kbd({ className, size, ...props }: KbdProps) {\n return <kbd className={cn(kbdStyles({ size }), className)} {...props} />;\n}\n\n/** Keys pressed together, with a small gap. */\nexport function KbdGroup({ className, ...props }: React.ComponentPropsWithRef<'span'>) {\n return <span className={cn('inline-flex items-center gap-1', className)} {...props} />;\n}\n","import { tv } from '../../lib/tv';\n\nexport const inputGroupStyles = tv({\n slots: {\n root: [\n 'squircle flex w-full items-center border border-input-border bg-input text-sm text-foreground',\n 'transition-[border-color] duration-[var(--cui-duration-fast)] ease-ui',\n 'focus-within:border-accent has-[input:disabled]:opacity-50',\n 'has-[[aria-invalid=true]]:border-danger has-[[data-invalid]]:border-danger',\n ],\n input: 'h-full min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted disabled:cursor-not-allowed',\n addon: 'flex shrink-0 items-center gap-1.5 text-muted [&_svg]:size-4 [&_svg]:shrink-0',\n },\n variants: {\n size: {\n sm: { root: 'h-control-sm rounded-control-sm gap-2 px-2.5' },\n md: { root: 'h-control rounded-control gap-2.5 px-3.5' },\n lg: { root: 'h-control-lg rounded-control-lg gap-3 px-4 text-base' },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { Input as BaseInput } from '@base-ui/react/input';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { inputGroupStyles } from './input-group.styles';\n\ntype Size = VariantProps<typeof inputGroupStyles>['size'];\nconst SizeContext = React.createContext<Size>('md');\n\nfunction InputGroupRoot({ className, size, ...props }: React.ComponentPropsWithRef<'div'> & { size?: Size }) {\n return (\n <SizeContext value={size}>\n <div className={cn(inputGroupStyles({ size }).root(), className)} {...props} />\n </SizeContext>\n );\n}\n\nfunction InputGroupInput({ className, ...props }: Omit<React.ComponentPropsWithRef<typeof BaseInput>, 'className'> & { className?: string }) {\n return <BaseInput className={cn(inputGroupStyles().input(), className)} {...props} />;\n}\n\nfunction InputGroupAddon({ className, ...props }: React.ComponentPropsWithRef<'span'>) {\n return <span className={cn(inputGroupStyles().addon(), className)} {...props} />;\n}\n\nexport interface InputGroupProps\n extends Omit<React.ComponentPropsWithRef<typeof BaseInput>, 'className' | 'size'>,\n VariantProps<typeof inputGroupStyles> {\n /** Icon or text before the input (e.g. a search icon, \"https://\"). */\n start?: React.ReactNode;\n /** Icon, text or a small button after the input (e.g. a `Kbd`, a clear button). */\n end?: React.ReactNode;\n className?: string;\n classNames?: { root?: string; input?: string; start?: string; end?: string };\n}\n\n/**\n * An input with add-ons. Short form: `<InputGroup start={<Search />} end={<Kbd>K</Kbd>} />`.\n * Compound: `InputGroup.Root`, `InputGroup.Addon`, `InputGroup.Input`.\n */\nfunction InputGroupSimple({ start, end, size, className, classNames, ...props }: InputGroupProps) {\n return (\n <InputGroupRoot size={size} className={cn(classNames?.root, className)}>\n {start && <InputGroupAddon className={classNames?.start}>{start}</InputGroupAddon>}\n <InputGroupInput className={classNames?.input} {...props} />\n {end && <InputGroupAddon className={classNames?.end}>{end}</InputGroupAddon>}\n </InputGroupRoot>\n );\n}\n\nexport const InputGroup = Object.assign(InputGroupSimple, {\n Root: InputGroupRoot,\n Input: InputGroupInput,\n Addon: InputGroupAddon,\n});\n","import { tv } from '../../lib/tv';\n\n/**\n * Joins buttons: inner corners go square, neighbouring borders overlap by one pixel.\n * Works with any Button variant; outline reads best.\n */\nexport const buttonGroupStyles = tv({\n base: 'inline-flex isolate [&>*:focus-visible]:z-10',\n variants: {\n orientation: {\n horizontal: [\n 'flex-row',\n '[&>*:not(:first-child)]:rounded-s-none [&>*:not(:last-child)]:rounded-e-none',\n '[&>*:not(:first-child)]:-ms-px',\n ],\n vertical: [\n 'flex-col',\n '[&>*:not(:first-child)]:rounded-t-none [&>*:not(:last-child)]:rounded-b-none',\n '[&>*:not(:first-child)]:-mt-px',\n ],\n },\n },\n defaultVariants: { orientation: 'horizontal' },\n});\n","import * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { buttonGroupStyles } from './button-group.styles';\n\nexport interface ButtonGroupProps extends React.ComponentPropsWithRef<'div'>, VariantProps<typeof buttonGroupStyles> {}\n\n/** Buttons joined into one control: `<ButtonGroup><Button variant=\"outline\">…</Button>…</ButtonGroup>`. */\nexport function ButtonGroup({ className, orientation, ...props }: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-orientation={orientation ?? 'horizontal'}\n className={cn(buttonGroupStyles({ orientation }), className)}\n {...props}\n />\n );\n}\n","import { tv } from '../../lib/tv';\n\n/**\n * Looks like `Input`: the group carries the border, the radius and the focus colour, the steppers sit\n * inside it as small ghost buttons with a concentric radius (group radius minus the 4px inset).\n * The input is a text input with `inputmode`, so there are never native spinner buttons.\n */\nexport const numberFieldStyles = tv({\n slots: {\n root: 'flex w-full flex-col gap-1.5',\n label: 'inline-flex w-fit items-center gap-1 text-sm font-medium text-foreground select-none',\n scrubArea: 'inline-flex w-fit cursor-ew-resize touch-none items-center select-none',\n scrubCursor: 'flex text-foreground drop-shadow-sm [&_svg]:size-5',\n group: [\n 'squircle flex w-full items-center border border-input-border bg-input p-[3px] text-foreground',\n 'transition-[border-color] duration-[var(--cui-duration-fast)] ease-ui',\n 'focus-within:border-accent',\n 'data-[invalid]:border-danger has-[[aria-invalid=true]]:border-danger',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n 'data-[readonly]:bg-surface-2/60',\n ],\n input: [\n 'h-full min-w-0 flex-1 bg-transparent px-1 text-center tabular-nums outline-none',\n 'placeholder:text-muted disabled:cursor-not-allowed',\n ],\n button: [\n 'squircle flex aspect-square h-full shrink-0 items-center justify-center border border-transparent text-muted outline-none select-none',\n 'transition-[background-color,color,scale] duration-[var(--cui-duration-fast)] ease-ui',\n 'hover:bg-hover hover:text-foreground focus-visible:border-accent focus-visible:text-foreground',\n 'active:scale-[var(--cui-press-scale)]',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[readonly]:pointer-events-none data-[readonly]:opacity-40',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 rtl:[&_svg]:-scale-x-100',\n ],\n scrubHandle: 'flex h-full shrink-0 items-center px-1.5 text-muted hover:text-foreground [&_svg]:size-4',\n },\n variants: {\n size: {\n sm: {\n group: 'h-control-sm rounded-control-sm text-sm',\n button: 'rounded-[calc(var(--radius-control-sm)-4px)] [&_svg]:size-3.5',\n },\n md: {\n group: 'h-control rounded-control text-sm',\n button: 'rounded-[calc(var(--radius-control)-4px)] [&_svg]:size-4',\n },\n lg: {\n group: 'h-control-lg rounded-control-lg text-base',\n button: 'rounded-[calc(var(--radius-control-lg)-4px)] [&_svg]:size-[1.125rem]',\n },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { NumberField as BaseNumberField } from '@base-ui/react/number-field';\nimport { ChevronsLeftRight, Minus, Plus } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { numberFieldStyles } from './number-field.styles';\n\ntype Size = VariantProps<typeof numberFieldStyles>['size'];\ntype Slots = keyof ReturnType<typeof numberFieldStyles>;\nconst SizeContext = React.createContext<Size>('md');\n\ntype PartProps<T extends React.ElementType> = Omit<React.ComponentPropsWithRef<T>, 'className'> & { className?: string };\n\nexport interface NumberFieldRootProps extends PartProps<typeof BaseNumberField.Root>, VariantProps<typeof numberFieldStyles> {}\n\nfunction NumberFieldRoot({ size, className, ...props }: NumberFieldRootProps) {\n return (\n <SizeContext value={size}>\n <BaseNumberField.Root className={cn(numberFieldStyles().root(), className)} {...props} />\n </SizeContext>\n );\n}\n\n/** The bordered box around the steppers and the input. */\nfunction NumberFieldGroup({ className, ...props }: PartProps<typeof BaseNumberField.Group>) {\n const size = React.useContext(SizeContext);\n return <BaseNumberField.Group className={cn(numberFieldStyles({ size }).group(), className)} {...props} />;\n}\n\n/** The text input (`inputmode=\"decimal\"`), formatted with the field's locale. */\nfunction NumberFieldInput({ className, ...props }: PartProps<typeof BaseNumberField.Input>) {\n return <BaseNumberField.Input className={cn(numberFieldStyles().input(), className)} {...props} />;\n}\n\n/** The minus button. Children replace the icon. */\nfunction NumberFieldDecrement({ className, children, ...props }: PartProps<typeof BaseNumberField.Decrement>) {\n const size = React.useContext(SizeContext);\n return (\n <BaseNumberField.Decrement className={cn(numberFieldStyles({ size }).button(), className)} {...props}>\n {children ?? <Minus aria-hidden />}\n </BaseNumberField.Decrement>\n );\n}\n\n/** The plus button. Children replace the icon. */\nfunction NumberFieldIncrement({ className, children, ...props }: PartProps<typeof BaseNumberField.Increment>) {\n const size = React.useContext(SizeContext);\n return (\n <BaseNumberField.Increment className={cn(numberFieldStyles({ size }).button(), className)} {...props}>\n {children ?? <Plus aria-hidden />}\n </BaseNumberField.Increment>\n );\n}\n\n/** Drag horizontally over its children to change the value. Put a label or an icon inside. */\nfunction NumberFieldScrubArea({ className, ...props }: PartProps<typeof BaseNumberField.ScrubArea>) {\n return <BaseNumberField.ScrubArea className={cn(numberFieldStyles().scrubArea(), className)} {...props} />;\n}\n\n/** The cursor shown while scrubbing (the real pointer is locked and hidden). */\nfunction NumberFieldScrubAreaCursor({ className, children, ...props }: PartProps<typeof BaseNumberField.ScrubAreaCursor>) {\n return (\n <BaseNumberField.ScrubAreaCursor className={cn(numberFieldStyles().scrubCursor(), className)} {...props}>\n {children ?? <ChevronsLeftRight aria-hidden />}\n </BaseNumberField.ScrubAreaCursor>\n );\n}\n\nexport interface NumberFieldProps extends NumberFieldRootProps {\n /** A label above the field. With `scrub`, dragging it changes the value. */\n label?: React.ReactNode;\n /**\n * Change the value by dragging horizontally: over the `label` if there is one, otherwise over a\n * small handle at the start of the field. @default false\n */\n scrub?: boolean;\n /** Shown while the field is empty. */\n placeholder?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n /** Hide the minus and plus buttons (arrow keys and the wheel still step). @default false */\n hideButtons?: boolean;\n classNames?: Partial<Record<Slots, string>>;\n}\n\n/**\n * A field for numbers with our own minus and plus buttons (no native spinners).\n * <NumberField aria-label=\"Ore\" defaultValue={50} min={0} max={999} />\n * Arrow keys step by `step`, Shift by `largeStep`, Alt by `smallStep`.\n * Compound: NumberField.Root / Group / Decrement / Input / Increment / ScrubArea / ScrubAreaCursor.\n */\nfunction NumberFieldSimple({\n label,\n scrub = false,\n placeholder,\n hideButtons = false,\n size,\n className,\n classNames,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: NumberFieldProps) {\n const autoId = React.useId();\n const inputId = id ?? autoId;\n const styles = numberFieldStyles({ size });\n const labelEl = label ? (\n <label htmlFor={inputId} className={cn(styles.label(), classNames?.label)}>\n {label}\n </label>\n ) : null;\n const cursor = <NumberFieldScrubAreaCursor className={classNames?.scrubCursor} />;\n\n return (\n <NumberFieldRoot id={label ? inputId : id} size={size} className={cn(classNames?.root, className)} {...props}>\n {labelEl &&\n (scrub ? (\n <NumberFieldScrubArea className={classNames?.scrubArea}>\n {labelEl}\n {cursor}\n </NumberFieldScrubArea>\n ) : (\n labelEl\n ))}\n <NumberFieldGroup className={classNames?.group}>\n {scrub && !labelEl && (\n <NumberFieldScrubArea className={cn(styles.scrubHandle(), classNames?.scrubHandle)}>\n <ChevronsLeftRight aria-hidden />\n {cursor}\n </NumberFieldScrubArea>\n )}\n {!hideButtons && <NumberFieldDecrement aria-label=\"Decrease\" className={classNames?.button} />}\n <NumberFieldInput\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n className={cn(hideButtons && 'px-2 text-start', classNames?.input)}\n />\n {!hideButtons && <NumberFieldIncrement aria-label=\"Increase\" className={classNames?.button} />}\n </NumberFieldGroup>\n </NumberFieldRoot>\n );\n}\n\nexport const NumberField = Object.assign(NumberFieldSimple, {\n Root: NumberFieldRoot,\n Group: NumberFieldGroup,\n Input: NumberFieldInput,\n Decrement: NumberFieldDecrement,\n Increment: NumberFieldIncrement,\n ScrubArea: NumberFieldScrubArea,\n ScrubAreaCursor: NumberFieldScrubAreaCursor,\n});\n","import { tv } from '../../lib/tv';\n\n/** Surface shared by every floating panel (popover, menu, tooltip, hover card, dialog). */\nexport const popupSurface = 'squircle border border-border bg-popover text-foreground shadow-overlay outline-none';\n\n/** Enter/exit like Fumadocs' popups: fade + a small scale from the trigger. */\nexport const popupMotion = [\n 'origin-(--transform-origin) transition-[opacity,scale] duration-[var(--cui-duration-fast)] ease-ui',\n 'data-[starting-style]:scale-96 data-[starting-style]:opacity-0',\n 'data-[ending-style]:scale-96 data-[ending-style]:opacity-0',\n].join(' ');\n\n/** A dimmed, slightly blurred backdrop for modal overlays. */\nexport const backdropStyles =\n 'fixed inset-0 z-50 bg-black/30 backdrop-blur-xs transition-opacity duration-[var(--cui-duration-normal)] ease-ui data-[starting-style]:opacity-0 data-[ending-style]:opacity-0';\n\nexport const popoverStyles = tv({\n slots: {\n positioner: 'z-50 outline-none',\n popup: [popupSurface, popupMotion, 'w-72 max-w-[calc(100vw-2rem)] rounded-control p-4 text-sm'],\n title: 'text-sm font-semibold text-foreground',\n description: 'mt-1 text-sm text-muted',\n close: 'absolute top-2.5 right-2.5',\n },\n});\n","import { tv } from '../../lib/tv';\nimport { popupMotion, popupSurface } from '../popover/popover.styles';\n\n/**\n * Same surface as popovers and menus, just smaller: a small-control radius (never the chip one, which\n * read as a sharp box), roomy padding and regular-weight text. No arrow: a pointed tip breaks the\n * squircle outline, and the side offset already makes the anchor obvious.\n */\nexport const tooltipStyles = tv({\n slots: {\n positioner: 'z-50',\n popup: [\n popupSurface,\n popupMotion,\n 'max-w-72 rounded-control-sm px-3 py-2 text-xs leading-relaxed text-balance',\n ],\n },\n});\n","import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { tooltipStyles } from './tooltip.styles';\n\nconst styles = tooltipStyles();\n\ntype Side = 'top' | 'right' | 'bottom' | 'left' | 'inline-start' | 'inline-end';\ntype Align = 'start' | 'center' | 'end';\n\nexport interface TooltipContentProps extends React.ComponentPropsWithRef<typeof BaseTooltip.Popup> {\n /** Which side of the trigger the tooltip appears on. @default 'top' */\n side?: Side;\n /** How the tooltip lines up with the trigger along that side. @default 'center' */\n align?: Align;\n /** Gap between trigger and tooltip, in px. @default 8 */\n sideOffset?: number;\n classNames?: { positioner?: string; popup?: string };\n}\n\nfunction TooltipContent({\n side = 'top',\n align = 'center',\n sideOffset = 8,\n className,\n classNames,\n ...props\n}: TooltipContentProps) {\n return (\n <BaseTooltip.Portal>\n <BaseTooltip.Positioner\n side={side}\n align={align}\n sideOffset={sideOffset}\n className={cn(styles.positioner(), classNames?.positioner)}\n >\n <BaseTooltip.Popup className={cn(styles.popup(), classNames?.popup, className)} {...props} />\n </BaseTooltip.Positioner>\n </BaseTooltip.Portal>\n );\n}\n\nexport interface TooltipProps extends Omit<React.ComponentProps<typeof BaseTooltip.Root>, 'children'> {\n /** The hint text. */\n content: React.ReactNode;\n /** The element that shows the tooltip on hover and focus. */\n children: React.ReactElement;\n side?: Side;\n align?: Align;\n /** Milliseconds before it opens. @default 400 */\n delay?: number;\n /** Milliseconds before it closes once the pointer leaves. @default 0 */\n closeDelay?: number;\n className?: string;\n classNames?: { positioner?: string; popup?: string };\n}\n\n/**\n * A short hint on hover or focus.\n * <Tooltip content=\"Copy\"><Button size=\"icon\">…</Button></Tooltip>\n * Wrap a group in `Tooltip.Provider` so neighbouring tooltips open instantly one after another.\n */\nfunction TooltipSimple({\n content,\n children,\n side,\n align,\n delay = 400,\n closeDelay,\n className,\n classNames,\n ...root\n}: TooltipProps) {\n return (\n <BaseTooltip.Root {...root}>\n <BaseTooltip.Trigger delay={delay} closeDelay={closeDelay} render={children} />\n <TooltipContent side={side} align={align} className={className} classNames={classNames}>\n {content}\n </TooltipContent>\n </BaseTooltip.Root>\n );\n}\n\nexport const Tooltip = Object.assign(TooltipSimple, {\n Provider: BaseTooltip.Provider,\n Root: BaseTooltip.Root,\n Trigger: BaseTooltip.Trigger,\n Content: TooltipContent,\n});\n","import { Popover as BasePopover } from '@base-ui/react/popover';\nimport { X } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { Button } from '../button/button';\nimport { popoverStyles } from './popover.styles';\n\nconst styles = popoverStyles();\n\ntype Side = 'top' | 'right' | 'bottom' | 'left' | 'inline-start' | 'inline-end';\ntype Align = 'start' | 'center' | 'end';\n\nexport interface PopoverContentProps extends React.ComponentPropsWithRef<typeof BasePopover.Popup> {\n side?: Side;\n align?: Align;\n sideOffset?: number;\n /** Show a small close button in the corner. @default false */\n showClose?: boolean;\n classNames?: { positioner?: string; popup?: string };\n}\n\nfunction PopoverContent({\n side = 'bottom',\n align = 'center',\n sideOffset = 8,\n showClose = false,\n className,\n classNames,\n children,\n ...props\n}: PopoverContentProps) {\n return (\n <BasePopover.Portal>\n <BasePopover.Positioner\n side={side}\n align={align}\n sideOffset={sideOffset}\n className={cn(styles.positioner(), classNames?.positioner)}\n >\n <BasePopover.Popup className={cn(styles.popup(), showClose && 'pe-11', classNames?.popup, className)} {...props}>\n {children}\n {showClose && (\n <BasePopover.Close\n render={<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Close\" className={styles.close()} />}\n >\n <X />\n </BasePopover.Close>\n )}\n </BasePopover.Popup>\n </BasePopover.Positioner>\n </BasePopover.Portal>\n );\n}\n\nfunction PopoverTitle({ className, ...props }: React.ComponentPropsWithRef<typeof BasePopover.Title>) {\n return <BasePopover.Title className={cn(styles.title(), className)} {...props} />;\n}\n\nfunction PopoverDescription({ className, ...props }: React.ComponentPropsWithRef<typeof BasePopover.Description>) {\n return <BasePopover.Description className={cn(styles.description(), className)} {...props} />;\n}\n\nexport interface PopoverProps extends Omit<React.ComponentProps<typeof BasePopover.Root>, 'children'> {\n /** The element that opens the popover (a Button, a link …). */\n trigger: React.ReactElement;\n title?: React.ReactNode;\n description?: React.ReactNode;\n side?: Side;\n align?: Align;\n /** Show a small close button in the corner. @default false */\n showClose?: boolean;\n className?: string;\n classNames?: { positioner?: string; popup?: string };\n children?: React.ReactNode;\n}\n\n/**\n * Floating content anchored to a trigger.\n * <Popover trigger={<Button>Open</Button>} title=\"Filters\">…</Popover>\n * or compound: Popover.Root / Trigger / Content / Title / Description / Close.\n */\nfunction PopoverSimple({\n trigger,\n title,\n description,\n side,\n align,\n showClose,\n className,\n classNames,\n children,\n ...root\n}: PopoverProps) {\n return (\n <BasePopover.Root {...root}>\n <BasePopover.Trigger render={trigger} />\n <PopoverContent side={side} align={align} showClose={showClose} className={className} classNames={classNames}>\n {title && <PopoverTitle>{title}</PopoverTitle>}\n {description && <PopoverDescription>{description}</PopoverDescription>}\n {children}\n </PopoverContent>\n </BasePopover.Root>\n );\n}\n\nexport const Popover = Object.assign(PopoverSimple, {\n Root: BasePopover.Root,\n Trigger: BasePopover.Trigger,\n Content: PopoverContent,\n Title: PopoverTitle,\n Description: PopoverDescription,\n Close: BasePopover.Close,\n});\n","import { tv } from '../../lib/tv';\nimport { backdropStyles, popupSurface } from '../popover/popover.styles';\n\nexport const dialogStyles = tv({\n slots: {\n backdrop: backdropStyles,\n popup: [\n popupSurface,\n 'fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-y-auto rounded-card p-6',\n 'transition-[opacity,scale] duration-[var(--cui-duration-normal)] ease-ui',\n 'data-[starting-style]:scale-96 data-[starting-style]:opacity-0 data-[ending-style]:scale-96 data-[ending-style]:opacity-0',\n ],\n header: 'flex flex-col gap-1.5 pe-8',\n title: 'font-heading text-lg font-[weight:var(--cui-heading-weight)] tracking-[var(--cui-heading-tracking)] text-foreground',\n description: 'text-sm text-muted',\n body: 'mt-4 text-sm',\n footer: 'mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n close: 'absolute top-4 right-4',\n },\n variants: {\n size: {\n sm: { popup: 'max-w-sm' },\n md: { popup: 'max-w-lg' },\n lg: { popup: 'max-w-2xl' },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport { X } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { Button } from '../button/button';\nimport { dialogStyles } from './dialog.styles';\n\nconst styles = dialogStyles();\ntype DivProps = React.ComponentPropsWithRef<'div'>;\n\nexport interface DialogContentProps\n extends React.ComponentPropsWithRef<typeof BaseDialog.Popup>,\n VariantProps<typeof dialogStyles> {\n /** Show the close button in the corner. @default true */\n showClose?: boolean;\n classNames?: { backdrop?: string; popup?: string };\n}\n\nfunction DialogContent({ size, showClose = true, className, classNames, children, ...props }: DialogContentProps) {\n return (\n <BaseDialog.Portal>\n <BaseDialog.Backdrop className={cn(styles.backdrop(), classNames?.backdrop)} />\n <BaseDialog.Popup className={cn(dialogStyles({ size }).popup(), classNames?.popup, className)} {...props}>\n {children}\n {showClose && (\n <BaseDialog.Close render={<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Close\" className={styles.close()} />}>\n <X />\n </BaseDialog.Close>\n )}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n );\n}\n\nconst DialogHeader = ({ className, ...props }: DivProps) => <div className={cn(styles.header(), className)} {...props} />;\nconst DialogBody = ({ className, ...props }: DivProps) => <div className={cn(styles.body(), className)} {...props} />;\nconst DialogFooter = ({ className, ...props }: DivProps) => <div className={cn(styles.footer(), className)} {...props} />;\n\nfunction DialogTitle({ className, ...props }: React.ComponentPropsWithRef<typeof BaseDialog.Title>) {\n return <BaseDialog.Title className={cn(styles.title(), className)} {...props} />;\n}\nfunction DialogDescription({ className, ...props }: React.ComponentPropsWithRef<typeof BaseDialog.Description>) {\n return <BaseDialog.Description className={cn(styles.description(), className)} {...props} />;\n}\n\nexport interface DialogProps extends Omit<React.ComponentProps<typeof BaseDialog.Root>, 'children'> {\n trigger?: React.ReactElement;\n title: React.ReactNode;\n description?: React.ReactNode;\n /** Buttons at the bottom; wrap the closing ones in `Dialog.Close render={…}`. */\n footer?: React.ReactNode;\n size?: 'sm' | 'md' | 'lg';\n className?: string;\n children?: React.ReactNode;\n}\n\n/**\n * A modal window.\n * <Dialog trigger={<Button>Edit</Button>} title=\"Edit kit\" footer={…}>…</Dialog>\n * or compound: Dialog.Root / Trigger / Content / Header / Title / Description / Body / Footer / Close.\n */\nfunction DialogSimple({ trigger, title, description, footer, size, className, children, ...root }: DialogProps) {\n return (\n <BaseDialog.Root {...root}>\n {trigger && <BaseDialog.Trigger render={trigger} />}\n <DialogContent size={size} className={className}>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n {description && <DialogDescription>{description}</DialogDescription>}\n </DialogHeader>\n {children && <DialogBody>{children}</DialogBody>}\n {footer && <DialogFooter>{footer}</DialogFooter>}\n </DialogContent>\n </BaseDialog.Root>\n );\n}\n\nexport const Dialog = Object.assign(DialogSimple, {\n Root: BaseDialog.Root,\n Trigger: BaseDialog.Trigger,\n Content: DialogContent,\n Header: DialogHeader,\n Title: DialogTitle,\n Description: DialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n Close: BaseDialog.Close,\n});\n","import { tv } from '../../lib/tv';\nimport { dialogStyles } from '../dialog/dialog.styles';\n\n/** Same panel as Dialog, narrower and without a corner close button. */\nexport const alertDialogStyles = tv({\n extend: dialogStyles,\n slots: {\n header: 'pe-0',\n },\n defaultVariants: { size: 'sm' },\n});\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { Button } from '../button/button';\nimport { alertDialogStyles } from './alert-dialog.styles';\n\nconst styles = alertDialogStyles();\ntype DivProps = React.ComponentPropsWithRef<'div'>;\n\nexport interface AlertDialogContentProps\n extends React.ComponentPropsWithRef<typeof BaseAlertDialog.Popup>,\n VariantProps<typeof alertDialogStyles> {\n classNames?: { backdrop?: string; popup?: string };\n}\n\nfunction AlertDialogContent({ size, className, classNames, ...props }: AlertDialogContentProps) {\n return (\n <BaseAlertDialog.Portal>\n <BaseAlertDialog.Backdrop className={cn(styles.backdrop(), classNames?.backdrop)} />\n <BaseAlertDialog.Popup className={cn(alertDialogStyles({ size }).popup(), classNames?.popup, className)} {...props} />\n </BaseAlertDialog.Portal>\n );\n}\n\nconst AlertDialogHeader = ({ className, ...props }: DivProps) => <div className={cn(styles.header(), className)} {...props} />;\nconst AlertDialogFooter = ({ className, ...props }: DivProps) => <div className={cn(styles.footer(), className)} {...props} />;\n\nfunction AlertDialogTitle({ className, ...props }: React.ComponentPropsWithRef<typeof BaseAlertDialog.Title>) {\n return <BaseAlertDialog.Title className={cn(styles.title(), className)} {...props} />;\n}\nfunction AlertDialogDescription({ className, ...props }: React.ComponentPropsWithRef<typeof BaseAlertDialog.Description>) {\n return <BaseAlertDialog.Description className={cn(styles.description(), className)} {...props} />;\n}\n\nexport interface AlertDialogProps extends Omit<React.ComponentProps<typeof BaseAlertDialog.Root>, 'children'> {\n trigger?: React.ReactElement;\n title: React.ReactNode;\n description?: React.ReactNode;\n /** @default 'Cancel' */\n cancelLabel?: React.ReactNode;\n /** @default 'Continue' */\n actionLabel?: React.ReactNode;\n onAction?: () => void;\n /** `danger` paints the action red (delete, reset …). @default 'default' */\n tone?: 'default' | 'danger';\n className?: string;\n}\n\n/**\n * A modal that asks to confirm an action. Clicking outside doesn't dismiss it.\n * <AlertDialog trigger={<Button variant=\"danger\">Delete</Button>} title=\"Delete kit?\" tone=\"danger\" onAction={…} />\n */\nfunction AlertDialogSimple({\n trigger,\n title,\n description,\n cancelLabel = 'Cancel',\n actionLabel = 'Continue',\n onAction,\n tone = 'default',\n className,\n ...root\n}: AlertDialogProps) {\n return (\n <BaseAlertDialog.Root {...root}>\n {trigger && <BaseAlertDialog.Trigger render={trigger} />}\n <AlertDialogContent className={className}>\n <AlertDialogHeader>\n <AlertDialogTitle>{title}</AlertDialogTitle>\n {description && <AlertDialogDescription>{description}</AlertDialogDescription>}\n </AlertDialogHeader>\n <AlertDialogFooter>\n <BaseAlertDialog.Close render={<Button variant=\"outline\" />}>{cancelLabel}</BaseAlertDialog.Close>\n <BaseAlertDialog.Close render={<Button variant={tone === 'danger' ? 'danger' : 'solid'} onClick={onAction} />}>\n {actionLabel}\n </BaseAlertDialog.Close>\n </AlertDialogFooter>\n </AlertDialogContent>\n </BaseAlertDialog.Root>\n );\n}\n\nexport const AlertDialog = Object.assign(AlertDialogSimple, {\n Root: BaseAlertDialog.Root,\n Trigger: BaseAlertDialog.Trigger,\n Content: AlertDialogContent,\n Header: AlertDialogHeader,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Footer: AlertDialogFooter,\n Close: BaseAlertDialog.Close,\n});\n","import { tv } from '../../lib/tv';\nimport { backdropStyles, popupSurface } from '../popover/popover.styles';\n\n/** A floating side panel, inset from the window edge like the docs page panel. */\nexport const sheetStyles = tv({\n slots: {\n backdrop: backdropStyles,\n popup: [\n popupSurface,\n 'fixed z-50 flex flex-col overflow-y-auto rounded-card p-6',\n 'transition-[translate,opacity] duration-[var(--cui-duration-normal)] ease-ui data-[ending-style]:opacity-0',\n ],\n header: 'flex flex-col gap-1.5 pe-8',\n title: 'font-heading text-lg font-[weight:var(--cui-heading-weight)] tracking-[var(--cui-heading-tracking)] text-foreground',\n description: 'text-sm text-muted',\n body: 'mt-5 flex-1 text-sm',\n footer: 'mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n close: 'absolute top-4 right-4',\n },\n variants: {\n side: {\n right: { popup: 'inset-y-2 right-2 w-[min(26rem,calc(100vw-1rem))] data-[starting-style]:translate-x-[calc(100%+1rem)] data-[ending-style]:translate-x-[calc(100%+1rem)]' },\n left: { popup: 'inset-y-2 left-2 w-[min(26rem,calc(100vw-1rem))] data-[starting-style]:-translate-x-[calc(100%+1rem)] data-[ending-style]:-translate-x-[calc(100%+1rem)]' },\n top: { popup: 'inset-x-2 top-2 max-h-[80dvh] data-[starting-style]:-translate-y-[calc(100%+1rem)] data-[ending-style]:-translate-y-[calc(100%+1rem)]' },\n bottom: { popup: 'inset-x-2 bottom-2 max-h-[80dvh] data-[starting-style]:translate-y-[calc(100%+1rem)] data-[ending-style]:translate-y-[calc(100%+1rem)]' },\n },\n },\n defaultVariants: { side: 'right' },\n});\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport { X } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { Button } from '../button/button';\nimport { sheetStyles } from './sheet.styles';\n\nconst styles = sheetStyles();\ntype DivProps = React.ComponentPropsWithRef<'div'>;\n\nexport interface SheetContentProps\n extends React.ComponentPropsWithRef<typeof BaseDialog.Popup>,\n VariantProps<typeof sheetStyles> {\n /** @default true */\n showClose?: boolean;\n classNames?: { backdrop?: string; popup?: string };\n}\n\nfunction SheetContent({ side, showClose = true, className, classNames, children, ...props }: SheetContentProps) {\n return (\n <BaseDialog.Portal>\n <BaseDialog.Backdrop className={cn(styles.backdrop(), classNames?.backdrop)} />\n <BaseDialog.Popup className={cn(sheetStyles({ side }).popup(), classNames?.popup, className)} {...props}>\n {children}\n {showClose && (\n <BaseDialog.Close render={<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Close\" className={styles.close()} />}>\n <X />\n </BaseDialog.Close>\n )}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n );\n}\n\nconst SheetHeader = ({ className, ...props }: DivProps) => <div className={cn(styles.header(), className)} {...props} />;\nconst SheetBody = ({ className, ...props }: DivProps) => <div className={cn(styles.body(), className)} {...props} />;\nconst SheetFooter = ({ className, ...props }: DivProps) => <div className={cn(styles.footer(), className)} {...props} />;\n\nfunction SheetTitle({ className, ...props }: React.ComponentPropsWithRef<typeof BaseDialog.Title>) {\n return <BaseDialog.Title className={cn(styles.title(), className)} {...props} />;\n}\nfunction SheetDescription({ className, ...props }: React.ComponentPropsWithRef<typeof BaseDialog.Description>) {\n return <BaseDialog.Description className={cn(styles.description(), className)} {...props} />;\n}\n\nexport interface SheetProps extends Omit<React.ComponentProps<typeof BaseDialog.Root>, 'children'> {\n trigger?: React.ReactElement;\n title: React.ReactNode;\n description?: React.ReactNode;\n footer?: React.ReactNode;\n side?: 'right' | 'left' | 'top' | 'bottom';\n className?: string;\n children?: React.ReactNode;\n}\n\n/**\n * A side panel over the page (filters, settings, details).\n * <Sheet trigger={<Button>Filters</Button>} title=\"Filters\" side=\"right\">…</Sheet>\n */\nfunction SheetSimple({ trigger, title, description, footer, side, className, children, ...root }: SheetProps) {\n return (\n <BaseDialog.Root {...root}>\n {trigger && <BaseDialog.Trigger render={trigger} />}\n <SheetContent side={side} className={className}>\n <SheetHeader>\n <SheetTitle>{title}</SheetTitle>\n {description && <SheetDescription>{description}</SheetDescription>}\n </SheetHeader>\n {children && <SheetBody>{children}</SheetBody>}\n {footer && <SheetFooter>{footer}</SheetFooter>}\n </SheetContent>\n </BaseDialog.Root>\n );\n}\n\nexport const Sheet = Object.assign(SheetSimple, {\n Root: BaseDialog.Root,\n Trigger: BaseDialog.Trigger,\n Content: SheetContent,\n Header: SheetHeader,\n Title: SheetTitle,\n Description: SheetDescription,\n Body: SheetBody,\n Footer: SheetFooter,\n Close: BaseDialog.Close,\n});\n","import { tv } from '../../lib/tv';\nimport { popupSurface } from '../popover/popover.styles';\n\n/**\n * A bottom panel you can swipe down to close (mobile-friendly sheet). The slide is a little slower\n * than other overlays (1.8 × the normal duration) because it travels the whole height of the screen;\n * it is still derived from the token, so reduced motion turns it off.\n */\nexport const drawerStyles = tv({\n slots: {\n backdrop: [\n 'fixed inset-0 z-50 bg-black/30 backdrop-blur-xs',\n 'opacity-[calc(1-var(--drawer-swipe-progress,0))] transition-opacity duration-[calc(var(--cui-duration-normal)*1.8)] ease-ui',\n 'data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 data-[swiping]:duration-0',\n ],\n viewport: 'fixed inset-0 z-50 flex items-end justify-center px-2 pb-2',\n popup: [\n popupSurface,\n 'relative flex max-h-[85dvh] w-full max-w-2xl flex-col rounded-card px-6 pt-3 pb-6',\n '[transform:translateY(var(--drawer-swipe-movement-y,0px))] transition-transform duration-[calc(var(--cui-duration-normal)*1.8)] ease-ui',\n 'data-[starting-style]:[transform:translateY(calc(100%+1rem))] data-[ending-style]:[transform:translateY(calc(100%+1rem))]',\n 'data-[swiping]:select-none data-[swiping]:duration-0',\n ],\n handle: 'mx-auto mb-4 h-1.5 w-10 shrink-0 rounded-full bg-border-strong',\n content: 'flex min-h-0 flex-1 flex-col overflow-y-auto',\n title: 'font-heading text-lg font-[weight:var(--cui-heading-weight)] tracking-[var(--cui-heading-tracking)] text-foreground',\n description: 'mt-1 text-sm text-muted',\n body: 'mt-4 text-sm',\n footer: 'mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n },\n});\n","import { Drawer as BaseDrawer } from '@base-ui/react/drawer';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { drawerStyles } from './drawer.styles';\n\nconst styles = drawerStyles();\n\nexport interface DrawerContentProps extends React.ComponentPropsWithRef<typeof BaseDrawer.Popup> {\n /** Show the grab handle at the top. @default true */\n showHandle?: boolean;\n classNames?: { backdrop?: string; viewport?: string; popup?: string; content?: string };\n}\n\nfunction DrawerContent({ showHandle = true, className, classNames, children, ...props }: DrawerContentProps) {\n return (\n <BaseDrawer.Portal>\n <BaseDrawer.Backdrop className={cn(styles.backdrop(), classNames?.backdrop)} />\n <BaseDrawer.Viewport className={cn(styles.viewport(), classNames?.viewport)}>\n <BaseDrawer.Popup className={cn(styles.popup(), classNames?.popup, className)} {...props}>\n {showHandle && <div aria-hidden className={styles.handle()} />}\n <BaseDrawer.Content className={cn(styles.content(), classNames?.content)}>{children}</BaseDrawer.Content>\n </BaseDrawer.Popup>\n </BaseDrawer.Viewport>\n </BaseDrawer.Portal>\n );\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentPropsWithRef<typeof BaseDrawer.Title>) {\n return <BaseDrawer.Title className={cn(styles.title(), className)} {...props} />;\n}\nfunction DrawerDescription({ className, ...props }: React.ComponentPropsWithRef<typeof BaseDrawer.Description>) {\n return <BaseDrawer.Description className={cn(styles.description(), className)} {...props} />;\n}\nconst DrawerBody = ({ className, ...props }: React.ComponentPropsWithRef<'div'>) => (\n <div className={cn(styles.body(), className)} {...props} />\n);\nconst DrawerFooter = ({ className, ...props }: React.ComponentPropsWithRef<'div'>) => (\n <div className={cn(styles.footer(), className)} {...props} />\n);\n\nexport interface DrawerProps extends Omit<React.ComponentProps<typeof BaseDrawer.Root>, 'children'> {\n trigger?: React.ReactElement;\n title: React.ReactNode;\n description?: React.ReactNode;\n footer?: React.ReactNode;\n className?: string;\n children?: React.ReactNode;\n}\n\n/**\n * A panel that slides up from the bottom and closes with a swipe down.\n * <Drawer trigger={<Button>Details</Button>} title=\"Kit details\">…</Drawer>\n * or compound: Drawer.Root / Trigger / Content / Title / Description / Body / Footer / Close.\n */\nfunction DrawerSimple({ trigger, title, description, footer, className, children, ...root }: DrawerProps) {\n return (\n <BaseDrawer.Root {...root}>\n {trigger && <BaseDrawer.Trigger render={trigger} />}\n <DrawerContent className={className}>\n <DrawerTitle>{title}</DrawerTitle>\n {description && <DrawerDescription>{description}</DrawerDescription>}\n {children && <DrawerBody>{children}</DrawerBody>}\n {footer && <DrawerFooter>{footer}</DrawerFooter>}\n </DrawerContent>\n </BaseDrawer.Root>\n );\n}\n\nexport const Drawer = Object.assign(DrawerSimple, {\n Root: BaseDrawer.Root,\n Trigger: BaseDrawer.Trigger,\n Content: DrawerContent,\n Title: DrawerTitle,\n Description: DrawerDescription,\n Body: DrawerBody,\n Footer: DrawerFooter,\n Close: BaseDrawer.Close,\n});\n","import { tv } from '../../lib/tv';\nimport { popupMotion, popupSurface } from '../popover/popover.styles';\n\n/** Shared by Dropdown Menu and Context Menu. */\nexport const menuStyles = tv({\n slots: {\n positioner: 'z-50 outline-none',\n popup: [\n popupSurface,\n popupMotion,\n 'flex max-h-(--available-height) min-w-48 flex-col overflow-y-auto rounded-control p-1 text-sm',\n ],\n item: [\n 'squircle relative flex min-h-9 w-full cursor-default select-none items-center gap-2.5 rounded-item px-2.5 py-1.5 text-start outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui data-[highlighted]:bg-hover data-[highlighted]:text-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n '[&_svg]:size-4 [&_svg]:shrink-0 [&>svg]:text-muted',\n ],\n danger: 'text-danger data-[highlighted]:text-danger [&>svg]:text-danger',\n indicator: 'flex size-4 shrink-0 items-center justify-center text-accent-soft-foreground',\n separator: 'mx-1 my-1 h-px bg-border',\n groupLabel: 'px-2.5 pt-2 pb-1 text-xs font-medium text-muted',\n shortcut: 'ms-auto ps-4 font-mono text-[0.6875rem] tracking-wide text-muted',\n subChevron: 'ms-auto size-3.5 text-muted',\n },\n});\n","import { Menu } from '@base-ui/react/menu';\nimport { Check, ChevronRight, Dot } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { menuStyles } from './dropdown-menu.styles';\n\nconst styles = menuStyles();\n\ntype Side = 'top' | 'right' | 'bottom' | 'left' | 'inline-start' | 'inline-end';\n\nexport interface DropdownMenuContentProps extends React.ComponentPropsWithRef<typeof Menu.Popup> {\n side?: Side;\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n classNames?: { positioner?: string; popup?: string };\n}\n\nfunction DropdownMenuContent({\n side = 'bottom',\n align = 'start',\n sideOffset = 6,\n className,\n classNames,\n ...props\n}: DropdownMenuContentProps) {\n return (\n <Menu.Portal>\n <Menu.Positioner side={side} align={align} sideOffset={sideOffset} className={cn(styles.positioner(), classNames?.positioner)}>\n <Menu.Popup className={cn(styles.popup(), classNames?.popup, className)} {...props} />\n </Menu.Positioner>\n </Menu.Portal>\n );\n}\n\nexport interface DropdownMenuItemProps extends React.ComponentPropsWithRef<typeof Menu.Item> {\n /** Paint the item in the danger colour (delete, sign out …). */\n danger?: boolean;\n}\n\nfunction DropdownMenuItem({ danger, className, ...props }: DropdownMenuItemProps) {\n return <Menu.Item className={cn(styles.item(), danger && styles.danger(), className)} {...props} />;\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, ...props }: React.ComponentPropsWithRef<typeof Menu.CheckboxItem>) {\n return (\n <Menu.CheckboxItem className={cn(styles.item(), className)} {...props}>\n <span className={styles.indicator()}>\n <Menu.CheckboxItemIndicator>\n <Check />\n </Menu.CheckboxItemIndicator>\n </span>\n {children}\n </Menu.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioItem({ className, children, ...props }: React.ComponentPropsWithRef<typeof Menu.RadioItem>) {\n return (\n <Menu.RadioItem className={cn(styles.item(), className)} {...props}>\n <span className={styles.indicator()}>\n <Menu.RadioItemIndicator>\n <Dot className=\"size-6!\" />\n </Menu.RadioItemIndicator>\n </span>\n {children}\n </Menu.RadioItem>\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentPropsWithRef<typeof Menu.Separator>) {\n return <Menu.Separator className={cn(styles.separator(), className)} {...props} />;\n}\n\nfunction DropdownMenuGroupLabel({ className, ...props }: React.ComponentPropsWithRef<typeof Menu.GroupLabel>) {\n return <Menu.GroupLabel className={cn(styles.groupLabel(), className)} {...props} />;\n}\n\n/** A keyboard hint at the end of an item, e.g. `Ctrl K`. */\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentPropsWithRef<'kbd'>) {\n return <kbd className={cn(styles.shortcut(), className)} {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({ className, children, ...props }: React.ComponentPropsWithRef<typeof Menu.SubmenuTrigger>) {\n return (\n <Menu.SubmenuTrigger className={cn(styles.item(), 'data-[popup-open]:bg-hover', className)} {...props}>\n {children}\n <ChevronRight className={styles.subChevron()} />\n </Menu.SubmenuTrigger>\n );\n}\n\nfunction DropdownMenuSubContent(props: DropdownMenuContentProps) {\n return <DropdownMenuContent side=\"inline-end\" align=\"start\" sideOffset={4} {...props} />;\n}\n\nexport type DropdownMenuEntry =\n | { type?: 'item'; label: React.ReactNode; icon?: React.ReactNode; shortcut?: string; danger?: boolean; disabled?: boolean; onClick?: () => void }\n | { type: 'separator' }\n | { type: 'label'; label: React.ReactNode };\n\nexport interface DropdownMenuProps extends Omit<React.ComponentProps<typeof Menu.Root>, 'children'> {\n /** The button that opens the menu. */\n trigger: React.ReactElement;\n items: DropdownMenuEntry[];\n side?: Side;\n align?: 'start' | 'center' | 'end';\n className?: string;\n}\n\n/** Renders a list of entries; shared by the simple forms of Dropdown Menu and Context Menu.\n * A `label` starts a group that runs until the next separator or label (Base UI needs labels\n * inside `Menu.Group`). */\nexport function renderMenuEntries(items: DropdownMenuEntry[]) {\n const out: React.ReactNode[] = [];\n let group: { key: number; children: React.ReactNode[] } | null = null;\n const flush = () => {\n if (group) out.push(<Menu.Group key={`g${group.key}`}>{group.children}</Menu.Group>);\n group = null;\n };\n items.forEach((entry, i) => {\n if (entry.type === 'separator') {\n flush();\n out.push(<DropdownMenuSeparator key={i} />);\n return;\n }\n if (entry.type === 'label') {\n flush();\n group = { key: i, children: [<DropdownMenuGroupLabel key={i}>{entry.label}</DropdownMenuGroupLabel>] };\n return;\n }\n const node = (\n <DropdownMenuItem key={i} danger={entry.danger} disabled={entry.disabled} onClick={entry.onClick}>\n {entry.icon}\n {entry.label}\n {entry.shortcut && <DropdownMenuShortcut>{entry.shortcut}</DropdownMenuShortcut>}\n </DropdownMenuItem>\n );\n if (group) (group as { children: React.ReactNode[] }).children.push(node);\n else out.push(node);\n });\n flush();\n return out;\n}\n\n/**\n * A menu opened by a button.\n * <DropdownMenu trigger={<Button>Options</Button>} items={[{ label: 'Rename', shortcut: 'F2' }]} />\n * or compound: DropdownMenu.Root / Trigger / Content / Item / CheckboxItem / RadioGroup / RadioItem /\n * Group / GroupLabel / Separator / Shortcut / Sub / SubTrigger / SubContent.\n */\nfunction DropdownMenuSimple({ trigger, items, side, align, className, ...root }: DropdownMenuProps) {\n return (\n <Menu.Root {...root}>\n <Menu.Trigger render={trigger} />\n <DropdownMenuContent side={side} align={align} className={className}>\n {renderMenuEntries(items)}\n </DropdownMenuContent>\n </Menu.Root>\n );\n}\n\nexport const DropdownMenu = Object.assign(DropdownMenuSimple, {\n Root: Menu.Root,\n Trigger: Menu.Trigger,\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n RadioGroup: Menu.RadioGroup,\n RadioItem: DropdownMenuRadioItem,\n Group: Menu.Group,\n GroupLabel: DropdownMenuGroupLabel,\n Separator: DropdownMenuSeparator,\n Shortcut: DropdownMenuShortcut,\n Sub: Menu.SubmenuRoot,\n SubTrigger: DropdownMenuSubTrigger,\n SubContent: DropdownMenuSubContent,\n});\n","import { tv } from '../../lib/tv';\nimport { menuStyles } from '../dropdown-menu/dropdown-menu.styles';\n\n/** Context Menu reuses the menu look; only the trigger area is its own. */\nexport const contextMenuStyles = tv({\n extend: menuStyles,\n slots: {\n area: 'select-none',\n },\n});\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { DropdownMenu, type DropdownMenuEntry, renderMenuEntries } from '../dropdown-menu/dropdown-menu';\nimport { contextMenuStyles } from './context-menu.styles';\n\nconst styles = contextMenuStyles();\n\nexport interface ContextMenuContentProps extends React.ComponentPropsWithRef<typeof BaseContextMenu.Popup> {\n classNames?: { positioner?: string; popup?: string };\n}\n\nfunction ContextMenuContent({ className, classNames, ...props }: ContextMenuContentProps) {\n return (\n <BaseContextMenu.Portal>\n <BaseContextMenu.Positioner className={cn(styles.positioner(), classNames?.positioner)}>\n <BaseContextMenu.Popup className={cn(styles.popup(), classNames?.popup, className)} {...props} />\n </BaseContextMenu.Positioner>\n </BaseContextMenu.Portal>\n );\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentPropsWithRef<typeof BaseContextMenu.Trigger>) {\n return <BaseContextMenu.Trigger className={cn(styles.area(), className)} {...props} />;\n}\n\nexport interface ContextMenuProps extends Omit<React.ComponentProps<typeof BaseContextMenu.Root>, 'children'> {\n items: DropdownMenuEntry[];\n /** The area that opens the menu on right click (or long press). */\n children: React.ReactNode;\n className?: string;\n}\n\n/**\n * A menu on right click.\n * <ContextMenu items={[{ label: 'Copy', shortcut: 'Ctrl C' }]}><div>…</div></ContextMenu>\n * Compound parts share Dropdown Menu's items: ContextMenu.Item, .Separator, .Shortcut …\n */\nfunction ContextMenuSimple({ items, children, className, ...root }: ContextMenuProps) {\n return (\n <BaseContextMenu.Root {...root}>\n <ContextMenuTrigger className={className}>{children}</ContextMenuTrigger>\n <ContextMenuContent>{renderMenuEntries(items)}</ContextMenuContent>\n </BaseContextMenu.Root>\n );\n}\n\nexport const ContextMenu = Object.assign(ContextMenuSimple, {\n Root: BaseContextMenu.Root,\n Trigger: ContextMenuTrigger,\n Content: ContextMenuContent,\n Item: DropdownMenu.Item,\n CheckboxItem: DropdownMenu.CheckboxItem,\n RadioGroup: DropdownMenu.RadioGroup,\n RadioItem: DropdownMenu.RadioItem,\n Group: DropdownMenu.Group,\n GroupLabel: DropdownMenu.GroupLabel,\n Separator: DropdownMenu.Separator,\n Shortcut: DropdownMenu.Shortcut,\n});\n","import { tv } from '../../lib/tv';\nimport { popupMotion, popupSurface } from '../popover/popover.styles';\n\nexport const hoverCardStyles = tv({\n slots: {\n positioner: 'z-50 outline-none',\n popup: [popupSurface, popupMotion, 'w-80 max-w-[calc(100vw-2rem)] rounded-card p-4 text-sm'],\n },\n});\n","import { PreviewCard } from '@base-ui/react/preview-card';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { hoverCardStyles } from './hover-card.styles';\n\nconst styles = hoverCardStyles();\n\nexport interface HoverCardContentProps extends React.ComponentPropsWithRef<typeof PreviewCard.Popup> {\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n classNames?: { positioner?: string; popup?: string };\n}\n\nfunction HoverCardContent({ side = 'bottom', align = 'center', sideOffset = 8, className, classNames, ...props }: HoverCardContentProps) {\n return (\n <PreviewCard.Portal>\n <PreviewCard.Positioner side={side} align={align} sideOffset={sideOffset} className={cn(styles.positioner(), classNames?.positioner)}>\n <PreviewCard.Popup className={cn(styles.popup(), classNames?.popup, className)} {...props} />\n </PreviewCard.Positioner>\n </PreviewCard.Portal>\n );\n}\n\nexport interface HoverCardProps extends Omit<React.ComponentProps<typeof PreviewCard.Root>, 'children'> {\n /** Usually a link (`<a href>`); the card opens while it's hovered or focused. */\n trigger: React.ReactElement;\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n /** Milliseconds before it opens. @default 500 */\n delay?: number;\n /** Milliseconds before it closes once the pointer leaves. @default 300 */\n closeDelay?: number;\n className?: string;\n classNames?: { positioner?: string; popup?: string };\n children: React.ReactNode;\n}\n\n/**\n * A preview card on hover — a user, a linked docs page, a feature.\n * <HoverCard trigger={<a href=\"/u/dawid\">@dawid</a>}>…</HoverCard>\n */\nfunction HoverCardSimple({\n trigger,\n side,\n align,\n delay = 500,\n closeDelay = 300,\n className,\n classNames,\n children,\n ...root\n}: HoverCardProps) {\n return (\n <PreviewCard.Root {...root}>\n <PreviewCard.Trigger delay={delay} closeDelay={closeDelay} render={trigger} />\n <HoverCardContent side={side} align={align} className={className} classNames={classNames}>\n {children}\n </HoverCardContent>\n </PreviewCard.Root>\n );\n}\n\nexport const HoverCard = Object.assign(HoverCardSimple, {\n Root: PreviewCard.Root,\n Trigger: PreviewCard.Trigger,\n Content: HoverCardContent,\n});\n","import { tv } from '../../lib/tv';\n\n/**\n * Stacked toasts, adapted from Base UI's toast example: the front toast is full size, the ones\n * behind peek out and shrink; hovering expands the stack. Toasts don't use `squircle`: the stack\n * needs the `::after` hover bridge, which the squircle polyfill would take over in Firefox.\n */\nexport const toastStyles = tv({\n slots: {\n viewport: 'fixed right-4 bottom-4 left-4 z-[100] mx-auto flex sm:right-6 sm:bottom-6 sm:left-auto sm:w-[22rem]',\n root: [\n 'absolute right-0 bottom-0 left-auto w-full origin-bottom select-none',\n 'rounded-card border border-border bg-popover bg-clip-padding p-4 pe-11 text-sm text-foreground shadow-overlay',\n '[--gap:0.75rem] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]',\n '[--height:var(--toast-frontmost-height,var(--toast-height))]',\n '[--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))]',\n 'z-[calc(1000-var(--toast-index))] h-(--height) data-[expanded]:h-(--toast-height)',\n '[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))]',\n 'data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]',\n 'data-[limited]:opacity-0 data-[starting-style]:[transform:translateY(150%)]',\n 'data-[ending-style]:opacity-0',\n 'data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]',\n 'data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]',\n '[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]',\n \"after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']\",\n 'transition-[transform,opacity,height] duration-[calc(var(--cui-duration-normal)*2)] ease-ui',\n ],\n content: [\n 'flex items-start gap-3 overflow-hidden transition-opacity duration-[var(--cui-duration-normal)] ease-ui',\n 'data-[behind]:pointer-events-none data-[behind]:opacity-0 data-[expanded]:pointer-events-auto data-[expanded]:opacity-100',\n ],\n icon: 'mt-0.5 size-4 shrink-0',\n text: 'flex min-w-0 flex-1 flex-col gap-0.5',\n title: 'font-medium text-foreground',\n description: 'text-muted',\n action: 'mt-2.5 self-start',\n close: 'absolute top-2.5 right-2.5',\n },\n});\n","import { Toast as BaseToast } from '@base-ui/react/toast';\nimport { CircleAlert, CircleCheck, Info, LoaderCircle, TriangleAlert, X } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { buttonStyles } from '../button/button.styles';\nimport { Button } from '../button/button';\nimport { toastStyles } from './toast.styles';\n\nconst styles = toastStyles();\n\n/** The app-wide toast queue; `toast()` adds to it, `<Toaster />` shows it. */\nexport const toastManager = BaseToast.createToastManager();\n\ntype AddOptions = Parameters<typeof toastManager.add>[0];\nexport type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';\nexport type ToastOptions = Omit<AddOptions, 'title' | 'type'> & { type?: ToastType };\n\nfunction show(title: React.ReactNode, options: ToastOptions = {}) {\n return toastManager.add({ title, ...options });\n}\n\n/**\n * Show a toast from anywhere:\n * toast('Saved'); toast.success('Kit created', { description: '12 items' });\n * const id = toast.loading('Copying build…'); toast.update(id, { title: 'Copied', type: 'success' });\n * toast.promise(save(), { loading: 'Saving…', success: 'Saved', error: 'Failed' });\n */\nexport const toast = Object.assign(show, {\n success: (title: React.ReactNode, options?: ToastOptions) => show(title, { ...options, type: 'success' }),\n error: (title: React.ReactNode, options?: ToastOptions) => show(title, { ...options, type: 'error' }),\n warning: (title: React.ReactNode, options?: ToastOptions) => show(title, { ...options, type: 'warning' }),\n info: (title: React.ReactNode, options?: ToastOptions) => show(title, { ...options, type: 'info' }),\n /** Stays until updated or closed (no timeout). */\n loading: (title: React.ReactNode, options?: ToastOptions) => show(title, { timeout: 0, ...options, type: 'loading' }),\n promise: toastManager.promise,\n update: toastManager.update,\n close: toastManager.close,\n});\n\nconst ICONS: Record<ToastType, React.ReactNode> = {\n success: <CircleCheck className={cn(styles.icon(), 'text-success')} />,\n error: <CircleAlert className={cn(styles.icon(), 'text-danger')} />,\n warning: <TriangleAlert className={cn(styles.icon(), 'text-warning')} />,\n info: <Info className={cn(styles.icon(), 'text-accent-soft-foreground')} />,\n loading: <LoaderCircle className={cn(styles.icon(), 'animate-spin text-muted motion-reduce:animate-none')} />,\n};\n\nfunction ToastList({ classNames }: { classNames?: ToasterProps['classNames'] }) {\n const { toasts } = BaseToast.useToastManager();\n return toasts.map((t) => (\n <BaseToast.Root key={t.id} toast={t} swipeDirection={['down', 'right']} className={cn(styles.root(), classNames?.root)}>\n <BaseToast.Content className={styles.content()}>\n {t.type && ICONS[t.type as ToastType]}\n <div className={styles.text()}>\n <BaseToast.Title className={styles.title()} />\n <BaseToast.Description className={styles.description()} />\n {t.actionProps && (\n <BaseToast.Action className={cn(buttonStyles({ variant: 'outline', size: 'sm' }), styles.action())} />\n )}\n </div>\n </BaseToast.Content>\n <BaseToast.Close render={<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Close\" className={styles.close()} />}>\n <X />\n </BaseToast.Close>\n </BaseToast.Root>\n ));\n}\n\nexport interface ToasterProps {\n /** Milliseconds a toast stays. @default 5000 */\n timeout?: number;\n /** Toasts shown at once. @default 3 */\n limit?: number;\n className?: string;\n classNames?: { viewport?: string; root?: string };\n}\n\n/** Mount once (e.g. in the root layout). Shows the toasts added with `toast()`. */\nexport function Toaster({ timeout = 5000, limit = 3, className, classNames }: ToasterProps) {\n return (\n <BaseToast.Provider toastManager={toastManager} timeout={timeout} limit={limit}>\n <BaseToast.Portal>\n <BaseToast.Viewport className={cn(styles.viewport(), classNames?.viewport, className)}>\n <ToastList classNames={classNames} />\n </BaseToast.Viewport>\n </BaseToast.Portal>\n </BaseToast.Provider>\n );\n}\n","import { tv } from '../../lib/tv';\n\n/**\n * Tabs look like our Toggle: quiet ghost buttons, and the active one sits on a soft squircle fill\n * that glides between tabs. Hover is one neutral block that glides on its own (glide.ts) and never\n * sits on the active tab. The `line` variant keeps the same hover block and underlines the active tab.\n */\nexport const tabsStyles = tv({\n slots: {\n root: 'flex flex-col gap-4',\n list: 'relative z-0 flex w-fit max-w-full items-center overflow-x-auto',\n tab: [\n 'squircle-motion relative z-10 inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap select-none',\n 'font-[weight:var(--cui-control-weight)] text-muted outline-none',\n 'transition-[color] duration-[var(--cui-duration-fast)] ease-ui',\n 'hover:text-foreground',\n 'focus-visible:ring-[3px] focus-visible:ring-ring',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n ],\n // The neutral hover block (glide.ts) takes the tab's radius.\n hover: '',\n // The indicator moves by width/translate. The squircle polyfill can't animate that in Firefox,\n // so it takes the native `corner-shape` only (a plain rounded box where unsupported).\n indicator: [\n 'pointer-events-none absolute left-0 -z-10 w-[var(--active-tab-width)] translate-x-[var(--active-tab-left)]',\n 'transition-[translate,width] duration-[var(--cui-duration-normal)] ease-ui motion-reduce:transition-none',\n ],\n panel: [\n 'rounded-item outline-none focus-visible:ring-[3px] focus-visible:ring-ring',\n 'transition-[opacity,translate] duration-[var(--cui-duration-normal)] ease-ui motion-reduce:transition-none',\n 'data-[starting-style]:translate-y-1.5 data-[starting-style]:opacity-0 data-[ending-style]:hidden',\n ],\n },\n variants: {\n variant: {\n /** A soft fill glides behind the active tab (like a pressed Toggle). */\n pill: {\n list: 'gap-1',\n indicator: 'top-[var(--active-tab-top)] h-[var(--active-tab-height)] squircle-motion',\n },\n /** An underline glides under the active tab (page sections, install steps). */\n line: {\n list: 'gap-1 border-b border-border pb-1.5',\n indicator: [\n 'bottom-[-1px] h-0.5 rounded-full',\n 'w-[calc(var(--active-tab-width)-1.25rem)] translate-x-[calc(var(--active-tab-left)+0.625rem)]',\n ],\n },\n },\n size: {\n sm: { tab: 'text-xs [&_svg]:size-3.5' },\n md: { tab: 'text-sm [&_svg]:size-4' },\n },\n /** Active tab in the soft accent (default) or in a neutral fill. */\n accent: {\n true: { tab: 'data-[active]:text-accent-soft-foreground' },\n false: { tab: 'data-[active]:text-foreground' },\n },\n },\n compoundVariants: [\n { variant: 'pill', size: 'sm', class: { tab: 'h-control-sm rounded-control-sm px-3', indicator: 'rounded-control-sm', hover: 'rounded-control-sm' } },\n { variant: 'pill', size: 'md', class: { tab: 'h-control rounded-control px-4', indicator: 'rounded-control', hover: 'rounded-control' } },\n { variant: 'line', size: 'sm', class: { tab: 'h-[calc(var(--cui-control-height)*0.7)] rounded-chip px-2.5', hover: 'rounded-chip' } },\n { variant: 'line', size: 'md', class: { tab: 'h-control-sm rounded-control-sm px-2.5', hover: 'rounded-control-sm' } },\n { variant: 'pill', accent: true, class: { indicator: 'bg-accent-soft' } },\n { variant: 'pill', accent: false, class: { indicator: 'bg-hover' } },\n { variant: 'line', accent: true, class: { indicator: 'bg-accent' } },\n { variant: 'line', accent: false, class: { indicator: 'bg-foreground' } },\n ],\n defaultVariants: { variant: 'pill', size: 'md', accent: true },\n});\n","import { Tabs as BaseTabs } from '@base-ui/react/tabs';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { glideBlockClass, useGlide } from '../sidebar/glide';\nimport { tabsStyles } from './tabs.styles';\n\ntype Options = Pick<VariantProps<typeof tabsStyles>, 'variant' | 'size' | 'accent'>;\nconst OptionsContext = React.createContext<Options>({});\nconst useStyles = () => tabsStyles(React.useContext(OptionsContext));\n\nexport interface TabsRootProps extends React.ComponentPropsWithRef<typeof BaseTabs.Root> {\n /** `pill`: a soft fill glides behind the active tab. `line`: an underline glides under it. @default 'pill' */\n variant?: 'pill' | 'line';\n /** @default 'md' */\n size?: 'sm' | 'md';\n /** Mark the active tab with the soft accent; `false` uses a neutral fill. @default true */\n accent?: boolean;\n}\n\nfunction TabsRoot({ className, variant = 'pill', size = 'md', accent = true, ...props }: TabsRootProps) {\n const options = React.useMemo(() => ({ variant, size, accent }), [variant, size, accent]);\n return (\n <OptionsContext.Provider value={options}>\n <BaseTabs.Root className={cn(tabsStyles(options).root(), className)} {...props} />\n </OptionsContext.Provider>\n );\n}\n\nexport interface TabsListProps extends React.ComponentPropsWithRef<typeof BaseTabs.List> {\n classNames?: { list?: string; indicator?: string; hover?: string };\n}\n\n/**\n * The tab row. Two blocks glide in it: the active fill (or underline) follows the selected tab, and\n * one neutral hover block follows the mouse or keyboard focus. The hover block hides on the active tab\n * and never starts its slide from it (same behaviour as the sidebar).\n */\nfunction TabsList({ className, classNames, children, ref, ...props }: TabsListProps) {\n const s = useStyles();\n const glideRef = useGlide<HTMLDivElement>();\n const refs = React.useCallback(\n (node: HTMLDivElement | null) => {\n glideRef(node);\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [glideRef, ref],\n );\n return (\n <BaseTabs.List ref={refs} className={cn(s.list(), classNames?.list, className)} {...props}>\n <span data-glide-block aria-hidden className={cn(glideBlockClass, s.hover(), classNames?.hover)} />\n {children}\n <BaseTabs.Indicator className={cn(s.indicator(), classNames?.indicator)} />\n </BaseTabs.List>\n );\n}\n\nfunction TabsTab({ className, ...props }: React.ComponentPropsWithRef<typeof BaseTabs.Tab>) {\n return <BaseTabs.Tab className={cn(useStyles().tab(), className)} {...props} />;\n}\n\n/** The content of one tab. The new panel fades and rises in when the tab changes. */\nfunction TabsPanel({ className, ...props }: React.ComponentPropsWithRef<typeof BaseTabs.Panel>) {\n return <BaseTabs.Panel className={cn(useStyles().panel(), className)} {...props} />;\n}\n\nexport interface TabItem {\n value: string;\n label: React.ReactNode;\n content: React.ReactNode;\n disabled?: boolean;\n}\n\nexport interface TabsProps extends Omit<TabsRootProps, 'children'> {\n items: TabItem[];\n classNames?: { list?: string; tab?: string; indicator?: string; hover?: string; panel?: string };\n}\n\n/** One-line form: `<Tabs items={[{ value, label, content }]} />`. */\nfunction TabsSimple({ items, classNames, defaultValue, ...props }: TabsProps) {\n return (\n <TabsRoot defaultValue={defaultValue ?? items[0]?.value} {...props}>\n <TabsList classNames={{ list: classNames?.list, indicator: classNames?.indicator, hover: classNames?.hover }}>\n {items.map((i) => (\n <TabsTab key={i.value} value={i.value} disabled={i.disabled} className={classNames?.tab}>\n {i.label}\n </TabsTab>\n ))}\n </TabsList>\n {items.map((i) => (\n <TabsPanel key={i.value} value={i.value} className={classNames?.panel}>\n {i.content}\n </TabsPanel>\n ))}\n </TabsRoot>\n );\n}\n\nexport const Tabs = Object.assign(TabsSimple, {\n Root: TabsRoot,\n List: TabsList,\n Tab: TabsTab,\n Panel: TabsPanel,\n});\n","import { tv } from '../../lib/tv';\n\n/**\n * Items keep a little space around the trigger, so the hover fill is an inset squircle with\n * padding of its own instead of a band that runs into the text.\n */\nexport const accordionStyles = tv({\n slots: {\n root: 'flex w-full flex-col',\n item: 'p-1.5',\n header: 'm-0',\n trigger: [\n 'squircle group flex w-full items-center justify-between gap-4 rounded-item px-3.5 py-3 text-start text-sm font-medium text-foreground outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui hover:bg-hover focus-visible:bg-hover',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:shrink-0',\n ],\n chevron:\n 'size-4 shrink-0 text-muted transition-transform duration-[var(--cui-duration-normal)] ease-ui group-data-[panel-open]:rotate-180 motion-reduce:transition-none',\n panel: [\n 'h-[var(--accordion-panel-height)] overflow-hidden text-sm text-muted',\n 'transition-[height,opacity] duration-[var(--cui-duration-normal)] ease-ui motion-reduce:transition-none',\n 'data-[starting-style]:h-0 data-[starting-style]:opacity-0 data-[ending-style]:h-0 data-[ending-style]:opacity-0',\n ],\n content: 'px-3.5 pt-1.5 pb-3 leading-relaxed',\n },\n variants: {\n variant: {\n /** Items in one bordered card, divided by lines. */\n card: {\n root: 'squircle overflow-hidden rounded-card border border-border bg-surface',\n item: 'border-b border-border last:border-b-0',\n },\n /** Separate cards with a gap between them. */\n separated: {\n root: 'gap-2',\n item: 'squircle rounded-card border border-border bg-surface',\n },\n /** No frame: rows divided by lines, for FAQs inside a page. */\n plain: {\n item: 'border-b border-border px-0 last:border-b-0',\n },\n },\n },\n defaultVariants: { variant: 'card' },\n});\n","import { Accordion as BaseAccordion } from '@base-ui/react/accordion';\nimport { ChevronDown } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { accordionStyles } from './accordion.styles';\n\ntype Variant = 'card' | 'separated' | 'plain';\nconst VariantContext = React.createContext<Variant>('card');\nconst useStyles = () => accordionStyles({ variant: React.useContext(VariantContext) });\n\nexport interface AccordionRootProps extends React.ComponentPropsWithRef<typeof BaseAccordion.Root> {\n /** `card`: one framed card. `separated`: a card per item. `plain`: no frame. @default 'card' */\n variant?: Variant;\n}\n\nfunction AccordionRoot({ className, variant = 'card', ...props }: AccordionRootProps) {\n return (\n <VariantContext.Provider value={variant}>\n <BaseAccordion.Root className={cn(accordionStyles({ variant }).root(), className)} {...props} />\n </VariantContext.Provider>\n );\n}\n\nfunction AccordionItem({ className, ...props }: React.ComponentPropsWithRef<typeof BaseAccordion.Item>) {\n return <BaseAccordion.Item className={cn(useStyles().item(), className)} {...props} />;\n}\n\nexport interface AccordionTriggerProps extends React.ComponentPropsWithRef<typeof BaseAccordion.Trigger> {\n classNames?: { header?: string; chevron?: string };\n}\n\n/** The clickable row; includes the heading wrapper and the chevron. */\nfunction AccordionTrigger({ className, classNames, children, ...props }: AccordionTriggerProps) {\n const s = useStyles();\n return (\n <BaseAccordion.Header className={cn(s.header(), classNames?.header)}>\n <BaseAccordion.Trigger className={cn(s.trigger(), className)} {...props}>\n {children}\n <ChevronDown aria-hidden className={cn(s.chevron(), classNames?.chevron)} />\n </BaseAccordion.Trigger>\n </BaseAccordion.Header>\n );\n}\n\nexport interface AccordionPanelProps extends React.ComponentPropsWithRef<typeof BaseAccordion.Panel> {\n classNames?: { content?: string };\n}\n\nfunction AccordionPanel({ className, classNames, children, ...props }: AccordionPanelProps) {\n const s = useStyles();\n return (\n <BaseAccordion.Panel className={cn(s.panel(), className)} {...props}>\n <div className={cn(s.content(), classNames?.content)}>{children}</div>\n </BaseAccordion.Panel>\n );\n}\n\nexport interface AccordionItemData {\n value: string;\n title: React.ReactNode;\n content: React.ReactNode;\n disabled?: boolean;\n}\n\nexport interface AccordionProps extends Omit<AccordionRootProps, 'children'> {\n items: AccordionItemData[];\n}\n\n/** One-line form: `<Accordion items={[{ value, title, content }]} />`. */\nfunction AccordionSimple({ items, ...props }: AccordionProps) {\n return (\n <AccordionRoot {...props}>\n {items.map((i) => (\n <AccordionItem key={i.value} value={i.value} disabled={i.disabled}>\n <AccordionTrigger>{i.title}</AccordionTrigger>\n <AccordionPanel>{i.content}</AccordionPanel>\n </AccordionItem>\n ))}\n </AccordionRoot>\n );\n}\n\nexport const Accordion = Object.assign(AccordionSimple, {\n Root: AccordionRoot,\n Item: AccordionItem,\n Trigger: AccordionTrigger,\n Panel: AccordionPanel,\n});\n","import { tv } from '../../lib/tv';\n\nexport const collapsibleStyles = tv({\n slots: {\n root: 'flex flex-col',\n trigger: [\n 'squircle group inline-flex items-center gap-2 rounded-item px-2.5 py-1.5 text-sm font-medium text-foreground outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui hover:bg-hover focus-visible:ring-2 focus-visible:ring-ring',\n '[&_svg]:size-4 [&_svg]:shrink-0',\n ],\n chevron:\n 'text-muted transition-transform duration-[var(--cui-duration-normal)] ease-ui group-data-[panel-open]:rotate-90 motion-reduce:transition-none',\n panel: [\n 'h-[var(--collapsible-panel-height)] overflow-hidden',\n 'transition-[height,opacity] duration-[var(--cui-duration-normal)] ease-ui motion-reduce:transition-none',\n 'data-[starting-style]:h-0 data-[starting-style]:opacity-0 data-[ending-style]:h-0 data-[ending-style]:opacity-0',\n ],\n },\n});\n","import { Collapsible as BaseCollapsible } from '@base-ui/react/collapsible';\nimport { ChevronRight } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { collapsibleStyles } from './collapsible.styles';\n\nconst s = collapsibleStyles();\n\nfunction CollapsibleRoot({ className, ...props }: React.ComponentPropsWithRef<typeof BaseCollapsible.Root>) {\n return <BaseCollapsible.Root className={cn(s.root(), className)} {...props} />;\n}\n\nexport interface CollapsibleTriggerProps extends React.ComponentPropsWithRef<typeof BaseCollapsible.Trigger> {\n /** Show the rotating chevron before the label. @default true */\n chevron?: boolean;\n}\n\nfunction CollapsibleTrigger({ className, chevron = true, children, ...props }: CollapsibleTriggerProps) {\n return (\n <BaseCollapsible.Trigger className={cn(s.trigger(), className)} {...props}>\n {chevron && <ChevronRight aria-hidden className={s.chevron()} />}\n {children}\n </BaseCollapsible.Trigger>\n );\n}\n\nfunction CollapsiblePanel({ className, ...props }: React.ComponentPropsWithRef<typeof BaseCollapsible.Panel>) {\n return <BaseCollapsible.Panel className={cn(s.panel(), className)} {...props} />;\n}\n\nexport interface CollapsibleProps extends Omit<React.ComponentPropsWithRef<typeof BaseCollapsible.Root>, 'title'> {\n title: React.ReactNode;\n classNames?: { trigger?: string; panel?: string };\n}\n\n/** One-line form: `<Collapsible title=\"Advanced\">…</Collapsible>`. */\nfunction CollapsibleSimple({ title, classNames, children, ...props }: CollapsibleProps) {\n return (\n <CollapsibleRoot {...props}>\n <CollapsibleTrigger className={classNames?.trigger}>{title}</CollapsibleTrigger>\n <CollapsiblePanel className={classNames?.panel}>{children}</CollapsiblePanel>\n </CollapsibleRoot>\n );\n}\n\nexport const Collapsible = Object.assign(CollapsibleSimple, {\n Root: CollapsibleRoot,\n Trigger: CollapsibleTrigger,\n Panel: CollapsiblePanel,\n});\n","import { tv } from '../../lib/tv';\n\n/** Avatars stay circular (like the switch): a face reads best in a circle. */\nexport const avatarStyles = tv({\n slots: {\n root: 'relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-surface-2 align-middle select-none border border-border',\n image: 'size-full object-cover',\n fallback: 'flex size-full items-center justify-center font-medium text-muted',\n },\n variants: {\n size: {\n sm: { root: 'size-7', fallback: 'text-[0.6875rem]' },\n md: { root: 'size-9', fallback: 'text-xs' },\n lg: { root: 'size-12', fallback: 'text-sm' },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { Avatar as BaseAvatar } from '@base-ui/react/avatar';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { avatarStyles } from './avatar.styles';\n\ntype Size = VariantProps<typeof avatarStyles>['size'];\nconst SizeContext = React.createContext<Size>('md');\n\nexport interface AvatarRootProps extends React.ComponentPropsWithRef<typeof BaseAvatar.Root> {\n size?: Size;\n}\n\nfunction AvatarRoot({ className, size = 'md', ...props }: AvatarRootProps) {\n return (\n <SizeContext.Provider value={size}>\n <BaseAvatar.Root className={cn(avatarStyles({ size }).root(), className)} {...props} />\n </SizeContext.Provider>\n );\n}\n\nfunction AvatarImage({ className, ...props }: React.ComponentPropsWithRef<typeof BaseAvatar.Image>) {\n return <BaseAvatar.Image className={cn(avatarStyles().image(), className)} {...props} />;\n}\n\nfunction AvatarFallback({ className, ...props }: React.ComponentPropsWithRef<typeof BaseAvatar.Fallback>) {\n const size = React.useContext(SizeContext);\n return <BaseAvatar.Fallback className={cn(avatarStyles({ size }).fallback(), className)} {...props} />;\n}\n\n/** \"Dawid Seipold\" → \"DS\". */\nexport function initials(name: string) {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n const first = parts[0]?.[0] ?? '';\n const last = parts.length > 1 ? (parts[parts.length - 1]?.[0] ?? '') : '';\n return (first + last).toUpperCase();\n}\n\nexport interface AvatarProps extends Omit<AvatarRootProps, 'children'> {\n src?: string;\n /** Used for the alt text and the initials fallback. */\n name: string;\n classNames?: { image?: string; fallback?: string };\n}\n\n/** One-line form: `<Avatar src={url} name=\"Dawid Seipold\" />`. Falls back to initials. */\nfunction AvatarSimple({ src, name, classNames, ...props }: AvatarProps) {\n return (\n <AvatarRoot {...props}>\n {src && <AvatarImage src={src} alt={name} className={classNames?.image} />}\n <AvatarFallback className={classNames?.fallback} aria-label={src ? undefined : name}>\n {initials(name)}\n </AvatarFallback>\n </AvatarRoot>\n );\n}\n\nexport const Avatar = Object.assign(AvatarSimple, {\n Root: AvatarRoot,\n Image: AvatarImage,\n Fallback: AvatarFallback,\n});\n","import { tv } from '../../lib/tv';\n\nexport const alertStyles = tv({\n slots: {\n root: 'squircle relative flex w-full gap-3 rounded-card border px-4 py-3.5 text-sm',\n icon: 'mt-0.5 size-4 shrink-0',\n body: 'flex min-w-0 flex-1 flex-col gap-1',\n title: 'font-medium text-foreground',\n description: 'text-muted [&_a]:underline [&_a]:underline-offset-2',\n },\n variants: {\n variant: {\n info: { root: 'border-accent-soft-foreground/25 bg-accent-soft', icon: 'text-accent-soft-foreground' },\n success: { root: 'border-success/25 bg-success/8', icon: 'text-success' },\n warning: { root: 'border-warning/30 bg-warning/8', icon: 'text-warning' },\n danger: { root: 'border-danger/30 bg-danger/8', icon: 'text-danger' },\n neutral: { root: 'border-border bg-surface', icon: 'text-muted' },\n },\n },\n defaultVariants: { variant: 'info' },\n});\n","import { CircleAlert, CircleCheck, Info, TriangleAlert } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { alertStyles } from './alert.styles';\n\ntype Variant = NonNullable<VariantProps<typeof alertStyles>['variant']>;\n\nconst ICONS: Record<Variant, React.ComponentType<{ className?: string }>> = {\n info: Info,\n success: CircleCheck,\n warning: TriangleAlert,\n danger: CircleAlert,\n neutral: Info,\n};\n\nexport interface AlertProps extends Omit<React.ComponentPropsWithRef<'div'>, 'title'>, VariantProps<typeof alertStyles> {\n title?: React.ReactNode;\n /** Replace the variant's icon; `false` hides it. */\n icon?: React.ReactNode | false;\n classNames?: { icon?: string; body?: string; title?: string; description?: string };\n}\n\n/**\n * A callout. `danger` and `warning` use role=\"alert\", the others role=\"status\".\n * Compound parts: `Alert.Title`, `Alert.Description` (put them in `children` instead of `title`).\n */\nfunction AlertRoot({ className, classNames, variant = 'info', title, icon, children, ...props }: AlertProps) {\n const s = alertStyles({ variant });\n const Icon = ICONS[variant];\n return (\n <div\n role={variant === 'danger' || variant === 'warning' ? 'alert' : 'status'}\n className={cn(s.root(), className)}\n {...props}\n >\n {icon === false ? null : icon ? (\n <span className={cn(s.icon(), classNames?.icon)}>{icon}</span>\n ) : (\n <Icon aria-hidden className={cn(s.icon(), classNames?.icon)} />\n )}\n <div className={cn(s.body(), classNames?.body)}>\n {title && <div className={cn(s.title(), classNames?.title)}>{title}</div>}\n {title ? <div className={cn(s.description(), classNames?.description)}>{children}</div> : children}\n </div>\n </div>\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentPropsWithRef<'div'>) {\n return <div className={cn(alertStyles().title(), className)} {...props} />;\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentPropsWithRef<'div'>) {\n return <div className={cn(alertStyles().description(), className)} {...props} />;\n}\n\nexport const Alert = Object.assign(AlertRoot, { Title: AlertTitle, Description: AlertDescription });\n","import { tv } from '../../lib/tv';\n\nexport const separatorStyles = tv({\n slots: {\n root: 'shrink-0 bg-border',\n labelled: 'flex items-center gap-3 text-xs text-muted',\n line: 'h-px flex-1 bg-border',\n },\n variants: {\n orientation: {\n horizontal: { root: 'h-px w-full' },\n vertical: { root: 'h-auto w-px self-stretch' },\n },\n },\n defaultVariants: { orientation: 'horizontal' },\n});\n","import { Separator as BaseSeparator } from '@base-ui/react/separator';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { separatorStyles } from './separator.styles';\n\nexport interface SeparatorProps extends React.ComponentPropsWithRef<typeof BaseSeparator> {\n /** Text in the middle of a horizontal line (\"or\", a date…). */\n label?: React.ReactNode;\n classNames?: { line?: string };\n}\n\n/** A thin line between content, optionally with a label in the middle. */\nexport function Separator({ className, classNames, orientation = 'horizontal', label, ...props }: SeparatorProps) {\n const s = separatorStyles({ orientation });\n if (label && orientation === 'horizontal') {\n return (\n <div className={cn(s.labelled(), className)}>\n <BaseSeparator orientation=\"horizontal\" className={cn(s.line(), classNames?.line)} {...props} />\n <span>{label}</span>\n <BaseSeparator orientation=\"horizontal\" className={cn(s.line(), classNames?.line)} />\n </div>\n );\n }\n return <BaseSeparator orientation={orientation} className={cn(s.root(), className)} {...props} />;\n}\n","import { tv } from '../../lib/tv';\n\nexport const skeletonStyles = tv({\n base: 'squircle block bg-surface-2 bg-no-repeat',\n variants: {\n shape: {\n line: 'h-3.5 w-full rounded-chip',\n block: 'rounded-control-sm',\n card: 'rounded-card',\n circle: 'rounded-full',\n },\n },\n defaultVariants: { shape: 'line' },\n});\n","import { motion, useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { skeletonStyles } from './skeleton.styles';\n\nconst SHIMMER = 'linear-gradient(90deg, transparent 0%, var(--cui-hover) 50%, transparent 100%)';\n\nexport interface SkeletonProps\n extends Omit<React.ComponentPropsWithRef<'span'>, 'onAnimationStart' | 'onDrag' | 'onDragStart' | 'onDragEnd' | 'onAnimationEnd'>,\n VariantProps<typeof skeletonStyles> {\n /** Lines of text to fake; the last one is shorter. */\n lines?: number;\n}\n\nfunction Bar({ className, shape, style, ...props }: SkeletonProps) {\n const reduce = useReducedMotion();\n return (\n <motion.span\n aria-hidden\n className={cn(skeletonStyles({ shape }), className)}\n style={{ backgroundImage: reduce ? undefined : SHIMMER, backgroundSize: '200% 100%', ...style }}\n animate={reduce ? undefined : { backgroundPositionX: ['150%', '-50%'] }}\n transition={reduce ? undefined : { duration: 1.6, ease: 'easeInOut', repeat: Infinity }}\n {...(props as object)}\n />\n );\n}\n\n/** A placeholder while content loads. A soft shimmer runs across it unless motion is reduced. */\nexport function Skeleton({ lines, className, ...props }: SkeletonProps) {\n if (lines && lines > 1) {\n return (\n <span className={cn('flex w-full flex-col gap-2', className)} aria-hidden>\n {Array.from({ length: lines }, (_, i) => (\n <Bar key={i} shape=\"line\" {...props} className={i === lines - 1 ? 'w-3/5' : undefined} />\n ))}\n </span>\n );\n }\n return <Bar className={className} {...props} />;\n}\n","import { tv } from '../../lib/tv';\n\nexport const spinnerStyles = tv({\n slots: {\n root: 'inline-block shrink-0 animate-spin motion-reduce:[animation-duration:2.4s]',\n track: 'stroke-current opacity-20',\n arc: 'stroke-current',\n },\n variants: {\n size: {\n sm: { root: 'size-3.5' },\n md: { root: 'size-5' },\n lg: { root: 'size-8' },\n },\n tone: {\n accent: { root: 'text-accent-soft-foreground' },\n muted: { root: 'text-muted' },\n current: { root: 'text-current' },\n },\n },\n defaultVariants: { size: 'md', tone: 'accent' },\n});\n","import * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { spinnerStyles } from './spinner.styles';\n\nexport interface SpinnerProps extends React.ComponentPropsWithRef<'svg'>, VariantProps<typeof spinnerStyles> {\n /** Read by screen readers. @default 'Loading' */\n label?: string;\n}\n\n/** An indeterminate loading indicator. Slows down (but keeps turning) with reduced motion. */\nexport function Spinner({ className, size, tone, label = 'Loading', ...props }: SpinnerProps) {\n const s = spinnerStyles({ size, tone });\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" role=\"status\" aria-label={label} className={cn(s.root(), className)} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"9.5\" strokeWidth=\"3\" className={s.track()} />\n <path d=\"M21.5 12a9.5 9.5 0 0 0-9.5-9.5\" strokeWidth=\"3\" strokeLinecap=\"round\" className={s.arc()} />\n </svg>\n );\n}\n","import { tv } from '../../lib/tv';\n\nexport const progressStyles = tv({\n slots: {\n root: 'flex w-full flex-col gap-2',\n header: 'flex items-center justify-between gap-3 text-sm',\n label: 'font-medium text-foreground',\n value: 'tabular-nums text-muted',\n track: 'relative h-2 w-full overflow-hidden rounded-full bg-surface-2',\n indicator: [\n 'block h-full rounded-full bg-accent',\n 'transition-[width] duration-[var(--cui-duration-normal)] ease-ui motion-reduce:transition-none',\n 'data-[indeterminate]:w-1/3 data-[indeterminate]:animate-pulse',\n ],\n },\n variants: {\n size: {\n sm: { track: 'h-1' },\n md: { track: 'h-2' },\n lg: { track: 'h-3' },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { Progress as BaseProgress } from '@base-ui/react/progress';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { progressStyles } from './progress.styles';\n\ntype Size = VariantProps<typeof progressStyles>['size'];\n\nfunction ProgressRoot({ className, ...props }: React.ComponentPropsWithRef<typeof BaseProgress.Root>) {\n return <BaseProgress.Root className={cn(progressStyles().root(), className)} {...props} />;\n}\nfunction ProgressLabel({ className, ...props }: React.ComponentPropsWithRef<typeof BaseProgress.Label>) {\n return <BaseProgress.Label className={cn(progressStyles().label(), className)} {...props} />;\n}\nfunction ProgressValue({ className, ...props }: React.ComponentPropsWithRef<typeof BaseProgress.Value>) {\n return <BaseProgress.Value className={cn(progressStyles().value(), className)} {...props} />;\n}\nexport interface ProgressTrackProps extends React.ComponentPropsWithRef<typeof BaseProgress.Track> {\n size?: Size;\n classNames?: { indicator?: string };\n}\n/** The bar; includes its indicator. */\nfunction ProgressTrack({ className, classNames, size, ...props }: ProgressTrackProps) {\n const s = progressStyles({ size });\n return (\n <BaseProgress.Track className={cn(s.track(), className)} {...props}>\n <BaseProgress.Indicator className={cn(s.indicator(), classNames?.indicator)} />\n </BaseProgress.Track>\n );\n}\n\nexport interface ProgressProps extends Omit<React.ComponentPropsWithRef<typeof BaseProgress.Root>, 'children'> {\n label?: React.ReactNode;\n /** Show the percentage next to the label. @default true when there is a label */\n showValue?: boolean;\n size?: Size;\n classNames?: { header?: string; label?: string; value?: string; track?: string; indicator?: string };\n}\n\n/** One-line form: `<Progress value={42} label=\"Downloading\" />`. `value={null}` is indeterminate. */\nfunction ProgressSimple({ label, showValue, size, classNames, ...props }: ProgressProps) {\n const s = progressStyles({ size });\n const withValue = showValue ?? Boolean(label);\n return (\n <ProgressRoot {...props}>\n {(label || withValue) && (\n <div className={cn(s.header(), classNames?.header)}>\n {label && <ProgressLabel className={classNames?.label}>{label}</ProgressLabel>}\n {withValue && <ProgressValue className={classNames?.value} />}\n </div>\n )}\n <ProgressTrack size={size} className={classNames?.track} classNames={{ indicator: classNames?.indicator }} />\n </ProgressRoot>\n );\n}\n\nexport const Progress = Object.assign(ProgressSimple, {\n Root: ProgressRoot,\n Label: ProgressLabel,\n Value: ProgressValue,\n Track: ProgressTrack,\n});\n","import { tv } from '../../lib/tv';\n\nexport const breadcrumbStyles = tv({\n slots: {\n root: '',\n list: 'flex flex-wrap items-center gap-1.5 text-sm text-muted',\n item: 'inline-flex min-w-0 items-center gap-1.5',\n link: [\n 'squircle -mx-1 truncate rounded-chip px-1 py-0.5 outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring',\n ],\n page: 'truncate font-medium text-foreground',\n separator: 'text-muted/60 [&_svg]:size-3.5',\n },\n});\n","import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { ChevronRight } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { breadcrumbStyles } from './breadcrumb.styles';\n\nconst s = breadcrumbStyles();\n\nfunction BreadcrumbRoot({ className, ...props }: React.ComponentPropsWithRef<'nav'>) {\n return <nav aria-label=\"Breadcrumb\" className={cn(s.root(), className)} {...props} />;\n}\nfunction BreadcrumbList({ className, ...props }: React.ComponentPropsWithRef<'ol'>) {\n return <ol className={cn(s.list(), className)} {...props} />;\n}\nfunction BreadcrumbItem({ className, ...props }: React.ComponentPropsWithRef<'li'>) {\n return <li className={cn(s.item(), className)} {...props} />;\n}\n\nexport type BreadcrumbLinkProps = useRender.ComponentProps<'a'>;\n\n/** A link in the trail. Pass `render={<Link to=\"…\" />}` to use a router link. */\nfunction BreadcrumbLink({ className, render, ...props }: BreadcrumbLinkProps) {\n return useRender({\n defaultTagName: 'a',\n render,\n props: mergeProps<'a'>({ className: cn(s.link(), className) }, props),\n });\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentPropsWithRef<'span'>) {\n return <span aria-current=\"page\" className={cn(s.page(), className)} {...props} />;\n}\n\nfunction BreadcrumbSeparator({ className, children, ...props }: React.ComponentPropsWithRef<'li'>) {\n return (\n <li role=\"presentation\" aria-hidden className={cn(s.separator(), className)} {...props}>\n {children ?? <ChevronRight />}\n </li>\n );\n}\n\nexport interface BreadcrumbItemData {\n label: React.ReactNode;\n href?: string;\n}\n\nexport interface BreadcrumbProps extends React.ComponentPropsWithRef<'nav'> {\n /** The last item is the current page. */\n items: BreadcrumbItemData[];\n /** Turns an item into a router link: `(item) => <Link to={item.href} />`. */\n renderLink?: (item: BreadcrumbItemData) => React.ReactElement;\n}\n\n/** One-line form: `<Breadcrumb items={[{ label: 'Docs', href: '/docs' }, { label: 'Button' }]} />`. */\nfunction BreadcrumbSimple({ items, renderLink, ...props }: BreadcrumbProps) {\n return (\n <BreadcrumbRoot {...props}>\n <BreadcrumbList>\n {items.map((item, i) => {\n const last = i === items.length - 1;\n return (\n <React.Fragment key={i}>\n <BreadcrumbItem>\n {last || !item.href ? (\n last ? <BreadcrumbPage>{item.label}</BreadcrumbPage> : <span>{item.label}</span>\n ) : (\n <BreadcrumbLink href={item.href} render={renderLink?.(item)}>\n {item.label}\n </BreadcrumbLink>\n )}\n </BreadcrumbItem>\n {!last && <BreadcrumbSeparator />}\n </React.Fragment>\n );\n })}\n </BreadcrumbList>\n </BreadcrumbRoot>\n );\n}\n\nexport const Breadcrumb = Object.assign(BreadcrumbSimple, {\n Root: BreadcrumbRoot,\n List: BreadcrumbList,\n Item: BreadcrumbItem,\n Link: BreadcrumbLink,\n Page: BreadcrumbPage,\n Separator: BreadcrumbSeparator,\n});\n","import { tv } from '../../lib/tv';\n\n/**\n * The bar holds three layers: the neutral hover block (glide.ts), the accent thumb under the current\n * page, and the buttons on top. Buttons have no fill of their own, so nothing flashes on hover.\n */\nexport const paginationStyles = tv({\n slots: {\n root: 'flex items-center',\n area: 'relative isolate',\n list: 'relative z-10 flex flex-wrap items-center gap-1',\n page: [\n 'relative inline-flex h-control-sm items-center justify-center rounded-control-sm px-2 text-sm tabular-nums outline-none select-none',\n 'text-muted transition-[color,scale] duration-[var(--cui-duration-fast)] ease-ui hover:text-foreground active:scale-[var(--cui-press-scale)]',\n 'focus-visible:ring-[3px] focus-visible:ring-ring',\n 'data-[current]:font-medium data-[current]:text-accent-soft-foreground',\n 'disabled:pointer-events-none disabled:opacity-40 [&_svg]:size-4',\n ],\n hover: 'rounded-control-sm',\n // no `squircle`: it slides by transform and resizes, which the polyfill can't follow; it takes the\n // native `corner-shape`, and a smaller plain radius where that's missing\n current: 'pointer-events-none absolute top-0 left-0 z-0',\n thumbFill: [\n 'block size-full rounded-control-sm bg-accent-soft',\n 'squircle-motion',\n ],\n // the numbers roll through this window; old and new number share one grid cell\n clip: 'grid overflow-hidden',\n number: 'col-start-1 row-start-1 inline-flex items-center justify-center',\n ellipsis:\n 'relative inline-flex h-control-sm items-center justify-center px-2 text-sm tabular-nums text-muted select-none [&_svg]:size-4',\n nav: 'gap-1 px-2.5',\n },\n});\n","import { ChevronLeft, ChevronRight, Ellipsis } from 'lucide-react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { glideBlockClass, useGlide } from '../sidebar/glide';\nimport { paginationStyles } from './pagination.styles';\n\nconst s = paginationStyles();\n\ntype Slot = number | 'ellipsis';\n\n/**\n * The pages to show: first, last, the current one with `siblings` on each side, and 'ellipsis'\n * for the gaps. The number of slots stays the same on every page (so the bar never jumps):\n * `paginationRange(1, 20)` → [1, 2, 3, 4, 5, 'ellipsis', 20],\n * `paginationRange(10, 20)` → [1, 'ellipsis', 9, 10, 11, 'ellipsis', 20].\n */\nexport function paginationRange(page: number, total: number, siblings = 1): Slot[] {\n const slots = siblings * 2 + 5;\n if (total <= slots) return Array.from({ length: total }, (_, i) => i + 1);\n const start = Math.max(Math.min(page - siblings, total - siblings * 2 - 2), 3);\n const end = Math.min(Math.max(page + siblings, siblings * 2 + 3), total - 2);\n const out: Slot[] = [1, start > 3 ? 'ellipsis' : 2];\n for (let p = start; p <= end; p++) out.push(p);\n out.push(end < total - 2 ? 'ellipsis' : total - 1, total);\n return out;\n}\n\n/** The thumb slides with a soft spring; the numbers roll with a slightly stiffer one. */\nconst thumbSpring = { type: 'spring', stiffness: 520, damping: 38, mass: 0.9 } as const;\nconst rollSpring = { type: 'spring', stiffness: 420, damping: 34 } as const;\nconst instant = { duration: 0 } as const;\n\n/** Remembers the previous value of each slot, to know which way its number rolls. */\nfunction usePrevious<T>(value: T) {\n const ref = React.useRef(value);\n const prev = ref.current;\n React.useEffect(() => {\n ref.current = value;\n });\n return prev;\n}\n\n/**\n * The content of one slot. When its number changes it rolls like an odometer: the old number leaves\n * upwards and the new one comes from below when the window moves forward (the other way backward).\n */\nfunction RollingSlot({ value, dir, delay, reduce }: { value: Slot; dir: number; delay: number; reduce: boolean }) {\n return (\n <span aria-hidden className={s.clip()}>\n <AnimatePresence initial={false} custom={dir}>\n <motion.span\n key={String(value)}\n custom={dir}\n className={s.number()}\n variants={{\n enter: (d: number) => ({ y: `${d * 110}%`, opacity: 0 }),\n center: { y: '0%', opacity: 1 },\n exit: (d: number) => ({ y: `${d * -110}%`, opacity: 0 }),\n }}\n initial=\"enter\"\n animate=\"center\"\n exit=\"exit\"\n transition={reduce ? instant : { ...rollSpring, delay, opacity: { duration: 0.16, delay } }}\n >\n {value === 'ellipsis' ? <Ellipsis /> : value}\n </motion.span>\n </AnimatePresence>\n </span>\n );\n}\n\nexport interface PaginationProps extends Omit<React.ComponentPropsWithRef<'nav'>, 'onChange'> {\n /** The current page, from 1. */\n page: number;\n /** The number of pages. */\n total: number;\n onPageChange: (page: number) => void;\n /** Pages on each side of the current one. @default 1 */\n siblings?: number;\n /** Show the words \"Previous\" and \"Next\" next to the arrows (from the `sm` breakpoint). @default true */\n labels?: boolean;\n classNames?: { list?: string; page?: string; current?: string; hover?: string; ellipsis?: string; nav?: string };\n}\n\n/**\n * Moves between pages of results. The current page sits on a soft accent thumb that slides between\n * slots with a spring; when the window of pages moves, the numbers roll through their slots like an\n * odometer, in a small wave from the current page outwards. Hover is one neutral block that glides\n * between buttons (never over the current one). With reduced motion everything changes at once.\n */\nexport function Pagination({\n page,\n total,\n onPageChange,\n siblings = 1,\n labels = true,\n className,\n classNames,\n ...props\n}: PaginationProps) {\n const reduce = useReducedMotion() ?? false;\n const go = (p: number) => onPageChange(Math.min(Math.max(p, 1), total));\n const slots = paginationRange(page, total, siblings);\n const prevSlots = usePrevious(slots);\n const pageDir = page >= usePrevious(page) ? 1 : -1;\n const active = slots.indexOf(page);\n // every slot is as wide as the widest page number, so rolling 9 → 10 never changes the bar's width\n const digits = String(total).length;\n const slotStyle = { minWidth: `max(var(--spacing-control-sm), calc(${digits}ch + 1.25rem))` };\n\n const areaRef = React.useRef<HTMLDivElement>(null);\n const glideRef = useGlide<HTMLDivElement>();\n const setArea = React.useCallback(\n (node: HTMLDivElement | null) => {\n areaRef.current = node;\n glideRef(node);\n },\n [glideRef],\n );\n\n // the thumb follows the current page's slot (measured, so it also follows wrapping and resizes)\n const [thumb, setThumb] = React.useState<{ x: number; y: number; width: number; height: number } | null>(null);\n const measure = React.useCallback(() => {\n const area = areaRef.current;\n const el = area?.querySelector<HTMLElement>('[data-current]');\n if (!area || !el) return setThumb(null);\n const a = area.getBoundingClientRect();\n const r = el.getBoundingClientRect();\n setThumb({ x: r.left - a.left, y: r.top - a.top, width: r.width, height: r.height });\n }, []);\n React.useLayoutEffect(measure, [measure, active, total, siblings, labels]);\n React.useEffect(() => {\n const area = areaRef.current;\n if (!area || typeof ResizeObserver === 'undefined') return;\n const ro = new ResizeObserver(() => measure());\n ro.observe(area);\n return () => ro.disconnect();\n }, [measure]);\n const placed = React.useRef(false);\n React.useEffect(() => {\n if (thumb) placed.current = true;\n }, [thumb]);\n\n const navButton = (dir: -1 | 1) => (\n <li>\n <button\n type=\"button\"\n className={cn(s.page(), s.nav(), classNames?.page, classNames?.nav)}\n disabled={dir < 0 ? page <= 1 : page >= total}\n onClick={() => go(page + dir)}\n aria-label={dir < 0 ? 'Previous page' : 'Next page'}\n >\n {dir < 0 && <ChevronLeft aria-hidden />}\n {labels && <span className=\"max-sm:sr-only\">{dir < 0 ? 'Previous' : 'Next'}</span>}\n {dir > 0 && <ChevronRight aria-hidden />}\n </button>\n </li>\n );\n\n return (\n <nav aria-label=\"Pagination\" className={cn(s.root(), className)} {...props}>\n <div ref={setArea} className={s.area()}>\n <span data-glide-block aria-hidden className={cn(glideBlockClass, s.hover(), classNames?.hover)} />\n {thumb && (\n <motion.span\n aria-hidden\n className={cn(s.current(), classNames?.current)}\n initial={false}\n animate={thumb}\n transition={reduce || !placed.current ? instant : thumbSpring}\n >\n {/* a small squash on every page change, so the thumb answers even when the numbers move instead */}\n <motion.span\n key={page}\n className={s.thumbFill()}\n initial={reduce ? false : { scale: 0.86 }}\n animate={{ scale: 1 }}\n transition={reduce ? instant : { type: 'spring', stiffness: 600, damping: 22 }}\n />\n </motion.span>\n )}\n <ul className={cn(s.list(), classNames?.list)}>\n {navButton(-1)}\n {slots.map((p, i) => {\n const prev = prevSlots.length === slots.length ? prevSlots[i] : p;\n const dir = typeof p === 'number' && typeof prev === 'number' ? Math.sign(p - prev) || pageDir : pageDir;\n const delay = reduce ? 0 : Math.abs(i - Math.max(active, 0)) * 0.025;\n const content = <RollingSlot value={p} dir={dir} delay={delay} reduce={reduce} />;\n return p === 'ellipsis' ? (\n <li key={`slot-${i}`} aria-hidden style={slotStyle} className={cn(s.ellipsis(), classNames?.ellipsis)}>\n {content}\n </li>\n ) : (\n <li key={`slot-${i}`}>\n <button\n type=\"button\"\n style={slotStyle}\n className={cn(s.page(), classNames?.page)}\n aria-current={p === page ? 'page' : undefined}\n data-current={p === page ? '' : undefined}\n data-active={p === page ? 'true' : undefined}\n aria-label={`Page ${p}`}\n onClick={() => go(p)}\n >\n {content}\n </button>\n </li>\n );\n })}\n {navButton(1)}\n </ul>\n </div>\n </nav>\n );\n}\n","import { tv } from '../../lib/tv';\n\nexport const emptyStyles = tv({\n slots: {\n root: 'squircle flex w-full flex-col items-center justify-center gap-1 rounded-card border border-dashed border-border-strong px-6 py-10 text-center',\n icon: 'squircle mb-3 flex size-11 items-center justify-center rounded-control-sm bg-accent-soft text-accent-soft-foreground [&_svg]:size-5',\n title: 'font-heading text-base font-[weight:var(--cui-heading-weight)] tracking-[var(--cui-heading-tracking)] text-foreground',\n description: 'max-w-sm text-sm text-muted',\n actions: 'mt-4 flex flex-wrap items-center justify-center gap-2',\n },\n});\n","import * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { emptyStyles } from './empty.styles';\n\nconst s = emptyStyles();\ntype Div = React.ComponentPropsWithRef<'div'>;\n\nconst EmptyRoot = ({ className, ...p }: Div) => <div className={cn(s.root(), className)} {...p} />;\nconst EmptyIcon = ({ className, ...p }: Div) => <div aria-hidden className={cn(s.icon(), className)} {...p} />;\nconst EmptyTitle = ({ className, ...p }: React.ComponentPropsWithRef<'h3'>) => <h3 className={cn(s.title(), className)} {...p} />;\nconst EmptyDescription = ({ className, ...p }: React.ComponentPropsWithRef<'p'>) => (\n <p className={cn(s.description(), className)} {...p} />\n);\nconst EmptyActions = ({ className, ...p }: Div) => <div className={cn(s.actions(), className)} {...p} />;\n\nexport interface EmptyProps extends Omit<Div, 'title'> {\n icon?: React.ReactNode;\n title: React.ReactNode;\n description?: React.ReactNode;\n /** Buttons under the text. */\n action?: React.ReactNode;\n classNames?: { icon?: string; title?: string; description?: string; actions?: string };\n}\n\n/** An empty state: icon tile, title, a line of text and an action. */\nfunction EmptySimple({ icon, title, description, action, classNames, children, ...props }: EmptyProps) {\n return (\n <EmptyRoot {...props}>\n {icon && <EmptyIcon className={classNames?.icon}>{icon}</EmptyIcon>}\n <EmptyTitle className={classNames?.title}>{title}</EmptyTitle>\n {description && <EmptyDescription className={classNames?.description}>{description}</EmptyDescription>}\n {children}\n {action && <EmptyActions className={classNames?.actions}>{action}</EmptyActions>}\n </EmptyRoot>\n );\n}\n\nexport const Empty = Object.assign(EmptySimple, {\n Root: EmptyRoot,\n Icon: EmptyIcon,\n Title: EmptyTitle,\n Description: EmptyDescription,\n Actions: EmptyActions,\n});\n","import { tv } from '../../lib/tv';\n\nexport const scrollAreaStyles = tv({\n slots: {\n root: 'relative min-h-0 overflow-hidden',\n viewport: 'size-full overscroll-contain rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-ring',\n scrollbar: [\n 'm-0.5 flex touch-none select-none rounded-full opacity-0 transition-opacity duration-[var(--cui-duration-normal)] ease-ui',\n 'data-[hovering]:opacity-100 data-[scrolling]:opacity-100 data-[scrolling]:duration-0',\n 'data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:flex-col',\n ],\n thumb: 'flex-1 rounded-full bg-border-strong transition-colors hover:bg-muted/60',\n corner: 'bg-transparent',\n },\n variants: {\n /** Fade the content at the top and bottom edges (like the docs sidebar). */\n fade: {\n true: { viewport: 'mask-t-from-[calc(100%-16px)] mask-b-from-[calc(100%-24px)]' },\n false: {},\n },\n },\n defaultVariants: { fade: false },\n});\n","import { ScrollArea as BaseScrollArea } from '@base-ui/react/scroll-area';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { scrollAreaStyles } from './scroll-area.styles';\n\nconst s = scrollAreaStyles();\n\nfunction Root({ className, ...p }: React.ComponentPropsWithRef<typeof BaseScrollArea.Root>) {\n return <BaseScrollArea.Root className={cn(s.root(), className)} {...p} />;\n}\nfunction Viewport({ className, ...p }: React.ComponentPropsWithRef<typeof BaseScrollArea.Viewport>) {\n return <BaseScrollArea.Viewport className={cn(s.viewport(), className)} {...p} />;\n}\n/** A thin scrollbar that shows on hover and while scrolling; includes its thumb. */\nfunction Scrollbar({ className, ...p }: React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>) {\n return (\n <BaseScrollArea.Scrollbar className={cn(s.scrollbar(), className)} {...p}>\n <BaseScrollArea.Thumb className={s.thumb()} />\n </BaseScrollArea.Scrollbar>\n );\n}\n\nexport interface ScrollAreaProps\n extends React.ComponentPropsWithRef<typeof BaseScrollArea.Root>,\n VariantProps<typeof scrollAreaStyles> {\n /** Which scrollbars to render. @default 'vertical' */\n orientation?: 'vertical' | 'horizontal' | 'both';\n classNames?: { viewport?: string; scrollbar?: string };\n}\n\n/** One-line form: `<ScrollArea className=\"h-64\">…</ScrollArea>`. */\nfunction ScrollAreaSimple({ orientation = 'vertical', fade, classNames, children, ...props }: ScrollAreaProps) {\n return (\n <Root {...props}>\n <BaseScrollArea.Viewport className={cn(scrollAreaStyles({ fade }).viewport(), classNames?.viewport)}>\n <BaseScrollArea.Content>{children}</BaseScrollArea.Content>\n </BaseScrollArea.Viewport>\n {orientation !== 'horizontal' && <Scrollbar orientation=\"vertical\" className={classNames?.scrollbar} />}\n {orientation !== 'vertical' && <Scrollbar orientation=\"horizontal\" className={classNames?.scrollbar} />}\n {orientation === 'both' && <BaseScrollArea.Corner className={s.corner()} />}\n </Root>\n );\n}\n\nexport const ScrollArea = Object.assign(ScrollAreaSimple, {\n Root,\n Viewport,\n Content: BaseScrollArea.Content,\n Scrollbar,\n Corner: BaseScrollArea.Corner,\n});\n","import { tv } from '../../lib/tv';\n\nexport const tableStyles = tv({\n slots: {\n // rows sliding in on a page change must not flash a scrollbar\n wrapper: 'squircle w-full overflow-x-auto rounded-card border border-border bg-surface [&:has([data-row-in])]:overflow-x-clip',\n // tabular digits: numbers keep their width when they change (sorting, paging, live counts)\n table: 'w-full border-collapse text-sm tabular-nums',\n caption: 'caption-bottom px-4 py-3 text-start text-xs text-muted',\n header: 'bg-surface-2/70',\n body: '',\n footer: 'border-t border-border bg-surface-2/40 font-medium',\n row: 'border-b border-border last:border-b-0 transition-colors duration-[var(--cui-duration-fast)] ease-ui',\n head: 'h-10 px-4 text-start align-middle text-xs font-medium whitespace-nowrap text-muted [&+&]:border-s [&+&]:border-border',\n cell: 'px-4 py-3 align-middle text-foreground [&+&]:border-s [&+&]:border-border',\n },\n variants: {\n /** Highlight rows on hover (lists you can click into). */\n hover: { true: { row: 'hover:bg-hover/50' }, false: {} },\n /** Tighter rows. */\n dense: { true: { head: 'h-8 px-3', cell: 'px-3 py-2' }, false: {} },\n /**\n * `fixed`: column widths come from the first row / `<col>` widths, not from the content, so they\n * never jump when the rows change. `auto`: the browser sizes columns to their content.\n */\n layout: { auto: { table: 'table-auto' }, fixed: { table: 'table-fixed', cell: 'break-words' } },\n },\n defaultVariants: { hover: false, dense: false, layout: 'auto' },\n});\n","import * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { tableStyles } from './table.styles';\n\ntype Options = VariantProps<typeof tableStyles>;\nconst OptionsContext = React.createContext<Options>({});\nconst useS = () => tableStyles(React.useContext(OptionsContext));\n\nexport interface TableRootProps extends React.ComponentPropsWithRef<'table'>, Options {\n classNames?: { wrapper?: string };\n}\n\n/** The table in a rounded, horizontally scrolling frame (like the docs tables of crazy-hub). */\nfunction TableRoot({ className, classNames, hover, dense, layout, ...props }: TableRootProps) {\n const s = tableStyles({ hover, dense, layout });\n const options = React.useMemo(() => ({ hover, dense, layout }), [hover, dense, layout]);\n return (\n <OptionsContext.Provider value={options}>\n <div className={cn(s.wrapper(), classNames?.wrapper)}>\n <table className={cn(s.table(), className)} {...props} />\n </div>\n </OptionsContext.Provider>\n );\n}\nconst TableHeader = ({ className, ...p }: React.ComponentPropsWithRef<'thead'>) => <thead className={cn(useS().header(), className)} {...p} />;\nconst TableBody = ({ className, ...p }: React.ComponentPropsWithRef<'tbody'>) => <tbody className={cn(useS().body(), className)} {...p} />;\nconst TableFooter = ({ className, ...p }: React.ComponentPropsWithRef<'tfoot'>) => <tfoot className={cn(useS().footer(), className)} {...p} />;\nconst TableRow = ({ className, ...p }: React.ComponentPropsWithRef<'tr'>) => <tr className={cn(useS().row(), className)} {...p} />;\nconst TableHead = ({ className, ...p }: React.ComponentPropsWithRef<'th'>) => <th className={cn(useS().head(), className)} {...p} />;\nconst TableCell = ({ className, ...p }: React.ComponentPropsWithRef<'td'>) => <td className={cn(useS().cell(), className)} {...p} />;\nconst TableCaption = ({ className, ...p }: React.ComponentPropsWithRef<'caption'>) => <caption className={cn(useS().caption(), className)} {...p} />;\n\nexport interface TableColumn<Row> {\n key: string;\n header: React.ReactNode;\n cell?: (row: Row) => React.ReactNode;\n className?: string;\n /**\n * A fixed width (px number or CSS length). When any column has one the table switches to a fixed\n * layout, so widths don't follow the content; columns without a width share the rest.\n */\n width?: number | string;\n}\n\nexport interface TableProps<Row> extends Omit<TableRootProps, 'children'> {\n columns: TableColumn<Row>[];\n rows: Row[];\n /** Stable key per row. @default index */\n rowKey?: (row: Row, index: number) => React.Key;\n caption?: React.ReactNode;\n}\n\n/** One-line form for simple data: `<Table columns={…} rows={…} />`. For sorting/filtering see Data Table. */\nfunction TableSimple<Row extends Record<string, unknown>>({ columns, rows, rowKey, caption, layout, ...props }: TableProps<Row>) {\n const sized = columns.some((c) => c.width !== undefined);\n return (\n <TableRoot layout={layout ?? (sized ? 'fixed' : 'auto')} {...props}>\n {caption && <TableCaption>{caption}</TableCaption>}\n {sized && (\n <colgroup>\n {columns.map((c) => (\n <col key={c.key} style={c.width === undefined ? undefined : { width: c.width }} />\n ))}\n </colgroup>\n )}\n <TableHeader>\n <TableRow>\n {columns.map((c) => (\n <TableHead key={c.key} className={c.className}>\n {c.header}\n </TableHead>\n ))}\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map((row, i) => (\n <TableRow key={rowKey ? rowKey(row, i) : i}>\n {columns.map((c) => (\n <TableCell key={c.key} className={c.className}>\n {c.cell ? c.cell(row) : (row[c.key] as React.ReactNode)}\n </TableCell>\n ))}\n </TableRow>\n ))}\n </TableBody>\n </TableRoot>\n );\n}\n\nexport const Table = Object.assign(TableSimple, {\n Root: TableRoot,\n Header: TableHeader,\n Body: TableBody,\n Footer: TableFooter,\n Row: TableRow,\n Head: TableHead,\n Cell: TableCell,\n Caption: TableCaption,\n});\n","import { tv } from '../../lib/tv';\n\nexport const aspectRatioStyles = tv({\n base: 'relative w-full overflow-hidden [&>img]:absolute [&>img]:inset-0 [&>img]:size-full [&>img]:object-cover [&>video]:absolute [&>video]:inset-0 [&>video]:size-full [&>video]:object-cover',\n variants: {\n rounded: { true: 'squircle rounded-card', false: '' },\n },\n defaultVariants: { rounded: false },\n});\n","import * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { aspectRatioStyles } from './aspect-ratio.styles';\n\nexport interface AspectRatioProps extends React.ComponentPropsWithRef<'div'>, VariantProps<typeof aspectRatioStyles> {\n /** Width / height, e.g. `16 / 9`. @default 1 */\n ratio?: number;\n}\n\n/** Keeps its content (image, video, map) at a fixed ratio; media inside fills it. */\nexport function AspectRatio({ ratio = 1, rounded, className, style, ...props }: AspectRatioProps) {\n return <div className={cn(aspectRatioStyles({ rounded }), className)} style={{ aspectRatio: String(ratio), ...style }} {...props} />;\n}\n","import { tv } from '../../lib/tv';\n\n/**\n * Days are 2.5rem buttons inside 2.75rem cells (2 / 2.25rem on phones), so there is air around every day. A range is one soft\n * band per week row (a single element, so no seams between cells) with rounded ends; the picked ends are\n * solid accent days inside it, their radius concentric with the band's (band = day radius + 2px inset).\n */\nexport const calendarStyles = tv({\n slots: {\n root: 'squircle relative inline-flex w-fit flex-col rounded-card border border-border bg-surface p-2.5 text-foreground sm:p-4 select-none',\n nav: 'absolute end-2.5 top-2.5 z-10 sm:end-4 sm:top-4 flex items-center gap-1',\n navButton: 'border-border text-muted hover:text-foreground rtl:[&_svg]:-scale-x-100',\n viewport: 'relative overflow-hidden',\n months: 'flex flex-col gap-6 sm:flex-row sm:gap-8',\n month: 'flex flex-col gap-3',\n caption: 'flex h-control-sm items-baseline gap-1.5 self-start ps-2 pe-20 leading-[var(--spacing-control-sm)] whitespace-nowrap',\n captionMonth: 'text-base font-semibold tracking-[var(--cui-heading-tracking)] text-foreground',\n captionYear: 'text-base font-normal text-muted',\n grid: 'flex flex-col gap-0.5 outline-none',\n weekdays: 'grid grid-cols-7 pb-1',\n weekday: 'flex h-7 w-9 items-center justify-center text-xs font-medium text-muted sm:w-11',\n week: 'relative grid grid-cols-7',\n cell: 'relative flex size-9 items-center justify-center p-0.5 sm:size-11',\n // one strip per week row, placed by --band-from / --band-span (columns), drawn under the days\n band: [\n 'squircle pointer-events-none absolute inset-y-0 rounded-[calc(var(--radius-control-sm)+2px)] bg-accent-soft',\n 'start-[calc(var(--band-from)*100%/7)] w-[calc(var(--band-span)*100%/7)]',\n ],\n day: [\n 'squircle relative flex size-8 cursor-default items-center justify-center rounded-control-sm border border-transparent sm:size-10',\n 'text-sm tabular-nums text-foreground outline-none',\n 'transition-[background-color,color,scale] duration-[var(--cui-duration-fast)] ease-ui',\n '[&:not([data-selected],[data-range-edge],[data-disabled])]:hover:bg-hover',\n 'focus-visible:border-accent active:scale-[var(--cui-press-scale)]',\n 'data-[outside]:text-muted/60',\n // today: bold with a dot. The dot takes the text colour, so it is readable on every fill; the\n // accent text colour only applies while the day is not part of a selection\n 'data-[today]:font-semibold',\n 'data-[today]:after:absolute data-[today]:after:bottom-1.5 data-[today]:after:size-1 data-[today]:after:rounded-full data-[today]:after:bg-current',\n '[&[data-today]:not([data-selected],[data-range-edge],[data-range-middle])]:text-accent-soft-foreground',\n 'data-[range-middle]:text-accent-soft-foreground',\n 'data-[selected]:bg-accent data-[selected]:font-medium data-[selected]:text-accent-foreground',\n 'data-[range-edge]:bg-accent data-[range-edge]:font-medium data-[range-edge]:text-accent-foreground',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:text-muted data-[disabled]:line-through data-[disabled]:opacity-50 data-[disabled]:active:scale-100',\n ],\n },\n});\n","import { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { AnimatePresence, motion, useIsPresent, useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { Button } from '../button/button';\nimport { calendarStyles } from './calendar.styles';\n\nconst styles = calendarStyles();\n\n/* ----------------------------------------------------------------------------------------------\n * Date helpers. Every date is a local calendar day (time is ignored), so no date library is needed.\n * -------------------------------------------------------------------------------------------- */\n\nexport interface DateRange {\n from: Date;\n to?: Date | null;\n}\n\nconst day = (d: Date) => new Date(d.getFullYear(), d.getMonth(), d.getDate());\nconst monthStart = (d: Date) => new Date(d.getFullYear(), d.getMonth(), 1);\nconst addDays = (d: Date, n: number) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);\nconst addMonths = (d: Date, n: number) => {\n const first = new Date(d.getFullYear(), d.getMonth() + n, 1);\n const last = new Date(first.getFullYear(), first.getMonth() + 1, 0).getDate();\n return new Date(first.getFullYear(), first.getMonth(), Math.min(d.getDate(), last));\n};\nconst sameDay = (a?: Date | null, b?: Date | null) =>\n !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();\nconst cmp = (a: Date, b: Date) => day(a).getTime() - day(b).getTime();\nconst monthsBetween = (a: Date, b: Date) => (b.getFullYear() - a.getFullYear()) * 12 + b.getMonth() - a.getMonth();\nconst key = (d: Date) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;\n\n/** The 6 × 7 days shown for a month, starting on `weekStartsOn`. Six rows keep the height fixed. */\nfunction monthDays(month: Date, weekStartsOn: number) {\n const first = monthStart(month);\n const start = addDays(first, -((first.getDay() - weekStartsOn + 7) % 7));\n return Array.from({ length: 6 }, (_, w) => Array.from({ length: 7 }, (_, d) => addDays(start, w * 7 + d)));\n}\n\nfunction useControllable<T>(value: T | undefined, defaultValue: T, onChange?: (v: T) => void) {\n const [inner, setInner] = React.useState(defaultValue);\n const controlled = value !== undefined;\n const current = controlled ? value : inner;\n const set = React.useCallback(\n (next: T) => {\n if (!controlled) setInner(next);\n onChange?.(next);\n },\n [controlled, onChange],\n );\n return [current, set] as const;\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype Slots = keyof ReturnType<typeof calendarStyles>;\n\ninterface CalendarBaseProps {\n /** The first month shown (controlled). */\n month?: Date;\n /** The first month shown at start. Defaults to the selected date or today. */\n defaultMonth?: Date;\n onMonthChange?: (month: Date) => void;\n /** The earliest day that can be picked. */\n min?: Date;\n /** The latest day that can be picked. */\n max?: Date;\n /** Days that can't be picked: a list, or a function that returns `true` for a disabled day. */\n disabledDates?: Date[] | ((date: Date) => boolean);\n /** Disable the whole calendar. */\n disabled?: boolean;\n /** BCP 47 locale for month and weekday names. @default 'en' */\n locale?: string;\n /** 0 = Sunday … 6 = Saturday. @default 1 */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n /** How many months to show side by side. @default 1 */\n numberOfMonths?: number;\n /** Show the days of the neighbouring months. @default true */\n showOutsideDays?: boolean;\n /** Move focus into the grid on mount (used by Date Picker). */\n autoFocus?: boolean;\n 'aria-label'?: string;\n className?: string;\n classNames?: Partial<Record<Slots, string>>;\n}\n\nexport interface CalendarSingleProps extends CalendarBaseProps {\n mode?: 'single';\n value?: Date | null;\n defaultValue?: Date | null;\n onValueChange?: (value: Date | null) => void;\n}\n\nexport interface CalendarRangeProps extends CalendarBaseProps {\n mode: 'range';\n value?: DateRange | null;\n defaultValue?: DateRange | null;\n onValueChange?: (value: DateRange | null) => void;\n}\n\nexport type CalendarProps = CalendarSingleProps | CalendarRangeProps;\n\nconst EASE = [0.22, 1, 0.36, 1] as const;\nconst SLIDE = 28;\n\n/**\n * A month grid for picking a day or a range of days.\n * <Calendar value={date} onValueChange={setDate} />\n * <Calendar mode=\"range\" numberOfMonths={2} value={range} onValueChange={setRange} />\n * Names come from `Intl`; arrow keys, Home/End and Page Up/Down move the focus.\n */\nexport function Calendar(props: CalendarProps) {\n const {\n mode = 'single',\n min,\n max,\n disabledDates,\n disabled = false,\n locale = 'en',\n weekStartsOn = 1,\n numberOfMonths = 1,\n showOutsideDays = true,\n autoFocus = false,\n className,\n classNames,\n } = props;\n\n const [today] = React.useState(() => day(new Date()));\n const [value, setValue] = useControllable<Date | DateRange | null>(\n props.value,\n props.defaultValue ?? null,\n props.onValueChange as ((v: Date | DateRange | null) => void) | undefined,\n );\n const single = mode === 'single' ? (value as Date | null) : null;\n const range = mode === 'range' ? (value as DateRange | null) : null;\n const anchor = single ?? range?.from ?? null;\n\n const [month, setMonthState] = useControllable(\n props.month ? monthStart(props.month) : undefined,\n monthStart(props.defaultMonth ?? anchor ?? today),\n props.onMonthChange,\n );\n const [focused, setFocused] = React.useState<Date>(() => anchor ?? today);\n const [hovered, setHovered] = React.useState<Date | null>(null);\n const direction = React.useRef(0);\n const wantsFocus = React.useRef(autoFocus);\n const rootRef = React.useRef<HTMLDivElement>(null);\n const reduceMotion = useReducedMotion();\n\n const months = Array.from({ length: Math.max(1, numberOfMonths) }, (_, i) => addMonths(month, i));\n const lastMonth = months[months.length - 1]!;\n const visible = (d: Date) => monthsBetween(month, d) >= 0 && monthsBetween(lastMonth, d) <= 0;\n\n const isDisabled = (d: Date) =>\n disabled ||\n (min !== undefined && cmp(d, min) < 0) ||\n (max !== undefined && cmp(d, max) > 0) ||\n (typeof disabledDates === 'function' ? disabledDates(d) : !!disabledDates?.some((x) => sameDay(x, d)));\n\n const setMonth = (next: Date) => {\n const n = monthStart(next);\n direction.current = Math.sign(monthsBetween(month, n));\n setMonthState(n);\n };\n\n // the day that takes Tab focus inside the grid\n const tabbable = visible(focused) ? focused : anchor && visible(anchor) ? anchor : visible(today) ? today : month;\n\n React.useEffect(() => {\n if (!wantsFocus.current) return;\n wantsFocus.current = false;\n rootRef.current?.querySelector<HTMLButtonElement>('button[data-day][tabindex=\"0\"]')?.focus();\n });\n\n const select = (d: Date) => {\n if (isDisabled(d)) return;\n setFocused(d);\n if (!visible(d)) setMonth(cmp(d, month) < 0 ? d : addMonths(d, -(months.length - 1)));\n if (mode === 'single') {\n setValue(d);\n return;\n }\n if (!range || range.to) setValue({ from: d, to: null });\n else if (cmp(d, range.from) < 0) setValue({ from: d, to: range.from });\n else setValue({ from: range.from, to: d });\n };\n\n const move = (next: Date) => {\n let d = next;\n if (min && cmp(d, min) < 0) d = day(min);\n if (max && cmp(d, max) > 0) d = day(max);\n setFocused(d);\n wantsFocus.current = true;\n if (!visible(d)) setMonth(cmp(d, month) < 0 ? d : addMonths(d, -(months.length - 1)));\n };\n\n const onKeyDown = (e: React.KeyboardEvent) => {\n const rtl = rootRef.current ? getComputedStyle(rootRef.current).direction === 'rtl' : false;\n const f = tabbable;\n const weekPos = (f.getDay() - weekStartsOn + 7) % 7;\n const moves: Record<string, () => Date> = {\n ArrowLeft: () => addDays(f, rtl ? 1 : -1),\n ArrowRight: () => addDays(f, rtl ? -1 : 1),\n ArrowUp: () => addDays(f, -7),\n ArrowDown: () => addDays(f, 7),\n Home: () => addDays(f, -weekPos),\n End: () => addDays(f, 6 - weekPos),\n PageUp: () => addMonths(f, e.shiftKey ? -12 : -1),\n PageDown: () => addMonths(f, e.shiftKey ? 12 : 1),\n };\n const fn = moves[e.key];\n if (!fn) return;\n e.preventDefault();\n move(fn());\n };\n\n const step = (delta: number) => {\n setMonth(addMonths(month, delta));\n setFocused(addMonths(tabbable, delta));\n };\n\n // range shown on the grid: the picked one, or a preview while the second end is hovered\n const shown: { from: Date; to: Date } | null = (() => {\n if (!range) return null;\n const end = range.to ?? hovered;\n if (!end) return { from: range.from, to: range.from };\n return cmp(end, range.from) < 0 ? { from: end, to: range.from } : { from: range.from, to: end };\n })();\n\n const fmt = React.useMemo(\n () => ({\n caption: new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }),\n day: new Intl.DateTimeFormat(locale, { day: 'numeric' }),\n label: new Intl.DateTimeFormat(locale, { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' }),\n weekdayShort: new Intl.DateTimeFormat(locale, { weekday: 'short' }),\n weekdayLong: new Intl.DateTimeFormat(locale, { weekday: 'long' }),\n }),\n [locale],\n );\n // 2023-01-01 was a Sunday\n const weekdays = Array.from({ length: 7 }, (_, i) => new Date(2023, 0, 1 + ((weekStartsOn + i) % 7)));\n\n const prevDisabled = disabled || (min !== undefined && monthsBetween(monthStart(min), month) <= 0);\n const nextDisabled = disabled || (max !== undefined && monthsBetween(lastMonth, monthStart(max)) <= 0);\n const offset = reduceMotion ? 0 : SLIDE;\n\n const inShown = (d: Date, m: Date) =>\n d.getMonth() === m.getMonth() && !!shown && cmp(d, shown.from) >= 0 && cmp(d, shown.to) <= 0;\n\n /** The part of the range band that falls on one week row: one rounded strip from its first to last day. */\n const renderBand = (week: Date[], m: Date) => {\n if (!shown || sameDay(shown.from, shown.to)) return null;\n const cols = week.flatMap((d, i) => (inShown(d, m) ? [i] : []));\n if (!cols.length) return null;\n const from = cols[0]!;\n const span = cols[cols.length - 1]! - from + 1;\n return (\n <div\n aria-hidden\n className={cn(styles.band(), classNames?.band)}\n style={{ '--band-from': from, '--band-span': span } as React.CSSProperties}\n />\n );\n };\n\n const renderDay = (d: Date, m: Date, present: boolean) => {\n const outside = d.getMonth() !== m.getMonth();\n const off = isDisabled(d);\n const inRange = inShown(d, m);\n const isStart = !!shown && sameDay(d, shown.from);\n const isEnd = !!shown && sameDay(d, shown.to);\n const edge = !outside && (isStart || isEnd);\n const band = !inRange || (isStart && isEnd) ? undefined : isStart ? 'start' : isEnd ? 'end' : 'middle';\n const selected = mode === 'single' ? sameDay(d, single) : edge && !!range;\n if (outside && !showOutsideDays) return <div key={key(d)} role=\"gridcell\" className={cn(styles.cell(), classNames?.cell)} />;\n return (\n <div\n key={key(d)}\n role=\"gridcell\"\n aria-selected={selected || undefined}\n data-band={band}\n className={cn(styles.cell(), classNames?.cell)}\n >\n <button\n type=\"button\"\n data-day={key(d)}\n tabIndex={present && !outside && sameDay(d, tabbable) ? 0 : -1}\n aria-label={fmt.label.format(d)}\n aria-current={sameDay(d, today) ? 'date' : undefined}\n aria-disabled={off || undefined}\n data-today={sameDay(d, today) || undefined}\n data-outside={outside || undefined}\n data-disabled={off || undefined}\n data-selected={(mode === 'single' && selected) || undefined}\n data-range-edge={(mode === 'range' && edge) || undefined}\n data-range-middle={(band === 'middle' && !edge) || undefined}\n className={cn(styles.day(), classNames?.day)}\n onClick={() => select(d)}\n onFocus={() => !outside && setFocused(d)}\n onPointerEnter={() => mode === 'range' && !off && setHovered(d)}\n onPointerLeave={() => setHovered(null)}\n >\n {fmt.day.format(d)}\n </button>\n </div>\n );\n };\n\n return (\n <div\n ref={rootRef}\n role=\"group\"\n aria-label={props['aria-label'] ?? 'Calendar'}\n data-disabled={disabled || undefined}\n className={cn(styles.root(), classNames?.root, className)}\n >\n <div className={cn(styles.nav(), classNames?.nav)}>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label=\"Previous month\"\n disabled={prevDisabled}\n className={cn(styles.navButton(), classNames?.navButton)}\n onClick={() => step(-1)}\n >\n <ChevronLeft />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label=\"Next month\"\n disabled={nextDisabled}\n className={cn(styles.navButton(), classNames?.navButton)}\n onClick={() => step(1)}\n >\n <ChevronRight />\n </Button>\n </div>\n <span className=\"sr-only\" aria-live=\"polite\">\n {months.map((m) => fmt.caption.format(m)).join(', ')}\n </span>\n <div className={cn(styles.viewport(), classNames?.viewport)}>\n <AnimatePresence initial={false} mode=\"popLayout\" custom={direction.current}>\n <motion.div\n key={key(month)}\n custom={direction.current}\n variants={{\n enter: (dir: number) => ({ x: dir * offset, opacity: 0, filter: 'blur(3px)' }),\n center: { x: 0, opacity: 1, filter: 'blur(0px)' },\n exit: (dir: number) => ({ x: -dir * offset, opacity: 0, filter: 'blur(3px)' }),\n }}\n initial=\"enter\"\n animate=\"center\"\n exit=\"exit\"\n transition={{ duration: reduceMotion ? 0 : 0.32, ease: EASE }}\n className={cn(styles.months(), classNames?.months)}\n >\n <MonthGrids>\n {(present) =>\n months.map((m) => (\n <div key={key(m)} className={cn(styles.month(), classNames?.month)}>\n <div aria-hidden className={cn(styles.caption(), classNames?.caption)}>\n {/* parts keep the locale's order (e.g. year first in Japanese) */}\n {fmt.caption.formatToParts(m).map((part, i) =>\n part.type === 'literal' ? null : (\n <span\n key={i}\n className={\n part.type === 'year'\n ? cn(styles.captionYear(), classNames?.captionYear)\n : cn(styles.captionMonth(), classNames?.captionMonth)\n }\n >\n {part.value}\n </span>\n ),\n )}\n </div>\n <div\n role=\"grid\"\n aria-label={fmt.caption.format(m)}\n className={cn(styles.grid(), classNames?.grid)}\n onKeyDown={onKeyDown}\n >\n <div role=\"row\" className={cn(styles.weekdays(), classNames?.weekdays)}>\n {weekdays.map((w) => (\n <div\n key={w.getDay()}\n role=\"columnheader\"\n aria-label={fmt.weekdayLong.format(w)}\n className={cn(styles.weekday(), classNames?.weekday)}\n >\n {fmt.weekdayShort.format(w)}\n </div>\n ))}\n </div>\n {monthDays(m, weekStartsOn).map((week) => (\n <div key={key(week[0]!)} role=\"row\" className={cn(styles.week(), classNames?.week)}>\n {renderBand(week, m)}\n {week.map((d) => renderDay(d, m, present))}\n </div>\n ))}\n </div>\n </div>\n ))\n }\n </MonthGrids>\n </motion.div>\n </AnimatePresence>\n </div>\n </div>\n );\n}\n\n/** Tells the grids whether they are leaving, so a month on its way out never takes focus. */\nfunction MonthGrids({ children }: { children: (present: boolean) => React.ReactNode }) {\n const present = useIsPresent();\n return <>{children(present)}</>;\n}\n","import { tv } from '../../lib/tv';\nimport { inputStyles } from '../input/input.styles';\n\nexport const datePickerStyles = tv({\n slots: {\n trigger: [\n inputStyles(),\n 'min-w-56 cursor-default justify-between gap-2 text-start select-none',\n 'data-[popup-open]:border-accent',\n ],\n value: 'truncate',\n placeholder: 'truncate text-muted',\n icon: 'size-4 shrink-0 text-muted',\n popup: 'w-auto p-0',\n calendar: 'border-0 bg-transparent',\n },\n variants: {\n size: {\n sm: { trigger: 'h-control-sm rounded-control-sm px-2.5 text-sm' },\n md: { trigger: 'h-control rounded-control px-3.5' },\n lg: { trigger: 'h-control-lg rounded-control-lg px-4 text-base' },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { CalendarDays } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { Calendar, type CalendarProps, type DateRange } from '../calendar/calendar';\nimport { Popover } from '../popover/popover';\nimport { datePickerStyles } from './date-picker.styles';\n\ntype Slots = keyof ReturnType<typeof datePickerStyles>;\ntype CalendarPassThrough = Pick<\n CalendarProps,\n 'min' | 'max' | 'disabledDates' | 'locale' | 'weekStartsOn' | 'numberOfMonths' | 'showOutsideDays'\n>;\n\ninterface DatePickerBaseProps extends CalendarPassThrough, VariantProps<typeof datePickerStyles> {\n /** Text shown while nothing is picked. */\n placeholder?: React.ReactNode;\n /** Options for `Intl.DateTimeFormat` used to show the value in the trigger. @default { dateStyle: 'medium' } */\n formatOptions?: Intl.DateTimeFormatOptions;\n /** Disable the trigger. */\n disabled?: boolean;\n /** Submit the value with a form, as `YYYY-MM-DD` (range: `name` + `[from]` / `[to]`). */\n name?: string;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n side?: 'top' | 'bottom' | 'left' | 'right';\n align?: 'start' | 'center' | 'end';\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n className?: string;\n classNames?: Partial<Record<Slots, string>>;\n}\n\nexport interface DatePickerSingleProps extends DatePickerBaseProps {\n mode?: 'single';\n value?: Date | null;\n defaultValue?: Date | null;\n onValueChange?: (value: Date | null) => void;\n}\n\nexport interface DatePickerRangeProps extends DatePickerBaseProps {\n mode: 'range';\n value?: DateRange | null;\n defaultValue?: DateRange | null;\n onValueChange?: (value: DateRange | null) => void;\n}\n\nexport type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;\n\nconst iso = (d: Date) =>\n `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;\n\n/**\n * A field that opens a Calendar in a popover.\n * <DatePicker value={date} onValueChange={setDate} placeholder=\"Pick a date\" />\n * <DatePicker mode=\"range\" numberOfMonths={2} value={range} onValueChange={setRange} />\n */\nexport function DatePicker(props: DatePickerProps) {\n const {\n mode = 'single',\n placeholder = mode === 'range' ? 'Pick a range' : 'Pick a date',\n formatOptions = { dateStyle: 'medium' },\n locale = 'en',\n disabled,\n name,\n size,\n side = 'bottom',\n align = 'start',\n id,\n className,\n classNames,\n min,\n max,\n disabledDates,\n weekStartsOn,\n numberOfMonths,\n showOutsideDays,\n } = props;\n const styles = datePickerStyles({ size });\n\n const [inner, setInner] = React.useState<Date | DateRange | null>(props.defaultValue ?? null);\n const value = props.value !== undefined ? props.value : inner;\n const [openInner, setOpenInner] = React.useState(props.defaultOpen ?? false);\n const open = props.open ?? openInner;\n const setOpen = (next: boolean) => {\n setOpenInner(next);\n props.onOpenChange?.(next);\n };\n const popupRef = React.useRef<HTMLDivElement>(null);\n\n const change = (next: Date | DateRange | null) => {\n if (props.value === undefined) setInner(next);\n (props.onValueChange as ((v: Date | DateRange | null) => void) | undefined)?.(next);\n const done = mode === 'single' ? next !== null : !!(next as DateRange | null)?.to;\n if (done) setOpen(false);\n };\n\n const formatter = React.useMemo(() => new Intl.DateTimeFormat(locale, formatOptions), [locale, formatOptions]);\n let label: string | null = null;\n if (mode === 'single' && value) label = formatter.format(value as Date);\n if (mode === 'range' && value) {\n const r = value as DateRange;\n label = r.to ? formatter.formatRange(r.from, r.to) : `${formatter.format(r.from)} – …`;\n }\n\n const calendarProps = {\n min,\n max,\n disabledDates,\n locale,\n weekStartsOn,\n numberOfMonths,\n showOutsideDays,\n className: cn(styles.calendar(), classNames?.calendar),\n };\n\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger\n id={id}\n disabled={disabled}\n aria-label={props['aria-label']}\n aria-labelledby={props['aria-labelledby']}\n className={cn(styles.trigger(), classNames?.trigger, className)}\n >\n <span className={label ? cn(styles.value(), classNames?.value) : cn(styles.placeholder(), classNames?.placeholder)}>\n {label ?? placeholder}\n </span>\n <CalendarDays aria-hidden className={cn(styles.icon(), classNames?.icon)} />\n </Popover.Trigger>\n {name && mode === 'single' && value && <input type=\"hidden\" name={name} value={iso(value as Date)} />}\n {name && mode === 'range' && value && (\n <>\n <input type=\"hidden\" name={`${name}[from]`} value={iso((value as DateRange).from)} />\n {(value as DateRange).to && <input type=\"hidden\" name={`${name}[to]`} value={iso((value as DateRange).to!)} />}\n </>\n )}\n <Popover.Content\n ref={popupRef}\n side={side}\n align={align}\n sideOffset={6}\n initialFocus={() => popupRef.current?.querySelector<HTMLElement>('button[data-day][tabindex=\"0\"]') ?? true}\n className={cn(styles.popup(), classNames?.popup)}\n >\n {mode === 'range' ? (\n <Calendar mode=\"range\" value={value as DateRange | null} onValueChange={change} {...calendarProps} />\n ) : (\n <Calendar value={value as Date | null} onValueChange={change} {...calendarProps} />\n )}\n </Popover.Content>\n </Popover.Root>\n );\n}\n","import { tv } from '../../lib/tv';\nimport { popupMotion, popupSurface } from '../popover/popover.styles';\n\nexport const comboboxStyles = tv({\n slots: {\n inputGroup: [\n 'squircle relative flex w-full cursor-text items-center border border-input-border bg-input text-sm text-foreground',\n 'transition-[border-color] duration-[var(--cui-duration-fast)] ease-ui',\n 'focus-within:border-accent has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50',\n 'has-[[aria-invalid=true]]:border-danger',\n ],\n // no h-full: a percentage of the min-height group doesn't resolve and blocks the stretch, which left\n // the text at the top; self-stretch (single) or h-6 (chips) sizes it instead\n input: 'min-w-12 flex-1 self-center bg-transparent outline-none placeholder:text-muted disabled:cursor-not-allowed',\n actions: 'flex shrink-0 items-center gap-0.5',\n action: [\n 'flex size-6 shrink-0 cursor-default items-center justify-center rounded-chip text-muted outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] hover:text-foreground focus-visible:text-foreground',\n 'data-[popup-open]:text-foreground [&_svg]:size-4',\n ],\n chips: 'flex min-w-0 flex-1 flex-wrap items-center gap-1',\n chip: [\n 'squircle inline-flex h-6 max-w-full cursor-default items-center gap-0.5 rounded-chip bg-surface-2 ps-2 pe-0.5 text-xs font-medium text-foreground outline-none',\n 'focus:bg-accent-soft focus:text-accent-soft-foreground',\n ],\n chipRemove: [\n 'flex size-5 shrink-0 cursor-default items-center justify-center rounded-[calc(var(--radius-chip)*0.75)] text-muted outline-none',\n 'hover:text-foreground [&_svg]:size-3',\n ],\n positioner: 'z-50 outline-none',\n popup: [\n popupSurface,\n popupMotion,\n 'w-(--anchor-width) max-w-(--available-width) max-h-[min(var(--available-height),22rem)] overflow-y-auto overscroll-contain rounded-control p-1 text-sm',\n ],\n list: 'outline-none data-[empty]:p-0',\n item: [\n 'squircle relative flex min-h-8 cursor-default items-center gap-2 rounded-item py-1.5 ps-2.5 pe-8 outline-none select-none',\n 'data-[highlighted]:bg-hover data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n 'data-[selected]:font-medium data-[selected]:text-accent-soft-foreground',\n '[&_svg]:size-4 [&_svg]:shrink-0 [&>svg]:text-muted',\n ],\n itemIndicator: 'absolute end-2.5 flex text-accent-soft-foreground [&_svg]:size-4',\n empty: 'px-3 py-5 text-center text-sm text-muted empty:p-0',\n group: 'not-last:mb-1',\n groupLabel: 'px-2.5 pt-2 pb-1 text-xs font-medium text-muted',\n separator: 'mx-1 my-1 h-px bg-border',\n },\n variants: {\n size: {\n sm: { inputGroup: 'min-h-control-sm rounded-control-sm gap-1.5 ps-2.5 pe-1' },\n md: { inputGroup: 'min-h-control rounded-control gap-2 ps-3.5 pe-1.5' },\n lg: { inputGroup: 'min-h-control-lg rounded-control-lg gap-2 ps-4 pe-2 text-base' },\n },\n multiple: {\n true: { inputGroup: 'py-1 ps-1.5', input: 'h-6 ps-1' },\n false: { input: 'self-stretch' },\n },\n },\n defaultVariants: { size: 'md', multiple: false },\n});\n","import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\nimport { Check, ChevronsUpDown, X } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { comboboxStyles } from './combobox.styles';\n\ntype Size = VariantProps<typeof comboboxStyles>['size'];\nconst styles = comboboxStyles();\ntype Props<C extends React.ElementType> = Omit<React.ComponentPropsWithRef<C>, 'className'> & { className?: string };\n\nconst SizeContext = React.createContext<{ size: Size; multiple: boolean }>({ size: 'md', multiple: false });\n\n/** The field around the input, trigger, clear button and chips; the popup is anchored to it. */\nfunction ComboboxInputGroup({ className, size, multiple = false, ...props }: Props<typeof BaseCombobox.InputGroup> & { size?: Size; multiple?: boolean }) {\n return (\n <SizeContext value={{ size, multiple }}>\n <BaseCombobox.InputGroup className={cn(comboboxStyles({ size, multiple }).inputGroup(), className)} {...props} />\n </SizeContext>\n );\n}\n\nfunction ComboboxInput({ className, ...props }: Props<typeof BaseCombobox.Input>) {\n const { multiple } = React.useContext(SizeContext);\n return <BaseCombobox.Input className={cn(comboboxStyles({ multiple }).input(), className)} {...props} />;\n}\n\n/** Holds the clear and open buttons at the end of the field. */\nconst ComboboxActions = ({ className, ...props }: React.ComponentPropsWithRef<'div'>) => (\n <div className={cn(styles.actions(), className)} {...props} />\n);\n\nfunction ComboboxTrigger({ className, children, ...props }: Props<typeof BaseCombobox.Trigger>) {\n return (\n <BaseCombobox.Trigger aria-label=\"Open list\" className={cn(styles.action(), className)} {...props}>\n {children ?? <ChevronsUpDown />}\n </BaseCombobox.Trigger>\n );\n}\n\nfunction ComboboxClear({ className, children, ...props }: Props<typeof BaseCombobox.Clear>) {\n return (\n <BaseCombobox.Clear aria-label=\"Clear\" className={cn(styles.action(), className)} {...props}>\n {children ?? <X />}\n </BaseCombobox.Clear>\n );\n}\n\nfunction ComboboxChips({ className, ...props }: Props<typeof BaseCombobox.Chips>) {\n return <BaseCombobox.Chips className={cn(styles.chips(), className)} {...props} />;\n}\n\n/** A picked value in multiple mode, with a remove button. Backspace/Delete removes a focused chip. */\nfunction ComboboxChip({ className, children, removeLabel = 'Remove', ...props }: Props<typeof BaseCombobox.Chip> & { removeLabel?: string }) {\n return (\n <BaseCombobox.Chip className={cn(styles.chip(), className)} {...props}>\n <span className=\"truncate\">{children}</span>\n <BaseCombobox.ChipRemove aria-label={removeLabel} className={styles.chipRemove()}>\n <X />\n </BaseCombobox.ChipRemove>\n </BaseCombobox.Chip>\n );\n}\n\n/** The popup: portal + positioner + popup in one. Put `Combobox.Empty` and `Combobox.List` inside. */\nfunction ComboboxContent({\n className,\n sideOffset = 6,\n align = 'start',\n ...props\n}: Props<typeof BaseCombobox.Popup> & { sideOffset?: number; align?: 'start' | 'center' | 'end' }) {\n return (\n <BaseCombobox.Portal>\n <BaseCombobox.Positioner sideOffset={sideOffset} align={align} className={styles.positioner()}>\n <BaseCombobox.Popup className={cn(styles.popup(), className)} {...props} />\n </BaseCombobox.Positioner>\n </BaseCombobox.Portal>\n );\n}\n\nfunction ComboboxList({ className, ...props }: Props<typeof BaseCombobox.List>) {\n return <BaseCombobox.List className={cn(styles.list(), className)} {...props} />;\n}\n\nfunction ComboboxItem({ className, children, ...props }: Props<typeof BaseCombobox.Item>) {\n return (\n <BaseCombobox.Item className={cn(styles.item(), className)} {...props}>\n {children}\n <BaseCombobox.ItemIndicator className={styles.itemIndicator()}>\n <Check />\n </BaseCombobox.ItemIndicator>\n </BaseCombobox.Item>\n );\n}\n\nfunction ComboboxEmpty({ className, ...props }: Props<typeof BaseCombobox.Empty>) {\n return <BaseCombobox.Empty className={cn(styles.empty(), className)} {...props} />;\n}\n\nfunction ComboboxGroup({ className, ...props }: Props<typeof BaseCombobox.Group>) {\n return <BaseCombobox.Group className={cn(styles.group(), className)} {...props} />;\n}\n\nfunction ComboboxGroupLabel({ className, ...props }: Props<typeof BaseCombobox.GroupLabel>) {\n return <BaseCombobox.GroupLabel className={cn(styles.groupLabel(), className)} {...props} />;\n}\n\nfunction ComboboxSeparator({ className, ...props }: Props<typeof BaseCombobox.Separator>) {\n return <BaseCombobox.Separator className={cn(styles.separator(), className)} {...props} />;\n}\n\n/* ------------------------------------------------------------------------------------------ */\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n icon?: React.ReactNode;\n disabled?: boolean;\n}\n\nexport interface ComboboxGroupData {\n label: string;\n items: ComboboxOption[];\n}\n\ninterface ComboboxBaseProps {\n /** Options as strings, `{ value, label }` objects, or groups `{ label, items }`. */\n items: (string | ComboboxOption)[] | ComboboxGroupData[];\n placeholder?: string;\n /** Shown when nothing matches the typed text. @default 'No results.' */\n emptyText?: React.ReactNode;\n size?: Size;\n disabled?: boolean;\n required?: boolean;\n /** Submit the value with a form. */\n name?: string;\n id?: string;\n 'aria-label'?: string;\n className?: string;\n classNames?: { inputGroup?: string; input?: string; popup?: string; item?: string; chip?: string };\n}\n\nexport interface ComboboxSingleProps extends ComboboxBaseProps {\n multiple?: false;\n value?: string | null;\n defaultValue?: string | null;\n onValueChange?: (value: string | null) => void;\n /** Show a button that clears the value. @default true */\n clearable?: boolean;\n}\n\nexport interface ComboboxMultipleProps extends ComboboxBaseProps {\n multiple: true;\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (value: string[]) => void;\n clearable?: boolean;\n}\n\nexport type ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;\n\nconst isGroups = (items: ComboboxProps['items']): items is ComboboxGroupData[] =>\n items.length > 0 && typeof items[0] === 'object' && 'items' in (items[0] as object);\nconst toOption = (o: string | ComboboxOption): ComboboxOption => (typeof o === 'string' ? { value: o, label: o } : o);\n\n/**\n * A select you can type into to filter.\n * <Combobox items={['Gothic 1', 'Gothic 2']} placeholder=\"Pick a game\" />\n * <Combobox multiple items={…} /> // picked values become chips\n * Compound: Combobox.Root / InputGroup / Input / Actions / Trigger / Clear / Chips / Chip / Value /\n * Content / Empty / List / Item / Group / GroupLabel / Collection / Separator.\n */\nfunction ComboboxSimple(props: ComboboxProps) {\n const {\n items,\n placeholder,\n emptyText = 'No results.',\n size,\n multiple = false,\n clearable = !multiple,\n className,\n classNames,\n id,\n 'aria-label': ariaLabel,\n value,\n defaultValue,\n onValueChange,\n ...root\n } = props;\n\n const { collection, labels, grouped } = React.useMemo(() => {\n const groups = isGroups(items) ? items : null;\n const flat = groups ? groups.flatMap((g) => g.items) : (items as (string | ComboboxOption)[]).map(toOption);\n const data = groups ?? flat;\n return {\n grouped: !!groups,\n labels: new Map(flat.map((o) => [o.value, o])),\n collection: BaseCombobox.createItems(data as ComboboxOption[], {\n getValue: (o: ComboboxOption) => o.value,\n getLabel: (o: ComboboxOption) => o.label,\n }),\n };\n }, [items]);\n\n const renderItem = (o: ComboboxOption) => (\n <ComboboxItem key={o.value} value={o.value} disabled={o.disabled} className={classNames?.item}>\n {o.icon}\n {o.label}\n </ComboboxItem>\n );\n\n const input = (extra?: { placeholder?: string }) => (\n <ComboboxInput id={id} aria-label={ariaLabel} placeholder={placeholder} className={classNames?.input} {...extra} />\n );\n\n return (\n <BaseCombobox.Root\n items={collection}\n multiple={multiple}\n value={value as never}\n defaultValue={defaultValue as never}\n onValueChange={onValueChange as never}\n {...root}\n >\n <ComboboxInputGroup size={size} multiple={multiple} className={cn(classNames?.inputGroup, className)}>\n {multiple ? (\n <BaseCombobox.Value>\n {(picked: string[]) => (\n <ComboboxChips>\n {picked.map((v) => (\n <ComboboxChip key={v} removeLabel={`Remove ${labels.get(v)?.label ?? v}`} className={classNames?.chip}>\n {labels.get(v)?.label ?? v}\n </ComboboxChip>\n ))}\n {input({ placeholder: picked.length ? undefined : placeholder })}\n </ComboboxChips>\n )}\n </BaseCombobox.Value>\n ) : (\n input()\n )}\n <ComboboxActions>\n {clearable && <ComboboxClear />}\n <ComboboxTrigger />\n </ComboboxActions>\n </ComboboxInputGroup>\n <ComboboxContent className={classNames?.popup}>\n <ComboboxEmpty>{emptyText}</ComboboxEmpty>\n <ComboboxList>\n {grouped\n ? (group: ComboboxGroupData) => (\n <ComboboxGroup key={group.label} items={group.items}>\n <ComboboxGroupLabel>{group.label}</ComboboxGroupLabel>\n <BaseCombobox.Collection>{renderItem}</BaseCombobox.Collection>\n </ComboboxGroup>\n )\n : renderItem}\n </ComboboxList>\n </ComboboxContent>\n </BaseCombobox.Root>\n );\n}\n\nexport const Combobox = Object.assign(ComboboxSimple, {\n Root: BaseCombobox.Root,\n InputGroup: ComboboxInputGroup,\n Input: ComboboxInput,\n Actions: ComboboxActions,\n Trigger: ComboboxTrigger,\n Clear: ComboboxClear,\n Chips: ComboboxChips,\n Chip: ComboboxChip,\n Value: BaseCombobox.Value,\n Content: ComboboxContent,\n Empty: ComboboxEmpty,\n List: ComboboxList,\n Item: ComboboxItem,\n Group: ComboboxGroup,\n GroupLabel: ComboboxGroupLabel,\n Collection: BaseCombobox.Collection,\n Separator: ComboboxSeparator,\n useFilter: BaseCombobox.useFilter,\n createItems: BaseCombobox.createItems,\n});\n","import { tv } from '../../lib/tv';\nimport { backdropStyles, popupSurface } from '../popover/popover.styles';\n\nexport const commandStyles = tv({\n slots: {\n root: 'squircle flex w-full flex-col overflow-hidden rounded-card border border-border bg-popover text-foreground',\n inputWrap: 'flex shrink-0 items-center gap-2.5 border-b border-border px-4 text-muted [&>svg]:size-4 [&>svg]:shrink-0',\n input: 'h-12 min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted',\n list: 'max-h-80 overflow-y-auto overscroll-contain p-1.5 scroll-py-1.5 outline-none empty:hidden',\n empty: 'px-4 py-10 text-center text-sm text-muted empty:p-0',\n loading: 'flex items-center justify-center gap-2.5 px-4 py-10 text-sm text-muted',\n group: 'not-last:mb-1',\n groupLabel: 'px-2.5 pt-2 pb-1 text-xs font-medium text-muted select-none',\n item: [\n 'squircle flex min-h-9 cursor-default items-center gap-2.5 rounded-item px-2.5 py-1.5 text-sm outline-none select-none',\n 'scroll-my-1.5 data-[highlighted]:bg-hover data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n '[&_svg]:size-4 [&_svg]:shrink-0 [&>svg]:text-muted',\n ],\n itemContent: 'flex min-w-0 flex-1 flex-col gap-0.5 py-0.5',\n itemBreadcrumbs: 'flex min-w-0 items-center gap-1 text-xs text-muted [&>svg]:size-3! [&>svg]:shrink-0 [&>span]:truncate',\n itemTitle: 'truncate text-sm text-foreground',\n itemDescription: 'line-clamp-2 text-xs text-muted',\n highlight: 'bg-accent-soft text-accent-soft-foreground',\n jump: 'text-muted',\n jumpTarget: 'font-medium text-foreground',\n jumpKey: 'invisible ms-auto ps-4 in-data-[highlighted]:visible',\n shortcut: 'ms-auto ps-4',\n separator: 'mx-1 my-1.5 h-px bg-border',\n footer: 'flex shrink-0 items-center justify-end gap-4 border-t border-border px-4 py-2.5 text-xs text-muted [&>span]:inline-flex [&>span]:items-center [&>span]:gap-1.5',\n hint: 'inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap',\n filters: 'flex min-w-0 flex-1 items-start gap-2',\n filterList: 'flex min-w-0 flex-1 flex-wrap items-center gap-1',\n filterTrigger: [\n 'squircle inline-flex h-7 max-w-full items-center gap-1.5 rounded-chip border border-transparent px-2 text-xs text-muted outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui hover:bg-hover hover:text-foreground',\n 'focus-visible:border-ring data-[popup-open]:bg-hover data-[popup-open]:text-foreground [&>svg]:size-3.5 [&>svg]:shrink-0',\n ],\n filterTriggerActive: 'bg-accent-soft text-accent-soft-foreground hover:bg-accent-soft hover:text-accent-soft-foreground data-[popup-open]:bg-accent-soft data-[popup-open]:text-accent-soft-foreground',\n filterLabel: 'opacity-75',\n filterValue: 'truncate font-medium',\n filterOption: 'flex min-w-0 flex-col',\n filterOptionDescription: 'text-xs text-muted',\n clear: [\n 'squircle inline-flex h-7 shrink-0 items-center gap-1.5 rounded-chip border border-transparent px-2 text-xs whitespace-nowrap text-muted outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui hover:bg-hover hover:text-foreground focus-visible:border-ring [&>svg]:size-3.5',\n ],\n backdrop: backdropStyles,\n dialog: [\n popupSurface,\n 'fixed top-[12vh] left-1/2 z-50 flex max-h-[76vh] w-[calc(100vw-2rem)] max-w-xl -translate-x-1/2 flex-col overflow-hidden rounded-card',\n 'origin-top transition-[opacity,scale] duration-[var(--cui-duration-normal)] ease-ui',\n 'data-[starting-style]:scale-96 data-[starting-style]:opacity-0 data-[ending-style]:scale-96 data-[ending-style]:opacity-0',\n ],\n },\n});\n","import { Autocomplete } from '@base-ui/react/autocomplete';\nimport { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport { Menu } from '@base-ui/react/menu';\nimport { ArrowRight, ChevronDown, ChevronRight, Search, X } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport { Kbd, KbdGroup } from '../kbd/kbd';\nimport { Spinner } from '../spinner/spinner';\nimport { commandStyles } from './command.styles';\n\nconst styles = commandStyles();\ntype Props<C extends React.ElementType> = Omit<React.ComponentPropsWithRef<C>, 'className'> & { className?: string };\n\n/** Lets Command.Dialog close itself when an item runs. */\nconst CommandContext = React.createContext<{ onItemSelect?: () => void }>({});\n/** The typed text, so `Command.Highlight` can mark matches without being told the query. */\nconst CommandSearchContext = React.createContext('');\n\ntype AutocompleteRootProps = React.ComponentProps<typeof Autocomplete.Root>;\n\nexport interface CommandRootProps\n extends Pick<AutocompleteRootProps, 'items' | 'filter' | 'filteredItems' | 'itemToStringValue' | 'limit' | 'loopFocus'> {\n /** The typed text (controlled). */\n search?: string;\n defaultSearch?: string;\n onSearchChange?: (search: string) => void;\n className?: string;\n children?: React.ReactNode;\n 'aria-label'?: string;\n}\n\n/**\n * The palette: an always-open list filtered by the input. Arrow keys move, Enter runs the item.\n * Pass `items` (flat or `{ label, items }` groups) and render them with `Command.List`, or render\n * `Command.Item`s yourself and filter them by passing `filteredItems`.\n */\nfunction CommandRoot({\n search,\n defaultSearch = '',\n onSearchChange,\n className,\n children,\n itemToStringValue,\n 'aria-label': ariaLabel,\n ...props\n}: CommandRootProps) {\n const [inner, setInner] = React.useState(defaultSearch);\n const value = search ?? inner;\n return (\n <CommandSearchContext value={value}>\n <div role=\"group\" aria-label={ariaLabel} className={cn(styles.root(), className)}>\n <Autocomplete.Root\n inline\n open\n autoHighlight=\"always\"\n keepHighlight\n itemToStringValue={itemToStringValue ?? ((item: unknown) => (item as { label?: string }).label ?? String(item))}\n value={value}\n onValueChange={(next, details) => {\n // running an item must not write its label into the search field\n if (details.reason === 'item-press') return;\n setInner(next);\n onSearchChange?.(next);\n }}\n {...props}\n >\n {children}\n </Autocomplete.Root>\n </div>\n </CommandSearchContext>\n );\n}\n\nfunction CommandInput({ className, ...props }: Props<typeof Autocomplete.Input>) {\n return (\n <div className={styles.inputWrap()}>\n <Search aria-hidden />\n <Autocomplete.Input className={cn(styles.input(), className)} {...props} />\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: Props<typeof Autocomplete.List>) {\n return <Autocomplete.List className={cn(styles.list(), className)} {...props} />;\n}\n\nfunction CommandEmpty({ className, ...props }: Props<typeof Autocomplete.Empty>) {\n return <Autocomplete.Empty className={cn(styles.empty(), className)} {...props} />;\n}\n\nfunction CommandGroup({ className, ...props }: Props<typeof Autocomplete.Group>) {\n return <Autocomplete.Group className={cn(styles.group(), className)} {...props} />;\n}\n\nfunction CommandGroupLabel({ className, ...props }: Props<typeof Autocomplete.GroupLabel>) {\n return <Autocomplete.GroupLabel className={cn(styles.groupLabel(), className)} {...props} />;\n}\n\nfunction CommandSeparator({ className, ...props }: Props<typeof Autocomplete.Separator>) {\n return <Autocomplete.Separator className={cn(styles.separator(), className)} {...props} />;\n}\n\nexport interface CommandItemProps extends Props<typeof Autocomplete.Item> {\n /** Runs on click and on Enter. */\n onSelect?: () => void;\n}\n\nfunction CommandItem({ className, onSelect, onClick, ...props }: CommandItemProps) {\n const { onItemSelect } = React.useContext(CommandContext);\n return (\n <Autocomplete.Item\n className={cn(styles.item(), className)}\n onClick={(e) => {\n onClick?.(e);\n onSelect?.();\n onItemSelect?.();\n }}\n {...props}\n />\n );\n}\n\n/** Keys at the end of an item: `<Command.Shortcut keys=\"Ctrl+G\" />` or `keys={['Ctrl', 'G']}`. */\nfunction CommandShortcut({ keys, className, ...props }: React.ComponentPropsWithRef<'span'> & { keys: string | string[] }) {\n const list = Array.isArray(keys) ? keys : keys.split('+');\n return (\n <KbdGroup aria-hidden className={cn(styles.shortcut(), className)} {...props}>\n {list.map((k) => (\n <Kbd key={k}>{k}</Kbd>\n ))}\n </KbdGroup>\n );\n}\n\n/** A strip under the list for hints (`↑↓ to move`, `Enter to run`). */\nfunction CommandFooter({ className, ...props }: React.ComponentPropsWithRef<'div'>) {\n return <div className={cn(styles.footer(), className)} {...props} />;\n}\n\n/** Shown instead of the list while results load (`role=\"status\"`). */\nfunction CommandLoading({ className, children = 'Searching…', ...props }: React.ComponentPropsWithRef<'div'>) {\n return (\n <div role=\"status\" className={cn(styles.loading(), className)} {...props}>\n <Spinner size=\"sm\" tone=\"muted\" aria-hidden aria-label={undefined} role={undefined} />\n {children}\n </div>\n );\n}\n\n/** Stacks a breadcrumb line, a title and a description inside an item. */\nfunction CommandItemContent({ className, ...props }: React.ComponentPropsWithRef<'span'>) {\n return <span className={cn(styles.itemContent(), className)} {...props} />;\n}\n\nexport interface CommandItemBreadcrumbsProps extends Omit<React.ComponentPropsWithRef<'span'>, 'children'> {\n /** The path above the title, e.g. `['Components', 'Button']`. */\n items: React.ReactNode[];\n}\n\n/** The small section / path line above an item's title. */\nfunction CommandItemBreadcrumbs({ items, className, ...props }: CommandItemBreadcrumbsProps) {\n return (\n <span className={cn(styles.itemBreadcrumbs(), className)} {...props}>\n {items.map((item, i) => (\n <React.Fragment key={i}>\n {i > 0 && <ChevronRight aria-hidden />}\n <span>{item}</span>\n </React.Fragment>\n ))}\n </span>\n );\n}\n\nfunction CommandItemTitle({ className, ...props }: React.ComponentPropsWithRef<'span'>) {\n return <span className={cn(styles.itemTitle(), className)} {...props} />;\n}\n\nfunction CommandItemDescription({ className, ...props }: React.ComponentPropsWithRef<'span'>) {\n return <span className={cn(styles.itemDescription(), className)} {...props} />;\n}\n\nconst escapeRegExp = (s: string) => s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n/** Splits `text` into parts, `match: true` for every piece that matches a word of `query`. */\nexport function highlightParts(text: string, query: string): { text: string; match: boolean }[] {\n const words = query.trim().split(/\\s+/).filter(Boolean).map(escapeRegExp);\n if (!words.length || !text) return [{ text, match: false }];\n const re = new RegExp(`(${words.sort((a, b) => b.length - a.length).join('|')})`, 'gi');\n return text\n .split(re)\n .filter(Boolean)\n .map((part) => ({ text: part, match: words.some((w) => new RegExp(`^${w}$`, 'i').test(part)) }));\n}\n\nexport interface CommandHighlightProps extends Omit<React.ComponentPropsWithRef<'span'>, 'children'> {\n text: string;\n /** The words to mark. @default the text typed into the palette */\n query?: string;\n classNames?: { mark?: string };\n}\n\n/** The text with every match of the query wrapped in `<mark>`. */\nfunction CommandHighlight({ text, query, className, classNames, ...props }: CommandHighlightProps) {\n const typed = React.useContext(CommandSearchContext);\n return (\n <span className={className} {...props}>\n {highlightParts(text, query ?? typed).map((part, i) =>\n part.match ? (\n <mark key={i} className={cn(styles.highlight(), classNames?.mark)}>\n {part.text}\n </mark>\n ) : (\n <React.Fragment key={i}>{part.text}</React.Fragment>\n ),\n )}\n </span>\n );\n}\n\nexport interface CommandJumpItemProps extends CommandItemProps {\n /** The words before the target. @default 'Jump to' */\n label?: React.ReactNode;\n}\n\n/** A quick action at the top of the list: `Jump to <target>`, with an Enter hint when highlighted. */\nfunction CommandJumpItem({ label = 'Jump to', children, className, ...props }: CommandJumpItemProps) {\n return (\n <CommandItem className={cn(styles.jump(), className)} {...props}>\n <ArrowRight aria-hidden />\n <span className=\"min-w-0 truncate\">\n {label} <span className={styles.jumpTarget()}>{children}</span>\n </span>\n <Kbd aria-hidden className={styles.jumpKey()}>\n Enter\n </Kbd>\n </CommandItem>\n );\n}\n\nexport interface CommandHintProps extends Omit<React.ComponentPropsWithRef<'span'>, 'children'> {\n /** Keys, e.g. `['↑', '↓']` or `'Enter'`. */\n keys: string | string[];\n /** What the keys do, e.g. `'to move'`. */\n children?: React.ReactNode;\n}\n\n/** A key hint for the footer: `<Command.Hint keys=\"Enter\">to open</Command.Hint>`. */\nfunction CommandHint({ keys, children, className, ...props }: CommandHintProps) {\n const list = Array.isArray(keys) ? keys : [keys];\n return (\n <span className={cn(styles.hint(), className)} {...props}>\n {list.map((k) => (\n <Kbd key={k}>{k}</Kbd>\n ))}\n {children}\n </span>\n );\n}\n\nexport interface CommandFilterOption {\n value: string;\n label: string;\n description?: string;\n disabled?: boolean;\n}\n\nexport interface CommandFilterProps {\n /** Name shown before the value, e.g. `'Section'`. */\n label: string;\n options: CommandFilterOption[];\n value?: string;\n /** The value that means \"not filtered\", shown plainly. @default the first option */\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n className?: string;\n classNames?: { trigger?: string; content?: string; option?: string };\n}\n\n/** One filter in the footer: a small `Label: value` button opening a radio menu. */\nfunction CommandFilter({ label, options, value, defaultValue, onValueChange, className, classNames }: CommandFilterProps) {\n const base = defaultValue ?? options[0]?.value;\n const current = options.find((o) => o.value === (value ?? base)) ?? options[0];\n const active = current !== undefined && current.value !== base;\n return (\n <Menu.Root>\n <Menu.Trigger\n aria-label={`${label}: ${current?.label ?? ''}`}\n className={cn(styles.filterTrigger(), active && styles.filterTriggerActive(), classNames?.trigger, className)}\n >\n <span className={styles.filterLabel()}>{label}:</span>\n <span className={styles.filterValue()}>{current?.label}</span>\n <ChevronDown aria-hidden />\n </Menu.Trigger>\n <DropdownMenu.Content align=\"start\" side=\"top\" className={classNames?.content}>\n <DropdownMenu.RadioGroup value={current?.value} onValueChange={(next: string) => onValueChange?.(next)}>\n {options.map((o) => (\n <DropdownMenu.RadioItem key={o.value} value={o.value} disabled={o.disabled} closeOnClick className={classNames?.option}>\n <span className={styles.filterOption()}>\n <span>{o.label}</span>\n {o.description && <span className={styles.filterOptionDescription()}>{o.description}</span>}\n </span>\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n </DropdownMenu.Content>\n </Menu.Root>\n );\n}\n\nexport interface CommandFiltersProps extends React.ComponentPropsWithRef<'div'> {\n /** Called by the \"Clear filters\" button. Leave out to hide the button. */\n onClear?: () => void;\n /** Whether any filter is set; the button is visible only then, but its place is always kept. */\n canClear?: boolean;\n /** @default 'Clear filters' */\n clearLabel?: React.ReactNode;\n classNames?: { list?: string; clear?: string };\n}\n\n/**\n * The filter row. Filters wrap onto more lines when narrow; \"Clear filters\" sits in its own slot at the\n * end that never wraps and keeps its space when hidden, so setting a filter never moves anything.\n */\nfunction CommandFilters({ onClear, canClear = false, clearLabel = 'Clear filters', className, classNames, children, ...props }: CommandFiltersProps) {\n return (\n <div role=\"group\" aria-label=\"Filters\" className={cn(styles.filters(), className)} {...props}>\n <div className={cn(styles.filterList(), classNames?.list)}>{children}</div>\n {onClear && (\n <button\n type=\"button\"\n onClick={onClear}\n aria-hidden={!canClear}\n tabIndex={canClear ? undefined : -1}\n disabled={!canClear}\n className={cn(styles.clear(), !canClear && 'invisible', classNames?.clear)}\n >\n <X aria-hidden />\n {clearLabel}\n </button>\n )}\n </div>\n );\n}\n\n/* ------------------------------------------------------------------------------------------ */\n\nexport interface CommandItemData {\n value: string;\n label: string;\n icon?: React.ReactNode;\n /** Shown as Kbd keys, e.g. `'Ctrl+G'`. */\n shortcut?: string | string[];\n /** Extra words that match the search (e.g. `['invincible']` for God mode). */\n keywords?: string[];\n /** A second line under the label. */\n description?: string;\n /** A path line above the label, e.g. `['Player']`. */\n breadcrumbs?: string[];\n disabled?: boolean;\n onSelect?: () => void;\n}\n\nexport interface CommandGroupData {\n label: string;\n items: CommandItemData[];\n}\n\nexport interface CommandProps extends Omit<CommandRootProps, 'items' | 'children'> {\n /** Groups of commands. */\n groups: CommandGroupData[];\n placeholder?: string;\n /** Shown when nothing matches. @default 'No results.' */\n emptyText?: React.ReactNode;\n /** Content under the list (key hints, `Command.Filters`). */\n footer?: React.ReactNode;\n /** Show `Command.Loading` instead of the list. */\n loading?: boolean;\n /** @default 'Searching…' */\n loadingText?: React.ReactNode;\n classNames?: { root?: string; input?: string; list?: string; item?: string };\n}\n\nconst matches = (item: unknown, query: string) => {\n const it = item as CommandItemData;\n const q = query.trim().toLowerCase();\n if (!q) return true;\n return [it.label, it.description ?? '', ...(it.keywords ?? [])].some((s) => s.toLowerCase().includes(q));\n};\n\n/**\n * A command palette.\n * <Command groups={[{ label: 'Player', items: [{ value: 'god', label: 'God mode', shortcut: 'Ctrl+G' }] }]} />\n * In a modal: <Command.Dialog open={open} onOpenChange={setOpen} groups={…} />.\n * Compound: Command.Root / Input / List / Empty / Loading / Group / GroupLabel / Collection / Item /\n * ItemContent / ItemBreadcrumbs / ItemTitle / ItemDescription / Highlight / JumpItem / Shortcut /\n * Separator / Footer / Hint / Filters / Filter.\n */\nfunction CommandSimple({\n groups,\n placeholder = 'Type a command or search…',\n emptyText = 'No results.',\n footer,\n loading = false,\n loadingText,\n className,\n classNames,\n filter,\n ...props\n}: CommandProps) {\n return (\n <CommandRoot items={loading ? [] : groups} filter={filter ?? matches} className={cn(classNames?.root, className)} {...props}>\n <CommandInput placeholder={placeholder} aria-label={props['aria-label'] ?? 'Search commands'} className={classNames?.input} />\n {loading ? <CommandLoading>{loadingText}</CommandLoading> : <CommandEmpty>{emptyText}</CommandEmpty>}\n <CommandList className={classNames?.list}>\n {(group: CommandGroupData) => (\n <CommandGroup key={group.label} items={group.items}>\n <CommandGroupLabel>{group.label}</CommandGroupLabel>\n <Autocomplete.Collection>\n {(item: CommandItemData) => (\n <CommandItem key={item.value} value={item} disabled={item.disabled} onSelect={item.onSelect} className={classNames?.item}>\n {item.icon}\n {item.description || item.breadcrumbs ? (\n <CommandItemContent>\n {item.breadcrumbs && <CommandItemBreadcrumbs items={item.breadcrumbs} />}\n <CommandHighlight text={item.label} className={styles.itemTitle()} />\n {item.description && (\n <CommandItemDescription>\n <CommandHighlight text={item.description} />\n </CommandItemDescription>\n )}\n </CommandItemContent>\n ) : (\n <CommandHighlight text={item.label} className=\"truncate\" />\n )}\n {item.shortcut && <CommandShortcut keys={item.shortcut} />}\n </CommandItem>\n )}\n </Autocomplete.Collection>\n </CommandGroup>\n )}\n </CommandList>\n {footer && <CommandFooter>{footer}</CommandFooter>}\n </CommandRoot>\n );\n}\n\nexport interface CommandDialogProps extends Partial<CommandProps> {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** The element that opens the palette. */\n trigger?: React.ReactElement;\n /** A handle from `Dialog.createHandle()`, so triggers elsewhere in the app (`<Dialog.Trigger handle>`) open it. */\n handle?: BaseDialog.Handle<unknown>;\n /** Accessible name of the dialog. @default 'Command palette' */\n title?: string;\n /** Close the dialog after an item runs. @default true */\n closeOnSelect?: boolean;\n /** Your own `Command.Root` content instead of `groups`. */\n children?: React.ReactNode;\n}\n\n/** The palette in a modal, positioned high on the screen like Spotlight. */\nfunction CommandDialog({\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n trigger,\n handle,\n title = 'Command palette',\n closeOnSelect = true,\n children,\n groups,\n className,\n ...props\n}: CommandDialogProps) {\n const [inner, setInner] = React.useState(defaultOpen);\n const open = openProp ?? inner;\n const setOpen = (next: boolean) => {\n setInner(next);\n onOpenChange?.(next);\n };\n return (\n <BaseDialog.Root open={open} onOpenChange={setOpen} handle={handle}>\n {trigger && <BaseDialog.Trigger render={trigger} />}\n <BaseDialog.Portal>\n <BaseDialog.Backdrop className={styles.backdrop()} />\n <BaseDialog.Popup aria-label={title} className={cn(styles.dialog(), className)}>\n <CommandContext value={{ onItemSelect: closeOnSelect ? () => setOpen(false) : undefined }}>\n {children ?? <CommandSimple groups={groups ?? []} className=\"rounded-none border-0\" {...props} />}\n </CommandContext>\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n </BaseDialog.Root>\n );\n}\n\nexport const Command = Object.assign(CommandSimple, {\n Root: CommandRoot,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Group: CommandGroup,\n GroupLabel: CommandGroupLabel,\n Collection: Autocomplete.Collection,\n Item: CommandItem,\n Shortcut: CommandShortcut,\n Separator: CommandSeparator,\n Footer: CommandFooter,\n Loading: CommandLoading,\n ItemContent: CommandItemContent,\n ItemBreadcrumbs: CommandItemBreadcrumbs,\n ItemTitle: CommandItemTitle,\n ItemDescription: CommandItemDescription,\n Highlight: CommandHighlight,\n JumpItem: CommandJumpItem,\n Hint: CommandHint,\n Filters: CommandFilters,\n Filter: CommandFilter,\n Dialog: CommandDialog,\n});\n","import { tv } from '../../lib/tv';\n\nexport const inputOtpStyles = tv({\n slots: {\n root: 'flex items-center gap-2 data-[disabled]:opacity-50',\n group: 'flex items-center gap-1.5',\n slot: [\n // relative + z-index: in joined slots (negative margin) the focused or filled border sits on top\n 'squircle relative border border-input-border bg-input text-center font-mono font-medium text-foreground caret-accent outline-none',\n 'transition-[border-color,scale] duration-[var(--cui-duration-fast)] ease-ui',\n 'placeholder:text-muted/50 data-[filled]:z-[1] data-[filled]:border-border-strong focus:z-[2] focus:border-accent data-[filled]:focus:border-accent',\n 'data-[invalid]:z-[1] data-[invalid]:border-danger disabled:cursor-not-allowed',\n ],\n separator: 'flex shrink-0 items-center justify-center text-muted [&_svg]:size-4',\n },\n variants: {\n size: {\n sm: { slot: 'size-control-sm rounded-control-sm text-sm' },\n md: { slot: 'size-control rounded-control text-base' },\n lg: { slot: 'size-control-lg rounded-control-lg text-lg' },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { OTPField } from '@base-ui/react/otp-field';\nimport { Minus } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { inputOtpStyles } from './input-otp.styles';\n\ntype Size = VariantProps<typeof inputOtpStyles>['size'];\nconst SizeContext = React.createContext<Size>('md');\n\ntype RootProps = React.ComponentPropsWithRef<typeof OTPField.Root>;\n\nexport interface InputOTPRootProps extends Omit<RootProps, 'className'>, VariantProps<typeof inputOtpStyles> {\n className?: string;\n}\n\nfunction InputOTPRoot({ size, className, ...props }: InputOTPRootProps) {\n return (\n <SizeContext value={size}>\n <OTPField.Root className={cn(inputOtpStyles().root(), className)} {...props} />\n </SizeContext>\n );\n}\n\n/** One character box. */\nfunction InputOTPSlot({ className, ...props }: Omit<React.ComponentPropsWithRef<typeof OTPField.Input>, 'className'> & { className?: string }) {\n const size = React.useContext(SizeContext);\n return <OTPField.Input className={cn(inputOtpStyles({ size }).slot(), className)} {...props} />;\n}\n\n/** Slots that sit closer together. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentPropsWithRef<'div'>) {\n return <div className={cn(inputOtpStyles().group(), className)} {...props} />;\n}\n\n/** A dash between groups (or your own children). Announced as a separator. */\nfunction InputOTPSeparator({ className, children, ...props }: Omit<React.ComponentPropsWithRef<typeof OTPField.Separator>, 'className'> & { className?: string }) {\n return (\n <OTPField.Separator className={cn(inputOtpStyles().separator(), className)} {...props}>\n {children ?? <Minus aria-hidden />}\n </OTPField.Separator>\n );\n}\n\nexport interface InputOTPProps extends InputOTPRootProps {\n /** Split the slots into groups with a separator between, e.g. `[3, 3]`. Must add up to `length`. */\n groups?: number[];\n /** What goes between groups. @default a dash */\n separator?: React.ReactNode;\n /** Hint shown in empty slots, one character per slot (e.g. `'•'`). */\n slotPlaceholder?: string;\n classNames?: { root?: string; group?: string; slot?: string; separator?: string };\n}\n\n/**\n * A one-time code field made of single-character slots. Paste, arrows and Backspace work across slots.\n * <InputOTP length={6} groups={[3, 3]} />\n * Compound: InputOTP.Root / Group / Slot / Separator.\n */\nfunction InputOTPSimple({\n length,\n groups = [length],\n separator,\n slotPlaceholder,\n className,\n classNames,\n 'aria-label': ariaLabel,\n ...props\n}: InputOTPProps) {\n const labelId = React.useId();\n let index = 0;\n return (\n <InputOTPRoot length={length} aria-label={ariaLabel} className={cn(classNames?.root, className)} {...props}>\n {/* Base UI names the first slot from a label element, never from `aria-label` */}\n {ariaLabel && (\n <span id={labelId} hidden>\n {ariaLabel}\n </span>\n )}\n {groups.map((count, g) => (\n <React.Fragment key={g}>\n {g > 0 && <InputOTPSeparator className={classNames?.separator}>{separator}</InputOTPSeparator>}\n <InputOTPGroup className={classNames?.group}>\n {Array.from({ length: count }, () => {\n const i = index++;\n return (\n <InputOTPSlot\n key={i}\n placeholder={slotPlaceholder}\n className={classNames?.slot}\n aria-labelledby={i === 0 && ariaLabel ? labelId : undefined}\n aria-label={i === 0 ? undefined : `Character ${i + 1} of ${length}`}\n />\n );\n })}\n </InputOTPGroup>\n </React.Fragment>\n ))}\n </InputOTPRoot>\n );\n}\n\nexport const InputOTP = Object.assign(InputOTPSimple, {\n Root: InputOTPRoot,\n Group: InputOTPGroup,\n Slot: InputOTPSlot,\n Separator: InputOTPSeparator,\n});\n","import { tv } from '../../lib/tv';\nimport { inputStyles } from '../input/input.styles';\n\nexport const nativeSelectStyles = tv({\n slots: {\n root: 'relative inline-flex w-full min-w-0 has-[select:disabled]:opacity-50',\n select: [\n inputStyles(),\n 'cursor-default appearance-none truncate pe-9 disabled:opacity-100',\n '[&_option]:bg-popover [&_option]:text-foreground [&_optgroup]:bg-popover [&_optgroup]:text-muted',\n ],\n icon: 'pointer-events-none absolute end-3 top-1/2 size-4 -translate-y-1/2 text-muted',\n },\n variants: {\n size: {\n sm: { select: 'h-control-sm rounded-control-sm ps-2.5 pe-8 text-sm', icon: 'end-2.5 size-3.5' },\n md: { select: 'h-control rounded-control ps-3.5' },\n lg: { select: 'h-control-lg rounded-control-lg ps-4 pe-10 text-base', icon: 'end-3.5' },\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { ChevronDown } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { nativeSelectStyles } from './native-select.styles';\n\nexport interface NativeSelectOption {\n value: string;\n label: React.ReactNode;\n disabled?: boolean;\n}\n\nexport interface NativeSelectProps\n extends Omit<React.ComponentPropsWithRef<'select'>, 'size'>,\n VariantProps<typeof nativeSelectStyles> {\n /** Options to render; you can pass `<option>` children instead. */\n options?: NativeSelectOption[];\n /** A first, empty option shown while nothing is picked. */\n placeholder?: string;\n classNames?: { root?: string; select?: string; icon?: string };\n}\n\n/**\n * The browser's own `<select>`, styled like Input with a chevron. Best on phones and in long forms.\n * <NativeSelect options={[{ value: 'g1', label: 'Gothic 1' }]} />\n * or with children: `<NativeSelect><NativeSelect.Option value=\"g1\">Gothic 1</NativeSelect.Option></NativeSelect>`.\n */\nfunction NativeSelectRoot({ options, placeholder, size, className, classNames, children, ...props }: NativeSelectProps) {\n const styles = nativeSelectStyles({ size });\n return (\n <span data-slot=\"native-select\" className={cn(styles.root(), classNames?.root, className)}>\n <select className={cn(styles.select(), classNames?.select)} {...props}>\n {placeholder !== undefined && (\n <option value=\"\" disabled hidden>\n {placeholder}\n </option>\n )}\n {options?.map((o) => (\n <option key={o.value} value={o.value} disabled={o.disabled}>\n {o.label}\n </option>\n ))}\n {children}\n </select>\n <ChevronDown aria-hidden className={cn(styles.icon(), classNames?.icon)} />\n </span>\n );\n}\n\nconst NativeSelectOption = (props: React.ComponentPropsWithRef<'option'>) => <option {...props} />;\nconst NativeSelectOptGroup = (props: React.ComponentPropsWithRef<'optgroup'>) => <optgroup {...props} />;\n\nexport const NativeSelect = Object.assign(NativeSelectRoot, {\n Option: NativeSelectOption,\n OptGroup: NativeSelectOptGroup,\n});\n","import { tv } from '../../lib/tv';\n\nexport const menubarStyles = tv({\n slots: {\n root: 'squircle flex w-fit items-center gap-0.5 rounded-control border border-border bg-surface p-1',\n trigger: [\n 'squircle inline-flex h-[calc(var(--cui-control-height)*0.78)] cursor-default items-center gap-1.5 rounded-item px-3 text-sm',\n 'font-[weight:var(--cui-control-weight)] text-foreground outline-none select-none',\n 'hover:bg-hover focus-visible:bg-hover data-[popup-open]:bg-hover data-[pressed]:bg-hover',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4',\n ],\n },\n});\n","import { Menu } from '@base-ui/react/menu';\nimport { Menubar as BaseMenubar } from '@base-ui/react/menubar';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { DropdownMenu, type DropdownMenuEntry, renderMenuEntries } from '../dropdown-menu/dropdown-menu';\nimport { menubarStyles } from './menubar.styles';\n\nconst styles = menubarStyles();\ntype Props<C extends React.ElementType> = Omit<React.ComponentPropsWithRef<C>, 'className'> & { className?: string };\n\nfunction MenubarRoot({ className, ...props }: Props<typeof BaseMenubar>) {\n return <BaseMenubar className={cn(styles.root(), className)} {...props} />;\n}\n\n/** A top-level button of the bar; opens its menu. */\nfunction MenubarTrigger({ className, ...props }: Props<typeof Menu.Trigger>) {\n return <Menu.Trigger className={cn(styles.trigger(), className)} {...props} />;\n}\n\nexport interface MenubarMenuData {\n label: React.ReactNode;\n items: DropdownMenuEntry[];\n disabled?: boolean;\n}\n\nexport interface MenubarProps extends Omit<Props<typeof BaseMenubar>, 'children'> {\n /** The menus, left to right. Items use the Dropdown Menu entry format. */\n menus: MenubarMenuData[];\n classNames?: { root?: string; trigger?: string; popup?: string };\n}\n\n/**\n * A row of menus, like the one at the top of a desktop app. Arrow keys move between menus.\n * <Menubar menus={[{ label: 'File', items: [{ label: 'Save', shortcut: 'Ctrl S' }] }]} />\n * Compound: Menubar.Root / Menu / Trigger / Content / Item / CheckboxItem / RadioGroup / RadioItem /\n * Group / GroupLabel / Separator / Shortcut / Sub / SubTrigger / SubContent (the Dropdown Menu parts).\n */\nfunction MenubarSimple({ menus, className, classNames, ...props }: MenubarProps) {\n return (\n <MenubarRoot className={cn(classNames?.root, className)} {...props}>\n {menus.map((m, i) => (\n <Menu.Root key={i}>\n <MenubarTrigger disabled={m.disabled} className={classNames?.trigger}>\n {m.label}\n </MenubarTrigger>\n <DropdownMenu.Content className={classNames?.popup}>{renderMenuEntries(m.items)}</DropdownMenu.Content>\n </Menu.Root>\n ))}\n </MenubarRoot>\n );\n}\n\nexport const Menubar = Object.assign(MenubarSimple, {\n Root: MenubarRoot,\n Menu: Menu.Root,\n Trigger: MenubarTrigger,\n Content: DropdownMenu.Content,\n Item: DropdownMenu.Item,\n CheckboxItem: DropdownMenu.CheckboxItem,\n RadioGroup: DropdownMenu.RadioGroup,\n RadioItem: DropdownMenu.RadioItem,\n Group: DropdownMenu.Group,\n GroupLabel: DropdownMenu.GroupLabel,\n Separator: DropdownMenu.Separator,\n Shortcut: DropdownMenu.Shortcut,\n Sub: DropdownMenu.Sub,\n SubTrigger: DropdownMenu.SubTrigger,\n SubContent: DropdownMenu.SubContent,\n});\n","import { tv } from '../../lib/tv';\nimport { popupSurface } from '../popover/popover.styles';\n\nconst duration = 'duration-[var(--cui-duration-normal)] ease-ui';\n\nexport const navigationMenuStyles = tv({\n slots: {\n root: 'relative w-fit max-w-full',\n list: 'relative z-0 flex items-center gap-0.5',\n // No `squircle`: it glides by translate/width, which the squircle polyfill would not animate. It takes\n // the native `corner-shape`; where that's missing (Firefox/Zen) a smaller plain radius stands in, so\n // the block reads like the squircle items of the sidebar and menus instead of a pill.\n indicator: [\n 'pointer-events-none absolute top-0 left-0 -z-10 h-full w-(--nav-indicator-width) translate-x-(--nav-indicator-left) bg-hover',\n 'rounded-control-sm squircle-motion',\n `transition-[translate,width,opacity] ${duration} data-[hidden]:opacity-0 data-[instant]:transition-opacity motion-reduce:transition-none`,\n ],\n trigger: [\n 'inline-flex h-control-sm cursor-default items-center gap-1 rounded-control-sm px-3 text-sm whitespace-nowrap',\n 'font-[weight:var(--cui-control-weight)] text-muted no-underline outline-none select-none',\n 'transition-colors duration-[var(--cui-duration-fast)] hover:text-foreground focus-visible:text-foreground',\n 'data-[popup-open]:text-foreground data-[active]:text-foreground aria-[current=page]:text-foreground',\n 'focus-visible:ring-2 focus-visible:ring-ring',\n ],\n icon: `flex size-3.5 transition-transform ${duration} data-[popup-open]:rotate-180 [&_svg]:size-3.5`,\n content: [\n 'w-[calc(100vw-2rem)] p-2 sm:w-max',\n `transition-[opacity,translate] ${duration}`,\n 'data-[starting-style]:opacity-0 data-[ending-style]:opacity-0',\n 'data-[starting-style]:data-[activation-direction=left]:-translate-x-1/3',\n 'data-[starting-style]:data-[activation-direction=right]:translate-x-1/3',\n 'data-[ending-style]:data-[activation-direction=left]:translate-x-1/3',\n 'data-[ending-style]:data-[activation-direction=right]:-translate-x-1/3',\n ],\n positioner: [\n 'z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width)',\n `transition-[top,left,right,bottom] ${duration} data-[instant]:transition-none`,\n // an invisible bridge over the gap so the pointer can travel from trigger to panel\n \"before:absolute before:inset-x-0 before:-top-2.5 before:h-2.5 before:content-['']\",\n ],\n popup: [\n popupSurface,\n 'relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-card',\n `transition-[opacity,scale,width,height] ${duration}`,\n 'data-[starting-style]:scale-96 data-[starting-style]:opacity-0 data-[ending-style]:scale-96 data-[ending-style]:opacity-0',\n ],\n viewport: 'relative h-full w-full overflow-hidden',\n cardList: 'grid gap-1 sm:w-[30rem] sm:grid-cols-2',\n card: [\n 'squircle flex gap-3 rounded-item p-3 text-start no-underline outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] hover:bg-hover focus-visible:bg-hover',\n ],\n cardIcon: 'squircle flex size-9 shrink-0 items-center justify-center rounded-control-sm bg-accent-soft text-accent-soft-foreground [&_svg]:size-4',\n cardTitle: 'text-sm font-medium text-foreground',\n cardDescription: 'mt-0.5 text-sm leading-snug text-muted',\n },\n});\n","import { NavigationMenu as BaseNav } from '@base-ui/react/navigation-menu';\nimport { ChevronDown } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { navigationMenuStyles } from './navigation-menu.styles';\n\nconst styles = navigationMenuStyles();\ntype Props<C extends React.ElementType> = Omit<React.ComponentPropsWithRef<C>, 'className'> & { className?: string };\n\nfunction NavigationMenuRoot({ className, ...props }: Props<typeof BaseNav.Root>) {\n return <BaseNav.Root className={cn(styles.root(), className)} {...props} />;\n}\n\n/** The row of triggers and links, with a highlight that glides to the hovered or open item. */\nfunction NavigationMenuList({\n className,\n classNames,\n children,\n ...props\n}: Props<typeof BaseNav.List> & { classNames?: { indicator?: string } }) {\n const ref = React.useRef<HTMLUListElement>(null);\n const [box, setBox] = React.useState<{ left: number; width: number; shown: boolean; instant: boolean }>({\n left: 0,\n width: 0,\n shown: false,\n instant: true,\n });\n\n const moveTo = (el: Element | null | undefined) => {\n const list = ref.current;\n const item = el?.closest('[data-nav-target]') as HTMLElement | null;\n if (!list || !item || !list.contains(item)) {\n // stay on the open trigger, otherwise fade out where it is\n const open = list?.querySelector<HTMLElement>('[data-nav-target][data-popup-open]');\n if (open && open !== el) return moveTo(open);\n setBox((b) => ({ ...b, shown: false }));\n return;\n }\n setBox((b) => ({ left: item.offsetLeft, width: item.offsetWidth, shown: true, instant: !b.shown }));\n };\n\n return (\n <BaseNav.List\n ref={ref}\n className={cn(styles.list(), className)}\n onPointerOver={(e) => moveTo(e.target as Element)}\n onPointerLeave={() => moveTo(null)}\n onFocus={(e) => moveTo(e.target as Element)}\n onBlur={() => moveTo(null)}\n {...props}\n >\n {children}\n <li\n aria-hidden\n role=\"presentation\"\n data-hidden={!box.shown || undefined}\n data-instant={box.instant || undefined}\n className={cn(styles.indicator(), classNames?.indicator)}\n style={{ '--nav-indicator-left': `${box.left}px`, '--nav-indicator-width': `${box.width}px` } as React.CSSProperties}\n />\n </BaseNav.List>\n );\n}\n\nfunction NavigationMenuItem(props: React.ComponentPropsWithRef<typeof BaseNav.Item>) {\n return <BaseNav.Item {...props} />;\n}\n\n/** Opens the item's panel. A chevron is added after the label. */\nfunction NavigationMenuTrigger({ className, children, ...props }: Props<typeof BaseNav.Trigger>) {\n return (\n <BaseNav.Trigger data-nav-target=\"\" className={cn(styles.trigger(), className)} {...props}>\n {children}\n <BaseNav.Icon className={styles.icon()}>\n <ChevronDown />\n </BaseNav.Icon>\n </BaseNav.Trigger>\n );\n}\n\n/** The panel of an item. It slides in from the side the pointer came from. */\nfunction NavigationMenuContent({ className, ...props }: Props<typeof BaseNav.Content>) {\n return <BaseNav.Content className={cn(styles.content(), className)} {...props} />;\n}\n\n/** A link. Top-level links look like triggers; pass `render` to use your router's link. */\nfunction NavigationMenuLink({ className, ...props }: Props<typeof BaseNav.Link>) {\n return <BaseNav.Link data-nav-target=\"\" className={cn(styles.trigger(), className)} {...props} />;\n}\n\nexport interface NavigationMenuLinkCardProps extends Omit<Props<typeof BaseNav.Link>, 'title'> {\n title: React.ReactNode;\n description?: React.ReactNode;\n icon?: React.ReactNode;\n}\n\n/** A link inside a panel: icon, title and a line of description. */\nfunction NavigationMenuLinkCard({ title, description, icon, className, ...props }: NavigationMenuLinkCardProps) {\n return (\n <BaseNav.Link className={cn(styles.card(), className)} {...props}>\n {icon && <span className={styles.cardIcon()}>{icon}</span>}\n <span className=\"min-w-0\">\n <span className={cn(styles.cardTitle(), 'block')}>{title}</span>\n {description && <span className={cn(styles.cardDescription(), 'block')}>{description}</span>}\n </span>\n </BaseNav.Link>\n );\n}\n\n/** The floating box the panels render in; it resizes smoothly between panels. */\nfunction NavigationMenuViewport({\n className,\n classNames,\n sideOffset = 8,\n align = 'start',\n}: {\n className?: string;\n classNames?: { positioner?: string; popup?: string; viewport?: string };\n sideOffset?: number;\n align?: 'start' | 'center' | 'end';\n}) {\n return (\n <BaseNav.Portal>\n <BaseNav.Positioner\n sideOffset={sideOffset}\n align={align}\n collisionPadding={16}\n collisionAvoidance={{ side: 'none' }}\n className={cn(styles.positioner(), classNames?.positioner)}\n >\n <BaseNav.Popup className={cn(styles.popup(), classNames?.popup, className)}>\n <BaseNav.Viewport className={cn(styles.viewport(), classNames?.viewport)} />\n </BaseNav.Popup>\n </BaseNav.Positioner>\n </BaseNav.Portal>\n );\n}\n\n/* ------------------------------------------------------------------------------------------ */\n\nexport interface NavigationMenuLinkData {\n title: React.ReactNode;\n href: string;\n description?: React.ReactNode;\n icon?: React.ReactNode;\n}\n\nexport type NavigationMenuItemData =\n | { label: React.ReactNode; href: string; active?: boolean }\n | { label: React.ReactNode; links: NavigationMenuLinkData[]; columns?: 1 | 2 }\n | { label: React.ReactNode; content: React.ReactNode };\n\nexport interface NavigationMenuProps extends Omit<Props<typeof BaseNav.Root>, 'children'> {\n items: NavigationMenuItemData[];\n classNames?: { list?: string; trigger?: string; content?: string; popup?: string };\n}\n\n/**\n * Site navigation with panels, like the top bar of a docs site.\n * <NavigationMenu items={[{ label: 'Docs', links: [{ title: 'Install', href: '/docs/install' }] }, { label: 'Blog', href: '/blog' }]} />\n * Compound: NavigationMenu.Root / List / Item / Trigger / Content / Link / LinkCard / Viewport.\n */\nfunction NavigationMenuSimple({ items, className, classNames, ...props }: NavigationMenuProps) {\n return (\n <NavigationMenuRoot className={className} {...props}>\n <NavigationMenuList className={classNames?.list}>\n {items.map((item, i) => (\n <NavigationMenuItem key={i}>\n {'href' in item ? (\n <NavigationMenuLink href={item.href} active={item.active} className={classNames?.trigger}>\n {item.label}\n </NavigationMenuLink>\n ) : (\n <>\n <NavigationMenuTrigger className={classNames?.trigger}>{item.label}</NavigationMenuTrigger>\n <NavigationMenuContent className={classNames?.content}>\n {'links' in item ? (\n <ul className={cn(styles.cardList(), item.columns === 1 && 'sm:w-80 sm:grid-cols-1')}>\n {item.links.map((l) => (\n <li key={l.href}>\n <NavigationMenuLinkCard href={l.href} title={l.title} description={l.description} icon={l.icon} />\n </li>\n ))}\n </ul>\n ) : (\n item.content\n )}\n </NavigationMenuContent>\n </>\n )}\n </NavigationMenuItem>\n ))}\n </NavigationMenuList>\n <NavigationMenuViewport classNames={{ popup: classNames?.popup }} />\n </NavigationMenuRoot>\n );\n}\n\nexport const NavigationMenu = Object.assign(NavigationMenuSimple, {\n Root: NavigationMenuRoot,\n List: NavigationMenuList,\n Item: NavigationMenuItem,\n Trigger: NavigationMenuTrigger,\n Content: NavigationMenuContent,\n Link: NavigationMenuLink,\n LinkCard: NavigationMenuLinkCard,\n Viewport: NavigationMenuViewport,\n});\n","import { tv } from '../../lib/tv';\n\n/**\n * Slides are squircle cards in a clipped viewport; the controls sit in a row underneath (never over\n * the slides and never outside the frame, so nothing overflows on a phone). The current dot is one\n * accent pill that glides between dots (transform only).\n */\nexport const carouselStyles = tv({\n slots: {\n root: 'relative flex w-full flex-col gap-4 outline-none',\n // `data-dragging` is set from pointer down to pointer up (see carousel.tsx)\n viewport: 'overflow-hidden data-[dragging]:cursor-grabbing data-[dragging]:select-none',\n container: 'flex touch-pan-y touch-pinch-zoom',\n item: 'min-w-0 shrink-0 grow-0 basis-full',\n card: 'squircle flex size-full flex-col overflow-hidden rounded-card border border-border bg-surface text-foreground',\n controls: 'flex items-center justify-between gap-3',\n dots: 'flex flex-wrap items-center justify-center gap-1',\n dot: [\n 'relative flex size-5 items-center justify-center rounded-full outline-none',\n 'before:size-1.5 before:rounded-full before:bg-border-strong before:transition-colors before:duration-[var(--cui-duration-fast)] before:content-[\"\"]',\n 'hover:before:bg-muted focus-visible:ring-2 focus-visible:ring-ring',\n ],\n dotCurrent: 'absolute h-1.5 w-3.5 rounded-full bg-accent',\n },\n variants: {\n orientation: {\n horizontal: { container: '-ms-4', item: 'ps-4' },\n vertical: { container: '-mt-4 flex-col', item: 'pt-4' },\n },\n },\n defaultVariants: { orientation: 'horizontal' },\n});\n","import { ChevronLeft, ChevronRight, ChevronDown, ChevronUp } from 'lucide-react';\nimport { motion, useReducedMotion } from 'motion/react';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { Button, type ButtonProps } from '../button/button';\nimport { carouselStyles } from './carousel.styles';\n\ntype CarouselApi = NonNullable<UseEmblaCarouselType[1]>;\ntype CarouselOptions = NonNullable<Parameters<typeof useEmblaCarousel>[0]>;\ntype CarouselPlugins = Parameters<typeof useEmblaCarousel>[1];\ntype Orientation = 'horizontal' | 'vertical';\n\ninterface CarouselContextValue {\n viewportRef: UseEmblaCarouselType[0];\n api: CarouselApi | undefined;\n orientation: Orientation;\n selected: number;\n count: number;\n canPrev: boolean;\n canNext: boolean;\n prev: () => void;\n next: () => void;\n goTo: (index: number) => void;\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null);\n\n/** The carousel state inside `Carousel.Root`: `{ api, selected, count, prev, next, goTo, … }`. */\nexport function useCarousel() {\n const ctx = React.useContext(CarouselContext);\n if (!ctx) throw new Error('useCarousel must be used inside <Carousel.Root>');\n return ctx;\n}\n\nexport interface CarouselRootProps extends React.ComponentPropsWithRef<'div'> {\n /** Embla options (`align`, `slidesToScroll`, `dragFree` …). `loop` and `orientation` have their own props. */\n opts?: Omit<CarouselOptions, 'loop' | 'axis'>;\n plugins?: CarouselPlugins;\n /** Wrap from the last slide to the first. */\n loop?: boolean;\n /** @default 'horizontal' */\n orientation?: Orientation;\n /** Receives the Embla API once it is ready. */\n setApi?: (api: CarouselApi) => void;\n /** Called when the current slide changes. */\n onSelectedChange?: (index: number) => void;\n}\n\n/** Holds the state; arrow keys on any focused part move between slides. */\nfunction CarouselRoot({\n opts,\n plugins,\n loop = false,\n orientation = 'horizontal',\n setApi,\n onSelectedChange,\n className,\n onKeyDownCapture,\n children,\n ...props\n}: CarouselRootProps) {\n const [viewportRef, api] = useEmblaCarousel({ ...opts, loop, axis: orientation === 'horizontal' ? 'x' : 'y' }, plugins);\n const reduced = useReducedMotion() ?? false;\n const [state, setState] = React.useState({ selected: 0, count: 0, canPrev: false, canNext: false });\n const onChange = React.useRef(onSelectedChange);\n onChange.current = onSelectedChange;\n\n React.useEffect(() => {\n if (!api) return;\n setApi?.(api);\n const update = () => {\n const selected = api.selectedScrollSnap();\n setState((prev) => {\n if (prev.selected !== selected) onChange.current?.(selected);\n return { selected, count: api.scrollSnapList().length, canPrev: api.canScrollPrev(), canNext: api.canScrollNext() };\n });\n };\n update();\n api.on('select', update).on('reInit', update);\n return () => {\n api.off('select', update).off('reInit', update);\n };\n }, [api, setApi]);\n\n // While a slide is dragged nothing gets selected: not the text on the cards, and not the page the\n // pointer passes over. The block only lives from pointer down to pointer up, so selecting text\n // elsewhere (or on a resting card) works as usual.\n React.useEffect(() => {\n if (!api) return;\n const viewport = api.rootNode();\n const block = (event: Event) => event.preventDefault();\n const end = () => {\n viewport.removeAttribute('data-dragging');\n document.removeEventListener('selectstart', block);\n window.removeEventListener('pointerup', end);\n window.removeEventListener('pointercancel', end);\n };\n const start = () => {\n viewport.setAttribute('data-dragging', '');\n document.addEventListener('selectstart', block);\n window.addEventListener('pointerup', end);\n window.addEventListener('pointercancel', end);\n };\n api.on('pointerDown', start).on('pointerUp', end);\n // images and links on slides would start a native drag instead of moving the carousel\n viewport.addEventListener('dragstart', block);\n return () => {\n end();\n api.off('pointerDown', start).off('pointerUp', end);\n viewport.removeEventListener('dragstart', block);\n };\n }, [api]);\n\n const prev = React.useCallback(() => api?.scrollPrev(reduced), [api, reduced]);\n const next = React.useCallback(() => api?.scrollNext(reduced), [api, reduced]);\n const goTo = React.useCallback((i: number) => api?.scrollTo(i, reduced), [api, reduced]);\n\n const handleKey = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDownCapture?.(event);\n const back = orientation === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';\n const forward = orientation === 'horizontal' ? 'ArrowRight' : 'ArrowDown';\n if (event.key === back) {\n event.preventDefault();\n prev();\n } else if (event.key === forward) {\n event.preventDefault();\n next();\n }\n };\n\n return (\n <CarouselContext.Provider value={{ viewportRef, api, orientation, ...state, prev, next, goTo }}>\n <div\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-orientation={orientation}\n onKeyDownCapture={handleKey}\n className={cn(carouselStyles().root(), className)}\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nexport interface CarouselContentProps extends React.ComponentPropsWithRef<'div'> {\n classNames?: { viewport?: string };\n}\n\n/** The clipped viewport and the moving track. Put `Carousel.Item`s inside. */\nfunction CarouselContent({ className, classNames, ...props }: CarouselContentProps) {\n const { viewportRef, orientation } = useCarousel();\n const s = carouselStyles({ orientation });\n return (\n <div ref={viewportRef} className={cn(s.viewport(), orientation === 'vertical' && 'h-full', classNames?.viewport)}>\n <div className={cn(s.container(), className)} {...props} />\n </div>\n );\n}\n\nexport interface CarouselItemProps extends React.ComponentPropsWithRef<'div'> {\n /** Wrap the content in a squircle card. @default true */\n card?: boolean;\n classNames?: { card?: string };\n}\n\n/**\n * One slide. Its width is `basis-full`; pass e.g. `className=\"md:basis-1/2\"` to show several at once.\n * The slide's label (\"2 of 5\") is added for screen readers.\n */\nfunction CarouselItem({ card = true, className, classNames, children, ...props }: CarouselItemProps) {\n const { orientation, count } = useCarousel();\n const s = carouselStyles({ orientation });\n const ref = React.useRef<HTMLDivElement>(null);\n const [label, setLabel] = React.useState<string>();\n React.useEffect(() => {\n const el = ref.current;\n if (!el?.parentElement) return;\n const index = Array.prototype.indexOf.call(el.parentElement.children, el) as number;\n setLabel(`${index + 1} of ${el.parentElement.children.length}`);\n }, [count]);\n return (\n <div ref={ref} role=\"group\" aria-roledescription=\"slide\" aria-label={label} className={cn(s.item(), className)} {...props}>\n {card ? <div className={cn(s.card(), classNames?.card)}>{children}</div> : children}\n </div>\n );\n}\n\nfunction CarouselPrevious({ className, children, ...props }: ButtonProps) {\n const { prev, canPrev, orientation } = useCarousel();\n return (\n <Button variant=\"outline\" size=\"icon-sm\" aria-label=\"Previous slide\" disabled={!canPrev} onClick={prev} className={className} {...props}>\n {children ?? (orientation === 'horizontal' ? <ChevronLeft /> : <ChevronUp />)}\n </Button>\n );\n}\n\nfunction CarouselNext({ className, children, ...props }: ButtonProps) {\n const { next, canNext, orientation } = useCarousel();\n return (\n <Button variant=\"outline\" size=\"icon-sm\" aria-label=\"Next slide\" disabled={!canNext} onClick={next} className={className} {...props}>\n {children ?? (orientation === 'horizontal' ? <ChevronRight /> : <ChevronDown />)}\n </Button>\n );\n}\n\nexport interface CarouselDotsProps extends React.ComponentPropsWithRef<'div'> {\n classNames?: { dot?: string; current?: string };\n}\n\n/** One dot per snap point; the current one is an accent pill that glides. */\nfunction CarouselDots({ className, classNames, ...props }: CarouselDotsProps) {\n const { count, selected, goTo } = useCarousel();\n const id = React.useId();\n const reduced = useReducedMotion();\n const s = carouselStyles();\n return (\n <div role=\"group\" aria-label=\"Choose slide\" className={cn(s.dots(), className)} {...props}>\n {Array.from({ length: count }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n aria-label={`Go to slide ${i + 1}`}\n aria-current={i === selected ? 'true' : undefined}\n onClick={() => goTo(i)}\n className={cn(s.dot(), classNames?.dot)}\n >\n {i === selected && (\n <motion.span\n layoutId={`carousel-dot-${id}`}\n transition={reduced ? { duration: 0 } : { type: 'spring', stiffness: 520, damping: 40 }}\n className={cn(s.dotCurrent(), classNames?.current)}\n />\n )}\n </button>\n ))}\n </div>\n );\n}\n\n/** The default control row: previous, dots, next. */\nfunction CarouselControls({ className, ...props }: React.ComponentPropsWithRef<'div'>) {\n return (\n <div className={cn(carouselStyles().controls(), className)} {...props}>\n <CarouselPrevious />\n <CarouselDots />\n <CarouselNext />\n </div>\n );\n}\n\nexport interface CarouselProps extends Omit<CarouselRootProps, 'children'> {\n /** One node per slide. */\n slides: React.ReactNode[];\n /** Show the previous/next buttons. @default true */\n arrows?: boolean;\n /** Show the dots. @default true */\n dots?: boolean;\n /** Wrap each slide in a card. @default true */\n card?: boolean;\n classNames?: { viewport?: string; content?: string; item?: string; card?: string; controls?: string };\n}\n\n/**\n * Slides that scroll horizontally, with arrows, dots, swipe and keyboard.\n * <Carousel loop slides={[<Slide1 />, <Slide2 />]} />\n * or compound: Carousel.Root / Content / Item / Previous / Next / Dots / Controls, plus `useCarousel()`.\n */\nfunction CarouselSimple({ slides, arrows = true, dots = true, card, classNames, ...props }: CarouselProps) {\n return (\n <CarouselRoot {...props}>\n <CarouselContent className={classNames?.content} classNames={{ viewport: classNames?.viewport }}>\n {slides.map((slide, i) => (\n <CarouselItem key={i} card={card} className={classNames?.item} classNames={{ card: classNames?.card }}>\n {slide}\n </CarouselItem>\n ))}\n </CarouselContent>\n {(arrows || dots) && (\n <div className={cn(carouselStyles().controls(), !arrows && 'justify-center', classNames?.controls)}>\n {arrows && <CarouselPrevious />}\n {dots && <CarouselDots />}\n {arrows && <CarouselNext />}\n </div>\n )}\n </CarouselRoot>\n );\n}\n\nexport const Carousel = Object.assign(CarouselSimple, {\n Root: CarouselRoot,\n Content: CarouselContent,\n Item: CarouselItem,\n Previous: CarouselPrevious,\n Next: CarouselNext,\n Dots: CarouselDots,\n Controls: CarouselControls,\n});\n\nexport type { CarouselApi, CarouselOptions };\n","import { tv } from '../../lib/tv';\n\n/**\n * The chart frame. TanStack Charts paints axes and labels with `currentColor`, so the frame sets the\n * muted ink; series colours and the tooltip surface are CSS variables set from our tokens (see\n * `chartVariables` in chart.tsx). The tooltip gets the popover look; its corners use `corner-shape`\n * natively where supported, without the polyfill (it moves on every pointer move).\n */\nexport const chartStyles = tv({\n slots: {\n root: 'flex w-full min-w-0 flex-col gap-3 text-xs text-muted',\n chart: [\n 'w-full min-w-0 outline-none [&_svg]:overflow-visible',\n 'focus-visible:[&_svg]:rounded-control-sm focus-visible:ring-2 focus-visible:ring-ring focus-visible:rounded-control-sm',\n '[&_.ts-chart-tooltip]:[corner-shape:var(--cui-corner-shape)] [&_.ts-chart-tooltip]:tabular-nums',\n ],\n legend: 'flex flex-wrap items-center gap-x-1 gap-y-1',\n legendItem: 'inline-flex items-center gap-2 px-1.5 py-0.5 text-xs text-muted',\n legendButton: [\n 'squircle rounded-chip border border-transparent outline-none',\n 'transition-[color,background-color,opacity] duration-[var(--cui-duration-fast)] ease-ui',\n 'hover:bg-hover hover:text-foreground focus-visible:border-ring',\n 'data-[hidden]:opacity-55 data-[hidden]:line-through data-[hidden]:decoration-[1px]',\n ],\n swatch: 'size-2.5 shrink-0 rounded-[0.1875rem] border-[1.5px] border-solid',\n tooltip: [\n 'flex min-w-40 flex-col gap-1 rounded-control-sm border border-border bg-popover px-3 py-2 text-xs text-foreground shadow-overlay',\n '[corner-shape:var(--cui-corner-shape)]',\n ],\n tooltipTitle: 'mb-0.5 font-medium text-foreground',\n tooltipRow: 'flex items-center gap-2',\n tooltipSwatch: 'size-2 shrink-0 rounded-[0.125rem]',\n tooltipLabel: 'flex-1 text-muted',\n tooltipValue: 'flex items-baseline gap-1.5 font-medium text-foreground tabular-nums',\n tooltipShare: 'font-normal text-muted',\n tooltipTotal: 'mt-1 border-t border-border pt-1.5',\n loading: 'flex w-full items-end gap-2 border-b border-border px-2',\n loadingBar: 'flex-1 rounded-b-none',\n empty: 'py-6',\n },\n variants: {\n legendPosition: {\n top: { legend: 'order-first' },\n bottom: { legend: 'justify-center' },\n },\n },\n defaultVariants: { legendPosition: 'top' },\n});\n","import type { ChartCurve } from '@tanstack/charts';\n\ntype Point = readonly [number, number];\n\nconst n = (value: number) => Math.round(value * 100) / 100;\n\n/** Straight segments through every point. */\nfunction linearSegments(points: readonly Point[], start: 'M' | 'L'): string {\n return points.map(([x, y], i) => `${i === 0 ? start : 'L'}${n(x)},${n(y)}`).join('');\n}\n\n/**\n * Monotone cubic interpolation (Fritsch–Carlson, the same idea as d3's `curveMonotoneX`): a smooth\n * curve that passes through every point and never overshoots, so a peak in the data stays the peak\n * of the curve and a flat run stays flat. Each segment is a cubic Bézier whose control points sit a\n * third of the way along x, on the tangent at each end.\n */\nfunction monotoneSegments(points: readonly Point[], start: 'M' | 'L'): string {\n const count = points.length;\n if (count < 3) return linearSegments(points, start);\n\n const dx: number[] = [];\n const slope: number[] = [];\n for (let i = 0; i < count - 1; i++) {\n const h = points[i + 1]![0] - points[i]![0];\n dx.push(h);\n slope.push(h === 0 ? 0 : (points[i + 1]![1] - points[i]![1]) / h);\n }\n\n // Tangent at each point: zero at a local extreme, otherwise the weighted harmonic mean of the\n // neighbouring slopes (keeps the curve monotone between points). The ends use one-sided slopes.\n const tangent: number[] = new Array(count);\n tangent[0] = slope[0]!;\n tangent[count - 1] = slope[count - 2]!;\n for (let i = 1; i < count - 1; i++) {\n const s0 = slope[i - 1]!;\n const s1 = slope[i]!;\n if (s0 * s1 <= 0) {\n tangent[i] = 0;\n } else {\n const h0 = dx[i - 1]!;\n const h1 = dx[i]!;\n tangent[i] = (3 * (h0 + h1)) / ((2 * h1 + h0) / s0 + (h1 + 2 * h0) / s1);\n }\n }\n\n let path = `${start}${n(points[0]![0])},${n(points[0]![1])}`;\n for (let i = 0; i < count - 1; i++) {\n const [x0, y0] = points[i]!;\n const [x1, y1] = points[i + 1]!;\n const third = dx[i]! / 3;\n path += `C${n(x0 + third)},${n(y0 + tangent[i]! * third)},${n(x1 - third)},${n(y1 - tangent[i + 1]! * third)},${n(x1)},${n(y1)}`;\n }\n return path;\n}\n\nfunction makeCurve(segments: (points: readonly Point[], start: 'M' | 'L') => string): ChartCurve {\n return {\n line: (points) => (points.length ? segments(points, 'M') : ''),\n area: (top, bottom) => {\n if (!top.length) return '';\n // The top edge left to right, then the baseline back right to left with the same curve.\n return `${segments(top, 'M')}${segments([...bottom].reverse(), 'L')}Z`;\n },\n };\n}\n\n/** Straight lines between points. */\nexport const curveLinear: ChartCurve = makeCurve(linearSegments);\n\n/** A smooth monotone curve: no overshoot above peaks or below dips. */\nexport const curveSmooth: ChartCurve = makeCurve(monotoneSegments);\n\nexport const chartCurves = { linear: curveLinear, smooth: curveSmooth } as const;\nexport type ChartCurveName = keyof typeof chartCurves;\n","/** How numbers are written: a preset, `Intl.NumberFormat` options or your own function. */\nexport type ChartValueFormat =\n | 'number'\n | 'compact'\n | 'percent'\n | Intl.NumberFormatOptions\n | ((value: number) => string);\n\n/** How x values are written: a date preset, `Intl.DateTimeFormat` options or your own function. */\nexport type ChartXFormat<TValue = unknown> =\n | 'day'\n | 'week'\n | 'month'\n | 'year'\n | Intl.DateTimeFormatOptions\n | ((value: TValue) => string);\n\nconst numberPresets: Record<'number' | 'compact' | 'percent', Intl.NumberFormatOptions> = {\n number: { maximumFractionDigits: 2 },\n compact: { notation: 'compact', maximumFractionDigits: 1 },\n percent: { style: 'percent', maximumFractionDigits: 1 },\n};\n\nconst datePresets: Record<'day' | 'week' | 'month' | 'year', Intl.DateTimeFormatOptions> = {\n day: { day: 'numeric', month: 'short', timeZone: 'UTC' },\n week: { day: 'numeric', month: 'short', timeZone: 'UTC' },\n month: { month: 'short', timeZone: 'UTC' },\n year: { year: 'numeric', timeZone: 'UTC' },\n};\n\n/** A formatter for values; `percent` expects fractions (0.42 → 42 %), like `Intl`. */\nexport function makeValueFormatter(format: ChartValueFormat | undefined, locale: string): (value: number) => string {\n if (typeof format === 'function') return format;\n const options = typeof format === 'string' ? numberPresets[format] : (format ?? numberPresets.number);\n const intl = new Intl.NumberFormat(locale, options);\n return (value) => (Number.isFinite(value) ? intl.format(value) : '–');\n}\n\nfunction toDate(value: unknown): Date | null {\n if (value instanceof Date) return value;\n if (typeof value === 'number') return new Date(value);\n if (typeof value === 'string') {\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? null : date;\n }\n return null;\n}\n\n/** A formatter for x values; without a format, values are shown as they are (dates as `day`). */\nexport function makeXFormatter<TValue>(format: ChartXFormat<TValue> | undefined, locale: string): (value: TValue) => string {\n if (typeof format === 'function') return format;\n const options = typeof format === 'string' ? datePresets[format] : format;\n const intl = new Intl.DateTimeFormat(locale, options ?? datePresets.day);\n return (value) => {\n if (!options && !(value instanceof Date)) return String(value);\n const date = toDate(value);\n return date ? intl.format(date) : String(value);\n };\n}\n","import { areaY, barY, defineChart, group, lineY, ruleY, text, type ChartGradient, type ChartPoint } from '@tanstack/charts';\nimport { crosshair } from '@tanstack/charts/crosshair';\nimport { motion } from '@tanstack/charts/motion';\nimport { scaleBand } from '@tanstack/charts/scales/band';\nimport { scaleLinear } from '@tanstack/charts/scales/linear';\nimport { scaleOrdinal } from '@tanstack/charts/scales/ordinal';\nimport { scalePoint } from '@tanstack/charts/scales/point';\nimport { tooltip } from '@tanstack/charts/tooltip';\nimport {\n Chart as TanStackChart,\n RendererChart as TanStackRendererChart,\n type ChartProps as TanStackChartProps,\n} from '@tanstack/react-charts/tooltip';\nimport { ChartNoAxesColumn } from 'lucide-react';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { Empty } from '../empty/empty';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { chartStyles } from './chart.styles';\nimport { chartCurves, type ChartCurveName } from './curves';\nimport { makeValueFormatter, makeXFormatter, type ChartValueFormat, type ChartXFormat } from './format';\n\nexport { curveLinear, curveSmooth, type ChartCurveName } from './curves';\nexport type { ChartValueFormat, ChartXFormat } from './format';\n\n/**\n * The series palette: the accent first, then calmer colours derived from it (hue turns in OKLCH\n * with a little less chroma, so they sit next to the accent without shouting), then the muted ink.\n * Every step reads an optional `--cui-chart-N` token first, so an app can set its own palette.\n */\nexport const chartPalette = [\n 'var(--cui-chart-1, var(--cui-accent))',\n 'var(--cui-chart-2, oklch(from var(--cui-accent) l calc(c * 0.8) calc(h - 115)))',\n 'var(--cui-chart-3, oklch(from var(--cui-accent) l calc(c * 0.8) calc(h + 70)))',\n 'var(--cui-chart-4, oklch(from var(--cui-accent) l calc(c * 0.8) calc(h + 150)))',\n 'var(--cui-chart-5, oklch(from var(--cui-accent) l calc(c * 0.8) calc(h - 50)))',\n 'var(--cui-chart-6, var(--cui-muted))',\n] as const;\n\n/** The CSS variables TanStack Charts reads: palette and tooltip surface, all from our tokens. */\nexport const chartVariables = {\n '--ts-chart-1': chartPalette[0],\n '--ts-chart-2': chartPalette[1],\n '--ts-chart-3': chartPalette[2],\n '--ts-chart-4': chartPalette[3],\n '--ts-chart-5': chartPalette[4],\n '--ts-chart-6': chartPalette[5],\n '--ts-chart-tooltip-background': 'var(--cui-popover)',\n '--ts-chart-tooltip-color': 'var(--cui-foreground)',\n '--ts-chart-tooltip-border': 'var(--cui-border-width) solid var(--cui-border)',\n '--ts-chart-tooltip-border-radius': 'var(--cui-radius-control-sm)',\n '--ts-chart-tooltip-shadow': 'var(--cui-shadow-overlay)',\n '--ts-chart-tooltip-padding': '0.5rem 0.75rem',\n '--ts-chart-tooltip-font': '0.75rem/1.5 var(--cui-font-sans)',\n} as React.CSSProperties;\n\n/** Colour of the series at `index` (cycles through the palette). */\nexport const chartColor = (index: number) => `var(--ts-chart-${(index % chartPalette.length) + 1})`;\n\nexport interface ChartSeries {\n /** The field of each data row that holds this series' values. */\n key: string;\n /** Name in the legend and tooltip. @default key */\n label?: string;\n /** Any CSS colour; defaults to the palette. */\n color?: string;\n}\n\nexport interface ChartReferenceLine {\n /** Where the line sits on the y axis. */\n value: number;\n /** Text drawn above the line, at the left. */\n label?: string;\n /** Any CSS colour. @default the muted ink */\n color?: string;\n}\n\n/** One plotted value: a data row × a visible series. */\ninterface ChartRow {\n kind: 'series';\n x: string;\n y: number | null;\n y1: number | null;\n y2: number | null;\n /** The value as drawn before stacking (the share with `stacked=\"percent\"`). */\n plot: number | null;\n value: number;\n share: number;\n series: string;\n seriesIndex: number;\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n/* Legend */\n\nexport interface ChartLegendItem {\n label: string;\n color: string;\n /** Series key, passed to `onToggle`. @default label */\n key?: string;\n /** Drawn as switched off (hollow swatch, dimmed). */\n hidden?: boolean;\n}\n\nexport interface ChartLegendProps extends Omit<React.ComponentPropsWithRef<'ul'>, 'onToggle'> {\n items: ChartLegendItem[];\n position?: 'top' | 'bottom';\n /** Makes each item a toggle button; called with the item's key. */\n onToggle?: (key: string) => void;\n classNames?: { item?: string; swatch?: string };\n}\n\n/** Swatches with series names, as HTML (readable, wraps on a phone). With `onToggle`, each is a toggle. */\nfunction ChartLegend({ items, position, onToggle, className, classNames, ...props }: ChartLegendProps) {\n const s = chartStyles({ legendPosition: position });\n return (\n <ul aria-label=\"Legend\" className={cn(s.legend(), className)} {...props}>\n {items.map((item) => {\n const swatch = (\n <span\n aria-hidden\n className={cn(s.swatch(), classNames?.swatch)}\n style={{ borderColor: item.color, background: item.hidden ? 'transparent' : item.color }}\n />\n );\n return (\n <li key={item.key ?? item.label}>\n {onToggle ? (\n <button\n type=\"button\"\n aria-pressed={!item.hidden}\n data-hidden={item.hidden ? '' : undefined}\n className={cn(s.legendItem(), s.legendButton(), classNames?.item)}\n onClick={() => onToggle(item.key ?? item.label)}\n >\n {swatch}\n {item.label}\n </button>\n ) : (\n <span className={cn(s.legendItem(), classNames?.item)}>\n {swatch}\n {item.label}\n </span>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n/* Root */\n\ntype ChartRenderer = React.ComponentProps<typeof TanStackRendererChart>['renderer'];\n\nexport type ChartRootProps = TanStackChartProps &\n Omit<React.ComponentPropsWithRef<'div'>, keyof TanStackChartProps> & {\n /** A TanStack renderer, e.g. `motion()` from `@tanstack/charts/motion` for entrance animation. */\n renderer?: ChartRenderer;\n classNames?: { chart?: string };\n };\n\n/**\n * The frame for your own TanStack Charts definition: our palette, ink and tooltip surface around the\n * `Chart` of `@tanstack/react-charts`. Use `chartColor(i)` in marks for series colours.\n */\nfunction ChartRoot({\n definition,\n ariaLabel,\n ariaDescription,\n height = 280,\n aspectRatio,\n initialWidth,\n onFocusChange,\n onSelect,\n renderTooltipBody,\n renderer,\n className,\n classNames,\n style,\n children,\n ...props\n}: ChartRootProps) {\n const s = chartStyles();\n const idPrefix = React.useId().replace(/:/g, '');\n const shared = {\n definition,\n ariaLabel,\n ariaDescription,\n height: aspectRatio ? undefined : height,\n aspectRatio,\n initialWidth,\n idPrefix,\n onFocusChange,\n onSelect,\n renderTooltipBody,\n className: cn(s.chart(), classNames?.chart),\n };\n return (\n <div className={cn(s.root(), className)} style={{ ...chartVariables, ...style }} {...props}>\n {renderer ? <TanStackRendererChart {...shared} renderer={renderer} /> : <TanStackChart {...shared} />}\n {children}\n </div>\n );\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n/* States */\n\nconst LOADING_BARS = [42, 58, 50, 72, 64, 80, 70, 88, 76, 92, 84, 68];\n\nfunction ChartLoading({ height, className }: { height: number; className?: string }) {\n const s = chartStyles();\n return (\n <div className={cn(s.loading(), className)} style={{ height }}>\n {LOADING_BARS.map((h, i) => (\n <Skeleton key={i} shape=\"block\" className={s.loadingBar()} style={{ height: `${h}%` }} />\n ))}\n </div>\n );\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n/* Simple chart */\n\nexport interface ChartProps<TRow extends Record<string, unknown>>\n extends Omit<React.ComponentPropsWithRef<'div'>, 'children' | 'onSelect'>,\n VariantProps<typeof chartStyles> {\n /** `line`, `area` or `bar`. @default 'line' */\n type?: 'line' | 'area' | 'bar';\n /** One row per category (week, build…), with one field per series. */\n data: readonly TRow[];\n /** The field with the category shown on the x axis (strings, numbers or dates). */\n x: keyof TRow & string;\n /** The series to draw; each reads `row[key]`. */\n series: ChartSeries[];\n /** What the chart shows, for screen readers. */\n ariaLabel: string;\n ariaDescription?: string;\n /** Height in pixels; the width follows the container. @default 280 */\n height?: number;\n /** `smooth` draws a monotone curve (no overshoot), `linear` straight segments. @default 'smooth' */\n curve?: ChartCurveName;\n /** Stack areas or bars; `percent` stacks shares of the total (0–100 %). Bars are grouped otherwise. */\n stacked?: boolean | 'percent';\n /** Fill under lines with the series colour fading to transparent. @default true for `area` */\n gradient?: boolean;\n /** Dots on line points. */\n points?: boolean;\n /** Show the legend; its items toggle series. @default true with more than one series */\n legend?: boolean;\n /** Series keys hidden (controlled). */\n hiddenSeries?: string[];\n /** Series keys hidden at first (uncontrolled). */\n defaultHiddenSeries?: string[];\n onHiddenSeriesChange?: (hidden: string[]) => void;\n /** Horizontal grid lines. @default true */\n grid?: boolean;\n /** Crosshair and tooltip listing every series at the hovered x. @default true */\n tooltip?: boolean;\n /** Formats values on the y axis and in the tooltip. @default 'number' */\n valueFormat?: ChartValueFormat;\n /** Formats x values on the axis and in the tooltip heading (dates: `day`, `week`, `month`, `year`). */\n xFormat?: ChartXFormat<TRow[keyof TRow & string]>;\n /** Locale for number and date formatting. @default 'en-US' */\n locale?: string;\n /** Dashed horizontal lines: goals, limits, averages. */\n referenceLines?: ChartReferenceLine[];\n /** Shows a skeleton instead of the chart. */\n loading?: boolean;\n /** What the empty state says when `data` is empty. */\n empty?: { title?: React.ReactNode; description?: React.ReactNode; action?: React.ReactNode };\n /** Lines grow from the baseline and bars rise on mount; off with reduced motion. @default true */\n animate?: boolean;\n classNames?: { chart?: string; legend?: string; tooltip?: string };\n}\n\n/** The series rows under the focused x: one per series (areas and lines both report a point), in series order. */\nfunction focusedRows(points: readonly ChartPoint[]): ChartRow[] {\n const bySeries = new Map<number, ChartRow>();\n for (const point of points) {\n const row = point.datum as ChartRow | undefined;\n if (row?.kind === 'series' && !bySeries.has(row.seriesIndex)) bySeries.set(row.seriesIndex, row);\n }\n return [...bySeries.values()].sort((a, b) => a.seriesIndex - b.seriesIndex);\n}\n\n/** Pointer-driven geometry (tooltip, crosshair) moves fast; only data shapes get the slow entrance. */\nconst POINTER_MOTION = { type: 'tween', duration: 140, easing: 'ease-out' } as const;\n\nconst xKey = (value: unknown) => (value instanceof Date ? value.toISOString() : String(value));\nconst finite = (value: number) => Number.isFinite(value);\n\n/**\n * A line, area or bar chart (TanStack Charts) in our colours: gradient fills, smooth curves, a\n * crosshair tooltip with every series, a legend that toggles series, stacking, reference lines,\n * loading and empty states, and an entrance animation.\n * <Chart type=\"area\" data={weeks} x=\"week\" series={[{ key: 'votes', label: 'Votes' }]} ariaLabel=\"Votes per week\" />\n * For anything else, build a TanStack definition and render it in `Chart.Root`.\n */\nfunction ChartSimple<TRow extends Record<string, unknown>>({\n type = 'line',\n data,\n x,\n series,\n ariaLabel,\n ariaDescription,\n height = 280,\n curve = 'smooth',\n stacked = false,\n gradient,\n points = false,\n legend,\n legendPosition,\n hiddenSeries,\n defaultHiddenSeries,\n onHiddenSeriesChange,\n grid = true,\n tooltip: showTooltip = true,\n valueFormat,\n xFormat,\n locale = 'en-US',\n referenceLines,\n loading = false,\n empty,\n animate = true,\n className,\n classNames,\n style,\n ...props\n}: ChartProps<TRow>) {\n const s = chartStyles();\n const [hiddenState, setHiddenState] = React.useState<string[]>(defaultHiddenSeries ?? []);\n const hidden = hiddenSeries ?? hiddenState;\n\n const labels = series.map((item) => item.label ?? item.key);\n const colors = series.map((item, i) => item.color ?? chartColor(i));\n const seriesKey = JSON.stringify(series);\n const hiddenKey = hidden.join('\\u0000');\n const refsKey = JSON.stringify(referenceLines ?? []);\n\n const formatValue = React.useMemo(() => makeValueFormatter(valueFormat, locale), [valueFormat, locale]);\n const formatShare = React.useMemo(() => makeValueFormatter('percent', locale), [locale]);\n const formatX = React.useMemo(() => makeXFormatter(xFormat, locale), [xFormat, locale]);\n\n // The x values by key, for formatting (dates become ISO keys on the scale).\n const rawX = React.useMemo(() => new Map(data.map((row) => [xKey(row[x]), row[x]])), [data, x]);\n const formatKey = React.useCallback((key: unknown) => formatX(rawX.get(String(key)) as TRow[keyof TRow & string]), [formatX, rawX]);\n\n const renderer = React.useMemo(\n () => (animate ? motion({ initial: 'always', transition: { type: 'tween', duration: 900, easing: 'ease-out' } }) : undefined),\n [animate],\n );\n\n const definition = React.useMemo(() => {\n const visible = series\n .map((item, index) => ({ ...item, index, label: labels[index]! }))\n .filter((item) => !hidden.includes(item.key));\n const keys = data.map((row) => xKey(row[x]));\n\n const rows: ChartRow[] = [];\n data.forEach((row, rowIndex) => {\n const values = visible.map((item) => {\n const value = row[item.key];\n return typeof value === 'number' ? value : Number.NaN;\n });\n const total = values.reduce((sum, value) => sum + (finite(value) ? value : 0), 0);\n let base = 0;\n visible.forEach((item, i) => {\n const value = values[i]!;\n const share = total ? (finite(value) ? value : 0) / total : 0;\n const plotted = stacked === 'percent' ? share : value;\n let y1: number | null = 0;\n let y2: number | null = finite(plotted) ? plotted : null;\n if (stacked) {\n y1 = base;\n y2 = base + (finite(plotted) ? plotted : 0);\n base = y2;\n }\n rows.push({ kind: 'series', x: keys[rowIndex]!, y: y2, y1, y2, plot: finite(plotted) ? plotted : null, value, share, series: item.label, seriesIndex: item.index });\n });\n });\n\n const color = { scale: scaleOrdinal<string, string>().domain(labels).range(colors) };\n const fillId = (row: ChartRow) => `cui-fill-${row.seriesIndex}`;\n const gradients: ChartGradient[] = colors.map((paint, i) => ({\n id: `cui-fill-${i}`,\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 1,\n stops:\n type === 'bar'\n ? [\n { offset: 0, color: paint, opacity: 1 },\n { offset: 1, color: paint, opacity: 0.55 },\n ]\n : [\n { offset: 0, color: paint, opacity: stacked ? 0.42 : 0.3 },\n { offset: 1, color: paint, opacity: stacked ? 0.06 : 0 },\n ],\n }));\n\n const axisFormat = stacked === 'percent' ? formatShare : formatValue;\n const yScale = {\n scale: scaleLinear,\n nice: true,\n ...(stacked === 'percent' ? { domain: [0, 1] as const } : {}),\n grid: grid ? { strokeOpacity: 0.12, strokeDasharray: '3 4' } : false,\n axis: { line: false, ticks: { count: 5, size: 0, padding: 10, format: axisFormat } },\n } as const;\n const xAxis = { line: { strokeOpacity: 0.18 }, ticks: { size: 0, padding: 10, format: formatKey } } as const;\n\n const refs = referenceLines ?? [];\n const refMarks = refs.length\n ? [\n ruleY(refs, {\n y: 'value',\n stroke: (ref: ChartReferenceLine) => ref.color ?? 'currentColor',\n strokeOpacity: 0.75,\n strokeWidth: 1.25,\n strokeDasharray: '5 4',\n }),\n text(\n refs.filter((ref) => ref.label),\n {\n x: () => keys[0]!,\n y: 'value',\n text: 'label',\n anchor: 'start',\n dy: -7,\n fontSize: 11,\n fontWeight: 500,\n fill: (ref: ChartReferenceLine) => ref.color ?? 'currentColor',\n },\n ),\n ]\n : [];\n\n const common = {\n color,\n gradients,\n clip: false,\n focus: 'group-x' as const,\n maxFocusDistance: Number.POSITIVE_INFINITY,\n ...(showTooltip\n ? {\n tooltip: {\n use: tooltip,\n // The tooltip follows the pointer quickly, whatever the entrance animation does.\n motion: POINTER_MOTION,\n // Plain text for the live region; the visible body is `renderTooltipBody` below.\n formatGroup: (focused: readonly ChartPoint[]) => {\n const rows = focusedRows(focused);\n if (!rows.length) return '';\n return [formatKey(rows[0]!.x), ...rows.map((row) => `${row.series}: ${formatValue(row.value)}`)].join('\\n');\n },\n },\n }\n : {}),\n };\n\n if (type === 'bar') {\n return defineChart({\n ...common,\n // The cursor band marks the focused category; a ring on one bar would only add noise.\n focusRing: false,\n marks: [\n ...(showTooltip ? [crosshair({ x: { band: { fill: 'currentColor', fillOpacity: 0.07, radius: 6, inset: -4 } }, y: false, motion: { transition: POINTER_MOTION } })] : []),\n barY(rows, {\n x: 'x',\n // Stacked bars use the library's stack (it knows which end is the outer one to round).\n ...(stacked ? { y: 'plot' as const } : { y1: 'y1' as const, y2: 'y2' as const }),\n z: 'series',\n layout: stacked ? undefined : group({ padding: 0.14 }),\n radius: stacked ? { end: 5, stack: 'outer' } : { end: 5 },\n inset: stacked ? 0 : 1,\n maxThickness: 64,\n ...(gradient ? { fill: (row: ChartRow) => `url(#${fillId(row)})` } : {}),\n }),\n ...refMarks,\n ],\n scales: { x: { scale: () => scaleBand<string>().padding(0.3), axis: xAxis }, y: yScale },\n });\n }\n\n const pathCurve = chartCurves[curve];\n const filled = gradient ?? type === 'area';\n return defineChart({\n ...common,\n marks: [\n ...(showTooltip ? [crosshair({ x: { strokeOpacity: 0.35, strokeDasharray: '3 3' }, y: false, motion: { transition: POINTER_MOTION } })] : []),\n ...(filled\n ? [\n areaY(rows, {\n x: 'x',\n y1: 'y1',\n y2: 'y2',\n z: 'series',\n curve: pathCurve,\n fill: (row: ChartRow) => `url(#${fillId(row)})`,\n fillOpacity: 1,\n }),\n ]\n : []),\n lineY(rows, { x: 'x', y: 'y', z: 'series', strokeWidth: 2, curve: pathCurve, points, lineCap: 'round', lineJoin: 'round' }),\n ...refMarks,\n ],\n scales: {\n x: { scale: () => scalePoint<string>().padding(filled ? 0 : 0.04), axis: xAxis },\n y: yScale,\n },\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the keys stand for `series`, `hidden` and `referenceLines`\n }, [data, x, seriesKey, hiddenKey, refsKey, type, curve, stacked, gradient, points, grid, showTooltip, formatValue, formatShare, formatKey]);\n\n const renderTooltipBody = React.useCallback(\n ({ points: focused }: { points: readonly ChartPoint[] }) => {\n const rows = focusedRows(focused);\n if (!rows.length) return null;\n const total = rows.reduce((sum, row) => sum + (finite(row.value) ? row.value : 0), 0);\n return (\n <div className={cn(s.tooltip(), classNames?.tooltip)}>\n <div className={s.tooltipTitle()}>{formatKey(rows[0]!.x)}</div>\n {rows.map((row) => (\n <div key={row.seriesIndex} className={s.tooltipRow()}>\n <span aria-hidden className={s.tooltipSwatch()} style={{ background: colors[row.seriesIndex] }} />\n <span className={s.tooltipLabel()}>{row.series}</span>\n <span className={s.tooltipValue()}>\n {formatValue(row.value)}\n {stacked === 'percent' && <span className={s.tooltipShare()}>{formatShare(row.share)}</span>}\n </span>\n </div>\n ))}\n {stacked && rows.length > 1 && (\n <div className={cn(s.tooltipRow(), s.tooltipTotal())}>\n <span className={s.tooltipLabel()}>Total</span>\n <span className={s.tooltipValue()}>{formatValue(total)}</span>\n </div>\n )}\n </div>\n );\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `seriesKey` stands for the colours\n [seriesKey, stacked, formatKey, formatValue, formatShare, classNames?.tooltip],\n );\n\n const toggle = (key: string) => {\n const next = hidden.includes(key) ? hidden.filter((k) => k !== key) : [...hidden, key];\n if (next.length >= series.length) return; // keep at least one series on\n if (hiddenSeries === undefined) setHiddenState(next);\n onHiddenSeriesChange?.(next);\n };\n\n const showLegend = (legend ?? series.length > 1) && !loading && data.length > 0;\n const legendNode = showLegend ? (\n <ChartLegend\n position={legendPosition}\n className={classNames?.legend}\n onToggle={series.length > 1 ? toggle : undefined}\n items={series.map((item, i) => ({ key: item.key, label: labels[i]!, color: colors[i]!, hidden: hidden.includes(item.key) }))}\n />\n ) : null;\n\n if (loading || data.length === 0) {\n return (\n <div\n role=\"figure\"\n aria-label={ariaLabel}\n aria-busy={loading || undefined}\n className={cn(s.root(), className)}\n style={{ ...chartVariables, ...style }}\n {...props}\n >\n {loading ? (\n <ChartLoading height={height} className={classNames?.chart} />\n ) : (\n <Empty\n icon={<ChartNoAxesColumn />}\n title={empty?.title ?? 'No data yet'}\n description={empty?.description}\n action={empty?.action}\n className={cn(s.empty(), classNames?.chart)}\n style={{ minHeight: height }}\n />\n )}\n </div>\n );\n }\n\n return (\n <ChartRoot\n definition={definition as TanStackChartProps['definition']}\n ariaLabel={ariaLabel}\n ariaDescription={ariaDescription}\n height={height}\n renderer={renderer}\n renderTooltipBody={showTooltip ? renderTooltipBody : undefined}\n className={className}\n classNames={{ chart: classNames?.chart }}\n style={style}\n {...props}\n >\n {legendNode}\n </ChartRoot>\n );\n}\n\nexport const Chart = Object.assign(ChartSimple, { Root: ChartRoot, Legend: ChartLegend });\n","import { tv } from '../../lib/tv';\n\n/**\n * Highlighted code in a squircle frame. Shiki paints each token with `light-dark(light, dark)`, so the\n * colours follow `color-scheme`, which the theme sets on `.dark`: no `dark:` variant, no second pass.\n * Lines are blocks in a grid (one row each) so highlights span the full scroll width; line numbers are\n * a CSS counter. The line height is fixed (1.5rem) because the copy button is centred on line one.\n */\nexport const codeBlockStyles = tv({\n slots: {\n root: 'squircle group/code relative w-full overflow-hidden rounded-card border border-border bg-surface text-foreground',\n header: 'flex h-11 items-center gap-2 border-b border-border px-4 text-[0.8125rem] text-muted [&_svg]:size-3.5 [&_svg]:shrink-0',\n title: 'min-w-0 truncate font-mono',\n body: 'relative',\n pre: [\n 'overflow-x-auto py-3.5 font-mono text-[0.8125rem] leading-6 outline-none',\n 'focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring',\n '[&_code]:grid [&_code]:w-max [&_code]:min-w-full [&_code]:[counter-reset:line]',\n '[&_.line]:block [&_.line]:min-h-6 [&_.line]:ps-4 [&_.line]:pe-14',\n '[&_.line[data-highlighted]]:bg-accent-soft [&_.line[data-highlighted]]:shadow-[inset_2px_0_0_var(--cui-accent)]',\n ],\n lineNumbers: [\n '[&_.line]:before:me-5 [&_.line]:before:inline-block [&_.line]:before:w-[2ch] [&_.line]:before:text-end',\n '[&_.line]:before:text-muted/60 [&_.line]:before:[counter-increment:line] [&_.line]:before:content-[counter(line)]',\n '[&_.line[data-highlighted]]:before:text-accent-soft-foreground',\n ],\n copy: 'absolute end-2.5 top-[calc(0.875rem+0.75rem)] z-10 -translate-y-1/2 bg-surface/80 text-muted backdrop-blur-xs hover:text-foreground',\n fold: 'pointer-events-none absolute inset-x-0 bottom-0 flex items-end justify-center bg-linear-to-b from-transparent to-surface pt-16 pb-3',\n foldOpen: 'flex justify-center border-t border-border py-2',\n foldButton: 'pointer-events-auto bg-surface',\n },\n});\n","import { Check, Copy, FileCode } from 'lucide-react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { Button, type ButtonProps } from '../button/button';\nimport { codeBlockStyles } from './code-block.styles';\n\nconst s = codeBlockStyles();\n\nexport interface CodeThemes {\n light: string;\n dark: string;\n}\n\nexport interface HighlightOptions {\n lang: string;\n themes?: CodeThemes;\n /** 1-based line numbers to mark. */\n highlightLines?: number[];\n}\n\nconst DEFAULT_THEMES: CodeThemes = { light: 'github-light', dark: 'github-dark' };\nconst cache = new Map<string, Promise<string>>();\n\ntype ShikiHighlighter = Awaited<ReturnType<(typeof import('shiki/core'))['createHighlighterCore']>>;\nlet highlighter: Promise<ShikiHighlighter> | undefined;\n\n/**\n * One shared highlighter on Shiki's JavaScript regex engine. Built from `shiki/core` so bundlers\n * never pull in the Oniguruma WebAssembly file.\n */\nfunction getHighlighter() {\n highlighter ??= Promise.all([import('shiki/core'), import('shiki/engine/javascript')]).then(\n ([{ createHighlighterCore }, { createJavaScriptRegexEngine }]) =>\n createHighlighterCore({ themes: [], langs: [], engine: createJavaScriptRegexEngine() }),\n );\n return highlighter;\n}\n\n/**\n * Highlights `code` with Shiki and returns HTML: `<pre><code><span class=\"line\">…`. Tokens are painted\n * with `light-dark()`, so they follow the page's `color-scheme`. Shiki, the language and the themes\n * load on first use and results are cached. Unknown languages fall back to plain text.\n */\nexport function highlightCode(code: string, { lang, themes = DEFAULT_THEMES, highlightLines = [] }: HighlightOptions) {\n const key = JSON.stringify([code, lang, themes, highlightLines]);\n let result = cache.get(key);\n if (!result) {\n const marked = new Set(highlightLines);\n result = Promise.all([getHighlighter(), import('shiki/langs'), import('shiki/themes')]).then(\n async ([shiki, { bundledLanguages }, { bundledThemes }]) => {\n const known = lang in bundledLanguages;\n await Promise.all([\n known && !shiki.getLoadedLanguages().includes(lang)\n ? shiki.loadLanguage(bundledLanguages[lang as keyof typeof bundledLanguages])\n : null,\n ...[themes.light, themes.dark].map((theme) =>\n shiki.getLoadedThemes().includes(theme)\n ? null\n : shiki.loadTheme(bundledThemes[theme as keyof typeof bundledThemes]),\n ),\n ]);\n return shiki.codeToHtml(code, {\n lang: known ? lang : 'text',\n themes: { light: themes.light, dark: themes.dark },\n defaultColor: 'light-dark()',\n transformers: [\n {\n pre(node) {\n // the frame paints the background (Shiki's would cover our surface token); classes are ours\n delete node.properties.style;\n delete node.properties.class;\n },\n code(node) {\n // lines are grid rows: drop the newline text nodes between them\n node.children = node.children.filter((child) => !(child.type === 'text' && child.value === '\\n'));\n },\n line(node, line) {\n if (marked.has(line)) node.properties['data-highlighted'] = '';\n },\n },\n ],\n });\n },\n );\n cache.set(key, result);\n }\n return result;\n}\n\nexport interface CodeBlockCopyProps extends Omit<ButtonProps, 'value'> {\n /** The text to copy. */\n value: string;\n}\n\n/** A button that copies `value` and shows a check for a moment. */\nfunction CodeBlockCopy({ value, className, onClick, ...props }: CodeBlockCopyProps) {\n const [copied, setCopied] = React.useState(false);\n const reduced = useReducedMotion();\n React.useEffect(() => {\n if (!copied) return;\n const t = setTimeout(() => setCopied(false), 1600);\n return () => clearTimeout(t);\n }, [copied]);\n const icon = { initial: { opacity: 0, scale: 0.6 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.6 } };\n return (\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={copied ? 'Copied' : 'Copy code'}\n className={cn(s.copy(), className)}\n onClick={(event) => {\n onClick?.(event);\n void navigator.clipboard?.writeText(value).then(() => setCopied(true));\n }}\n {...props}\n >\n <AnimatePresence mode=\"popLayout\" initial={false}>\n <motion.span key={copied ? 'check' : 'copy'} className=\"flex\" transition={{ duration: reduced ? 0 : 0.15 }} {...icon}>\n {copied ? <Check /> : <Copy />}\n </motion.span>\n </AnimatePresence>\n </Button>\n );\n}\n\nexport interface CodeBlockProps extends Omit<React.ComponentPropsWithRef<'div'>, 'title'> {\n code: string;\n /** A Shiki language id. @default 'tsx' */\n lang?: string;\n /** A file name or title shown in a bar above the code. */\n title?: React.ReactNode;\n /** The icon before the title. @default <FileCode /> */\n icon?: React.ReactNode;\n lineNumbers?: boolean;\n /** 1-based line numbers to mark with the accent. */\n highlightLines?: number[];\n /** Fold code longer than this many lines behind a \"View code\" button. */\n collapsedLines?: number;\n /** Label of the unfold button. @default 'View code' */\n expandLabel?: string;\n /** Show the copy button. @default true */\n copyable?: boolean;\n /** Shiki themes for light and dark. @default { light: 'github-light', dark: 'github-dark' } */\n themes?: CodeThemes;\n classNames?: { header?: string; title?: string; pre?: string; copy?: string; fold?: string };\n}\n\n/**\n * Highlighted code with a copy button, an optional file-name bar, line numbers, marked lines and\n * folding for long snippets.\n * <CodeBlock code={source} lang=\"ts\" title=\"trainer.config.ts\" lineNumbers highlightLines={[3]} />\n */\nfunction CodeBlockRoot({\n code,\n lang = 'tsx',\n title,\n icon,\n lineNumbers = false,\n highlightLines,\n collapsedLines,\n expandLabel = 'View code',\n copyable = true,\n themes,\n className,\n classNames,\n ...props\n}: CodeBlockProps) {\n const text = code.replace(/\\n$/, '');\n const lines = React.useMemo(() => text.split('\\n'), [text]);\n const [html, setHtml] = React.useState<string | null>(null);\n const [open, setOpen] = React.useState(false);\n const foldable = collapsedLines !== undefined && lines.length > collapsedLines;\n const folded = foldable && !open;\n const marks = highlightLines?.join(',');\n\n React.useEffect(() => {\n let live = true;\n highlightCode(text, { lang, themes, highlightLines })\n .then((out) => live && setHtml(out))\n .catch(() => live && setHtml(null));\n return () => {\n live = false;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `marks` stands for `highlightLines`\n }, [text, lang, themes?.light, themes?.dark, marks]);\n\n const preClass = cn(s.pre(), lineNumbers && s.lineNumbers(), classNames?.pre);\n const marked = new Set(highlightLines);\n\n return (\n <div data-lang={lang} className={cn(s.root(), className)} {...props}>\n {title && (\n <div className={cn(s.header(), classNames?.header)}>\n {icon ?? <FileCode aria-hidden />}\n <span className={cn(s.title(), classNames?.title)}>{title}</span>\n </div>\n )}\n <div\n className={s.body()}\n // 1.5rem per line + the vertical padding of the pre\n style={folded ? { maxHeight: `calc(${collapsedLines} * 1.5rem + 1.75rem)`, overflow: 'hidden' } : undefined}\n >\n {html ? (\n <div className=\"contents\" dangerouslySetInnerHTML={{ __html: html.replace('<pre', `<pre class=\"${preClass.replaceAll('&', '&')}\"`) }} />\n ) : (\n <pre className={preClass} tabIndex={0}>\n <code>\n {lines.map((line, i) => (\n <span key={i} className=\"line\" data-highlighted={marked.has(i + 1) ? '' : undefined}>\n {line}\n </span>\n ))}\n </code>\n </pre>\n )}\n {copyable && <CodeBlockCopy value={text} className={classNames?.copy} />}\n {folded && (\n <div className={cn(s.fold(), classNames?.fold)}>\n <Button size=\"sm\" variant=\"outline\" className={s.foldButton()} aria-expanded={false} onClick={() => setOpen(true)}>\n {expandLabel}\n </Button>\n </div>\n )}\n </div>\n {foldable && open && (\n <div className={s.foldOpen()}>\n <Button size=\"sm\" variant=\"ghost\" aria-expanded onClick={() => setOpen(false)}>\n Collapse\n </Button>\n </div>\n )}\n </div>\n );\n}\n\nexport const CodeBlock = Object.assign(CodeBlockRoot, { Copy: CodeBlockCopy });\n","import { tv } from '../../lib/tv';\n\n/** The data table is our Table plus a toolbar (search, column menu) and a footer (selection, pages). */\nexport const dataTableStyles = tv({\n slots: {\n root: 'flex w-full flex-col gap-3',\n toolbar: 'flex flex-wrap items-center gap-2',\n search: 'w-full max-w-xs',\n sortButton: [\n 'squircle -mx-2 inline-flex h-7 items-center gap-1.5 rounded-control-sm px-2 text-xs font-medium text-muted outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui hover:bg-hover hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring',\n 'data-[sorted]:text-foreground [&_svg]:size-3.5 [&_svg]:shrink-0',\n ],\n sortIcon: 'text-muted/70 transition-transform duration-[var(--cui-duration-fast)] ease-ui',\n selectCell: 'pe-0 [&+*]:border-s-0!',\n selectedRow: 'bg-accent-soft hover:bg-accent-soft',\n empty: 'h-24 text-center text-muted',\n footer: 'flex flex-wrap items-center justify-between gap-x-4 gap-y-2',\n count: 'text-sm text-muted tabular-nums',\n },\n});\n","import {\n columnFilteringFeature,\n columnVisibilityFeature,\n createColumnHelper,\n createFilteredRowModel,\n createPaginatedRowModel,\n createSortedRowModel,\n filterFn_arrIncludesSome,\n filterFn_equals,\n filterFn_includesString,\n globalFilteringFeature,\n rowPaginationFeature,\n rowSelectionFeature,\n rowSortingFeature,\n sortFn_alphanumeric,\n sortFn_basic,\n sortFn_datetime,\n sortFn_text,\n tableFeatures,\n useTable,\n type Column,\n type ColumnDef,\n type ReactTable,\n type Row,\n type RowData,\n type TableOptions,\n} from '@tanstack/react-table';\nimport { ArrowDown, ArrowUp, ChevronsUpDown, Search, Settings2 } from 'lucide-react';\nimport { useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { Button } from '../button/button';\nimport { Checkbox } from '../checkbox/checkbox';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport { InputGroup } from '../input-group/input-group';\nimport { Pagination } from '../pagination/pagination';\nimport { Table, type TableRootProps } from '../table/table';\nimport { dataTableStyles } from './data-table.styles';\n\nconst s = dataTableStyles();\n\n/** What a column can tell the data table through `meta`. */\nexport interface DataTableColumnMeta {\n /**\n * A fixed width (px number or any CSS length). The table uses a fixed layout, so widths never jump\n * when sorting, paging or selecting; columns without a width share the space that's left.\n * Give one to short columns (status, numbers, dates).\n */\n width?: number | string;\n}\n\n/** Room a column without a width keeps before the table starts to scroll sideways. */\nconst MIN_FLEX_WIDTH = 140;\nconst SELECT_WIDTH = 48;\n\n/**\n * The TanStack Table v9 features a data table uses: sorting, column + global filtering, column\n * visibility, row selection and pagination (client side). Pass it to `createColumnHelper` so column\n * definitions are typed against the same features.\n */\nexport const dataTableFeatures = tableFeatures({\n rowSortingFeature,\n sortedRowModel: createSortedRowModel(),\n sortFns: { alphanumeric: sortFn_alphanumeric, basic: sortFn_basic, datetime: sortFn_datetime, text: sortFn_text },\n columnFilteringFeature,\n globalFilteringFeature,\n filteredRowModel: createFilteredRowModel(),\n filterFns: { includesString: filterFn_includesString, equals: filterFn_equals, arrIncludesSome: filterFn_arrIncludesSome },\n columnVisibilityFeature,\n rowSelectionFeature,\n rowPaginationFeature,\n paginatedRowModel: createPaginatedRowModel(),\n columnMeta: {} as DataTableColumnMeta,\n});\n\nexport type DataTableFeatures = typeof dataTableFeatures;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- columns of one table hold different value types\nexport type DataTableColumn<TData extends RowData> = ColumnDef<DataTableFeatures, TData, any>;\nexport type DataTableInstance<TData extends RowData> = ReactTable<DataTableFeatures, TData>;\n\n/** A column helper typed for data tables: `const col = createDataTableColumns<Post>()`. */\nexport function createDataTableColumns<TData extends RowData>() {\n return createColumnHelper<DataTableFeatures, TData>();\n}\n\ntype Options<TData extends RowData> = Omit<TableOptions<DataTableFeatures, TData>, 'features' | 'columns'>;\n\nexport interface UseDataTableOptions<TData extends RowData> extends Options<TData> {\n columns: DataTableColumn<TData>[];\n /** Add a checkbox column to select rows. */\n selectable?: boolean;\n /** Rows per page. @default 10 */\n pageSize?: number;\n}\n\nconst selectColumn = <TData extends RowData>(): DataTableColumn<TData> => ({\n id: 'select',\n enableSorting: false,\n enableHiding: false,\n enableGlobalFilter: false,\n header: ({ table }) => (\n <Checkbox\n aria-label=\"Select all rows on this page\"\n checked={table.getIsAllPageRowsSelected()}\n indeterminate={table.getIsSomePageRowsSelected() && !table.getIsAllPageRowsSelected()}\n onCheckedChange={(value) => table.toggleAllPageRowsSelected(value)}\n />\n ),\n cell: ({ row }) => (\n <Checkbox\n aria-label=\"Select row\"\n checked={row.getIsSelected()}\n disabled={!row.getCanSelect()}\n onCheckedChange={(_value, details) => row.getToggleSelectedHandler()(details.event)}\n />\n ),\n});\n\n/**\n * Creates the table instance for the compound form. Keep `columns` and `data` stable (module scope,\n * state or `useMemo`), otherwise the row models rebuild on every render.\n */\nexport function useDataTable<TData extends RowData>({ columns, selectable = false, pageSize = 10, initialState, ...options }: UseDataTableOptions<TData>) {\n const allColumns = React.useMemo(() => (selectable ? [selectColumn<TData>(), ...columns] : columns), [columns, selectable]);\n return useTable({\n features: dataTableFeatures,\n columns: allColumns,\n globalFilterFn: 'includesString',\n initialState: { pagination: { pageIndex: 0, pageSize }, ...initialState },\n ...options,\n } as TableOptions<DataTableFeatures, TData>);\n}\n\nconst DataTableContext = React.createContext<{ table: DataTableInstance<RowData> } | null>(null);\n\n/** The table instance inside `DataTable.Root`. */\nexport function useDataTableContext<TData extends RowData = RowData>() {\n const ctx = React.useContext(DataTableContext);\n if (!ctx) throw new Error('DataTable parts must be used inside <DataTable.Root>');\n return ctx.table as unknown as DataTableInstance<TData>;\n}\n\n/** The header text of a column, for menus: a string header, else the column id. */\nfunction columnLabel<TData extends RowData>(column: Column<DataTableFeatures, TData>) {\n const header = column.columnDef.header;\n return typeof header === 'string' ? header : column.id;\n}\n\nexport interface DataTableRootProps<TData extends RowData> extends React.ComponentPropsWithRef<'div'> {\n table: DataTableInstance<TData>;\n}\n\nfunction DataTableRoot<TData extends RowData>({ table, className, ...props }: DataTableRootProps<TData>) {\n // a fresh value each render, so parts follow the table state the owner re-renders with\n const value = { table: table as unknown as DataTableInstance<RowData> };\n return (\n <DataTableContext.Provider value={value}>\n <div className={cn(s.root(), className)} {...props} />\n </DataTableContext.Provider>\n );\n}\n\nconst DataTableToolbar = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.toolbar(), className)} {...p} />;\n\nexport interface DataTableSearchProps {\n placeholder?: string;\n /** Filter one column instead of all of them. */\n column?: string;\n className?: string;\n 'aria-label'?: string;\n}\n\n/** A search field that filters the rows (all columns, or one with `column`). */\nfunction DataTableSearch({ placeholder = 'Filter…', column, className, 'aria-label': label }: DataTableSearchProps) {\n const table = useDataTableContext();\n const target = column ? table.getColumn(column) : undefined;\n const value = (target ? target.getFilterValue() : table.state.globalFilter) as string | undefined;\n return (\n <InputGroup\n start={<Search aria-hidden />}\n size=\"sm\"\n className={cn(s.search(), className)}\n placeholder={placeholder}\n aria-label={label ?? placeholder}\n value={value ?? ''}\n onChange={(event) => {\n const next = (event.target as HTMLInputElement).value;\n if (target) target.setFilterValue(next);\n else table.setGlobalFilter(next);\n }}\n />\n );\n}\n\n/** A \"View\" menu with one checkbox per column that can be hidden. */\nfunction DataTableColumnToggle({ label = 'View', className }: { label?: React.ReactNode; className?: string }) {\n const table = useDataTableContext();\n const columns = table.getAllLeafColumns().filter((c) => c.getCanHide());\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger render={<Button variant=\"outline\" size=\"sm\" className={cn('ms-auto', className)} />}>\n <Settings2 aria-hidden />\n {label}\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\" className=\"min-w-44\">\n <DropdownMenu.Group>\n <DropdownMenu.GroupLabel>Columns</DropdownMenu.GroupLabel>\n {columns.map((column) => (\n <DropdownMenu.CheckboxItem\n key={column.id}\n checked={column.getIsVisible()}\n onCheckedChange={(value) => column.toggleVisibility(value)}\n >\n {columnLabel(column)}\n </DropdownMenu.CheckboxItem>\n ))}\n </DropdownMenu.Group>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n\nexport interface DataTableContentProps extends Omit<TableRootProps, 'children' | 'layout'> {\n /** Shown in one row when no rows match. @default 'No results.' */\n empty?: React.ReactNode;\n /** Called when a row is clicked (open a post, a tester). */\n onRowClick?: (row: Row<DataTableFeatures, RowData>) => void;\n}\n\n/** The table: sortable headers, selectable rows, an empty row when nothing matches. */\nfunction DataTableContent({ empty = 'No results.', onRowClick, hover, style, ...props }: DataTableContentProps) {\n const table = useDataTableContext();\n const rows = table.getRowModel().rows;\n // Paging animates: the rows of the new page slide in from the side of the move, one after another.\n const pageIndex = table.state.pagination.pageIndex;\n const paging = React.useRef({ index: pageIndex, dir: 0 });\n if (paging.current.index !== pageIndex) {\n paging.current = { index: pageIndex, dir: Math.sign(pageIndex - paging.current.index) };\n }\n // with reduced motion there is no animation (and no animationend to clear the flag below)\n const reduce = useReducedMotion();\n const dir = reduce ? 0 : paging.current.dir;\n // A fixed layout with one <col> per column: widths come from here, never from the rows on screen.\n const columns = table.getVisibleLeafColumns();\n const widthOf = (column: (typeof columns)[number]) =>\n column.id === 'select' ? SELECT_WIDTH : (column.columnDef.meta as DataTableColumnMeta | undefined)?.width;\n const minWidth = columns\n .map((c) => widthOf(c))\n .map((w) => (w === undefined ? `${MIN_FLEX_WIDTH}px` : typeof w === 'number' ? `${w}px` : w))\n .join(' + ');\n return (\n <Table.Root layout=\"fixed\" hover={hover ?? Boolean(onRowClick)} style={{ minWidth: `calc(${minWidth})`, ...style }} {...props}>\n <colgroup>\n {columns.map((c) => {\n const width = widthOf(c);\n return <col key={c.id} style={width === undefined ? undefined : { width }} />;\n })}\n </colgroup>\n <Table.Header>\n {table.getHeaderGroups().map((group) => (\n <Table.Row key={group.id}>\n {group.headers.map((header) => {\n const sorted = header.column.getIsSorted();\n return (\n <Table.Head\n key={header.id}\n colSpan={header.colSpan}\n aria-sort={sorted === 'asc' ? 'ascending' : sorted === 'desc' ? 'descending' : undefined}\n className={cn(header.column.id === 'select' && s.selectCell())}\n >\n {header.isPlaceholder ? null : header.column.getCanSort() ? (\n <button\n type=\"button\"\n className={s.sortButton()}\n data-sorted={sorted || undefined}\n onClick={header.column.getToggleSortingHandler()}\n >\n <table.FlexRender header={header} />\n {sorted === 'asc' ? (\n <ArrowUp aria-hidden className={s.sortIcon()} />\n ) : sorted === 'desc' ? (\n <ArrowDown aria-hidden className={s.sortIcon()} />\n ) : (\n <ChevronsUpDown aria-hidden className={s.sortIcon()} />\n )}\n </button>\n ) : (\n <table.FlexRender header={header} />\n )}\n </Table.Head>\n );\n })}\n </Table.Row>\n ))}\n </Table.Header>\n <Table.Body>\n {rows.length ? (\n rows.map((row, i) => (\n <Table.Row\n key={`${pageIndex}:${row.id}`}\n data-state={row.getIsSelected() ? 'selected' : undefined}\n aria-selected={row.getCanSelect() ? row.getIsSelected() : undefined}\n style={dir ? ({ '--row-from': `${dir * 28}px`, animationDelay: `${i * 30}ms` } as React.CSSProperties) : undefined}\n className={cn(row.getIsSelected() && s.selectedRow(), onRowClick && 'cursor-pointer', dir && 'motion-safe:animate-row-in')}\n // while it slides in, the table clips sideways instead of showing a scrollbar\n data-row-in={dir ? '' : undefined}\n onAnimationEnd={(e) => e.currentTarget.removeAttribute('data-row-in')}\n onClick={onRowClick ? (event) => !(event.target as Element).closest('button,a,input,label') && onRowClick(row) : undefined}\n >\n {row.getVisibleCells().map((cell) => (\n <Table.Cell key={cell.id} className={cn(cell.column.id === 'select' && s.selectCell())}>\n <table.FlexRender cell={cell} />\n </Table.Cell>\n ))}\n </Table.Row>\n ))\n ) : (\n <Table.Row>\n <Table.Cell colSpan={table.getVisibleLeafColumns().length} className={s.empty()}>\n {empty}\n </Table.Cell>\n </Table.Row>\n )}\n </Table.Body>\n </Table.Root>\n );\n}\n\n/** \"2 of 12 selected\" when rows can be selected, otherwise the number of rows. */\nfunction DataTableCount({ className }: { className?: string }) {\n const table = useDataTableContext();\n const total = table.getFilteredRowModel().rows.length;\n const selectable = table.getAllLeafColumns().some((c) => c.id === 'select');\n return (\n <p className={cn(s.count(), className)} aria-live=\"polite\">\n {selectable\n ? `${table.getFilteredSelectedRowModel().rows.length} of ${total} selected`\n : `${total} ${total === 1 ? 'row' : 'rows'}`}\n </p>\n );\n}\n\n/** Our Pagination bound to the table's pages. Hidden when everything fits on one page. */\nfunction DataTablePagination({ className }: { className?: string }) {\n const table = useDataTableContext();\n const total = table.getPageCount();\n if (total <= 1) return null;\n return (\n <Pagination\n className={className}\n page={table.state.pagination.pageIndex + 1}\n total={total}\n onPageChange={(page) => table.setPageIndex(page - 1)}\n />\n );\n}\n\nconst DataTableFooter = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.footer(), className)} {...p} />;\n\nexport interface DataTableProps<TData extends RowData> extends UseDataTableOptions<TData> {\n /** Show the search field; a string sets its placeholder. @default true */\n search?: boolean | string;\n /** Filter only this column with the search field. */\n searchColumn?: string;\n /** Show the column visibility menu. @default true */\n columnToggle?: boolean;\n /** Extra controls in the toolbar (filters, a \"New\" button). */\n toolbar?: React.ReactNode;\n empty?: React.ReactNode;\n onRowClick?: (row: Row<DataTableFeatures, TData>) => void;\n /** Tighter rows. */\n dense?: boolean;\n className?: string;\n}\n\n/**\n * Sorting, filtering, row selection, column visibility and pagination on our Table.\n * <DataTable columns={columns} data={posts} getRowId={(p) => p.id} selectable />\n * or compound: `useDataTable()` + DataTable.Root / Toolbar / Search / ColumnToggle / Content / Footer /\n * Count / Pagination.\n */\nfunction DataTableSimple<TData extends RowData>({\n search = true,\n searchColumn,\n columnToggle = true,\n toolbar,\n empty,\n onRowClick,\n dense,\n className,\n ...options\n}: DataTableProps<TData>) {\n const table = useDataTable(options);\n return (\n <DataTableRoot table={table} className={className}>\n {(search || columnToggle || toolbar) && (\n <DataTableToolbar>\n {search && <DataTableSearch column={searchColumn} placeholder={typeof search === 'string' ? search : undefined} />}\n {toolbar}\n {columnToggle && <DataTableColumnToggle />}\n </DataTableToolbar>\n )}\n <DataTableContent empty={empty} onRowClick={onRowClick as DataTableContentProps['onRowClick']} dense={dense} />\n <DataTableFooter>\n <DataTableCount />\n <DataTablePagination />\n </DataTableFooter>\n </DataTableRoot>\n );\n}\n\nexport const DataTable = Object.assign(DataTableSimple, {\n Root: DataTableRoot,\n Toolbar: DataTableToolbar,\n Search: DataTableSearch,\n ColumnToggle: DataTableColumnToggle,\n Content: DataTableContent,\n Footer: DataTableFooter,\n Count: DataTableCount,\n Pagination: DataTablePagination,\n});\n","import { tv } from '../../lib/tv';\n\n/**\n * Panels split by a hairline. The hairline turns accent while hovered or dragged; the optional grip is a\n * small rounded tile on the line. The hit area is wider than the line (a transparent pseudo-element).\n */\nexport const resizableStyles = tv({\n slots: {\n group: 'flex size-full',\n panel: 'min-h-0 min-w-0',\n handle: [\n 'group/handle relative flex shrink-0 items-center justify-center bg-border outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui',\n 'data-[separator=hover]:bg-accent data-[separator=active]:bg-accent focus-visible:bg-accent',\n 'data-[separator=disabled]:pointer-events-none',\n 'after:absolute after:content-[\"\"]',\n ],\n grip: [\n 'squircle relative z-10 flex items-center justify-center rounded-chip border border-border-strong bg-surface text-muted',\n 'transition-[color,transform] duration-[var(--cui-duration-fast)] ease-ui',\n 'group-data-[separator=hover]/handle:text-foreground group-data-[separator=active]/handle:text-foreground',\n 'group-data-[separator=active]/handle:scale-110 [&_svg]:size-3',\n ],\n },\n variants: {\n orientation: {\n horizontal: {\n group: 'flex-row',\n handle: 'w-px cursor-col-resize after:inset-y-0 after:-inset-x-1.5',\n grip: 'h-6 w-3.5',\n },\n vertical: {\n group: 'flex-col',\n handle: 'h-px cursor-row-resize after:inset-x-0 after:-inset-y-1.5',\n grip: 'h-3.5 w-6',\n },\n },\n },\n defaultVariants: { orientation: 'horizontal' },\n});\n","import { GripHorizontal, GripVertical } from 'lucide-react';\nimport * as React from 'react';\nimport { Group, Panel, Separator, type GroupProps, type PanelProps, type SeparatorProps } from 'react-resizable-panels';\nimport { cn } from '../../lib/tv';\nimport { resizableStyles } from './resizable.styles';\n\ntype Orientation = 'horizontal' | 'vertical';\nconst OrientationContext = React.createContext<Orientation>('horizontal');\n\nexport interface ResizableGroupProps extends Omit<GroupProps, 'orientation'> {\n /** `horizontal` puts panels side by side, `vertical` stacks them. @default 'horizontal' */\n orientation?: Orientation;\n}\n\n/** Holds the panels and the handles between them. Panels and handles must be its direct children. */\nfunction ResizableGroup({ orientation = 'horizontal', className, ...props }: ResizableGroupProps) {\n return (\n <OrientationContext.Provider value={orientation}>\n <Group orientation={orientation} className={cn(resizableStyles({ orientation }).group(), className)} {...props} />\n </OrientationContext.Provider>\n );\n}\n\nexport type ResizablePanelProps = PanelProps;\n\n/** One resizable area. Sizes: numbers are pixels, strings without a unit are percentages. */\nfunction ResizablePanel({ className, ...props }: ResizablePanelProps) {\n return <Panel className={cn(resizableStyles().panel(), className)} {...props} />;\n}\n\nexport interface ResizableHandleProps extends SeparatorProps {\n /** Show a small grip on the line. */\n withHandle?: boolean;\n classNames?: { grip?: string };\n}\n\n/** The draggable line between two panels; also focusable and moved with the arrow keys. */\nfunction ResizableHandle({ withHandle, className, classNames, ...props }: ResizableHandleProps) {\n const orientation = React.useContext(OrientationContext);\n const s = resizableStyles({ orientation });\n const Grip = orientation === 'horizontal' ? GripVertical : GripHorizontal;\n return (\n <Separator className={cn(s.handle(), className)} {...props}>\n {withHandle && (\n <span aria-hidden className={cn(s.grip(), classNames?.grip)}>\n <Grip />\n </span>\n )}\n </Separator>\n );\n}\n\n/**\n * Panels split by draggable handles.\n * <Resizable.Group>\n * <Resizable.Panel defaultSize=\"30\">…</Resizable.Panel>\n * <Resizable.Handle withHandle />\n * <Resizable.Panel>…</Resizable.Panel>\n * </Resizable.Group>\n */\nexport const Resizable = {\n Group: ResizableGroup,\n Panel: ResizablePanel,\n Handle: ResizableHandle,\n};\n","import { tv } from '../../lib/tv';\nimport { backdropStyles } from '../popover/popover.styles';\n\n/**\n * The app sidebar of crazy-hub: it sits on the frame colour next to the page panel (the framed app\n * layout). Rows are muted; the active row has the soft accent fill; one neutral block glides under\n * the hovered row (see glide.ts). Collapsing hides the sidebar completely: the column closes and the\n * content slides out a little and fades. On phones it is a drawer from the left.\n */\nexport const sidebarStyles = tv({\n slots: {\n provider: 'group/provider flex min-h-svh w-full bg-frame text-foreground [--sidebar-width:16rem]',\n aside: [\n 'group/sidebar relative shrink-0 self-stretch overflow-clip max-md:hidden',\n 'w-(--sidebar-width) transition-[width] duration-[var(--cui-duration-normal)] ease-ui data-[state=collapsed]:w-0',\n ],\n column: [\n 'sticky top-0 flex h-full max-h-svh w-(--sidebar-width) flex-col text-sm',\n 'transition-[translate,opacity] duration-[var(--cui-duration-normal)] ease-ui',\n 'group-data-[state=collapsed]/sidebar:-translate-x-3 group-data-[state=collapsed]/sidebar:opacity-0',\n ],\n area: 'relative flex min-h-0 flex-1 flex-col',\n header: 'flex shrink-0 items-center gap-2 px-4 pt-4 pb-2',\n content: 'flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto overscroll-contain px-3 py-3 mask-t-from-[calc(100%-12px)] mask-b-from-[calc(100%-24px)]',\n footer: 'flex shrink-0 flex-col gap-1 px-3 pt-2 pb-4',\n separator: 'mx-3 h-px shrink-0 bg-border',\n group: 'flex flex-col',\n groupLabel: 'mb-1.5 flex items-center gap-2 px-2.5 text-xs font-medium text-muted [&_svg]:size-3.5',\n list: 'flex flex-col gap-0.5',\n item: [\n 'squircle-motion relative my-0.5 flex w-full items-center gap-3 rounded-item px-2.5 py-2 text-start text-sm wrap-anywhere outline-none',\n 'text-muted transition-colors duration-[var(--cui-duration-fast)] ease-ui hover:text-foreground',\n 'focus-visible:ring-2 focus-visible:ring-ring',\n 'data-[active=true]:bg-accent-soft data-[active=true]:font-medium data-[active=true]:text-accent-soft-foreground',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n '[&_svg]:size-4 [&_svg]:shrink-0',\n ],\n badge: 'ms-auto text-xs tabular-nums text-muted',\n sub: 'relative ms-3 flex flex-col gap-0.5 ps-1 before:absolute before:inset-y-1 before:start-0 before:w-px before:bg-border before:content-[\"\"]',\n inset: [\n 'squircle relative m-2 flex min-w-0 flex-1 flex-col rounded-panel border border-border bg-background',\n 'md:ms-0 md:group-data-[sidebar=collapsed]/provider:ms-2',\n ],\n trigger: 'text-muted hover:text-foreground',\n backdrop: [backdropStyles, 'md:hidden'],\n drawer: [\n 'squircle fixed inset-y-2 left-2 z-50 flex w-[min(var(--sidebar-width),calc(100vw-3rem))] flex-col overflow-hidden rounded-card',\n 'border border-border bg-frame text-[0.9375rem] text-foreground shadow-overlay outline-none md:hidden',\n 'transition-[translate,opacity] duration-[var(--cui-duration-normal)] ease-ui',\n 'data-[starting-style]:-translate-x-[calc(100%+1rem)] data-[ending-style]:-translate-x-[calc(100%+1rem)]',\n ],\n },\n});\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { PanelLeft } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../../lib/tv';\nimport { Button, type ButtonProps } from '../button/button';\nimport { glideBlockClass, useGlide } from './glide';\nimport { sidebarStyles } from './sidebar.styles';\n\nconst s = sidebarStyles();\n/** Below this width the sidebar is a drawer (Tailwind's `md`). */\nconst MOBILE_QUERY = '(max-width: 767px)';\n\ninterface SidebarContextValue {\n /** Desktop: the sidebar is shown. */\n open: boolean;\n setOpen: (open: boolean) => void;\n /** Phone: the drawer is shown. */\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n /** Opens/closes the drawer on a phone, the sidebar otherwise. */\n toggle: () => void;\n id: string;\n}\n\nconst SidebarContext = React.createContext<SidebarContextValue | null>(null);\n\n/** The sidebar state inside `Sidebar.Provider`: `{ open, setOpen, openMobile, setOpenMobile, toggle }`. */\nexport function useSidebar() {\n const ctx = React.useContext(SidebarContext);\n if (!ctx) throw new Error('useSidebar must be used inside <Sidebar.Provider>');\n return ctx;\n}\n\nconst isMobile = () => typeof window !== 'undefined' && window.matchMedia?.(MOBILE_QUERY).matches;\n\nexport interface SidebarProviderProps extends React.ComponentPropsWithRef<'div'> {\n /** Desktop open state (controlled). */\n open?: boolean;\n /** @default true */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Toggle with Ctrl/⌘ + this key; `false` turns the shortcut off. @default 'b' */\n shortcut?: string | false;\n /** Sidebar width, any CSS length. @default '16rem' */\n width?: string;\n}\n\n/** Holds the open state and lays out the sidebar next to `Sidebar.Inset` on the frame colour. */\nfunction SidebarProvider({\n open: openProp,\n defaultOpen = true,\n onOpenChange,\n shortcut = 'b',\n width,\n className,\n style,\n ...props\n}: SidebarProviderProps) {\n const [openState, setOpenState] = React.useState(defaultOpen);\n const [openMobile, setOpenMobile] = React.useState(false);\n const open = openProp ?? openState;\n const id = React.useId();\n const setOpen = React.useCallback(\n (next: boolean) => {\n setOpenState(next);\n onOpenChange?.(next);\n },\n [onOpenChange],\n );\n const toggle = React.useCallback(() => (isMobile() ? setOpenMobile((o) => !o) : setOpen(!open)), [open, setOpen]);\n\n React.useEffect(() => {\n if (!shortcut) return;\n const onKey = (event: KeyboardEvent) => {\n if (event.key.toLowerCase() === shortcut && (event.metaKey || event.ctrlKey) && !event.altKey && !event.shiftKey) {\n event.preventDefault();\n toggle();\n }\n };\n window.addEventListener('keydown', onKey);\n return () => window.removeEventListener('keydown', onKey);\n }, [shortcut, toggle]);\n\n return (\n <SidebarContext.Provider value={{ open, setOpen, openMobile, setOpenMobile, toggle, id }}>\n <div\n data-sidebar={open ? 'open' : 'collapsed'}\n className={cn(s.provider(), className)}\n style={width ? ({ '--sidebar-width': width, ...style } as React.CSSProperties) : style}\n {...props}\n />\n </SidebarContext.Provider>\n );\n}\n\n/** The column with the gliding hover block; shared by the desktop sidebar and the drawer. */\nfunction SidebarArea({ children, className }: { children: React.ReactNode; className?: string }) {\n const ref = useGlide<HTMLDivElement>();\n return (\n <div ref={ref} className={cn(s.area(), className)}>\n <div data-glide-block=\"\" aria-hidden className={glideBlockClass} />\n {children}\n </div>\n );\n}\n\nexport interface SidebarProps extends React.ComponentPropsWithRef<'aside'> {\n /** Name of the navigation landmark. @default 'Sidebar' */\n label?: string;\n classNames?: { column?: string; drawer?: string; backdrop?: string };\n}\n\n/**\n * The sidebar: an `<aside>` on desktop that collapses completely, and a drawer from the left on phones\n * (opened by `Sidebar.Trigger`). Its children are rendered in whichever is shown.\n */\nfunction SidebarRoot({ label = 'Sidebar', className, classNames, children, ...props }: SidebarProps) {\n const { open, openMobile, setOpenMobile, id } = useSidebar();\n return (\n <>\n <aside\n id={id}\n aria-label={label}\n data-state={open ? 'open' : 'collapsed'}\n inert={!open}\n className={cn(s.aside(), className)}\n {...props}\n >\n <div className={cn(s.column(), classNames?.column)}>\n <SidebarArea>{children}</SidebarArea>\n </div>\n </aside>\n <BaseDialog.Root open={openMobile} onOpenChange={setOpenMobile}>\n <BaseDialog.Portal>\n <BaseDialog.Backdrop className={cn(s.backdrop(), classNames?.backdrop)} />\n <BaseDialog.Popup aria-label={label} className={cn(s.drawer(), classNames?.drawer)}>\n <SidebarArea>{children}</SidebarArea>\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n </BaseDialog.Root>\n </>\n );\n}\n\nconst SidebarHeader = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.header(), className)} {...p} />;\nconst SidebarFooter = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.footer(), className)} {...p} />;\nconst SidebarSeparator = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => (\n <div role=\"separator\" className={cn(s.separator(), className)} {...p} />\n);\n\n/** The scrolling middle part with the groups. */\nfunction SidebarContent({ className, ...props }: React.ComponentPropsWithRef<'nav'>) {\n return <nav className={cn(s.content(), className)} {...props} />;\n}\n\nexport interface SidebarGroupProps extends Omit<React.ComponentPropsWithRef<'div'>, 'title'> {\n /** The small heading above the rows. */\n label?: React.ReactNode;\n classNames?: { label?: string; list?: string };\n}\n\n/** A labelled group of rows. Each child becomes a list item. */\nfunction SidebarGroup({ label, className, classNames, children, ...props }: SidebarGroupProps) {\n const labelId = React.useId();\n return (\n <div role=\"group\" aria-labelledby={label ? labelId : undefined} className={cn(s.group(), className)} {...props}>\n {label && (\n <div id={labelId} className={cn(s.groupLabel(), classNames?.label)}>\n {label}\n </div>\n )}\n <SidebarList className={classNames?.list}>{children}</SidebarList>\n </div>\n );\n}\n\nfunction SidebarList({ className, children, ...props }: React.ComponentPropsWithRef<'ul'>) {\n return (\n <ul className={cn(s.list(), className)} {...props}>\n {React.Children.map(children, (child) => (child == null || child === false ? null : <li>{child}</li>))}\n </ul>\n );\n}\n\nconst SidebarGroupLabel = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.groupLabel(), className)} {...p} />;\n\nexport interface SidebarItemProps extends useRender.ComponentProps<'a'> {\n icon?: React.ReactNode;\n /** The current page: soft accent fill, `aria-current=\"page\"`. */\n active?: boolean;\n /** Text at the end of the row (a count, a shortcut). */\n badge?: React.ReactNode;\n disabled?: boolean;\n}\n\n/**\n * A row. Renders a link; `render={<Link to=\"…\" />}` for a router link or `render={<button />}` for an\n * action. On a phone, choosing a row closes the drawer.\n */\nfunction SidebarItem({ icon, active = false, badge, disabled, className, render, children, onClick, ...props }: SidebarItemProps) {\n const ctx = React.useContext(SidebarContext);\n return useRender({\n defaultTagName: 'a',\n render,\n props: mergeProps<'a'>(\n {\n className: cn(s.item(), className),\n 'data-active': active,\n 'aria-current': active ? 'page' : undefined,\n 'aria-disabled': disabled || undefined,\n onClick: (event) => {\n onClick?.(event);\n if (!event.defaultPrevented && ctx?.openMobile) ctx.setOpenMobile(false);\n },\n children: (\n <>\n {icon}\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {badge != null && <span className={s.badge()}>{badge}</span>}\n </>\n ),\n } as React.ComponentProps<'a'>,\n props,\n ),\n });\n}\n\n/** Nested rows under an item, with a guide line. */\nfunction SidebarSub({ className, children, ...props }: React.ComponentPropsWithRef<'ul'>) {\n return (\n <SidebarList className={cn(s.sub(), className)} {...props}>\n {children}\n </SidebarList>\n );\n}\n\n/** Opens and closes the sidebar (the drawer on a phone). */\nfunction SidebarTrigger({ className, onClick, children, ...props }: ButtonProps) {\n const { open, openMobile, toggle, id } = useSidebar();\n return (\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={open ? 'Collapse sidebar' : 'Open sidebar'}\n aria-controls={id}\n aria-expanded={isMobile() ? openMobile : open}\n className={cn(s.trigger(), className)}\n onClick={(event) => {\n onClick?.(event);\n toggle();\n }}\n {...props}\n >\n {children ?? <PanelLeft />}\n </Button>\n );\n}\n\n/** The page panel next to the sidebar (rounded, on the background colour). */\nfunction SidebarInset({ className, ...props }: React.ComponentPropsWithRef<'main'>) {\n return <main className={cn(s.inset(), className)} {...props} />;\n}\n\n/**\n * The app sidebar of crazy-hub.\n * <Sidebar.Provider>\n * <Sidebar>\n * <Sidebar.Header>…</Sidebar.Header>\n * <Sidebar.Content>\n * <Sidebar.Group label=\"Feedback\">\n * <Sidebar.Item href=\"/ideas\" icon={<Lightbulb />} active>Ideas</Sidebar.Item>\n * </Sidebar.Group>\n * </Sidebar.Content>\n * </Sidebar>\n * <Sidebar.Inset><Sidebar.Trigger /> …</Sidebar.Inset>\n * </Sidebar.Provider>\n */\nexport const Sidebar = Object.assign(SidebarRoot, {\n Provider: SidebarProvider,\n Header: SidebarHeader,\n Content: SidebarContent,\n Footer: SidebarFooter,\n Separator: SidebarSeparator,\n Group: SidebarGroup,\n GroupLabel: SidebarGroupLabel,\n List: SidebarList,\n Item: SidebarItem,\n Sub: SidebarSub,\n Trigger: SidebarTrigger,\n Inset: SidebarInset,\n});\n","import { tv } from '../../lib/tv';\n\nconst heading = 'font-heading font-[weight:var(--cui-heading-weight)] tracking-[var(--cui-heading-tracking)] text-foreground text-balance scroll-mt-24';\n\n/** One look per text element, shared by the parts and by the `Prose` wrapper. */\nexport const typographyStyles = tv({\n slots: {\n h1: `${heading} text-4xl leading-tight`,\n h2: `${heading} text-2xl leading-snug`,\n h3: `${heading} text-xl leading-snug`,\n h4: `${heading} text-base leading-snug`,\n p: 'leading-7 text-foreground/90 text-pretty',\n lead: 'text-lg leading-8 text-muted text-pretty',\n large: 'text-lg font-semibold text-foreground',\n small: 'text-sm font-medium leading-none',\n muted: 'text-sm text-muted',\n blockquote: 'border-s-2 border-accent ps-5 text-foreground/80 italic',\n list: 'ms-5 list-disc space-y-2 marker:text-muted [ol&]:list-decimal [&>li]:ps-1 [&>li]:leading-7',\n inlineCode: 'squircle rounded-chip border border-border bg-surface-2 px-1.5 py-0.5 font-mono text-[0.85em] text-foreground',\n link: 'font-medium text-accent-soft-foreground underline decoration-accent-soft-foreground/40 underline-offset-4 transition-colors duration-[var(--cui-duration-fast)] ease-ui hover:decoration-accent-soft-foreground',\n kbd: 'squircle rounded-chip border border-border-strong bg-surface px-1.5 py-0.5 font-mono text-[0.8em]',\n hr: 'border-0 border-t border-border',\n },\n});\n\n/**\n * Long-form text from markdown or a CMS: every child element gets the same look as the parts.\n * Spacing follows a vertical rhythm: block elements are separated by `margin-top`, headings get more.\n */\nexport const proseStyles = tv({\n base: [\n 'max-w-[68ch] text-base text-foreground',\n '[&>:first-child]:mt-0 [&>:last-child]:mb-0',\n // headings\n '[&_h1]:mt-10 [&_h1]:mb-4 [&_:is(h1,h2,h3,h4)]:font-heading',\n '[&_h1]:text-4xl [&_h1]:leading-tight [&_h2]:mt-10 [&_h2]:mb-3 [&_h2]:text-2xl [&_h2]:leading-snug',\n '[&_h3]:mt-8 [&_h3]:mb-2 [&_h3]:text-xl [&_h3]:leading-snug [&_h4]:mt-6 [&_h4]:mb-2 [&_h4]:text-base',\n '[&_:is(h1,h2,h3,h4)]:font-[weight:var(--cui-heading-weight)] [&_:is(h1,h2,h3,h4)]:tracking-[var(--cui-heading-tracking)]',\n '[&_:is(h1,h2,h3,h4)]:text-balance [&_:is(h1,h2,h3,h4)]:text-foreground [&_:is(h1,h2,h3,h4)]:scroll-mt-24',\n // text\n '[&_p]:my-5 [&_p]:leading-7 [&_p]:text-pretty',\n '[&_:is(strong,b)]:font-semibold [&_:is(strong,b)]:text-foreground',\n // links\n '[&_a]:font-medium [&_a]:text-accent-soft-foreground [&_a]:underline [&_a]:decoration-accent-soft-foreground/40 [&_a]:underline-offset-4',\n '[&_a:hover]:decoration-accent-soft-foreground',\n // lists\n '[&_:is(ul,ol)]:my-5 [&_:is(ul,ol)]:ms-5 [&_ul]:list-disc [&_ol]:list-decimal [&_li]:my-2 [&_li]:ps-1 [&_li]:leading-7',\n '[&_li]:marker:text-muted [&_li>:is(ul,ol)]:my-2',\n // quotes\n '[&_blockquote]:my-6 [&_blockquote]:border-s-2 [&_blockquote]:border-accent [&_blockquote]:ps-5 [&_blockquote]:text-foreground/80 [&_blockquote]:italic',\n // code\n '[&_:not(pre)>code]:squircle [&_:not(pre)>code]:rounded-chip [&_:not(pre)>code]:border [&_:not(pre)>code]:border-border',\n '[&_:not(pre)>code]:bg-surface-2 [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:font-mono [&_:not(pre)>code]:text-[0.85em]',\n '[&_pre]:squircle [&_pre]:my-6 [&_pre]:overflow-x-auto [&_pre]:rounded-card [&_pre]:border [&_pre]:border-border [&_pre]:bg-surface [&_pre]:p-4',\n '[&_pre]:font-mono [&_pre]:text-sm [&_pre]:leading-6',\n '[&_kbd]:squircle [&_kbd]:rounded-chip [&_kbd]:border [&_kbd]:border-border-strong [&_kbd]:bg-surface [&_kbd]:px-1.5 [&_kbd]:font-mono [&_kbd]:text-[0.8em]',\n // tables\n '[&_table]:my-6 [&_table]:w-full [&_table]:border-separate [&_table]:border-spacing-0 [&_table]:overflow-hidden [&_table]:text-sm',\n '[&_table]:squircle [&_table]:rounded-card [&_table]:border [&_table]:border-border',\n '[&_th]:bg-surface-2/70 [&_th]:px-4 [&_th]:py-2.5 [&_th]:text-start [&_th]:text-xs [&_th]:font-medium [&_th]:text-muted',\n '[&_td]:border-t [&_td]:border-border [&_td]:px-4 [&_td]:py-2.5',\n // media and rules\n '[&_img]:squircle [&_img]:my-6 [&_img]:rounded-card',\n '[&_hr]:my-10 [&_hr]:border-0 [&_hr]:border-t [&_hr]:border-border',\n ],\n variants: {\n size: {\n sm: 'text-sm [&_p]:my-4 [&_p]:leading-6 [&_li]:leading-6',\n md: '',\n lg: 'text-lg [&_p]:leading-8 [&_li]:leading-8',\n },\n },\n defaultVariants: { size: 'md' },\n});\n","import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { proseStyles, typographyStyles } from './typography.styles';\n\nconst s = typographyStyles();\n\nexport interface ProseProps extends useRender.ComponentProps<'div'>, VariantProps<typeof proseStyles> {}\n\n/**\n * Styles every element inside: headings, paragraphs, lists, quotes, code, tables, links. Use it around\n * rendered markdown or CMS content. `render={<article />}` changes the element.\n */\nexport function Prose({ className, size, render, ...props }: ProseProps) {\n return useRender({\n defaultTagName: 'div',\n render,\n props: mergeProps<'div'>({ className: cn(proseStyles({ size }), className) }, props),\n });\n}\n\ntype Slot = keyof ReturnType<typeof typographyStyles>;\n\n/** Makes a part: a fixed element with one slot's classes, still overridable via `render`. */\nfunction part<T extends keyof React.JSX.IntrinsicElements>(tag: T, slot: Slot, name: string) {\n function Part({ className, render, ...props }: useRender.ComponentProps<T>) {\n return useRender({\n defaultTagName: tag,\n render,\n props: mergeProps<T>({ className: cn(s[slot](), className) } as never, props as never),\n });\n }\n Part.displayName = `Typography.${name}`;\n return Part;\n}\n\nconst H1 = part('h1', 'h1', 'H1');\nconst H2 = part('h2', 'h2', 'H2');\nconst H3 = part('h3', 'h3', 'H3');\nconst H4 = part('h4', 'h4', 'H4');\nconst P = part('p', 'p', 'P');\nconst Lead = part('p', 'lead', 'Lead');\nconst Large = part('div', 'large', 'Large');\nconst Small = part('small', 'small', 'Small');\nconst Muted = part('p', 'muted', 'Muted');\nconst Blockquote = part('blockquote', 'blockquote', 'Blockquote');\nconst List = part('ul', 'list', 'List');\nconst InlineCode = part('code', 'inlineCode', 'InlineCode');\nconst Link = part('a', 'link', 'Link');\nconst Kbd = part('kbd', 'kbd', 'Kbd');\n\n/**\n * Text parts with the same look as `Prose`, for UI text outside long-form content:\n * <Typography.H2>Roadmap</Typography.H2> <Typography.Lead>What we build next.</Typography.Lead>\n * Each part takes `render` to swap the element (`<Typography.H2 render={<h3 />}>` keeps the h2 look).\n */\nexport const Typography = {\n H1,\n H2,\n H3,\n H4,\n P,\n Lead,\n Large,\n Small,\n Muted,\n Blockquote,\n List,\n InlineCode,\n Link,\n Kbd,\n Prose,\n};\n","import { tv } from '../../lib/tv';\n\n/**\n * A list row: media, title + description, actions. `outline` and `muted` frame it like a small card;\n * `plain` (default) leaves it bare for use inside a group. Rows that are links or buttons get a soft\n * hover fill (background-color only, which the squircle fallback can paint).\n */\nexport const itemStyles = tv({\n slots: {\n root: [\n 'squircle group/item relative flex w-full items-center gap-3.5 rounded-item text-start text-sm text-foreground outline-none',\n 'transition-colors duration-[var(--cui-duration-fast)] ease-ui',\n 'focus-visible:ring-[3px] focus-visible:ring-ring',\n '[a]:cursor-pointer [a]:hover:bg-hover [button]:cursor-pointer [button]:hover:bg-hover',\n ],\n media: 'flex shrink-0 items-center justify-center [&_svg]:pointer-events-none',\n content: 'flex min-w-0 flex-1 flex-col gap-0.5',\n title: 'flex min-w-0 items-center gap-2 font-medium leading-snug',\n description: 'line-clamp-2 text-sm leading-normal text-muted text-pretty [&_a]:underline [&_a]:underline-offset-2',\n actions: 'flex shrink-0 items-center gap-2',\n header: 'flex basis-full items-center justify-between gap-2',\n footer: 'flex basis-full items-center justify-between gap-2',\n },\n variants: {\n variant: {\n plain: { root: 'border border-transparent' },\n outline: { root: 'border border-border bg-surface' },\n muted: { root: 'border border-transparent bg-surface-2/70' },\n },\n size: {\n sm: { root: 'gap-2.5 px-3 py-2' },\n md: { root: 'px-4 py-3' },\n },\n },\n defaultVariants: { variant: 'plain', size: 'md' },\n});\n\nexport const itemMediaStyles = tv({\n base: 'flex shrink-0 items-center justify-center [&_svg]:pointer-events-none',\n variants: {\n variant: {\n /** Anything: an avatar, a custom element. */\n default: 'self-start',\n /** A tinted squircle tile with the icon in accent ink. */\n icon: 'squircle size-9 rounded-control-sm bg-accent-soft text-accent-soft-foreground [&_svg]:size-4.5',\n /** A picture cropped to a tile. */\n image: 'squircle size-10 overflow-hidden rounded-control-sm [&_img]:size-full [&_img]:object-cover',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nexport const itemGroupStyles = tv({\n slots: {\n root: 'flex w-full flex-col',\n separator: 'mx-4 h-px shrink-0 bg-border',\n },\n variants: {\n /** Rows inside one shared frame, divided by hairlines. */\n framed: {\n true: { root: 'squircle rounded-card border border-border bg-surface p-1' },\n false: { root: 'gap-2' },\n },\n },\n defaultVariants: { framed: false },\n});\n","import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { itemGroupStyles, itemMediaStyles, itemStyles } from './item.styles';\n\ntype Options = VariantProps<typeof itemStyles>;\nconst s = itemStyles();\n\nexport interface ItemRootProps extends useRender.ComponentProps<'div'>, Options {}\n\n/** The row itself. Pass `render={<a href=\"…\" />}` (or a router link) to make the whole row a link. */\nfunction ItemRoot({ className, variant, size, render, ...props }: ItemRootProps) {\n return useRender({\n defaultTagName: 'div',\n render,\n props: mergeProps<'div'>({ className: cn(itemStyles({ variant, size }).root(), className), 'data-slot': 'item' } as React.ComponentProps<'div'>, props),\n });\n}\n\nexport interface ItemMediaProps extends React.ComponentPropsWithRef<'div'>, VariantProps<typeof itemMediaStyles> {}\n\nfunction ItemMedia({ className, variant, ...props }: ItemMediaProps) {\n return <div data-slot=\"item-media\" className={cn(itemMediaStyles({ variant }), className)} {...props} />;\n}\nconst ItemContent = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.content(), className)} {...p} />;\nconst ItemTitle = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.title(), className)} {...p} />;\nconst ItemDescription = ({ className, ...p }: React.ComponentPropsWithRef<'p'>) => <p className={cn(s.description(), className)} {...p} />;\nconst ItemActions = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.actions(), className)} {...p} />;\nconst ItemHeader = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.header(), className)} {...p} />;\nconst ItemFooter = ({ className, ...p }: React.ComponentPropsWithRef<'div'>) => <div className={cn(s.footer(), className)} {...p} />;\n\nexport interface ItemGroupProps extends React.ComponentPropsWithRef<'div'>, VariantProps<typeof itemGroupStyles> {}\n\n/** A list of items. `framed` puts them in one card with hairlines between rows. */\nexport function ItemGroup({ className, framed, ...props }: ItemGroupProps) {\n return <div role=\"list\" data-framed={framed || undefined} className={cn(itemGroupStyles({ framed }).root(), className)} {...props} />;\n}\n\n/** A hairline between rows of a group. */\nexport function ItemSeparator({ className, ...props }: React.ComponentPropsWithRef<'div'>) {\n return <div role=\"separator\" className={cn(itemGroupStyles().separator(), className)} {...props} />;\n}\n\nexport interface ItemProps extends Omit<ItemRootProps, 'title'> {\n /** An icon, shown on a tinted tile. */\n icon?: React.ReactNode;\n /** Any media (avatar, image) shown as is; wins over `icon`. */\n media?: React.ReactNode;\n title?: React.ReactNode;\n description?: React.ReactNode;\n /** Controls on the right: a button, a switch, a chip. */\n actions?: React.ReactNode;\n classNames?: { media?: string; content?: string; title?: string; description?: string; actions?: string };\n}\n\n/**\n * A list row: media, title and description, actions.\n * <Item icon={<Shield />} title=\"God mode\" description=\"No damage taken.\" actions={<Switch />} />\n * or compound: Item.Root / Media / Content / Title / Description / Actions / Header / Footer.\n */\nfunction ItemSimple({ icon, media, title, description, actions, classNames, children, ...props }: ItemProps) {\n const simple = icon !== undefined || media !== undefined || title !== undefined || description !== undefined || actions !== undefined;\n if (!simple) return <ItemRoot {...props}>{children}</ItemRoot>;\n return (\n <ItemRoot {...props}>\n {media ? (\n <ItemMedia className={classNames?.media}>{media}</ItemMedia>\n ) : icon ? (\n <ItemMedia variant=\"icon\" aria-hidden className={classNames?.media}>\n {icon}\n </ItemMedia>\n ) : null}\n <ItemContent className={classNames?.content}>\n {title && <ItemTitle className={classNames?.title}>{title}</ItemTitle>}\n {description && <ItemDescription className={classNames?.description}>{description}</ItemDescription>}\n {children}\n </ItemContent>\n {actions && <ItemActions className={classNames?.actions}>{actions}</ItemActions>}\n </ItemRoot>\n );\n}\n\nexport const Item = Object.assign(ItemSimple, {\n Root: ItemRoot,\n Media: ItemMedia,\n Content: ItemContent,\n Title: ItemTitle,\n Description: ItemDescription,\n Actions: ItemActions,\n Header: ItemHeader,\n Footer: ItemFooter,\n Group: ItemGroup,\n Separator: ItemSeparator,\n});\n","import { tv } from '../../lib/tv';\n\n/**\n * An overlay pinned to one edge of its positioned parent. The layers are stacked `backdrop-filter`\n * blurs, each masked to a band, so the blur grows towards the edge instead of starting at a hard line.\n */\nexport const progressiveBlurStyles = tv({\n slots: {\n root: 'pointer-events-none absolute z-10 overflow-hidden',\n layer: 'absolute inset-0',\n tint: 'absolute inset-0',\n },\n variants: {\n side: {\n top: { root: 'inset-x-0 top-0' },\n bottom: { root: 'inset-x-0 bottom-0' },\n left: { root: 'inset-y-0 left-0' },\n right: { root: 'inset-y-0 right-0' },\n },\n },\n defaultVariants: { side: 'bottom' },\n});\n","import * as React from 'react';\nimport { cn, type VariantProps } from '../../lib/tv';\nimport { progressiveBlurStyles } from './progressive-blur.styles';\n\ntype Side = 'top' | 'bottom' | 'left' | 'right';\n\nexport interface ProgressiveBlurProps\n extends Omit<React.ComponentPropsWithRef<'div'>, 'children'>,\n VariantProps<typeof progressiveBlurStyles> {\n /** The edge the blur grows towards. @default 'bottom' */\n side?: Side;\n /** How far the blur reaches in from the edge: pixels or any CSS length. @default 64 */\n size?: number | string;\n /** The blur at the edge, in pixels; it fades out inwards. @default 8 */\n strength?: number;\n /** Number of stacked layers; more is smoother and costs more. @default 8 */\n layers?: number;\n /**\n * Also fade towards a colour at the edge, so text under the blur disappears completely.\n * `true` uses the page background; pass a CSS colour (`var(--cui-surface)`) inside cards.\n */\n tint?: boolean | string;\n classNames?: { layer?: string; tint?: string };\n}\n\n/** The gradient direction runs from the inner edge of the overlay to the side it sits on. */\nconst direction: Record<Side, string> = { top: 'to top', bottom: 'to bottom', left: 'to left', right: 'to right' };\n/** The inner edge of the overlay, where each layer's inset is measured from. */\nconst opposite: Record<Side, Side> = { top: 'bottom', bottom: 'top', left: 'right', right: 'left' };\n\n/**\n * Blurs whatever is behind it progressively towards one edge. Put it inside a positioned parent\n * (`relative`) over a scroll area, a card, an image or a list end; it never catches the pointer.\n * <div className=\"relative\"><ScrollArea …/><ProgressiveBlur side=\"bottom\" size={72} /></div>\n */\nexport function ProgressiveBlur({\n side = 'bottom',\n size = 64,\n strength = 8,\n layers = 8,\n tint = false,\n className,\n classNames,\n style,\n ...props\n}: ProgressiveBlurProps) {\n const s = progressiveBlurStyles({ side });\n const length = typeof size === 'number' ? `${size}px` : size;\n const vertical = side === 'top' || side === 'bottom';\n const count = Math.max(2, Math.round(layers));\n const to = direction[side];\n\n return (\n <div\n aria-hidden\n data-progressive-blur=\"\"\n data-side={side}\n className={cn(s.root(), className)}\n style={{ [vertical ? 'height' : 'width']: length, ...style }}\n {...props}\n >\n {Array.from({ length: count }, (_, i) => {\n // Layer i starts i steps in from the inner edge and reaches the outer edge. Layers stack, so\n // the blur adds up towards the edge; each fades in over its first step so no band edge shows.\n // The geometry alone already makes the blur progressive: Chromium drops masks of backdrop\n // filters under a `corner-shape` clip (a squircle parent), and the result still degrades well.\n const blur = strength * ((i + 1) / count) * Math.sqrt(3 / count);\n const inset = `${(i / count) * 100}%`;\n const mask = `linear-gradient(${to}, transparent, black ${100 / (count - i)}%)`;\n const filter = `blur(${Math.round(blur * 100) / 100}px)`;\n return (\n <div\n key={i}\n className={cn(s.layer(), classNames?.layer)}\n style={{\n [opposite[side]]: inset,\n backdropFilter: filter,\n WebkitBackdropFilter: filter,\n maskImage: mask,\n WebkitMaskImage: mask,\n }}\n />\n );\n })}\n {tint && (\n <div\n className={cn(s.tint(), classNames?.tint)}\n style={{ backgroundImage: `linear-gradient(${to}, transparent, ${tint === true ? 'var(--cui-background)' : tint})` }}\n />\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAa,gBAAgB,EAC3B,QAAQ,EACN,OAAO;CACL,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,QAAQ;EAAC;EAAQ;EAAc;EAAW;EAAc;EAAQ;EAAQ;EAAS;CAAQ;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