@aortl/admin-react 0.18.3 → 0.18.4
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 +9 -1
- package/dist/Tabs.d.ts +3 -1
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/admin.scoped.css +40 -14
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/cn.ts","../src/Accordion.tsx","../src/portal-context.ts","../src/AdminRoot.tsx","../src/icon.ts","../src/Alert.tsx","../src/AppShell.tsx","../src/Badge.tsx","../src/BrandTile.tsx","../src/Avatar.tsx","../src/hotkey-parse.ts","../src/Kbd.tsx","../src/hotkey-registry.ts","../src/useHotkey.ts","../src/Button.tsx","../src/ButtonGroup.tsx","../src/Breadcrumbs.tsx","../src/Input.tsx","../src/FileInput.tsx","../src/InputGroup.tsx","../src/NumberInput.tsx","../src/Indicator.tsx","../src/Link.tsx","../src/Separator.tsx","../src/Pagination.tsx","../src/Textarea.tsx","../src/Checkbox.tsx","../src/Radio.tsx","../src/Progress.tsx","../src/Spinner.tsx","../src/Switch.tsx","../src/Select.tsx","../src/Container.tsx","../src/Card.tsx","../src/StatCard.tsx","../src/Timeline.tsx","../src/Item.tsx","../src/chart-internal.ts","../src/BarChart.tsx","../src/ChartLegend.tsx","../src/Donut.tsx","../src/StackedBar.tsx","../src/dialog-internal.ts","../src/Dialog.tsx","../src/Drawer.tsx","../src/Field.tsx","../src/Footer.tsx","../src/Menu.tsx","../src/Navbar.tsx","../src/Tabs.tsx","../src/CodeBlock.tsx","../src/Prose.tsx","../src/Tooltip.tsx","../src/PropertyList.tsx","../src/Table.tsx","../src/Sidebar.tsx"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\n\n/**\n * Per-slot class overrides for a component's internal sub-elements. Keys are\n * slot names; values are consumer classes passed through verbatim (never\n * `_ao-`-prefixed), exactly like the top-level `className`. `className` targets\n * the root; `classNames` reaches the inner slots the shorthand props render.\n */\nexport type SlotClasses<Slot extends string> = Partial<Record<Slot, string>>;\n\n/**\n * Every admin class is prefixed so the bundle coexists with host-page CSS\n * without colliding on common names like `.btn`. Must match the selector\n * prefix `wrap-scoped.mjs` bakes into `@aortl/admin-css/admin.scoped.css`.\n */\nconst PREFIX = \"_ao-\";\n\nfunction prefixTokens(value: string): string {\n if (!value) return \"\";\n return value\n .split(/\\s+/)\n .filter(Boolean)\n .map((token) => `${PREFIX}${token}`)\n .join(\" \");\n}\n\nfunction join(...parts: Array<string | undefined>): string {\n return parts.filter(Boolean).join(\" \");\n}\n\n/**\n * className merger that preserves Base UI's render-prop className form —\n * a function `className` is deferred until Base UI invokes it with state.\n *\n * `base` carries admin's own classes and is always prefixed with `_ao-`.\n * `className` is the consumer-supplied prop and passes through verbatim —\n * it lives in the caller's namespace.\n */\nexport function cn(base: ClassValue, className: string | undefined): string;\nexport function cn<TState>(\n base: ClassValue,\n className: (state: TState) => string | undefined,\n): (state: TState) => string;\nexport function cn<TState>(\n base: ClassValue,\n className: string | ((state: TState) => string | undefined) | undefined,\n): string | ((state: TState) => string);\nexport function cn<TState>(\n base: ClassValue,\n className: string | ((state: TState) => string | undefined) | undefined,\n): string | ((state: TState) => string) {\n const baseClasses = prefixTokens(clsx(base));\n if (typeof className === \"function\") {\n return (state) => join(baseClasses, className(state) ?? undefined);\n }\n return join(baseClasses, className);\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type AccordionProps = ComponentProps<\"div\">;\n\nfunction AccordionRoot({ className, ...rest }: AccordionProps) {\n return <div className={cn(\"accordion\", className)} {...rest} />;\n}\n\nexport type AccordionItemProps = ComponentProps<\"details\">;\n\nfunction AccordionItem({ className, ...rest }: AccordionItemProps) {\n return <details className={cn(\"accordion-item\", className)} {...rest} />;\n}\n\nexport type AccordionSummaryProps = ComponentProps<\"summary\">;\n\nfunction AccordionSummary({ className, ...rest }: AccordionSummaryProps) {\n return <summary className={cn(\"accordion-summary\", className)} {...rest} />;\n}\n\nexport type AccordionContentProps = ComponentProps<\"div\">;\n\nfunction AccordionContent({ className, ...rest }: AccordionContentProps) {\n return <div className={cn(\"accordion-content\", className)} {...rest} />;\n}\n\nexport const Accordion = Object.assign(AccordionRoot, {\n Item: AccordionItem,\n Summary: AccordionSummary,\n Content: AccordionContent,\n});\n","import { createContext, type RefObject } from \"react\";\n\n/**\n * Container Base UI popups portal into. `<AdminRoot>` publishes its element so\n * popups stay inside the `@scope (._ao-admin-root)` subtree — portaled to\n * `document.body` they fall outside the scope and render unstyled. A `<Dialog>`\n * ancestor overrides it with its `<dialog>` so popups join the top layer above\n * the backdrop. Null falls back to `document.body`.\n */\nexport const PortalContainerContext = createContext<RefObject<HTMLElement | null> | null>(null);\n","import { useCallback, useRef, type CSSProperties, type ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport interface AdminRootProps extends ComponentProps<\"div\"> {\n /**\n * Force a color scheme for this subtree. Sets `data-theme`, which flips the\n * semantic tokens and `color-scheme`. Omit to follow the OS preference.\n */\n theme?: \"light\" | \"dark\";\n /**\n * CSS color (e.g. `var(--color-purple-600)`) applied as `--color-system-accent`\n * to brand-shift the navbar + footer stripes and `<BrandTile>`. See\n * [Customize › System accent](https://digital-udvikling.github.io/admin-design-system/basics/customize/#system-accent).\n */\n systemAccent?: string;\n}\n\nexport function AdminRoot({ className, theme, systemAccent, style, ref, ...rest }: AdminRootProps) {\n const rootStyle =\n systemAccent !== undefined\n ? ({ ...style, \"--color-system-accent\": systemAccent } as CSSProperties)\n : style;\n\n // Publish this element as the portal container — Base UI popups otherwise\n // portal to `document.body`, outside `@scope (._ao-admin-root)`, and render\n // unstyled. A `<Dialog>` ancestor overrides this with its own `<dialog>`.\n const portalRef = useRef<HTMLElement | null>(null);\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n portalRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [ref],\n );\n\n return (\n <PortalContainerContext.Provider value={portalRef}>\n <div\n ref={setRef}\n className={cn(\"admin-root\", className)}\n style={rootStyle}\n {...rest}\n {...(theme !== undefined && { \"data-theme\": theme })}\n />\n </PortalContainerContext.Provider>\n );\n}\n","import { createElement, isValidElement } from \"react\";\nimport type { ComponentType, ReactElement, ReactNode } from \"react\";\n\n/** Props an icon component must accept — matches `@tabler/icons-react`, loose enough for other libraries. */\nexport interface IconRenderProps {\n size?: number | string;\n \"aria-hidden\"?: boolean | \"true\" | \"false\";\n}\n\nexport type IconComponent = ComponentType<IconRenderProps>;\n\n/** Component reference (rendered with `size=\"1em\" aria-hidden`) or pre-instantiated element (as-is). */\nexport type IconProp = IconComponent | ReactElement | null | undefined;\n\n/**\n * Render an `IconProp`, defaulting component references to `size=\"1em\"\n * aria-hidden`. `\"1em\"` makes SVG icons inherit the host `font-size`, matching\n * the Tabler webfont in the vanilla bundle.\n */\nexport function renderIcon(icon: IconProp, size: number | string = \"1em\"): ReactNode {\n if (icon == null) return null;\n if (isValidElement(icon)) return icon;\n return createElement(icon as IconComponent, { size, \"aria-hidden\": true });\n}\n","import type { ComponentProps, MouseEventHandler, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type AlertVariant = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nfunction DismissIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\nexport interface AlertProps extends Omit<ComponentProps<\"div\">, \"title\"> {\n variant: AlertVariant;\n /** Leading icon. Rendered as the first child so the CSS grid kicks in. */\n icon?: IconProp;\n /** Renders as `<Alert.Title>`. */\n title?: ReactNode;\n /** Renders as `<Alert.Description>`. */\n description?: ReactNode;\n /** Trailing action. Renders as `<Alert.Action>` after children so reading order matches. */\n action?: ReactNode;\n /** Renders a trailing dismiss (×) button. The Alert stays stateless — the consumer hides or removes it. */\n onDismiss?: MouseEventHandler<HTMLButtonElement>;\n /** aria-label for the dismiss button. Default: \"Dismiss\". */\n dismissLabel?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"title\" | \"description\" | \"action\" | \"dismiss\">;\n}\n\nfunction AlertRoot({\n variant,\n icon,\n title,\n description,\n action,\n onDismiss,\n dismissLabel = \"Dismiss\",\n classNames,\n className,\n role,\n children,\n ...rest\n}: AlertProps) {\n const defaultRole = variant === \"danger\" || variant === \"warning\" ? \"alert\" : \"status\";\n return (\n <div\n role={role ?? defaultRole}\n className={cn([\"alert\", `alert-${variant}`], className)}\n {...rest}\n >\n {renderIcon(icon)}\n {title !== undefined ? <AlertTitle className={classNames?.title}>{title}</AlertTitle> : null}\n {description !== undefined ? (\n <AlertDescription className={classNames?.description}>{description}</AlertDescription>\n ) : null}\n {children}\n {action !== undefined ? (\n <AlertAction className={classNames?.action}>{action}</AlertAction>\n ) : null}\n {onDismiss ? (\n <button\n type=\"button\"\n className={cn(\"alert-dismiss\", classNames?.dismiss)}\n aria-label={dismissLabel}\n onClick={onDismiss}\n >\n <DismissIcon />\n </button>\n ) : null}\n </div>\n );\n}\n\nexport type AlertTitleProps = ComponentProps<\"strong\">;\nfunction AlertTitle({ className, ...rest }: AlertTitleProps) {\n return <strong className={cn(\"alert-title\", className)} {...rest} />;\n}\n\nexport type AlertDescriptionProps = ComponentProps<\"p\">;\nfunction AlertDescription({ className, ...rest }: AlertDescriptionProps) {\n return <p className={cn(\"alert-description\", className)} {...rest} />;\n}\n\nexport type AlertActionProps = ComponentProps<\"div\">;\nfunction AlertAction({ className, ...rest }: AlertActionProps) {\n return <div className={cn(\"alert-action\", className)} {...rest} />;\n}\n\nexport const Alert = Object.assign(AlertRoot, {\n Title: AlertTitle,\n Description: AlertDescription,\n Action: AlertAction,\n});\n","import { createContext, useContext, useMemo, useState } from \"react\";\nimport type { CSSProperties, ComponentProps, ReactNode } from \"react\";\nimport { cn } from \"./cn\";\n\ninterface AppShellContextValue {\n mobileDrawerOpen: boolean;\n setMobileDrawerOpen: (open: boolean) => void;\n hasSidebar: boolean;\n}\n\nconst AppShellContext = createContext<AppShellContextValue | null>(null);\n\nexport function useAppShell(): AppShellContextValue | null {\n return useContext(AppShellContext);\n}\n\nexport interface AppShellProps extends ComponentProps<\"div\"> {\n hasSidebar?: boolean;\n mobileDrawerOpen?: boolean;\n defaultMobileDrawerOpen?: boolean;\n onMobileDrawerOpenChange?: (open: boolean) => void;\n /**\n * CSS color (e.g. `var(--color-purple-600)`) applied as `--color-system-accent`\n * to the shell root. See [Customize › System accent](https://digital-udvikling.github.io/admin-design-system/basics/customize/#system-accent).\n */\n systemAccent?: string;\n children?: ReactNode;\n}\n\nfunction AppShellRoot({\n hasSidebar = false,\n mobileDrawerOpen,\n defaultMobileDrawerOpen = false,\n onMobileDrawerOpenChange,\n systemAccent,\n className,\n style,\n children,\n ...rest\n}: AppShellProps) {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultMobileDrawerOpen);\n const isControlled = mobileDrawerOpen !== undefined;\n const open = isControlled ? mobileDrawerOpen : uncontrolledOpen;\n\n const value = useMemo<AppShellContextValue>(\n () => ({\n mobileDrawerOpen: open,\n setMobileDrawerOpen: (next) => {\n if (!isControlled) setUncontrolledOpen(next);\n onMobileDrawerOpenChange?.(next);\n },\n hasSidebar,\n }),\n [open, isControlled, onMobileDrawerOpenChange, hasSidebar],\n );\n\n const rootStyle =\n systemAccent !== undefined\n ? ({ ...style, \"--color-system-accent\": systemAccent } as CSSProperties)\n : style;\n\n return (\n <AppShellContext.Provider value={value}>\n <div\n className={cn([\"app-shell\", hasSidebar && \"app-shell-with-sidebar\"], className)}\n style={rootStyle}\n {...rest}\n >\n {children}\n </div>\n </AppShellContext.Provider>\n );\n}\n\nexport type AppShellMainProps = ComponentProps<\"main\">;\n\nfunction AppShellMain({ className, ...rest }: AppShellMainProps) {\n return <main className={cn(\"app-shell-main\", className)} {...rest} />;\n}\n\nexport const AppShell = Object.assign(AppShellRoot, {\n Main: AppShellMain,\n});\n","import type { ComponentProps, MouseEventHandler } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type BadgeVariant = \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"primary\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\n\nfunction RemoveIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\nexport interface BadgeProps extends ComponentProps<\"span\"> {\n variant?: BadgeVariant;\n size?: BadgeSize;\n /** Leading icon. */\n icon?: IconProp;\n /** Tinted fill with accent text instead of the solid status fill. */\n soft?: boolean;\n /** Renders a trailing remove button. */\n onRemove?: MouseEventHandler<HTMLButtonElement>;\n /** aria-label for the remove button. Default: \"Remove\". */\n removeLabel?: string;\n}\n\nexport function Badge({\n variant = \"neutral\",\n size = \"md\",\n icon,\n soft = false,\n onRemove,\n removeLabel = \"Remove\",\n className,\n children,\n ...rest\n}: BadgeProps) {\n return (\n <span\n className={cn(\n [\n \"badge\",\n variant !== \"neutral\" && `badge-${variant}`,\n size !== \"md\" && `badge-${size}`,\n soft && \"badge-soft\",\n ],\n className,\n )}\n {...rest}\n >\n {renderIcon(icon)}\n {children}\n {onRemove ? (\n <button\n type=\"button\"\n className={cn(\"badge-remove\", undefined)}\n aria-label={removeLabel}\n onClick={onRemove}\n >\n <RemoveIcon />\n </button>\n ) : null}\n </span>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type BrandTileVariant = \"solid\" | \"soft\" | \"info\" | \"success\" | \"danger\";\n\nexport interface BrandTileProps extends ComponentProps<\"span\"> {\n /** Tint treatment. `solid` is the accent fill; the rest are `*-muted` fills with a colored glyph. */\n variant?: BrandTileVariant;\n size?: \"md\" | \"lg\";\n /** 1–2 letter monogram. Ignored if `icon` or `src` is provided. */\n monogram?: string;\n /** Icon component or element. Takes precedence over `monogram`, yields to `src`. */\n icon?: IconProp;\n /** Logo image source. Wins over `icon` and `monogram`, flipping the tile to a bordered surface. */\n src?: string;\n /** Alt text for the image tile. Defaults to `\"\"` (decorative). */\n alt?: string;\n}\n\n/**\n * Brand/system mark for the navbar — monogram, icon, or shop logo. Precedence\n * is `src` > `icon` > `monogram`. Monogram/icon tiles are `aria-hidden`; image\n * tiles expose `alt` to assistive tech instead.\n */\nexport function BrandTile({\n variant = \"solid\",\n size = \"md\",\n monogram,\n icon,\n src,\n alt = \"\",\n className,\n children,\n ...rest\n}: BrandTileProps) {\n const classes = cn(\n [\n \"brand-tile\",\n variant !== \"solid\" && `brand-tile-${variant}`,\n size === \"lg\" && \"brand-tile-lg\",\n ],\n className,\n );\n\n if (src) {\n return (\n <span className={classes} {...rest}>\n <img src={src} alt={alt} />\n </span>\n );\n }\n\n return (\n <span className={classes} aria-hidden {...rest}>\n {icon ? renderIcon(icon) : (children ?? monogram)}\n </span>\n );\n}\n","import { Avatar as BaseAvatar } from \"@base-ui/react/avatar\";\nimport { Children, type ComponentProps, type ReactNode } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type AvatarSize = \"sm\" | \"md\" | \"lg\";\nexport type AvatarShape = \"circle\" | \"square\";\n\nexport interface AvatarProps extends ComponentProps<\"span\"> {\n src?: string;\n alt?: string;\n /** Fallback text, typically 1–3 letters. Ignored when `children` is given. */\n initials?: string;\n size?: AvatarSize;\n shape?: AvatarShape;\n}\n\n/**\n * Image avatar with an initials fallback. Initials show until the image loads\n * (and again, React-only, if it errors); the vanilla CSS layers the `<img>`\n * over the initials instead.\n */\nexport function Avatar({\n src,\n alt,\n initials,\n size = \"md\",\n shape = \"circle\",\n className,\n children,\n ...rest\n}: AvatarProps) {\n const fallback: ReactNode = children ?? initials;\n return (\n <BaseAvatar.Root\n className={cn(\n [\"avatar\", size !== \"md\" && `avatar-${size}`, shape === \"square\" && \"avatar-square\"],\n className,\n )}\n {...rest}\n >\n {fallback !== undefined ? <BaseAvatar.Fallback>{fallback}</BaseAvatar.Fallback> : null}\n {src !== undefined ? <BaseAvatar.Image src={src} alt={alt} /> : null}\n </BaseAvatar.Root>\n );\n}\n\nexport interface AvatarGroupProps extends ComponentProps<\"div\"> {\n /** Cap the visible avatars; the rest collapse into a trailing \"+N\" tile. */\n max?: number;\n /** Size for the surplus tile — match the avatars inside. Default `\"md\"`. */\n size?: AvatarSize;\n}\n\n/** Overlapping stack of avatars; later children paint on top. `max` caps the visible count. */\nexport function AvatarGroup({ max, size = \"md\", className, children, ...rest }: AvatarGroupProps) {\n const items = Children.toArray(children);\n const overflow = max !== undefined && items.length > max ? items.length - max : 0;\n const visible = overflow > 0 ? items.slice(0, max) : items;\n return (\n <div className={cn(\"avatar-group\", className)} {...rest}>\n {visible}\n {overflow > 0 ? (\n <span\n className={cn([\"avatar\", size !== \"md\" && `avatar-${size}`, \"avatar-more\"], undefined)}\n aria-label={`+${overflow} more`}\n >\n +{overflow}\n </span>\n ) : null}\n </div>\n );\n}\n","/**\n * Pure helpers for the hotkey system. Chord syntax: `<mod>+…+<key>`, e.g.\n * `mod+s`, `?`, `mod+shift+k`. `mod` resolves to the platform's primary\n * command modifier (⌘ on Apple, Ctrl elsewhere). The key is lowercased\n * `KeyboardEvent.key`. Bind shifted printable symbols bare (`\"?\"`, not\n * `\"shift+?\"`); `shift` stays explicit for letters and named keys.\n */\n\nexport type Modifier = \"ctrl\" | \"shift\" | \"alt\" | \"meta\";\n\nexport interface ParsedChord {\n mods: ReadonlySet<Modifier>;\n key: string;\n}\n\nconst MOD_ORDER: readonly Modifier[] = [\"ctrl\", \"shift\", \"alt\", \"meta\"];\n\n// Detected once at module load (SSR-safe — the registry never dispatches\n// server-side) and shared by parse and display so a binding and its `<Kbd>` chip agree.\nfunction detectApplePlatform(): boolean {\n if (typeof navigator === \"undefined\") return false;\n const uaData = (navigator as Navigator & { userAgentData?: { platform?: string } }).userAgentData;\n const platform = uaData?.platform || navigator.platform || \"\";\n return /^(mac|iphone|ipad|ipod)/i.test(platform);\n}\n\nconst IS_APPLE = detectApplePlatform();\nconst MOD_TARGET: Modifier = IS_APPLE ? \"meta\" : \"ctrl\";\n\nfunction tokenToMod(token: string): Modifier | null {\n switch (token) {\n case \"mod\":\n return MOD_TARGET;\n case \"ctrl\":\n case \"control\":\n return \"ctrl\";\n case \"shift\":\n return \"shift\";\n case \"alt\":\n return \"alt\";\n case \"meta\":\n return \"meta\";\n default:\n return null;\n }\n}\n\nexport function parseChord(input: string): ParsedChord {\n const tokens = input\n .trim()\n .toLowerCase()\n .split(\"+\")\n .map((t) => t.trim())\n .filter(Boolean);\n if (tokens.length === 0) {\n throw new Error(`Invalid hotkey: empty string`);\n }\n const mods = new Set<Modifier>();\n let key: string | null = null;\n for (const token of tokens) {\n const mod = tokenToMod(token);\n if (mod !== null) {\n mods.add(mod);\n continue;\n }\n if (key !== null) {\n throw new Error(`Invalid hotkey \"${input}\": multiple non-modifier keys`);\n }\n key = token;\n }\n if (key === null) {\n throw new Error(`Invalid hotkey \"${input}\": missing key`);\n }\n return { mods, key };\n}\n\nexport function parseKeys(keys: string | readonly string[]): ParsedChord[] {\n const list = typeof keys === \"string\" ? [keys] : keys;\n return list.map(parseChord);\n}\n\n/** Canonical wire form used as a map key in the registry. */\nexport function canonicalize(chord: ParsedChord): string {\n const parts: string[] = [];\n for (const mod of MOD_ORDER) {\n if (chord.mods.has(mod)) parts.push(mod);\n }\n parts.push(chord.key);\n return parts.join(\"+\");\n}\n\n/** Canonical chord string for a keyboard event; `null` for a bare modifier press. */\nexport function normalizeEvent(e: KeyboardEvent): string | null {\n const key = e.key.toLowerCase();\n if (key === \"control\" || key === \"shift\" || key === \"alt\" || key === \"meta\") {\n return null;\n }\n const mods = new Set<Modifier>();\n if (e.ctrlKey) mods.add(\"ctrl\");\n // A shifted symbol (`?`, `:`) already encodes Shift in the character, so a bare\n // `\"?\"` binding matches; letters and named keys keep Shift explicit.\n if (e.shiftKey && !isShiftedSymbol(key)) mods.add(\"shift\");\n if (e.altKey) mods.add(\"alt\");\n if (e.metaKey) mods.add(\"meta\");\n return canonicalize({ mods, key });\n}\n\nfunction isShiftedSymbol(key: string): boolean {\n return key.length === 1 && !/[a-z0-9]/.test(key);\n}\n\nconst SPECIAL_KEY_LABELS: Record<string, string> = {\n escape: \"Esc\",\n esc: \"Esc\",\n enter: \"Enter\",\n return: \"Enter\",\n tab: \"Tab\",\n \" \": \"Space\",\n space: \"Space\",\n arrowup: \"↑\",\n arrowdown: \"↓\",\n arrowleft: \"←\",\n arrowright: \"→\",\n backspace: \"Backspace\",\n delete: \"Del\",\n};\n\nconst MOD_LABELS: Record<Modifier, string> = IS_APPLE\n ? { ctrl: \"⌃\", shift: \"⇧\", alt: \"⌥\", meta: \"⌘\" }\n : { ctrl: \"Ctrl\", shift: \"Shift\", alt: \"Alt\", meta: \"Meta\" };\n\n/** Visual chips for a chord — one entry per modifier and the final key. */\nexport function formatChord(chord: ParsedChord): string[] {\n const parts: string[] = [];\n for (const mod of MOD_ORDER) {\n if (chord.mods.has(mod)) parts.push(MOD_LABELS[mod]);\n }\n const special = SPECIAL_KEY_LABELS[chord.key];\n if (special !== undefined) {\n parts.push(special);\n } else if (chord.key.length === 1) {\n parts.push(chord.key.toUpperCase());\n } else {\n parts.push(chord.key.charAt(0).toUpperCase() + chord.key.slice(1));\n }\n return parts;\n}\n\nconst ARIA_MOD_LABELS: Record<Modifier, string> = {\n ctrl: \"Control\",\n shift: \"Shift\",\n alt: \"Alt\",\n meta: \"Meta\",\n};\n\nfunction toAriaPart(chord: ParsedChord): string {\n const parts: string[] = [];\n for (const mod of MOD_ORDER) {\n if (chord.mods.has(mod)) parts.push(ARIA_MOD_LABELS[mod]);\n }\n parts.push(chord.key.length === 1 ? chord.key.toUpperCase() : chord.key);\n return parts.join(\"+\");\n}\n\n/** Serialize chords to `aria-keyshortcuts` format (space-separated alternatives). */\nexport function toAriaKeyShortcuts(chords: readonly ParsedChord[]): string {\n return chords.map(toAriaPart).join(\" \");\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { formatChord, parseKeys } from \"./hotkey-parse\";\n\nexport interface KbdProps extends Omit<ComponentProps<\"span\">, \"children\"> {\n /**\n * Chord(s) in `useHotkey` syntax. Only the first alternative renders,\n * matching the platform menu convention of showing the primary binding.\n */\n keys?: string | readonly string[];\n /** Literal text rendered as a single chip — for inline use in tooltips/prose. */\n children?: string;\n}\n\n/** Keyboard shortcut chips — parsed via `keys`, or a single literal chip via `children`. */\nexport function Kbd({ keys, children, className, ...rest }: KbdProps) {\n if (keys != null) {\n const chord = parseKeys(keys)[0];\n if (!chord) {\n return null;\n }\n const parts = formatChord(chord);\n return (\n <span className={cn(\"kbd-group\", className)} {...rest}>\n {parts.map((part, i) => (\n <kbd key={`${i}-${part}`} className={cn(\"kbd\", undefined)}>\n {part}\n </kbd>\n ))}\n </span>\n );\n }\n return (\n <kbd className={cn(\"kbd\", className)} {...rest}>\n {children}\n </kbd>\n );\n}\n","import type { RefObject } from \"react\";\nimport { normalizeEvent } from \"./hotkey-parse\";\n\n/**\n * Module-level keyboard shortcut registry: one window keydown listener,\n * attached on first registration and detached when the registry empties.\n */\n\nexport type HotkeyHandler = (e: KeyboardEvent) => void;\n\nexport interface HotkeyEntry {\n handlerRef: RefObject<HotkeyHandler>;\n}\n\nconst registry = new Map<string, Set<HotkeyEntry>>();\nlet listenerAttached = false;\n\nfunction ensureListener(): void {\n if (listenerAttached || typeof window === \"undefined\") return;\n window.addEventListener(\"keydown\", dispatch);\n listenerAttached = true;\n}\n\nfunction maybeDetachListener(): void {\n if (!listenerAttached || typeof window === \"undefined\") return;\n if (registry.size > 0) return;\n window.removeEventListener(\"keydown\", dispatch);\n listenerAttached = false;\n}\n\nfunction isEditableTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n if (target.isContentEditable) return true;\n const tag = target.tagName;\n return tag === \"INPUT\" || tag === \"TEXTAREA\";\n}\n\nfunction dispatch(e: KeyboardEvent): void {\n // A held chord autorepeats keydown; the bound action should fire once per press.\n if (e.repeat) return;\n const chord = normalizeEvent(e);\n if (chord === null) return;\n const bucket = registry.get(chord);\n if (!bucket || bucket.size === 0) return;\n\n // Bare-key chords are silent in editable elements; `escape` stays live so dialogs can close.\n if (isEditableTarget(e.target) && !chord.includes(\"+\") && chord !== \"escape\") return;\n\n e.preventDefault();\n for (const entry of bucket) {\n entry.handlerRef.current?.(e);\n }\n}\n\n/** Returns an unregister function. */\nexport function register(canonicalChords: readonly string[], entry: HotkeyEntry): () => void {\n for (const chord of canonicalChords) {\n let bucket = registry.get(chord);\n if (!bucket) {\n bucket = new Set();\n registry.set(chord, bucket);\n }\n bucket.add(entry);\n }\n ensureListener();\n return () => {\n for (const chord of canonicalChords) {\n const bucket = registry.get(chord);\n if (!bucket) continue;\n bucket.delete(entry);\n if (bucket.size === 0) registry.delete(chord);\n }\n maybeDetachListener();\n };\n}\n\n/** Test-only: empty the registry and detach the listener. */\nexport function __resetRegistry(): void {\n registry.clear();\n maybeDetachListener();\n}\n","import { useEffect, useMemo, useRef } from \"react\";\nimport { canonicalize, parseKeys, toAriaKeyShortcuts } from \"./hotkey-parse\";\nimport { register, type HotkeyEntry, type HotkeyHandler } from \"./hotkey-registry\";\n\nexport interface HotkeyOptions {\n /** When false, the binding is not registered. Defaults to true. */\n enabled?: boolean;\n}\n\nexport interface HotkeyInfo {\n /** `aria-keyshortcuts` attribute value; undefined when `keys` is nullish. */\n ariaKeyShortcuts: string | undefined;\n /** Canonical first alternative, for `<Kbd keys={primaryChord} />`; undefined when `keys` is nullish. */\n primaryChord: string | undefined;\n canonicalChords: readonly string[];\n}\n\n/**\n * Register a keyboard shortcut, e.g. `useHotkey(\"mod+s\", save)`. The handler\n * is latched in a ref, so callers need not memoize it. Nullish `keys` is a\n * no-op, so the hook is safe to call unconditionally.\n */\nexport function useHotkey(\n keys: string | readonly string[] | null | undefined,\n handler: HotkeyHandler,\n options?: HotkeyOptions,\n): HotkeyInfo {\n const enabled = options?.enabled ?? true;\n const handlerRef = useRef<HotkeyHandler>(handler);\n handlerRef.current = handler;\n\n // Stable string ID so a fresh array with the same bindings doesn't re-register; nullish → \"\".\n const keyId = keys == null ? \"\" : Array.isArray(keys) ? keys.join(\"|\") : (keys as string);\n\n const derived = useMemo<HotkeyInfo>(() => {\n if (keyId === \"\") {\n return { canonicalChords: [], ariaKeyShortcuts: undefined, primaryChord: undefined };\n }\n const parsed = parseKeys(keys as string | readonly string[]);\n const cans = parsed.map(canonicalize);\n return {\n canonicalChords: cans,\n ariaKeyShortcuts: toAriaKeyShortcuts(parsed),\n primaryChord: cans[0],\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [keyId]);\n\n useEffect(() => {\n if (!enabled || derived.canonicalChords.length === 0) return;\n const entry: HotkeyEntry = { handlerRef };\n return register(derived.canonicalChords, entry);\n }, [derived, enabled]);\n\n return derived;\n}\n","import { Button as BaseButton } from \"@base-ui/react/button\";\nimport { useCallback, useRef, type ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\nimport { Kbd } from \"./Kbd\";\nimport { useHotkey } from \"./useHotkey\";\n\nexport type ButtonVariant = \"default\" | \"primary\" | \"ghost\" | \"muted\" | \"danger\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ComponentProps<typeof BaseButton> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n fullWidth?: boolean;\n /** Shows a spinner in place of the leading icon and disables interaction.\n * Sets `aria-busy=\"true\"` and the native `disabled` attribute. */\n loading?: boolean;\n /** Leading icon. Pass a component (`icon={IconPlus}`) or an element. */\n icon?: IconProp;\n /** Trailing icon. Pass a component (`iconTrailing={IconArrowRight}`) or an element. */\n iconTrailing?: IconProp;\n /**\n * Keyboard shortcut that dispatches a native click on the rendered element —\n * `onClick` fires, `type=\"submit\"` submits, an anchor-rendered button\n * (`render={<a href>}`) navigates. Same syntax as `useHotkey`. Pass an array\n * for alternatives — only the first is rendered as a visual chip.\n */\n hotkey?: string | readonly string[];\n}\n\nexport function Button({\n variant = \"default\",\n size = \"md\",\n fullWidth,\n loading,\n icon,\n iconTrailing,\n hotkey,\n className,\n type = \"button\",\n disabled,\n children,\n onClick,\n ref,\n ...rest\n}: ButtonProps) {\n // Latch the rendered element so the hotkey can dispatch a real `.click()`\n // with its native side effects (form submit, anchor navigation).\n const elementRef = useRef<HTMLElement | null>(null);\n const setRef = useCallback(\n (node: HTMLElement | null) => {\n elementRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [ref],\n );\n\n const { ariaKeyShortcuts, primaryChord } = useHotkey(hotkey, () => elementRef.current?.click(), {\n enabled: !disabled && !loading,\n });\n\n const iconOnly = children == null && (icon != null || iconTrailing != null);\n\n return (\n <BaseButton\n ref={setRef}\n onClick={onClick}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n aria-keyshortcuts={ariaKeyShortcuts}\n className={cn(\n [\n \"btn\",\n variant !== \"default\" && `btn-${variant}`,\n size !== \"md\" && `btn-${size}`,\n fullWidth && \"btn-full-width\",\n loading && \"btn-loading\",\n iconOnly && \"btn-square\",\n ],\n className,\n )}\n {...rest}\n >\n {loading ? null : renderIcon(icon)}\n {children}\n {renderIcon(iconTrailing)}\n {primaryChord !== undefined ? <Kbd keys={primaryChord} /> : null}\n </BaseButton>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type ButtonGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport interface ButtonGroupProps extends ComponentProps<\"div\"> {\n orientation?: ButtonGroupOrientation;\n /** Stretch across the container. Horizontal groups split the row into\n * equal-width buttons; vertical groups fill the container width. */\n fullWidth?: boolean;\n}\n\nexport function ButtonGroup({\n orientation = \"horizontal\",\n fullWidth = false,\n role = \"group\",\n className,\n ...rest\n}: ButtonGroupProps) {\n return (\n <div\n role={role}\n className={cn(\n [\n \"btn-group\",\n orientation === \"vertical\" && \"btn-group-vertical\",\n fullWidth && \"btn-group-full-width\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n","import { Children, Fragment, isValidElement, type ComponentProps, type ReactNode } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport interface BreadcrumbsProps extends ComponentProps<\"nav\"> {\n /** Custom separator between items. Defaults to \"/\" from CSS. */\n separator?: ReactNode;\n \"aria-label\"?: string;\n}\n\nfunction BreadcrumbsRoot({\n separator,\n className,\n children,\n \"aria-label\": ariaLabel = \"Breadcrumb\",\n ...rest\n}: BreadcrumbsProps) {\n const items = Children.toArray(children).filter(isValidElement);\n return (\n <nav aria-label={ariaLabel} className={cn(\"breadcrumbs\", className)} {...rest}>\n <ol>\n {items.map((child, i) => (\n <Fragment key={child.key ?? i}>\n {child}\n {i < items.length - 1 ? <BreadcrumbSeparator>{separator}</BreadcrumbSeparator> : null}\n </Fragment>\n ))}\n </ol>\n </nav>\n );\n}\n\ntype BreadcrumbItemAsLink = ComponentProps<\"a\"> & {\n href: string;\n current?: boolean;\n icon?: IconProp;\n};\ntype BreadcrumbItemAsSpan = ComponentProps<\"span\"> & {\n href?: undefined;\n current?: boolean;\n icon?: IconProp;\n};\n\nexport type BreadcrumbItemProps = BreadcrumbItemAsLink | BreadcrumbItemAsSpan;\n\nfunction BreadcrumbItem(props: BreadcrumbItemProps) {\n if (props.href !== undefined) {\n const { className, current, icon, children, ...rest } = props;\n return (\n <li>\n <a\n className={cn(\"breadcrumb-item\", className)}\n aria-current={current ? \"page\" : undefined}\n {...rest}\n >\n {renderIcon(icon, 14)}\n {children}\n </a>\n </li>\n );\n }\n const { className, current, icon, children, ...rest } = props;\n return (\n <li>\n <span\n className={cn(\"breadcrumb-item\", className)}\n aria-current={current ? \"page\" : undefined}\n {...rest}\n >\n {renderIcon(icon, 14)}\n {children}\n </span>\n </li>\n );\n}\n\nexport type BreadcrumbSeparatorProps = ComponentProps<\"li\">;\n\n// `role=\"presentation\"` keeps it out of the list semantics; `<li>` keeps the `<ol>` valid.\nfunction BreadcrumbSeparator({ className, children, ...rest }: BreadcrumbSeparatorProps) {\n return (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"breadcrumb-separator\", className)}\n {...rest}\n >\n {children}\n </li>\n );\n}\n\nexport const Breadcrumbs = Object.assign(BreadcrumbsRoot, {\n Item: BreadcrumbItem,\n Separator: BreadcrumbSeparator,\n});\n","import { Input as BaseInput } from \"@base-ui/react/input\";\nimport { useCallback, useRef, useState, type ComponentProps, type ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type InputVariant = \"bordered\" | \"ghost\" | \"danger\" | \"info\" | \"success\" | \"warning\";\nexport type InputSize = \"sm\" | \"md\" | \"lg\";\n\ntype BaseInputProps = Omit<ComponentProps<typeof BaseInput>, \"size\">;\n// Base UI augments the native change event with `preventBaseUIHandler`; derive its\n// exact type so the wrapper's handler and the consumer's `onChange` line up.\ntype InputChangeEvent = Parameters<NonNullable<BaseInputProps[\"onChange\"]>>[0];\n\nexport interface InputProps extends BaseInputProps {\n variant?: InputVariant;\n inputSize?: InputSize;\n /** Leading icon, floated inside the field. Pass a component (`icon={IconSearch}`) or an element. */\n icon?: IconProp;\n /** Trailing icon, floated inside the field. Pass a component (`iconTrailing={IconX}`) or an element. */\n iconTrailing?: IconProp;\n /** Show a trailing clear (×) button while the field holds a value. */\n clearable?: boolean;\n /** aria-label for the clear button. Default `\"Clear\"`. */\n clearLabel?: string;\n /** Called after the clear button empties the field. */\n onClear?: () => void;\n /** Custom interactive trailing control (style it `.input-action`), e.g. a reveal toggle. */\n action?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"wrapper\" | \"action\">;\n}\n\nfunction ClearIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\nexport function Input({\n variant = \"bordered\",\n inputSize = \"md\",\n icon,\n iconTrailing,\n clearable = false,\n clearLabel = \"Clear\",\n onClear,\n action,\n className,\n classNames,\n type = \"text\",\n value,\n defaultValue,\n onChange,\n disabled,\n readOnly,\n ref: consumerRef,\n ...rest\n}: InputProps) {\n const innerRef = useRef<HTMLInputElement | null>(null);\n const isControlled = value !== undefined;\n const [uncontrolledHasValue, setUncontrolledHasValue] = useState(\n () => defaultValue != null && String(defaultValue).length > 0,\n );\n const hasValue = isControlled ? value != null && String(value).length > 0 : uncontrolledHasValue;\n\n const setRef = useCallback(\n (node: HTMLInputElement | null) => {\n innerRef.current = node;\n if (typeof consumerRef === \"function\") consumerRef(node);\n else if (consumerRef) consumerRef.current = node;\n },\n [consumerRef],\n );\n\n function handleChange(event: InputChangeEvent) {\n if (!isControlled) setUncontrolledHasValue(event.target.value.length > 0);\n onChange?.(event);\n }\n\n function handleClear() {\n const input = innerRef.current;\n if (!input) return;\n // Native value setter + a dispatched input event so React (and form libraries) see a real change.\n const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, \"value\")?.set;\n setter?.call(input, \"\");\n input.dispatchEvent(new Event(\"input\", { bubbles: true }));\n input.focus();\n if (!isControlled) setUncontrolledHasValue(false);\n onClear?.();\n }\n\n const showClear = clearable && hasValue && !disabled && !readOnly;\n\n const inputEl = (\n <BaseInput\n ref={setRef}\n type={type}\n value={value}\n defaultValue={defaultValue}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readOnly}\n className={cn(\n [\n \"input\",\n variant !== \"bordered\" && `input-${variant}`,\n inputSize !== \"md\" && `input-${inputSize}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n\n // Clearable inputs always wrap (a stable tree) so the field doesn't remount —\n // and lose focus — when the clear button appears on the first keystroke.\n const wrap = icon != null || iconTrailing != null || action != null || clearable;\n if (!wrap) return inputEl;\n\n const trailing = showClear ? (\n <button\n type=\"button\"\n className={cn(\"input-action\", classNames?.action)}\n aria-label={clearLabel}\n onClick={handleClear}\n >\n <ClearIcon />\n </button>\n ) : (\n (action ?? renderIcon(iconTrailing))\n );\n\n return (\n <span className={cn(\"input-icon\", classNames?.wrapper)}>\n {renderIcon(icon)}\n {inputEl}\n {trailing}\n </span>\n );\n}\n\nfunction EyeIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0\" />\n <path d=\"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6\" />\n </svg>\n );\n}\n\nfunction EyeOffIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M10.585 10.587a2 2 0 0 0 2.829 2.828\" />\n <path d=\"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87\" />\n <path d=\"M3 3l18 18\" />\n </svg>\n );\n}\n\nexport interface PasswordInputProps extends Omit<\n InputProps,\n \"type\" | \"action\" | \"clearable\" | \"onClear\" | \"clearLabel\"\n> {\n /** aria-label for the reveal toggle. Default `\"Show password\"`. */\n revealLabel?: string;\n}\n\n/** Password field with a trailing reveal toggle. Emits the same `.input` / `.input-action` classes. */\nexport function PasswordInput({\n revealLabel = \"Show password\",\n classNames,\n ...rest\n}: PasswordInputProps) {\n const [revealed, setRevealed] = useState(false);\n return (\n <Input\n type={revealed ? \"text\" : \"password\"}\n action={\n <button\n type=\"button\"\n className={cn(\"input-action\", classNames?.action)}\n aria-label={revealLabel}\n aria-pressed={revealed}\n onClick={() => setRevealed((v) => !v)}\n >\n {revealed ? <EyeOffIcon /> : <EyeIcon />}\n </button>\n }\n classNames={classNames}\n {...rest}\n />\n );\n}\n","import { Input as BaseInput } from \"@base-ui/react/input\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type FileInputVariant = \"bordered\" | \"ghost\" | \"danger\";\nexport type FileInputSize = \"sm\" | \"md\" | \"lg\";\n\ntype BaseInputProps = Omit<ComponentProps<typeof BaseInput>, \"size\" | \"type\">;\n\nexport interface FileInputProps extends BaseInputProps {\n variant?: FileInputVariant;\n inputSize?: FileInputSize;\n}\n\nexport function FileInput({\n variant = \"bordered\",\n inputSize = \"md\",\n className,\n ...rest\n}: FileInputProps) {\n return (\n <BaseInput\n type=\"file\"\n className={cn(\n [\n \"file-input\",\n variant !== \"bordered\" && `file-input-${variant}`,\n inputSize !== \"md\" && `file-input-${inputSize}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type InputGroupProps = ComponentProps<\"div\">;\n\nfunction InputGroupRoot({ className, ...rest }: InputGroupProps) {\n return <div className={cn(\"input-group\", className)} {...rest} />;\n}\n\nexport type InputGroupAddonProps = ComponentProps<\"span\">;\n\nfunction InputGroupAddon({ className, ...rest }: InputGroupAddonProps) {\n return <span className={cn(\"input-group-addon\", className)} {...rest} />;\n}\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n Addon: InputGroupAddon,\n});\n","import { NumberField } from \"@base-ui/react/number-field\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\n\nexport type NumberInputSize = \"sm\" | \"md\" | \"lg\";\n\nfunction MinusIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M5 12h14\" />\n </svg>\n );\n}\n\nfunction PlusIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n );\n}\n\nexport interface NumberInputProps extends ComponentProps<typeof NumberField.Root> {\n size?: NumberInputSize;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"group\" | \"decrement\" | \"input\" | \"increment\">;\n /** Input placeholder. */\n placeholder?: string;\n /** aria-label for the field when there's no associated `<label>`. */\n inputAriaLabel?: string;\n /** aria-label for the decrement button. Default `\"Decrease\"`. */\n decrementLabel?: string;\n /** aria-label for the increment button. Default `\"Increase\"`. */\n incrementLabel?: string;\n /** Override the decrement button content. */\n decrementIcon?: ReactNode;\n /** Override the increment button content. */\n incrementIcon?: ReactNode;\n}\n\n/**\n * Numeric field with stepper buttons over Base UI NumberField (clamp-on-blur,\n * step, `Intl` formatting via `format`). The vanilla bundle styles a native\n * `<input type=\"number\">` and steps with `stepUp()` / `stepDown()`.\n */\nexport function NumberInput({\n size = \"md\",\n classNames,\n placeholder,\n inputAriaLabel,\n decrementLabel = \"Decrease\",\n incrementLabel = \"Increase\",\n decrementIcon,\n incrementIcon,\n className,\n ...rootProps\n}: NumberInputProps) {\n return (\n <NumberField.Root className={cn(\"number-input-root\", className)} {...rootProps}>\n <NumberField.Group\n className={cn([\"number-input\", size !== \"md\" && `number-input-${size}`], classNames?.group)}\n >\n <NumberField.Decrement\n className={cn(\"number-input-step\", classNames?.decrement)}\n aria-label={decrementLabel}\n >\n {decrementIcon ?? <MinusIcon />}\n </NumberField.Decrement>\n <NumberField.Input\n className={cn(\"number-input-field\", classNames?.input)}\n placeholder={placeholder}\n aria-label={inputAriaLabel}\n />\n <NumberField.Increment\n className={cn(\"number-input-step\", classNames?.increment)}\n aria-label={incrementLabel}\n >\n {incrementIcon ?? <PlusIcon />}\n </NumberField.Increment>\n </NumberField.Group>\n </NumberField.Root>\n );\n}\n","import type { ComponentProps, CSSProperties, ReactNode } from \"react\";\nimport { Badge, type BadgeSize, type BadgeVariant } from \"./Badge\";\nimport { cn } from \"./cn\";\nimport type { IconProp } from \"./icon\";\n\nexport type IndicatorVertical = \"top\" | \"middle\" | \"bottom\";\nexport type IndicatorHorizontal = \"start\" | \"center\" | \"end\";\nexport type IndicatorPlacement = `${IndicatorVertical}-${IndicatorHorizontal}`;\n\nexport interface IndicatorProps extends ComponentProps<\"div\"> {\n /** Badge content (count, \"!\", text). Omit for a label-less status dot. */\n label?: ReactNode;\n /** Variant for both the badge and the dot. Defaults to `\"neutral\"`. */\n variant?: BadgeVariant;\n /** Badge size. Ignored when rendering a dot. Defaults to `\"sm\"`. */\n size?: BadgeSize;\n /** Leading icon for the badge. Implies the badge form (no dot fallback). */\n icon?: IconProp;\n /** Where the indicator sits relative to children. Default `\"top-end\"`. */\n placement?: IndicatorPlacement;\n /**\n * Pixels to pull the indicator toward the anchor's center — aligns it with\n * the visual corner of rounded anchors (e.g. `4` for `rounded-md`).\n */\n offset?: number;\n /** Clamp a numeric `label` to `${max}+` when it exceeds this value. */\n max?: number;\n}\n\nexport function Indicator({\n label,\n variant = \"neutral\",\n size = \"sm\",\n icon,\n placement = \"top-end\",\n offset,\n max,\n className,\n \"aria-label\": ariaLabel,\n style: styleProp,\n children,\n ...rest\n}: IndicatorProps) {\n const [vertical, horizontal] = placement.split(\"-\") as [IndicatorVertical, IndicatorHorizontal];\n const placementClasses = [\n \"indicator-item\",\n vertical !== \"top\" && `indicator-${vertical}`,\n horizontal !== \"end\" && `indicator-${horizontal}`,\n ];\n const hasContent = label !== undefined || icon !== undefined;\n const displayLabel =\n typeof label === \"number\" && max !== undefined && label > max ? `${max}+` : label;\n const style =\n offset !== undefined\n ? ({ ...styleProp, \"--indicator-offset\": `${offset}px` } as CSSProperties)\n : styleProp;\n return (\n <div className={cn(\"indicator\", className)} style={style} {...rest}>\n {hasContent ? (\n <Badge\n className={cn(placementClasses, undefined)}\n variant={variant}\n size={size}\n icon={icon}\n aria-label={ariaLabel}\n >\n {displayLabel}\n </Badge>\n ) : (\n <span\n className={cn(\n [\n ...placementClasses,\n \"indicator-dot\",\n variant !== \"neutral\" && `indicator-dot-${variant}`,\n ],\n undefined,\n )}\n role={ariaLabel !== undefined ? \"status\" : undefined}\n aria-label={ariaLabel}\n />\n )}\n {children}\n </div>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport interface LinkProps extends ComponentProps<\"a\"> {\n /**\n * Renders a trailing ↗ and defaults `target=\"_blank\"` +\n * `rel=\"noopener noreferrer\"`; explicit `target`/`rel` props win.\n */\n external?: boolean;\n /** Leading icon. */\n icon?: IconProp;\n /** Trailing icon. Independent of `external`'s ↗ — combining both renders two trailing markers. */\n iconTrailing?: IconProp;\n}\n\n/** A plain `<a>` with the design system's link styling. */\nexport function Link({\n external,\n icon,\n iconTrailing,\n className,\n target,\n rel,\n children,\n ...rest\n}: LinkProps) {\n return (\n <a\n target={target ?? (external ? \"_blank\" : undefined)}\n rel={rel ?? (external ? \"noopener noreferrer\" : undefined)}\n className={cn([\"link\", external && \"link-external\"], className)}\n {...rest}\n >\n {renderIcon(icon)}\n {children}\n {renderIcon(iconTrailing)}\n </a>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport interface SeparatorProps extends ComponentProps<\"hr\"> {\n /** A vertical rule for flex rows. Defaults to a horizontal rule. */\n orientation?: \"horizontal\" | \"vertical\";\n}\n\n/**\n * A styled `<hr>` (implicit `role=\"separator\"`). Margins are zeroed — spacing\n * comes from the parent's gap or margin utilities.\n */\nexport function Separator({ orientation = \"horizontal\", className, ...rest }: SeparatorProps) {\n const vertical = orientation === \"vertical\";\n return (\n <hr\n className={cn([\"separator\", vertical && \"separator-vertical\"], className)}\n aria-orientation={vertical ? \"vertical\" : undefined}\n {...rest}\n />\n );\n}\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type PaginationItem =\n | { type: \"page\"; page: number; selected: boolean }\n | { type: \"previous\"; page: number; disabled: boolean }\n | { type: \"next\"; page: number; disabled: boolean }\n | { type: \"ellipsis\"; key: \"start\" | \"end\" };\n\nexport interface PaginationProps extends Omit<ComponentProps<\"nav\">, \"onChange\"> {\n /** Current page, 1-based. */\n page: number;\n /** Total number of pages. */\n total: number;\n onPageChange: (page: number) => void;\n /** Pages shown either side of `page`. Default 1. */\n siblingCount?: number;\n /** Pages always shown at the start and end. Default 1. */\n boundaryCount?: number;\n /** Icon for the previous-page control. Defaults to a built-in chevron. */\n previousIcon?: IconProp;\n /** Icon for the next-page control. Defaults to a built-in chevron. */\n nextIcon?: IconProp;\n /** Override the renderer for one item — for routing libraries that supply their own Link. */\n renderItem?: (item: PaginationItem) => ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"item\" | \"link\" | \"ellipsis\">;\n}\n\n/** Pure (safe during render): previous, numbers/ellipses (`boundaryCount` at each end, `siblingCount` around `page`), next. */\nexport function getPaginationItems({\n page,\n total,\n siblingCount = 1,\n boundaryCount = 1,\n}: {\n page: number;\n total: number;\n siblingCount?: number;\n boundaryCount?: number;\n}): PaginationItem[] {\n if (total <= 0) {\n return [\n { type: \"previous\", page: 1, disabled: true },\n { type: \"next\", page: 1, disabled: true },\n ];\n }\n const clampedPage = Math.min(Math.max(1, page), total);\n const items: PaginationItem[] = [];\n items.push({ type: \"previous\", page: clampedPage - 1, disabled: clampedPage === 1 });\n\n const startPages = range(1, Math.min(boundaryCount, total));\n const endPages = range(Math.max(total - boundaryCount + 1, boundaryCount + 1), total);\n\n const siblingsStart = Math.max(\n Math.min(clampedPage - siblingCount, total - boundaryCount - siblingCount * 2 - 1),\n boundaryCount + 2,\n );\n const siblingsEnd = Math.min(\n Math.max(clampedPage + siblingCount, boundaryCount + siblingCount * 2 + 2),\n endPages.length > 0 ? (endPages[0] as number) - 2 : total - 1,\n );\n\n const middle: (number | \"ellipsis-start\" | \"ellipsis-end\")[] = [];\n // Start ellipsis (or extra page when gap is exactly 1)\n if (siblingsStart > boundaryCount + 2) {\n middle.push(\"ellipsis-start\");\n } else if (boundaryCount + 1 < total - boundaryCount) {\n middle.push(boundaryCount + 1);\n }\n\n middle.push(...range(siblingsStart, siblingsEnd));\n\n // End ellipsis (or extra page when gap is exactly 1)\n if (siblingsEnd < total - boundaryCount - 1) {\n middle.push(\"ellipsis-end\");\n } else if (total - boundaryCount > boundaryCount) {\n middle.push(total - boundaryCount);\n }\n\n const seen = new Set<number>();\n const pushNumber = (n: number) => {\n if (n < 1 || n > total || seen.has(n)) return;\n seen.add(n);\n items.push({ type: \"page\", page: n, selected: n === clampedPage });\n };\n\n for (const n of startPages) pushNumber(n);\n for (const entry of middle) {\n if (entry === \"ellipsis-start\") {\n items.push({ type: \"ellipsis\", key: \"start\" });\n } else if (entry === \"ellipsis-end\") {\n items.push({ type: \"ellipsis\", key: \"end\" });\n } else {\n pushNumber(entry);\n }\n }\n for (const n of endPages) pushNumber(n);\n\n items.push({ type: \"next\", page: clampedPage + 1, disabled: clampedPage === total });\n return items;\n}\n\nfunction range(start: number, end: number): number[] {\n if (end < start) return [];\n const out: number[] = [];\n for (let i = start; i <= end; i++) out.push(i);\n return out;\n}\n\nexport function Pagination({\n page,\n total,\n onPageChange,\n siblingCount = 1,\n boundaryCount = 1,\n previousIcon,\n nextIcon,\n renderItem,\n className,\n classNames,\n \"aria-label\": ariaLabel = \"Pagination\",\n ...rest\n}: PaginationProps) {\n const items = getPaginationItems({ page, total, siblingCount, boundaryCount });\n const prev = previousIcon !== undefined ? renderIcon(previousIcon, 16) : <ChevronLeftIcon />;\n const next = nextIcon !== undefined ? renderIcon(nextIcon, 16) : <ChevronRightIcon />;\n return (\n <nav aria-label={ariaLabel} className={cn(\"pagination\", className)} {...rest}>\n <ul>\n {items.map((item, i) => (\n <li key={paginationItemKey(item, i)} className={cn(\"page-item\", classNames?.item)}>\n {renderItem\n ? renderItem(item)\n : defaultRender(item, onPageChange, prev, next, classNames)}\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n\nfunction ChevronLeftIcon() {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M15 6l-6 6 6 6\" />\n </svg>\n );\n}\n\nfunction ChevronRightIcon() {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M9 6l6 6-6 6\" />\n </svg>\n );\n}\n\nfunction paginationItemKey(item: PaginationItem, index: number): string {\n switch (item.type) {\n case \"previous\":\n return \"previous\";\n case \"next\":\n return \"next\";\n case \"ellipsis\":\n return `ellipsis-${item.key}`;\n case \"page\":\n return `page-${item.page}`;\n default:\n return `${index}`;\n }\n}\n\nfunction defaultRender(\n item: PaginationItem,\n onPageChange: (n: number) => void,\n prev: ReactNode,\n next: ReactNode,\n classNames: SlotClasses<\"item\" | \"link\" | \"ellipsis\"> | undefined,\n): ReactNode {\n switch (item.type) {\n case \"previous\":\n return (\n <button\n type=\"button\"\n className={cn(\"page-link\", classNames?.link)}\n aria-label=\"Previous page\"\n aria-disabled={item.disabled || undefined}\n disabled={item.disabled}\n onClick={() => onPageChange(item.page)}\n >\n {prev}\n </button>\n );\n case \"next\":\n return (\n <button\n type=\"button\"\n className={cn(\"page-link\", classNames?.link)}\n aria-label=\"Next page\"\n aria-disabled={item.disabled || undefined}\n disabled={item.disabled}\n onClick={() => onPageChange(item.page)}\n >\n {next}\n </button>\n );\n case \"ellipsis\":\n return (\n <span className={cn(\"page-ellipsis\", classNames?.ellipsis)} aria-hidden=\"true\">\n …\n </span>\n );\n case \"page\":\n return (\n <button\n type=\"button\"\n className={cn([\"page-link\", item.selected && \"active\"], classNames?.link)}\n aria-current={item.selected ? \"page\" : undefined}\n aria-label={`Page ${item.page}`}\n onClick={() => onPageChange(item.page)}\n >\n {item.page}\n </button>\n );\n }\n}\n","import { Field as BaseField } from \"@base-ui/react/field\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type TextareaVariant = \"bordered\" | \"ghost\" | \"danger\" | \"info\" | \"success\" | \"warning\";\nexport type TextareaSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface TextareaProps extends Omit<ComponentProps<\"textarea\">, \"size\"> {\n variant?: TextareaVariant;\n textareaSize?: TextareaSize;\n /**\n * Height tracks content via CSS `field-sizing` (Chromium-only; others keep a\n * fixed, resizable box). Floor: max(base min-height, `rows`); cap with `max-height`.\n */\n autoResize?: boolean;\n}\n\n/**\n * Multi-line input via Base UI `Field.Control` with a `<textarea>` swapped in,\n * so inside a `<Field>` it gets the same wiring as `<Input>` (generated id,\n * label association, validity). Works standalone via the default context.\n */\nexport function Textarea({\n variant = \"bordered\",\n textareaSize = \"md\",\n autoResize,\n className,\n ...rest\n}: TextareaProps) {\n return (\n <BaseField.Control\n // Field.Control is typed for <input>; render a <textarea> with Base UI's\n // merged props so it still registers with the surrounding Field.\n render={(props) => <textarea {...props} />}\n className={cn(\n [\n \"textarea\",\n variant !== \"bordered\" && `textarea-${variant}`,\n textareaSize !== \"md\" && `textarea-${textareaSize}`,\n autoResize && \"textarea-autosize\",\n ],\n className,\n )}\n {...(rest as ComponentProps<typeof BaseField.Control>)}\n />\n );\n}\n","import { Checkbox as BaseCheckbox } from \"@base-ui/react/checkbox\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type CheckboxProps = ComponentProps<typeof BaseCheckbox.Root>;\n\nfunction CheckboxRoot({ className, children, ...rest }: CheckboxProps) {\n return (\n <BaseCheckbox.Root className={cn(\"checkbox\", className)} {...rest}>\n {children ?? (\n <CheckboxIndicator>\n <CheckIcon />\n </CheckboxIndicator>\n )}\n </BaseCheckbox.Root>\n );\n}\n\nexport type CheckboxIndicatorProps = ComponentProps<typeof BaseCheckbox.Indicator>;\n\nfunction CheckboxIndicator({ className, ...rest }: CheckboxIndicatorProps) {\n return <BaseCheckbox.Indicator className={cn(\"checkbox-indicator\", className)} {...rest} />;\n}\n\nfunction CheckIcon() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width=\"100%\"\n height=\"100%\"\n aria-hidden\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\nexport const Checkbox = Object.assign(CheckboxRoot, {\n Indicator: CheckboxIndicator,\n});\n","import { Radio as BaseRadio } from \"@base-ui/react/radio\";\nimport { RadioGroup as BaseRadioGroup } from \"@base-ui/react/radio-group\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type RadioProps = ComponentProps<typeof BaseRadio.Root>;\n\nfunction RadioRoot({ className, children, ...rest }: RadioProps) {\n return (\n <BaseRadio.Root className={cn(\"radio\", className)} {...rest}>\n {children ?? <RadioIndicator />}\n </BaseRadio.Root>\n );\n}\n\nexport type RadioIndicatorProps = ComponentProps<typeof BaseRadio.Indicator>;\n\nfunction RadioIndicator({ className, ...rest }: RadioIndicatorProps) {\n return <BaseRadio.Indicator className={cn(\"radio-indicator\", className)} {...rest} />;\n}\n\nexport const Radio = Object.assign(RadioRoot, {\n Indicator: RadioIndicator,\n});\n\nexport type RadioGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport interface RadioGroupProps extends ComponentProps<typeof BaseRadioGroup> {\n orientation?: RadioGroupOrientation;\n}\n\nexport function RadioGroup({ orientation = \"horizontal\", className, ...rest }: RadioGroupProps) {\n return (\n <BaseRadioGroup\n className={cn(\n [\"radio-group\", orientation === \"vertical\" && \"radio-group-vertical\"],\n className,\n )}\n {...rest}\n />\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type ProgressVariant = \"info\" | \"success\" | \"warning\" | \"danger\";\nexport type ProgressSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ProgressProps extends Omit<ComponentProps<\"progress\">, \"value\"> {\n /** Current value in `[0, max]`. Omit (or pass `undefined`) for an indeterminate bar. */\n value?: number;\n max?: number;\n variant?: ProgressVariant;\n size?: ProgressSize;\n}\n\nexport function Progress({\n value,\n max = 100,\n variant = \"info\",\n size = \"md\",\n className,\n ...rest\n}: ProgressProps) {\n return (\n <progress\n value={value}\n max={max}\n className={cn(\n [\n \"progress\",\n variant !== \"info\" && `progress-${variant}`,\n size !== \"md\" && `progress-${size}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type SpinnerSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface SpinnerProps extends ComponentProps<\"output\"> {\n size?: SpinnerSize;\n /** Accessible label announced by screen readers. Defaults to \"Loading\". */\n label?: string;\n}\n\n// `<output>` has an implicit `role=\"status\"`, so the `aria-label` is announced politely.\nexport function Spinner({ size = \"md\", label = \"Loading\", className, ...rest }: SpinnerProps) {\n return (\n <output\n aria-label={label}\n className={cn([\"spinner\", size !== \"md\" && `spinner-${size}`], className)}\n {...rest}\n />\n );\n}\n","import { Switch as BaseSwitch } from \"@base-ui/react/switch\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type SwitchProps = ComponentProps<typeof BaseSwitch.Root>;\n\nfunction SwitchRoot({ className, children, ...rest }: SwitchProps) {\n return (\n <BaseSwitch.Root className={cn(\"switch\", className)} {...rest}>\n {children ?? <SwitchThumb />}\n </BaseSwitch.Root>\n );\n}\n\nexport type SwitchThumbProps = ComponentProps<typeof BaseSwitch.Thumb>;\n\nfunction SwitchThumb({ className, ...rest }: SwitchThumbProps) {\n return <BaseSwitch.Thumb className={cn(\"switch-thumb\", className)} {...rest} />;\n}\n\nexport const Switch = Object.assign(SwitchRoot, {\n Thumb: SwitchThumb,\n});\n","import { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { useContext, type ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport type SelectProps = ComponentProps<typeof BaseSelect.Root>;\n\nfunction SelectRoot(props: SelectProps) {\n return <BaseSelect.Root {...props} />;\n}\n\nexport type SelectTriggerVariant = \"bordered\" | \"ghost\" | \"danger\";\nexport type SelectTriggerSize = \"sm\" | \"md\" | \"lg\";\n\ntype BaseSelectTriggerProps = Omit<ComponentProps<typeof BaseSelect.Trigger>, \"size\">;\n\nexport interface SelectTriggerProps extends BaseSelectTriggerProps {\n variant?: SelectTriggerVariant;\n triggerSize?: SelectTriggerSize;\n}\n\nfunction SelectTrigger({\n variant = \"bordered\",\n triggerSize = \"md\",\n className,\n ...rest\n}: SelectTriggerProps) {\n return (\n <BaseSelect.Trigger\n className={cn(\n [\n \"select\",\n variant !== \"bordered\" && `select-${variant}`,\n triggerSize !== \"md\" && `select-${triggerSize}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport type SelectValueProps = ComponentProps<typeof BaseSelect.Value>;\n\nfunction SelectValue(props: SelectValueProps) {\n return <BaseSelect.Value {...props} />;\n}\n\nexport type SelectIconProps = ComponentProps<typeof BaseSelect.Icon>;\n\nfunction SelectIcon({ className, children, ...rest }: SelectIconProps) {\n return (\n <BaseSelect.Icon className={cn(\"select-icon\", className)} {...rest}>\n {children ?? <ChevronDownIcon />}\n </BaseSelect.Icon>\n );\n}\n\nexport interface SelectPopupProps extends ComponentProps<typeof BaseSelect.Popup> {\n sideOffset?: number;\n}\n\nfunction SelectPopup({ className, sideOffset = 4, children, ...rest }: SelectPopupProps) {\n const portalContainer = useContext(PortalContainerContext);\n return (\n <BaseSelect.Portal container={portalContainer ?? undefined}>\n {/* Opt out of Base UI's macOS-style alignment (selected item overlaid on\n the trigger): admin surfaces expect below-the-trigger placement, and\n the macOS mode collapses the parent dialog's flex layout in <Dialog>. */}\n <BaseSelect.Positioner sideOffset={sideOffset} alignItemWithTrigger={false}>\n <BaseSelect.Popup className={cn(\"select-popup\", className)} {...rest}>\n {children}\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n );\n}\n\nexport type SelectItemProps = ComponentProps<typeof BaseSelect.Item>;\n\nfunction SelectItem({ className, ...rest }: SelectItemProps) {\n return <BaseSelect.Item className={cn(\"select-item\", className)} {...rest} />;\n}\n\nexport type SelectItemTextProps = ComponentProps<typeof BaseSelect.ItemText>;\n\nfunction SelectItemText(props: SelectItemTextProps) {\n return <BaseSelect.ItemText {...props} />;\n}\n\nexport type SelectItemIndicatorProps = ComponentProps<typeof BaseSelect.ItemIndicator>;\n\nfunction SelectItemIndicator({ className, children, ...rest }: SelectItemIndicatorProps) {\n return (\n <BaseSelect.ItemIndicator className={cn(\"select-item-indicator\", className)} {...rest}>\n {children ?? <CheckIcon />}\n </BaseSelect.ItemIndicator>\n );\n}\n\nexport type SelectGroupProps = ComponentProps<typeof BaseSelect.Group>;\n\nfunction SelectGroup(props: SelectGroupProps) {\n return <BaseSelect.Group {...props} />;\n}\n\nexport type SelectGroupLabelProps = ComponentProps<typeof BaseSelect.GroupLabel>;\n\nfunction SelectGroupLabel({ className, ...rest }: SelectGroupLabelProps) {\n return <BaseSelect.GroupLabel className={cn(\"select-group-label\", className)} {...rest} />;\n}\n\nfunction CheckIcon() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width=\"100%\"\n height=\"100%\"\n aria-hidden\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\nfunction ChevronDownIcon() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width=\"100%\"\n height=\"100%\"\n aria-hidden\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n );\n}\n\nexport const Select = Object.assign(SelectRoot, {\n Trigger: SelectTrigger,\n Value: SelectValue,\n Icon: SelectIcon,\n Popup: SelectPopup,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n Group: SelectGroup,\n GroupLabel: SelectGroupLabel,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type ContainerSize = \"sm\" | \"md\" | \"lg\" | \"fluid\";\n\nexport interface ContainerProps extends ComponentProps<\"div\"> {\n /** Width preset. `md` (default) ≈ 90rem; `fluid` removes the max-width. */\n size?: ContainerSize;\n /** Tighter vertical rhythm and block padding for dense screens. */\n compact?: boolean;\n}\n\n/**\n * Page content region: a centered, max-width column that owns the vertical\n * gap between stacked sections. Place inside `<AppShell.Main>`, which has no\n * padding of its own. Not the `.Container` escape hatch (`Card.Container`).\n */\nexport function Container({ size = \"md\", compact, className, ...rest }: ContainerProps) {\n return (\n <div\n className={cn(\n [\"container\", size !== \"md\" && `container-${size}`, compact && \"container-compact\"],\n className,\n )}\n {...rest}\n />\n );\n}\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type CardVariant =\n | \"default\"\n | \"muted\"\n | \"primary\"\n | \"info\"\n | \"success\"\n | \"warning\"\n | \"danger\";\n\nexport interface CardContainerProps extends ComponentProps<\"div\"> {\n /** Tinted surface + matching border. Defaults to the neutral surface. */\n variant?: CardVariant;\n bordered?: boolean;\n compact?: boolean;\n /** Pins direct-child header/actions and scrolls the body. Set the height yourself. */\n scroll?: boolean;\n}\n\n/**\n * The bare `.card` container — no body, no title. Use this when you need to\n * compose the internals yourself (e.g. a media block above the body).\n */\nfunction CardContainer({\n variant = \"default\",\n bordered,\n compact,\n scroll,\n className,\n ...rest\n}: CardContainerProps) {\n return (\n <div\n className={cn(\n [\n \"card\",\n variant !== \"default\" && `card-${variant}`,\n bordered && \"card-bordered\",\n compact && \"card-compact\",\n scroll && \"card-scroll\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport interface CardProps extends Omit<ComponentProps<\"div\">, \"title\"> {\n /** Tinted surface + matching border. Defaults to the neutral surface. */\n variant?: CardVariant;\n bordered?: boolean;\n compact?: boolean;\n /** Full-bleed media rendered as `<Card.Media>` above the body. */\n media?: ReactNode;\n /** Leading icon for the title row. */\n icon?: IconProp;\n /** Renders as `<Card.Title>`. */\n title?: ReactNode;\n /** Renders as `<Card.Description>`. */\n description?: ReactNode;\n /** Trailing header controls (close, edit, …). Renders as `<Card.Toolbar>`. */\n toolbar?: ReactNode;\n /** Renders as `<Card.Actions>`. */\n actions?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\n \"media\" | \"body\" | \"header\" | \"toolbar\" | \"title\" | \"description\" | \"actions\"\n >;\n}\n\n/**\n * Standard card: a `.card` container with a single `.card-body` that lays out\n * an optional title (with icon), description, children, and actions. For\n * anything outside that shape, use `<Card.Container>` and compose by hand.\n */\nfunction CardRoot({\n variant,\n bordered,\n compact,\n media,\n icon,\n title,\n description,\n toolbar,\n actions,\n className,\n classNames,\n children,\n ...rest\n}: CardProps) {\n const hasTitle = icon !== undefined || title !== undefined;\n const titleEl = hasTitle ? (\n <CardTitle icon={icon} className={classNames?.title}>\n {title}\n </CardTitle>\n ) : null;\n return (\n <CardContainer\n variant={variant}\n bordered={bordered}\n compact={compact}\n className={className}\n {...rest}\n >\n {media !== undefined ? <CardMedia className={classNames?.media}>{media}</CardMedia> : null}\n <CardBody className={classNames?.body}>\n {toolbar !== undefined ? (\n <CardHeader className={classNames?.header}>\n {titleEl}\n <CardToolbar className={classNames?.toolbar}>{toolbar}</CardToolbar>\n </CardHeader>\n ) : (\n titleEl\n )}\n {description !== undefined ? (\n <CardDescription className={classNames?.description}>{description}</CardDescription>\n ) : null}\n {children}\n {actions !== undefined ? (\n <CardActions className={classNames?.actions}>{actions}</CardActions>\n ) : null}\n </CardBody>\n </CardContainer>\n );\n}\n\nexport type CardMediaProps = ComponentProps<\"div\">;\nfunction CardMedia({ className, ...rest }: CardMediaProps) {\n return <div className={cn(\"card-media\", className)} {...rest} />;\n}\n\nexport type CardBodyProps = ComponentProps<\"div\">;\nfunction CardBody({ className, ...rest }: CardBodyProps) {\n return <div className={cn(\"card-body\", className)} {...rest} />;\n}\n\nexport type CardHeaderProps = ComponentProps<\"div\">;\nfunction CardHeader({ className, ...rest }: CardHeaderProps) {\n return <div className={cn(\"card-header\", className)} {...rest} />;\n}\n\nexport type CardToolbarProps = ComponentProps<\"div\">;\nfunction CardToolbar({ className, ...rest }: CardToolbarProps) {\n return <div className={cn(\"card-toolbar\", className)} {...rest} />;\n}\n\nexport interface CardTitleProps extends ComponentProps<\"h3\"> {\n /** Leading icon. */\n icon?: IconProp;\n}\nfunction CardTitle({ icon, className, children, ...rest }: CardTitleProps) {\n return (\n <h3 className={cn(\"card-title\", className)} {...rest}>\n {renderIcon(icon)}\n {children}\n </h3>\n );\n}\n\nexport type CardDescriptionProps = ComponentProps<\"p\">;\nfunction CardDescription({ className, ...rest }: CardDescriptionProps) {\n return <p className={cn(\"card-description\", className)} {...rest} />;\n}\n\nexport type CardActionsProps = ComponentProps<\"div\">;\nfunction CardActions({ className, ...rest }: CardActionsProps) {\n return <div className={cn(\"card-actions\", className)} {...rest} />;\n}\n\nexport const Card = Object.assign(CardRoot, {\n Container: CardContainer,\n Media: CardMedia,\n Body: CardBody,\n Header: CardHeader,\n Toolbar: CardToolbar,\n Title: CardTitle,\n Description: CardDescription,\n Actions: CardActions,\n});\n","import type { ComponentProps, ReactNode } from \"react\";\nimport type { CardVariant } from \"./Card\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type TrendDirection = \"up\" | \"down\" | \"flat\";\nexport type TrendIntent = \"positive\" | \"negative\" | \"neutral\";\n\nexport interface StatCardTrend {\n /** Delta text, e.g. \"+12.4%\" or \"+1,204 this week\". */\n value: ReactNode;\n /** Caret direction. Default `\"up\"`. */\n direction?: TrendDirection;\n /** Tone, independent of direction (a falling error rate is good). Derived from direction when omitted. */\n intent?: TrendIntent;\n}\n\nfunction trendIntent(direction: TrendDirection): TrendIntent {\n if (direction === \"down\") return \"negative\";\n if (direction === \"flat\") return \"neutral\";\n return \"positive\";\n}\n\nexport interface StatCardProps extends ComponentProps<\"div\"> {\n /** Tinted surface + matching border, shared with `<Card>`. The value picks up the accent (except `warning`). Defaults to the neutral surface. */\n variant?: CardVariant;\n /** Small annotation above the value (e.g. \"Total Generations\"). */\n label?: ReactNode;\n /** The headline metric. Rendered with `tabular-nums` so digits don't shift between values. */\n value?: ReactNode;\n /** Subordinate line under the value (e.g. \"42 completed / 12 pending\"). */\n detail?: ReactNode;\n /** Directional delta line under the value. Tone is independent of direction. */\n trend?: StatCardTrend;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"label\" | \"value\" | \"trend\" | \"detail\">;\n /** Leading icon in the label row. */\n icon?: IconProp;\n compact?: boolean;\n bordered?: boolean;\n}\n\n/**\n * Compact KPI tile (label / value / detail) on a `.card` shell, so it shares\n * every card modifier — `compact`/`bordered` map to `.card-compact`/`.card-bordered`.\n * Free-form tiles: `<Card>`; label/value tables: `<PropertyList>`.\n */\nexport function StatCard({\n variant = \"default\",\n label,\n value,\n detail,\n trend,\n icon,\n compact,\n bordered,\n className,\n classNames,\n children,\n ...rest\n}: StatCardProps) {\n // Vanilla-bundle parity: an icon alone never emits a label-less row.\n const hasLabel = label !== undefined;\n return (\n <div\n className={cn(\n [\n \"card\",\n \"stat-card\",\n variant !== \"default\" && `card-${variant}`,\n compact && \"card-compact\",\n bordered && \"card-bordered\",\n ],\n className,\n )}\n {...rest}\n >\n {hasLabel ? (\n <p className={cn(\"stat-card-label\", classNames?.label)}>\n {renderIcon(icon)}\n {label}\n </p>\n ) : null}\n {value !== undefined ? (\n <p className={cn(\"stat-card-value\", classNames?.value)}>{value}</p>\n ) : null}\n {trend !== undefined ? (\n <p\n className={cn(\"stat-card-trend\", classNames?.trend)}\n data-trend={trend.direction ?? \"up\"}\n data-intent={trend.intent ?? trendIntent(trend.direction ?? \"up\")}\n >\n {trend.value}\n </p>\n ) : null}\n {detail !== undefined ? (\n <p className={cn(\"stat-card-detail\", classNames?.detail)}>{detail}</p>\n ) : null}\n {children}\n </div>\n );\n}\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type TimelineStatus = \"default\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"current\";\n\nexport interface TimelineProps extends ComponentProps<\"ol\"> {\n /** Turn the rail into a numbered step list. */\n numbered?: boolean;\n}\nfunction TimelineRoot({ numbered, className, ...rest }: TimelineProps) {\n return <ol className={cn([\"timeline\", numbered && \"timeline-numbered\"], className)} {...rest} />;\n}\n\nexport interface TimelineItemProps extends Omit<ComponentProps<\"li\">, \"title\"> {\n /** Accent for the indicator. `current` highlights a numbered marker. */\n status?: TimelineStatus;\n /** Indicator icon, replacing the default dot. */\n icon?: IconProp;\n /** Marker content for the numbered variant (number or letter). Takes precedence over `icon`. */\n marker?: ReactNode;\n title?: ReactNode;\n /** Timestamp line. */\n time?: ReactNode;\n description?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\n \"indicator\" | \"marker\" | \"dot\" | \"content\" | \"title\" | \"time\" | \"description\"\n >;\n}\nfunction TimelineItem({\n status = \"default\",\n icon,\n marker,\n title,\n time,\n description,\n className,\n classNames,\n children,\n ...rest\n}: TimelineItemProps) {\n let indicator: ReactNode;\n if (marker !== undefined) {\n indicator = <span className={cn(\"timeline-marker\", classNames?.marker)}>{marker}</span>;\n } else if (icon != null) {\n indicator = renderIcon(icon);\n } else {\n indicator = <span className={cn(\"timeline-dot\", classNames?.dot)} />;\n }\n return (\n <li\n className={cn(\n [\"timeline-item\", status !== \"default\" && `timeline-item-${status}`],\n className,\n )}\n {...rest}\n >\n <span className={cn(\"timeline-indicator\", classNames?.indicator)}>{indicator}</span>\n <div className={cn(\"timeline-content\", classNames?.content)}>\n {title !== undefined ? (\n <div className={cn(\"timeline-title\", classNames?.title)}>{title}</div>\n ) : null}\n {time !== undefined ? (\n <div className={cn(\"timeline-time\", classNames?.time)}>{time}</div>\n ) : null}\n {description !== undefined ? (\n <div className={cn(\"timeline-description\", classNames?.description)}>{description}</div>\n ) : null}\n {children}\n </div>\n </li>\n );\n}\n\nexport const Timeline = Object.assign(TimelineRoot, { Item: TimelineItem });\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type ItemVariant = \"default\" | \"outline\" | \"muted\";\nexport type ItemSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ItemContainerProps extends ComponentProps<\"div\"> {\n variant?: ItemVariant;\n size?: ItemSize;\n /** Expand the first nested link to fill the whole row (and add hover/focus affordance). */\n asLink?: boolean;\n}\n/** The bare row primitive — just the `.item` shell, for layouts the default `<Item>` doesn't fit. */\nfunction ItemContainer({\n variant = \"default\",\n size = \"md\",\n asLink,\n className,\n ...rest\n}: ItemContainerProps) {\n return (\n <div\n className={cn(\n [\n \"item\",\n variant !== \"default\" && `item-${variant}`,\n size !== \"md\" && `item-${size}`,\n asLink && \"item-link\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport type ItemMediaProps = ComponentProps<\"div\">;\nfunction ItemMedia({ className, ...rest }: ItemMediaProps) {\n return <div className={cn(\"item-media\", className)} {...rest} />;\n}\n\nexport type ItemContentProps = ComponentProps<\"div\">;\nfunction ItemContent({ className, ...rest }: ItemContentProps) {\n return <div className={cn(\"item-content\", className)} {...rest} />;\n}\n\nexport type ItemTitleProps = ComponentProps<\"div\">;\nfunction ItemTitle({ className, ...rest }: ItemTitleProps) {\n return <div className={cn(\"item-title\", className)} {...rest} />;\n}\n\nexport type ItemDescriptionProps = ComponentProps<\"div\">;\nfunction ItemDescription({ className, ...rest }: ItemDescriptionProps) {\n return <div className={cn(\"item-description\", className)} {...rest} />;\n}\n\nexport type ItemActionsProps = ComponentProps<\"div\">;\nfunction ItemActions({ className, ...rest }: ItemActionsProps) {\n return <div className={cn(\"item-actions\", className)} {...rest} />;\n}\n\nexport interface ItemProps extends Omit<ItemContainerProps, \"title\"> {\n /** Leading media (avatar, thumbnail). Takes precedence over `icon`. */\n media?: ReactNode;\n /** Leading icon, rendered inside `.item-media`. */\n icon?: IconProp;\n /** Primary line. */\n title?: ReactNode;\n /** Secondary line under the title. */\n description?: ReactNode;\n /** Trailing controls, pinned to the row's end. */\n actions?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"media\" | \"content\" | \"title\" | \"description\" | \"actions\">;\n}\n\n/** Opinionated row with media / title+description / actions shorthand. For other shapes, compose `<Item.Container>`. */\nfunction ItemRoot({\n media,\n icon,\n title,\n description,\n actions,\n classNames,\n children,\n ...rest\n}: ItemProps) {\n const leading = media ?? renderIcon(icon);\n const hasContent = title !== undefined || description !== undefined;\n return (\n <ItemContainer {...rest}>\n {leading != null ? <ItemMedia className={classNames?.media}>{leading}</ItemMedia> : null}\n {hasContent ? (\n <ItemContent className={classNames?.content}>\n {title !== undefined ? (\n <ItemTitle className={classNames?.title}>{title}</ItemTitle>\n ) : null}\n {description !== undefined ? (\n <ItemDescription className={classNames?.description}>{description}</ItemDescription>\n ) : null}\n </ItemContent>\n ) : null}\n {children}\n {actions !== undefined ? (\n <ItemActions className={classNames?.actions}>{actions}</ItemActions>\n ) : null}\n </ItemContainer>\n );\n}\n\nexport interface ItemGroupProps extends ComponentProps<\"div\"> {\n /** Wrap the stack in a rounded border. */\n bordered?: boolean;\n}\n/** Divided vertical stack of items. */\nexport function ItemGroup({ bordered, className, ...rest }: ItemGroupProps) {\n return (\n <div className={cn([\"item-group\", bordered && \"item-group-bordered\"], className)} {...rest} />\n );\n}\n\nexport const Item = Object.assign(ItemRoot, {\n Container: ItemContainer,\n Media: ItemMedia,\n Content: ItemContent,\n Title: ItemTitle,\n Description: ItemDescription,\n Actions: ItemActions,\n});\n","import type { CSSProperties } from \"react\";\n\nexport interface ChartDatum {\n /** Category name. When present, renders a label (and feeds the aria-label). */\n label?: string;\n /** The magnitude. Bars normalise it against the chart max; donut/stack sum it. */\n value: number;\n /** Per-segment colour override (any CSS colour). Defaults to the SERIES cycle. */\n color?: string;\n}\n\nexport type ChartSize = \"sm\" | \"md\" | \"lg\";\nexport type ChartType = \"bar\" | \"stack\" | \"donut\" | \"pie\";\n\n/**\n * Multi-series palette of existing Flexoki tokens, not a new token layer. The\n * documented vanilla sequence copies this exactly — both bundles must match.\n */\nexport const SERIES = [\n \"var(--color-blue-500)\",\n \"var(--color-orange-400)\",\n \"var(--color-green-500)\",\n \"var(--color-purple-400)\",\n \"var(--color-cyan-500)\",\n \"var(--color-magenta-400)\",\n \"var(--color-yellow-500)\",\n \"var(--color-red-400)\",\n] as const;\n\nexport function seriesColor(datum: ChartDatum, index: number): string {\n return datum.color ?? SERIES[index % SERIES.length]!;\n}\n\n/** Largest value, floored at 1 so the bar calc never divides by zero. */\nexport function computeMax(data: ChartDatum[], explicit?: number): number {\n if (explicit !== undefined) return explicit;\n return Math.max(1, ...data.map((d) => d.value));\n}\n\n/** Cumulative `conic-gradient` stops. A non-positive total yields a neutral fill so the ring isn't blank. */\nexport function buildDonutSegments(data: ChartDatum[]): string {\n const total = data.reduce((sum, d) => sum + Math.max(0, d.value), 0);\n if (total <= 0) return \"var(--color-surface-strong) 0 100%\";\n let acc = 0;\n const stops: string[] = [];\n for (let i = 0; i < data.length; i++) {\n const datum = data[i]!;\n const from = (acc / total) * 360;\n acc += Math.max(0, datum.value);\n const to = (acc / total) * 360;\n stops.push(`${seriesColor(datum, i)} ${from}deg ${to}deg`);\n }\n return stops.join(\", \");\n}\n\nconst TYPE_NOUN: Record<ChartType, string> = {\n bar: \"Bar chart\",\n stack: \"Proportion bar\",\n donut: \"Donut chart\",\n pie: \"Pie chart\",\n};\n\n/** Chart-root `aria-label` summary, e.g. \"Bar chart. Mon: 80, Tue: 52.\" */\nexport function buildAriaLabel(type: ChartType, data: ChartDatum[]): string {\n const parts = data.map((d) => (d.label !== undefined ? `${d.label}: ${d.value}` : `${d.value}`));\n return `${TYPE_NOUN[type]}. ${parts.join(\", \")}.`;\n}\n\n/** Native `title` text for a bar/segment/legend row. */\nexport function datumTitle(datum: ChartDatum): string {\n return datum.label !== undefined ? `${datum.label}: ${datum.value}` : `${datum.value}`;\n}\n\n/** Merge admin custom-property vars with an incoming `style` (incoming wins). */\nexport function mergeStyle(\n vars: Record<string, string | number>,\n incoming?: CSSProperties,\n): CSSProperties {\n return { ...(vars as CSSProperties), ...incoming };\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport {\n type ChartDatum,\n type ChartSize,\n buildAriaLabel,\n computeMax,\n datumTitle,\n mergeStyle,\n} from \"./chart-internal\";\n\nexport type BarChartVariant = \"info\" | \"success\" | \"warning\" | \"danger\";\nexport type BarChartOrientation = \"horizontal\" | \"vertical\";\n\nexport interface BarChartContainerProps extends ComponentProps<\"div\"> {\n orientation?: BarChartOrientation;\n size?: ChartSize;\n /** Show per-bar value labels (`.chart-values`). */\n showValues?: boolean;\n /** Inline-flex, em-sized micro-viz for table cells. */\n inline?: boolean;\n /** Single-series fill colour. Per-bar `color` still overrides individual bars. */\n variant?: BarChartVariant;\n}\n\n/** Bare grid, no bars — compose `<BarChart.Bar>` by hand. Sets `role=\"img\"`; pass `aria-label`. */\nfunction BarChartContainer({\n orientation = \"horizontal\",\n size = \"md\",\n showValues,\n inline,\n variant = \"info\",\n className,\n ...rest\n}: BarChartContainerProps) {\n return (\n <div\n // A chart is a single composite image — role=\"img\" + aria-label, with no <img> to prefer.\n // eslint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"img\"\n className={cn(\n [\n \"chart\",\n \"chart-bars\",\n orientation === \"vertical\" && \"chart-bars-vertical\",\n size !== \"md\" && `chart-${size}`,\n showValues && \"chart-values\",\n inline && \"chart-inline\",\n variant !== \"info\" && `chart-${variant}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport interface BarProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n /** Auto-fills label / value / title / colour from a datum. */\n datum?: ChartDatum;\n /** Raw value when composing without a datum. */\n value?: number;\n /** Category label when composing without a datum. */\n label?: string;\n /** Explicit bar colour (`--bar-color`). Overrides the single-series fill. */\n color?: string;\n}\n\n/**\n * One bar. The value cell always renders (CSS hides it without `.chart-values`);\n * fill stays `currentColor` — single-series bars never cycle SERIES.\n */\nfunction Bar({ datum, value, label, color, className, style, ...rest }: BarProps) {\n const v = datum?.value ?? value ?? 0;\n const lab = datum?.label ?? label;\n const barColor = datum?.color ?? color;\n const vars: Record<string, string | number> = { \"--value\": v };\n if (barColor !== undefined) vars[\"--bar-color\"] = barColor;\n const title = datum !== undefined ? datumTitle(datum) : undefined;\n return (\n <div className={cn(\"chart-bar\", className)} style={mergeStyle(vars, style)} {...rest}>\n {lab !== undefined ? <span className={cn(\"chart-bar-label\", undefined)}>{lab}</span> : null}\n <div className={cn(\"chart-bar-track\", undefined)}>\n <div className={cn(\"chart-bar-fill\", undefined)} title={title} />\n </div>\n <span className={cn(\"chart-bar-value\", undefined)}>{v}</span>\n </div>\n );\n}\n\nexport interface BarChartProps extends ComponentProps<\"div\"> {\n data: ChartDatum[];\n /** Override the computed max (the 100% reference). Defaults to the largest value. */\n max?: number;\n orientation?: BarChartOrientation;\n size?: ChartSize;\n showValues?: boolean;\n inline?: boolean;\n variant?: BarChartVariant;\n}\n\n/** Single-series bar chart. For hand-composed layouts use `<BarChart.Container>` + `<BarChart.Bar>`. */\nfunction BarChartRoot({\n data,\n max,\n orientation = \"horizontal\",\n size = \"md\",\n showValues,\n inline,\n variant = \"info\",\n style,\n \"aria-label\": ariaLabel,\n ...rest\n}: BarChartProps) {\n const resolvedMax = computeMax(data, max);\n return (\n <BarChartContainer\n orientation={orientation}\n size={size}\n showValues={showValues}\n inline={inline}\n variant={variant}\n style={mergeStyle({ \"--chart-max\": resolvedMax }, style)}\n aria-label={ariaLabel ?? buildAriaLabel(\"bar\", data)}\n {...rest}\n >\n {data.map((d, i) => (\n <Bar key={d.label ?? i} datum={d} />\n ))}\n </BarChartContainer>\n );\n}\n\nexport const BarChart = Object.assign(BarChartRoot, {\n Container: BarChartContainer,\n Bar,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { type ChartDatum, datumTitle, mergeStyle, seriesColor } from \"./chart-internal\";\n\nexport interface ChartLegendProps extends ComponentProps<\"ul\"> {\n data: ChartDatum[];\n}\n\n/**\n * Each row's `title` carries the donut's per-slice read-out — a conic-gradient\n * slice has no element to hang a `title` on.\n */\nexport function ChartLegend({ data, className, ...rest }: ChartLegendProps) {\n return (\n <ul className={cn(\"chart-legend\", className)} {...rest}>\n {data.map((d, i) => (\n <li\n key={d.label ?? i}\n className={cn(\"chart-legend-item\", undefined)}\n style={mergeStyle({ \"--legend-color\": seriesColor(d, i) })}\n title={datumTitle(d)}\n >\n {d.label ?? d.value}\n </li>\n ))}\n </ul>\n );\n}\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { ChartLegend } from \"./ChartLegend\";\nimport { cn } from \"./cn\";\nimport {\n type ChartDatum,\n type ChartSize,\n buildAriaLabel,\n buildDonutSegments,\n mergeStyle,\n} from \"./chart-internal\";\n\nexport interface DonutFigureProps extends ComponentProps<\"div\"> {\n size?: ChartSize;\n}\n\n/** Square positioning context that overlays the centre label on the ring. */\nfunction Figure({ size = \"md\", className, ...rest }: DonutFigureProps) {\n return (\n <div\n className={cn([\"chart-donut-figure\", size !== \"md\" && `chart-${size}`], className)}\n {...rest}\n />\n );\n}\n\nexport interface DonutRingProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n data: ChartDatum[];\n /** Solid pie — no hole. */\n pie?: boolean;\n /** Ring width as a % of diameter (default \"33%\"). Ignored when `pie`. */\n thickness?: string;\n}\n\n/** The masked conic-gradient ring. */\nfunction Ring({ data, pie, thickness, className, style, ...rest }: DonutRingProps) {\n const vars: Record<string, string | number> = { \"--donut-segments\": buildDonutSegments(data) };\n if (thickness !== undefined && !pie) vars[\"--donut-thickness\"] = thickness;\n return (\n <div\n className={cn([\"chart-donut\", pie && \"chart-donut-pie\"], className)}\n style={mergeStyle(vars, style)}\n {...rest}\n />\n );\n}\n\n/** Centred overlay (a total, a label). Not a child of the ring — masks clip subtrees. */\nfunction Center({ className, ...rest }: ComponentProps<\"div\">) {\n return <div className={cn(\"chart-donut-center\", className)} {...rest} />;\n}\n\nexport interface DonutProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n data: ChartDatum[];\n size?: ChartSize;\n /** Ring width as a % of diameter (default \"33%\"). Ignored when `pie`. */\n thickness?: string;\n /** Solid pie — no hole. */\n pie?: boolean;\n /** Centred overlay content (a total, a label). */\n centerLabel?: ReactNode;\n /** Render a legend from the data labels. */\n legend?: boolean;\n inline?: boolean;\n}\n\n/**\n * Donut (or `pie`) breakdown. Per-slice read-outs live on the `legend` rows —\n * a conic slice has no element to carry a `title`. Resize via `size` or\n * `--chart-size`.\n */\nfunction DonutRoot({\n data,\n size = \"md\",\n thickness,\n pie,\n centerLabel,\n legend,\n inline,\n className,\n \"aria-label\": ariaLabel,\n ...rest\n}: DonutProps) {\n return (\n <div\n // A chart is a single composite image — role=\"img\" + aria-label, with no <img> to prefer.\n // eslint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"img\"\n className={cn([\"chart\", inline && \"chart-inline\"], className)}\n aria-label={ariaLabel ?? buildAriaLabel(pie ? \"pie\" : \"donut\", data)}\n {...rest}\n >\n <Figure size={size}>\n <Ring data={data} pie={pie} thickness={thickness} />\n {centerLabel !== undefined ? <Center>{centerLabel}</Center> : null}\n </Figure>\n {legend ? <ChartLegend data={data} /> : null}\n </div>\n );\n}\n\nexport const Donut = Object.assign(DonutRoot, {\n Figure,\n Ring,\n Center,\n Legend: ChartLegend,\n});\n","import type { ComponentProps } from \"react\";\nimport { ChartLegend } from \"./ChartLegend\";\nimport { cn } from \"./cn\";\nimport {\n type ChartDatum,\n buildAriaLabel,\n datumTitle,\n mergeStyle,\n seriesColor,\n} from \"./chart-internal\";\n\nexport type StackedBarTrackProps = ComponentProps<\"div\">;\n\n/** The bare proportion track — compose `<StackedBar.Segment>` children by hand. */\nfunction Track({ className, ...rest }: StackedBarTrackProps) {\n return <div className={cn(\"chart-stack\", className)} {...rest} />;\n}\n\nexport interface SegmentProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n /** Auto-fills value / title / colour from a datum. */\n datum?: ChartDatum;\n /** Index into the SERIES palette (used when the datum has no `color`). */\n index?: number;\n /** Raw value when composing without a datum. */\n value?: number;\n /** Explicit segment colour (`--segment-color`). */\n color?: string;\n}\n\n/** One proportion segment, sized by `flex: var(--value)`; SERIES-cycle colours by default. */\nfunction Segment({ datum, index = 0, value, color, className, style, ...rest }: SegmentProps) {\n const v = datum?.value ?? value ?? 0;\n const segColor = datum !== undefined ? seriesColor(datum, index) : color;\n const vars: Record<string, string | number> = { \"--value\": v };\n if (segColor !== undefined) vars[\"--segment-color\"] = segColor;\n const title = datum !== undefined ? datumTitle(datum) : undefined;\n return (\n <div\n className={cn(\"chart-segment\", className)}\n style={mergeStyle(vars, style)}\n title={title}\n {...rest}\n />\n );\n}\n\nexport interface StackedBarProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n data: ChartDatum[];\n /** Render a legend from the data labels. */\n legend?: boolean;\n inline?: boolean;\n}\n\n/** Single horizontal proportion bar. Segments size by flex ratio — no max needed. */\nfunction StackedBarRoot({\n data,\n legend,\n inline,\n className,\n \"aria-label\": ariaLabel,\n ...rest\n}: StackedBarProps) {\n return (\n <div\n // A chart is a single composite image — role=\"img\" + aria-label, with no <img> to prefer.\n // eslint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"img\"\n className={cn([\"chart\", inline && \"chart-inline\"], className)}\n aria-label={ariaLabel ?? buildAriaLabel(\"stack\", data)}\n {...rest}\n >\n <Track>\n {data.map((d, i) => (\n <Segment key={d.label ?? i} datum={d} index={i} />\n ))}\n </Track>\n {legend ? <ChartLegend data={data} /> : null}\n </div>\n );\n}\n\nexport const StackedBar = Object.assign(StackedBarRoot, {\n Track,\n Segment,\n Legend: ChartLegend,\n});\n","import { createContext, useCallback, useEffect, useRef, type Ref } from \"react\";\n\nexport interface DialogContextValue {\n close: () => void;\n}\n\nexport const DialogContext = createContext<DialogContextValue | null>(null);\n\n/**\n * Drives a native `<dialog>` from a controlled `open` prop, shared by `<Dialog>`\n * and `<Drawer>`: merges the consumer ref, calls `showModal()` / `close()` on\n * change, and reports closes (Esc, backdrop, form submit) via `onOpenChange`.\n * Returns `ref` for the portal container context.\n */\nexport function useDialogElement(\n open: boolean | undefined,\n onOpenChange: ((open: boolean) => void) | undefined,\n consumerRef: Ref<HTMLDialogElement> | undefined,\n) {\n const ref = useRef<HTMLDialogElement | null>(null);\n const onOpenChangeRef = useRef(onOpenChange);\n onOpenChangeRef.current = onOpenChange;\n\n // Without this merge, a consumer `ref` would flow through `...rest`, override\n // `ref={ref}`, and silently break open/close.\n const setRef = useCallback(\n (node: HTMLDialogElement | null) => {\n ref.current = node;\n if (typeof consumerRef === \"function\") consumerRef(node);\n else if (consumerRef) consumerRef.current = node;\n },\n [consumerRef],\n );\n\n useEffect(() => {\n const el = ref.current;\n if (!el || open === undefined) return;\n if (open && !el.open) el.showModal();\n else if (!open && el.open) el.close();\n }, [open]);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n const handleClose = () => onOpenChangeRef.current?.(false);\n el.addEventListener(\"close\", handleClose);\n return () => el.removeEventListener(\"close\", handleClose);\n }, []);\n\n const ctx: DialogContextValue = { close: () => ref.current?.close() };\n return { setRef, ctx, ref };\n}\n","import { useContext, type ComponentProps, type ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { DialogContext, useDialogElement } from \"./dialog-internal\";\nimport { renderIcon, type IconProp } from \"./icon\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport type DialogSize = \"sm\" | \"md\" | \"lg\" | \"auto\" | \"metabase\";\nexport type DialogClosedBy = \"any\" | \"closerequest\" | \"none\";\n\nfunction DefaultCloseIcon() {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\nexport interface DialogContainerProps extends Omit<ComponentProps<\"dialog\">, \"open\"> {\n /** Controlled open state. Omit for uncontrolled (e.g. driven by Invoker Commands). */\n open?: boolean;\n /** Fires when the dialog closes (Esc, backdrop, close button, form method=\"dialog\"). */\n onOpenChange?: (open: boolean) => void;\n /** Width preset. `\"auto\"` shrinks to content; `\"metabase\"` fits a 1048px embedded iframe (1138px modal). Default: `\"md\"`. */\n size?: DialogSize;\n /** Native `closedby` attribute. Default: `\"any\"`. */\n closedby?: DialogClosedBy;\n}\n\n/** The bare `<dialog>` primitive — for layouts the default `<Dialog>` doesn't fit. */\nfunction DialogContainer({\n open,\n onOpenChange,\n size = \"md\",\n closedby = \"any\",\n className,\n children,\n ref: consumerRef,\n ...rest\n}: DialogContainerProps) {\n const { setRef, ctx, ref } = useDialogElement(open, onOpenChange, consumerRef);\n\n return (\n <DialogContext.Provider value={ctx}>\n <PortalContainerContext.Provider value={ref}>\n <dialog\n ref={setRef}\n className={cn([\"dialog\", size !== \"md\" && `dialog-${size}`], className)}\n closedby={closedby}\n {...rest}\n >\n {children}\n </dialog>\n </PortalContainerContext.Provider>\n </DialogContext.Provider>\n );\n}\n\nexport type DialogHeaderProps = ComponentProps<\"div\">;\n\nfunction DialogHeader({ className, ...rest }: DialogHeaderProps) {\n return <div className={cn(\"dialog-header\", className)} {...rest} />;\n}\n\nexport interface DialogTitleProps extends ComponentProps<\"h2\"> {\n /** Leading icon. */\n icon?: IconProp;\n}\n\nfunction DialogTitle({ icon, className, children, ...rest }: DialogTitleProps) {\n return (\n <h2 className={cn(\"dialog-title\", className)} {...rest}>\n {renderIcon(icon)}\n {children}\n </h2>\n );\n}\n\nexport type DialogDescriptionProps = ComponentProps<\"p\">;\n\nfunction DialogDescription({ className, ...rest }: DialogDescriptionProps) {\n return <p className={cn(\"dialog-description\", className)} {...rest} />;\n}\n\nexport type DialogBodyProps = ComponentProps<\"div\">;\n\nfunction DialogBody({ className, ...rest }: DialogBodyProps) {\n return <div className={cn(\"dialog-body\", className)} {...rest} />;\n}\n\nexport type DialogFooterProps = ComponentProps<\"div\">;\n\nfunction DialogFooter({ className, ...rest }: DialogFooterProps) {\n return <div className={cn(\"dialog-footer\", className)} {...rest} />;\n}\n\nexport interface DialogCloseButtonProps extends ComponentProps<\"button\"> {\n /** Override the default X icon. */\n icon?: IconProp;\n}\n\nfunction DialogCloseButton({\n icon,\n className,\n children,\n onClick,\n type = \"button\",\n \"aria-label\": ariaLabel = \"Close\",\n ...rest\n}: DialogCloseButtonProps) {\n const ctx = useContext(DialogContext);\n return (\n <button\n type={type}\n className={cn(\"dialog-close\", className)}\n aria-label={ariaLabel}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) ctx?.close();\n }}\n {...rest}\n >\n {children ?? (icon !== undefined ? renderIcon(icon) : <DefaultCloseIcon />)}\n </button>\n );\n}\n\nexport interface DialogProps extends Omit<DialogContainerProps, \"title\" | \"children\"> {\n /** Leading icon for the title row. */\n icon?: IconProp;\n /** Renders as `<Dialog.Title>`. */\n title?: ReactNode;\n /** Renders as `<Dialog.Description>`. */\n description?: ReactNode;\n /** Renders as `<Dialog.Footer>`. */\n actions?: ReactNode;\n /** Show the X close button in the header. Default: `true`. */\n dismissible?: boolean;\n /** aria-label for the close button. Default: `\"Close\"`. */\n closeLabel?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"header\" | \"title\" | \"close\" | \"description\" | \"body\" | \"footer\">;\n children?: ReactNode;\n}\n\n/** Standard modal with shorthand-driven header/body/footer. For other shapes, compose `<Dialog.Container>` by hand. */\nfunction DialogRoot({\n icon,\n title,\n description,\n actions,\n dismissible = true,\n closeLabel = \"Close\",\n classNames,\n children,\n ...containerProps\n}: DialogProps) {\n const hasTitle = title !== undefined || icon !== undefined;\n const showHeader = hasTitle || dismissible;\n return (\n <DialogContainer {...containerProps}>\n {showHeader ? (\n <DialogHeader className={classNames?.header}>\n {hasTitle ? (\n <DialogTitle icon={icon} className={classNames?.title}>\n {title}\n </DialogTitle>\n ) : (\n <span className={cn(\"flex-1\", undefined)} />\n )}\n {dismissible ? (\n <DialogCloseButton aria-label={closeLabel} className={classNames?.close} />\n ) : null}\n </DialogHeader>\n ) : null}\n {description !== undefined ? (\n <DialogDescription className={classNames?.description}>{description}</DialogDescription>\n ) : null}\n {children !== undefined ? (\n <DialogBody className={classNames?.body}>{children}</DialogBody>\n ) : null}\n {actions !== undefined ? (\n <DialogFooter className={classNames?.footer}>{actions}</DialogFooter>\n ) : null}\n </DialogContainer>\n );\n}\n\nexport const Dialog = Object.assign(DialogRoot, {\n Container: DialogContainer,\n Header: DialogHeader,\n Title: DialogTitle,\n Description: DialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n CloseButton: DialogCloseButton,\n});\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { Dialog, type DialogClosedBy } from \"./Dialog\";\nimport { DialogContext, useDialogElement } from \"./dialog-internal\";\nimport { type IconProp } from \"./icon\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport type DrawerSide = \"start\" | \"end\" | \"bottom\";\nexport type DrawerSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface DrawerContainerProps extends Omit<ComponentProps<\"dialog\">, \"open\"> {\n /** Controlled open state. Omit for uncontrolled (e.g. Invoker Commands). */\n open?: boolean;\n /** Fires when the drawer closes (Esc, backdrop, close button, form method=\"dialog\"). */\n onOpenChange?: (open: boolean) => void;\n /** Which edge the panel anchors to. Default `\"end\"`. */\n side?: DrawerSide;\n /** Cross-axis extent. Default `\"md\"`. */\n size?: DrawerSize;\n /** Native `closedby` attribute. Default `\"any\"`. */\n closedby?: DialogClosedBy;\n}\n\n/** The bare edge-anchored `<dialog>` primitive — for layouts the default `<Drawer>` doesn't fit. */\nfunction DrawerContainer({\n open,\n onOpenChange,\n side = \"end\",\n size = \"md\",\n closedby = \"any\",\n className,\n children,\n ref: consumerRef,\n ...rest\n}: DrawerContainerProps) {\n const { setRef, ctx, ref } = useDialogElement(open, onOpenChange, consumerRef);\n return (\n <DialogContext.Provider value={ctx}>\n <PortalContainerContext.Provider value={ref}>\n <dialog\n ref={setRef}\n className={cn(\n [\n \"dialog\",\n \"drawer\",\n side !== \"end\" && `drawer-${side}`,\n size !== \"md\" && `drawer-${size}`,\n ],\n className,\n )}\n closedby={closedby}\n {...rest}\n >\n {children}\n </dialog>\n </PortalContainerContext.Provider>\n </DialogContext.Provider>\n );\n}\n\nexport interface DrawerProps extends Omit<DrawerContainerProps, \"title\" | \"children\"> {\n /** Leading icon for the title row. */\n icon?: IconProp;\n /** Renders as `<Drawer.Title>`. */\n title?: ReactNode;\n /** Renders as `<Drawer.Description>`. */\n description?: ReactNode;\n /** Renders as `<Drawer.Footer>`. */\n actions?: ReactNode;\n /** Show the X close button in the header. Default `true`. */\n dismissible?: boolean;\n /** aria-label for the close button. Default `\"Close\"`. */\n closeLabel?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"header\" | \"title\" | \"close\" | \"description\" | \"body\" | \"footer\">;\n children?: ReactNode;\n}\n\n/** Edge-anchored panel with shorthand-driven header/body/footer. For other shapes, compose `<Drawer.Container>`. */\nfunction DrawerRoot({\n icon,\n title,\n description,\n actions,\n dismissible = true,\n closeLabel = \"Close\",\n classNames,\n children,\n ...containerProps\n}: DrawerProps) {\n const hasTitle = title !== undefined || icon !== undefined;\n const showHeader = hasTitle || dismissible;\n return (\n <DrawerContainer {...containerProps}>\n {showHeader ? (\n <Dialog.Header className={classNames?.header}>\n {hasTitle ? (\n <Dialog.Title icon={icon} className={classNames?.title}>\n {title}\n </Dialog.Title>\n ) : (\n <span className={cn(\"flex-1\", undefined)} />\n )}\n {dismissible ? (\n <Dialog.CloseButton aria-label={closeLabel} className={classNames?.close} />\n ) : null}\n </Dialog.Header>\n ) : null}\n {description !== undefined ? (\n <Dialog.Description className={classNames?.description}>{description}</Dialog.Description>\n ) : null}\n {children !== undefined ? (\n <Dialog.Body className={classNames?.body}>{children}</Dialog.Body>\n ) : null}\n {actions !== undefined ? (\n <Dialog.Footer className={classNames?.footer}>{actions}</Dialog.Footer>\n ) : null}\n </DrawerContainer>\n );\n}\n\n/** Shares the Dialog header/body/footer subparts; only the container differs. */\nexport const Drawer = Object.assign(DrawerRoot, {\n Container: DrawerContainer,\n Header: Dialog.Header,\n Title: Dialog.Title,\n Description: Dialog.Description,\n Body: Dialog.Body,\n Footer: Dialog.Footer,\n CloseButton: Dialog.CloseButton,\n});\n","import { Field as BaseField } from \"@base-ui/react/field\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\n\nexport type FieldContainerProps = ComponentProps<typeof BaseField.Root>;\n\n/** The bare `.field` container — for layouts the default `<Field>` doesn't fit. */\nfunction FieldContainer({ className, ...rest }: FieldContainerProps) {\n return <BaseField.Root className={cn(\"field\", className)} {...rest} />;\n}\n\nexport interface FieldProps extends FieldContainerProps {\n /** Renders as `<Field.Label>`. */\n label?: ReactNode;\n /** Renders as `<Field.Description>`. */\n description?: ReactNode;\n /**\n * Single-message error. Renders as `<Field.Error match={true}>` — shown\n * whenever the contained control fails validation. For per-`ValidityState`\n * messages, use `<Field.Container>` and compose `<Field.Error>` directly.\n */\n error?: ReactNode;\n /** Marks the label with a red asterisk via `data-required`. */\n required?: boolean;\n /** Inline layout (`.field-row`) — control beside its label; pairs with switches and single checkboxes. */\n inline?: boolean;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"label\" | \"description\" | \"error\">;\n}\n\n/** Standard field — label, control (`children`), description, error. For other shapes, compose `<Field.Container>` by hand. */\nfunction FieldRoot({\n label,\n description,\n error,\n required,\n inline,\n className,\n classNames,\n children,\n ...rest\n}: FieldProps) {\n const labelEl =\n label !== undefined ? (\n <FieldLabel required={required} className={classNames?.label}>\n {label}\n </FieldLabel>\n ) : null;\n const descriptionEl =\n description !== undefined ? (\n <FieldDescription className={classNames?.description}>{description}</FieldDescription>\n ) : null;\n const errorEl =\n error !== undefined ? (\n <FieldError match={true} className={classNames?.error}>\n {error}\n </FieldError>\n ) : null;\n return (\n <FieldContainer className={cn(inline && \"field-row\", className)} {...rest}>\n {inline ? (\n <>\n {children}\n {labelEl}\n </>\n ) : (\n <>\n {labelEl}\n {children}\n </>\n )}\n {descriptionEl}\n {errorEl}\n </FieldContainer>\n );\n}\n\nexport type FieldLabelProps = ComponentProps<typeof BaseField.Label> & {\n /** Renders a red asterisk after the label text via `data-required`. */\n required?: boolean;\n};\n\nfunction FieldLabel({ className, required, ...rest }: FieldLabelProps) {\n return (\n <BaseField.Label\n data-required={required ? \"\" : undefined}\n className={cn(\"field-label\", className)}\n {...rest}\n />\n );\n}\n\nexport type FieldDescriptionProps = ComponentProps<typeof BaseField.Description>;\n\nfunction FieldDescription({ className, ...rest }: FieldDescriptionProps) {\n return <BaseField.Description className={cn(\"field-description\", className)} {...rest} />;\n}\n\nexport type FieldErrorProps = ComponentProps<typeof BaseField.Error>;\n\nfunction FieldError({ className, ...rest }: FieldErrorProps) {\n return <BaseField.Error className={cn(\"field-error\", className)} {...rest} />;\n}\n\nexport const Field = Object.assign(FieldRoot, {\n Container: FieldContainer,\n Label: FieldLabel,\n Description: FieldDescription,\n Error: FieldError,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type FooterProps = ComponentProps<\"footer\">;\n\nfunction FooterRoot({ className, ...rest }: FooterProps) {\n return <footer className={cn(\"footer\", className)} {...rest} />;\n}\n\nexport type FooterLinksProps = ComponentProps<\"div\">;\n\nfunction FooterLinks({ className, ...rest }: FooterLinksProps) {\n return <div className={cn(\"footer-links\", className)} {...rest} />;\n}\n\nexport type FooterLinkProps = ComponentProps<\"a\">;\n\nfunction FooterLink({ className, children, ...rest }: FooterLinkProps) {\n return (\n <a className={cn(\"footer-link\", className)} {...rest}>\n {children}\n </a>\n );\n}\n\nexport type FooterMetaProps = ComponentProps<\"div\">;\n\nfunction FooterMeta({ className, ...rest }: FooterMetaProps) {\n return <div className={cn(\"footer-meta\", className)} {...rest} />;\n}\n\nexport const Footer = Object.assign(FooterRoot, {\n Links: FooterLinks,\n Link: FooterLink,\n Meta: FooterMeta,\n});\n","import { useRef, type ComponentProps, type Ref } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\nimport { Kbd } from \"./Kbd\";\nimport { useHotkey } from \"./useHotkey\";\n\nexport type MenuProps = ComponentProps<\"details\">;\n\nfunction MenuRoot({ className, ...rest }: MenuProps) {\n return <details className={cn(\"menu\", className)} {...rest} />;\n}\n\nexport type MenuTriggerProps = ComponentProps<\"summary\">;\n\nfunction MenuTrigger({ className, ...rest }: MenuTriggerProps) {\n return <summary className={cn(\"menu-trigger\", className)} {...rest} />;\n}\n\nexport type MenuPopupProps = ComponentProps<\"div\">;\n\nfunction MenuPopup({ className, role = \"menu\", ...rest }: MenuPopupProps) {\n return <div role={role} className={cn(\"menu-popup\", className)} {...rest} />;\n}\n\ninterface MenuItemExtras {\n /** Keyboard shortcut (`useHotkey` syntax) — synthesizes a click; shown right-pinned in the row. */\n hotkey?: string | readonly string[];\n /** Leading icon. Replaced by the check indicator when `checked` is set. */\n icon?: IconProp;\n /** Render as a checkable item: shows a leading check when `true`, reserves the gutter when `false`. Set `role=\"menuitemradio\"` for single-select groups. */\n checked?: boolean;\n}\n\ntype MenuItemAsButton = ComponentProps<\"button\"> & MenuItemExtras & { href?: undefined };\ntype MenuItemAsLink = ComponentProps<\"a\"> & MenuItemExtras & { href: string };\n\nexport type MenuItemProps = MenuItemAsButton | MenuItemAsLink;\n\nfunction CheckIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M5 12l5 5l10 -10\" />\n </svg>\n );\n}\n\n// The check is revealed by CSS only when the item is aria-checked; the gutter is\n// always reserved so labels align across a checkable group.\nfunction MenuItemIndicator() {\n return (\n <span className={cn(\"menu-item-indicator\", undefined)}>\n <CheckIcon />\n </span>\n );\n}\n\nfunction MenuItem(props: MenuItemProps) {\n const ref = useRef<HTMLElement | null>(null);\n const hotkey = props.hotkey;\n const checked = props.checked;\n\n // Anchors have no native `disabled`, hence the `aria-disabled` branch.\n const ariaDisabled = props[\"aria-disabled\"];\n const isDisabled =\n (\"disabled\" in props && props.disabled === true) ||\n ariaDisabled === true ||\n ariaDisabled === \"true\";\n\n const { ariaKeyShortcuts, primaryChord } = useHotkey(hotkey, () => ref.current?.click(), {\n enabled: !isDisabled,\n });\n\n const leading = checked !== undefined ? <MenuItemIndicator /> : renderIcon(props.icon);\n const defaultRole = checked !== undefined ? \"menuitemcheckbox\" : \"menuitem\";\n\n if (props.href !== undefined) {\n const {\n className,\n role,\n icon: _icon,\n checked: _checked,\n children,\n hotkey: _hk,\n onClick,\n ...rest\n } = props;\n return (\n // <a href> is natively keyboard-activable, so these a11y rules are false positives.\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n role={role ?? defaultRole}\n aria-checked={checked}\n aria-keyshortcuts={ariaKeyShortcuts}\n className={cn(\"menu-item\", className)}\n onClick={(event) => {\n // Anchors ignore `aria-disabled` natively — without this, clicks would still navigate.\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n }}\n {...rest}\n >\n {leading}\n {children}\n {primaryChord !== undefined ? <Kbd keys={primaryChord} /> : null}\n </a>\n );\n }\n const {\n className,\n type = \"button\",\n role,\n icon: _icon,\n checked: _checked,\n children,\n hotkey: _hk,\n ...rest\n } = props;\n return (\n <button\n ref={ref as Ref<HTMLButtonElement>}\n type={type}\n role={role ?? defaultRole}\n aria-checked={checked}\n aria-keyshortcuts={ariaKeyShortcuts}\n className={cn(\"menu-item\", className)}\n {...rest}\n >\n {leading}\n {children}\n {primaryChord !== undefined ? <Kbd keys={primaryChord} /> : null}\n </button>\n );\n}\n\nexport type MenuSeparatorProps = ComponentProps<\"hr\">;\n\nfunction MenuSeparator({ className, ...rest }: MenuSeparatorProps) {\n return <hr className={cn(\"menu-separator\", className)} {...rest} />;\n}\n\nexport type MenuGroupProps = ComponentProps<\"div\">;\n\nfunction MenuGroup({ className, role = \"group\", ...rest }: MenuGroupProps) {\n return <div role={role} className={cn(\"menu-group\", className)} {...rest} />;\n}\n\nexport type MenuGroupLabelProps = ComponentProps<\"div\">;\n\nfunction MenuGroupLabel({ className, ...rest }: MenuGroupLabelProps) {\n return <div className={cn(\"menu-group-label\", className)} {...rest} />;\n}\n\nexport const Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Popup: MenuPopup,\n Item: MenuItem,\n Separator: MenuSeparator,\n Group: MenuGroup,\n GroupLabel: MenuGroupLabel,\n});\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { useAppShell } from \"./AppShell\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\nimport { Menu } from \"./Menu\";\n\nexport type NavbarProps = ComponentProps<\"header\">;\n\nfunction NavbarRoot({ className, ...rest }: NavbarProps) {\n return <header className={cn(\"navbar\", className)} {...rest} />;\n}\n\nexport type NavbarBrandProps = ComponentProps<\"div\">;\n\nfunction NavbarBrand({ className, ...rest }: NavbarBrandProps) {\n return <div className={cn(\"navbar-brand\", className)} {...rest} />;\n}\n\nexport type NavbarItemsProps = ComponentProps<\"nav\">;\n\nfunction NavbarItems({ className, ...rest }: NavbarItemsProps) {\n return <nav className={cn(\"navbar-items\", className)} {...rest} />;\n}\n\nexport interface NavbarItemProps extends ComponentProps<\"a\"> {\n active?: boolean;\n /** Leading icon. */\n icon?: IconProp;\n}\n\nfunction NavbarItem({ active, icon, className, children, ...rest }: NavbarItemProps) {\n return (\n <a\n className={cn(\"navbar-item\", className)}\n aria-current={active ? \"page\" : undefined}\n {...rest}\n >\n {renderIcon(icon)}\n {children}\n </a>\n );\n}\n\nexport interface NavbarDropdownProps extends Omit<ComponentProps<\"details\">, \"title\"> {\n /** Text shown in the trigger. */\n label: ReactNode;\n}\n\nfunction NavbarDropdown({ label, className, children, ...rest }: NavbarDropdownProps) {\n return (\n <Menu className={className} {...rest}>\n <Menu.Trigger className={cn(\"navbar-item\", undefined)}>{label}</Menu.Trigger>\n <Menu.Popup>{children}</Menu.Popup>\n </Menu>\n );\n}\n\nexport type NavbarActionsProps = ComponentProps<\"div\">;\n\nfunction NavbarActions({ className, ...rest }: NavbarActionsProps) {\n return <div className={cn(\"navbar-actions\", className)} {...rest} />;\n}\n\nexport interface NavbarMobileToggleProps extends Omit<\n ComponentProps<\"button\">,\n \"onClick\" | \"children\"\n> {\n /** Accessible label for the toggle. Default: \"Open menu\". */\n label?: string;\n}\n\nfunction NavbarMobileToggle({\n label = \"Open menu\",\n className,\n type = \"button\",\n ...rest\n}: NavbarMobileToggleProps) {\n const shell = useAppShell();\n const open = shell?.mobileDrawerOpen ?? false;\n\n return (\n <button\n type={type}\n aria-label={label}\n aria-expanded={open}\n onClick={() => shell?.setMobileDrawerOpen(!open)}\n className={cn(\"navbar-mobile-toggle\", className)}\n {...rest}\n />\n );\n}\n\nexport const Navbar = Object.assign(NavbarRoot, {\n Brand: NavbarBrand,\n Items: NavbarItems,\n Item: NavbarItem,\n Dropdown: NavbarDropdown,\n Actions: NavbarActions,\n MobileToggle: NavbarMobileToggle,\n});\n","import { Tabs as BaseTabs } from \"@base-ui/react/tabs\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type TabsVariant = \"bordered\" | \"boxed\";\nexport type TabsSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface TabsProps extends ComponentProps<typeof BaseTabs.Root> {\n variant?: TabsVariant;\n size?: TabsSize;\n fullWidth?: boolean;\n /** Let the list wrap to multiple rows instead of overflowing; each tab stays on one line. */\n wrap?: boolean;\n}\n\nfunction TabsRoot({\n variant = \"bordered\",\n size = \"md\",\n fullWidth = false,\n wrap = false,\n className,\n ...rest\n}: TabsProps) {\n return (\n <BaseTabs.Root\n className={cn(\n [\n \"tabs\",\n variant !== \"bordered\" && `tabs-${variant}`,\n size !== \"md\" && `tabs-${size}`,\n fullWidth && \"tabs-full-width\",\n wrap && \"tabs-wrap\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport type TabsListProps = ComponentProps<typeof BaseTabs.List>;\n\nfunction TabsList({ className, ...rest }: TabsListProps) {\n return <BaseTabs.List className={cn(\"tab-list\", className)} {...rest} />;\n}\n\nexport interface TabsTabProps extends ComponentProps<typeof BaseTabs.Tab> {\n /** Leading icon. Pass a component (`icon={IconLock}`) or an element. */\n icon?: IconProp;\n}\n\nfunction TabsTab({ icon, className, children, ...rest }: TabsTabProps) {\n return (\n <BaseTabs.Tab className={cn(\"tab\", className)} {...rest}>\n {renderIcon(icon)}\n {children}\n </BaseTabs.Tab>\n );\n}\n\nexport type TabsPanelProps = ComponentProps<typeof BaseTabs.Panel>;\n\nfunction TabsPanel({ className, ...rest }: TabsPanelProps) {\n return <BaseTabs.Panel className={cn(\"tab-panel\", className)} {...rest} />;\n}\n\nexport const Tabs = Object.assign(TabsRoot, {\n List: TabsList,\n Tab: TabsTab,\n Panel: TabsPanel,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport interface CodeBlockProps extends ComponentProps<\"pre\"> {\n /** Don't wrap long lines — let them overflow horizontally instead. */\n nowrap?: boolean;\n}\n\n/**\n * Styled `<pre>` for logs, JSON dumps, terminal output, raw model output.\n * Theme-following surface via `--color-code-surface` / `--color-code-text`.\n * No syntax highlighting — layer Shiki/Prism on a nested `<code>` if needed.\n */\nexport function CodeBlock({ nowrap, className, ...rest }: CodeBlockProps) {\n return <pre className={cn([\"code-block\", nowrap && \"code-block-nowrap\"], className)} {...rest} />;\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type ProseProps = ComponentProps<\"div\">;\n\n/**\n * Styled container for HTML the system can't annotate with its class names —\n * backend-rendered markdown, CMS bodies, model output. Element styles are\n * scoped to this wrapper; the rest of the admin UI keeps the global reset.\n */\nexport function Prose({ className, ...rest }: ProseProps) {\n return <div className={cn(\"prose\", className)} {...rest} />;\n}\n","import { Tooltip as BaseTooltip } from \"@base-ui/react/tooltip\";\nimport { useContext, type ComponentProps, type ReactElement, type ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport type TooltipProviderProps = ComponentProps<typeof BaseTooltip.Provider>;\n\nfunction TooltipProvider(props: TooltipProviderProps) {\n return <BaseTooltip.Provider {...props} />;\n}\n\nexport type TooltipRootProps = ComponentProps<typeof BaseTooltip.Root>;\n\nfunction TooltipRoot(props: TooltipRootProps) {\n return <BaseTooltip.Root {...props} />;\n}\n\nexport type TooltipTriggerProps = ComponentProps<typeof BaseTooltip.Trigger>;\n\nfunction TooltipTrigger(props: TooltipTriggerProps) {\n return <BaseTooltip.Trigger {...props} />;\n}\n\nexport type TooltipSize = \"sm\" | \"md\";\n\ntype TooltipPositionerProps = ComponentProps<typeof BaseTooltip.Positioner>;\n\nexport interface TooltipPopupProps extends ComponentProps<typeof BaseTooltip.Popup> {\n size?: TooltipSize;\n side?: TooltipPositionerProps[\"side\"];\n align?: TooltipPositionerProps[\"align\"];\n sideOffset?: TooltipPositionerProps[\"sideOffset\"];\n}\n\nfunction TooltipPopup({\n size = \"md\",\n side = \"top\",\n align = \"center\",\n sideOffset = 6,\n role = \"tooltip\",\n className,\n children,\n ...rest\n}: TooltipPopupProps) {\n const portalContainer = useContext(PortalContainerContext);\n return (\n <BaseTooltip.Portal container={portalContainer ?? undefined}>\n <BaseTooltip.Positioner sideOffset={sideOffset} side={side} align={align}>\n <BaseTooltip.Popup\n role={role}\n className={cn([\"tooltip\", size !== \"md\" && `tooltip-${size}`], className)}\n {...rest}\n >\n {children}\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n </BaseTooltip.Portal>\n );\n}\n\nexport interface TooltipProps extends Omit<TooltipRootProps, \"children\"> {\n content: ReactNode;\n side?: TooltipPopupProps[\"side\"];\n align?: TooltipPopupProps[\"align\"];\n sideOffset?: TooltipPopupProps[\"sideOffset\"];\n size?: TooltipSize;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"popup\">;\n /** The trigger element. Must be a single React element so Base UI can merge trigger props/refs into it. */\n children: ReactElement;\n}\n\nfunction TooltipShorthand({\n content,\n side,\n align,\n sideOffset,\n size,\n classNames,\n children,\n ...rootProps\n}: TooltipProps) {\n return (\n <TooltipRoot {...rootProps}>\n <BaseTooltip.Trigger render={children} />\n <TooltipPopup\n side={side}\n align={align}\n sideOffset={sideOffset}\n size={size}\n className={classNames?.popup}\n >\n {content}\n </TooltipPopup>\n </TooltipRoot>\n );\n}\n\nexport const Tooltip = Object.assign(TooltipShorthand, {\n Provider: TooltipProvider,\n Root: TooltipRoot,\n Trigger: TooltipTrigger,\n Popup: TooltipPopup,\n});\n","import { useRef, useState, type ComponentProps, type ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\n\n// Hand-rolled to Tabler's stroke conventions so admin-react stays icon-library-agnostic.\nfunction CopyGlyph({ className }: { className: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className={className}\n >\n <path d=\"M7 7m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z\" />\n <path d=\"M15 7v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\" />\n </svg>\n );\n}\n\nfunction CheckGlyph({ className }: { className: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className={className}\n >\n <path d=\"M5 12l5 5l10 -10\" />\n </svg>\n );\n}\n\nexport interface PropertyListProps extends Omit<ComponentProps<\"section\">, \"title\"> {\n striped?: boolean;\n /** Tightens row height and padding for very dense panels. */\n compact?: boolean;\n /** Collapses the section when every value rendered the auto em-dash fallback. */\n hideIfAllEmpty?: boolean;\n /** Section heading rendered as `<h3 class=\"property-list-title\">`. */\n title?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"title\" | \"items\">;\n}\n\nfunction PropertyListRoot({\n striped,\n compact,\n hideIfAllEmpty,\n title,\n className,\n classNames,\n children,\n ...rest\n}: PropertyListProps) {\n return (\n <section\n className={cn(\n [\n \"property-list\",\n striped && \"property-list-striped\",\n compact && \"property-list-compact\",\n hideIfAllEmpty && \"property-list-hide-if-empty\",\n ],\n className,\n )}\n {...rest}\n >\n {title !== undefined ? (\n <h3 className={cn(\"property-list-title\", classNames?.title)}>{title}</h3>\n ) : null}\n <dl className={cn(\"property-list-items\", classNames?.items)}>{children}</dl>\n </section>\n );\n}\n\nexport interface PropertyListItemProps extends Omit<ComponentProps<\"dd\">, \"title\" | \"label\"> {\n label?: ReactNode;\n value?: ReactNode;\n /** Right-aligns the value cell + applies `tabular-nums`. Mirrors `Table.Cell.numeric`. */\n numeric?: boolean;\n copyable?: boolean;\n /** Overrides the text the copy button writes to the clipboard. */\n copyValue?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"label\" | \"copy\">;\n}\n\nfunction isEmptyValue(value: ReactNode): boolean {\n if (value == null) return true;\n if (typeof value === \"string\") return value.trim() === \"\";\n return false;\n}\n\n// Emits a <dt>/<dd> sibling pair with no host element; children mode renders them verbatim.\nfunction PropertyListItem({\n label,\n value,\n numeric,\n copyable,\n copyValue,\n classNames,\n children,\n ...rest\n}: PropertyListItemProps) {\n if (children !== undefined) {\n return <>{children}</>;\n }\n const empty = isEmptyValue(value);\n return (\n <>\n <PropertyListLabel className={classNames?.label}>{label}</PropertyListLabel>\n <PropertyListValue\n numeric={numeric}\n copyable={copyable}\n empty={empty}\n copyValue={copyValue ?? (typeof value === \"string\" ? value : undefined)}\n classNames={classNames?.copy ? { copy: classNames.copy } : undefined}\n {...rest}\n >\n {empty ? \"—\" : value}\n </PropertyListValue>\n </>\n );\n}\n\nexport type PropertyListLabelProps = ComponentProps<\"dt\">;\nfunction PropertyListLabel({ className, ...rest }: PropertyListLabelProps) {\n return <dt className={cn(\"property-list-label\", className)} {...rest} />;\n}\n\nexport interface PropertyListValueProps extends ComponentProps<\"dd\"> {\n numeric?: boolean;\n copyable?: boolean;\n /** Marks an auto-rendered em-dash cell; drives the list-level `hideIfAllEmpty`. */\n empty?: boolean;\n /** Overrides the text the copy button writes to the clipboard. */\n copyValue?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"copy\">;\n}\n\nfunction PropertyListValue({\n numeric,\n copyable,\n empty,\n copyValue,\n className,\n classNames,\n children,\n ...rest\n}: PropertyListValueProps) {\n const ddRef = useRef<HTMLElement | null>(null);\n const [copied, setCopied] = useState(false);\n\n async function handleCopy() {\n const text = copyValue ?? ddRef.current?.textContent?.trim() ?? \"\";\n if (!text) return;\n try {\n await navigator.clipboard.writeText(text);\n setCopied(true);\n setTimeout(() => setCopied(false), 1200);\n } catch {\n // Permission denied or unsupported — fail silently.\n }\n }\n\n return (\n <dd\n ref={ddRef}\n className={cn(\n [\n \"property-list-value\",\n numeric && \"property-list-value-numeric\",\n copyable && \"property-list-value-copyable\",\n empty && \"property-list-value-empty\",\n ],\n className,\n )}\n {...rest}\n >\n {children}\n <button\n type=\"button\"\n aria-label=\"Copy\"\n className={cn(\"property-list-copy\", classNames?.copy)}\n onClick={handleCopy}\n data-copied={copied ? \"true\" : undefined}\n >\n <CopyGlyph className={cn(\"property-list-copy-icon\", undefined)} />\n <CheckGlyph className={cn(\"property-list-copy-icon-copied\", undefined)} />\n </button>\n </dd>\n );\n}\n\nexport const PropertyList = Object.assign(PropertyListRoot, {\n Item: PropertyListItem,\n Label: PropertyListLabel,\n Value: PropertyListValue,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type TableAlign = \"left\" | \"right\" | \"center\";\nexport type TableDensity = \"compact\" | \"default\" | \"relaxed\";\n\nexport interface TableProps extends ComponentProps<\"table\"> {\n striped?: boolean;\n bordered?: boolean;\n /** Cell padding. Default `\"default\"`. */\n density?: TableDensity;\n /** @deprecated Use `density=\"relaxed\"`. Kept for the class-name contract. */\n relaxed?: boolean;\n /** Pins `<thead>`; requires an overflowing ancestor (`overflow: auto` + `max-height` wrapper). */\n sticky?: boolean;\n /** Pins the first column against horizontal scroll; requires an overflow-x ancestor. */\n pinCol?: boolean;\n}\n\nfunction TableRoot({\n striped,\n bordered,\n density,\n relaxed,\n sticky,\n pinCol,\n className,\n ...rest\n}: TableProps) {\n const resolvedDensity = density ?? (relaxed ? \"relaxed\" : \"default\");\n return (\n <table\n className={cn(\n [\n \"table\",\n striped && \"table-striped\",\n bordered && \"table-bordered\",\n resolvedDensity === \"compact\" && \"table-compact\",\n resolvedDensity === \"relaxed\" && \"table-relaxed\",\n sticky && \"table-sticky\",\n pinCol && \"table-pin-col\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport type TableHeadProps = ComponentProps<\"thead\">;\nfunction TableHead({ className, ...rest }: TableHeadProps) {\n return <thead className={className} {...rest} />;\n}\n\nexport type TableBodyProps = ComponentProps<\"tbody\">;\nfunction TableBody({ className, ...rest }: TableBodyProps) {\n return <tbody className={className} {...rest} />;\n}\n\nexport type TableFootProps = ComponentProps<\"tfoot\">;\n/** Footer rows are semibold by default; the first row gets a strong top divider against the body. */\nfunction TableFoot({ className, ...rest }: TableFootProps) {\n return <tfoot className={className} {...rest} />;\n}\n\nexport interface TableRowProps extends ComponentProps<\"tr\"> {\n /** Programmatic selection highlight — independent of the CSS rule tinting rows with a checked checkbox. */\n selected?: boolean;\n /** Applies `.table-row-link` so the first `<a>` in the row fills it; the consumer still supplies the anchor. */\n asLink?: boolean;\n}\nfunction TableRow({ selected, asLink, className, ...rest }: TableRowProps) {\n return (\n <tr\n className={cn(asLink && \"table-row-link\", className)}\n data-selected={selected || undefined}\n {...rest}\n />\n );\n}\n\nexport interface TableHeaderCellProps extends Omit<ComponentProps<\"th\">, \"align\"> {\n align?: TableAlign;\n /** Narrow first-column gutter, mirroring the body cell `gutter` so the column lines up. */\n gutter?: boolean;\n}\nfunction TableHeaderCell({ align, gutter, className, scope, ...rest }: TableHeaderCellProps) {\n return (\n <th\n className={cn([\"table-header-cell\", gutter && \"table-cell-gutter\"], className)}\n data-align={align && align !== \"left\" ? align : undefined}\n scope={scope ?? \"col\"}\n {...rest}\n />\n );\n}\n\nexport interface TableCellProps extends Omit<ComponentProps<\"td\">, \"align\"> {\n align?: TableAlign;\n /** Narrow first-column gutter for row-level status icons. */\n gutter?: boolean;\n /** `text-right` + `tabular-nums` for currency/totals columns. */\n numeric?: boolean;\n}\nfunction TableCell({ align, gutter, numeric, className, ...rest }: TableCellProps) {\n return (\n <td\n className={cn(\n [\"table-cell\", gutter && \"table-cell-gutter\", numeric && \"table-cell-numeric\"],\n className,\n )}\n data-align={align && align !== \"left\" ? align : undefined}\n {...rest}\n />\n );\n}\n\nexport interface TableEmptyProps extends ComponentProps<\"td\"> {\n /** Columns to span — set to the table's column count. */\n colSpan?: number;\n}\n/** A centered \"no results\" row; renders its own `<tr>`, so drop it inside `<Table.Body>`. */\nfunction TableEmpty({ colSpan, className, children, ...rest }: TableEmptyProps) {\n return (\n <tr>\n <td className={cn(\"table-empty\", className)} colSpan={colSpan} {...rest}>\n {children}\n </td>\n </tr>\n );\n}\n\nexport const Table = Object.assign(TableRoot, {\n Head: TableHead,\n Body: TableBody,\n Foot: TableFoot,\n Row: TableRow,\n HeaderCell: TableHeaderCell,\n Cell: TableCell,\n Empty: TableEmpty,\n});\n","import { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { createContext, useContext, useState } from \"react\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { useAppShell } from \"./AppShell\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\ninterface SidebarContextValue {\n collapsed?: boolean;\n defaultCollapsed?: boolean;\n onCollapsedChange?: (collapsed: boolean) => void;\n}\n\nconst SidebarContext = createContext<SidebarContextValue | null>(null);\n\nexport interface SidebarProps extends Omit<ComponentProps<\"aside\">, \"onChange\"> {\n /** Controlled collapsed state. Pair with `onCollapsedChange`. */\n collapsed?: boolean;\n /** Uncontrolled initial state. */\n defaultCollapsed?: boolean;\n onCollapsedChange?: (collapsed: boolean) => void;\n /** Accessible label for the mobile drawer dialog. Default: \"Navigation\". */\n drawerLabel?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"drawer\" | \"drawerBackdrop\">;\n}\n\nfunction SidebarRoot({\n collapsed,\n defaultCollapsed,\n onCollapsedChange,\n drawerLabel = \"Navigation\",\n className,\n classNames,\n children,\n ...rest\n}: SidebarProps) {\n const shell = useAppShell();\n const drawerOpen = shell?.mobileDrawerOpen ?? false;\n\n return (\n <SidebarContext.Provider value={{ collapsed, defaultCollapsed, onCollapsedChange }}>\n <aside className={cn(\"sidebar\", className)} {...rest}>\n {drawerOpen ? null : children}\n </aside>\n {shell ? (\n <BaseDialog.Root open={drawerOpen} onOpenChange={(open) => shell.setMobileDrawerOpen(open)}>\n <BaseDialog.Portal>\n <BaseDialog.Backdrop\n className={cn(\"sidebar-drawer-backdrop\", classNames?.drawerBackdrop)}\n />\n <BaseDialog.Popup\n className={cn(\"sidebar-drawer\", classNames?.drawer)}\n aria-label={drawerLabel}\n onClick={(event) => {\n const target = event.target as HTMLElement;\n if (target.closest(\"a, [data-drawer-close]\")) {\n shell.setMobileDrawerOpen(false);\n }\n }}\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n </BaseDialog.Root>\n ) : null}\n </SidebarContext.Provider>\n );\n}\n\nexport type SidebarHeaderProps = ComponentProps<\"div\">;\n\nfunction SidebarHeader({ className, ...rest }: SidebarHeaderProps) {\n return <div className={cn(\"sidebar-header\", className)} {...rest} />;\n}\n\nexport type SidebarNavProps = ComponentProps<\"nav\">;\n\nfunction SidebarNav({ className, ...rest }: SidebarNavProps) {\n return <nav className={cn(\"sidebar-nav\", className)} {...rest} />;\n}\n\nexport type SidebarGroupProps = ComponentProps<\"div\">;\n\nfunction SidebarGroup({ className, ...rest }: SidebarGroupProps) {\n return <div className={cn(\"sidebar-group\", className)} {...rest} />;\n}\n\nexport type SidebarGroupLabelProps = ComponentProps<\"div\">;\n\nfunction SidebarGroupLabel({ className, ...rest }: SidebarGroupLabelProps) {\n return <div className={cn(\"sidebar-group-label\", className)} {...rest} />;\n}\n\nexport interface SidebarItemProps extends ComponentProps<\"a\"> {\n active?: boolean;\n /** Leading icon. Rendered inside `<Sidebar.Icon>`. */\n icon?: IconProp;\n /** Trailing badge. Rendered inside `<Sidebar.Badge>`. */\n badge?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"icon\" | \"label\" | \"badge\">;\n}\n\nfunction SidebarItem({\n active,\n icon,\n badge,\n className,\n classNames,\n children,\n ...rest\n}: SidebarItemProps) {\n return (\n <a\n className={cn(\"sidebar-item\", className)}\n aria-current={active ? \"page\" : undefined}\n {...rest}\n >\n {icon != null ? (\n <SidebarIcon className={classNames?.icon}>{renderIcon(icon)}</SidebarIcon>\n ) : null}\n {children !== undefined ? (\n <SidebarLabel className={classNames?.label}>{children}</SidebarLabel>\n ) : null}\n {badge !== undefined ? (\n <SidebarBadge className={classNames?.badge}>{badge}</SidebarBadge>\n ) : null}\n </a>\n );\n}\n\nexport type SidebarIconProps = ComponentProps<\"span\">;\n\nfunction SidebarIcon({ className, ...rest }: SidebarIconProps) {\n return <span aria-hidden className={cn(\"sidebar-icon\", className)} {...rest} />;\n}\n\nexport type SidebarLabelProps = ComponentProps<\"span\">;\n\nfunction SidebarLabel({ className, ...rest }: SidebarLabelProps) {\n return <span className={cn(\"sidebar-label\", className)} {...rest} />;\n}\n\nexport type SidebarBadgeProps = ComponentProps<\"span\">;\n\nfunction SidebarBadge({ className, ...rest }: SidebarBadgeProps) {\n return <span className={cn(\"sidebar-badge\", className)} {...rest} />;\n}\n\nexport interface SidebarCollapsibleProps extends Omit<\n ComponentProps<\"details\">,\n \"onToggle\" | \"open\"\n> {\n /** Leading icon for the trigger. Rendered inside `<Sidebar.Icon>`. */\n icon?: IconProp;\n /** Label shown next to the icon. Rendered inside `<Sidebar.Label>`. */\n label?: ReactNode;\n /** Full trigger content. Overrides `icon` + `label`. */\n trigger?: ReactNode;\n /** Controlled open state. */\n open?: boolean;\n /** Uncontrolled initial open state. */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"icon\" | \"label\" | \"trigger\" | \"panel\">;\n}\n\nfunction SidebarCollapsible({\n icon,\n label,\n trigger,\n children,\n className,\n classNames,\n open,\n defaultOpen,\n onOpenChange,\n ...rest\n}: SidebarCollapsibleProps) {\n const isControlled = open !== undefined;\n const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);\n const isOpen = isControlled ? open : internalOpen;\n\n const triggerContent = trigger ?? (\n <>\n {icon != null ? (\n <SidebarIcon className={classNames?.icon}>{renderIcon(icon)}</SidebarIcon>\n ) : null}\n {label !== undefined ? (\n <SidebarLabel className={classNames?.label}>{label}</SidebarLabel>\n ) : null}\n </>\n );\n\n return (\n <details\n className={cn(\"sidebar-collapsible\", className)}\n open={isOpen}\n onToggle={(event) => {\n const next = (event.currentTarget as HTMLDetailsElement).open;\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n }}\n {...rest}\n >\n <summary className={cn(\"sidebar-collapsible-trigger\", classNames?.trigger)}>\n {triggerContent}\n </summary>\n <div className={cn(\"sidebar-collapsible-panel\", classNames?.panel)}>{children}</div>\n </details>\n );\n}\n\nexport interface SidebarSubItemProps extends ComponentProps<\"a\"> {\n active?: boolean;\n icon?: IconProp;\n badge?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"icon\" | \"badge\">;\n}\n\nfunction SidebarSubItem({\n active,\n icon,\n badge,\n className,\n classNames,\n children,\n ...rest\n}: SidebarSubItemProps) {\n return (\n <a\n className={cn(\"sidebar-subitem\", className)}\n aria-current={active ? \"page\" : undefined}\n {...rest}\n >\n {icon != null ? (\n <SidebarIcon className={classNames?.icon}>{renderIcon(icon)}</SidebarIcon>\n ) : null}\n {children}\n {badge !== undefined ? (\n <SidebarBadge className={classNames?.badge}>{badge}</SidebarBadge>\n ) : null}\n </a>\n );\n}\n\nexport type SidebarFooterProps = ComponentProps<\"div\">;\n\nfunction SidebarFooter({ className, ...rest }: SidebarFooterProps) {\n return <div className={cn(\"sidebar-footer\", className)} {...rest} />;\n}\n\nexport interface SidebarCollapseToggleProps extends Omit<ComponentProps<\"label\">, \"htmlFor\"> {\n /** Accessible label for the checkbox. Default: \"Toggle sidebar\". */\n label?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"input\">;\n}\n\nfunction SidebarCollapseToggle({\n label = \"Toggle sidebar\",\n className,\n classNames,\n children,\n ...rest\n}: SidebarCollapseToggleProps) {\n const ctx = useContext(SidebarContext);\n const controlledChecked = ctx?.collapsed;\n const isControlled = controlledChecked !== undefined;\n\n return (\n <label className={cn(\"sidebar-collapse-toggle\", className)} {...rest}>\n <input\n type=\"checkbox\"\n className={cn(\"sidebar-toggle\", classNames?.input)}\n aria-label={label}\n {...(isControlled\n ? { checked: controlledChecked }\n : { defaultChecked: ctx?.defaultCollapsed })}\n onChange={(event) => ctx?.onCollapsedChange?.(event.currentTarget.checked)}\n />\n <span className={cn(\"sr-only\", undefined)}>{label}</span>\n {children}\n </label>\n );\n}\n\nexport const Sidebar = Object.assign(SidebarRoot, {\n Header: SidebarHeader,\n Nav: SidebarNav,\n Group: SidebarGroup,\n GroupLabel: SidebarGroupLabel,\n Item: SidebarItem,\n Icon: SidebarIcon,\n Label: SidebarLabel,\n Badge: SidebarBadge,\n Collapsible: SidebarCollapsible,\n SubItem: SidebarSubItem,\n Footer: SidebarFooter,\n CollapseToggle: SidebarCollapseToggle,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAeA,IAAM,SAAS;AAEf,SAAS,aAAa,OAAuB;CAC3C,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,MACJ,MAAM,KAAK,EACX,OAAO,OAAO,EACd,KAAK,UAAU,GAAG,SAAS,OAAO,EAClC,KAAK,GAAG;AACb;AAEA,SAAS,KAAK,GAAG,OAA0C;CACzD,OAAO,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AACvC;AAmBA,SAAgB,G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AA;CAE3C,OACE,qBAAC,SAAD;EAAO,WAAW,GAAG,2BAA2B,SAAS;EAAG,GAAI;YAAhE;GACE,oBAAC,SAAD;IACE,MAAK;IACL,WAAW,GAAG,kBAAkB,YAAY,KAAK;IACjD,cAAY;IACZ,GAAK,eACD,EAAE,SAAS,kBAAkB,IAC7B,EAAE,gBAAgB,KAAK,iBAAiB;IAC5C,WAAW,UAAU,KAAK,oBAAoB,MAAM,cAAc,OAAO;GAC1E,CAAA;GACD,oBAAC,QAAD;IAAM,WAAW,GAAG,WAAW,KAAA,CAAS;cAAI;GAAY,CAAA;GACvD;EACI;;AAEX;AAEA,IAAa,UAAU,OAAO,OAAO,aAAa;CAChD,QAAQ;CACR,KAAK;CACL,OAAO;CACP,YAAY;CACZ,MAAM;CACN,MAAM;CACN,OAAO;CACP,OAAO;CACP,aAAa;CACb,SAAS;CACT,QAAQ;CACR,gBAAgB;AAClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/cn.ts","../src/Accordion.tsx","../src/portal-context.ts","../src/AdminRoot.tsx","../src/icon.ts","../src/Alert.tsx","../src/AppShell.tsx","../src/Badge.tsx","../src/BrandTile.tsx","../src/Avatar.tsx","../src/hotkey-parse.ts","../src/Kbd.tsx","../src/hotkey-registry.ts","../src/useHotkey.ts","../src/Button.tsx","../src/ButtonGroup.tsx","../src/Breadcrumbs.tsx","../src/Input.tsx","../src/FileInput.tsx","../src/InputGroup.tsx","../src/NumberInput.tsx","../src/Indicator.tsx","../src/Link.tsx","../src/Separator.tsx","../src/Pagination.tsx","../src/Textarea.tsx","../src/Checkbox.tsx","../src/Radio.tsx","../src/Progress.tsx","../src/Spinner.tsx","../src/Switch.tsx","../src/Select.tsx","../src/Container.tsx","../src/Card.tsx","../src/StatCard.tsx","../src/Timeline.tsx","../src/Item.tsx","../src/chart-internal.ts","../src/BarChart.tsx","../src/ChartLegend.tsx","../src/Donut.tsx","../src/StackedBar.tsx","../src/dialog-internal.ts","../src/Dialog.tsx","../src/Drawer.tsx","../src/Field.tsx","../src/Footer.tsx","../src/Menu.tsx","../src/Navbar.tsx","../src/Tabs.tsx","../src/CodeBlock.tsx","../src/Prose.tsx","../src/Tooltip.tsx","../src/PropertyList.tsx","../src/Table.tsx","../src/Sidebar.tsx"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\n\n/**\n * Per-slot class overrides for a component's internal sub-elements. Keys are\n * slot names; values are consumer classes passed through verbatim (never\n * `_ao-`-prefixed), exactly like the top-level `className`. `className` targets\n * the root; `classNames` reaches the inner slots the shorthand props render.\n */\nexport type SlotClasses<Slot extends string> = Partial<Record<Slot, string>>;\n\n/**\n * Every admin class is prefixed so the bundle coexists with host-page CSS\n * without colliding on common names like `.btn`. Must match the selector\n * prefix `wrap-scoped.mjs` bakes into `@aortl/admin-css/admin.scoped.css`.\n */\nconst PREFIX = \"_ao-\";\n\nfunction prefixTokens(value: string): string {\n if (!value) return \"\";\n return value\n .split(/\\s+/)\n .filter(Boolean)\n .map((token) => `${PREFIX}${token}`)\n .join(\" \");\n}\n\nfunction join(...parts: Array<string | undefined>): string {\n return parts.filter(Boolean).join(\" \");\n}\n\n/**\n * className merger that preserves Base UI's render-prop className form —\n * a function `className` is deferred until Base UI invokes it with state.\n *\n * `base` carries admin's own classes and is always prefixed with `_ao-`.\n * `className` is the consumer-supplied prop and passes through verbatim —\n * it lives in the caller's namespace.\n */\nexport function cn(base: ClassValue, className: string | undefined): string;\nexport function cn<TState>(\n base: ClassValue,\n className: (state: TState) => string | undefined,\n): (state: TState) => string;\nexport function cn<TState>(\n base: ClassValue,\n className: string | ((state: TState) => string | undefined) | undefined,\n): string | ((state: TState) => string);\nexport function cn<TState>(\n base: ClassValue,\n className: string | ((state: TState) => string | undefined) | undefined,\n): string | ((state: TState) => string) {\n const baseClasses = prefixTokens(clsx(base));\n if (typeof className === \"function\") {\n return (state) => join(baseClasses, className(state) ?? undefined);\n }\n return join(baseClasses, className);\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type AccordionProps = ComponentProps<\"div\">;\n\nfunction AccordionRoot({ className, ...rest }: AccordionProps) {\n return <div className={cn(\"accordion\", className)} {...rest} />;\n}\n\nexport type AccordionItemProps = ComponentProps<\"details\">;\n\nfunction AccordionItem({ className, ...rest }: AccordionItemProps) {\n return <details className={cn(\"accordion-item\", className)} {...rest} />;\n}\n\nexport type AccordionSummaryProps = ComponentProps<\"summary\">;\n\nfunction AccordionSummary({ className, ...rest }: AccordionSummaryProps) {\n return <summary className={cn(\"accordion-summary\", className)} {...rest} />;\n}\n\nexport type AccordionContentProps = ComponentProps<\"div\">;\n\nfunction AccordionContent({ className, ...rest }: AccordionContentProps) {\n return <div className={cn(\"accordion-content\", className)} {...rest} />;\n}\n\nexport const Accordion = Object.assign(AccordionRoot, {\n Item: AccordionItem,\n Summary: AccordionSummary,\n Content: AccordionContent,\n});\n","import { createContext, type RefObject } from \"react\";\n\n/**\n * Container Base UI popups portal into. `<AdminRoot>` publishes its element so\n * popups stay inside the `@scope (._ao-admin-root)` subtree — portaled to\n * `document.body` they fall outside the scope and render unstyled. A `<Dialog>`\n * ancestor overrides it with its `<dialog>` so popups join the top layer above\n * the backdrop. Null falls back to `document.body`.\n */\nexport const PortalContainerContext = createContext<RefObject<HTMLElement | null> | null>(null);\n","import { useCallback, useRef, type CSSProperties, type ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport interface AdminRootProps extends ComponentProps<\"div\"> {\n /**\n * Force a color scheme for this subtree. Sets `data-theme`, which flips the\n * semantic tokens and `color-scheme`. Omit to follow the OS preference.\n */\n theme?: \"light\" | \"dark\";\n /**\n * CSS color (e.g. `var(--color-purple-600)`) applied as `--color-system-accent`\n * to brand-shift the navbar + footer stripes and `<BrandTile>`. See\n * [Customize › System accent](https://digital-udvikling.github.io/admin-design-system/basics/customize/#system-accent).\n */\n systemAccent?: string;\n}\n\nexport function AdminRoot({ className, theme, systemAccent, style, ref, ...rest }: AdminRootProps) {\n const rootStyle =\n systemAccent !== undefined\n ? ({ ...style, \"--color-system-accent\": systemAccent } as CSSProperties)\n : style;\n\n // Publish this element as the portal container — Base UI popups otherwise\n // portal to `document.body`, outside `@scope (._ao-admin-root)`, and render\n // unstyled. A `<Dialog>` ancestor overrides this with its own `<dialog>`.\n const portalRef = useRef<HTMLElement | null>(null);\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n portalRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [ref],\n );\n\n return (\n <PortalContainerContext.Provider value={portalRef}>\n <div\n ref={setRef}\n className={cn(\"admin-root\", className)}\n style={rootStyle}\n {...rest}\n {...(theme !== undefined && { \"data-theme\": theme })}\n />\n </PortalContainerContext.Provider>\n );\n}\n","import { createElement, isValidElement } from \"react\";\nimport type { ComponentType, ReactElement, ReactNode } from \"react\";\n\n/** Props an icon component must accept — matches `@tabler/icons-react`, loose enough for other libraries. */\nexport interface IconRenderProps {\n size?: number | string;\n \"aria-hidden\"?: boolean | \"true\" | \"false\";\n}\n\nexport type IconComponent = ComponentType<IconRenderProps>;\n\n/** Component reference (rendered with `size=\"1em\" aria-hidden`) or pre-instantiated element (as-is). */\nexport type IconProp = IconComponent | ReactElement | null | undefined;\n\n/**\n * Render an `IconProp`, defaulting component references to `size=\"1em\"\n * aria-hidden`. `\"1em\"` makes SVG icons inherit the host `font-size`, matching\n * the Tabler webfont in the vanilla bundle.\n */\nexport function renderIcon(icon: IconProp, size: number | string = \"1em\"): ReactNode {\n if (icon == null) return null;\n if (isValidElement(icon)) return icon;\n return createElement(icon as IconComponent, { size, \"aria-hidden\": true });\n}\n","import type { ComponentProps, MouseEventHandler, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type AlertVariant = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nfunction DismissIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\nexport interface AlertProps extends Omit<ComponentProps<\"div\">, \"title\"> {\n variant: AlertVariant;\n /** Leading icon. Rendered as the first child so the CSS grid kicks in. */\n icon?: IconProp;\n /** Renders as `<Alert.Title>`. */\n title?: ReactNode;\n /** Renders as `<Alert.Description>`. */\n description?: ReactNode;\n /** Trailing action. Renders as `<Alert.Action>` after children so reading order matches. */\n action?: ReactNode;\n /** Renders a trailing dismiss (×) button. The Alert stays stateless — the consumer hides or removes it. */\n onDismiss?: MouseEventHandler<HTMLButtonElement>;\n /** aria-label for the dismiss button. Default: \"Dismiss\". */\n dismissLabel?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"title\" | \"description\" | \"action\" | \"dismiss\">;\n}\n\nfunction AlertRoot({\n variant,\n icon,\n title,\n description,\n action,\n onDismiss,\n dismissLabel = \"Dismiss\",\n classNames,\n className,\n role,\n children,\n ...rest\n}: AlertProps) {\n const defaultRole = variant === \"danger\" || variant === \"warning\" ? \"alert\" : \"status\";\n return (\n <div\n role={role ?? defaultRole}\n className={cn([\"alert\", `alert-${variant}`], className)}\n {...rest}\n >\n {renderIcon(icon)}\n {title !== undefined ? <AlertTitle className={classNames?.title}>{title}</AlertTitle> : null}\n {description !== undefined ? (\n <AlertDescription className={classNames?.description}>{description}</AlertDescription>\n ) : null}\n {children}\n {action !== undefined ? (\n <AlertAction className={classNames?.action}>{action}</AlertAction>\n ) : null}\n {onDismiss ? (\n <button\n type=\"button\"\n className={cn(\"alert-dismiss\", classNames?.dismiss)}\n aria-label={dismissLabel}\n onClick={onDismiss}\n >\n <DismissIcon />\n </button>\n ) : null}\n </div>\n );\n}\n\nexport type AlertTitleProps = ComponentProps<\"strong\">;\nfunction AlertTitle({ className, ...rest }: AlertTitleProps) {\n return <strong className={cn(\"alert-title\", className)} {...rest} />;\n}\n\nexport type AlertDescriptionProps = ComponentProps<\"p\">;\nfunction AlertDescription({ className, ...rest }: AlertDescriptionProps) {\n return <p className={cn(\"alert-description\", className)} {...rest} />;\n}\n\nexport type AlertActionProps = ComponentProps<\"div\">;\nfunction AlertAction({ className, ...rest }: AlertActionProps) {\n return <div className={cn(\"alert-action\", className)} {...rest} />;\n}\n\nexport const Alert = Object.assign(AlertRoot, {\n Title: AlertTitle,\n Description: AlertDescription,\n Action: AlertAction,\n});\n","import { createContext, useContext, useMemo, useState } from \"react\";\nimport type { CSSProperties, ComponentProps, ReactNode } from \"react\";\nimport { cn } from \"./cn\";\n\ninterface AppShellContextValue {\n mobileDrawerOpen: boolean;\n setMobileDrawerOpen: (open: boolean) => void;\n hasSidebar: boolean;\n}\n\nconst AppShellContext = createContext<AppShellContextValue | null>(null);\n\nexport function useAppShell(): AppShellContextValue | null {\n return useContext(AppShellContext);\n}\n\nexport interface AppShellProps extends ComponentProps<\"div\"> {\n hasSidebar?: boolean;\n mobileDrawerOpen?: boolean;\n defaultMobileDrawerOpen?: boolean;\n onMobileDrawerOpenChange?: (open: boolean) => void;\n /**\n * CSS color (e.g. `var(--color-purple-600)`) applied as `--color-system-accent`\n * to the shell root. See [Customize › System accent](https://digital-udvikling.github.io/admin-design-system/basics/customize/#system-accent).\n */\n systemAccent?: string;\n children?: ReactNode;\n}\n\nfunction AppShellRoot({\n hasSidebar = false,\n mobileDrawerOpen,\n defaultMobileDrawerOpen = false,\n onMobileDrawerOpenChange,\n systemAccent,\n className,\n style,\n children,\n ...rest\n}: AppShellProps) {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultMobileDrawerOpen);\n const isControlled = mobileDrawerOpen !== undefined;\n const open = isControlled ? mobileDrawerOpen : uncontrolledOpen;\n\n const value = useMemo<AppShellContextValue>(\n () => ({\n mobileDrawerOpen: open,\n setMobileDrawerOpen: (next) => {\n if (!isControlled) setUncontrolledOpen(next);\n onMobileDrawerOpenChange?.(next);\n },\n hasSidebar,\n }),\n [open, isControlled, onMobileDrawerOpenChange, hasSidebar],\n );\n\n const rootStyle =\n systemAccent !== undefined\n ? ({ ...style, \"--color-system-accent\": systemAccent } as CSSProperties)\n : style;\n\n return (\n <AppShellContext.Provider value={value}>\n <div\n className={cn([\"app-shell\", hasSidebar && \"app-shell-with-sidebar\"], className)}\n style={rootStyle}\n {...rest}\n >\n {children}\n </div>\n </AppShellContext.Provider>\n );\n}\n\nexport type AppShellMainProps = ComponentProps<\"main\">;\n\nfunction AppShellMain({ className, ...rest }: AppShellMainProps) {\n return <main className={cn(\"app-shell-main\", className)} {...rest} />;\n}\n\nexport const AppShell = Object.assign(AppShellRoot, {\n Main: AppShellMain,\n});\n","import type { ComponentProps, MouseEventHandler } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type BadgeVariant = \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"primary\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\n\nfunction RemoveIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\nexport interface BadgeProps extends ComponentProps<\"span\"> {\n variant?: BadgeVariant;\n size?: BadgeSize;\n /** Leading icon. */\n icon?: IconProp;\n /** Tinted fill with accent text instead of the solid status fill. */\n soft?: boolean;\n /** Renders a trailing remove button. */\n onRemove?: MouseEventHandler<HTMLButtonElement>;\n /** aria-label for the remove button. Default: \"Remove\". */\n removeLabel?: string;\n}\n\nexport function Badge({\n variant = \"neutral\",\n size = \"md\",\n icon,\n soft = false,\n onRemove,\n removeLabel = \"Remove\",\n className,\n children,\n ...rest\n}: BadgeProps) {\n return (\n <span\n className={cn(\n [\n \"badge\",\n variant !== \"neutral\" && `badge-${variant}`,\n size !== \"md\" && `badge-${size}`,\n soft && \"badge-soft\",\n ],\n className,\n )}\n {...rest}\n >\n {renderIcon(icon)}\n {children}\n {onRemove ? (\n <button\n type=\"button\"\n className={cn(\"badge-remove\", undefined)}\n aria-label={removeLabel}\n onClick={onRemove}\n >\n <RemoveIcon />\n </button>\n ) : null}\n </span>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type BrandTileVariant = \"solid\" | \"soft\" | \"info\" | \"success\" | \"danger\";\n\nexport interface BrandTileProps extends ComponentProps<\"span\"> {\n /** Tint treatment. `solid` is the accent fill; the rest are `*-muted` fills with a colored glyph. */\n variant?: BrandTileVariant;\n size?: \"md\" | \"lg\";\n /** 1–2 letter monogram. Ignored if `icon` or `src` is provided. */\n monogram?: string;\n /** Icon component or element. Takes precedence over `monogram`, yields to `src`. */\n icon?: IconProp;\n /** Logo image source. Wins over `icon` and `monogram`, flipping the tile to a bordered surface. */\n src?: string;\n /** Alt text for the image tile. Defaults to `\"\"` (decorative). */\n alt?: string;\n}\n\n/**\n * Brand/system mark for the navbar — monogram, icon, or shop logo. Precedence\n * is `src` > `icon` > `monogram`. Monogram/icon tiles are `aria-hidden`; image\n * tiles expose `alt` to assistive tech instead.\n */\nexport function BrandTile({\n variant = \"solid\",\n size = \"md\",\n monogram,\n icon,\n src,\n alt = \"\",\n className,\n children,\n ...rest\n}: BrandTileProps) {\n const classes = cn(\n [\n \"brand-tile\",\n variant !== \"solid\" && `brand-tile-${variant}`,\n size === \"lg\" && \"brand-tile-lg\",\n ],\n className,\n );\n\n if (src) {\n return (\n <span className={classes} {...rest}>\n <img src={src} alt={alt} />\n </span>\n );\n }\n\n return (\n <span className={classes} aria-hidden {...rest}>\n {icon ? renderIcon(icon) : (children ?? monogram)}\n </span>\n );\n}\n","import { Avatar as BaseAvatar } from \"@base-ui/react/avatar\";\nimport { Children, type ComponentProps, type ReactNode } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type AvatarSize = \"sm\" | \"md\" | \"lg\";\nexport type AvatarShape = \"circle\" | \"square\";\n\nexport interface AvatarProps extends ComponentProps<\"span\"> {\n src?: string;\n alt?: string;\n /** Fallback text, typically 1–3 letters. Ignored when `children` is given. */\n initials?: string;\n size?: AvatarSize;\n shape?: AvatarShape;\n}\n\n/**\n * Image avatar with an initials fallback. Initials show until the image loads\n * (and again, React-only, if it errors); the vanilla CSS layers the `<img>`\n * over the initials instead.\n */\nexport function Avatar({\n src,\n alt,\n initials,\n size = \"md\",\n shape = \"circle\",\n className,\n children,\n ...rest\n}: AvatarProps) {\n const fallback: ReactNode = children ?? initials;\n return (\n <BaseAvatar.Root\n className={cn(\n [\"avatar\", size !== \"md\" && `avatar-${size}`, shape === \"square\" && \"avatar-square\"],\n className,\n )}\n {...rest}\n >\n {fallback !== undefined ? <BaseAvatar.Fallback>{fallback}</BaseAvatar.Fallback> : null}\n {src !== undefined ? <BaseAvatar.Image src={src} alt={alt} /> : null}\n </BaseAvatar.Root>\n );\n}\n\nexport interface AvatarGroupProps extends ComponentProps<\"div\"> {\n /** Cap the visible avatars; the rest collapse into a trailing \"+N\" tile. */\n max?: number;\n /** Size for the surplus tile — match the avatars inside. Default `\"md\"`. */\n size?: AvatarSize;\n}\n\n/** Overlapping stack of avatars; later children paint on top. `max` caps the visible count. */\nexport function AvatarGroup({ max, size = \"md\", className, children, ...rest }: AvatarGroupProps) {\n const items = Children.toArray(children);\n const overflow = max !== undefined && items.length > max ? items.length - max : 0;\n const visible = overflow > 0 ? items.slice(0, max) : items;\n return (\n <div className={cn(\"avatar-group\", className)} {...rest}>\n {visible}\n {overflow > 0 ? (\n <span\n className={cn([\"avatar\", size !== \"md\" && `avatar-${size}`, \"avatar-more\"], undefined)}\n aria-label={`+${overflow} more`}\n >\n +{overflow}\n </span>\n ) : null}\n </div>\n );\n}\n","/**\n * Pure helpers for the hotkey system. Chord syntax: `<mod>+…+<key>`, e.g.\n * `mod+s`, `?`, `mod+shift+k`. `mod` resolves to the platform's primary\n * command modifier (⌘ on Apple, Ctrl elsewhere). The key is lowercased\n * `KeyboardEvent.key`. Bind shifted printable symbols bare (`\"?\"`, not\n * `\"shift+?\"`); `shift` stays explicit for letters and named keys.\n */\n\nexport type Modifier = \"ctrl\" | \"shift\" | \"alt\" | \"meta\";\n\nexport interface ParsedChord {\n mods: ReadonlySet<Modifier>;\n key: string;\n}\n\nconst MOD_ORDER: readonly Modifier[] = [\"ctrl\", \"shift\", \"alt\", \"meta\"];\n\n// Detected once at module load (SSR-safe — the registry never dispatches\n// server-side) and shared by parse and display so a binding and its `<Kbd>` chip agree.\nfunction detectApplePlatform(): boolean {\n if (typeof navigator === \"undefined\") return false;\n const uaData = (navigator as Navigator & { userAgentData?: { platform?: string } }).userAgentData;\n const platform = uaData?.platform || navigator.platform || \"\";\n return /^(mac|iphone|ipad|ipod)/i.test(platform);\n}\n\nconst IS_APPLE = detectApplePlatform();\nconst MOD_TARGET: Modifier = IS_APPLE ? \"meta\" : \"ctrl\";\n\nfunction tokenToMod(token: string): Modifier | null {\n switch (token) {\n case \"mod\":\n return MOD_TARGET;\n case \"ctrl\":\n case \"control\":\n return \"ctrl\";\n case \"shift\":\n return \"shift\";\n case \"alt\":\n return \"alt\";\n case \"meta\":\n return \"meta\";\n default:\n return null;\n }\n}\n\nexport function parseChord(input: string): ParsedChord {\n const tokens = input\n .trim()\n .toLowerCase()\n .split(\"+\")\n .map((t) => t.trim())\n .filter(Boolean);\n if (tokens.length === 0) {\n throw new Error(`Invalid hotkey: empty string`);\n }\n const mods = new Set<Modifier>();\n let key: string | null = null;\n for (const token of tokens) {\n const mod = tokenToMod(token);\n if (mod !== null) {\n mods.add(mod);\n continue;\n }\n if (key !== null) {\n throw new Error(`Invalid hotkey \"${input}\": multiple non-modifier keys`);\n }\n key = token;\n }\n if (key === null) {\n throw new Error(`Invalid hotkey \"${input}\": missing key`);\n }\n return { mods, key };\n}\n\nexport function parseKeys(keys: string | readonly string[]): ParsedChord[] {\n const list = typeof keys === \"string\" ? [keys] : keys;\n return list.map(parseChord);\n}\n\n/** Canonical wire form used as a map key in the registry. */\nexport function canonicalize(chord: ParsedChord): string {\n const parts: string[] = [];\n for (const mod of MOD_ORDER) {\n if (chord.mods.has(mod)) parts.push(mod);\n }\n parts.push(chord.key);\n return parts.join(\"+\");\n}\n\n/** Canonical chord string for a keyboard event; `null` for a bare modifier press. */\nexport function normalizeEvent(e: KeyboardEvent): string | null {\n const key = e.key.toLowerCase();\n if (key === \"control\" || key === \"shift\" || key === \"alt\" || key === \"meta\") {\n return null;\n }\n const mods = new Set<Modifier>();\n if (e.ctrlKey) mods.add(\"ctrl\");\n // A shifted symbol (`?`, `:`) already encodes Shift in the character, so a bare\n // `\"?\"` binding matches; letters and named keys keep Shift explicit.\n if (e.shiftKey && !isShiftedSymbol(key)) mods.add(\"shift\");\n if (e.altKey) mods.add(\"alt\");\n if (e.metaKey) mods.add(\"meta\");\n return canonicalize({ mods, key });\n}\n\nfunction isShiftedSymbol(key: string): boolean {\n return key.length === 1 && !/[a-z0-9]/.test(key);\n}\n\nconst SPECIAL_KEY_LABELS: Record<string, string> = {\n escape: \"Esc\",\n esc: \"Esc\",\n enter: \"Enter\",\n return: \"Enter\",\n tab: \"Tab\",\n \" \": \"Space\",\n space: \"Space\",\n arrowup: \"↑\",\n arrowdown: \"↓\",\n arrowleft: \"←\",\n arrowright: \"→\",\n backspace: \"Backspace\",\n delete: \"Del\",\n};\n\nconst MOD_LABELS: Record<Modifier, string> = IS_APPLE\n ? { ctrl: \"⌃\", shift: \"⇧\", alt: \"⌥\", meta: \"⌘\" }\n : { ctrl: \"Ctrl\", shift: \"Shift\", alt: \"Alt\", meta: \"Meta\" };\n\n/** Visual chips for a chord — one entry per modifier and the final key. */\nexport function formatChord(chord: ParsedChord): string[] {\n const parts: string[] = [];\n for (const mod of MOD_ORDER) {\n if (chord.mods.has(mod)) parts.push(MOD_LABELS[mod]);\n }\n const special = SPECIAL_KEY_LABELS[chord.key];\n if (special !== undefined) {\n parts.push(special);\n } else if (chord.key.length === 1) {\n parts.push(chord.key.toUpperCase());\n } else {\n parts.push(chord.key.charAt(0).toUpperCase() + chord.key.slice(1));\n }\n return parts;\n}\n\nconst ARIA_MOD_LABELS: Record<Modifier, string> = {\n ctrl: \"Control\",\n shift: \"Shift\",\n alt: \"Alt\",\n meta: \"Meta\",\n};\n\nfunction toAriaPart(chord: ParsedChord): string {\n const parts: string[] = [];\n for (const mod of MOD_ORDER) {\n if (chord.mods.has(mod)) parts.push(ARIA_MOD_LABELS[mod]);\n }\n parts.push(chord.key.length === 1 ? chord.key.toUpperCase() : chord.key);\n return parts.join(\"+\");\n}\n\n/** Serialize chords to `aria-keyshortcuts` format (space-separated alternatives). */\nexport function toAriaKeyShortcuts(chords: readonly ParsedChord[]): string {\n return chords.map(toAriaPart).join(\" \");\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { formatChord, parseKeys } from \"./hotkey-parse\";\n\nexport interface KbdProps extends Omit<ComponentProps<\"span\">, \"children\"> {\n /**\n * Chord(s) in `useHotkey` syntax. Only the first alternative renders,\n * matching the platform menu convention of showing the primary binding.\n */\n keys?: string | readonly string[];\n /** Literal text rendered as a single chip — for inline use in tooltips/prose. */\n children?: string;\n}\n\n/** Keyboard shortcut chips — parsed via `keys`, or a single literal chip via `children`. */\nexport function Kbd({ keys, children, className, ...rest }: KbdProps) {\n if (keys != null) {\n const chord = parseKeys(keys)[0];\n if (!chord) {\n return null;\n }\n const parts = formatChord(chord);\n return (\n <span className={cn(\"kbd-group\", className)} {...rest}>\n {parts.map((part, i) => (\n <kbd key={`${i}-${part}`} className={cn(\"kbd\", undefined)}>\n {part}\n </kbd>\n ))}\n </span>\n );\n }\n return (\n <kbd className={cn(\"kbd\", className)} {...rest}>\n {children}\n </kbd>\n );\n}\n","import type { RefObject } from \"react\";\nimport { normalizeEvent } from \"./hotkey-parse\";\n\n/**\n * Module-level keyboard shortcut registry: one window keydown listener,\n * attached on first registration and detached when the registry empties.\n */\n\nexport type HotkeyHandler = (e: KeyboardEvent) => void;\n\nexport interface HotkeyEntry {\n handlerRef: RefObject<HotkeyHandler>;\n}\n\nconst registry = new Map<string, Set<HotkeyEntry>>();\nlet listenerAttached = false;\n\nfunction ensureListener(): void {\n if (listenerAttached || typeof window === \"undefined\") return;\n window.addEventListener(\"keydown\", dispatch);\n listenerAttached = true;\n}\n\nfunction maybeDetachListener(): void {\n if (!listenerAttached || typeof window === \"undefined\") return;\n if (registry.size > 0) return;\n window.removeEventListener(\"keydown\", dispatch);\n listenerAttached = false;\n}\n\nfunction isEditableTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n if (target.isContentEditable) return true;\n const tag = target.tagName;\n return tag === \"INPUT\" || tag === \"TEXTAREA\";\n}\n\nfunction dispatch(e: KeyboardEvent): void {\n // A held chord autorepeats keydown; the bound action should fire once per press.\n if (e.repeat) return;\n const chord = normalizeEvent(e);\n if (chord === null) return;\n const bucket = registry.get(chord);\n if (!bucket || bucket.size === 0) return;\n\n // Bare-key chords are silent in editable elements; `escape` stays live so dialogs can close.\n if (isEditableTarget(e.target) && !chord.includes(\"+\") && chord !== \"escape\") return;\n\n e.preventDefault();\n for (const entry of bucket) {\n entry.handlerRef.current?.(e);\n }\n}\n\n/** Returns an unregister function. */\nexport function register(canonicalChords: readonly string[], entry: HotkeyEntry): () => void {\n for (const chord of canonicalChords) {\n let bucket = registry.get(chord);\n if (!bucket) {\n bucket = new Set();\n registry.set(chord, bucket);\n }\n bucket.add(entry);\n }\n ensureListener();\n return () => {\n for (const chord of canonicalChords) {\n const bucket = registry.get(chord);\n if (!bucket) continue;\n bucket.delete(entry);\n if (bucket.size === 0) registry.delete(chord);\n }\n maybeDetachListener();\n };\n}\n\n/** Test-only: empty the registry and detach the listener. */\nexport function __resetRegistry(): void {\n registry.clear();\n maybeDetachListener();\n}\n","import { useEffect, useMemo, useRef } from \"react\";\nimport { canonicalize, parseKeys, toAriaKeyShortcuts } from \"./hotkey-parse\";\nimport { register, type HotkeyEntry, type HotkeyHandler } from \"./hotkey-registry\";\n\nexport interface HotkeyOptions {\n /** When false, the binding is not registered. Defaults to true. */\n enabled?: boolean;\n}\n\nexport interface HotkeyInfo {\n /** `aria-keyshortcuts` attribute value; undefined when `keys` is nullish. */\n ariaKeyShortcuts: string | undefined;\n /** Canonical first alternative, for `<Kbd keys={primaryChord} />`; undefined when `keys` is nullish. */\n primaryChord: string | undefined;\n canonicalChords: readonly string[];\n}\n\n/**\n * Register a keyboard shortcut, e.g. `useHotkey(\"mod+s\", save)`. The handler\n * is latched in a ref, so callers need not memoize it. Nullish `keys` is a\n * no-op, so the hook is safe to call unconditionally.\n */\nexport function useHotkey(\n keys: string | readonly string[] | null | undefined,\n handler: HotkeyHandler,\n options?: HotkeyOptions,\n): HotkeyInfo {\n const enabled = options?.enabled ?? true;\n const handlerRef = useRef<HotkeyHandler>(handler);\n handlerRef.current = handler;\n\n // Stable string ID so a fresh array with the same bindings doesn't re-register; nullish → \"\".\n const keyId = keys == null ? \"\" : Array.isArray(keys) ? keys.join(\"|\") : (keys as string);\n\n const derived = useMemo<HotkeyInfo>(() => {\n if (keyId === \"\") {\n return { canonicalChords: [], ariaKeyShortcuts: undefined, primaryChord: undefined };\n }\n const parsed = parseKeys(keys as string | readonly string[]);\n const cans = parsed.map(canonicalize);\n return {\n canonicalChords: cans,\n ariaKeyShortcuts: toAriaKeyShortcuts(parsed),\n primaryChord: cans[0],\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [keyId]);\n\n useEffect(() => {\n if (!enabled || derived.canonicalChords.length === 0) return;\n const entry: HotkeyEntry = { handlerRef };\n return register(derived.canonicalChords, entry);\n }, [derived, enabled]);\n\n return derived;\n}\n","import { Button as BaseButton } from \"@base-ui/react/button\";\nimport { useCallback, useRef, type ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\nimport { Kbd } from \"./Kbd\";\nimport { useHotkey } from \"./useHotkey\";\n\nexport type ButtonVariant = \"default\" | \"primary\" | \"ghost\" | \"muted\" | \"danger\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ComponentProps<typeof BaseButton> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n fullWidth?: boolean;\n /** Shows a spinner in place of the leading icon and disables interaction.\n * Sets `aria-busy=\"true\"` and the native `disabled` attribute. */\n loading?: boolean;\n /** Leading icon. Pass a component (`icon={IconPlus}`) or an element. */\n icon?: IconProp;\n /** Trailing icon. Pass a component (`iconTrailing={IconArrowRight}`) or an element. */\n iconTrailing?: IconProp;\n /**\n * Keyboard shortcut that dispatches a native click on the rendered element —\n * `onClick` fires, `type=\"submit\"` submits, an anchor-rendered button\n * (`render={<a href>}`) navigates. Same syntax as `useHotkey`. Pass an array\n * for alternatives — only the first is rendered as a visual chip.\n */\n hotkey?: string | readonly string[];\n}\n\nexport function Button({\n variant = \"default\",\n size = \"md\",\n fullWidth,\n loading,\n icon,\n iconTrailing,\n hotkey,\n className,\n type = \"button\",\n disabled,\n children,\n onClick,\n ref,\n ...rest\n}: ButtonProps) {\n // Latch the rendered element so the hotkey can dispatch a real `.click()`\n // with its native side effects (form submit, anchor navigation).\n const elementRef = useRef<HTMLElement | null>(null);\n const setRef = useCallback(\n (node: HTMLElement | null) => {\n elementRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [ref],\n );\n\n const { ariaKeyShortcuts, primaryChord } = useHotkey(hotkey, () => elementRef.current?.click(), {\n enabled: !disabled && !loading,\n });\n\n const iconOnly = children == null && (icon != null || iconTrailing != null);\n\n return (\n <BaseButton\n ref={setRef}\n onClick={onClick}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n aria-keyshortcuts={ariaKeyShortcuts}\n className={cn(\n [\n \"btn\",\n variant !== \"default\" && `btn-${variant}`,\n size !== \"md\" && `btn-${size}`,\n fullWidth && \"btn-full-width\",\n loading && \"btn-loading\",\n iconOnly && \"btn-square\",\n ],\n className,\n )}\n {...rest}\n >\n {loading ? null : renderIcon(icon)}\n {children}\n {renderIcon(iconTrailing)}\n {primaryChord !== undefined ? <Kbd keys={primaryChord} /> : null}\n </BaseButton>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type ButtonGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport interface ButtonGroupProps extends ComponentProps<\"div\"> {\n orientation?: ButtonGroupOrientation;\n /** Stretch across the container. Horizontal groups split the row into\n * equal-width buttons; vertical groups fill the container width. */\n fullWidth?: boolean;\n}\n\nexport function ButtonGroup({\n orientation = \"horizontal\",\n fullWidth = false,\n role = \"group\",\n className,\n ...rest\n}: ButtonGroupProps) {\n return (\n <div\n role={role}\n className={cn(\n [\n \"btn-group\",\n orientation === \"vertical\" && \"btn-group-vertical\",\n fullWidth && \"btn-group-full-width\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n","import { Children, Fragment, isValidElement, type ComponentProps, type ReactNode } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport interface BreadcrumbsProps extends ComponentProps<\"nav\"> {\n /** Custom separator between items. Defaults to \"/\" from CSS. */\n separator?: ReactNode;\n \"aria-label\"?: string;\n}\n\nfunction BreadcrumbsRoot({\n separator,\n className,\n children,\n \"aria-label\": ariaLabel = \"Breadcrumb\",\n ...rest\n}: BreadcrumbsProps) {\n const items = Children.toArray(children).filter(isValidElement);\n return (\n <nav aria-label={ariaLabel} className={cn(\"breadcrumbs\", className)} {...rest}>\n <ol>\n {items.map((child, i) => (\n <Fragment key={child.key ?? i}>\n {child}\n {i < items.length - 1 ? <BreadcrumbSeparator>{separator}</BreadcrumbSeparator> : null}\n </Fragment>\n ))}\n </ol>\n </nav>\n );\n}\n\ntype BreadcrumbItemAsLink = ComponentProps<\"a\"> & {\n href: string;\n current?: boolean;\n icon?: IconProp;\n};\ntype BreadcrumbItemAsSpan = ComponentProps<\"span\"> & {\n href?: undefined;\n current?: boolean;\n icon?: IconProp;\n};\n\nexport type BreadcrumbItemProps = BreadcrumbItemAsLink | BreadcrumbItemAsSpan;\n\nfunction BreadcrumbItem(props: BreadcrumbItemProps) {\n if (props.href !== undefined) {\n const { className, current, icon, children, ...rest } = props;\n return (\n <li>\n <a\n className={cn(\"breadcrumb-item\", className)}\n aria-current={current ? \"page\" : undefined}\n {...rest}\n >\n {renderIcon(icon, 14)}\n {children}\n </a>\n </li>\n );\n }\n const { className, current, icon, children, ...rest } = props;\n return (\n <li>\n <span\n className={cn(\"breadcrumb-item\", className)}\n aria-current={current ? \"page\" : undefined}\n {...rest}\n >\n {renderIcon(icon, 14)}\n {children}\n </span>\n </li>\n );\n}\n\nexport type BreadcrumbSeparatorProps = ComponentProps<\"li\">;\n\n// `role=\"presentation\"` keeps it out of the list semantics; `<li>` keeps the `<ol>` valid.\nfunction BreadcrumbSeparator({ className, children, ...rest }: BreadcrumbSeparatorProps) {\n return (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"breadcrumb-separator\", className)}\n {...rest}\n >\n {children}\n </li>\n );\n}\n\nexport const Breadcrumbs = Object.assign(BreadcrumbsRoot, {\n Item: BreadcrumbItem,\n Separator: BreadcrumbSeparator,\n});\n","import { Input as BaseInput } from \"@base-ui/react/input\";\nimport { useCallback, useRef, useState, type ComponentProps, type ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type InputVariant = \"bordered\" | \"ghost\" | \"danger\" | \"info\" | \"success\" | \"warning\";\nexport type InputSize = \"sm\" | \"md\" | \"lg\";\n\ntype BaseInputProps = Omit<ComponentProps<typeof BaseInput>, \"size\">;\n// Base UI augments the native change event with `preventBaseUIHandler`; derive its\n// exact type so the wrapper's handler and the consumer's `onChange` line up.\ntype InputChangeEvent = Parameters<NonNullable<BaseInputProps[\"onChange\"]>>[0];\n\nexport interface InputProps extends BaseInputProps {\n variant?: InputVariant;\n inputSize?: InputSize;\n /** Leading icon, floated inside the field. Pass a component (`icon={IconSearch}`) or an element. */\n icon?: IconProp;\n /** Trailing icon, floated inside the field. Pass a component (`iconTrailing={IconX}`) or an element. */\n iconTrailing?: IconProp;\n /** Show a trailing clear (×) button while the field holds a value. */\n clearable?: boolean;\n /** aria-label for the clear button. Default `\"Clear\"`. */\n clearLabel?: string;\n /** Called after the clear button empties the field. */\n onClear?: () => void;\n /** Custom interactive trailing control (style it `.input-action`), e.g. a reveal toggle. */\n action?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"wrapper\" | \"action\">;\n}\n\nfunction ClearIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\nexport function Input({\n variant = \"bordered\",\n inputSize = \"md\",\n icon,\n iconTrailing,\n clearable = false,\n clearLabel = \"Clear\",\n onClear,\n action,\n className,\n classNames,\n type = \"text\",\n value,\n defaultValue,\n onChange,\n disabled,\n readOnly,\n ref: consumerRef,\n ...rest\n}: InputProps) {\n const innerRef = useRef<HTMLInputElement | null>(null);\n const isControlled = value !== undefined;\n const [uncontrolledHasValue, setUncontrolledHasValue] = useState(\n () => defaultValue != null && String(defaultValue).length > 0,\n );\n const hasValue = isControlled ? value != null && String(value).length > 0 : uncontrolledHasValue;\n\n const setRef = useCallback(\n (node: HTMLInputElement | null) => {\n innerRef.current = node;\n if (typeof consumerRef === \"function\") consumerRef(node);\n else if (consumerRef) consumerRef.current = node;\n },\n [consumerRef],\n );\n\n function handleChange(event: InputChangeEvent) {\n if (!isControlled) setUncontrolledHasValue(event.target.value.length > 0);\n onChange?.(event);\n }\n\n function handleClear() {\n const input = innerRef.current;\n if (!input) return;\n // Native value setter + a dispatched input event so React (and form libraries) see a real change.\n const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, \"value\")?.set;\n setter?.call(input, \"\");\n input.dispatchEvent(new Event(\"input\", { bubbles: true }));\n input.focus();\n if (!isControlled) setUncontrolledHasValue(false);\n onClear?.();\n }\n\n const showClear = clearable && hasValue && !disabled && !readOnly;\n\n const inputEl = (\n <BaseInput\n ref={setRef}\n type={type}\n value={value}\n defaultValue={defaultValue}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readOnly}\n className={cn(\n [\n \"input\",\n variant !== \"bordered\" && `input-${variant}`,\n inputSize !== \"md\" && `input-${inputSize}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n\n // Clearable inputs always wrap (a stable tree) so the field doesn't remount —\n // and lose focus — when the clear button appears on the first keystroke.\n const wrap = icon != null || iconTrailing != null || action != null || clearable;\n if (!wrap) return inputEl;\n\n const trailing = showClear ? (\n <button\n type=\"button\"\n className={cn(\"input-action\", classNames?.action)}\n aria-label={clearLabel}\n onClick={handleClear}\n >\n <ClearIcon />\n </button>\n ) : (\n (action ?? renderIcon(iconTrailing))\n );\n\n return (\n <span className={cn(\"input-icon\", classNames?.wrapper)}>\n {renderIcon(icon)}\n {inputEl}\n {trailing}\n </span>\n );\n}\n\nfunction EyeIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0\" />\n <path d=\"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6\" />\n </svg>\n );\n}\n\nfunction EyeOffIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M10.585 10.587a2 2 0 0 0 2.829 2.828\" />\n <path d=\"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87\" />\n <path d=\"M3 3l18 18\" />\n </svg>\n );\n}\n\nexport interface PasswordInputProps extends Omit<\n InputProps,\n \"type\" | \"action\" | \"clearable\" | \"onClear\" | \"clearLabel\"\n> {\n /** aria-label for the reveal toggle. Default `\"Show password\"`. */\n revealLabel?: string;\n}\n\n/** Password field with a trailing reveal toggle. Emits the same `.input` / `.input-action` classes. */\nexport function PasswordInput({\n revealLabel = \"Show password\",\n classNames,\n ...rest\n}: PasswordInputProps) {\n const [revealed, setRevealed] = useState(false);\n return (\n <Input\n type={revealed ? \"text\" : \"password\"}\n action={\n <button\n type=\"button\"\n className={cn(\"input-action\", classNames?.action)}\n aria-label={revealLabel}\n aria-pressed={revealed}\n onClick={() => setRevealed((v) => !v)}\n >\n {revealed ? <EyeOffIcon /> : <EyeIcon />}\n </button>\n }\n classNames={classNames}\n {...rest}\n />\n );\n}\n","import { Input as BaseInput } from \"@base-ui/react/input\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type FileInputVariant = \"bordered\" | \"ghost\" | \"danger\";\nexport type FileInputSize = \"sm\" | \"md\" | \"lg\";\n\ntype BaseInputProps = Omit<ComponentProps<typeof BaseInput>, \"size\" | \"type\">;\n\nexport interface FileInputProps extends BaseInputProps {\n variant?: FileInputVariant;\n inputSize?: FileInputSize;\n}\n\nexport function FileInput({\n variant = \"bordered\",\n inputSize = \"md\",\n className,\n ...rest\n}: FileInputProps) {\n return (\n <BaseInput\n type=\"file\"\n className={cn(\n [\n \"file-input\",\n variant !== \"bordered\" && `file-input-${variant}`,\n inputSize !== \"md\" && `file-input-${inputSize}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type InputGroupProps = ComponentProps<\"div\">;\n\nfunction InputGroupRoot({ className, ...rest }: InputGroupProps) {\n return <div className={cn(\"input-group\", className)} {...rest} />;\n}\n\nexport type InputGroupAddonProps = ComponentProps<\"span\">;\n\nfunction InputGroupAddon({ className, ...rest }: InputGroupAddonProps) {\n return <span className={cn(\"input-group-addon\", className)} {...rest} />;\n}\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n Addon: InputGroupAddon,\n});\n","import { NumberField } from \"@base-ui/react/number-field\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\n\nexport type NumberInputSize = \"sm\" | \"md\" | \"lg\";\n\nfunction MinusIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M5 12h14\" />\n </svg>\n );\n}\n\nfunction PlusIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n );\n}\n\nexport interface NumberInputProps extends ComponentProps<typeof NumberField.Root> {\n size?: NumberInputSize;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"group\" | \"decrement\" | \"input\" | \"increment\">;\n /** Input placeholder. */\n placeholder?: string;\n /** aria-label for the field when there's no associated `<label>`. */\n inputAriaLabel?: string;\n /** aria-label for the decrement button. Default `\"Decrease\"`. */\n decrementLabel?: string;\n /** aria-label for the increment button. Default `\"Increase\"`. */\n incrementLabel?: string;\n /** Override the decrement button content. */\n decrementIcon?: ReactNode;\n /** Override the increment button content. */\n incrementIcon?: ReactNode;\n}\n\n/**\n * Numeric field with stepper buttons over Base UI NumberField (clamp-on-blur,\n * step, `Intl` formatting via `format`). The vanilla bundle styles a native\n * `<input type=\"number\">` and steps with `stepUp()` / `stepDown()`.\n */\nexport function NumberInput({\n size = \"md\",\n classNames,\n placeholder,\n inputAriaLabel,\n decrementLabel = \"Decrease\",\n incrementLabel = \"Increase\",\n decrementIcon,\n incrementIcon,\n className,\n ...rootProps\n}: NumberInputProps) {\n return (\n <NumberField.Root className={cn(\"number-input-root\", className)} {...rootProps}>\n <NumberField.Group\n className={cn([\"number-input\", size !== \"md\" && `number-input-${size}`], classNames?.group)}\n >\n <NumberField.Decrement\n className={cn(\"number-input-step\", classNames?.decrement)}\n aria-label={decrementLabel}\n >\n {decrementIcon ?? <MinusIcon />}\n </NumberField.Decrement>\n <NumberField.Input\n className={cn(\"number-input-field\", classNames?.input)}\n placeholder={placeholder}\n aria-label={inputAriaLabel}\n />\n <NumberField.Increment\n className={cn(\"number-input-step\", classNames?.increment)}\n aria-label={incrementLabel}\n >\n {incrementIcon ?? <PlusIcon />}\n </NumberField.Increment>\n </NumberField.Group>\n </NumberField.Root>\n );\n}\n","import type { ComponentProps, CSSProperties, ReactNode } from \"react\";\nimport { Badge, type BadgeSize, type BadgeVariant } from \"./Badge\";\nimport { cn } from \"./cn\";\nimport type { IconProp } from \"./icon\";\n\nexport type IndicatorVertical = \"top\" | \"middle\" | \"bottom\";\nexport type IndicatorHorizontal = \"start\" | \"center\" | \"end\";\nexport type IndicatorPlacement = `${IndicatorVertical}-${IndicatorHorizontal}`;\n\nexport interface IndicatorProps extends ComponentProps<\"div\"> {\n /** Badge content (count, \"!\", text). Omit for a label-less status dot. */\n label?: ReactNode;\n /** Variant for both the badge and the dot. Defaults to `\"neutral\"`. */\n variant?: BadgeVariant;\n /** Badge size. Ignored when rendering a dot. Defaults to `\"sm\"`. */\n size?: BadgeSize;\n /** Leading icon for the badge. Implies the badge form (no dot fallback). */\n icon?: IconProp;\n /** Where the indicator sits relative to children. Default `\"top-end\"`. */\n placement?: IndicatorPlacement;\n /**\n * Pixels to pull the indicator toward the anchor's center — aligns it with\n * the visual corner of rounded anchors (e.g. `4` for `rounded-md`).\n */\n offset?: number;\n /** Clamp a numeric `label` to `${max}+` when it exceeds this value. */\n max?: number;\n}\n\nexport function Indicator({\n label,\n variant = \"neutral\",\n size = \"sm\",\n icon,\n placement = \"top-end\",\n offset,\n max,\n className,\n \"aria-label\": ariaLabel,\n style: styleProp,\n children,\n ...rest\n}: IndicatorProps) {\n const [vertical, horizontal] = placement.split(\"-\") as [IndicatorVertical, IndicatorHorizontal];\n const placementClasses = [\n \"indicator-item\",\n vertical !== \"top\" && `indicator-${vertical}`,\n horizontal !== \"end\" && `indicator-${horizontal}`,\n ];\n const hasContent = label !== undefined || icon !== undefined;\n const displayLabel =\n typeof label === \"number\" && max !== undefined && label > max ? `${max}+` : label;\n const style =\n offset !== undefined\n ? ({ ...styleProp, \"--indicator-offset\": `${offset}px` } as CSSProperties)\n : styleProp;\n return (\n <div className={cn(\"indicator\", className)} style={style} {...rest}>\n {hasContent ? (\n <Badge\n className={cn(placementClasses, undefined)}\n variant={variant}\n size={size}\n icon={icon}\n aria-label={ariaLabel}\n >\n {displayLabel}\n </Badge>\n ) : (\n <span\n className={cn(\n [\n ...placementClasses,\n \"indicator-dot\",\n variant !== \"neutral\" && `indicator-dot-${variant}`,\n ],\n undefined,\n )}\n role={ariaLabel !== undefined ? \"status\" : undefined}\n aria-label={ariaLabel}\n />\n )}\n {children}\n </div>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport interface LinkProps extends ComponentProps<\"a\"> {\n /**\n * Renders a trailing ↗ and defaults `target=\"_blank\"` +\n * `rel=\"noopener noreferrer\"`; explicit `target`/`rel` props win.\n */\n external?: boolean;\n /** Leading icon. */\n icon?: IconProp;\n /** Trailing icon. Independent of `external`'s ↗ — combining both renders two trailing markers. */\n iconTrailing?: IconProp;\n}\n\n/** A plain `<a>` with the design system's link styling. */\nexport function Link({\n external,\n icon,\n iconTrailing,\n className,\n target,\n rel,\n children,\n ...rest\n}: LinkProps) {\n return (\n <a\n target={target ?? (external ? \"_blank\" : undefined)}\n rel={rel ?? (external ? \"noopener noreferrer\" : undefined)}\n className={cn([\"link\", external && \"link-external\"], className)}\n {...rest}\n >\n {renderIcon(icon)}\n {children}\n {renderIcon(iconTrailing)}\n </a>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport interface SeparatorProps extends ComponentProps<\"hr\"> {\n /** A vertical rule for flex rows. Defaults to a horizontal rule. */\n orientation?: \"horizontal\" | \"vertical\";\n}\n\n/**\n * A styled `<hr>` (implicit `role=\"separator\"`). Margins are zeroed — spacing\n * comes from the parent's gap or margin utilities.\n */\nexport function Separator({ orientation = \"horizontal\", className, ...rest }: SeparatorProps) {\n const vertical = orientation === \"vertical\";\n return (\n <hr\n className={cn([\"separator\", vertical && \"separator-vertical\"], className)}\n aria-orientation={vertical ? \"vertical\" : undefined}\n {...rest}\n />\n );\n}\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type PaginationItem =\n | { type: \"page\"; page: number; selected: boolean }\n | { type: \"previous\"; page: number; disabled: boolean }\n | { type: \"next\"; page: number; disabled: boolean }\n | { type: \"ellipsis\"; key: \"start\" | \"end\" };\n\nexport interface PaginationProps extends Omit<ComponentProps<\"nav\">, \"onChange\"> {\n /** Current page, 1-based. */\n page: number;\n /** Total number of pages. */\n total: number;\n onPageChange: (page: number) => void;\n /** Pages shown either side of `page`. Default 1. */\n siblingCount?: number;\n /** Pages always shown at the start and end. Default 1. */\n boundaryCount?: number;\n /** Icon for the previous-page control. Defaults to a built-in chevron. */\n previousIcon?: IconProp;\n /** Icon for the next-page control. Defaults to a built-in chevron. */\n nextIcon?: IconProp;\n /** Override the renderer for one item — for routing libraries that supply their own Link. */\n renderItem?: (item: PaginationItem) => ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"item\" | \"link\" | \"ellipsis\">;\n}\n\n/** Pure (safe during render): previous, numbers/ellipses (`boundaryCount` at each end, `siblingCount` around `page`), next. */\nexport function getPaginationItems({\n page,\n total,\n siblingCount = 1,\n boundaryCount = 1,\n}: {\n page: number;\n total: number;\n siblingCount?: number;\n boundaryCount?: number;\n}): PaginationItem[] {\n if (total <= 0) {\n return [\n { type: \"previous\", page: 1, disabled: true },\n { type: \"next\", page: 1, disabled: true },\n ];\n }\n const clampedPage = Math.min(Math.max(1, page), total);\n const items: PaginationItem[] = [];\n items.push({ type: \"previous\", page: clampedPage - 1, disabled: clampedPage === 1 });\n\n const startPages = range(1, Math.min(boundaryCount, total));\n const endPages = range(Math.max(total - boundaryCount + 1, boundaryCount + 1), total);\n\n const siblingsStart = Math.max(\n Math.min(clampedPage - siblingCount, total - boundaryCount - siblingCount * 2 - 1),\n boundaryCount + 2,\n );\n const siblingsEnd = Math.min(\n Math.max(clampedPage + siblingCount, boundaryCount + siblingCount * 2 + 2),\n endPages.length > 0 ? (endPages[0] as number) - 2 : total - 1,\n );\n\n const middle: (number | \"ellipsis-start\" | \"ellipsis-end\")[] = [];\n // Start ellipsis (or extra page when gap is exactly 1)\n if (siblingsStart > boundaryCount + 2) {\n middle.push(\"ellipsis-start\");\n } else if (boundaryCount + 1 < total - boundaryCount) {\n middle.push(boundaryCount + 1);\n }\n\n middle.push(...range(siblingsStart, siblingsEnd));\n\n // End ellipsis (or extra page when gap is exactly 1)\n if (siblingsEnd < total - boundaryCount - 1) {\n middle.push(\"ellipsis-end\");\n } else if (total - boundaryCount > boundaryCount) {\n middle.push(total - boundaryCount);\n }\n\n const seen = new Set<number>();\n const pushNumber = (n: number) => {\n if (n < 1 || n > total || seen.has(n)) return;\n seen.add(n);\n items.push({ type: \"page\", page: n, selected: n === clampedPage });\n };\n\n for (const n of startPages) pushNumber(n);\n for (const entry of middle) {\n if (entry === \"ellipsis-start\") {\n items.push({ type: \"ellipsis\", key: \"start\" });\n } else if (entry === \"ellipsis-end\") {\n items.push({ type: \"ellipsis\", key: \"end\" });\n } else {\n pushNumber(entry);\n }\n }\n for (const n of endPages) pushNumber(n);\n\n items.push({ type: \"next\", page: clampedPage + 1, disabled: clampedPage === total });\n return items;\n}\n\nfunction range(start: number, end: number): number[] {\n if (end < start) return [];\n const out: number[] = [];\n for (let i = start; i <= end; i++) out.push(i);\n return out;\n}\n\nexport function Pagination({\n page,\n total,\n onPageChange,\n siblingCount = 1,\n boundaryCount = 1,\n previousIcon,\n nextIcon,\n renderItem,\n className,\n classNames,\n \"aria-label\": ariaLabel = \"Pagination\",\n ...rest\n}: PaginationProps) {\n const items = getPaginationItems({ page, total, siblingCount, boundaryCount });\n const prev = previousIcon !== undefined ? renderIcon(previousIcon, 16) : <ChevronLeftIcon />;\n const next = nextIcon !== undefined ? renderIcon(nextIcon, 16) : <ChevronRightIcon />;\n return (\n <nav aria-label={ariaLabel} className={cn(\"pagination\", className)} {...rest}>\n <ul>\n {items.map((item, i) => (\n <li key={paginationItemKey(item, i)} className={cn(\"page-item\", classNames?.item)}>\n {renderItem\n ? renderItem(item)\n : defaultRender(item, onPageChange, prev, next, classNames)}\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n\nfunction ChevronLeftIcon() {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M15 6l-6 6 6 6\" />\n </svg>\n );\n}\n\nfunction ChevronRightIcon() {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M9 6l6 6-6 6\" />\n </svg>\n );\n}\n\nfunction paginationItemKey(item: PaginationItem, index: number): string {\n switch (item.type) {\n case \"previous\":\n return \"previous\";\n case \"next\":\n return \"next\";\n case \"ellipsis\":\n return `ellipsis-${item.key}`;\n case \"page\":\n return `page-${item.page}`;\n default:\n return `${index}`;\n }\n}\n\nfunction defaultRender(\n item: PaginationItem,\n onPageChange: (n: number) => void,\n prev: ReactNode,\n next: ReactNode,\n classNames: SlotClasses<\"item\" | \"link\" | \"ellipsis\"> | undefined,\n): ReactNode {\n switch (item.type) {\n case \"previous\":\n return (\n <button\n type=\"button\"\n className={cn(\"page-link\", classNames?.link)}\n aria-label=\"Previous page\"\n aria-disabled={item.disabled || undefined}\n disabled={item.disabled}\n onClick={() => onPageChange(item.page)}\n >\n {prev}\n </button>\n );\n case \"next\":\n return (\n <button\n type=\"button\"\n className={cn(\"page-link\", classNames?.link)}\n aria-label=\"Next page\"\n aria-disabled={item.disabled || undefined}\n disabled={item.disabled}\n onClick={() => onPageChange(item.page)}\n >\n {next}\n </button>\n );\n case \"ellipsis\":\n return (\n <span className={cn(\"page-ellipsis\", classNames?.ellipsis)} aria-hidden=\"true\">\n …\n </span>\n );\n case \"page\":\n return (\n <button\n type=\"button\"\n className={cn([\"page-link\", item.selected && \"active\"], classNames?.link)}\n aria-current={item.selected ? \"page\" : undefined}\n aria-label={`Page ${item.page}`}\n onClick={() => onPageChange(item.page)}\n >\n {item.page}\n </button>\n );\n }\n}\n","import { Field as BaseField } from \"@base-ui/react/field\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type TextareaVariant = \"bordered\" | \"ghost\" | \"danger\" | \"info\" | \"success\" | \"warning\";\nexport type TextareaSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface TextareaProps extends Omit<ComponentProps<\"textarea\">, \"size\"> {\n variant?: TextareaVariant;\n textareaSize?: TextareaSize;\n /**\n * Height tracks content via CSS `field-sizing` (Chromium-only; others keep a\n * fixed, resizable box). Floor: max(base min-height, `rows`); cap with `max-height`.\n */\n autoResize?: boolean;\n}\n\n/**\n * Multi-line input via Base UI `Field.Control` with a `<textarea>` swapped in,\n * so inside a `<Field>` it gets the same wiring as `<Input>` (generated id,\n * label association, validity). Works standalone via the default context.\n */\nexport function Textarea({\n variant = \"bordered\",\n textareaSize = \"md\",\n autoResize,\n className,\n ...rest\n}: TextareaProps) {\n return (\n <BaseField.Control\n // Field.Control is typed for <input>; render a <textarea> with Base UI's\n // merged props so it still registers with the surrounding Field.\n render={(props) => <textarea {...props} />}\n className={cn(\n [\n \"textarea\",\n variant !== \"bordered\" && `textarea-${variant}`,\n textareaSize !== \"md\" && `textarea-${textareaSize}`,\n autoResize && \"textarea-autosize\",\n ],\n className,\n )}\n {...(rest as ComponentProps<typeof BaseField.Control>)}\n />\n );\n}\n","import { Checkbox as BaseCheckbox } from \"@base-ui/react/checkbox\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type CheckboxProps = ComponentProps<typeof BaseCheckbox.Root>;\n\nfunction CheckboxRoot({ className, children, ...rest }: CheckboxProps) {\n return (\n <BaseCheckbox.Root className={cn(\"checkbox\", className)} {...rest}>\n {children ?? (\n <CheckboxIndicator>\n <CheckIcon />\n </CheckboxIndicator>\n )}\n </BaseCheckbox.Root>\n );\n}\n\nexport type CheckboxIndicatorProps = ComponentProps<typeof BaseCheckbox.Indicator>;\n\nfunction CheckboxIndicator({ className, ...rest }: CheckboxIndicatorProps) {\n return <BaseCheckbox.Indicator className={cn(\"checkbox-indicator\", className)} {...rest} />;\n}\n\nfunction CheckIcon() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width=\"100%\"\n height=\"100%\"\n aria-hidden\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\nexport const Checkbox = Object.assign(CheckboxRoot, {\n Indicator: CheckboxIndicator,\n});\n","import { Radio as BaseRadio } from \"@base-ui/react/radio\";\nimport { RadioGroup as BaseRadioGroup } from \"@base-ui/react/radio-group\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type RadioProps = ComponentProps<typeof BaseRadio.Root>;\n\nfunction RadioRoot({ className, children, ...rest }: RadioProps) {\n return (\n <BaseRadio.Root className={cn(\"radio\", className)} {...rest}>\n {children ?? <RadioIndicator />}\n </BaseRadio.Root>\n );\n}\n\nexport type RadioIndicatorProps = ComponentProps<typeof BaseRadio.Indicator>;\n\nfunction RadioIndicator({ className, ...rest }: RadioIndicatorProps) {\n return <BaseRadio.Indicator className={cn(\"radio-indicator\", className)} {...rest} />;\n}\n\nexport const Radio = Object.assign(RadioRoot, {\n Indicator: RadioIndicator,\n});\n\nexport type RadioGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport interface RadioGroupProps extends ComponentProps<typeof BaseRadioGroup> {\n orientation?: RadioGroupOrientation;\n}\n\nexport function RadioGroup({ orientation = \"horizontal\", className, ...rest }: RadioGroupProps) {\n return (\n <BaseRadioGroup\n className={cn(\n [\"radio-group\", orientation === \"vertical\" && \"radio-group-vertical\"],\n className,\n )}\n {...rest}\n />\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type ProgressVariant = \"info\" | \"success\" | \"warning\" | \"danger\";\nexport type ProgressSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ProgressProps extends Omit<ComponentProps<\"progress\">, \"value\"> {\n /** Current value in `[0, max]`. Omit (or pass `undefined`) for an indeterminate bar. */\n value?: number;\n max?: number;\n variant?: ProgressVariant;\n size?: ProgressSize;\n}\n\nexport function Progress({\n value,\n max = 100,\n variant = \"info\",\n size = \"md\",\n className,\n ...rest\n}: ProgressProps) {\n return (\n <progress\n value={value}\n max={max}\n className={cn(\n [\n \"progress\",\n variant !== \"info\" && `progress-${variant}`,\n size !== \"md\" && `progress-${size}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type SpinnerSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface SpinnerProps extends ComponentProps<\"output\"> {\n size?: SpinnerSize;\n /** Accessible label announced by screen readers. Defaults to \"Loading\". */\n label?: string;\n}\n\n// `<output>` has an implicit `role=\"status\"`, so the `aria-label` is announced politely.\nexport function Spinner({ size = \"md\", label = \"Loading\", className, ...rest }: SpinnerProps) {\n return (\n <output\n aria-label={label}\n className={cn([\"spinner\", size !== \"md\" && `spinner-${size}`], className)}\n {...rest}\n />\n );\n}\n","import { Switch as BaseSwitch } from \"@base-ui/react/switch\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type SwitchProps = ComponentProps<typeof BaseSwitch.Root>;\n\nfunction SwitchRoot({ className, children, ...rest }: SwitchProps) {\n return (\n <BaseSwitch.Root className={cn(\"switch\", className)} {...rest}>\n {children ?? <SwitchThumb />}\n </BaseSwitch.Root>\n );\n}\n\nexport type SwitchThumbProps = ComponentProps<typeof BaseSwitch.Thumb>;\n\nfunction SwitchThumb({ className, ...rest }: SwitchThumbProps) {\n return <BaseSwitch.Thumb className={cn(\"switch-thumb\", className)} {...rest} />;\n}\n\nexport const Switch = Object.assign(SwitchRoot, {\n Thumb: SwitchThumb,\n});\n","import { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { useContext, type ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport type SelectProps = ComponentProps<typeof BaseSelect.Root>;\n\nfunction SelectRoot(props: SelectProps) {\n return <BaseSelect.Root {...props} />;\n}\n\nexport type SelectTriggerVariant = \"bordered\" | \"ghost\" | \"danger\";\nexport type SelectTriggerSize = \"sm\" | \"md\" | \"lg\";\n\ntype BaseSelectTriggerProps = Omit<ComponentProps<typeof BaseSelect.Trigger>, \"size\">;\n\nexport interface SelectTriggerProps extends BaseSelectTriggerProps {\n variant?: SelectTriggerVariant;\n triggerSize?: SelectTriggerSize;\n}\n\nfunction SelectTrigger({\n variant = \"bordered\",\n triggerSize = \"md\",\n className,\n ...rest\n}: SelectTriggerProps) {\n return (\n <BaseSelect.Trigger\n className={cn(\n [\n \"select\",\n variant !== \"bordered\" && `select-${variant}`,\n triggerSize !== \"md\" && `select-${triggerSize}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport type SelectValueProps = ComponentProps<typeof BaseSelect.Value>;\n\nfunction SelectValue(props: SelectValueProps) {\n return <BaseSelect.Value {...props} />;\n}\n\nexport type SelectIconProps = ComponentProps<typeof BaseSelect.Icon>;\n\nfunction SelectIcon({ className, children, ...rest }: SelectIconProps) {\n return (\n <BaseSelect.Icon className={cn(\"select-icon\", className)} {...rest}>\n {children ?? <ChevronDownIcon />}\n </BaseSelect.Icon>\n );\n}\n\nexport interface SelectPopupProps extends ComponentProps<typeof BaseSelect.Popup> {\n sideOffset?: number;\n}\n\nfunction SelectPopup({ className, sideOffset = 4, children, ...rest }: SelectPopupProps) {\n const portalContainer = useContext(PortalContainerContext);\n return (\n <BaseSelect.Portal container={portalContainer ?? undefined}>\n {/* Opt out of Base UI's macOS-style alignment (selected item overlaid on\n the trigger): admin surfaces expect below-the-trigger placement, and\n the macOS mode collapses the parent dialog's flex layout in <Dialog>. */}\n <BaseSelect.Positioner sideOffset={sideOffset} alignItemWithTrigger={false}>\n <BaseSelect.Popup className={cn(\"select-popup\", className)} {...rest}>\n {children}\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n );\n}\n\nexport type SelectItemProps = ComponentProps<typeof BaseSelect.Item>;\n\nfunction SelectItem({ className, ...rest }: SelectItemProps) {\n return <BaseSelect.Item className={cn(\"select-item\", className)} {...rest} />;\n}\n\nexport type SelectItemTextProps = ComponentProps<typeof BaseSelect.ItemText>;\n\nfunction SelectItemText(props: SelectItemTextProps) {\n return <BaseSelect.ItemText {...props} />;\n}\n\nexport type SelectItemIndicatorProps = ComponentProps<typeof BaseSelect.ItemIndicator>;\n\nfunction SelectItemIndicator({ className, children, ...rest }: SelectItemIndicatorProps) {\n return (\n <BaseSelect.ItemIndicator className={cn(\"select-item-indicator\", className)} {...rest}>\n {children ?? <CheckIcon />}\n </BaseSelect.ItemIndicator>\n );\n}\n\nexport type SelectGroupProps = ComponentProps<typeof BaseSelect.Group>;\n\nfunction SelectGroup(props: SelectGroupProps) {\n return <BaseSelect.Group {...props} />;\n}\n\nexport type SelectGroupLabelProps = ComponentProps<typeof BaseSelect.GroupLabel>;\n\nfunction SelectGroupLabel({ className, ...rest }: SelectGroupLabelProps) {\n return <BaseSelect.GroupLabel className={cn(\"select-group-label\", className)} {...rest} />;\n}\n\nfunction CheckIcon() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width=\"100%\"\n height=\"100%\"\n aria-hidden\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\nfunction ChevronDownIcon() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width=\"100%\"\n height=\"100%\"\n aria-hidden\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n );\n}\n\nexport const Select = Object.assign(SelectRoot, {\n Trigger: SelectTrigger,\n Value: SelectValue,\n Icon: SelectIcon,\n Popup: SelectPopup,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n Group: SelectGroup,\n GroupLabel: SelectGroupLabel,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type ContainerSize = \"sm\" | \"md\" | \"lg\" | \"fluid\";\n\nexport interface ContainerProps extends ComponentProps<\"div\"> {\n /** Width preset. `md` (default) ≈ 90rem; `fluid` removes the max-width. */\n size?: ContainerSize;\n /** Tighter vertical rhythm and block padding for dense screens. */\n compact?: boolean;\n}\n\n/**\n * Page content region: a centered, max-width column that owns the vertical\n * gap between stacked sections. Place inside `<AppShell.Main>`, which has no\n * padding of its own. Not the `.Container` escape hatch (`Card.Container`).\n */\nexport function Container({ size = \"md\", compact, className, ...rest }: ContainerProps) {\n return (\n <div\n className={cn(\n [\"container\", size !== \"md\" && `container-${size}`, compact && \"container-compact\"],\n className,\n )}\n {...rest}\n />\n );\n}\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type CardVariant =\n | \"default\"\n | \"muted\"\n | \"primary\"\n | \"info\"\n | \"success\"\n | \"warning\"\n | \"danger\";\n\nexport interface CardContainerProps extends ComponentProps<\"div\"> {\n /** Tinted surface + matching border. Defaults to the neutral surface. */\n variant?: CardVariant;\n bordered?: boolean;\n compact?: boolean;\n /** Pins direct-child header/actions and scrolls the body. Set the height yourself. */\n scroll?: boolean;\n}\n\n/**\n * The bare `.card` container — no body, no title. Use this when you need to\n * compose the internals yourself (e.g. a media block above the body).\n */\nfunction CardContainer({\n variant = \"default\",\n bordered,\n compact,\n scroll,\n className,\n ...rest\n}: CardContainerProps) {\n return (\n <div\n className={cn(\n [\n \"card\",\n variant !== \"default\" && `card-${variant}`,\n bordered && \"card-bordered\",\n compact && \"card-compact\",\n scroll && \"card-scroll\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport interface CardProps extends Omit<ComponentProps<\"div\">, \"title\"> {\n /** Tinted surface + matching border. Defaults to the neutral surface. */\n variant?: CardVariant;\n bordered?: boolean;\n compact?: boolean;\n /** Full-bleed media rendered as `<Card.Media>` above the body. */\n media?: ReactNode;\n /** Leading icon for the title row. */\n icon?: IconProp;\n /** Renders as `<Card.Title>`. */\n title?: ReactNode;\n /** Renders as `<Card.Description>`. */\n description?: ReactNode;\n /** Trailing header controls (close, edit, …). Renders as `<Card.Toolbar>`. */\n toolbar?: ReactNode;\n /** Renders as `<Card.Actions>`. */\n actions?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\n \"media\" | \"body\" | \"header\" | \"toolbar\" | \"title\" | \"description\" | \"actions\"\n >;\n}\n\n/**\n * Standard card: a `.card` container with a single `.card-body` that lays out\n * an optional title (with icon), description, children, and actions. For\n * anything outside that shape, use `<Card.Container>` and compose by hand.\n */\nfunction CardRoot({\n variant,\n bordered,\n compact,\n media,\n icon,\n title,\n description,\n toolbar,\n actions,\n className,\n classNames,\n children,\n ...rest\n}: CardProps) {\n const hasTitle = icon !== undefined || title !== undefined;\n const titleEl = hasTitle ? (\n <CardTitle icon={icon} className={classNames?.title}>\n {title}\n </CardTitle>\n ) : null;\n return (\n <CardContainer\n variant={variant}\n bordered={bordered}\n compact={compact}\n className={className}\n {...rest}\n >\n {media !== undefined ? <CardMedia className={classNames?.media}>{media}</CardMedia> : null}\n <CardBody className={classNames?.body}>\n {toolbar !== undefined ? (\n <CardHeader className={classNames?.header}>\n {titleEl}\n <CardToolbar className={classNames?.toolbar}>{toolbar}</CardToolbar>\n </CardHeader>\n ) : (\n titleEl\n )}\n {description !== undefined ? (\n <CardDescription className={classNames?.description}>{description}</CardDescription>\n ) : null}\n {children}\n {actions !== undefined ? (\n <CardActions className={classNames?.actions}>{actions}</CardActions>\n ) : null}\n </CardBody>\n </CardContainer>\n );\n}\n\nexport type CardMediaProps = ComponentProps<\"div\">;\nfunction CardMedia({ className, ...rest }: CardMediaProps) {\n return <div className={cn(\"card-media\", className)} {...rest} />;\n}\n\nexport type CardBodyProps = ComponentProps<\"div\">;\nfunction CardBody({ className, ...rest }: CardBodyProps) {\n return <div className={cn(\"card-body\", className)} {...rest} />;\n}\n\nexport type CardHeaderProps = ComponentProps<\"div\">;\nfunction CardHeader({ className, ...rest }: CardHeaderProps) {\n return <div className={cn(\"card-header\", className)} {...rest} />;\n}\n\nexport type CardToolbarProps = ComponentProps<\"div\">;\nfunction CardToolbar({ className, ...rest }: CardToolbarProps) {\n return <div className={cn(\"card-toolbar\", className)} {...rest} />;\n}\n\nexport interface CardTitleProps extends ComponentProps<\"h3\"> {\n /** Leading icon. */\n icon?: IconProp;\n}\nfunction CardTitle({ icon, className, children, ...rest }: CardTitleProps) {\n return (\n <h3 className={cn(\"card-title\", className)} {...rest}>\n {renderIcon(icon)}\n {children}\n </h3>\n );\n}\n\nexport type CardDescriptionProps = ComponentProps<\"p\">;\nfunction CardDescription({ className, ...rest }: CardDescriptionProps) {\n return <p className={cn(\"card-description\", className)} {...rest} />;\n}\n\nexport type CardActionsProps = ComponentProps<\"div\">;\nfunction CardActions({ className, ...rest }: CardActionsProps) {\n return <div className={cn(\"card-actions\", className)} {...rest} />;\n}\n\nexport const Card = Object.assign(CardRoot, {\n Container: CardContainer,\n Media: CardMedia,\n Body: CardBody,\n Header: CardHeader,\n Toolbar: CardToolbar,\n Title: CardTitle,\n Description: CardDescription,\n Actions: CardActions,\n});\n","import type { ComponentProps, ReactNode } from \"react\";\nimport type { CardVariant } from \"./Card\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type TrendDirection = \"up\" | \"down\" | \"flat\";\nexport type TrendIntent = \"positive\" | \"negative\" | \"neutral\";\n\nexport interface StatCardTrend {\n /** Delta text, e.g. \"+12.4%\" or \"+1,204 this week\". */\n value: ReactNode;\n /** Caret direction. Default `\"up\"`. */\n direction?: TrendDirection;\n /** Tone, independent of direction (a falling error rate is good). Derived from direction when omitted. */\n intent?: TrendIntent;\n}\n\nfunction trendIntent(direction: TrendDirection): TrendIntent {\n if (direction === \"down\") return \"negative\";\n if (direction === \"flat\") return \"neutral\";\n return \"positive\";\n}\n\nexport interface StatCardProps extends ComponentProps<\"div\"> {\n /** Tinted surface + matching border, shared with `<Card>`. The value picks up the accent (except `warning`). Defaults to the neutral surface. */\n variant?: CardVariant;\n /** Small annotation above the value (e.g. \"Total Generations\"). */\n label?: ReactNode;\n /** The headline metric. Rendered with `tabular-nums` so digits don't shift between values. */\n value?: ReactNode;\n /** Subordinate line under the value (e.g. \"42 completed / 12 pending\"). */\n detail?: ReactNode;\n /** Directional delta line under the value. Tone is independent of direction. */\n trend?: StatCardTrend;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"label\" | \"value\" | \"trend\" | \"detail\">;\n /** Leading icon in the label row. */\n icon?: IconProp;\n compact?: boolean;\n bordered?: boolean;\n}\n\n/**\n * Compact KPI tile (label / value / detail) on a `.card` shell, so it shares\n * every card modifier — `compact`/`bordered` map to `.card-compact`/`.card-bordered`.\n * Free-form tiles: `<Card>`; label/value tables: `<PropertyList>`.\n */\nexport function StatCard({\n variant = \"default\",\n label,\n value,\n detail,\n trend,\n icon,\n compact,\n bordered,\n className,\n classNames,\n children,\n ...rest\n}: StatCardProps) {\n // Vanilla-bundle parity: an icon alone never emits a label-less row.\n const hasLabel = label !== undefined;\n return (\n <div\n className={cn(\n [\n \"card\",\n \"stat-card\",\n variant !== \"default\" && `card-${variant}`,\n compact && \"card-compact\",\n bordered && \"card-bordered\",\n ],\n className,\n )}\n {...rest}\n >\n {hasLabel ? (\n <p className={cn(\"stat-card-label\", classNames?.label)}>\n {renderIcon(icon)}\n {label}\n </p>\n ) : null}\n {value !== undefined ? (\n <p className={cn(\"stat-card-value\", classNames?.value)}>{value}</p>\n ) : null}\n {trend !== undefined ? (\n <p\n className={cn(\"stat-card-trend\", classNames?.trend)}\n data-trend={trend.direction ?? \"up\"}\n data-intent={trend.intent ?? trendIntent(trend.direction ?? \"up\")}\n >\n {trend.value}\n </p>\n ) : null}\n {detail !== undefined ? (\n <p className={cn(\"stat-card-detail\", classNames?.detail)}>{detail}</p>\n ) : null}\n {children}\n </div>\n );\n}\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type TimelineStatus = \"default\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"current\";\n\nexport interface TimelineProps extends ComponentProps<\"ol\"> {\n /** Turn the rail into a numbered step list. */\n numbered?: boolean;\n}\nfunction TimelineRoot({ numbered, className, ...rest }: TimelineProps) {\n return <ol className={cn([\"timeline\", numbered && \"timeline-numbered\"], className)} {...rest} />;\n}\n\nexport interface TimelineItemProps extends Omit<ComponentProps<\"li\">, \"title\"> {\n /** Accent for the indicator. `current` highlights a numbered marker. */\n status?: TimelineStatus;\n /** Indicator icon, replacing the default dot. */\n icon?: IconProp;\n /** Marker content for the numbered variant (number or letter). Takes precedence over `icon`. */\n marker?: ReactNode;\n title?: ReactNode;\n /** Timestamp line. */\n time?: ReactNode;\n description?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\n \"indicator\" | \"marker\" | \"dot\" | \"content\" | \"title\" | \"time\" | \"description\"\n >;\n}\nfunction TimelineItem({\n status = \"default\",\n icon,\n marker,\n title,\n time,\n description,\n className,\n classNames,\n children,\n ...rest\n}: TimelineItemProps) {\n let indicator: ReactNode;\n if (marker !== undefined) {\n indicator = <span className={cn(\"timeline-marker\", classNames?.marker)}>{marker}</span>;\n } else if (icon != null) {\n indicator = renderIcon(icon);\n } else {\n indicator = <span className={cn(\"timeline-dot\", classNames?.dot)} />;\n }\n return (\n <li\n className={cn(\n [\"timeline-item\", status !== \"default\" && `timeline-item-${status}`],\n className,\n )}\n {...rest}\n >\n <span className={cn(\"timeline-indicator\", classNames?.indicator)}>{indicator}</span>\n <div className={cn(\"timeline-content\", classNames?.content)}>\n {title !== undefined ? (\n <div className={cn(\"timeline-title\", classNames?.title)}>{title}</div>\n ) : null}\n {time !== undefined ? (\n <div className={cn(\"timeline-time\", classNames?.time)}>{time}</div>\n ) : null}\n {description !== undefined ? (\n <div className={cn(\"timeline-description\", classNames?.description)}>{description}</div>\n ) : null}\n {children}\n </div>\n </li>\n );\n}\n\nexport const Timeline = Object.assign(TimelineRoot, { Item: TimelineItem });\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type ItemVariant = \"default\" | \"outline\" | \"muted\";\nexport type ItemSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ItemContainerProps extends ComponentProps<\"div\"> {\n variant?: ItemVariant;\n size?: ItemSize;\n /** Expand the first nested link to fill the whole row (and add hover/focus affordance). */\n asLink?: boolean;\n}\n/** The bare row primitive — just the `.item` shell, for layouts the default `<Item>` doesn't fit. */\nfunction ItemContainer({\n variant = \"default\",\n size = \"md\",\n asLink,\n className,\n ...rest\n}: ItemContainerProps) {\n return (\n <div\n className={cn(\n [\n \"item\",\n variant !== \"default\" && `item-${variant}`,\n size !== \"md\" && `item-${size}`,\n asLink && \"item-link\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport type ItemMediaProps = ComponentProps<\"div\">;\nfunction ItemMedia({ className, ...rest }: ItemMediaProps) {\n return <div className={cn(\"item-media\", className)} {...rest} />;\n}\n\nexport type ItemContentProps = ComponentProps<\"div\">;\nfunction ItemContent({ className, ...rest }: ItemContentProps) {\n return <div className={cn(\"item-content\", className)} {...rest} />;\n}\n\nexport type ItemTitleProps = ComponentProps<\"div\">;\nfunction ItemTitle({ className, ...rest }: ItemTitleProps) {\n return <div className={cn(\"item-title\", className)} {...rest} />;\n}\n\nexport type ItemDescriptionProps = ComponentProps<\"div\">;\nfunction ItemDescription({ className, ...rest }: ItemDescriptionProps) {\n return <div className={cn(\"item-description\", className)} {...rest} />;\n}\n\nexport type ItemActionsProps = ComponentProps<\"div\">;\nfunction ItemActions({ className, ...rest }: ItemActionsProps) {\n return <div className={cn(\"item-actions\", className)} {...rest} />;\n}\n\nexport interface ItemProps extends Omit<ItemContainerProps, \"title\"> {\n /** Leading media (avatar, thumbnail). Takes precedence over `icon`. */\n media?: ReactNode;\n /** Leading icon, rendered inside `.item-media`. */\n icon?: IconProp;\n /** Primary line. */\n title?: ReactNode;\n /** Secondary line under the title. */\n description?: ReactNode;\n /** Trailing controls, pinned to the row's end. */\n actions?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"media\" | \"content\" | \"title\" | \"description\" | \"actions\">;\n}\n\n/** Opinionated row with media / title+description / actions shorthand. For other shapes, compose `<Item.Container>`. */\nfunction ItemRoot({\n media,\n icon,\n title,\n description,\n actions,\n classNames,\n children,\n ...rest\n}: ItemProps) {\n const leading = media ?? renderIcon(icon);\n const hasContent = title !== undefined || description !== undefined;\n return (\n <ItemContainer {...rest}>\n {leading != null ? <ItemMedia className={classNames?.media}>{leading}</ItemMedia> : null}\n {hasContent ? (\n <ItemContent className={classNames?.content}>\n {title !== undefined ? (\n <ItemTitle className={classNames?.title}>{title}</ItemTitle>\n ) : null}\n {description !== undefined ? (\n <ItemDescription className={classNames?.description}>{description}</ItemDescription>\n ) : null}\n </ItemContent>\n ) : null}\n {children}\n {actions !== undefined ? (\n <ItemActions className={classNames?.actions}>{actions}</ItemActions>\n ) : null}\n </ItemContainer>\n );\n}\n\nexport interface ItemGroupProps extends ComponentProps<\"div\"> {\n /** Wrap the stack in a rounded border. */\n bordered?: boolean;\n}\n/** Divided vertical stack of items. */\nexport function ItemGroup({ bordered, className, ...rest }: ItemGroupProps) {\n return (\n <div className={cn([\"item-group\", bordered && \"item-group-bordered\"], className)} {...rest} />\n );\n}\n\nexport const Item = Object.assign(ItemRoot, {\n Container: ItemContainer,\n Media: ItemMedia,\n Content: ItemContent,\n Title: ItemTitle,\n Description: ItemDescription,\n Actions: ItemActions,\n});\n","import type { CSSProperties } from \"react\";\n\nexport interface ChartDatum {\n /** Category name. When present, renders a label (and feeds the aria-label). */\n label?: string;\n /** The magnitude. Bars normalise it against the chart max; donut/stack sum it. */\n value: number;\n /** Per-segment colour override (any CSS colour). Defaults to the SERIES cycle. */\n color?: string;\n}\n\nexport type ChartSize = \"sm\" | \"md\" | \"lg\";\nexport type ChartType = \"bar\" | \"stack\" | \"donut\" | \"pie\";\n\n/**\n * Multi-series palette of existing Flexoki tokens, not a new token layer. The\n * documented vanilla sequence copies this exactly — both bundles must match.\n */\nexport const SERIES = [\n \"var(--color-blue-500)\",\n \"var(--color-orange-400)\",\n \"var(--color-green-500)\",\n \"var(--color-purple-400)\",\n \"var(--color-cyan-500)\",\n \"var(--color-magenta-400)\",\n \"var(--color-yellow-500)\",\n \"var(--color-red-400)\",\n] as const;\n\nexport function seriesColor(datum: ChartDatum, index: number): string {\n return datum.color ?? SERIES[index % SERIES.length]!;\n}\n\n/** Largest value, floored at 1 so the bar calc never divides by zero. */\nexport function computeMax(data: ChartDatum[], explicit?: number): number {\n if (explicit !== undefined) return explicit;\n return Math.max(1, ...data.map((d) => d.value));\n}\n\n/** Cumulative `conic-gradient` stops. A non-positive total yields a neutral fill so the ring isn't blank. */\nexport function buildDonutSegments(data: ChartDatum[]): string {\n const total = data.reduce((sum, d) => sum + Math.max(0, d.value), 0);\n if (total <= 0) return \"var(--color-surface-strong) 0 100%\";\n let acc = 0;\n const stops: string[] = [];\n for (let i = 0; i < data.length; i++) {\n const datum = data[i]!;\n const from = (acc / total) * 360;\n acc += Math.max(0, datum.value);\n const to = (acc / total) * 360;\n stops.push(`${seriesColor(datum, i)} ${from}deg ${to}deg`);\n }\n return stops.join(\", \");\n}\n\nconst TYPE_NOUN: Record<ChartType, string> = {\n bar: \"Bar chart\",\n stack: \"Proportion bar\",\n donut: \"Donut chart\",\n pie: \"Pie chart\",\n};\n\n/** Chart-root `aria-label` summary, e.g. \"Bar chart. Mon: 80, Tue: 52.\" */\nexport function buildAriaLabel(type: ChartType, data: ChartDatum[]): string {\n const parts = data.map((d) => (d.label !== undefined ? `${d.label}: ${d.value}` : `${d.value}`));\n return `${TYPE_NOUN[type]}. ${parts.join(\", \")}.`;\n}\n\n/** Native `title` text for a bar/segment/legend row. */\nexport function datumTitle(datum: ChartDatum): string {\n return datum.label !== undefined ? `${datum.label}: ${datum.value}` : `${datum.value}`;\n}\n\n/** Merge admin custom-property vars with an incoming `style` (incoming wins). */\nexport function mergeStyle(\n vars: Record<string, string | number>,\n incoming?: CSSProperties,\n): CSSProperties {\n return { ...(vars as CSSProperties), ...incoming };\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport {\n type ChartDatum,\n type ChartSize,\n buildAriaLabel,\n computeMax,\n datumTitle,\n mergeStyle,\n} from \"./chart-internal\";\n\nexport type BarChartVariant = \"info\" | \"success\" | \"warning\" | \"danger\";\nexport type BarChartOrientation = \"horizontal\" | \"vertical\";\n\nexport interface BarChartContainerProps extends ComponentProps<\"div\"> {\n orientation?: BarChartOrientation;\n size?: ChartSize;\n /** Show per-bar value labels (`.chart-values`). */\n showValues?: boolean;\n /** Inline-flex, em-sized micro-viz for table cells. */\n inline?: boolean;\n /** Single-series fill colour. Per-bar `color` still overrides individual bars. */\n variant?: BarChartVariant;\n}\n\n/** Bare grid, no bars — compose `<BarChart.Bar>` by hand. Sets `role=\"img\"`; pass `aria-label`. */\nfunction BarChartContainer({\n orientation = \"horizontal\",\n size = \"md\",\n showValues,\n inline,\n variant = \"info\",\n className,\n ...rest\n}: BarChartContainerProps) {\n return (\n <div\n // A chart is a single composite image — role=\"img\" + aria-label, with no <img> to prefer.\n // eslint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"img\"\n className={cn(\n [\n \"chart\",\n \"chart-bars\",\n orientation === \"vertical\" && \"chart-bars-vertical\",\n size !== \"md\" && `chart-${size}`,\n showValues && \"chart-values\",\n inline && \"chart-inline\",\n variant !== \"info\" && `chart-${variant}`,\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport interface BarProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n /** Auto-fills label / value / title / colour from a datum. */\n datum?: ChartDatum;\n /** Raw value when composing without a datum. */\n value?: number;\n /** Category label when composing without a datum. */\n label?: string;\n /** Explicit bar colour (`--bar-color`). Overrides the single-series fill. */\n color?: string;\n}\n\n/**\n * One bar. The value cell always renders (CSS hides it without `.chart-values`);\n * fill stays `currentColor` — single-series bars never cycle SERIES.\n */\nfunction Bar({ datum, value, label, color, className, style, ...rest }: BarProps) {\n const v = datum?.value ?? value ?? 0;\n const lab = datum?.label ?? label;\n const barColor = datum?.color ?? color;\n const vars: Record<string, string | number> = { \"--value\": v };\n if (barColor !== undefined) vars[\"--bar-color\"] = barColor;\n const title = datum !== undefined ? datumTitle(datum) : undefined;\n return (\n <div className={cn(\"chart-bar\", className)} style={mergeStyle(vars, style)} {...rest}>\n {lab !== undefined ? <span className={cn(\"chart-bar-label\", undefined)}>{lab}</span> : null}\n <div className={cn(\"chart-bar-track\", undefined)}>\n <div className={cn(\"chart-bar-fill\", undefined)} title={title} />\n </div>\n <span className={cn(\"chart-bar-value\", undefined)}>{v}</span>\n </div>\n );\n}\n\nexport interface BarChartProps extends ComponentProps<\"div\"> {\n data: ChartDatum[];\n /** Override the computed max (the 100% reference). Defaults to the largest value. */\n max?: number;\n orientation?: BarChartOrientation;\n size?: ChartSize;\n showValues?: boolean;\n inline?: boolean;\n variant?: BarChartVariant;\n}\n\n/** Single-series bar chart. For hand-composed layouts use `<BarChart.Container>` + `<BarChart.Bar>`. */\nfunction BarChartRoot({\n data,\n max,\n orientation = \"horizontal\",\n size = \"md\",\n showValues,\n inline,\n variant = \"info\",\n style,\n \"aria-label\": ariaLabel,\n ...rest\n}: BarChartProps) {\n const resolvedMax = computeMax(data, max);\n return (\n <BarChartContainer\n orientation={orientation}\n size={size}\n showValues={showValues}\n inline={inline}\n variant={variant}\n style={mergeStyle({ \"--chart-max\": resolvedMax }, style)}\n aria-label={ariaLabel ?? buildAriaLabel(\"bar\", data)}\n {...rest}\n >\n {data.map((d, i) => (\n <Bar key={d.label ?? i} datum={d} />\n ))}\n </BarChartContainer>\n );\n}\n\nexport const BarChart = Object.assign(BarChartRoot, {\n Container: BarChartContainer,\n Bar,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { type ChartDatum, datumTitle, mergeStyle, seriesColor } from \"./chart-internal\";\n\nexport interface ChartLegendProps extends ComponentProps<\"ul\"> {\n data: ChartDatum[];\n}\n\n/**\n * Each row's `title` carries the donut's per-slice read-out — a conic-gradient\n * slice has no element to hang a `title` on.\n */\nexport function ChartLegend({ data, className, ...rest }: ChartLegendProps) {\n return (\n <ul className={cn(\"chart-legend\", className)} {...rest}>\n {data.map((d, i) => (\n <li\n key={d.label ?? i}\n className={cn(\"chart-legend-item\", undefined)}\n style={mergeStyle({ \"--legend-color\": seriesColor(d, i) })}\n title={datumTitle(d)}\n >\n {d.label ?? d.value}\n </li>\n ))}\n </ul>\n );\n}\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { ChartLegend } from \"./ChartLegend\";\nimport { cn } from \"./cn\";\nimport {\n type ChartDatum,\n type ChartSize,\n buildAriaLabel,\n buildDonutSegments,\n mergeStyle,\n} from \"./chart-internal\";\n\nexport interface DonutFigureProps extends ComponentProps<\"div\"> {\n size?: ChartSize;\n}\n\n/** Square positioning context that overlays the centre label on the ring. */\nfunction Figure({ size = \"md\", className, ...rest }: DonutFigureProps) {\n return (\n <div\n className={cn([\"chart-donut-figure\", size !== \"md\" && `chart-${size}`], className)}\n {...rest}\n />\n );\n}\n\nexport interface DonutRingProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n data: ChartDatum[];\n /** Solid pie — no hole. */\n pie?: boolean;\n /** Ring width as a % of diameter (default \"33%\"). Ignored when `pie`. */\n thickness?: string;\n}\n\n/** The masked conic-gradient ring. */\nfunction Ring({ data, pie, thickness, className, style, ...rest }: DonutRingProps) {\n const vars: Record<string, string | number> = { \"--donut-segments\": buildDonutSegments(data) };\n if (thickness !== undefined && !pie) vars[\"--donut-thickness\"] = thickness;\n return (\n <div\n className={cn([\"chart-donut\", pie && \"chart-donut-pie\"], className)}\n style={mergeStyle(vars, style)}\n {...rest}\n />\n );\n}\n\n/** Centred overlay (a total, a label). Not a child of the ring — masks clip subtrees. */\nfunction Center({ className, ...rest }: ComponentProps<\"div\">) {\n return <div className={cn(\"chart-donut-center\", className)} {...rest} />;\n}\n\nexport interface DonutProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n data: ChartDatum[];\n size?: ChartSize;\n /** Ring width as a % of diameter (default \"33%\"). Ignored when `pie`. */\n thickness?: string;\n /** Solid pie — no hole. */\n pie?: boolean;\n /** Centred overlay content (a total, a label). */\n centerLabel?: ReactNode;\n /** Render a legend from the data labels. */\n legend?: boolean;\n inline?: boolean;\n}\n\n/**\n * Donut (or `pie`) breakdown. Per-slice read-outs live on the `legend` rows —\n * a conic slice has no element to carry a `title`. Resize via `size` or\n * `--chart-size`.\n */\nfunction DonutRoot({\n data,\n size = \"md\",\n thickness,\n pie,\n centerLabel,\n legend,\n inline,\n className,\n \"aria-label\": ariaLabel,\n ...rest\n}: DonutProps) {\n return (\n <div\n // A chart is a single composite image — role=\"img\" + aria-label, with no <img> to prefer.\n // eslint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"img\"\n className={cn([\"chart\", inline && \"chart-inline\"], className)}\n aria-label={ariaLabel ?? buildAriaLabel(pie ? \"pie\" : \"donut\", data)}\n {...rest}\n >\n <Figure size={size}>\n <Ring data={data} pie={pie} thickness={thickness} />\n {centerLabel !== undefined ? <Center>{centerLabel}</Center> : null}\n </Figure>\n {legend ? <ChartLegend data={data} /> : null}\n </div>\n );\n}\n\nexport const Donut = Object.assign(DonutRoot, {\n Figure,\n Ring,\n Center,\n Legend: ChartLegend,\n});\n","import type { ComponentProps } from \"react\";\nimport { ChartLegend } from \"./ChartLegend\";\nimport { cn } from \"./cn\";\nimport {\n type ChartDatum,\n buildAriaLabel,\n datumTitle,\n mergeStyle,\n seriesColor,\n} from \"./chart-internal\";\n\nexport type StackedBarTrackProps = ComponentProps<\"div\">;\n\n/** The bare proportion track — compose `<StackedBar.Segment>` children by hand. */\nfunction Track({ className, ...rest }: StackedBarTrackProps) {\n return <div className={cn(\"chart-stack\", className)} {...rest} />;\n}\n\nexport interface SegmentProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n /** Auto-fills value / title / colour from a datum. */\n datum?: ChartDatum;\n /** Index into the SERIES palette (used when the datum has no `color`). */\n index?: number;\n /** Raw value when composing without a datum. */\n value?: number;\n /** Explicit segment colour (`--segment-color`). */\n color?: string;\n}\n\n/** One proportion segment, sized by `flex: var(--value)`; SERIES-cycle colours by default. */\nfunction Segment({ datum, index = 0, value, color, className, style, ...rest }: SegmentProps) {\n const v = datum?.value ?? value ?? 0;\n const segColor = datum !== undefined ? seriesColor(datum, index) : color;\n const vars: Record<string, string | number> = { \"--value\": v };\n if (segColor !== undefined) vars[\"--segment-color\"] = segColor;\n const title = datum !== undefined ? datumTitle(datum) : undefined;\n return (\n <div\n className={cn(\"chart-segment\", className)}\n style={mergeStyle(vars, style)}\n title={title}\n {...rest}\n />\n );\n}\n\nexport interface StackedBarProps extends Omit<ComponentProps<\"div\">, \"color\"> {\n data: ChartDatum[];\n /** Render a legend from the data labels. */\n legend?: boolean;\n inline?: boolean;\n}\n\n/** Single horizontal proportion bar. Segments size by flex ratio — no max needed. */\nfunction StackedBarRoot({\n data,\n legend,\n inline,\n className,\n \"aria-label\": ariaLabel,\n ...rest\n}: StackedBarProps) {\n return (\n <div\n // A chart is a single composite image — role=\"img\" + aria-label, with no <img> to prefer.\n // eslint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"img\"\n className={cn([\"chart\", inline && \"chart-inline\"], className)}\n aria-label={ariaLabel ?? buildAriaLabel(\"stack\", data)}\n {...rest}\n >\n <Track>\n {data.map((d, i) => (\n <Segment key={d.label ?? i} datum={d} index={i} />\n ))}\n </Track>\n {legend ? <ChartLegend data={data} /> : null}\n </div>\n );\n}\n\nexport const StackedBar = Object.assign(StackedBarRoot, {\n Track,\n Segment,\n Legend: ChartLegend,\n});\n","import { createContext, useCallback, useEffect, useRef, type Ref } from \"react\";\n\nexport interface DialogContextValue {\n close: () => void;\n}\n\nexport const DialogContext = createContext<DialogContextValue | null>(null);\n\n/**\n * Drives a native `<dialog>` from a controlled `open` prop, shared by `<Dialog>`\n * and `<Drawer>`: merges the consumer ref, calls `showModal()` / `close()` on\n * change, and reports closes (Esc, backdrop, form submit) via `onOpenChange`.\n * Returns `ref` for the portal container context.\n */\nexport function useDialogElement(\n open: boolean | undefined,\n onOpenChange: ((open: boolean) => void) | undefined,\n consumerRef: Ref<HTMLDialogElement> | undefined,\n) {\n const ref = useRef<HTMLDialogElement | null>(null);\n const onOpenChangeRef = useRef(onOpenChange);\n onOpenChangeRef.current = onOpenChange;\n\n // Without this merge, a consumer `ref` would flow through `...rest`, override\n // `ref={ref}`, and silently break open/close.\n const setRef = useCallback(\n (node: HTMLDialogElement | null) => {\n ref.current = node;\n if (typeof consumerRef === \"function\") consumerRef(node);\n else if (consumerRef) consumerRef.current = node;\n },\n [consumerRef],\n );\n\n useEffect(() => {\n const el = ref.current;\n if (!el || open === undefined) return;\n if (open && !el.open) el.showModal();\n else if (!open && el.open) el.close();\n }, [open]);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n const handleClose = () => onOpenChangeRef.current?.(false);\n el.addEventListener(\"close\", handleClose);\n return () => el.removeEventListener(\"close\", handleClose);\n }, []);\n\n const ctx: DialogContextValue = { close: () => ref.current?.close() };\n return { setRef, ctx, ref };\n}\n","import { useContext, type ComponentProps, type ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { DialogContext, useDialogElement } from \"./dialog-internal\";\nimport { renderIcon, type IconProp } from \"./icon\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport type DialogSize = \"sm\" | \"md\" | \"lg\" | \"auto\" | \"metabase\";\nexport type DialogClosedBy = \"any\" | \"closerequest\" | \"none\";\n\nfunction DefaultCloseIcon() {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n}\n\nexport interface DialogContainerProps extends Omit<ComponentProps<\"dialog\">, \"open\"> {\n /** Controlled open state. Omit for uncontrolled (e.g. driven by Invoker Commands). */\n open?: boolean;\n /** Fires when the dialog closes (Esc, backdrop, close button, form method=\"dialog\"). */\n onOpenChange?: (open: boolean) => void;\n /** Width preset. `\"auto\"` shrinks to content; `\"metabase\"` fits a 1048px embedded iframe (1138px modal). Default: `\"md\"`. */\n size?: DialogSize;\n /** Native `closedby` attribute. Default: `\"any\"`. */\n closedby?: DialogClosedBy;\n}\n\n/** The bare `<dialog>` primitive — for layouts the default `<Dialog>` doesn't fit. */\nfunction DialogContainer({\n open,\n onOpenChange,\n size = \"md\",\n closedby = \"any\",\n className,\n children,\n ref: consumerRef,\n ...rest\n}: DialogContainerProps) {\n const { setRef, ctx, ref } = useDialogElement(open, onOpenChange, consumerRef);\n\n return (\n <DialogContext.Provider value={ctx}>\n <PortalContainerContext.Provider value={ref}>\n <dialog\n ref={setRef}\n className={cn([\"dialog\", size !== \"md\" && `dialog-${size}`], className)}\n closedby={closedby}\n {...rest}\n >\n {children}\n </dialog>\n </PortalContainerContext.Provider>\n </DialogContext.Provider>\n );\n}\n\nexport type DialogHeaderProps = ComponentProps<\"div\">;\n\nfunction DialogHeader({ className, ...rest }: DialogHeaderProps) {\n return <div className={cn(\"dialog-header\", className)} {...rest} />;\n}\n\nexport interface DialogTitleProps extends ComponentProps<\"h2\"> {\n /** Leading icon. */\n icon?: IconProp;\n}\n\nfunction DialogTitle({ icon, className, children, ...rest }: DialogTitleProps) {\n return (\n <h2 className={cn(\"dialog-title\", className)} {...rest}>\n {renderIcon(icon)}\n {children}\n </h2>\n );\n}\n\nexport type DialogDescriptionProps = ComponentProps<\"p\">;\n\nfunction DialogDescription({ className, ...rest }: DialogDescriptionProps) {\n return <p className={cn(\"dialog-description\", className)} {...rest} />;\n}\n\nexport type DialogBodyProps = ComponentProps<\"div\">;\n\nfunction DialogBody({ className, ...rest }: DialogBodyProps) {\n return <div className={cn(\"dialog-body\", className)} {...rest} />;\n}\n\nexport type DialogFooterProps = ComponentProps<\"div\">;\n\nfunction DialogFooter({ className, ...rest }: DialogFooterProps) {\n return <div className={cn(\"dialog-footer\", className)} {...rest} />;\n}\n\nexport interface DialogCloseButtonProps extends ComponentProps<\"button\"> {\n /** Override the default X icon. */\n icon?: IconProp;\n}\n\nfunction DialogCloseButton({\n icon,\n className,\n children,\n onClick,\n type = \"button\",\n \"aria-label\": ariaLabel = \"Close\",\n ...rest\n}: DialogCloseButtonProps) {\n const ctx = useContext(DialogContext);\n return (\n <button\n type={type}\n className={cn(\"dialog-close\", className)}\n aria-label={ariaLabel}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) ctx?.close();\n }}\n {...rest}\n >\n {children ?? (icon !== undefined ? renderIcon(icon) : <DefaultCloseIcon />)}\n </button>\n );\n}\n\nexport interface DialogProps extends Omit<DialogContainerProps, \"title\" | \"children\"> {\n /** Leading icon for the title row. */\n icon?: IconProp;\n /** Renders as `<Dialog.Title>`. */\n title?: ReactNode;\n /** Renders as `<Dialog.Description>`. */\n description?: ReactNode;\n /** Renders as `<Dialog.Footer>`. */\n actions?: ReactNode;\n /** Show the X close button in the header. Default: `true`. */\n dismissible?: boolean;\n /** aria-label for the close button. Default: `\"Close\"`. */\n closeLabel?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"header\" | \"title\" | \"close\" | \"description\" | \"body\" | \"footer\">;\n children?: ReactNode;\n}\n\n/** Standard modal with shorthand-driven header/body/footer. For other shapes, compose `<Dialog.Container>` by hand. */\nfunction DialogRoot({\n icon,\n title,\n description,\n actions,\n dismissible = true,\n closeLabel = \"Close\",\n classNames,\n children,\n ...containerProps\n}: DialogProps) {\n const hasTitle = title !== undefined || icon !== undefined;\n const showHeader = hasTitle || dismissible;\n return (\n <DialogContainer {...containerProps}>\n {showHeader ? (\n <DialogHeader className={classNames?.header}>\n {hasTitle ? (\n <DialogTitle icon={icon} className={classNames?.title}>\n {title}\n </DialogTitle>\n ) : (\n <span className={cn(\"flex-1\", undefined)} />\n )}\n {dismissible ? (\n <DialogCloseButton aria-label={closeLabel} className={classNames?.close} />\n ) : null}\n </DialogHeader>\n ) : null}\n {description !== undefined ? (\n <DialogDescription className={classNames?.description}>{description}</DialogDescription>\n ) : null}\n {children !== undefined ? (\n <DialogBody className={classNames?.body}>{children}</DialogBody>\n ) : null}\n {actions !== undefined ? (\n <DialogFooter className={classNames?.footer}>{actions}</DialogFooter>\n ) : null}\n </DialogContainer>\n );\n}\n\nexport const Dialog = Object.assign(DialogRoot, {\n Container: DialogContainer,\n Header: DialogHeader,\n Title: DialogTitle,\n Description: DialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n CloseButton: DialogCloseButton,\n});\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { Dialog, type DialogClosedBy } from \"./Dialog\";\nimport { DialogContext, useDialogElement } from \"./dialog-internal\";\nimport { type IconProp } from \"./icon\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport type DrawerSide = \"start\" | \"end\" | \"bottom\";\nexport type DrawerSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface DrawerContainerProps extends Omit<ComponentProps<\"dialog\">, \"open\"> {\n /** Controlled open state. Omit for uncontrolled (e.g. Invoker Commands). */\n open?: boolean;\n /** Fires when the drawer closes (Esc, backdrop, close button, form method=\"dialog\"). */\n onOpenChange?: (open: boolean) => void;\n /** Which edge the panel anchors to. Default `\"end\"`. */\n side?: DrawerSide;\n /** Cross-axis extent. Default `\"md\"`. */\n size?: DrawerSize;\n /** Native `closedby` attribute. Default `\"any\"`. */\n closedby?: DialogClosedBy;\n}\n\n/** The bare edge-anchored `<dialog>` primitive — for layouts the default `<Drawer>` doesn't fit. */\nfunction DrawerContainer({\n open,\n onOpenChange,\n side = \"end\",\n size = \"md\",\n closedby = \"any\",\n className,\n children,\n ref: consumerRef,\n ...rest\n}: DrawerContainerProps) {\n const { setRef, ctx, ref } = useDialogElement(open, onOpenChange, consumerRef);\n return (\n <DialogContext.Provider value={ctx}>\n <PortalContainerContext.Provider value={ref}>\n <dialog\n ref={setRef}\n className={cn(\n [\n \"dialog\",\n \"drawer\",\n side !== \"end\" && `drawer-${side}`,\n size !== \"md\" && `drawer-${size}`,\n ],\n className,\n )}\n closedby={closedby}\n {...rest}\n >\n {children}\n </dialog>\n </PortalContainerContext.Provider>\n </DialogContext.Provider>\n );\n}\n\nexport interface DrawerProps extends Omit<DrawerContainerProps, \"title\" | \"children\"> {\n /** Leading icon for the title row. */\n icon?: IconProp;\n /** Renders as `<Drawer.Title>`. */\n title?: ReactNode;\n /** Renders as `<Drawer.Description>`. */\n description?: ReactNode;\n /** Renders as `<Drawer.Footer>`. */\n actions?: ReactNode;\n /** Show the X close button in the header. Default `true`. */\n dismissible?: boolean;\n /** aria-label for the close button. Default `\"Close\"`. */\n closeLabel?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"header\" | \"title\" | \"close\" | \"description\" | \"body\" | \"footer\">;\n children?: ReactNode;\n}\n\n/** Edge-anchored panel with shorthand-driven header/body/footer. For other shapes, compose `<Drawer.Container>`. */\nfunction DrawerRoot({\n icon,\n title,\n description,\n actions,\n dismissible = true,\n closeLabel = \"Close\",\n classNames,\n children,\n ...containerProps\n}: DrawerProps) {\n const hasTitle = title !== undefined || icon !== undefined;\n const showHeader = hasTitle || dismissible;\n return (\n <DrawerContainer {...containerProps}>\n {showHeader ? (\n <Dialog.Header className={classNames?.header}>\n {hasTitle ? (\n <Dialog.Title icon={icon} className={classNames?.title}>\n {title}\n </Dialog.Title>\n ) : (\n <span className={cn(\"flex-1\", undefined)} />\n )}\n {dismissible ? (\n <Dialog.CloseButton aria-label={closeLabel} className={classNames?.close} />\n ) : null}\n </Dialog.Header>\n ) : null}\n {description !== undefined ? (\n <Dialog.Description className={classNames?.description}>{description}</Dialog.Description>\n ) : null}\n {children !== undefined ? (\n <Dialog.Body className={classNames?.body}>{children}</Dialog.Body>\n ) : null}\n {actions !== undefined ? (\n <Dialog.Footer className={classNames?.footer}>{actions}</Dialog.Footer>\n ) : null}\n </DrawerContainer>\n );\n}\n\n/** Shares the Dialog header/body/footer subparts; only the container differs. */\nexport const Drawer = Object.assign(DrawerRoot, {\n Container: DrawerContainer,\n Header: Dialog.Header,\n Title: Dialog.Title,\n Description: Dialog.Description,\n Body: Dialog.Body,\n Footer: Dialog.Footer,\n CloseButton: Dialog.CloseButton,\n});\n","import { Field as BaseField } from \"@base-ui/react/field\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\n\nexport type FieldContainerProps = ComponentProps<typeof BaseField.Root>;\n\n/** The bare `.field` container — for layouts the default `<Field>` doesn't fit. */\nfunction FieldContainer({ className, ...rest }: FieldContainerProps) {\n return <BaseField.Root className={cn(\"field\", className)} {...rest} />;\n}\n\nexport interface FieldProps extends FieldContainerProps {\n /** Renders as `<Field.Label>`. */\n label?: ReactNode;\n /** Renders as `<Field.Description>`. */\n description?: ReactNode;\n /**\n * Single-message error. Renders as `<Field.Error match={true}>` — shown\n * whenever the contained control fails validation. For per-`ValidityState`\n * messages, use `<Field.Container>` and compose `<Field.Error>` directly.\n */\n error?: ReactNode;\n /** Marks the label with a red asterisk via `data-required`. */\n required?: boolean;\n /** Inline layout (`.field-row`) — control beside its label; pairs with switches and single checkboxes. */\n inline?: boolean;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"label\" | \"description\" | \"error\">;\n}\n\n/** Standard field — label, control (`children`), description, error. For other shapes, compose `<Field.Container>` by hand. */\nfunction FieldRoot({\n label,\n description,\n error,\n required,\n inline,\n className,\n classNames,\n children,\n ...rest\n}: FieldProps) {\n const labelEl =\n label !== undefined ? (\n <FieldLabel required={required} className={classNames?.label}>\n {label}\n </FieldLabel>\n ) : null;\n const descriptionEl =\n description !== undefined ? (\n <FieldDescription className={classNames?.description}>{description}</FieldDescription>\n ) : null;\n const errorEl =\n error !== undefined ? (\n <FieldError match={true} className={classNames?.error}>\n {error}\n </FieldError>\n ) : null;\n return (\n <FieldContainer className={cn(inline && \"field-row\", className)} {...rest}>\n {inline ? (\n <>\n {children}\n {labelEl}\n </>\n ) : (\n <>\n {labelEl}\n {children}\n </>\n )}\n {descriptionEl}\n {errorEl}\n </FieldContainer>\n );\n}\n\nexport type FieldLabelProps = ComponentProps<typeof BaseField.Label> & {\n /** Renders a red asterisk after the label text via `data-required`. */\n required?: boolean;\n};\n\nfunction FieldLabel({ className, required, ...rest }: FieldLabelProps) {\n return (\n <BaseField.Label\n data-required={required ? \"\" : undefined}\n className={cn(\"field-label\", className)}\n {...rest}\n />\n );\n}\n\nexport type FieldDescriptionProps = ComponentProps<typeof BaseField.Description>;\n\nfunction FieldDescription({ className, ...rest }: FieldDescriptionProps) {\n return <BaseField.Description className={cn(\"field-description\", className)} {...rest} />;\n}\n\nexport type FieldErrorProps = ComponentProps<typeof BaseField.Error>;\n\nfunction FieldError({ className, ...rest }: FieldErrorProps) {\n return <BaseField.Error className={cn(\"field-error\", className)} {...rest} />;\n}\n\nexport const Field = Object.assign(FieldRoot, {\n Container: FieldContainer,\n Label: FieldLabel,\n Description: FieldDescription,\n Error: FieldError,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type FooterProps = ComponentProps<\"footer\">;\n\nfunction FooterRoot({ className, ...rest }: FooterProps) {\n return <footer className={cn(\"footer\", className)} {...rest} />;\n}\n\nexport type FooterLinksProps = ComponentProps<\"div\">;\n\nfunction FooterLinks({ className, ...rest }: FooterLinksProps) {\n return <div className={cn(\"footer-links\", className)} {...rest} />;\n}\n\nexport type FooterLinkProps = ComponentProps<\"a\">;\n\nfunction FooterLink({ className, children, ...rest }: FooterLinkProps) {\n return (\n <a className={cn(\"footer-link\", className)} {...rest}>\n {children}\n </a>\n );\n}\n\nexport type FooterMetaProps = ComponentProps<\"div\">;\n\nfunction FooterMeta({ className, ...rest }: FooterMetaProps) {\n return <div className={cn(\"footer-meta\", className)} {...rest} />;\n}\n\nexport const Footer = Object.assign(FooterRoot, {\n Links: FooterLinks,\n Link: FooterLink,\n Meta: FooterMeta,\n});\n","import { useRef, type ComponentProps, type Ref } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\nimport { Kbd } from \"./Kbd\";\nimport { useHotkey } from \"./useHotkey\";\n\nexport type MenuProps = ComponentProps<\"details\">;\n\nfunction MenuRoot({ className, ...rest }: MenuProps) {\n return <details className={cn(\"menu\", className)} {...rest} />;\n}\n\nexport type MenuTriggerProps = ComponentProps<\"summary\">;\n\nfunction MenuTrigger({ className, ...rest }: MenuTriggerProps) {\n return <summary className={cn(\"menu-trigger\", className)} {...rest} />;\n}\n\nexport type MenuPopupProps = ComponentProps<\"div\">;\n\nfunction MenuPopup({ className, role = \"menu\", ...rest }: MenuPopupProps) {\n return <div role={role} className={cn(\"menu-popup\", className)} {...rest} />;\n}\n\ninterface MenuItemExtras {\n /** Keyboard shortcut (`useHotkey` syntax) — synthesizes a click; shown right-pinned in the row. */\n hotkey?: string | readonly string[];\n /** Leading icon. Replaced by the check indicator when `checked` is set. */\n icon?: IconProp;\n /** Render as a checkable item: shows a leading check when `true`, reserves the gutter when `false`. Set `role=\"menuitemradio\"` for single-select groups. */\n checked?: boolean;\n}\n\ntype MenuItemAsButton = ComponentProps<\"button\"> & MenuItemExtras & { href?: undefined };\ntype MenuItemAsLink = ComponentProps<\"a\"> & MenuItemExtras & { href: string };\n\nexport type MenuItemProps = MenuItemAsButton | MenuItemAsLink;\n\nfunction CheckIcon() {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M5 12l5 5l10 -10\" />\n </svg>\n );\n}\n\n// The check is revealed by CSS only when the item is aria-checked; the gutter is\n// always reserved so labels align across a checkable group.\nfunction MenuItemIndicator() {\n return (\n <span className={cn(\"menu-item-indicator\", undefined)}>\n <CheckIcon />\n </span>\n );\n}\n\nfunction MenuItem(props: MenuItemProps) {\n const ref = useRef<HTMLElement | null>(null);\n const hotkey = props.hotkey;\n const checked = props.checked;\n\n // Anchors have no native `disabled`, hence the `aria-disabled` branch.\n const ariaDisabled = props[\"aria-disabled\"];\n const isDisabled =\n (\"disabled\" in props && props.disabled === true) ||\n ariaDisabled === true ||\n ariaDisabled === \"true\";\n\n const { ariaKeyShortcuts, primaryChord } = useHotkey(hotkey, () => ref.current?.click(), {\n enabled: !isDisabled,\n });\n\n const leading = checked !== undefined ? <MenuItemIndicator /> : renderIcon(props.icon);\n const defaultRole = checked !== undefined ? \"menuitemcheckbox\" : \"menuitem\";\n\n if (props.href !== undefined) {\n const {\n className,\n role,\n icon: _icon,\n checked: _checked,\n children,\n hotkey: _hk,\n onClick,\n ...rest\n } = props;\n return (\n // <a href> is natively keyboard-activable, so these a11y rules are false positives.\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n role={role ?? defaultRole}\n aria-checked={checked}\n aria-keyshortcuts={ariaKeyShortcuts}\n className={cn(\"menu-item\", className)}\n onClick={(event) => {\n // Anchors ignore `aria-disabled` natively — without this, clicks would still navigate.\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n }}\n {...rest}\n >\n {leading}\n {children}\n {primaryChord !== undefined ? <Kbd keys={primaryChord} /> : null}\n </a>\n );\n }\n const {\n className,\n type = \"button\",\n role,\n icon: _icon,\n checked: _checked,\n children,\n hotkey: _hk,\n ...rest\n } = props;\n return (\n <button\n ref={ref as Ref<HTMLButtonElement>}\n type={type}\n role={role ?? defaultRole}\n aria-checked={checked}\n aria-keyshortcuts={ariaKeyShortcuts}\n className={cn(\"menu-item\", className)}\n {...rest}\n >\n {leading}\n {children}\n {primaryChord !== undefined ? <Kbd keys={primaryChord} /> : null}\n </button>\n );\n}\n\nexport type MenuSeparatorProps = ComponentProps<\"hr\">;\n\nfunction MenuSeparator({ className, ...rest }: MenuSeparatorProps) {\n return <hr className={cn(\"menu-separator\", className)} {...rest} />;\n}\n\nexport type MenuGroupProps = ComponentProps<\"div\">;\n\nfunction MenuGroup({ className, role = \"group\", ...rest }: MenuGroupProps) {\n return <div role={role} className={cn(\"menu-group\", className)} {...rest} />;\n}\n\nexport type MenuGroupLabelProps = ComponentProps<\"div\">;\n\nfunction MenuGroupLabel({ className, ...rest }: MenuGroupLabelProps) {\n return <div className={cn(\"menu-group-label\", className)} {...rest} />;\n}\n\nexport const Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Popup: MenuPopup,\n Item: MenuItem,\n Separator: MenuSeparator,\n Group: MenuGroup,\n GroupLabel: MenuGroupLabel,\n});\n","import type { ComponentProps, ReactNode } from \"react\";\nimport { useAppShell } from \"./AppShell\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\nimport { Menu } from \"./Menu\";\n\nexport type NavbarProps = ComponentProps<\"header\">;\n\nfunction NavbarRoot({ className, ...rest }: NavbarProps) {\n return <header className={cn(\"navbar\", className)} {...rest} />;\n}\n\nexport type NavbarBrandProps = ComponentProps<\"div\">;\n\nfunction NavbarBrand({ className, ...rest }: NavbarBrandProps) {\n return <div className={cn(\"navbar-brand\", className)} {...rest} />;\n}\n\nexport type NavbarItemsProps = ComponentProps<\"nav\">;\n\nfunction NavbarItems({ className, ...rest }: NavbarItemsProps) {\n return <nav className={cn(\"navbar-items\", className)} {...rest} />;\n}\n\nexport interface NavbarItemProps extends ComponentProps<\"a\"> {\n active?: boolean;\n /** Leading icon. */\n icon?: IconProp;\n}\n\nfunction NavbarItem({ active, icon, className, children, ...rest }: NavbarItemProps) {\n return (\n <a\n className={cn(\"navbar-item\", className)}\n aria-current={active ? \"page\" : undefined}\n {...rest}\n >\n {renderIcon(icon)}\n {children}\n </a>\n );\n}\n\nexport interface NavbarDropdownProps extends Omit<ComponentProps<\"details\">, \"title\"> {\n /** Text shown in the trigger. */\n label: ReactNode;\n}\n\nfunction NavbarDropdown({ label, className, children, ...rest }: NavbarDropdownProps) {\n return (\n <Menu className={className} {...rest}>\n <Menu.Trigger className={cn(\"navbar-item\", undefined)}>{label}</Menu.Trigger>\n <Menu.Popup>{children}</Menu.Popup>\n </Menu>\n );\n}\n\nexport type NavbarActionsProps = ComponentProps<\"div\">;\n\nfunction NavbarActions({ className, ...rest }: NavbarActionsProps) {\n return <div className={cn(\"navbar-actions\", className)} {...rest} />;\n}\n\nexport interface NavbarMobileToggleProps extends Omit<\n ComponentProps<\"button\">,\n \"onClick\" | \"children\"\n> {\n /** Accessible label for the toggle. Default: \"Open menu\". */\n label?: string;\n}\n\nfunction NavbarMobileToggle({\n label = \"Open menu\",\n className,\n type = \"button\",\n ...rest\n}: NavbarMobileToggleProps) {\n const shell = useAppShell();\n const open = shell?.mobileDrawerOpen ?? false;\n\n return (\n <button\n type={type}\n aria-label={label}\n aria-expanded={open}\n onClick={() => shell?.setMobileDrawerOpen(!open)}\n className={cn(\"navbar-mobile-toggle\", className)}\n {...rest}\n />\n );\n}\n\nexport const Navbar = Object.assign(NavbarRoot, {\n Brand: NavbarBrand,\n Items: NavbarItems,\n Item: NavbarItem,\n Dropdown: NavbarDropdown,\n Actions: NavbarActions,\n MobileToggle: NavbarMobileToggle,\n});\n","import { Tabs as BaseTabs } from \"@base-ui/react/tabs\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\nexport type TabsVariant = \"bordered\" | \"boxed\";\nexport type TabsSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface TabsProps extends ComponentProps<typeof BaseTabs.Root> {\n variant?: TabsVariant;\n size?: TabsSize;\n fullWidth?: boolean;\n /** Let the list wrap to multiple rows instead of overflowing; each tab stays on one line. */\n wrap?: boolean;\n /** Fill the active segment with the primary color. Only affects `variant=\"boxed\"`. */\n primary?: boolean;\n}\n\nfunction TabsRoot({\n variant = \"bordered\",\n size = \"md\",\n fullWidth = false,\n wrap = false,\n primary = false,\n className,\n ...rest\n}: TabsProps) {\n return (\n <BaseTabs.Root\n className={cn(\n [\n \"tabs\",\n variant !== \"bordered\" && `tabs-${variant}`,\n size !== \"md\" && `tabs-${size}`,\n fullWidth && \"tabs-full-width\",\n wrap && \"tabs-wrap\",\n primary && \"tabs-primary\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport type TabsListProps = ComponentProps<typeof BaseTabs.List>;\n\nfunction TabsList({ className, ...rest }: TabsListProps) {\n return <BaseTabs.List className={cn(\"tab-list\", className)} {...rest} />;\n}\n\nexport interface TabsTabProps extends ComponentProps<typeof BaseTabs.Tab> {\n /** Leading icon. Pass a component (`icon={IconLock}`) or an element. */\n icon?: IconProp;\n}\n\nfunction TabsTab({ icon, className, children, ...rest }: TabsTabProps) {\n return (\n <BaseTabs.Tab className={cn(\"tab\", className)} {...rest}>\n {renderIcon(icon)}\n {children}\n </BaseTabs.Tab>\n );\n}\n\nexport type TabsPanelProps = ComponentProps<typeof BaseTabs.Panel>;\n\nfunction TabsPanel({ className, ...rest }: TabsPanelProps) {\n return <BaseTabs.Panel className={cn(\"tab-panel\", className)} {...rest} />;\n}\n\nexport const Tabs = Object.assign(TabsRoot, {\n List: TabsList,\n Tab: TabsTab,\n Panel: TabsPanel,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport interface CodeBlockProps extends ComponentProps<\"pre\"> {\n /** Don't wrap long lines — let them overflow horizontally instead. */\n nowrap?: boolean;\n}\n\n/**\n * Styled `<pre>` for logs, JSON dumps, terminal output, raw model output.\n * Theme-following surface via `--color-code-surface` / `--color-code-text`.\n * No syntax highlighting — layer Shiki/Prism on a nested `<code>` if needed.\n */\nexport function CodeBlock({ nowrap, className, ...rest }: CodeBlockProps) {\n return <pre className={cn([\"code-block\", nowrap && \"code-block-nowrap\"], className)} {...rest} />;\n}\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type ProseProps = ComponentProps<\"div\">;\n\n/**\n * Styled container for HTML the system can't annotate with its class names —\n * backend-rendered markdown, CMS bodies, model output. Element styles are\n * scoped to this wrapper; the rest of the admin UI keeps the global reset.\n */\nexport function Prose({ className, ...rest }: ProseProps) {\n return <div className={cn(\"prose\", className)} {...rest} />;\n}\n","import { Tooltip as BaseTooltip } from \"@base-ui/react/tooltip\";\nimport { useContext, type ComponentProps, type ReactElement, type ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { PortalContainerContext } from \"./portal-context\";\n\nexport type TooltipProviderProps = ComponentProps<typeof BaseTooltip.Provider>;\n\nfunction TooltipProvider(props: TooltipProviderProps) {\n return <BaseTooltip.Provider {...props} />;\n}\n\nexport type TooltipRootProps = ComponentProps<typeof BaseTooltip.Root>;\n\nfunction TooltipRoot(props: TooltipRootProps) {\n return <BaseTooltip.Root {...props} />;\n}\n\nexport type TooltipTriggerProps = ComponentProps<typeof BaseTooltip.Trigger>;\n\nfunction TooltipTrigger(props: TooltipTriggerProps) {\n return <BaseTooltip.Trigger {...props} />;\n}\n\nexport type TooltipSize = \"sm\" | \"md\";\n\ntype TooltipPositionerProps = ComponentProps<typeof BaseTooltip.Positioner>;\n\nexport interface TooltipPopupProps extends ComponentProps<typeof BaseTooltip.Popup> {\n size?: TooltipSize;\n side?: TooltipPositionerProps[\"side\"];\n align?: TooltipPositionerProps[\"align\"];\n sideOffset?: TooltipPositionerProps[\"sideOffset\"];\n}\n\nfunction TooltipPopup({\n size = \"md\",\n side = \"top\",\n align = \"center\",\n sideOffset = 6,\n role = \"tooltip\",\n className,\n children,\n ...rest\n}: TooltipPopupProps) {\n const portalContainer = useContext(PortalContainerContext);\n return (\n <BaseTooltip.Portal container={portalContainer ?? undefined}>\n <BaseTooltip.Positioner sideOffset={sideOffset} side={side} align={align}>\n <BaseTooltip.Popup\n role={role}\n className={cn([\"tooltip\", size !== \"md\" && `tooltip-${size}`], className)}\n {...rest}\n >\n {children}\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n </BaseTooltip.Portal>\n );\n}\n\nexport interface TooltipProps extends Omit<TooltipRootProps, \"children\"> {\n content: ReactNode;\n side?: TooltipPopupProps[\"side\"];\n align?: TooltipPopupProps[\"align\"];\n sideOffset?: TooltipPopupProps[\"sideOffset\"];\n size?: TooltipSize;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"popup\">;\n /** The trigger element. Must be a single React element so Base UI can merge trigger props/refs into it. */\n children: ReactElement;\n}\n\nfunction TooltipShorthand({\n content,\n side,\n align,\n sideOffset,\n size,\n classNames,\n children,\n ...rootProps\n}: TooltipProps) {\n return (\n <TooltipRoot {...rootProps}>\n <BaseTooltip.Trigger render={children} />\n <TooltipPopup\n side={side}\n align={align}\n sideOffset={sideOffset}\n size={size}\n className={classNames?.popup}\n >\n {content}\n </TooltipPopup>\n </TooltipRoot>\n );\n}\n\nexport const Tooltip = Object.assign(TooltipShorthand, {\n Provider: TooltipProvider,\n Root: TooltipRoot,\n Trigger: TooltipTrigger,\n Popup: TooltipPopup,\n});\n","import { useRef, useState, type ComponentProps, type ReactNode } from \"react\";\nimport { cn, type SlotClasses } from \"./cn\";\n\n// Hand-rolled to Tabler's stroke conventions so admin-react stays icon-library-agnostic.\nfunction CopyGlyph({ className }: { className: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className={className}\n >\n <path d=\"M7 7m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z\" />\n <path d=\"M15 7v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\" />\n </svg>\n );\n}\n\nfunction CheckGlyph({ className }: { className: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className={className}\n >\n <path d=\"M5 12l5 5l10 -10\" />\n </svg>\n );\n}\n\nexport interface PropertyListProps extends Omit<ComponentProps<\"section\">, \"title\"> {\n striped?: boolean;\n /** Tightens row height and padding for very dense panels. */\n compact?: boolean;\n /** Collapses the section when every value rendered the auto em-dash fallback. */\n hideIfAllEmpty?: boolean;\n /** Section heading rendered as `<h3 class=\"property-list-title\">`. */\n title?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"title\" | \"items\">;\n}\n\nfunction PropertyListRoot({\n striped,\n compact,\n hideIfAllEmpty,\n title,\n className,\n classNames,\n children,\n ...rest\n}: PropertyListProps) {\n return (\n <section\n className={cn(\n [\n \"property-list\",\n striped && \"property-list-striped\",\n compact && \"property-list-compact\",\n hideIfAllEmpty && \"property-list-hide-if-empty\",\n ],\n className,\n )}\n {...rest}\n >\n {title !== undefined ? (\n <h3 className={cn(\"property-list-title\", classNames?.title)}>{title}</h3>\n ) : null}\n <dl className={cn(\"property-list-items\", classNames?.items)}>{children}</dl>\n </section>\n );\n}\n\nexport interface PropertyListItemProps extends Omit<ComponentProps<\"dd\">, \"title\" | \"label\"> {\n label?: ReactNode;\n value?: ReactNode;\n /** Right-aligns the value cell + applies `tabular-nums`. Mirrors `Table.Cell.numeric`. */\n numeric?: boolean;\n copyable?: boolean;\n /** Overrides the text the copy button writes to the clipboard. */\n copyValue?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"label\" | \"copy\">;\n}\n\nfunction isEmptyValue(value: ReactNode): boolean {\n if (value == null) return true;\n if (typeof value === \"string\") return value.trim() === \"\";\n return false;\n}\n\n// Emits a <dt>/<dd> sibling pair with no host element; children mode renders them verbatim.\nfunction PropertyListItem({\n label,\n value,\n numeric,\n copyable,\n copyValue,\n classNames,\n children,\n ...rest\n}: PropertyListItemProps) {\n if (children !== undefined) {\n return <>{children}</>;\n }\n const empty = isEmptyValue(value);\n return (\n <>\n <PropertyListLabel className={classNames?.label}>{label}</PropertyListLabel>\n <PropertyListValue\n numeric={numeric}\n copyable={copyable}\n empty={empty}\n copyValue={copyValue ?? (typeof value === \"string\" ? value : undefined)}\n classNames={classNames?.copy ? { copy: classNames.copy } : undefined}\n {...rest}\n >\n {empty ? \"—\" : value}\n </PropertyListValue>\n </>\n );\n}\n\nexport type PropertyListLabelProps = ComponentProps<\"dt\">;\nfunction PropertyListLabel({ className, ...rest }: PropertyListLabelProps) {\n return <dt className={cn(\"property-list-label\", className)} {...rest} />;\n}\n\nexport interface PropertyListValueProps extends ComponentProps<\"dd\"> {\n numeric?: boolean;\n copyable?: boolean;\n /** Marks an auto-rendered em-dash cell; drives the list-level `hideIfAllEmpty`. */\n empty?: boolean;\n /** Overrides the text the copy button writes to the clipboard. */\n copyValue?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"copy\">;\n}\n\nfunction PropertyListValue({\n numeric,\n copyable,\n empty,\n copyValue,\n className,\n classNames,\n children,\n ...rest\n}: PropertyListValueProps) {\n const ddRef = useRef<HTMLElement | null>(null);\n const [copied, setCopied] = useState(false);\n\n async function handleCopy() {\n const text = copyValue ?? ddRef.current?.textContent?.trim() ?? \"\";\n if (!text) return;\n try {\n await navigator.clipboard.writeText(text);\n setCopied(true);\n setTimeout(() => setCopied(false), 1200);\n } catch {\n // Permission denied or unsupported — fail silently.\n }\n }\n\n return (\n <dd\n ref={ddRef}\n className={cn(\n [\n \"property-list-value\",\n numeric && \"property-list-value-numeric\",\n copyable && \"property-list-value-copyable\",\n empty && \"property-list-value-empty\",\n ],\n className,\n )}\n {...rest}\n >\n {children}\n <button\n type=\"button\"\n aria-label=\"Copy\"\n className={cn(\"property-list-copy\", classNames?.copy)}\n onClick={handleCopy}\n data-copied={copied ? \"true\" : undefined}\n >\n <CopyGlyph className={cn(\"property-list-copy-icon\", undefined)} />\n <CheckGlyph className={cn(\"property-list-copy-icon-copied\", undefined)} />\n </button>\n </dd>\n );\n}\n\nexport const PropertyList = Object.assign(PropertyListRoot, {\n Item: PropertyListItem,\n Label: PropertyListLabel,\n Value: PropertyListValue,\n});\n","import type { ComponentProps } from \"react\";\nimport { cn } from \"./cn\";\n\nexport type TableAlign = \"left\" | \"right\" | \"center\";\nexport type TableDensity = \"compact\" | \"default\" | \"relaxed\";\n\nexport interface TableProps extends ComponentProps<\"table\"> {\n striped?: boolean;\n bordered?: boolean;\n /** Cell padding. Default `\"default\"`. */\n density?: TableDensity;\n /** @deprecated Use `density=\"relaxed\"`. Kept for the class-name contract. */\n relaxed?: boolean;\n /** Pins `<thead>`; requires an overflowing ancestor (`overflow: auto` + `max-height` wrapper). */\n sticky?: boolean;\n /** Pins the first column against horizontal scroll; requires an overflow-x ancestor. */\n pinCol?: boolean;\n}\n\nfunction TableRoot({\n striped,\n bordered,\n density,\n relaxed,\n sticky,\n pinCol,\n className,\n ...rest\n}: TableProps) {\n const resolvedDensity = density ?? (relaxed ? \"relaxed\" : \"default\");\n return (\n <table\n className={cn(\n [\n \"table\",\n striped && \"table-striped\",\n bordered && \"table-bordered\",\n resolvedDensity === \"compact\" && \"table-compact\",\n resolvedDensity === \"relaxed\" && \"table-relaxed\",\n sticky && \"table-sticky\",\n pinCol && \"table-pin-col\",\n ],\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport type TableHeadProps = ComponentProps<\"thead\">;\nfunction TableHead({ className, ...rest }: TableHeadProps) {\n return <thead className={className} {...rest} />;\n}\n\nexport type TableBodyProps = ComponentProps<\"tbody\">;\nfunction TableBody({ className, ...rest }: TableBodyProps) {\n return <tbody className={className} {...rest} />;\n}\n\nexport type TableFootProps = ComponentProps<\"tfoot\">;\n/** Footer rows are semibold by default; the first row gets a strong top divider against the body. */\nfunction TableFoot({ className, ...rest }: TableFootProps) {\n return <tfoot className={className} {...rest} />;\n}\n\nexport interface TableRowProps extends ComponentProps<\"tr\"> {\n /** Programmatic selection highlight — independent of the CSS rule tinting rows with a checked checkbox. */\n selected?: boolean;\n /** Applies `.table-row-link` so the first `<a>` in the row fills it; the consumer still supplies the anchor. */\n asLink?: boolean;\n}\nfunction TableRow({ selected, asLink, className, ...rest }: TableRowProps) {\n return (\n <tr\n className={cn(asLink && \"table-row-link\", className)}\n data-selected={selected || undefined}\n {...rest}\n />\n );\n}\n\nexport interface TableHeaderCellProps extends Omit<ComponentProps<\"th\">, \"align\"> {\n align?: TableAlign;\n /** Narrow first-column gutter, mirroring the body cell `gutter` so the column lines up. */\n gutter?: boolean;\n}\nfunction TableHeaderCell({ align, gutter, className, scope, ...rest }: TableHeaderCellProps) {\n return (\n <th\n className={cn([\"table-header-cell\", gutter && \"table-cell-gutter\"], className)}\n data-align={align && align !== \"left\" ? align : undefined}\n scope={scope ?? \"col\"}\n {...rest}\n />\n );\n}\n\nexport interface TableCellProps extends Omit<ComponentProps<\"td\">, \"align\"> {\n align?: TableAlign;\n /** Narrow first-column gutter for row-level status icons. */\n gutter?: boolean;\n /** `text-right` + `tabular-nums` for currency/totals columns. */\n numeric?: boolean;\n}\nfunction TableCell({ align, gutter, numeric, className, ...rest }: TableCellProps) {\n return (\n <td\n className={cn(\n [\"table-cell\", gutter && \"table-cell-gutter\", numeric && \"table-cell-numeric\"],\n className,\n )}\n data-align={align && align !== \"left\" ? align : undefined}\n {...rest}\n />\n );\n}\n\nexport interface TableEmptyProps extends ComponentProps<\"td\"> {\n /** Columns to span — set to the table's column count. */\n colSpan?: number;\n}\n/** A centered \"no results\" row; renders its own `<tr>`, so drop it inside `<Table.Body>`. */\nfunction TableEmpty({ colSpan, className, children, ...rest }: TableEmptyProps) {\n return (\n <tr>\n <td className={cn(\"table-empty\", className)} colSpan={colSpan} {...rest}>\n {children}\n </td>\n </tr>\n );\n}\n\nexport const Table = Object.assign(TableRoot, {\n Head: TableHead,\n Body: TableBody,\n Foot: TableFoot,\n Row: TableRow,\n HeaderCell: TableHeaderCell,\n Cell: TableCell,\n Empty: TableEmpty,\n});\n","import { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { createContext, useContext, useState } from \"react\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { useAppShell } from \"./AppShell\";\nimport { cn, type SlotClasses } from \"./cn\";\nimport { renderIcon, type IconProp } from \"./icon\";\n\ninterface SidebarContextValue {\n collapsed?: boolean;\n defaultCollapsed?: boolean;\n onCollapsedChange?: (collapsed: boolean) => void;\n}\n\nconst SidebarContext = createContext<SidebarContextValue | null>(null);\n\nexport interface SidebarProps extends Omit<ComponentProps<\"aside\">, \"onChange\"> {\n /** Controlled collapsed state. Pair with `onCollapsedChange`. */\n collapsed?: boolean;\n /** Uncontrolled initial state. */\n defaultCollapsed?: boolean;\n onCollapsedChange?: (collapsed: boolean) => void;\n /** Accessible label for the mobile drawer dialog. Default: \"Navigation\". */\n drawerLabel?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"drawer\" | \"drawerBackdrop\">;\n}\n\nfunction SidebarRoot({\n collapsed,\n defaultCollapsed,\n onCollapsedChange,\n drawerLabel = \"Navigation\",\n className,\n classNames,\n children,\n ...rest\n}: SidebarProps) {\n const shell = useAppShell();\n const drawerOpen = shell?.mobileDrawerOpen ?? false;\n\n return (\n <SidebarContext.Provider value={{ collapsed, defaultCollapsed, onCollapsedChange }}>\n <aside className={cn(\"sidebar\", className)} {...rest}>\n {drawerOpen ? null : children}\n </aside>\n {shell ? (\n <BaseDialog.Root open={drawerOpen} onOpenChange={(open) => shell.setMobileDrawerOpen(open)}>\n <BaseDialog.Portal>\n <BaseDialog.Backdrop\n className={cn(\"sidebar-drawer-backdrop\", classNames?.drawerBackdrop)}\n />\n <BaseDialog.Popup\n className={cn(\"sidebar-drawer\", classNames?.drawer)}\n aria-label={drawerLabel}\n onClick={(event) => {\n const target = event.target as HTMLElement;\n if (target.closest(\"a, [data-drawer-close]\")) {\n shell.setMobileDrawerOpen(false);\n }\n }}\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n </BaseDialog.Root>\n ) : null}\n </SidebarContext.Provider>\n );\n}\n\nexport type SidebarHeaderProps = ComponentProps<\"div\">;\n\nfunction SidebarHeader({ className, ...rest }: SidebarHeaderProps) {\n return <div className={cn(\"sidebar-header\", className)} {...rest} />;\n}\n\nexport type SidebarNavProps = ComponentProps<\"nav\">;\n\nfunction SidebarNav({ className, ...rest }: SidebarNavProps) {\n return <nav className={cn(\"sidebar-nav\", className)} {...rest} />;\n}\n\nexport type SidebarGroupProps = ComponentProps<\"div\">;\n\nfunction SidebarGroup({ className, ...rest }: SidebarGroupProps) {\n return <div className={cn(\"sidebar-group\", className)} {...rest} />;\n}\n\nexport type SidebarGroupLabelProps = ComponentProps<\"div\">;\n\nfunction SidebarGroupLabel({ className, ...rest }: SidebarGroupLabelProps) {\n return <div className={cn(\"sidebar-group-label\", className)} {...rest} />;\n}\n\nexport interface SidebarItemProps extends ComponentProps<\"a\"> {\n active?: boolean;\n /** Leading icon. Rendered inside `<Sidebar.Icon>`. */\n icon?: IconProp;\n /** Trailing badge. Rendered inside `<Sidebar.Badge>`. */\n badge?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"icon\" | \"label\" | \"badge\">;\n}\n\nfunction SidebarItem({\n active,\n icon,\n badge,\n className,\n classNames,\n children,\n ...rest\n}: SidebarItemProps) {\n return (\n <a\n className={cn(\"sidebar-item\", className)}\n aria-current={active ? \"page\" : undefined}\n {...rest}\n >\n {icon != null ? (\n <SidebarIcon className={classNames?.icon}>{renderIcon(icon)}</SidebarIcon>\n ) : null}\n {children !== undefined ? (\n <SidebarLabel className={classNames?.label}>{children}</SidebarLabel>\n ) : null}\n {badge !== undefined ? (\n <SidebarBadge className={classNames?.badge}>{badge}</SidebarBadge>\n ) : null}\n </a>\n );\n}\n\nexport type SidebarIconProps = ComponentProps<\"span\">;\n\nfunction SidebarIcon({ className, ...rest }: SidebarIconProps) {\n return <span aria-hidden className={cn(\"sidebar-icon\", className)} {...rest} />;\n}\n\nexport type SidebarLabelProps = ComponentProps<\"span\">;\n\nfunction SidebarLabel({ className, ...rest }: SidebarLabelProps) {\n return <span className={cn(\"sidebar-label\", className)} {...rest} />;\n}\n\nexport type SidebarBadgeProps = ComponentProps<\"span\">;\n\nfunction SidebarBadge({ className, ...rest }: SidebarBadgeProps) {\n return <span className={cn(\"sidebar-badge\", className)} {...rest} />;\n}\n\nexport interface SidebarCollapsibleProps extends Omit<\n ComponentProps<\"details\">,\n \"onToggle\" | \"open\"\n> {\n /** Leading icon for the trigger. Rendered inside `<Sidebar.Icon>`. */\n icon?: IconProp;\n /** Label shown next to the icon. Rendered inside `<Sidebar.Label>`. */\n label?: ReactNode;\n /** Full trigger content. Overrides `icon` + `label`. */\n trigger?: ReactNode;\n /** Controlled open state. */\n open?: boolean;\n /** Uncontrolled initial open state. */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"icon\" | \"label\" | \"trigger\" | \"panel\">;\n}\n\nfunction SidebarCollapsible({\n icon,\n label,\n trigger,\n children,\n className,\n classNames,\n open,\n defaultOpen,\n onOpenChange,\n ...rest\n}: SidebarCollapsibleProps) {\n const isControlled = open !== undefined;\n const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);\n const isOpen = isControlled ? open : internalOpen;\n\n const triggerContent = trigger ?? (\n <>\n {icon != null ? (\n <SidebarIcon className={classNames?.icon}>{renderIcon(icon)}</SidebarIcon>\n ) : null}\n {label !== undefined ? (\n <SidebarLabel className={classNames?.label}>{label}</SidebarLabel>\n ) : null}\n </>\n );\n\n return (\n <details\n className={cn(\"sidebar-collapsible\", className)}\n open={isOpen}\n onToggle={(event) => {\n const next = (event.currentTarget as HTMLDetailsElement).open;\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n }}\n {...rest}\n >\n <summary className={cn(\"sidebar-collapsible-trigger\", classNames?.trigger)}>\n {triggerContent}\n </summary>\n <div className={cn(\"sidebar-collapsible-panel\", classNames?.panel)}>{children}</div>\n </details>\n );\n}\n\nexport interface SidebarSubItemProps extends ComponentProps<\"a\"> {\n active?: boolean;\n icon?: IconProp;\n badge?: ReactNode;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"icon\" | \"badge\">;\n}\n\nfunction SidebarSubItem({\n active,\n icon,\n badge,\n className,\n classNames,\n children,\n ...rest\n}: SidebarSubItemProps) {\n return (\n <a\n className={cn(\"sidebar-subitem\", className)}\n aria-current={active ? \"page\" : undefined}\n {...rest}\n >\n {icon != null ? (\n <SidebarIcon className={classNames?.icon}>{renderIcon(icon)}</SidebarIcon>\n ) : null}\n {children}\n {badge !== undefined ? (\n <SidebarBadge className={classNames?.badge}>{badge}</SidebarBadge>\n ) : null}\n </a>\n );\n}\n\nexport type SidebarFooterProps = ComponentProps<\"div\">;\n\nfunction SidebarFooter({ className, ...rest }: SidebarFooterProps) {\n return <div className={cn(\"sidebar-footer\", className)} {...rest} />;\n}\n\nexport interface SidebarCollapseToggleProps extends Omit<ComponentProps<\"label\">, \"htmlFor\"> {\n /** Accessible label for the checkbox. Default: \"Toggle sidebar\". */\n label?: string;\n /** Per-slot class overrides. `className` targets the root; these target inner slots. */\n classNames?: SlotClasses<\"input\">;\n}\n\nfunction SidebarCollapseToggle({\n label = \"Toggle sidebar\",\n className,\n classNames,\n children,\n ...rest\n}: SidebarCollapseToggleProps) {\n const ctx = useContext(SidebarContext);\n const controlledChecked = ctx?.collapsed;\n const isControlled = controlledChecked !== undefined;\n\n return (\n <label className={cn(\"sidebar-collapse-toggle\", className)} {...rest}>\n <input\n type=\"checkbox\"\n className={cn(\"sidebar-toggle\", classNames?.input)}\n aria-label={label}\n {...(isControlled\n ? { checked: controlledChecked }\n : { defaultChecked: ctx?.defaultCollapsed })}\n onChange={(event) => ctx?.onCollapsedChange?.(event.currentTarget.checked)}\n />\n <span className={cn(\"sr-only\", undefined)}>{label}</span>\n {children}\n </label>\n );\n}\n\nexport const Sidebar = Object.assign(SidebarRoot, {\n Header: SidebarHeader,\n Nav: SidebarNav,\n Group: SidebarGroup,\n GroupLabel: SidebarGroupLabel,\n Item: SidebarItem,\n Icon: SidebarIcon,\n Label: SidebarLabel,\n Badge: SidebarBadge,\n Collapsible: SidebarCollapsible,\n SubItem: SidebarSubItem,\n Footer: SidebarFooter,\n CollapseToggle: SidebarCollapseToggle,\n});\n"],"mappings":";;;;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