@salemcobalt/ui 0.2.0-rc.10 → 0.2.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/index.d.ts +27 -3
- package/dist/index.js +313 -86
- package/dist/index.js.map +1 -1
- package/dist/styles.css +104 -1
- package/package.json +3 -3
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/cx.ts","../src/components/Button/Button.tsx","../src/components/Badge/Badge.tsx","../src/components/Card/Card.tsx","../src/components/Stack/Stack.tsx","../src/components/Inline/Inline.tsx","../src/components/Kbd/Kbd.tsx","../src/components/Dialog/Dialog.tsx","../src/components/Icon/Icon.tsx","../src/icons/icons.gen.tsx","../src/icons/icon-names.gen.ts","../src/components/IconButton/IconButton.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/Menu/Menu.tsx","../src/components/Input/Input.tsx","../src/components/Field/FieldShell.tsx","../src/components/Textarea/Textarea.tsx","../src/components/Select/Select.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Switch/Switch.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Toolbar/Toolbar.tsx","../src/components/Banner/Banner.tsx","../src/components/Spinner/Spinner.tsx","../src/components/Progress/Progress.tsx","../src/components/Heading/Heading.tsx","../src/components/Text/Text.tsx","../src/components/Table/Table.tsx","../src/components/Table/useRowSelection.ts","../src/components/Table/rowSelection.ts","../src/components/SelectionBar/SelectionBar.tsx","../src/components/Toast/Toast.tsx","../src/components/Stat/Stat.tsx","../src/components/Chip/Chip.tsx","../src/components/Disclosure/Disclosure.tsx","../src/components/EmptyState/EmptyState.tsx","../src/components/Skeleton/Skeleton.tsx","../src/components/FileInput/FileInput.tsx","../src/components/FileInput/accept.ts","../src/components/PriorityNav/PriorityNav.tsx","../src/components/PriorityNav/fit.ts","../src/components/PriorityNav/place.ts","../src/components/Popover/Popover.tsx","../src/components/BroomIcon/BroomIcon.tsx","../src/index.ts"],"sourcesContent":["/** Joins class names, dropping falsy entries. */\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(' ');\n}\n","import type { ComponentPropsWithRef, MouseEvent, ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps extends ComponentPropsWithRef<'button'> {\n /** `primary` for the one main action in a view, `secondary` for the rest, `ghost` in toolbars and rows, `danger` for destructive confirmations. */\n variant?: ButtonVariant | undefined;\n /** 32, 40 or 48px tall. Compact density shrinks each by one step. */\n size?: ButtonSize | undefined;\n /** A 16px icon before the label. */\n iconStart?: ReactNode | undefined;\n /** A 16px icon after the label. */\n iconEnd?: ReactNode | undefined;\n /** Keeps the width, hides the label, shows a spinner, sets `aria-busy` and ignores clicks. */\n loading?: boolean | undefined;\n /** Stretches to the container. */\n fullWidth?: boolean | undefined;\n /** A keyboard hint after the label: `shortcut={<Kbd>N</Kbd>}`. Hidden from assistive tech; announce the key with `aria-keyshortcuts=\"n\"`. */\n shortcut?: ReactNode | undefined;\n /** Shows only `iconStart` (or `iconEnd`) in a square button; the label stays the accessible name and the shortcut hides. Toggles without remounting, e.g. when a header runs out of room. Pair with a Tooltip carrying the label. */\n iconOnly?: boolean | undefined;\n}\n\n/** The one way to trigger an action. Renders a native `<button>`; `type` defaults to `button`. */\nexport function Button({\n variant = 'primary',\n size = 'md',\n iconStart,\n iconEnd,\n loading = false,\n fullWidth = false,\n shortcut,\n iconOnly = false,\n type = 'button',\n className,\n children,\n onClick,\n ...rest\n}: ButtonProps) {\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n };\n return (\n <button\n type={type}\n className={cx('sc-button', className)}\n data-variant={variant}\n data-size={size}\n data-loading={loading || undefined}\n data-full-width={fullWidth || undefined}\n data-icon-only={iconOnly || undefined}\n aria-busy={loading || undefined}\n onClick={handleClick}\n {...rest}\n >\n {iconStart ? (\n <span className=\"sc-button__icon\" aria-hidden=\"true\">\n {iconStart}\n </span>\n ) : null}\n <span className=\"sc-button__label\">{children}</span>\n {iconEnd ? (\n <span className=\"sc-button__icon\" aria-hidden=\"true\">\n {iconEnd}\n </span>\n ) : null}\n {shortcut ? (\n <span className=\"sc-button__shortcut\" aria-hidden=\"true\">\n {shortcut}\n </span>\n ) : null}\n {loading ? <span className=\"sc-button__spinner\" aria-hidden=\"true\" /> : null}\n </button>\n );\n}\n","import type { ComponentPropsWithRef } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type BadgeTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\nexport type BadgeVariant = 'soft' | 'solid' | 'outline';\nexport type BadgeSize = 'sm' | 'md';\n\nexport interface BadgeProps extends ComponentPropsWithRef<'span'> {\n /** Color reinforces the status; the word is the status. */\n tone?: BadgeTone | undefined;\n /** `soft` tinted fill (default), `solid` filled, `outline` hairline. */\n variant?: BadgeVariant | undefined;\n /** `md` 24px (default) or `sm` 20px for table rows and Card headers. */\n size?: BadgeSize | undefined;\n /** A 6px dot before the label for scannable lists. */\n dot?: boolean | undefined;\n}\n\n/** One or two words of status beside a thing. Text only; never clickable. */\nexport function Badge({\n tone = 'neutral',\n variant = 'soft',\n size = 'md',\n dot = false,\n className,\n children,\n ...rest\n}: BadgeProps) {\n return (\n <span\n className={cx('sc-badge', className)}\n data-tone={tone}\n data-variant={variant}\n data-size={size}\n {...rest}\n >\n {dot ? <span className=\"sc-badge__dot\" aria-hidden=\"true\" /> : null}\n {children}\n </span>\n );\n}\n","import { useRender } from '@base-ui/react/use-render';\nimport { cx } from '../../utils/cx';\n\nexport type CardVariant = 'outlined' | 'elevated' | 'filled';\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\nexport type CardElement = 'div' | 'article' | 'section' | 'nav' | 'li' | 'a' | 'button';\n\nexport interface CardProps extends useRender.ComponentProps<'div'> {\n /** `outlined` hairline (default), `elevated` floats, `filled` is an inset region. */\n variant?: CardVariant | undefined;\n /** `none`, `sm` 12px, `md` 16px (default), `lg` 24px. */\n padding?: CardPadding | undefined;\n /** Hover lifts the card and the whole card is the target. Render it as `a` or `button` so it is a real control. */\n interactive?: boolean | undefined;\n /** Accent border with a 1px inset, for the active row or chosen option. */\n selected?: boolean | undefined;\n /** Element to render when `render` is not given. Use `nav` (with an `aria-label`) for a carded navigation landmark. */\n as?: CardElement | undefined;\n}\n\n/** A bordered surface that groups related content. Compose the inside with Stack and Inline. */\nexport function Card({\n variant = 'outlined',\n padding = 'md',\n interactive = false,\n selected = false,\n as = 'div',\n render,\n className,\n ref,\n ...rest\n}: CardProps) {\n return useRender({\n render,\n ref,\n defaultTagName: as,\n props: {\n className: cx('sc-card', className),\n 'data-variant': variant,\n 'data-padding': padding,\n 'data-interactive': interactive || undefined,\n 'data-selected': selected || undefined,\n ...rest,\n },\n });\n}\n","import { createElement, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport type { SpacingSize } from '../../types';\nimport { cx } from '../../utils/cx';\n\nexport type StackAlign = 'stretch' | 'start' | 'center' | 'end';\nexport type StackJustify = 'start' | 'center' | 'end' | 'between';\nexport type StackElement =\n | 'div'\n | 'section'\n | 'article'\n | 'ul'\n | 'ol'\n | 'li'\n | 'nav'\n | 'form'\n | 'fieldset'\n | 'header'\n | 'footer'\n | 'main'\n | 'aside'\n | 'dl';\n\nexport interface StackProps extends ComponentPropsWithRef<'div'> {\n /** Gap from the spacing scale. Default `sm` (12px). */\n gap?: SpacingSize | undefined;\n /** Cross-axis alignment. Default `stretch`. */\n align?: StackAlign | undefined;\n /** Main-axis distribution. Default `start`. */\n justify?: StackJustify | undefined;\n /** Element to render. Use `ul`/`ol` for lists and `li` for an item that stacks its own content, so semantics survive the layout. */\n as?: StackElement | undefined;\n /** Lays out as `inline-flex`. */\n inline?: boolean | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Vertical flex layout with a token gap. The only way children should be spaced vertically. */\nexport function Stack({\n gap = 'sm',\n align = 'stretch',\n justify = 'start',\n as = 'div',\n inline = false,\n className,\n ...rest\n}: StackProps) {\n return createElement(as, {\n className: cx('sc-stack', className),\n 'data-gap': gap,\n 'data-align': align,\n 'data-justify': justify,\n 'data-inline': inline || undefined,\n ...rest,\n });\n}\n","import { createElement, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport type { SpacingSize } from '../../types';\nimport { cx } from '../../utils/cx';\n\nexport type InlineAlign = 'center' | 'start' | 'end' | 'baseline' | 'stretch';\nexport type InlineJustify = 'start' | 'center' | 'end' | 'between';\nexport type InlineElement =\n 'div' | 'span' | 'ul' | 'ol' | 'li' | 'nav' | 'header' | 'footer' | 'p' | 'label' | 'dd';\n\nexport interface InlineProps extends ComponentPropsWithRef<'div'> {\n /** Gap from the spacing scale. Default `xs` (8px). */\n gap?: SpacingSize | undefined;\n /** Cross-axis alignment. Default `center`; use `baseline` when mixing text sizes. */\n align?: InlineAlign | undefined;\n /** Main-axis distribution. Default `start`. */\n justify?: InlineJustify | undefined;\n /** Wraps by default; `false` for toolbars that scroll. */\n wrap?: boolean | undefined;\n /** Element to render. Use `ul`/`ol` for a row of items and `li` for an item laid out as a row. */\n as?: InlineElement | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Horizontal flex layout that wraps. For rows of buttons, badges, metadata and key combinations. */\nexport function Inline({\n gap = 'xs',\n align = 'center',\n justify = 'start',\n wrap = true,\n as = 'div',\n className,\n ...rest\n}: InlineProps) {\n return createElement(as, {\n className: cx('sc-inline', className),\n 'data-gap': gap,\n 'data-align': align,\n 'data-justify': justify,\n 'data-nowrap': wrap ? undefined : '',\n ...rest,\n });\n}\n","import { Children, Fragment, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type KbdProps = ComponentPropsWithRef<'kbd'>;\n\n/** A single key, rendered like a keycap. One Kbd per key; group keys with `Kbd.Group`. */\nfunction KbdBase({ className, ...rest }: KbdProps) {\n return <kbd className={cx('sc-kbd', className)} {...rest} />;\n}\n\nexport interface KbdGroupProps extends ComponentPropsWithRef<'span'> {\n /** The readable combination, announced instead of the symbols: \"Command K\". */\n label: string;\n /** `plus` (default) draws a muted + between keys; `space` leaves a gap. */\n separator?: 'plus' | 'space' | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Groups the keys of one shortcut. */\nfunction KbdGroup({ label, separator = 'plus', className, children, ...rest }: KbdGroupProps) {\n const keys = Children.toArray(children);\n return (\n <span role=\"group\" aria-label={label} className={cx('sc-kbd-group', className)} {...rest}>\n {keys.map((key, i) => (\n <Fragment key={i}>\n {i > 0 && separator === 'plus' ? (\n <span className=\"sc-kbd-group__sep\" aria-hidden=\"true\">\n +\n </span>\n ) : null}\n {key}\n </Fragment>\n ))}\n </span>\n );\n}\n\nexport const Kbd = Object.assign(KbdBase, { Group: KbdGroup });\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { Inline, type InlineProps } from '../Inline/Inline';\nimport { XIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type DialogSize = 'sm' | 'md' | 'lg';\nexport type DialogVariant = 'dialog' | 'sheet';\n\nexport interface DialogRootProps {\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the dialog opens or closes. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /** When `false`, Esc and backdrop clicks no longer close the dialog. Default `true`. */\n dismissible?: boolean | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Owns the open state. Wrap a `Dialog.Trigger` and a `Dialog.Content`. */\nfunction Root({ dismissible = true, onOpenChange, open, defaultOpen, children }: DialogRootProps) {\n return (\n <BaseDialog.Root\n open={open}\n defaultOpen={defaultOpen}\n disablePointerDismissal={!dismissible}\n onOpenChange={(next, details) => {\n if (\n !dismissible &&\n !next &&\n (details.reason === 'escape-key' || details.reason === 'outside-press')\n ) {\n details.cancel();\n return;\n }\n onOpenChange?.(next);\n }}\n >\n {children}\n </BaseDialog.Root>\n );\n}\n\n/** Opens the dialog. Pass the Button through `render`: `<Dialog.Trigger render={<Button />}>Open</Dialog.Trigger>`. */\nconst Trigger = BaseDialog.Trigger;\n\nexport interface DialogContentProps extends Omit<BaseDialog.Popup.Props, 'className'> {\n /**\n * Maximum width: `sm` 400px for yes/no, `md` 560px (default) for a short form, `lg` 720px rarely.\n * Every size clamps to the viewport minus a 16px gutter, so a 390px phone gets a 358px dialog.\n */\n size?: DialogSize | undefined;\n /**\n * `dialog` (default) centres the popup. `sheet` is the same on wide viewports but below 640px it\n * becomes a bottom sheet: full width, rounded top, title and actions pinned while `Dialog.Body`\n * scrolls, padding that clears the home indicator. Use it for forms and pickers opened from a list.\n */\n variant?: DialogVariant | undefined;\n className?: string | undefined;\n}\n\n/**\n * Portal, backdrop and the popup. Focus moves inside on open and returns to the trigger on close.\n * Menus, selects and tooltips opened from inside render above it (`--sc-z-dropdown` > `--sc-z-dialog`).\n */\nfunction Content({ size = 'md', variant = 'dialog', className, children, ...rest }: DialogContentProps) {\n return (\n <BaseDialog.Portal>\n <BaseDialog.Backdrop className=\"sc-dialog__backdrop\" />\n <BaseDialog.Popup\n className={cx('sc-dialog__popup', className)}\n data-size={size}\n data-variant={variant}\n aria-modal=\"true\"\n {...rest}\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n );\n}\n\nexport interface DialogTitleProps extends Omit<BaseDialog.Title.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** Required. Labels the dialog; a question or a statement. Renders an `<h2>`. */\nfunction Title({ className, ...rest }: DialogTitleProps) {\n return <BaseDialog.Title className={cx('sc-dialog__title', className)} {...rest} />;\n}\n\nexport interface DialogDescriptionProps extends Omit<BaseDialog.Description.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** Optional, muted. Says what will happen. */\nfunction Description({ className, ...rest }: DialogDescriptionProps) {\n return <BaseDialog.Description className={cx('sc-dialog__description', className)} {...rest} />;\n}\n\nexport type DialogBodyProps = ComponentPropsWithRef<'div'>;\n\n/** Free content between the description and the actions. In a `sheet` it is the part that scrolls. */\nfunction Body({ className, ...rest }: DialogBodyProps) {\n return <div className={cx('sc-dialog__body', className)} {...rest} />;\n}\n\nexport type DialogActionsProps = Omit<InlineProps, 'justify'>;\n\n/** Right-aligned row of Buttons. Put the confirming action last. */\nfunction Actions({ className, ...rest }: DialogActionsProps) {\n return <Inline justify=\"end\" className={cx('sc-dialog__actions', className)} {...rest} />;\n}\n\nexport interface DialogCloseProps extends Omit<BaseDialog.Close.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** With no children or `render`, the × in the corner. Otherwise wraps any Button: `<Dialog.Close render={<Button variant=\"secondary\" />}>Cancel</Dialog.Close>`. */\nfunction Close({ className, children, render, ...rest }: DialogCloseProps) {\n if (children === undefined && render === undefined) {\n return (\n <BaseDialog.Close className={cx('sc-dialog__close', className)} aria-label=\"Close\" {...rest}>\n <XIcon />\n </BaseDialog.Close>\n );\n }\n return (\n <BaseDialog.Close className={className} render={render} {...rest}>\n {children}\n </BaseDialog.Close>\n );\n}\n\n/** A modal that interrupts for a decision or a short form. Built on Base UI's Dialog. */\nexport const Dialog = { Root, Trigger, Content, Title, Description, Body, Actions, Close };\n","import type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'em';\n\nexport interface IconProps extends Omit<ComponentPropsWithRef<'svg'>, 'children'> {\n /** `xs` 12, `sm` 14, `md` 16 (default), `lg` 20, `xl` 24, or `em` to follow the surrounding font size. */\n size?: IconSize | undefined;\n /** Gives the icon an accessible name (`role=\"img\"`). Without it the icon is decorative and hidden from assistive tech. */\n title?: string | undefined;\n /** The glyph: `<path>`, `<circle>` … on a 16×16 grid, stroke `currentColor`. */\n children: ReactNode;\n}\n\n/** Props of a shipped icon such as `PlayIcon`: everything `Icon` takes except the glyph. */\nexport type IconGlyphProps = Omit<IconProps, 'children'>;\n\n/**\n * The frame every icon renders in: a 16×16 outline in `currentColor`, sized by `size`, decorative unless\n * `title` is given. Use the shipped `<Name>Icon` components, or wrap your own paths.\n */\nexport function Icon({ size = 'md', title, className, children, ...rest }: IconProps) {\n return (\n <svg\n className={cx('sc-icon', className)}\n data-size={size}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n focusable=\"false\"\n aria-hidden={title ? undefined : true}\n role={title ? 'img' : undefined}\n aria-label={title}\n {...rest}\n >\n {children}\n </svg>\n );\n}\n","// Generated by scripts/build-icons.mjs from src/icons/svg/*.svg. Do not edit; add an SVG and run `pnpm build`.\nimport { Icon, type IconGlyphProps } from '../components/Icon/Icon';\n\n/** `archive` */\nexport function ArchiveIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"2.25\" y=\"2.75\" width=\"11.5\" height=\"3\" rx=\".75\" />\n <path d=\"M3.25 5.75v6.5a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1v-6.5M6.5 8.75h3\" />\n </Icon>\n );\n}\n\n/** `arrow-down` */\nexport function ArrowDownIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 3v10M4 9l4 4 4-4\" />\n </Icon>\n );\n}\n\n/** `arrow-left` */\nexport function ArrowLeftIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M13 8H3M7 4 3 8l4 4\" />\n </Icon>\n );\n}\n\n/** `arrow-right` */\nexport function ArrowRightIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M3 8h10M9 4l4 4-4 4\" />\n </Icon>\n );\n}\n\n/** `arrow-up` */\nexport function ArrowUpIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 13V3M4 7l4-4 4 4\" />\n </Icon>\n );\n}\n\n/** `bell` */\nexport function BellIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M4 6.5a4 4 0 0 1 8 0v3l1.25 2H2.75L4 9.5z\" />\n <path d=\"M6.5 13.5a1.5 1.5 0 0 0 3 0\" />\n </Icon>\n );\n}\n\n/** `briefcase` */\nexport function BriefcaseIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"2\" y=\"4.75\" width=\"12\" height=\"8.5\" rx=\"1\" />\n <path d=\"M5.5 4.75V3.5a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1.25M2 8.5h12\" />\n </Icon>\n );\n}\n\n/** `calendar` */\nexport function CalendarIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"2.5\" y=\"3.25\" width=\"11\" height=\"10\" rx=\"1\" />\n <path d=\"M2.5 6.75h11M5.5 1.75v3M10.5 1.75v3\" />\n </Icon>\n );\n}\n\n/** `check` */\nexport function CheckIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m3 8.5 3.5 3.5L13 4.5\" />\n </Icon>\n );\n}\n\n/** `chevron-down` */\nexport function ChevronDownIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m4 6 4 4 4-4\" />\n </Icon>\n );\n}\n\n/** `chevron-left` */\nexport function ChevronLeftIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m10 4-4 4 4 4\" />\n </Icon>\n );\n}\n\n/** `chevron-right` */\nexport function ChevronRightIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m6 4 4 4-4 4\" />\n </Icon>\n );\n}\n\n/** `chevron-up` */\nexport function ChevronUpIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m4 10 4-4 4 4\" />\n </Icon>\n );\n}\n\n/** `circle-check` */\nexport function CircleCheckIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"6\" />\n <path d=\"m5.25 8 2 2 3.5-4\" />\n </Icon>\n );\n}\n\n/** `circle-x` */\nexport function CircleXIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"6\" />\n <path d=\"m6 6 4 4M10 6l-4 4\" />\n </Icon>\n );\n}\n\n/** `clock` */\nexport function ClockIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"6\" />\n <path d=\"M8 4.75V8l2.25 1.5\" />\n </Icon>\n );\n}\n\n/** `copy` */\nexport function CopyIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"6\" y=\"6\" width=\"7.5\" height=\"7.5\" rx=\"1\" />\n <path d=\"M4 10H3.25a1 1 0 0 1-1-1V3.25a1 1 0 0 1 1-1H9a1 1 0 0 1 1 1V4\" />\n </Icon>\n );\n}\n\n/** `document` */\nexport function DocumentIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M9 2.25H4.5a1 1 0 0 0-1 1v9.5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5.75z\" />\n <path d=\"M9 2.25v3.5h3.5M6 8.5h4M6 11h4\" />\n </Icon>\n );\n}\n\n/** `download` */\nexport function DownloadIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 2.5v8M4.75 7.25 8 10.5l3.25-3.25\" />\n <path d=\"M2.75 11v1.5a1 1 0 0 0 1 1h8.5a1 1 0 0 0 1-1V11\" />\n </Icon>\n );\n}\n\n/** `edit` */\nexport function EditIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m10.75 2.75 2.5 2.5-7.5 7.5H3.25v-2.5z\" />\n </Icon>\n );\n}\n\n/** `external-link` */\nexport function ExternalLinkIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M9 2.75h4.25V7M13.25 2.75 7.5 8.5\" />\n <path d=\"M11.25 9v3.25a1 1 0 0 1-1 1h-6.5a1 1 0 0 1-1-1v-6.5a1 1 0 0 1 1-1H7\" />\n </Icon>\n );\n}\n\n/** `eye` */\nexport function EyeIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M1.75 8s2.25-4.25 6.25-4.25S14.25 8 14.25 8s-2.25 4.25-6.25 4.25S1.75 8 1.75 8z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n </Icon>\n );\n}\n\n/** `filter` */\nexport function FilterIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.5 3h11l-4.25 5v4.25L6.75 13.5V8z\" />\n </Icon>\n );\n}\n\n/** `flag` */\nexport function FlagIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M3.5 14V2.75\" />\n <path d=\"M3.5 2.75h8.75l-2.25 3 2.25 3H3.5\" />\n </Icon>\n );\n}\n\n/** `inbox` */\nexport function InboxIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2 9v3.25a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V9l-1.6-4.6a1 1 0 0 0-.95-.65H4.55a1 1 0 0 0-.95.65z\" />\n <path d=\"M2 9h3.25l1 2h3.5l1-2H14\" />\n </Icon>\n );\n}\n\n/** `info` */\nexport function InfoIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"6\" />\n <path d=\"M8 7.25V11M8 5.25v.01\" />\n </Icon>\n );\n}\n\n/** `link` */\nexport function LinkIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M6.75 9.25a2.5 2.5 0 0 0 3.54 0l2-2a2.5 2.5 0 0 0-3.54-3.54l-.75.75\" />\n <path d=\"M9.25 6.75a2.5 2.5 0 0 0-3.54 0l-2 2a2.5 2.5 0 0 0 3.54 3.54l.75-.75\" />\n </Icon>\n );\n}\n\n/** `mail` */\nexport function MailIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"2\" y=\"3.5\" width=\"12\" height=\"9\" rx=\"1\" />\n <path d=\"m2.5 4.5 5.5 4.25L13.5 4.5\" />\n </Icon>\n );\n}\n\n/** `map-pin` */\nexport function MapPinIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 14s4.5-3.9 4.5-7.5a4.5 4.5 0 1 0-9 0C3.5 10.1 8 14 8 14z\" />\n <circle cx=\"8\" cy=\"6.5\" r=\"1.5\" />\n </Icon>\n );\n}\n\n/** `menu` */\nexport function MenuIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.5 4.5h11M2.5 8h11M2.5 11.5h11\" />\n </Icon>\n );\n}\n\n/** `minus` */\nexport function MinusIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M3 8h10\" />\n </Icon>\n );\n}\n\n/** `moon` */\nexport function MoonIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M13.25 9.5A5.5 5.5 0 0 1 6.5 2.75 5.5 5.5 0 1 0 13.25 9.5z\" />\n </Icon>\n );\n}\n\n/** `more-horizontal` */\nexport function MoreHorizontalIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"3.5\" cy=\"8\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"8\" cy=\"8\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"12.5\" cy=\"8\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n </Icon>\n );\n}\n\n/** `more-vertical` */\nexport function MoreVerticalIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"3.5\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"8\" cy=\"8\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"8\" cy=\"12.5\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n </Icon>\n );\n}\n\n/** `pause` */\nexport function PauseIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"3.75\" y=\"2.75\" width=\"3\" height=\"10.5\" rx=\".75\" />\n <rect x=\"9.25\" y=\"2.75\" width=\"3\" height=\"10.5\" rx=\".75\" />\n </Icon>\n );\n}\n\n/** `play` */\nexport function PlayIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M4.5 2.75v10.5L13 8z\" />\n </Icon>\n );\n}\n\n/** `plus` */\nexport function PlusIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 3v10M3 8h10\" />\n </Icon>\n );\n}\n\n/** `refresh` */\nexport function RefreshIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.75 8a5.25 5.25 0 0 1 9-3.7l1.5 1.45\" />\n <path d=\"M13.25 2.25v3.5h-3.5\" />\n <path d=\"M13.25 8a5.25 5.25 0 0 1-9 3.7l-1.5-1.45\" />\n <path d=\"M2.75 13.75v-3.5h3.5\" />\n </Icon>\n );\n}\n\n/** `search` */\nexport function SearchIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"7\" cy=\"7\" r=\"4.5\" />\n <path d=\"m10.5 10.5 3 3\" />\n </Icon>\n );\n}\n\n/** `settings` */\nexport function SettingsIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M13.01 6.42 14.67 6.94v2.12l-1.66.52-.35.84.8 1.55-1.49 1.49-1.55-.8-.84.35-.52 1.66H6.94l-.52-1.66-.84-.35-1.55.8-1.49-1.49.8-1.55-.35-.84-1.66-.52V6.94l1.66-.52.35-.84-.8-1.55 1.49-1.49 1.55.8.84-.35.52-1.66h2.12l.52 1.66.84.35 1.55-.8 1.49 1.49-.8 1.55z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2.25\" />\n </Icon>\n );\n}\n\n/** `star` */\nexport function StarIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m8 2.25 1.8 3.8 4.2.55-3.1 2.9.8 4.15L8 11.6l-3.7 2.05.8-4.15L2 6.6l4.2-.55z\" />\n </Icon>\n );\n}\n\n/** `sun` */\nexport function SunIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"3\" />\n <path d=\"M8 1.75v1.5M8 12.75v1.5M1.75 8h1.5M12.75 8h1.5M3.58 3.58l1.06 1.06M11.36 11.36l1.06 1.06M3.58 12.42l1.06-1.06M11.36 4.64l1.06-1.06\" />\n </Icon>\n );\n}\n\n/** `thumbs-down` */\nexport function ThumbsDownIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M5 2.5H3a.5.5 0 0 0-.5.5v5.5a.5.5 0 0 0 .5.5h2\" />\n <path d=\"M5 9l2.5 4.5a1.5 1.5 0 0 0 1.5-1.5V9.5h3.25a1.25 1.25 0 0 0 1.23-1.45l-.9-5a1.25 1.25 0 0 0-1.23-1.05H5z\" />\n </Icon>\n );\n}\n\n/** `thumbs-up` */\nexport function ThumbsUpIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M5 13.5H3a.5.5 0 0 1-.5-.5V7.5A.5.5 0 0 1 3 7h2\" />\n <path d=\"M5 7l2.5-4.5a1.5 1.5 0 0 1 1.5 1.5v2.5h3.25a1.25 1.25 0 0 1 1.23 1.45l-.9 5a1.25 1.25 0 0 1-1.23 1.05H5z\" />\n </Icon>\n );\n}\n\n/** `trash` */\nexport function TrashIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.75 4.25h10.5M6.25 4.25V3a.75.75 0 0 1 .75-.75h2A.75.75 0 0 1 9.75 3v1.25\" />\n <path d=\"M4 4.25l.5 8.5a1 1 0 0 0 1 .95h5a1 1 0 0 0 1-.95l.5-8.5\" />\n <path d=\"M6.5 7v4M9.5 7v4\" />\n </Icon>\n );\n}\n\n/** `undo` */\nexport function UndoIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M3 7h7a3.5 3.5 0 0 1 0 7H6\" />\n <path d=\"M6 4 3 7l3 3\" />\n </Icon>\n );\n}\n\n/** `user` */\nexport function UserIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"5.25\" r=\"2.75\" />\n <path d=\"M2.75 13.75a5.25 5.25 0 0 1 10.5 0\" />\n </Icon>\n );\n}\n\n/** `warning` */\nexport function WarningIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 2.5 1.75 13.25h12.5z\" />\n <path d=\"M8 6.5v3M8 11.5v.01\" />\n </Icon>\n );\n}\n\n/** `x` */\nexport function XIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M4 4l8 8M12 4l-8 8\" />\n </Icon>\n );\n}\n","// Generated by scripts/build-icons.mjs from src/icons/svg/*.svg. Do not edit; add an SVG and run `pnpm build`.\n/** Every icon shipped by this package, as `<Name>Icon` components. */\nexport const iconNames = [\n 'archive',\n 'arrow-down',\n 'arrow-left',\n 'arrow-right',\n 'arrow-up',\n 'bell',\n 'briefcase',\n 'calendar',\n 'check',\n 'chevron-down',\n 'chevron-left',\n 'chevron-right',\n 'chevron-up',\n 'circle-check',\n 'circle-x',\n 'clock',\n 'copy',\n 'document',\n 'download',\n 'edit',\n 'external-link',\n 'eye',\n 'filter',\n 'flag',\n 'inbox',\n 'info',\n 'link',\n 'mail',\n 'map-pin',\n 'menu',\n 'minus',\n 'moon',\n 'more-horizontal',\n 'more-vertical',\n 'pause',\n 'play',\n 'plus',\n 'refresh',\n 'search',\n 'settings',\n 'star',\n 'sun',\n 'thumbs-down',\n 'thumbs-up',\n 'trash',\n 'undo',\n 'user',\n 'warning',\n 'x',\n] as const;\nexport type IconName = (typeof iconNames)[number];\n","import { useRender } from '@base-ui/react/use-render';\nimport type { MouseEvent, ReactNode } from 'react';\nimport { Tooltip, type TooltipSide } from '../Tooltip/Tooltip';\nimport type { ButtonSize, ButtonVariant } from '../Button/Button';\nimport { cx } from '../../utils/cx';\n\nexport type IconButtonDotTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\n\nexport interface IconButtonProps extends Omit<useRender.ComponentProps<'button'>, 'children' | 'aria-label'> {\n /** Required. The accessible name, and the tooltip text when `tooltip` is `true`. */\n label: string;\n /** The icon, usually a shipped `<Name>Icon`. It is decorative; `label` names the button. Optional only so a popup trigger can supply it through `render`. */\n children?: ReactNode | undefined;\n /** `ghost` (default) in toolbars and rows, `secondary` when it must read as a button, `primary` and `danger` rarely. */\n variant?: ButtonVariant | undefined;\n /** Square: 32, 40 or 48px. Compact density shrinks each by one step. */\n size?: ButtonSize | undefined;\n /** `true` shows `label` as a tooltip on hover and focus; a string shows that text instead. */\n tooltip?: boolean | string | undefined;\n /** Side the tooltip opens on. Default `top`. */\n tooltipSide?: TooltipSide | undefined;\n /** Fully round, for avatars and floating actions. */\n round?: boolean | undefined;\n /** Shows a spinner, sets `aria-busy` and ignores clicks. */\n loading?: boolean | undefined;\n /** A status dot in the top-left corner, ringed in `--sc-icon-button-dot-ring` (default `surface-default`). Decorative: put the status in `label` too (\"Sweeps: paused\"). */\n dot?: IconButtonDotTone | undefined;\n}\n\n/**\n * A square Button for one icon. Always named by `label`; use `tooltip` to show that name on hover.\n * Renders a `<button>` unless `render` gives another element: `render={<a href=\"/settings\" />}` or a\n * Next.js `<Link href=\"/settings\" />` makes it a link with the same look and name.\n */\nexport function IconButton({\n label,\n children,\n variant = 'ghost',\n size = 'md',\n tooltip,\n tooltipSide = 'top',\n round = false,\n loading = false,\n dot,\n type,\n className,\n onClick,\n render,\n ref,\n ...rest\n}: IconButtonProps) {\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n };\n const button = useRender({\n render,\n ref,\n defaultTagName: 'button',\n props: {\n // `type` only means something on a real button; a rendered link keeps its own attributes.\n type: render ? type : (type ?? 'button'),\n className: cx('sc-button', 'sc-icon-button', className),\n 'data-variant': variant,\n 'data-size': size,\n 'data-round': round || undefined,\n 'data-loading': loading || undefined,\n 'aria-busy': loading || undefined,\n 'aria-label': label,\n onClick: handleClick,\n ...rest,\n children: (\n <>\n <span className=\"sc-button__icon\" aria-hidden=\"true\">\n {children}\n </span>\n {loading ? <span className=\"sc-button__spinner\" aria-hidden=\"true\" /> : null}\n {dot ? <span className=\"sc-icon-button__dot\" data-tone={dot} aria-hidden=\"true\" /> : null}\n </>\n ),\n },\n });\n if (!tooltip) return button;\n return (\n <Tooltip content={tooltip === true ? label : tooltip} side={tooltipSide}>\n {button}\n </Tooltip>\n );\n}\n","import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport type { ReactElement, ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type TooltipSide = 'top' | 'bottom' | 'left' | 'right';\nexport type TooltipAlign = 'start' | 'center' | 'end';\n\nexport interface TooltipProps {\n /** The hint. Short text; never anything the user cannot do without. */\n content: ReactNode;\n /** The trigger: one element that takes a ref and spreads props, such as `IconButton`, `Button` or `Badge`. */\n children: ReactElement;\n /** Which side of the trigger the hint opens on; flips when there is no room. Default `top`. */\n side?: TooltipSide | undefined;\n /** Alignment along that side. Default `center`. */\n align?: TooltipAlign | undefined;\n /** Hover delay in ms before opening. Default 300; inside `Tooltip.Provider` sibling tooltips open instantly once one is open. */\n delay?: number | undefined;\n /** Delay in ms before closing. Default 0. */\n closeDelay?: number | undefined;\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the hint opens or closes. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /** Never opens. */\n disabled?: boolean | undefined;\n className?: string | undefined;\n}\n\n/**\n * A hint that opens on hover and keyboard focus. Supplementary only: touch devices never see it and\n * screen readers hear the trigger's own name, so the trigger must already be labelled.\n */\nfunction TooltipBase({\n content,\n children,\n side = 'top',\n align = 'center',\n delay = 300,\n closeDelay,\n open,\n defaultOpen,\n onOpenChange,\n disabled,\n className,\n}: TooltipProps) {\n return (\n <BaseTooltip.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange ? (next) => onOpenChange(next) : undefined}\n disabled={disabled}\n >\n <BaseTooltip.Trigger render={children} delay={delay} closeDelay={closeDelay} />\n <BaseTooltip.Portal>\n <BaseTooltip.Positioner side={side} align={align} sideOffset={6} className=\"sc-tooltip__positioner\">\n <BaseTooltip.Popup role=\"tooltip\" className={cx('sc-tooltip', className)}>\n <BaseTooltip.Arrow className=\"sc-tooltip__arrow\" />\n {content}\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n </BaseTooltip.Portal>\n </BaseTooltip.Root>\n );\n}\n\n/** Wrap a toolbar or a row of icon buttons so moving between them skips the delay. */\nconst Provider = BaseTooltip.Provider;\n\nexport const Tooltip = Object.assign(TooltipBase, { Provider });\n","import { Menu as BaseMenu } from '@base-ui/react/menu';\nimport type { ReactNode } from 'react';\nimport { Button } from '../Button/Button';\nimport { CheckIcon, ChevronDownIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type MenuSide = 'top' | 'bottom' | 'left' | 'right';\nexport type MenuAlign = 'start' | 'center' | 'end';\nexport type MenuItemTone = 'default' | 'danger';\n\nexport interface MenuRootProps {\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the menu opens or closes. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /** Disables the trigger. */\n disabled?: boolean | undefined;\n /** Default `true`: the page behind the menu is inert until it closes. */\n modal?: boolean | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Owns the open state. Wrap a `Menu.Trigger` and a `Menu.Content`. */\nfunction Root({ open, defaultOpen, onOpenChange, disabled, modal = true, children }: MenuRootProps) {\n return (\n <BaseMenu.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange ? (next) => onOpenChange(next) : undefined}\n disabled={disabled}\n modal={modal}\n >\n {children}\n </BaseMenu.Root>\n );\n}\n\nexport interface MenuTriggerProps extends Omit<BaseMenu.Trigger.Props, 'className'> {\n className?: string | undefined;\n}\n\n/**\n * Opens the menu. With no `render` it is a secondary Button with a chevron; pass any Button or\n * IconButton through `render`: `<Menu.Trigger render={<IconButton label=\"More\" />}><MoreHorizontalIcon /></Menu.Trigger>`.\n */\nfunction Trigger({ render, className, children, ...rest }: MenuTriggerProps) {\n return (\n <BaseMenu.Trigger\n render={render ?? <Button variant=\"secondary\" iconEnd={<ChevronDownIcon />} className={className} />}\n className={render ? className : undefined}\n {...rest}\n >\n {children}\n </BaseMenu.Trigger>\n );\n}\n\nexport interface MenuContentProps extends Omit<BaseMenu.Popup.Props, 'className'> {\n /** Side of the trigger the menu opens on; flips when there is no room. Default `bottom`. */\n side?: MenuSide | undefined;\n /** Alignment along that side. Default `start`. */\n align?: MenuAlign | undefined;\n /** Distance from the trigger in px. Default 4. */\n sideOffset?: number | undefined;\n className?: string | undefined;\n}\n\n/** Portal, positioner and the popup. Items go inside. */\nfunction Content({\n side = 'bottom',\n align = 'start',\n sideOffset = 4,\n className,\n children,\n ...rest\n}: MenuContentProps) {\n return (\n <BaseMenu.Portal>\n <BaseMenu.Positioner side={side} align={align} sideOffset={sideOffset} className=\"sc-menu__positioner\">\n <BaseMenu.Popup className={cx('sc-menu', className)} {...rest}>\n {children}\n </BaseMenu.Popup>\n </BaseMenu.Positioner>\n </BaseMenu.Portal>\n );\n}\n\ninterface ItemSlots {\n /** A 16px icon before the label. */\n icon?: ReactNode | undefined;\n /** Muted text at the end: a shortcut (`<Kbd>`) or a count. */\n trailing?: ReactNode | undefined;\n /** `danger` for destructive actions; put them last, after a separator. */\n tone?: MenuItemTone | undefined;\n}\n\nfunction ItemBody({\n icon,\n trailing,\n children,\n}: {\n icon?: ReactNode;\n trailing?: ReactNode;\n children?: ReactNode;\n}) {\n return (\n <>\n <span className=\"sc-menu__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n <span className=\"sc-menu__label\">{children}</span>\n {trailing !== undefined ? <span className=\"sc-menu__trailing\">{trailing}</span> : null}\n </>\n );\n}\n\nexport interface MenuItemProps extends Omit<BaseMenu.Item.Props, 'className'>, ItemSlots {\n className?: string | undefined;\n}\n\n/** One action. Closes the menu when activated. */\nfunction Item({ icon, trailing, tone = 'default', className, children, ...rest }: MenuItemProps) {\n return (\n <BaseMenu.Item className={cx('sc-menu__item', className)} data-tone={tone} {...rest}>\n <ItemBody icon={icon} trailing={trailing}>\n {children}\n </ItemBody>\n </BaseMenu.Item>\n );\n}\n\nexport interface MenuLinkItemProps extends Omit<BaseMenu.LinkItem.Props, 'className'>, ItemSlots {\n className?: string | undefined;\n}\n\n/** An item that navigates: renders an `<a href>`. */\nfunction LinkItem({ icon, trailing, tone = 'default', className, children, ...rest }: MenuLinkItemProps) {\n return (\n <BaseMenu.LinkItem className={cx('sc-menu__item', className)} data-tone={tone} {...rest}>\n <ItemBody icon={icon} trailing={trailing}>\n {children}\n </ItemBody>\n </BaseMenu.LinkItem>\n );\n}\n\nexport interface MenuCheckboxItemProps extends Omit<\n BaseMenu.CheckboxItem.Props,\n 'className' | 'onCheckedChange'\n> {\n /** Called with the next checked state. */\n onCheckedChange?: ((checked: boolean) => void) | undefined;\n /** Muted text at the end. */\n trailing?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** A toggle. Stays open when activated so several can be flipped at once; pass `closeOnClick` to close. */\nfunction CheckboxItem({ trailing, onCheckedChange, className, children, ...rest }: MenuCheckboxItemProps) {\n return (\n <BaseMenu.CheckboxItem\n className={cx('sc-menu__item', className)}\n onCheckedChange={onCheckedChange ? (checked) => onCheckedChange(checked) : undefined}\n {...rest}\n >\n <BaseMenu.CheckboxItemIndicator className=\"sc-menu__icon sc-menu__indicator\">\n <CheckIcon size=\"sm\" />\n </BaseMenu.CheckboxItemIndicator>\n <span className=\"sc-menu__label\">{children}</span>\n {trailing !== undefined ? <span className=\"sc-menu__trailing\">{trailing}</span> : null}\n </BaseMenu.CheckboxItem>\n );\n}\n\nexport interface MenuRadioGroupProps<Value extends string = string> extends Omit<\n BaseMenu.RadioGroup.Props,\n 'className' | 'value' | 'defaultValue' | 'onValueChange'\n> {\n /** Controlled selected value. */\n value?: Value | undefined;\n /** Initial value when uncontrolled. */\n defaultValue?: Value | undefined;\n /** Called with the next selected value. */\n onValueChange?: ((value: Value) => void) | undefined;\n /** A heading for the group, rendered above the items. */\n label?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** A set of `Menu.RadioItem`s where exactly one is selected. */\nfunction RadioGroup<Value extends string = string>({\n label,\n onValueChange,\n className,\n children,\n ...rest\n}: MenuRadioGroupProps<Value>) {\n return (\n <BaseMenu.RadioGroup\n className={cx('sc-menu__group', className)}\n onValueChange={onValueChange ? (value: Value) => onValueChange(value) : undefined}\n {...rest}\n >\n {label !== undefined ? (\n <BaseMenu.GroupLabel className=\"sc-menu__group-label\">{label}</BaseMenu.GroupLabel>\n ) : null}\n {children}\n </BaseMenu.RadioGroup>\n );\n}\n\nexport interface MenuRadioItemProps extends Omit<BaseMenu.RadioItem.Props, 'className' | 'value'> {\n value: string;\n /** Muted text at the end. */\n trailing?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** One choice in a `Menu.RadioGroup`. Stays open when chosen; pass `closeOnClick` to close. */\nfunction RadioItem({ trailing, className, children, ...rest }: MenuRadioItemProps) {\n return (\n <BaseMenu.RadioItem className={cx('sc-menu__item', className)} {...rest}>\n <BaseMenu.RadioItemIndicator className=\"sc-menu__icon sc-menu__indicator\">\n <span className=\"sc-menu__radio-dot\" />\n </BaseMenu.RadioItemIndicator>\n <span className=\"sc-menu__label\">{children}</span>\n {trailing !== undefined ? <span className=\"sc-menu__trailing\">{trailing}</span> : null}\n </BaseMenu.RadioItem>\n );\n}\n\nexport interface MenuGroupProps extends Omit<BaseMenu.Group.Props, 'className'> {\n /** A heading for the group, rendered above the items. */\n label?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** Labels a run of items. */\nfunction Group({ label, className, children, ...rest }: MenuGroupProps) {\n return (\n <BaseMenu.Group className={cx('sc-menu__group', className)} {...rest}>\n {label !== undefined ? (\n <BaseMenu.GroupLabel className=\"sc-menu__group-label\">{label}</BaseMenu.GroupLabel>\n ) : null}\n {children}\n </BaseMenu.Group>\n );\n}\n\nexport interface MenuSeparatorProps extends Omit<BaseMenu.Separator.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** A hairline between runs of items. */\nfunction Separator({ className, ...rest }: MenuSeparatorProps) {\n return <BaseMenu.Separator className={cx('sc-menu__separator', className)} {...rest} />;\n}\n\n/** A dropdown of actions on a trigger, with full keyboard support. Built on Base UI's Menu. */\nexport const Menu = {\n Root,\n Trigger,\n Content,\n Item,\n LinkItem,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n Group,\n Separator,\n};\n","import { Field } from '@base-ui/react/field';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { FieldShell, type FieldProps } from '../Field/FieldShell';\n\nexport interface InputProps\n extends\n Omit<ComponentPropsWithRef<'input'>, 'size' | 'name' | 'disabled' | 'required' | 'className'>,\n FieldProps {\n /** A 16px icon inside the start edge, for search and URL fields. Decorative. */\n iconStart?: ReactNode | undefined;\n /** A 16px icon inside the end edge. Decorative; use an `IconButton` outside the field for an action. */\n iconEnd?: ReactNode | undefined;\n /** Called with the string value on every change, beside the native `onChange`. */\n onValueChange?: ((value: string) => void) | undefined;\n}\n\n/**\n * A labelled single-line text field. Renders a native `<input>` inside Base UI's Field, so every native\n * attribute passes through: `type=\"date\" | \"time\" | \"number\" | \"url\" | …` keep the same height and\n * `iconStart` slot; `list=\"id\"` with a `<datalist>` beside it gives native suggestions. Date and time\n * fields show the browser's picker at the end edge, so leave `iconEnd` off those.\n */\nexport function Input({\n label,\n hideLabel,\n description,\n error,\n invalid,\n required,\n disabled,\n name,\n size,\n className,\n iconStart,\n iconEnd,\n onValueChange,\n ...rest\n}: InputProps) {\n return (\n <FieldShell\n label={label}\n hideLabel={hideLabel}\n description={description}\n error={error}\n invalid={invalid}\n required={required}\n disabled={disabled}\n name={name}\n size={size}\n className={className}\n >\n <span\n className=\"sc-input-wrap\"\n data-icon-start={iconStart ? '' : undefined}\n data-icon-end={iconEnd ? '' : undefined}\n >\n {iconStart ? (\n <span className=\"sc-input__icon\" data-side=\"start\" aria-hidden=\"true\">\n {iconStart}\n </span>\n ) : null}\n <Field.Control\n className=\"sc-input\"\n required={required}\n onValueChange={onValueChange ? (value) => onValueChange(value) : undefined}\n {...rest}\n />\n {iconEnd ? (\n <span className=\"sc-input__icon\" data-side=\"end\" aria-hidden=\"true\">\n {iconEnd}\n </span>\n ) : null}\n </span>\n </FieldShell>\n );\n}\n","import { Field } from '@base-ui/react/field';\nimport type { ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type ControlSize = 'sm' | 'md' | 'lg';\n\n/** Props shared by every labelled form control: Input, Textarea, Select. */\nexport interface FieldProps {\n /** Required. The visible label; use `hideLabel` to keep it for assistive tech only. */\n label: ReactNode;\n /** Visually hides the label (a search box with an icon, a table filter). */\n hideLabel?: boolean | undefined;\n /** Help text under the control, wired with `aria-describedby`. */\n description?: ReactNode | undefined;\n /** The error message. When given the control is invalid and the message is announced. */\n error?: ReactNode | undefined;\n /** Marks the control invalid without a message. */\n invalid?: boolean | undefined;\n /** Shows a mark after the label and sets the native `required`. */\n required?: boolean | undefined;\n disabled?: boolean | undefined;\n /** Identifies the value when a form is submitted. */\n name?: string | undefined;\n /** Control height: 32, 40 (default) or 48px. Compact density shrinks each by one step. */\n size?: ControlSize | undefined;\n /** Class on the wrapper, not the control. */\n className?: string | undefined;\n}\n\ninterface FieldShellProps extends FieldProps {\n children: ReactNode;\n}\n\n/** Internal: Field.Root with label, control slot, description and error in the right order and ARIA. */\nexport function FieldShell({\n label,\n hideLabel = false,\n description,\n error,\n invalid = false,\n required = false,\n disabled = false,\n name,\n size = 'md',\n className,\n children,\n}: FieldShellProps) {\n return (\n <Field.Root\n className={cx('sc-field', className)}\n name={name}\n disabled={disabled}\n invalid={invalid || error != null}\n data-size={size}\n >\n <Field.Label className={cx('sc-field__label', hideLabel && 'sc-visually-hidden')}>\n {label}\n {required ? (\n <span className=\"sc-field__required\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </Field.Label>\n {children}\n {description != null ? (\n <Field.Description className=\"sc-field__description\">{description}</Field.Description>\n ) : null}\n {error != null ? (\n <Field.Error className=\"sc-field__error\" match>\n {error}\n </Field.Error>\n ) : null}\n </Field.Root>\n );\n}\n","import { Field } from '@base-ui/react/field';\nimport type { ComponentPropsWithRef } from 'react';\nimport { FieldShell, type FieldProps } from '../Field/FieldShell';\n\nexport type TextareaVariant = 'default' | 'code';\n\nexport interface TextareaProps\n extends\n Omit<ComponentPropsWithRef<'textarea'>, 'name' | 'disabled' | 'required' | 'className'>,\n Omit<FieldProps, 'size'> {\n /** Visible lines. Default 3. */\n rows?: number | undefined;\n /** `vertical` (default) lets the user drag it taller; `none` fixes the height. */\n resize?: 'vertical' | 'none' | undefined;\n /**\n * `code` for Markdown, JSON and other source: monospace, `tab-size: 2`, spellcheck, autocorrect and\n * autocapitalize off. Add the native `wrap=\"off\"` to keep long lines on one line and scroll sideways.\n */\n variant?: TextareaVariant | undefined;\n /** Called with the string value on every change, beside the native `onChange`. */\n onValueChange?: ((value: string) => void) | undefined;\n}\n\n/** A labelled multi-line text field. Renders a native `<textarea>` inside Base UI's Field. */\nexport function Textarea({\n label,\n hideLabel,\n description,\n error,\n invalid,\n required,\n disabled,\n name,\n className,\n rows = 3,\n resize = 'vertical',\n variant = 'default',\n onValueChange,\n spellCheck,\n autoCorrect,\n autoCapitalize,\n ...rest\n}: TextareaProps) {\n const code = variant === 'code';\n return (\n <FieldShell\n label={label}\n hideLabel={hideLabel}\n description={description}\n error={error}\n invalid={invalid}\n required={required}\n disabled={disabled}\n name={name}\n className={className}\n >\n <Field.Control\n render={\n <textarea\n rows={rows}\n spellCheck={spellCheck ?? (code ? false : undefined)}\n autoCorrect={autoCorrect ?? (code ? 'off' : undefined)}\n autoCapitalize={autoCapitalize ?? (code ? 'off' : undefined)}\n {...rest}\n />\n }\n className=\"sc-input sc-textarea\"\n data-resize={resize}\n data-variant={code ? 'code' : undefined}\n required={required}\n onValueChange={onValueChange ? (value) => onValueChange(value) : undefined}\n />\n </FieldShell>\n );\n}\n","import { Select as BaseSelect } from '@base-ui/react/select';\nimport { useState, type KeyboardEvent, type ReactNode } from 'react';\nimport { FieldShell, type FieldProps } from '../Field/FieldShell';\nimport { CheckIcon, ChevronDownIcon, XIcon } from '../../icons/icons.gen';\n\nexport interface SelectOption<Value extends string = string> {\n value: Value;\n label: ReactNode;\n disabled?: boolean | undefined;\n}\n\nexport interface SelectGroup<Value extends string = string> {\n /** Heading shown above the group's options. */\n label: ReactNode;\n options: SelectOption<Value>[];\n}\n\nexport interface SelectProps<Value extends string = string> extends FieldProps {\n /** Flat options, or groups of options with a heading. */\n options: Array<SelectOption<Value> | SelectGroup<Value>>;\n /** Controlled value; `null` for none, which shows `placeholder`. No sentinel option needed. */\n value?: Value | null | undefined;\n /** Initial value when uncontrolled; `null` (default) for none. */\n defaultValue?: Value | null | undefined;\n /** Called with the chosen value, or `null` when the field is cleared. */\n onValueChange?: ((value: Value | null) => void) | undefined;\n /** Shown in the trigger while nothing is chosen. */\n placeholder?: ReactNode | undefined;\n /**\n * Shows an × beside the chevron while a value is chosen; pressing it, or Backspace/Delete on the\n * focused trigger, sets the value to `null` and calls `onValueChange(null)`.\n */\n clearable?: boolean | undefined;\n /** Accessible name of the clear button. Default \"Clear\". */\n clearLabel?: string | undefined;\n /** Prevents choosing a different option. */\n readOnly?: boolean | undefined;\n /** Stretches the trigger to the container. */\n fullWidth?: boolean | undefined;\n id?: string | undefined;\n}\n\nfunction isGroup<V extends string>(entry: SelectOption<V> | SelectGroup<V>): entry is SelectGroup<V> {\n return 'options' in entry;\n}\n\nfunction Option<V extends string>({ option }: { option: SelectOption<V> }) {\n return (\n <BaseSelect.Item value={option.value} disabled={option.disabled} className=\"sc-select__item\">\n <BaseSelect.ItemIndicator className=\"sc-select__indicator\">\n <CheckIcon size=\"sm\" />\n </BaseSelect.ItemIndicator>\n <BaseSelect.ItemText className=\"sc-select__item-text\">{option.label}</BaseSelect.ItemText>\n </BaseSelect.Item>\n );\n}\n\n/**\n * A labelled single-choice dropdown. Built on Base UI's Select so the list is styled and keyboard\n * complete; submits like a native select through `name`.\n */\nexport function Select<Value extends string = string>({\n label,\n hideLabel,\n description,\n error,\n invalid,\n required,\n disabled,\n name,\n size = 'md',\n className,\n options,\n value,\n defaultValue,\n onValueChange,\n placeholder = 'Choose…',\n clearable = false,\n clearLabel = 'Clear',\n readOnly,\n fullWidth = false,\n id,\n}: SelectProps<Value>) {\n const items = options.flatMap((entry) => (isGroup(entry) ? entry.options : [entry]));\n const [internal, setInternal] = useState<Value | null>(defaultValue ?? null);\n const controlled = value !== undefined;\n const current = controlled ? value : internal;\n const setValue = (next: Value | null) => {\n if (!controlled) setInternal(next);\n onValueChange?.(next);\n };\n const canClear = clearable && current != null && !disabled && !readOnly;\n const onTriggerKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (canClear && (event.key === 'Backspace' || event.key === 'Delete')) {\n event.preventDefault();\n setValue(null);\n }\n };\n return (\n <FieldShell\n label={label}\n hideLabel={hideLabel}\n description={description}\n error={error}\n invalid={invalid}\n required={required}\n disabled={disabled}\n name={name}\n size={size}\n className={className}\n >\n <BaseSelect.Root<Value | null>\n items={items}\n value={current}\n onValueChange={(next) => setValue(next)}\n disabled={disabled}\n required={required}\n readOnly={readOnly}\n >\n <span className=\"sc-select__wrap\" data-full-width={fullWidth || undefined}>\n <BaseSelect.Trigger\n id={id}\n className=\"sc-select\"\n data-size={size}\n data-full-width={fullWidth || undefined}\n data-clearable={canClear || undefined}\n onKeyDown={onTriggerKeyDown}\n >\n <BaseSelect.Value className=\"sc-select__value\" placeholder={placeholder} />\n <BaseSelect.Icon className=\"sc-select__icon\">\n <ChevronDownIcon />\n </BaseSelect.Icon>\n </BaseSelect.Trigger>\n {canClear ? (\n <button\n type=\"button\"\n className=\"sc-select__clear\"\n aria-label={clearLabel}\n onClick={() => setValue(null)}\n >\n <XIcon size=\"sm\" />\n </button>\n ) : null}\n </span>\n <BaseSelect.Portal>\n <BaseSelect.Positioner\n className=\"sc-select__positioner\"\n sideOffset={4}\n alignItemWithTrigger={false}\n >\n <BaseSelect.Popup className=\"sc-select__popup\">\n <BaseSelect.List>\n {options.map((entry, i) =>\n isGroup(entry) ? (\n <BaseSelect.Group key={i} className=\"sc-select__group\">\n <BaseSelect.GroupLabel className=\"sc-select__group-label\">\n {entry.label}\n </BaseSelect.GroupLabel>\n {entry.options.map((option) => (\n <Option key={option.value} option={option} />\n ))}\n </BaseSelect.Group>\n ) : (\n <Option key={entry.value} option={entry} />\n ),\n )}\n </BaseSelect.List>\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n </BaseSelect.Root>\n </FieldShell>\n );\n}\n","import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport { useId, type ReactNode } from 'react';\nimport { CheckIcon, MinusIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport interface CheckboxProps extends Omit<\n BaseCheckbox.Root.Props,\n 'className' | 'onCheckedChange' | 'render' | 'children'\n> {\n /** Required. The visible label; clicking it toggles the box. */\n label: ReactNode;\n /** Help text under the label, wired with `aria-describedby`. */\n description?: ReactNode | undefined;\n /** Called with the next checked state. */\n onCheckedChange?: ((checked: boolean) => void) | undefined;\n className?: string | undefined;\n}\n\n/** A labelled checkbox. `indeterminate` shows a dash for \"some of these\". Built on Base UI's Checkbox. */\nexport function Checkbox({\n label,\n description,\n onCheckedChange,\n className,\n disabled,\n ...rest\n}: CheckboxProps) {\n const descriptionId = useId();\n return (\n <div className={cx('sc-choice', className)} data-disabled={disabled || undefined}>\n <label className=\"sc-choice__control\">\n <BaseCheckbox.Root\n className=\"sc-checkbox\"\n disabled={disabled}\n aria-describedby={description != null ? descriptionId : undefined}\n onCheckedChange={onCheckedChange ? (checked) => onCheckedChange(checked) : undefined}\n {...rest}\n >\n <BaseCheckbox.Indicator className=\"sc-checkbox__indicator\">\n <CheckIcon size=\"sm\" className=\"sc-checkbox__check\" />\n <MinusIcon size=\"sm\" className=\"sc-checkbox__dash\" />\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n <span className=\"sc-choice__label\">{label}</span>\n </label>\n {description != null ? (\n <span className=\"sc-choice__description\" id={descriptionId}>\n {description}\n </span>\n ) : null}\n </div>\n );\n}\n","import { Switch as BaseSwitch } from '@base-ui/react/switch';\nimport { useId, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport interface SwitchProps extends Omit<\n BaseSwitch.Root.Props,\n 'className' | 'onCheckedChange' | 'render' | 'children'\n> {\n /** Required. The visible label; clicking it flips the switch. */\n label: ReactNode;\n /** Help text under the label, wired with `aria-describedby`. */\n description?: ReactNode | undefined;\n /** Called with the next checked state. */\n onCheckedChange?: ((checked: boolean) => void) | undefined;\n /** `end` (default) puts the switch before the label; `start` puts the label first and the switch at the row's end. */\n labelPosition?: 'start' | 'end' | undefined;\n className?: string | undefined;\n}\n\n/** A labelled on/off switch for settings that apply at once. Built on Base UI's Switch. */\nexport function Switch({\n label,\n description,\n onCheckedChange,\n labelPosition = 'end',\n className,\n disabled,\n ...rest\n}: SwitchProps) {\n const descriptionId = useId();\n return (\n <div\n className={cx('sc-choice', className)}\n data-disabled={disabled || undefined}\n data-label-position={labelPosition}\n >\n <label className=\"sc-choice__control\">\n <BaseSwitch.Root\n className=\"sc-switch\"\n disabled={disabled}\n aria-describedby={description != null ? descriptionId : undefined}\n onCheckedChange={onCheckedChange ? (checked) => onCheckedChange(checked) : undefined}\n {...rest}\n >\n <BaseSwitch.Thumb className=\"sc-switch__thumb\" />\n </BaseSwitch.Root>\n <span className=\"sc-choice__label\">{label}</span>\n </label>\n {description != null ? (\n <span className=\"sc-choice__description\" id={descriptionId}>\n {description}\n </span>\n ) : null}\n </div>\n );\n}\n","import { Tabs as BaseTabs } from '@base-ui/react/tabs';\nimport type { ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport interface TabsRootProps extends Omit<\n BaseTabs.Root.Props,\n 'className' | 'value' | 'defaultValue' | 'onValueChange'\n> {\n /** Controlled active tab. */\n value?: string | undefined;\n /** Initial active tab when uncontrolled. Defaults to the first enabled tab. */\n defaultValue?: string | undefined;\n /** Called with the value of the newly active tab. */\n onValueChange?: ((value: string) => void) | undefined;\n className?: string | undefined;\n}\n\n/** Owns the active tab. Wrap a `Tabs.List` and one `Tabs.Panel` per tab. */\nfunction Root({ className, onValueChange, ...rest }: TabsRootProps) {\n return (\n <BaseTabs.Root\n className={cx('sc-tabs', className)}\n onValueChange={onValueChange ? (value) => onValueChange(String(value)) : undefined}\n {...rest}\n />\n );\n}\n\nexport type TabsListVariant = 'line' | 'segmented';\n\nexport interface TabsListProps extends Omit<BaseTabs.List.Props, 'className'> {\n /** Names the set of tabs for assistive tech: \"Inbox sections\". */\n 'aria-label': string;\n /** Tabs share the width equally instead of sizing to their labels. */\n fill?: boolean | undefined;\n /** `line` (default): an accent underline on the active tab. `segmented`: a quiet segmented control, a sunken track with the active tab raised and no accent colour. */\n variant?: TabsListVariant | undefined;\n className?: string | undefined;\n}\n\n/** The row of tabs with the sliding indicator. Arrow keys move between tabs; Enter or Space activates. */\nfunction List({ fill = false, variant = 'line', className, children, ...rest }: TabsListProps) {\n return (\n <BaseTabs.List\n className={cx('sc-tabs__list', className)}\n data-fill={fill || undefined}\n data-variant={variant}\n {...rest}\n >\n {children}\n <BaseTabs.Indicator className=\"sc-tabs__indicator\" />\n </BaseTabs.List>\n );\n}\n\nexport interface TabsTabProps extends Omit<BaseTabs.Tab.Props, 'className' | 'value'> {\n value: string;\n /** A 16px icon before the label. */\n icon?: ReactNode | undefined;\n /** A count after the label, muted: `12`. */\n count?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** One tab. */\nfunction Tab({ icon, count, className, children, ...rest }: TabsTabProps) {\n return (\n <BaseTabs.Tab className={cx('sc-tabs__tab', className)} {...rest}>\n {icon ? (\n <span className=\"sc-tabs__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n <span className=\"sc-tabs__label\">{children}</span>\n {count != null ? (\n <>\n {' '}\n <span className=\"sc-tabs__count\">{count}</span>\n </>\n ) : null}\n </BaseTabs.Tab>\n );\n}\n\nexport interface TabsPanelProps extends Omit<BaseTabs.Panel.Props, 'className' | 'value'> {\n value: string;\n className?: string | undefined;\n}\n\n/** The content of one tab. Unmounted while hidden unless `keepMounted`. */\nfunction Panel({ className, ...rest }: TabsPanelProps) {\n return <BaseTabs.Panel className={cx('sc-tabs__panel', className)} {...rest} />;\n}\n\n/** Switches between sections of one view. Built on Base UI's Tabs. */\nexport const Tabs = { Root, List, Tab, Panel };\n","import { Toolbar as BaseToolbar } from '@base-ui/react/toolbar';\nimport type { SpacingSize } from '../../types';\nimport { cx } from '../../utils/cx';\n\nexport interface ToolbarRootProps extends Omit<BaseToolbar.Root.Props, 'className'> {\n /** Required. Names the toolbar for assistive tech: \"Inbox actions\". */\n 'aria-label': string;\n /** Wraps onto new lines on narrow widths (default). `false` keeps one line that overflows. */\n wrap?: boolean | undefined;\n /** Gap between items and groups. Default `xs`. */\n gap?: SpacingSize | undefined;\n className?: string | undefined;\n}\n\n/**\n * A row of controls with one tab stop: Tab enters, arrow keys move between items, Tab leaves. Put every\n * control through `Toolbar.Button` (`render={<IconButton … />}`) so it joins the roving focus.\n */\nfunction Root({ wrap = true, gap = 'xs', className, ...rest }: ToolbarRootProps) {\n return (\n <BaseToolbar.Root\n className={cx('sc-toolbar', className)}\n data-wrap={wrap || undefined}\n data-gap={gap}\n {...rest}\n />\n );\n}\n\nexport interface ToolbarGroupProps extends Omit<BaseToolbar.Group.Props, 'className'> {\n /** Names the group: \"Playback\". */\n 'aria-label'?: string | undefined;\n /** Gap inside the group. Default `2xs`. */\n gap?: SpacingSize | undefined;\n className?: string | undefined;\n}\n\n/** Keeps related controls together with a tighter gap. */\nfunction Group({ gap = '2xs', className, ...rest }: ToolbarGroupProps) {\n return <BaseToolbar.Group className={cx('sc-toolbar__group', className)} data-gap={gap} {...rest} />;\n}\n\nexport interface ToolbarSeparatorProps extends Omit<BaseToolbar.Separator.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** A hairline between groups. */\nfunction Separator({ className, ...rest }: ToolbarSeparatorProps) {\n return <BaseToolbar.Separator className={cx('sc-toolbar__separator', className)} {...rest} />;\n}\n\nexport interface ToolbarButtonProps extends Omit<BaseToolbar.Button.Props, 'className'> {\n className?: string | undefined;\n}\n\n/**\n * Joins a control to the toolbar's keyboard navigation. Pass the real control through `render`:\n * `<Toolbar.Button render={<IconButton label=\"Pause\" tooltip />}><PauseIcon /></Toolbar.Button>`.\n * For a Menu, nest: `<Toolbar.Button render={<Menu.Trigger render={<IconButton … />} />}>`.\n */\nconst Button = BaseToolbar.Button;\n\nexport interface ToolbarLinkProps extends Omit<BaseToolbar.Link.Props, 'className'> {\n className?: string | undefined;\n}\n\n/**\n * A link that joins the toolbar's keyboard navigation. With no `render` it is a plain `<a>`; for an\n * icon link pass an IconButton that itself renders the anchor (or a Next.js `Link`):\n * `<Toolbar.Link render={<IconButton label=\"Settings\" tooltip render={<a href=\"/settings\" />} />}><SettingsIcon /></Toolbar.Link>`.\n */\nconst Link = BaseToolbar.Link;\n\nexport interface ToolbarSpacerProps {\n className?: string | undefined;\n}\n\n/** Pushes what follows to the far end. */\nfunction Spacer({ className }: ToolbarSpacerProps) {\n return <div className={cx('sc-toolbar__spacer', className)} aria-hidden=\"true\" />;\n}\n\n/** A horizontal container of controls. Built on Base UI's Toolbar. */\nexport const Toolbar = { Root, Group, Separator, Button, Link, Spacer };\n","import { useState, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { IconButton } from '../IconButton/IconButton';\nimport { CircleCheckIcon, CircleXIcon, InfoIcon, WarningIcon, XIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type BannerTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral';\n\nexport interface BannerProps extends ComponentPropsWithRef<'div'> {\n /** Colour and default icon. `warning` and `danger` are announced as alerts; the rest as status. */\n tone?: BannerTone | undefined;\n /** Replaces the tone's icon; `false` removes it. */\n icon?: ReactNode | false | undefined;\n /** One Button, usually `variant=\"ghost\" size=\"sm\"`, at the end of the strip. */\n action?: ReactNode | undefined;\n /** Shows a close button that hides the banner. */\n dismissible?: boolean | undefined;\n /** Called when the close button is pressed. */\n onDismiss?: (() => void) | undefined;\n /** Controlled visibility when dismissible. */\n open?: boolean | undefined;\n /** Accessible name of the close button. Default \"Dismiss\". */\n dismissLabel?: string | undefined;\n}\n\nconst toneIcons: Record<BannerTone, ReactNode> = {\n info: <InfoIcon />,\n success: <CircleCheckIcon />,\n warning: <WarningIcon />,\n danger: <CircleXIcon />,\n neutral: null,\n};\n\n/** A single-line status strip across the top of a view: paused, offline, \"3 new since you looked\". */\nexport function Banner({\n tone = 'info',\n icon,\n action,\n dismissible = false,\n onDismiss,\n open,\n dismissLabel = 'Dismiss',\n role,\n className,\n children,\n ...rest\n}: BannerProps) {\n const [dismissed, setDismissed] = useState(false);\n const visible = open ?? !dismissed;\n if (!visible) return null;\n const glyph = icon === false ? null : (icon ?? toneIcons[tone]);\n return (\n <div\n role={role ?? (tone === 'warning' || tone === 'danger' ? 'alert' : 'status')}\n className={cx('sc-banner', className)}\n data-tone={tone}\n {...rest}\n >\n {glyph ? (\n <span className=\"sc-banner__icon\" aria-hidden=\"true\">\n {glyph}\n </span>\n ) : null}\n <div className=\"sc-banner__body\">{children}</div>\n {action ? <div className=\"sc-banner__action\">{action}</div> : null}\n {dismissible ? (\n <IconButton\n label={dismissLabel}\n size=\"sm\"\n className=\"sc-banner__dismiss\"\n onClick={() => {\n setDismissed(true);\n onDismiss?.();\n }}\n >\n <XIcon />\n </IconButton>\n ) : null}\n </div>\n );\n}\n","import type { ComponentPropsWithRef } from 'react';\nimport type { IconSize } from '../Icon/Icon';\nimport { cx } from '../../utils/cx';\n\nexport interface SpinnerProps extends ComponentPropsWithRef<'span'> {\n /** `xs` 12, `sm` 14, `md` 16 (default), `lg` 20, `xl` 24, or `em` to follow the font size. */\n size?: IconSize | undefined;\n /** What is happening, announced once as a status. Default \"Loading\". */\n label?: string | undefined;\n /** Hides it from assistive tech when the text beside it already says what is happening. */\n decorative?: boolean | undefined;\n}\n\n/** An indeterminate activity indicator in `currentColor`. Slows down, never stops, under reduced motion. */\nexport function Spinner({\n size = 'md',\n label = 'Loading',\n decorative = false,\n className,\n ...rest\n}: SpinnerProps) {\n return (\n <span\n className={cx('sc-spinner', className)}\n data-size={size}\n role={decorative ? undefined : 'status'}\n aria-label={decorative ? undefined : label}\n aria-hidden={decorative || undefined}\n {...rest}\n >\n <svg\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <circle className=\"sc-spinner__track\" cx=\"8\" cy=\"8\" r=\"6.25\" />\n <circle className=\"sc-spinner__arc\" cx=\"8\" cy=\"8\" r=\"6.25\" strokeLinecap=\"round\" />\n </svg>\n </span>\n );\n}\n","import { Progress as BaseProgress } from '@base-ui/react/progress';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { Spinner } from '../Spinner/Spinner';\nimport { cx } from '../../utils/cx';\n\nexport type ProgressTone = 'accent' | 'success' | 'warning' | 'danger' | 'neutral';\nexport type ProgressSize = 'sm' | 'md';\nexport type ProgressVariant = 'bar' | 'inline';\n\nexport interface ProgressProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {\n /** Current value. Omit or pass `null` while the amount of work is unknown (indeterminate). */\n value?: number | null | undefined;\n /** Default 100. Pass the total so `value` can be a count: `value={460} max={859}`. */\n max?: number | undefined;\n /** Default 0. */\n min?: number | undefined;\n /** What is happening: \"Verifying\". Visible, and names the bar for assistive tech. */\n label?: ReactNode | undefined;\n /** Detail at the end: \"460 of 859 · 3 min elapsed\". A string also becomes `aria-valuetext`. */\n valueText?: ReactNode | undefined;\n /** Shows the percentage when `valueText` is not given. */\n showValue?: boolean | undefined;\n /** Fill colour. Default `accent`; `success` when done, `danger` when it failed. */\n tone?: ProgressTone | undefined;\n /** Bar thickness: `sm` 4px, `md` 8px (default). Inline uses the text size. */\n size?: ProgressSize | undefined;\n /** `bar` (default) is label, value and a track; `inline` is a Spinner beside the text for toolbars and buttons. */\n variant?: ProgressVariant | undefined;\n /** Names the bar when there is no `label`. */\n 'aria-label'?: string | undefined;\n}\n\n/**\n * Says that something is processing and, when known, how far along it is. Built on Base UI's Progress:\n * `role=\"progressbar\"` with the aria value attributes, or none while indeterminate.\n */\nexport function Progress({\n value,\n max = 100,\n min = 0,\n label,\n valueText,\n showValue = false,\n tone = 'accent',\n size = 'md',\n variant = 'bar',\n className,\n ...rest\n}: ProgressProps) {\n const current = value ?? null;\n const hasValueText = valueText != null || (showValue && current !== null);\n return (\n <BaseProgress.Root\n value={current}\n max={max}\n min={min}\n getAriaValueText={(formatted) => (typeof valueText === 'string' ? valueText : (formatted ?? ''))}\n className={cx('sc-progress', className)}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n {...rest}\n >\n {variant === 'inline' ? <Spinner size=\"sm\" decorative className=\"sc-progress__spinner\" /> : null}\n {label != null ? <BaseProgress.Label className=\"sc-progress__label\">{label}</BaseProgress.Label> : null}\n {hasValueText ? (\n <BaseProgress.Value className=\"sc-progress__value\">\n {(formatted) => (valueText != null ? valueText : formatted)}\n </BaseProgress.Value>\n ) : null}\n {variant === 'bar' ? (\n <BaseProgress.Track className=\"sc-progress__track\">\n <BaseProgress.Indicator className=\"sc-progress__indicator\" />\n </BaseProgress.Track>\n ) : null}\n </BaseProgress.Root>\n );\n}\n","import { createElement, type ComponentPropsWithRef } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\nexport type HeadingSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span' | 'p';\nexport type TextTone = 'default' | 'muted' | 'subtle' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\n\nexport interface HeadingProps extends ComponentPropsWithRef<'h2'> {\n /** The outline level, rendered as `h1`–`h6`. Default 2. */\n level?: HeadingLevel | undefined;\n /** Visual size from the type scale, independent of the level. Defaults by level: 3xl, 2xl, xl, lg, md, sm. */\n size?: HeadingSize | undefined;\n /** Render a different element and keep the look; `div`/`span` for a card title that is not an outline entry. */\n as?: HeadingElement | undefined;\n /** Colour. Default is the text colour. */\n tone?: TextTone | undefined;\n /** One line with an ellipsis. */\n truncate?: boolean | undefined;\n}\n\nconst sizeByLevel: Record<HeadingLevel, HeadingSize> = {\n 1: '3xl',\n 2: '2xl',\n 3: 'xl',\n 4: 'lg',\n 5: 'md',\n 6: 'sm',\n};\n\n/** A heading from the type scale. `level` is the semantics, `size` the look; they are set separately on purpose. */\nexport function Heading({\n level = 2,\n size,\n as,\n tone = 'default',\n truncate = false,\n className,\n ...rest\n}: HeadingProps) {\n return createElement(as ?? `h${level}`, {\n className: cx('sc-heading', className),\n 'data-size': size ?? sizeByLevel[level],\n 'data-tone': tone,\n 'data-truncate': truncate || undefined,\n ...rest,\n });\n}\n","import { createElement, type ComponentPropsWithRef, type CSSProperties, type ReactElement } from 'react';\nimport type { TextTone } from '../Heading/Heading';\nimport { cx } from '../../utils/cx';\n\nexport type TextSize = 'xs' | 'sm' | 'md' | 'lg';\nexport type TextWeight = 'regular' | 'medium' | 'semibold';\nexport type TextAlign = 'start' | 'center' | 'end';\nexport type TextElement =\n | 'p'\n | 'span'\n | 'div'\n | 'label'\n | 'li'\n | 'dt'\n | 'dd'\n | 'strong'\n | 'em'\n | 'small'\n | 'time'\n | 'figcaption'\n | 'legend';\n\nexport interface TextProps extends ComponentPropsWithRef<'p'> {\n /** Element to render. Default `p`; `span` inside other text. */\n as?: TextElement | undefined;\n /** `xs` 12 captions, `sm` 14 UI text (default), `md` body copy, `lg` lede. */\n size?: TextSize | undefined;\n /** Colour. `muted` for metadata, `subtle` for placeholders, status tones for inline status. */\n tone?: TextTone | undefined;\n weight?: TextWeight | undefined;\n align?: TextAlign | undefined;\n /** `true` keeps one line with an ellipsis; a number clamps to that many lines. */\n truncate?: boolean | number | undefined;\n /** Tabular figures, for numbers that line up in columns. */\n numeric?: boolean | undefined;\n}\n\n/** Running text and labels from the type scale. Parents own spacing: Text has no margins. */\nexport function Text({\n as = 'p',\n size = 'sm',\n tone = 'default',\n weight = 'regular',\n align,\n truncate = false,\n numeric = false,\n className,\n style,\n ...rest\n}: TextProps): ReactElement {\n const clamp = typeof truncate === 'number' ? truncate : undefined;\n return createElement(as, {\n className: cx('sc-text', className),\n 'data-size': size,\n 'data-tone': tone,\n 'data-weight': weight,\n 'data-align': align,\n 'data-truncate': truncate === true ? '' : clamp !== undefined ? 'clamp' : undefined,\n 'data-numeric': numeric || undefined,\n style: clamp !== undefined ? ({ ...style, '--sc-text-lines': clamp } as CSSProperties) : style,\n ...rest,\n });\n}\n","import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport {\n createContext,\n useContext,\n type ComponentPropsWithRef,\n type CSSProperties,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n} from 'react';\nimport { ArrowDownIcon, ArrowUpIcon, CheckIcon, MinusIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\nimport type { RowSelection } from './useRowSelection';\n\nexport type TableAlign = 'start' | 'center' | 'end';\nexport type TableDensity = 'comfortable' | 'compact';\nexport type TableSortDirection = 'ascending' | 'descending' | 'none';\n\nexport interface TableRootProps extends Omit<ComponentPropsWithRef<'table'>, 'style'> {\n /** Column headers stay visible while the table scrolls. Give `maxHeight` to scroll inside the table; otherwise they stick to the page. */\n stickyHeader?: boolean | undefined;\n /** Limits the height and scrolls rows inside; pairs with `stickyHeader`. A CSS length. */\n maxHeight?: string | undefined;\n /** `compact` tightens row height and padding; `data-density=\"compact\"` on an ancestor does the same. */\n density?: TableDensity | undefined;\n /** Hairlines between rows (default) or none. */\n divided?: boolean | undefined;\n /** `fixed` column widths from the first row, for truncating cells. Default `auto`. */\n layout?: 'auto' | 'fixed' | undefined;\n /** Style and class for the scrolling wrapper; `className` goes on the `<table>`. */\n wrapperClassName?: string | undefined;\n wrapperStyle?: CSSProperties | undefined;\n style?: CSSProperties | undefined;\n children?: ReactNode | undefined;\n /**\n * `useRowSelection(ids)`. Turns on the selection column parts (`Table.SelectionHeader`, `Table.SelectionCell`),\n * modifier clicks on rows with a `selectionId`, and the keyboard: Cmd/Ctrl+A selects every row while focus\n * is inside the table, Escape clears.\n */\n selection?: RowSelection | undefined;\n}\n\nconst SelectionContext = createContext<RowSelection | null>(null);\nconst RowIdContext = createContext<string | undefined>(undefined);\n\nfunction useSelection(part: string): RowSelection {\n const selection = useContext(SelectionContext);\n if (!selection) throw new Error(`${part} needs Table.Root selection={useRowSelection(ids)}`);\n return selection;\n}\n\n/** Typing into a field inside the table keeps the browser's own Cmd/Ctrl+A and Escape. */\nfunction isTextEntry(target: EventTarget): boolean {\n if (!(target instanceof HTMLElement)) return false;\n if (\n target.isContentEditable ||\n target instanceof HTMLTextAreaElement ||\n target instanceof HTMLSelectElement\n )\n return true;\n return (\n target instanceof HTMLInputElement &&\n !['checkbox', 'radio', 'button', 'submit', 'reset', 'image', 'file', 'color', 'range'].includes(\n target.type,\n )\n );\n}\n\nconst CONTROLS =\n 'a[href], button, input, select, textarea, label, summary, [role=\"checkbox\"], [role=\"button\"], [role=\"link\"], [contenteditable=\"true\"]';\n\n/** The event started on a link, button or field inside `row`, which keeps its own click behaviour. */\nfunction fromControl(event: MouseEvent<HTMLElement>): boolean {\n const control = event.target instanceof Element ? event.target.closest(CONTROLS) : null;\n return control !== null && event.currentTarget.contains(control);\n}\n\n/** A semantic `<table>` in a horizontally scrolling wrapper. Compose `Table.Head`, `Table.Body`, `Table.Row`, `Table.Header`, `Table.Cell`. */\nfunction Root({\n stickyHeader = false,\n maxHeight,\n density,\n divided = true,\n layout = 'auto',\n wrapperClassName,\n wrapperStyle,\n className,\n style,\n children,\n selection,\n onKeyDown,\n ...rest\n}: TableRootProps) {\n const handleKeyDown = (event: KeyboardEvent<HTMLTableElement>) => {\n onKeyDown?.(event);\n if (!selection || event.defaultPrevented) return;\n // Popups portalled out of a cell still bubble here through React; they are not \"inside the table\".\n if (!(event.target instanceof Node) || !event.currentTarget.contains(event.target)) return;\n if (isTextEntry(event.target)) return;\n if ((event.metaKey || event.ctrlKey) && !event.altKey && event.key.toLowerCase() === 'a') {\n event.preventDefault();\n selection.selectAll();\n } else if (event.key === 'Escape' && selection.count > 0) {\n event.preventDefault();\n selection.clear();\n }\n };\n return (\n <div\n className={cx('sc-table-wrap', wrapperClassName)}\n data-sticky-header={stickyHeader || undefined}\n data-scroll={maxHeight ? '' : undefined}\n style={maxHeight ? { ...wrapperStyle, maxBlockSize: maxHeight } : wrapperStyle}\n >\n {/* Selection shortcuts are delegated from the focusable controls inside (checkboxes, links, sort buttons). */}\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}\n <table\n className={cx('sc-table', className)}\n data-density={density}\n data-divided={divided || undefined}\n data-layout={layout}\n style={style}\n onKeyDown={selection ? handleKeyDown : onKeyDown}\n {...rest}\n >\n <SelectionContext.Provider value={selection ?? null}>{children}</SelectionContext.Provider>\n </table>\n </div>\n );\n}\n\nexport type TableCaptionProps = ComponentPropsWithRef<'caption'>;\n\n/** Names the table for assistive tech; visually a muted line above it. */\nfunction Caption({ className, ...rest }: TableCaptionProps) {\n return <caption className={cx('sc-table__caption', className)} {...rest} />;\n}\n\nexport type TableHeadProps = ComponentPropsWithRef<'thead'>;\nfunction Head({ className, ...rest }: TableHeadProps) {\n return <thead className={cx('sc-table__head', className)} {...rest} />;\n}\n\nexport type TableBodyProps = ComponentPropsWithRef<'tbody'>;\nfunction Body({ className, ...rest }: TableBodyProps) {\n return <tbody className={cx('sc-table__body', className)} {...rest} />;\n}\n\nexport type TableFootProps = ComponentPropsWithRef<'tfoot'>;\nfunction Foot({ className, ...rest }: TableFootProps) {\n return <tfoot className={cx('sc-table__foot', className)} {...rest} />;\n}\n\nexport interface TableRowProps extends ComponentPropsWithRef<'tr'> {\n /** Accent wash, for the current row. With `selectionId` it defaults to the row's selection. */\n selected?: boolean | undefined;\n /** Hover wash and pointer; make the primary cell a link or button for the real target. */\n interactive?: boolean | undefined;\n /**\n * The row's id in `Table.Root selection`. Shift+click extends the range to this row and Cmd/Ctrl+click\n * toggles it, unless the click is on a link, button or field inside the row; neither reaches `onClick`,\n * so a plain click can still open the row.\n */\n selectionId?: string | undefined;\n}\n\nfunction Row({\n selected,\n interactive = false,\n selectionId,\n className,\n onClick,\n onMouseDown,\n ...rest\n}: TableRowProps) {\n const selection = useContext(SelectionContext);\n const selectable = selection !== null && selectionId !== undefined;\n const isSelected = selected ?? (selectable && selection.isSelected(selectionId));\n const row = (\n <tr\n className={cx('sc-table__row', className)}\n data-selected={isSelected || undefined}\n data-interactive={interactive || undefined}\n aria-selected={selectable ? isSelected : isSelected || undefined}\n onClick={\n selectable\n ? (event) => {\n if ((event.shiftKey || event.metaKey || event.ctrlKey) && !fromControl(event)) {\n event.preventDefault();\n if (event.shiftKey) selection.toggleRange(selectionId);\n else selection.toggle(selectionId);\n return;\n }\n onClick?.(event);\n }\n : onClick\n }\n onMouseDown={\n selectable\n ? (event) => {\n // Shift+click would otherwise select the text between the two clicks.\n if (event.shiftKey && !fromControl(event)) event.preventDefault();\n onMouseDown?.(event);\n }\n : onMouseDown\n }\n {...rest}\n />\n );\n return selectionId === undefined ? (\n row\n ) : (\n <RowIdContext.Provider value={selectionId}>{row}</RowIdContext.Provider>\n );\n}\n\nfunction SelectionBox({\n label,\n ...rest\n}: { label: string } & Omit<BaseCheckbox.Root.Props, 'className' | 'render'>) {\n return (\n <BaseCheckbox.Root className=\"sc-checkbox\" aria-label={label} {...rest}>\n <BaseCheckbox.Indicator className=\"sc-checkbox__indicator\">\n <CheckIcon size=\"sm\" className=\"sc-checkbox__check\" />\n <MinusIcon size=\"sm\" className=\"sc-checkbox__dash\" />\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n );\n}\n\nconst onCheckbox = (event: MouseEvent<HTMLElement>) =>\n event.target instanceof Element && event.target.closest('[role=\"checkbox\"]') !== null;\n\nexport interface TableSelectionHeaderProps extends Omit<ComponentPropsWithRef<'th'>, 'children'> {\n /** The checkbox's accessible name. Default \"Select all rows\". */\n label?: string | undefined;\n}\n\n/**\n * The selection column's header: a checkbox that is checked when every row is, mixed when some are, and\n * selects every row (or, when all are selected, none). The whole cell is the hit area.\n */\nfunction SelectionHeader({\n label = 'Select all rows',\n className,\n onClick,\n ...rest\n}: TableSelectionHeaderProps) {\n const selection = useSelection('Table.SelectionHeader');\n const disabled = selection.ids.length === 0;\n const toggleAll = () => (selection.headerState === 'all' ? selection.clear() : selection.selectAll());\n return (\n <th\n scope=\"col\"\n className={cx('sc-table__header', 'sc-table__select', className)}\n data-disabled={disabled || undefined}\n onClick={(event) => {\n onClick?.(event);\n if (!disabled && !onCheckbox(event)) toggleAll();\n }}\n {...rest}\n >\n <SelectionBox\n label={label}\n checked={selection.headerState === 'all'}\n indeterminate={selection.headerState === 'some'}\n disabled={disabled}\n onCheckedChange={toggleAll}\n />\n </th>\n );\n}\n\nexport interface TableSelectionCellProps extends Omit<ComponentPropsWithRef<'td'>, 'children'> {\n /** Required. Names the row's checkbox: \"Select Tailscale, Front End Engineer\". */\n label: string;\n}\n\n/**\n * The row's checkbox, inside a `Table.Row selectionId`. Click or Space toggles; Shift+click or Shift+Space\n * extends the range from the last toggled row. The whole cell is the hit area, and its clicks never reach the\n * row's `onClick`.\n */\nfunction SelectionCell({ label, className, onClick, onClickCapture, ...rest }: TableSelectionCellProps) {\n const selection = useSelection('Table.SelectionCell');\n const id = useContext(RowIdContext);\n if (id === undefined) throw new Error('Table.SelectionCell goes inside a Table.Row with selectionId');\n return (\n <td\n className={cx('sc-table__cell', 'sc-table__select', className)}\n onClickCapture={(event) => {\n onClickCapture?.(event);\n // Shift+click, and Shift+Space (Base UI turns the keyup into a click that keeps the modifiers), take the\n // range before the checkbox would flip on its own.\n if (!event.shiftKey) return;\n event.preventDefault();\n event.stopPropagation();\n selection.toggleRange(id);\n }}\n onClick={(event) => {\n onClick?.(event);\n event.stopPropagation();\n if (!onCheckbox(event)) selection.toggle(id);\n }}\n {...rest}\n >\n <SelectionBox\n label={label}\n checked={selection.isSelected(id)}\n onCheckedChange={() => selection.toggle(id)}\n />\n </td>\n );\n}\n\ninterface CellSlots {\n /** Horizontal alignment. Default `start`; `end` for numbers. */\n align?: TableAlign | undefined;\n /** Tabular figures and end alignment. */\n numeric?: boolean | undefined;\n /** No wrapping. */\n nowrap?: boolean | undefined;\n /** One line with an ellipsis; needs `layout=\"fixed\"` or a `width`. */\n truncate?: boolean | undefined;\n /** Column width as a CSS length, on headers. */\n width?: string | undefined;\n}\n\nexport interface TableHeaderProps extends Omit<ComponentPropsWithRef<'th'>, 'align' | 'width'>, CellSlots {\n /** Renders the label as a button that sorts the column. The table stays controlled: sort the rows yourself in `onSort`. */\n sortable?: boolean | undefined;\n /** The column's current sort, reflected as `aria-sort`. `none` (default) for every column but the sorted one. */\n sortDirection?: TableSortDirection | undefined;\n /** Called with the direction to apply: `ascending` first, then it toggles. */\n onSort?: ((direction: Exclude<TableSortDirection, 'none'>) => void) | undefined;\n}\n\n/** A `<th>`; `scope` defaults to `col`, pass `row` for the first cell of a row. */\nfunction Header({\n align,\n numeric = false,\n nowrap = false,\n truncate = false,\n width,\n sortable = false,\n sortDirection = 'none',\n onSort,\n scope = 'col',\n className,\n style,\n children,\n ...rest\n}: TableHeaderProps) {\n const sorted = sortable && sortDirection !== 'none';\n return (\n <th\n scope={scope}\n className={cx('sc-table__header', className)}\n data-align={align ?? (numeric ? 'end' : undefined)}\n data-numeric={numeric || undefined}\n data-nowrap={nowrap || undefined}\n data-truncate={truncate || undefined}\n data-sortable={sortable || undefined}\n data-sorted={sorted ? sortDirection : undefined}\n aria-sort={sorted ? sortDirection : undefined}\n style={width ? { ...style, inlineSize: width } : style}\n {...rest}\n >\n {sortable ? (\n <button\n type=\"button\"\n className=\"sc-table__sort\"\n onClick={() => onSort?.(sortDirection === 'ascending' ? 'descending' : 'ascending')}\n >\n <span className=\"sc-table__sort-label\">{children}</span>\n <span className=\"sc-table__sort-icon\" aria-hidden=\"true\">\n {sortDirection === 'descending' ? <ArrowDownIcon size=\"xs\" /> : <ArrowUpIcon size=\"xs\" />}\n </span>\n </button>\n ) : (\n children\n )}\n </th>\n );\n}\n\nexport interface TableCellProps extends Omit<ComponentPropsWithRef<'td'>, 'align' | 'width'>, CellSlots {}\n\nfunction Cell({\n align,\n numeric = false,\n nowrap = false,\n truncate = false,\n width,\n className,\n style,\n ...rest\n}: TableCellProps) {\n return (\n <td\n className={cx('sc-table__cell', className)}\n data-align={align ?? (numeric ? 'end' : undefined)}\n data-numeric={numeric || undefined}\n data-nowrap={nowrap || undefined}\n data-truncate={truncate || undefined}\n style={width ? { ...style, inlineSize: width } : style}\n {...rest}\n />\n );\n}\n\n/** Rows of records with column headers. Native table elements, so screen readers get rows and columns. */\nexport const Table = { Root, Caption, Head, Body, Foot, Row, Header, Cell, SelectionHeader, SelectionCell };\n","import { useMemo, useReducer } from 'react';\nimport {\n headerState,\n initRowSelection,\n rowSelectionReducer,\n sameIds,\n selectedIds,\n type RowSelectionHeaderState,\n} from './rowSelection';\n\nexport interface RowSelection {\n /** The selectable ids, in the order passed in. */\n ids: readonly string[];\n /** The selected ids; a subset of the ids passed in. */\n selected: ReadonlySet<string>;\n /** The selected ids in visible order. */\n selectedIds: readonly string[];\n count: number;\n /** Where the next Shift range starts. */\n anchor: string | null;\n /** For the header checkbox. */\n headerState: RowSelectionHeaderState;\n isSelected: (id: string) => boolean;\n toggle: (id: string) => void;\n /** Every row from the anchor to `id`, inclusive, in the current order, takes `id`'s new state. */\n toggleRange: (id: string) => void;\n selectAll: () => void;\n clear: () => void;\n}\n\n/**\n * Selection state for a list of rows, by id. Pass the selectable ids in visible order (after filtering and\n * sorting); when one disappears it leaves the selection and the rest stay. Hand the result to\n * `Table.Root selection` for the checkbox column and keyboard, or read it for a bulk-action bar.\n */\nexport function useRowSelection(ids: readonly string[]): RowSelection {\n const [stored, dispatch] = useReducer(rowSelectionReducer, ids, initRowSelection);\n // Rows changed since the last render: sync now (a render-phase update, so nothing paints a stale count),\n // and read the synced state this render.\n const state = sameIds(stored.ids, ids)\n ? stored\n : rowSelectionReducer(stored, { type: 'selection.sync', ids });\n if (state !== stored) dispatch({ type: 'selection.sync', ids });\n\n const actions = useMemo(\n () => ({\n toggle: (id: string) => dispatch({ type: 'selection.toggle', id }),\n toggleRange: (id: string) => dispatch({ type: 'selection.toggleRange', id }),\n selectAll: () => dispatch({ type: 'selection.selectAll' }),\n clear: () => dispatch({ type: 'selection.clear' }),\n }),\n [],\n );\n return useMemo(\n () => ({\n ids: state.ids,\n selected: state.selected,\n selectedIds: selectedIds(state),\n count: state.selected.size,\n anchor: state.anchor,\n headerState: headerState(state),\n isSelected: (id: string) => state.selected.has(id),\n ...actions,\n }),\n [state, actions],\n );\n}\n","// Row selection as a pure reducer: no React, no DOM. `useRowSelection` is the thin hook over it, and the Table's\n// selection column and keyboard handling only send it events. Events are namespaced `selection.*` (guideline 07).\n\n/** The header checkbox: nothing, some or every row selected. */\nexport type RowSelectionHeaderState = 'none' | 'some' | 'all';\n\nexport interface RowSelectionState {\n /** The selectable row ids in visible order (after the page's filter and sort). Unique. */\n readonly ids: readonly string[];\n /** The selected ids; always a subset of `ids`. */\n readonly selected: ReadonlySet<string>;\n /** Where the next range starts: the row toggled last, on its own or as the end of a range. */\n readonly anchor: string | null;\n}\n\nexport type RowSelectionEvent =\n /** The visible rows changed (filter, sort, new data): keep the order, drop what disappeared. */\n | { type: 'selection.sync'; ids: readonly string[] }\n /** Flip one row; it becomes the anchor. */\n | { type: 'selection.toggle'; id: string }\n /** Shift: every row from the anchor to `id`, inclusive, in visible order, takes `id`'s new state; `id` becomes the anchor. */\n | { type: 'selection.toggleRange'; id: string }\n | { type: 'selection.selectAll' }\n | { type: 'selection.clear' };\n\nexport function initRowSelection(ids: readonly string[]): RowSelectionState {\n return { ids, selected: new Set(), anchor: null };\n}\n\n/** Same ids in the same order. */\nexport function sameIds(a: readonly string[], b: readonly string[]): boolean {\n if (a === b) return true;\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i += 1) if (a[i] !== b[i]) return false;\n return true;\n}\n\nfunction toggle(state: RowSelectionState, id: string): RowSelectionState {\n if (!state.ids.includes(id)) return state;\n const selected = new Set(state.selected);\n if (selected.has(id)) selected.delete(id);\n else selected.add(id);\n return { ...state, selected, anchor: id };\n}\n\nfunction toggleRange(state: RowSelectionState, id: string): RowSelectionState {\n const to = state.ids.indexOf(id);\n if (to < 0) return state;\n const from = state.anchor === null ? -1 : state.ids.indexOf(state.anchor);\n if (from < 0 || from === to) return toggle(state, id);\n const on = !state.selected.has(id);\n const selected = new Set(state.selected);\n const [start, end] = from < to ? [from, to] : [to, from];\n for (let i = start; i <= end; i += 1) {\n const rowId = state.ids[i]!;\n if (on) selected.add(rowId);\n else selected.delete(rowId);\n }\n return { ...state, selected, anchor: id };\n}\n\nfunction sync(state: RowSelectionState, ids: readonly string[]): RowSelectionState {\n if (sameIds(state.ids, ids)) return state;\n const present = new Set(ids);\n let selected = state.selected;\n for (const id of state.selected) {\n if (present.has(id)) continue;\n selected = new Set([...state.selected].filter((x) => present.has(x)));\n break;\n }\n const anchor = state.anchor !== null && present.has(state.anchor) ? state.anchor : null;\n return { ids, selected, anchor };\n}\n\n/** Pure: returns `state` itself when an event changes nothing, so React can bail out. */\nexport function rowSelectionReducer(state: RowSelectionState, event: RowSelectionEvent): RowSelectionState {\n switch (event.type) {\n case 'selection.sync':\n return sync(state, event.ids);\n case 'selection.toggle':\n return toggle(state, event.id);\n case 'selection.toggleRange':\n return toggleRange(state, event.id);\n case 'selection.selectAll':\n return state.selected.size === state.ids.length ? state : { ...state, selected: new Set(state.ids) };\n case 'selection.clear':\n return state.selected.size === 0 && state.anchor === null\n ? state\n : { ...state, selected: new Set(), anchor: null };\n }\n}\n\nexport function headerState(state: RowSelectionState): RowSelectionHeaderState {\n if (state.selected.size === 0) return 'none';\n return state.selected.size === state.ids.length ? 'all' : 'some';\n}\n\n/** The selected ids in visible order. */\nexport function selectedIds(state: RowSelectionState): string[] {\n return state.ids.filter((id) => state.selected.has(id));\n}\n","import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ReactNode } from 'react';\nimport { Button } from '../Button/Button';\nimport { Toolbar } from '../Toolbar/Toolbar';\nimport { cx } from '../../utils/cx';\n\nexport interface SelectionBarProps {\n /** How many rows are selected. The bar shows from 1 and leaves at 0. */\n count: number;\n /** Clears the selection (the Clear button). */\n onClear: () => void;\n /** The actions, each a `Toolbar.Button`: `<Toolbar.Button render={<Button size=\"sm\" variant=\"secondary\" />}>Close 3</Toolbar.Button>`. */\n children?: ReactNode | undefined;\n /** Names the toolbar. Default \"Bulk actions\". */\n 'aria-label'?: string | undefined;\n /** The count text, visible and announced. Default `${count} selected`. */\n countLabel?: ((count: number) => string) | undefined;\n /** Default \"Clear\". */\n clearLabel?: string | undefined;\n /** Announced when the selection goes back to none. Default \"Selection cleared\". */\n clearedMessage?: string | undefined;\n className?: string | undefined;\n}\n\nconst defaultCountLabel = (count: number) => `${count} selected`;\n/** Matches `--sc-duration-base` in selection-bar.css: the bar stays mounted this long to fade out. */\nconst LEAVE_MS = 200;\n\n/**\n * A floating bar for bulk actions on selected rows, centred at the bottom of the viewport: the count, the actions\n * and Clear, as one Toolbar (one tab stop, arrow keys inside). A polite status region announces the count as it\n * changes. Put it after the table, at the end of the scrolling content: while it shows, it leaves a spacer as\n * tall as itself there, so the last rows can scroll clear of it. When it leaves while holding focus (an action\n * cleared the selection), focus goes back to where it came from, usually the last row checkbox.\n */\nexport function SelectionBar({\n count,\n onClear,\n children,\n 'aria-label': ariaLabel = 'Bulk actions',\n countLabel = defaultCountLabel,\n clearLabel = 'Clear',\n clearedMessage = 'Selection cleared',\n className,\n}: SelectionBarProps) {\n const open = count > 0;\n // Nothing is announced on load; \"cleared\" only after there was a selection.\n const [hadSelection, setHadSelection] = useState(open);\n if (open && !hadSelection) setHadSelection(true);\n const message = open ? countLabel(count) : hadSelection ? clearedMessage : '';\n\n // Stay mounted for the fade-out, still showing the last count.\n const [rendered, setRendered] = useState(open);\n const [shownCount, setShownCount] = useState(count);\n if (open && !rendered) setRendered(true);\n if (open && shownCount !== count) setShownCount(count);\n useEffect(() => {\n if (open || !rendered) return;\n const timer = setTimeout(() => setRendered(false), LEAVE_MS);\n return () => clearTimeout(timer);\n }, [open, rendered]);\n\n const barRef = useRef<HTMLDivElement>(null);\n const returnTo = useRef<HTMLElement | null>(null);\n useLayoutEffect(() => {\n const bar = barRef.current;\n if (open || !bar?.contains(bar.ownerDocument.activeElement)) return;\n if (returnTo.current?.isConnected) returnTo.current.focus();\n }, [open]);\n\n // The spacer follows the bar's height (it wraps on narrow screens).\n const [height, setHeight] = useState(0);\n useEffect(() => {\n const bar = barRef.current;\n if (!rendered || !bar || typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(([entry]) => setHeight(entry!.borderBoxSize[0]?.blockSize ?? 0));\n observer.observe(bar);\n return () => observer.disconnect();\n }, [rendered]);\n\n return (\n <>\n <span role=\"status\" className=\"sc-visually-hidden\">\n {message}\n </span>\n {rendered ? (\n <>\n {open ? (\n <div\n className=\"sc-selection-bar__spacer\"\n style={{ '--sc-selection-bar-height': `${height}px` } as CSSProperties}\n aria-hidden=\"true\"\n />\n ) : null}\n <div\n ref={barRef}\n className={cx('sc-selection-bar', className)}\n data-open={open || undefined}\n onFocus={(event) => {\n const from = event.relatedTarget;\n if (from instanceof HTMLElement && !event.currentTarget.contains(from)) returnTo.current = from;\n }}\n >\n <Toolbar.Root aria-label={ariaLabel} className=\"sc-selection-bar__toolbar\">\n <span className=\"sc-selection-bar__count\">{countLabel(shownCount)}</span>\n <Toolbar.Separator />\n {children}\n <Toolbar.Spacer />\n <Toolbar.Button render={<Button variant=\"ghost\" size=\"sm\" />} onClick={onClear}>\n {clearLabel}\n </Toolbar.Button>\n </Toolbar.Root>\n </div>\n </>\n ) : null}\n </>\n );\n}\n","import { Toast as BaseToast } from '@base-ui/react/toast';\nimport { useMemo, type ReactNode } from 'react';\nimport { XIcon } from '../../icons/icons.gen';\nimport { Button } from '../Button/Button';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type ToastTone = 'neutral' | 'success' | 'danger';\n\nexport interface ToastOptions {\n /** Required. One line: \"Closed 5 applications\". */\n title: ReactNode;\n description?: ReactNode | undefined;\n /** A coloured edge. Default `neutral`. */\n tone?: ToastTone | undefined;\n /** One action, usually Undo. It closes the toast after `onClick`. */\n action?: { label: string; onClick: () => void } | undefined;\n /** Milliseconds before it closes; paused while hovered or focused; `0` keeps it. Default: the Provider's. */\n timeout?: number | undefined;\n /** `high` announces assertively (errors). Default `low`, polite. */\n priority?: 'low' | 'high' | undefined;\n}\n\nexport interface ToastProviderProps {\n children?: ReactNode | undefined;\n /** Default auto-close, in milliseconds. Default 6000. */\n timeout?: number | undefined;\n /** How many show at once; older ones close. Default 3. */\n limit?: number | undefined;\n}\n\n/** Holds the toasts for `useToast()` below it and renders them, bottom-end, in the top layer. */\nfunction Provider({ children, timeout = 6000, limit = 3 }: ToastProviderProps) {\n return (\n <BaseToast.Provider timeout={timeout} limit={limit}>\n {children}\n <BaseToast.Portal>\n <Viewport />\n </BaseToast.Portal>\n </BaseToast.Provider>\n );\n}\n\nfunction Viewport() {\n const { toasts, close } = BaseToast.useToastManager();\n return (\n <BaseToast.Viewport className=\"sc-toast-viewport\">\n {toasts.map((toast) => (\n <BaseToast.Root key={toast.id} toast={toast} className=\"sc-toast\" data-tone={toast.type ?? 'neutral'}>\n <BaseToast.Content className=\"sc-toast__content\">\n <BaseToast.Title className=\"sc-toast__title\" />\n {toast.description != null ? <BaseToast.Description className=\"sc-toast__description\" /> : null}\n </BaseToast.Content>\n {toast.actionProps ? (\n <BaseToast.Action\n className=\"sc-toast__action\"\n render={<Button variant=\"secondary\" size=\"sm\" />}\n />\n ) : null}\n <IconButton label=\"Dismiss\" size=\"sm\" className=\"sc-toast__close\" onClick={() => close(toast.id)}>\n <XIcon />\n </IconButton>\n </BaseToast.Root>\n ))}\n </BaseToast.Viewport>\n );\n}\n\nexport interface ToastApi {\n /** Shows a toast and returns its id. */\n add: (options: ToastOptions) => string;\n /** Closes one toast, or every toast without an id. */\n close: (id?: string) => void;\n}\n\n/** Shows toasts from inside a `Toast.Provider`. */\nexport function useToast(): ToastApi {\n const manager = BaseToast.useToastManager();\n return useMemo(\n () => ({\n add: ({ title, description, tone = 'neutral', action, timeout, priority }: ToastOptions) => {\n let id = '';\n id = manager.add({\n title,\n description,\n type: tone,\n ...(timeout !== undefined ? { timeout } : {}),\n ...(priority ? { priority } : {}),\n ...(action\n ? {\n actionProps: {\n children: action.label,\n onClick: () => {\n action.onClick();\n manager.close(id);\n },\n },\n }\n : {}),\n });\n return id;\n },\n close: manager.close,\n }),\n [manager],\n );\n}\n\n/**\n * Short-lived status messages: \"Closed 5 applications · Undo\". Built on Base UI's Toast: announced through a\n * polite region (`priority: 'high'` for errors), paused while hovered or focused, F6 moves focus to them.\n */\nexport const Toast = { Provider };\n","import { createElement, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { ArrowDownIcon, ArrowRightIcon, ArrowUpIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type StatTrend = 'up' | 'down' | 'flat';\nexport type StatDeltaTone = 'positive' | 'negative' | 'neutral';\nexport type StatElement = 'div' | 'li' | 'article';\nexport type StatVariant = 'outlined' | 'filled' | 'plain';\nexport type StatSize = 'sm' | 'md';\n\nexport interface StatProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {\n /** What the number is: \"Applications\", \"Reply rate\". */\n label: ReactNode;\n /** The number, already formatted: \"1,204\", \"37%\". */\n value: ReactNode;\n /** The change beside the value: \"+12\", \"−3.1 pts\", \"same as last week\". */\n delta?: ReactNode | undefined;\n /** Colour of the delta: `positive` green, `negative` red, `neutral` muted (default). Say which is good; up is not always good. */\n deltaTone?: StatDeltaTone | undefined;\n /** Arrow before the delta. */\n trend?: StatTrend | undefined;\n /** Muted line under the value: \"last 7 days\", \"of 2,000 budget\". */\n hint?: ReactNode | undefined;\n /** A 20px icon in the corner. Decorative. */\n icon?: ReactNode | undefined;\n /** `outlined` surface (default), `filled` inset, `plain` no surface for a row of stats inside a Card. */\n variant?: StatVariant | undefined;\n /** `md` (default) or `sm` for dense rows. */\n size?: StatSize | undefined;\n /** Element to render; `li` in a list of stats. */\n as?: StatElement | undefined;\n}\n\nconst trendIcons: Record<StatTrend, ReactNode> = {\n up: <ArrowUpIcon size=\"xs\" />,\n down: <ArrowDownIcon size=\"xs\" />,\n flat: <ArrowRightIcon size=\"xs\" />,\n};\n\n/** One number with its label: a KPI tile. The value is text, so it reads as \"Applications, 1,204, up 12\". */\nexport function Stat({\n label,\n value,\n delta,\n deltaTone = 'neutral',\n trend,\n hint,\n icon,\n variant = 'outlined',\n size = 'md',\n as = 'div',\n className,\n ...rest\n}: StatProps) {\n return createElement(\n as,\n {\n className: cx('sc-stat', className),\n 'data-variant': variant,\n 'data-size': size,\n ...rest,\n },\n <>\n <div className=\"sc-stat__label\">{label}</div>\n {icon ? (\n <span className=\"sc-stat__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n <div className=\"sc-stat__value\">{value}</div>\n {delta != null ? (\n <div className=\"sc-stat__delta\" data-tone={deltaTone}>\n {trend ? (\n <span className=\"sc-stat__trend\" aria-hidden=\"true\">\n {trendIcons[trend]}\n </span>\n ) : null}\n {trend ? (\n <span className=\"sc-visually-hidden\">{trend === 'flat' ? 'unchanged' : trend} </span>\n ) : null}\n {delta}\n </div>\n ) : null}\n {hint != null ? <div className=\"sc-stat__hint\">{hint}</div> : null}\n </>,\n );\n}\n","import type { ComponentPropsWithRef, KeyboardEvent, MouseEvent, ReactNode } from 'react';\nimport { XIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type ChipTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\nexport type ChipSize = 'sm' | 'md';\n\nexport interface ChipProps extends Omit<ComponentPropsWithRef<'span'>, 'onClick' | 'onRemove'> {\n /** The chip text. Keep it to a word or three. */\n children: ReactNode;\n /** A 14px icon before the text. Decorative. */\n icon?: ReactNode | undefined;\n /** Colour. `neutral` (default) for filters, a status tone when the chip is the status. */\n tone?: ChipTone | undefined;\n /** `md` 32px (default) or `sm` 24px inside table rows and Card headers. */\n size?: ChipSize | undefined;\n /** Filled and `aria-pressed`. Use with `onClick` for a toggling filter chip. */\n selected?: boolean | undefined;\n /** Makes the chip a `<button>` that toggles; `selected` is reflected as `aria-pressed`. */\n onClick?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;\n /**\n * Adds a labelled × that calls this. Backspace or Delete on the focused chip (or on the ×) removes it\n * too. Focus is yours to manage after removal: move it to the next chip or the filter input.\n */\n onRemove?: (() => void) | undefined;\n /** Accessible name of the ×. Default \"Remove\" followed by the chip text when that text is a string. */\n removeLabel?: string | undefined;\n disabled?: boolean | undefined;\n}\n\n/**\n * A small pill: an applied filter, a tag, a selectable option in a row of a few. `onClick` makes it a\n * toggle button, `onRemove` adds the ×, and the two combine. Plain text otherwise.\n */\nexport function Chip({\n children,\n icon,\n tone = 'neutral',\n size = 'md',\n selected = false,\n onClick,\n onRemove,\n removeLabel,\n disabled = false,\n className,\n ...rest\n}: ChipProps) {\n const interactive = onClick !== undefined;\n const removeName = removeLabel ?? (typeof children === 'string' ? `Remove ${children}` : 'Remove');\n const handleRemoveKey = (event: KeyboardEvent<HTMLElement>) => {\n if (onRemove && !disabled && (event.key === 'Backspace' || event.key === 'Delete')) {\n event.preventDefault();\n onRemove();\n }\n };\n const shared = {\n className: cx('sc-chip', className),\n 'data-tone': tone,\n 'data-size': size,\n 'data-selected': selected || undefined,\n 'data-removable': onRemove ? '' : undefined,\n 'data-disabled': disabled || undefined,\n };\n const body = (\n <>\n {icon ? (\n <span className=\"sc-chip__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n <span className=\"sc-chip__label\">{children}</span>\n </>\n );\n const remove = onRemove ? (\n <button\n type=\"button\"\n className=\"sc-chip__remove\"\n aria-label={removeName}\n disabled={disabled}\n onClick={(event) => {\n event.stopPropagation();\n onRemove();\n }}\n onKeyDown={handleRemoveKey}\n >\n <XIcon size=\"xs\" />\n </button>\n ) : null;\n\n if (interactive) {\n return (\n <span {...shared} {...rest}>\n <button\n type=\"button\"\n className=\"sc-chip__action\"\n aria-pressed={selected}\n disabled={disabled}\n onClick={onClick}\n onKeyDown={handleRemoveKey}\n >\n {body}\n </button>\n {remove}\n </span>\n );\n }\n return (\n <span {...shared} {...rest}>\n {body}\n {remove}\n </span>\n );\n}\n","import {\n type CSSProperties,\n useEffect,\n useRef,\n useState,\n type ComponentPropsWithRef,\n type ReactNode,\n type SyntheticEvent,\n} from 'react';\nimport { ChevronDownIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport interface DisclosureProps extends Omit<ComponentPropsWithRef<'details'>, 'open' | 'onToggle'> {\n /** Required. The summary line, a verb phrase: \"Show full description\". */\n summary: ReactNode;\n /** Replaces `summary` while open: \"Show less\". */\n summaryOpen?: ReactNode | undefined;\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the user toggles it. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /**\n * While closed, shows this many lines of the content fading out, so a long description still reads\n * as a teaser. Puts the summary line under the preview. Needs `::details-content` (2025 browsers);\n * older ones show the summary alone.\n */\n previewLines?: number | undefined;\n /** Puts the summary line above (default) or below the content. Defaults to `end` with `previewLines`. */\n summaryPosition?: 'start' | 'end' | undefined;\n children?: ReactNode | undefined;\n}\n\n/**\n * A native `<details>` collapse with a styled summary. Works without JavaScript, is announced as a\n * disclosure, and shares `name` with siblings for an exclusive group.\n */\nexport function Disclosure({\n summary,\n summaryOpen,\n open,\n defaultOpen = false,\n onOpenChange,\n previewLines,\n summaryPosition,\n className,\n style,\n children,\n ref,\n ...rest\n}: DisclosureProps) {\n const controlled = open !== undefined;\n const [internal, setInternal] = useState(defaultOpen);\n const isOpen = controlled ? open : internal;\n const inner = useRef<HTMLDetailsElement | null>(null);\n // A native toggle flips the element itself; when controlled and the parent declines, put it back.\n useEffect(() => {\n if (controlled && inner.current && inner.current.open !== open) inner.current.open = open;\n });\n const onToggle = (event: SyntheticEvent<HTMLDetailsElement>) => {\n const next = event.currentTarget.open;\n if (next === isOpen) return;\n if (!controlled) setInternal(next);\n onOpenChange?.(next);\n };\n const position = summaryPosition ?? (previewLines ? 'end' : 'start');\n return (\n <details\n ref={(node) => {\n inner.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n className={cx('sc-disclosure', className)}\n open={isOpen}\n onToggle={onToggle}\n data-summary-position={position}\n data-preview={previewLines ? '' : undefined}\n style={previewLines ? ({ ...style, '--_lines': previewLines } as CSSProperties) : style}\n {...rest}\n >\n <summary className=\"sc-disclosure__summary\">\n <ChevronDownIcon className=\"sc-disclosure__chevron\" />\n <span className=\"sc-disclosure__summary-text\">\n {isOpen && summaryOpen != null ? summaryOpen : summary}\n </span>\n </summary>\n <div className=\"sc-disclosure__content\">{children}</div>\n </details>\n );\n}\n","import { createElement, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type EmptyStateSize = 'sm' | 'md';\nexport type EmptyStateElement = 'div' | 'section' | 'li';\n\nexport interface EmptyStateProps extends Omit<ComponentPropsWithRef<'div'>, 'title'> {\n /** Required. What is empty, as a short statement: \"No applications yet\". */\n title: ReactNode;\n /** One sentence on why, or what to do: \"Postings you apply to show up here.\" */\n description?: ReactNode | undefined;\n /** A 24px icon in a muted circle above the title. Decorative. */\n icon?: ReactNode | undefined;\n /** The actions, usually one primary Button and at most one secondary. Rendered in an Inline. */\n children?: ReactNode | undefined;\n /** `md` (default) for a whole view or panel, `sm` inside a Card or a table body. */\n size?: EmptyStateSize | undefined;\n /** Element to render. Default `div`. */\n as?: EmptyStateElement | undefined;\n}\n\n/**\n * Centred placeholder for a view with nothing in it: an icon, a title, a sentence and the action that\n * fills it. Say what is missing and the next step; never apologise.\n */\nexport function EmptyState({\n title,\n description,\n icon,\n children,\n size = 'md',\n as = 'div',\n className,\n ...rest\n}: EmptyStateProps) {\n return createElement(\n as,\n { className: cx('sc-empty-state', className), 'data-size': size, ...rest },\n icon ? (\n <span className=\"sc-empty-state__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : null,\n <p className=\"sc-empty-state__title\">{title}</p>,\n description != null ? <p className=\"sc-empty-state__description\">{description}</p> : null,\n children != null ? <div className=\"sc-empty-state__actions\">{children}</div> : null,\n );\n}\n","import type { ComponentPropsWithRef, CSSProperties } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type SkeletonVariant = 'text' | 'rect' | 'circle';\n\nexport interface SkeletonProps extends ComponentPropsWithRef<'span'> {\n /** `text` (default) is one line of the current font size; `rect` a block; `circle` an avatar. */\n variant?: SkeletonVariant | undefined;\n /** Any CSS length. Default: text `100%`, rect `100%`, circle `40px`. */\n width?: string | number | undefined;\n /** Any CSS length. Default: text `1em` (one line), rect `80px`, circle = `width`. */\n height?: string | number | undefined;\n /** For `text`: how many lines; the last is shorter. Default 1. */\n lines?: number | undefined;\n /** Hides the shimmer. Default `false`; reduced motion hides it anyway. */\n still?: boolean | undefined;\n}\n\n/**\n * A placeholder shape shown while real content loads. It is hidden from assistive tech: put\n * `aria-busy=\"true\"` on the region being filled, or a `Spinner` with a label beside it, so the loading\n * state is announced once instead of per block.\n */\nexport function Skeleton({\n variant = 'text',\n width,\n height,\n lines = 1,\n still = false,\n className,\n style,\n ...rest\n}: SkeletonProps) {\n const size: CSSProperties = {\n ...style,\n ...(width !== undefined ? { inlineSize: width } : {}),\n ...(height !== undefined ? { blockSize: height } : {}),\n };\n if (variant === 'text' && lines > 1) {\n return (\n <span className={cx('sc-skeleton-lines', className)} aria-hidden=\"true\" style={style} {...rest}>\n {Array.from({ length: lines }, (_, i) => (\n <span\n key={i}\n className=\"sc-skeleton\"\n data-variant=\"text\"\n data-still={still || undefined}\n data-last={i === lines - 1 || undefined}\n style={width !== undefined ? { inlineSize: width } : undefined}\n />\n ))}\n </span>\n );\n }\n return (\n <span\n className={cx('sc-skeleton', className)}\n data-variant={variant}\n data-still={still || undefined}\n aria-hidden=\"true\"\n style={size}\n {...rest}\n />\n );\n}\n","import { useEffect, useId, useRef, useState } from 'react';\nimport type * as FilePondApi from 'filepond';\nimport type { FilePond, FilePondFile, FilePondOptions } from 'filepond';\nimport type { FieldProps } from '../Field/FieldShell';\nimport { cx } from '../../utils/cx';\nimport {\n describeAccept,\n escapeHtml,\n matchesAccept,\n parseAccept,\n parseSize,\n rejectionMessage,\n type FileRejectionReason,\n} from './accept';\n\nexport interface FileInputProps extends FieldProps {\n /** Accepted types, as for the native attribute: `\".pdf,.docx,text/plain\"` or a list. Extensions, exact MIME types and `image/*` wildcards. */\n accept?: string | readonly string[] | undefined;\n /** How the accepted types read in the error message. Default derived from `accept` (\"PDF, DOCX or plain text\"). */\n acceptLabel?: string | undefined;\n /** Largest file accepted, in bytes or as `\"10MB\"` (base 1000, like the size shown in the list). */\n maxFileSize?: number | string | undefined;\n /** Allows several files. Without it a new file replaces the current one. */\n multiple?: boolean | undefined;\n /** With `multiple`, the most files the list holds. */\n maxFiles?: number | undefined;\n /** Controlled list of accepted files. Pass `[]` to clear. */\n files?: readonly File[] | undefined;\n /** Initial files when uncontrolled. */\n defaultFiles?: readonly File[] | undefined;\n /** Called with the accepted files (plain `File` objects) after every add or remove. Rejected files never appear here. */\n onFilesChange?: ((files: File[]) => void) | undefined;\n /** Drop zone text before the browse link. Default \"Drop a file here or\" (or \"Drop files here or\" with `multiple`). */\n idleLabel?: string | undefined;\n /** The browse link's text. Default \"browse\". */\n browseLabel?: string | undefined;\n}\n\ntype FilePondModule = typeof FilePondApi;\n\nconst REMOVE_ICON =\n '<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M4 4l8 8M12 4l-8 8\"/></svg>';\n\nconst sameFiles = (a: readonly File[], b: readonly File[]) =>\n a.length === b.length && a.every((file, i) => file === b[i]);\n\n/**\n * A labelled file picker with a drop zone, on FilePond (docs/adr/0004). Files stay in the browser: the\n * component hands plain `File` objects to `onFilesChange`, and with `name` it also keeps them in a file\n * input so a `<form>` (or a Server Action) submits them. Type, size and count are checked before a file\n * joins the list; a rejected file never joins it, and the reason shows in the field's error slot and is\n * announced. FilePond loads on mount, so the server renders a static drop zone and nothing of FilePond.\n */\nexport function FileInput({\n label,\n hideLabel = false,\n description,\n error,\n invalid = false,\n required = false,\n disabled = false,\n name,\n size = 'md',\n className,\n accept,\n acceptLabel,\n maxFileSize,\n multiple = false,\n maxFiles,\n files,\n defaultFiles,\n onFilesChange,\n idleLabel,\n browseLabel = 'browse',\n}: FileInputProps) {\n const id = useId();\n const labelId = `${id}label`;\n const descriptionId = `${id}description`;\n const messagesId = `${id}messages`;\n\n const controlled = files !== undefined;\n const [uncontrolledFiles, setUncontrolledFiles] = useState<readonly File[]>(defaultFiles ?? []);\n const current = controlled ? files : uncontrolledFiles;\n\n const [rejections, setRejections] = useState<string[]>([]);\n const [inputId, setInputId] = useState<string>();\n /** Bumps every time a pond is created, so the sync effects run against the new instance. */\n const [pondVersion, setPondVersion] = useState(0);\n\n const hostRef = useRef<HTMLDivElement>(null);\n const pondRef = useRef<FilePond | null>(null);\n const moduleRef = useRef<FilePondModule | null>(null);\n const patchRef = useRef<() => void>(() => {});\n /** The files last handed out (or received), so FilePond's repeated events don't re-emit. */\n const settledRef = useRef<readonly File[]>(current);\n /** While the pond is being brought to the `files` prop, the list it should reach. */\n const targetRef = useRef<readonly File[] | null>(null);\n\n const acceptList = parseAccept(accept);\n const acceptAttr = acceptList.join(',');\n const maxBytes = parseSize(maxFileSize);\n const messages = [...rejections, ...(error != null ? [error] : [])];\n const isInvalid = invalid || messages.length > 0;\n const idleText =\n idleLabel ??\n (multiple\n ? 'Drop files here or'\n : current.length > 0\n ? 'Drop another file to replace it, or'\n : 'Drop a file here or');\n\n // Everything the long-lived FilePond callbacks read, refreshed on every render.\n const live = {\n acceptList,\n acceptLabel: acceptLabel ?? describeAccept(acceptList),\n maxBytes,\n maxFiles: multiple ? maxFiles : 1,\n multiple,\n current,\n controlled,\n onFilesChange,\n labelId,\n describedBy: [description != null ? descriptionId : null, messages.length > 0 ? messagesId : null],\n isInvalid,\n acceptAttr,\n };\n const liveRef = useRef(live);\n useEffect(() => {\n liveRef.current = live;\n });\n\n // Create the pond on mount; destroy it on unmount (and between StrictMode's double mount).\n useEffect(() => {\n let cancelled = false;\n let pond: FilePond | null = null;\n let observer: MutationObserver | null = null;\n const host = hostRef.current;\n if (!host) return undefined;\n\n const reject = (reason: FileRejectionReason, file?: File) => {\n const l = liveRef.current;\n const message = rejectionMessage(reason, {\n name: file?.name,\n size: file?.size,\n acceptLabel: l.acceptLabel,\n maxFileSize: l.maxBytes,\n maxFiles: l.maxFiles,\n });\n setRejections((list) => (list.includes(message) ? list : [...list, message]));\n // A file the `files` prop asked for but that fails validation: stop waiting for it.\n if (file && targetRef.current) {\n targetRef.current = targetRef.current.filter((f) => f !== file);\n queueMicrotask(emit);\n }\n };\n // A new drop or browse starts a new attempt: earlier rejections no longer apply.\n const startAttempt = () => setRejections((list) => (list.length ? [] : list));\n let removeIntent = false;\n const acceptedIds = new Set<string>();\n const noteRemove = (event: Event) => {\n if ((event.target as Element | null)?.closest?.('.filepond--action-remove-item')) removeIntent = true;\n };\n\n const emit = () => {\n const mod = moduleRef.current;\n if (!pond || !mod) return;\n const idle = pond\n .getFiles()\n .filter((item: FilePondFile) => item.status === mod.FileStatus.IDLE)\n .map((item: FilePondFile) => item.file as File);\n // Single mode: a new accepted file replaces the old one, which leaves a beat later.\n const accepted = liveRef.current.multiple ? idle : idle.slice(-1);\n const target = targetRef.current;\n if (target) {\n if (!sameFiles(accepted, target)) return;\n targetRef.current = null;\n settledRef.current = accepted;\n // The prop (or `defaultFiles`) asked for a file that was rejected: report what the pond holds.\n if (!sameFiles(accepted, liveRef.current.current)) {\n if (!liveRef.current.controlled) setUncontrolledFiles(accepted);\n liveRef.current.onFilesChange?.(accepted);\n }\n return;\n }\n if (sameFiles(accepted, settledRef.current)) return;\n settledRef.current = accepted;\n if (!liveRef.current.controlled) setUncontrolledFiles(accepted);\n liveRef.current.onFilesChange?.(accepted);\n };\n\n // Keeps FilePond's DOM wired to our label, description, errors and keyboard model.\n const patch = () => {\n if (!pond) return;\n const l = liveRef.current;\n const root = pond.element;\n if (!root) return;\n const set = (el: Element | null, attr: string, value: string | null) => {\n if (!el || el.getAttribute(attr) === value) return;\n if (value == null) el.removeAttribute(attr);\n else el.setAttribute(attr, value);\n };\n const input = root.querySelector<HTMLInputElement>('input.filepond--browser');\n const dropLabel = root.querySelector('.filepond--drop-label label');\n set(input, 'aria-labelledby', l.labelId);\n set(input, 'aria-describedby', [dropLabel?.id, ...l.describedBy].filter(Boolean).join(' ') || null);\n set(input, 'aria-invalid', l.isInvalid ? 'true' : null);\n set(input, 'accept', l.acceptAttr || null);\n // FilePond always runs in multi mode here (see `addfile`); the picker follows `multiple`.\n set(input, 'multiple', l.multiple ? '' : null);\n // One tab stop: the file input. FilePond also makes the \"browse\" text focusable, with no role.\n set(root.querySelector('.filepond--label-action'), 'tabindex', null);\n for (const item of root.querySelectorAll('.filepond--item')) {\n const fileName = item.querySelector('.filepond--file-info-main')?.textContent?.trim();\n if (fileName)\n set(item.querySelector('.filepond--action-remove-item'), 'aria-label', `Remove ${fileName}`);\n }\n // FilePond drops its file input while disabled; the label's `for` follows.\n setInputId(input?.id || undefined);\n };\n\n void import('filepond').then((mod) => {\n if (cancelled || !mod.supported()) return;\n moduleRef.current = mod;\n const options: FilePondOptions = {\n credits: false,\n allowPaste: false,\n allowReorder: false,\n allowProcess: false,\n allowRevert: false,\n instantUpload: false,\n dropOnPage: false,\n // Always multi: FilePond's own single mode replaces the current file *before* validating the new\n // one, so a rejected file would discard a good one. Replacement happens in `addfile` instead.\n allowMultiple: true,\n allowReplace: false,\n itemInsertLocation: 'after',\n fileSizeBase: 1000,\n iconRemove: REMOVE_ICON,\n labelButtonRemoveItem: 'Remove',\n styleButtonRemoveItemPosition: 'right',\n beforeAddFile: (item) => {\n const l = liveRef.current;\n const file = item.file as File;\n if (!matchesAccept(file, l.acceptList)) return (reject('type', file), false);\n if (l.maxBytes != null && file.size > l.maxBytes) return (reject('size', file), false);\n return true;\n },\n };\n // At runtime `create(options)` builds a detached root; the typings only declare `create(element, options)`.\n pond = (mod.create as unknown as (o: FilePondOptions) => FilePond)(options);\n const root = pond.element;\n if (!root) return;\n host.appendChild(root);\n pondRef.current = pond;\n patchRef.current = patch;\n pond.on('addfile', (error: unknown, added: FilePondFile) => {\n if (!error) acceptedIds.add(added.id);\n if (!error && !liveRef.current.multiple)\n for (const other of pond?.getFiles() ?? []) if (other.id !== added.id) pond?.removeFile(other.id);\n emit();\n });\n pond.on('removefile', (_error: unknown, removed: FilePondFile) => {\n // Removing with the × takes focus with it; hand it back to the field's control.\n const active = document.activeElement;\n const inRemovedRow = active?.closest('.filepond--item')?.id === `filepond--item-${removed.id}`;\n if (inRemovedRow || (removeIntent && (active == null || active === document.body)))\n root.querySelector<HTMLInputElement>('input.filepond--browser')?.focus();\n removeIntent = false;\n // An accepted file leaving (the × or the `files` prop) ends the attempt a rejection was about. A\n // rejected file never fired `addfile`, so its own removal keeps the message.\n if (acceptedIds.delete(removed.id)) startAttempt();\n emit();\n });\n pond.on('updatefiles', emit);\n pond.on('warning', (warning: { body?: string } | undefined) => {\n if (warning?.body === 'Max files') reject('count');\n });\n observer = new MutationObserver(patch);\n observer.observe(root, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: ['tabindex', 'aria-labelledby', 'aria-describedby', 'accept', 'id', 'multiple'],\n });\n host.addEventListener('drop', startAttempt, true);\n host.addEventListener('change', startAttempt, true);\n host.addEventListener('click', noteRemove, true);\n settledRef.current = [];\n setPondVersion((v) => v + 1);\n });\n\n return () => {\n cancelled = true;\n host.removeEventListener('drop', startAttempt, true);\n host.removeEventListener('change', startAttempt, true);\n host.removeEventListener('click', noteRemove, true);\n observer?.disconnect();\n if (pond) {\n pond.element?.remove();\n pond.destroy();\n }\n pondRef.current = null;\n patchRef.current = () => {};\n };\n }, []);\n\n // Props → FilePond options and DOM wiring.\n useEffect(() => {\n const pond = pondRef.current;\n if (!pond) return;\n pond.setOptions({\n name: name ?? '',\n storeAsFile: name != null,\n disabled,\n required,\n maxFiles: multiple ? (maxFiles ?? null) : null,\n allowRemove: !disabled,\n labelIdle: `${escapeHtml(idleText)} <span class=\"filepond--label-action\">${escapeHtml(browseLabel)}</span>`,\n });\n // FilePond rewrites some attributes on its next frame; the MutationObserver re-patches then.\n patchRef.current();\n }, [\n pondVersion,\n name,\n disabled,\n required,\n multiple,\n maxFiles,\n idleText,\n browseLabel,\n labelId,\n acceptAttr,\n isInvalid,\n description,\n messages.length,\n ]);\n\n // The `files` prop (or `defaultFiles`) → the pond's list.\n useEffect(() => {\n const pond = pondRef.current;\n const mod = moduleRef.current;\n if (!pond || !mod) return;\n const items = pond.getFiles();\n const idle = items.filter((item) => item.status === mod.FileStatus.IDLE);\n const inPond = idle.map((item) => item.file as File);\n if (sameFiles(inPond, current)) {\n settledRef.current = current;\n return;\n }\n targetRef.current = current;\n for (const item of idle) if (!current.includes(item.file as File)) pond.removeFile(item.id);\n const toAdd = current.filter((file) => !inPond.includes(file));\n if (toAdd.length > 0) void pond.addFiles(toAdd);\n }, [current, pondVersion]);\n\n const ready = pondVersion > 0;\n return (\n <div\n className={cx('sc-field', 'sc-file-input-field', className)}\n data-size={size}\n data-disabled={disabled ? '' : undefined}\n data-invalid={isInvalid ? '' : undefined}\n >\n <label\n id={labelId}\n htmlFor={inputId}\n className={cx('sc-field__label', hideLabel && 'sc-visually-hidden')}\n >\n {label}\n {required ? (\n <span className=\"sc-field__required\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </label>\n <div\n className=\"sc-file-input\"\n data-ready={ready ? '' : undefined}\n data-disabled={disabled ? '' : undefined}\n data-invalid={isInvalid ? '' : undefined}\n data-multiple={multiple ? '' : undefined}\n >\n {ready ? null : (\n // Server render and first paint: the same drop zone, inert until FilePond takes over.\n <div className=\"sc-file-input__placeholder\" aria-hidden=\"true\">\n {idleText} <span className=\"sc-file-input__browse\">{browseLabel}</span>\n </div>\n )}\n {/* FilePond's root is appended here; React never renders children into this node. */}\n <div ref={hostRef} className=\"sc-file-input__pond\" />\n </div>\n {description != null ? (\n <p id={descriptionId} className=\"sc-field__description\">\n {description}\n </p>\n ) : null}\n {/* Always present so a rejection that appears after a drop is announced. */}\n <div id={messagesId} className=\"sc-file-input__messages\" aria-live=\"polite\">\n {messages.map((message, i) => (\n <p key={i} className=\"sc-field__error\">\n {message}\n </p>\n ))}\n </div>\n </div>\n );\n}\n","// Pure helpers for FileInput: parsing `accept` and sizes, matching files, and wording the messages.\n\n/** Splits `accept` (a native accept string or a list) into lower-cased entries. */\nexport function parseAccept(accept: string | readonly string[] | undefined): string[] {\n if (accept == null) return [];\n const list = typeof accept === 'string' ? accept.split(',') : accept;\n return list.map((entry) => entry.trim().toLowerCase()).filter(Boolean);\n}\n\n/**\n * Matches a file the way the native `accept` attribute does: `.pdf` against the name, `image/*` against\n * the type's prefix, `application/pdf` exactly. An empty list accepts everything.\n */\nexport function matchesAccept(file: { name: string; type: string }, accept: readonly string[]): boolean {\n if (accept.length === 0) return true;\n const name = file.name.toLowerCase();\n const type = file.type.toLowerCase();\n return accept.some((entry) => {\n if (entry.startsWith('.')) return name.endsWith(entry);\n if (entry.endsWith('/*')) return type.startsWith(entry.slice(0, -1));\n return type === entry;\n });\n}\n\nconst UNITS: Record<string, number> = { b: 1, kb: 1e3, mb: 1e6, gb: 1e9 };\n\n/** Bytes from a number or a string such as `\"10MB\"` or `\"500 KB\"` (base 1000, like the file list). */\nexport function parseSize(size: number | string | undefined): number | undefined {\n if (size == null) return undefined;\n if (typeof size === 'number') return size;\n const match = /^\\s*(\\d+(?:\\.\\d+)?)\\s*(b|kb|mb|gb)\\s*$/i.exec(size);\n if (!match) throw new Error(`FileInput: maxFileSize \"${size}\" is not a size like \"10MB\".`);\n return Math.round(Number(match[1]) * UNITS[match[2]!.toLowerCase()]!);\n}\n\n/** `1500000` → `1.5 MB`. Base 1000, at most one decimal, matching FilePond's own size line. */\nexport function formatSize(bytes: number): string {\n const [unit, base] =\n bytes >= 1e9 ? ['GB', 1e9] : bytes >= 1e6 ? ['MB', 1e6] : bytes >= 1e3 ? ['KB', 1e3] : ['bytes', 1];\n const value = bytes / base;\n return `${Number.isInteger(value) ? value : Number(value.toFixed(1))} ${unit}`;\n}\n\nconst MIME_NAMES: Record<string, string> = {\n 'application/pdf': 'PDF',\n 'application/msword': 'DOC',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'DOCX',\n 'application/json': 'JSON',\n 'text/plain': 'plain text',\n 'text/markdown': 'Markdown',\n 'text/csv': 'CSV',\n 'image/png': 'PNG',\n 'image/jpeg': 'JPEG',\n};\n\n/** A short human list of the accepted types: `.pdf, .docx, text/plain` → `PDF, DOCX or plain text`. */\nexport function describeAccept(accept: readonly string[]): string {\n const names = accept.map((entry) => {\n if (entry.startsWith('.')) return entry.slice(1).toUpperCase();\n if (entry.endsWith('/*')) return `any ${entry.slice(0, -2)}`;\n return MIME_NAMES[entry] ?? entry.split('/').pop()!.toUpperCase();\n });\n const unique = [...new Set(names)];\n if (unique.length <= 1) return unique[0] ?? '';\n return `${unique.slice(0, -1).join(', ')} or ${unique.at(-1)}`;\n}\n\nexport type FileRejectionReason = 'type' | 'size' | 'count';\n\nexport function rejectionMessage(\n reason: FileRejectionReason,\n detail: {\n name?: string | undefined;\n size?: number | undefined;\n acceptLabel?: string | undefined;\n maxFileSize?: number | undefined;\n maxFiles?: number | undefined;\n },\n): string {\n switch (reason) {\n case 'type':\n return `${detail.name} is not an accepted file type. Use ${detail.acceptLabel}.`;\n case 'size':\n return `${detail.name} is ${formatSize(detail.size ?? 0)}, over the ${formatSize(detail.maxFileSize ?? 0)} limit.`;\n case 'count':\n return detail.maxFiles === 1\n ? 'Choose one file.'\n : `Up to ${detail.maxFiles} files. Remove one to add another.`;\n }\n}\n\n/** Escapes text for FilePond's `labelIdle`, which it sets as HTML. */\nexport function escapeHtml(text: string): string {\n return text.replace(\n /[&<>\"']/g,\n (ch) => ({ '&': '&', '<': '<', '>': '>', '\"': '"', \"'\": ''' })[ch]!,\n );\n}\n","import {\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type ComponentPropsWithRef,\n type FocusEvent,\n type CSSProperties,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { ChevronDownIcon, MoreHorizontalIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\nimport { fitCount, inlineFlags, isOverflowing } from './fit';\nimport { placePanel } from './place';\n\nexport interface PriorityNavItem {\n /** Where the link goes. */\n href: string;\n /** The visible text. A string (or number) is part of the width cache key; see `PriorityNav`. */\n label: ReactNode;\n /** A stable key. Defaults to `href`. */\n id?: string | undefined;\n /** The page being shown: `aria-current=\"page\"`, and the link never collapses into \"More\". */\n current?: boolean | undefined;\n}\n\n/** What `renderLink` receives: spread it onto your link component. */\nexport interface PriorityNavLinkProps {\n href: string;\n className: string;\n 'aria-current': 'page' | undefined;\n onClick: MouseEventHandler<HTMLAnchorElement> | undefined;\n children: ReactNode;\n}\n\nexport interface PriorityNavProps extends Omit<ComponentPropsWithRef<'nav'>, 'children'> {\n /** Names the landmark: \"Main\". */\n 'aria-label': string;\n /** The links, in priority order: the first ones stay inline longest. */\n items: readonly PriorityNavItem[];\n /** Visible text of the overflow toggle. Default \"More\". */\n moreLabel?: string | undefined;\n /** Appended to the toggle's accessible name only: \"More, 3 links\". Default `n link(s)`. */\n moreCountLabel?: ((hidden: number) => string) | undefined;\n /** Renders each link. Default a plain `<a>`; pass a router link: `(props) => <Link {...props} />`. */\n renderLink?: ((props: PriorityNavLinkProps, item: PriorityNavItem) => ReactElement) | undefined;\n /**\n * Called when links start or stop collapsing into \"More\" (also `data-overflowing` on the `nav`), so a\n * header can make room, e.g. an action button going icon-only.\n */\n onOverflowChange?: ((overflowing: boolean) => void) | undefined;\n /**\n * Room in px the row must have beyond fitting every link before it stops reporting overflow. Set it to\n * the space your header gives back on overflow (the button label's width), so the two cannot oscillate.\n * Default 0.\n */\n overflowHysteresis?: number | undefined;\n}\n\nconst defaultCountLabel = (n: number) => (n === 1 ? '1 link' : `${n} links`);\nconst defaultLink = ({ children, ...props }: PriorityNavLinkProps) => <a {...props}>{children}</a>;\nconst keyOf = (item: PriorityNavItem) => item.id ?? item.href;\n\n/** CSS anchor positioning places the panel where it exists; elsewhere `placePanel` does, from JS. */\nconst supportsAnchor = () =>\n typeof CSS !== 'undefined' && typeof CSS.supports === 'function' && CSS.supports('anchor-name: --a');\n/** The Popover API puts the panel in the top layer, above every ancestor's overflow clip. */\nconst supportsPopover = (el: HTMLElement) => typeof el.showPopover === 'function';\n\n/** Widths are re-measured when this changes: the keys and any string labels, in order. */\nfunction signatureOf(items: readonly PriorityNavItem[]): string {\n return items\n .map((item) => {\n const text = typeof item.label === 'string' || typeof item.label === 'number' ? item.label : '';\n return `${keyOf(item)}\\u0001${text}`;\n })\n .join('\\u0002');\n}\n\ninterface Fit {\n /** The item signature these numbers were measured for; `null` until the first measurement. */\n signature: string | null;\n /** The current index `count` was computed with. */\n current: number;\n /** How many non-current items are inline (`fitCount`). */\n count: number;\n /** Latched overflow signal (`isOverflowing`). */\n overflowing: boolean;\n}\n\ninterface Measured {\n widths: number[];\n more: number;\n gap: number;\n available: number;\n}\n\n/**\n * Priority+ navigation: a row of primary links that keeps the ones that fit inline and collapses the rest\n * into a \"More\" disclosure at the end of the row. The current page is never collapsed. Follows the\n * WAI-ARIA APG disclosure navigation pattern (links in a list, a real button with `aria-expanded`), not\n * `role=\"menu\"`. Server-renders every link inline, so it works before hydration and without JavaScript;\n * see docs/adr/0005-priority-nav.md.\n */\nexport function PriorityNav({\n items,\n moreLabel = 'More',\n moreCountLabel = defaultCountLabel,\n renderLink = defaultLink,\n onOverflowChange,\n overflowHysteresis = 0,\n className,\n style,\n ...rest\n}: PriorityNavProps) {\n const signature = signatureOf(items);\n const current = items.findIndex((item) => item.current);\n const [fit, setFit] = useState<Fit>({ signature: null, current: -1, count: 0, overflowing: false });\n const [open, setOpen] = useState(false);\n const panelId = useId();\n const listRef = useRef<HTMLUListElement>(null);\n const moreRef = useRef<HTMLLIElement>(null);\n const toggleRef = useRef<HTMLButtonElement>(null);\n const panelRef = useRef<HTMLUListElement>(null);\n const measured = useRef<Measured | null>(null);\n const currentRef = useRef(current);\n const fitRef = useRef(fit);\n const hysteresisRef = useRef(overflowHysteresis);\n const onOverflowRef = useRef(onOverflowChange);\n\n /** The split for the cached measurements: how many links stay inline, and the latched overflow flag. */\n const solve = (m: Measured, cur: number, was: boolean) => ({\n count: fitCount({ ...m, current: cur }),\n overflowing: isOverflowing({ ...m, was, hysteresis: hysteresisRef.current }),\n });\n\n // Until the items are measured (on the server, before hydration, after the items or the fonts change)\n // every link renders inline in a single line that clips (or scrolls without JS), and the toggle is laid\n // out invisibly so it can be measured too.\n const measuring = fit.signature !== signature;\n\n // Measure once per signature, then split. Reads first (all widths, the gap, the row), then one state\n // write; React re-renders before paint, so the measuring pass is never seen.\n useLayoutEffect(() => {\n currentRef.current = current;\n fitRef.current = fit;\n hysteresisRef.current = overflowHysteresis;\n onOverflowRef.current = onOverflowChange;\n });\n\n useLayoutEffect(() => {\n const list = listRef.current;\n const more = moreRef.current;\n if (!list || !more) return;\n if (measuring) {\n const widths = Array.from(\n list.querySelectorAll<HTMLElement>(':scope > .sc-priority-nav__item'),\n (el) => el.getBoundingClientRect().width,\n );\n measured.current = {\n widths,\n more: more.getBoundingClientRect().width,\n gap: parseFloat(getComputedStyle(list).columnGap) || 0,\n available: list.clientWidth,\n };\n } else if (fit.current === current) return;\n const m = measured.current;\n if (!m) return;\n setFit({ signature, current, ...solve(m, current, fit.overflowing) });\n }, [measuring, signature, current, fit]);\n\n // One observer, on the row and on the \"More\" item. Its callback reads sizes from the entries (no layout\n // read): the row's width, and the toggle's width when it switches between \"More\" and icon-only (a\n // container query). It writes state only when the inline count or the overflow flag changes.\n useEffect(() => {\n const list = listRef.current;\n const more = moreRef.current;\n if (!list || !more || typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver((entries) => {\n const m = measured.current;\n if (!m) return;\n for (const entry of entries) {\n if (entry.target === list)\n m.available = entry.contentBoxSize?.[0]?.inlineSize ?? entry.contentRect.width;\n else {\n // Hidden (no overflow) reports 0; keep the last real width.\n const width = entry.borderBoxSize?.[0]?.inlineSize ?? 0;\n if (width > 0) m.more = width;\n }\n }\n // Compare before calling setState: an unchanged split must not even schedule a render.\n const prev = fitRef.current;\n if (prev.signature === null) return;\n const next = solve(m, currentRef.current, prev.overflowing);\n if (prev.count !== next.count || prev.overflowing !== next.overflowing) setFit({ ...prev, ...next });\n });\n observer.observe(list);\n observer.observe(more);\n return () => observer.disconnect();\n }, []);\n\n // Tell the header when the overflow flag changes (not on mount: it starts false everywhere).\n const reported = useRef(false);\n useEffect(() => {\n if (reported.current === fit.overflowing) return;\n reported.current = fit.overflowing;\n onOverflowRef.current?.(fit.overflowing);\n }, [fit.overflowing]);\n\n // Web fonts change every width. If they are still loading at mount, measure again once they are ready.\n useEffect(() => {\n const fonts = typeof document === 'undefined' ? undefined : document.fonts;\n if (!fonts || fonts.status === 'loaded') return;\n let live = true;\n void fonts.ready.then(() => {\n if (live) setFit((prev) => ({ ...prev, signature: null }));\n });\n return () => {\n live = false;\n };\n }, []);\n\n const flags = measuring ? null : inlineFlags(items.length, current, fit.count);\n const overflow = flags ? items.filter((_, i) => !flags[i]) : [];\n const expanded = open && overflow.length > 0;\n\n // The panel lives in the top layer while open (popover=\"manual\": opening, Escape, outside clicks and\n // focus stay ours, so behaviour is the same with or without the Popover API). It stays a DOM sibling of\n // the toggle, so Tab moves from the toggle into the links with no invoker wiring.\n useLayoutEffect(() => {\n const panel = panelRef.current;\n if (!panel || !supportsPopover(panel)) return;\n // Set on the client only, where the API exists: the server HTML and browsers without it keep `hidden`.\n if (!panel.hasAttribute('popover')) panel.setAttribute('popover', 'manual');\n const shown = panel.matches(':popover-open');\n if (expanded && !shown) panel.showPopover();\n else if (!expanded && shown) panel.hidePopover();\n }, [expanded]);\n\n // Without CSS anchor positioning: place the panel from JS on open, and again on resize or scroll while\n // open. Each pass reads (two rects, one computed style), then writes `left`/`top` once.\n useLayoutEffect(() => {\n const panel = panelRef.current;\n const toggle = toggleRef.current;\n if (!expanded || !panel || !toggle || supportsAnchor()) return;\n const place = () => {\n const anchor = toggle.getBoundingClientRect();\n const box = panel.getBoundingClientRect();\n const css = getComputedStyle(panel);\n const { left, top } = placePanel({\n anchor,\n panel: { width: box.width, height: box.height },\n viewport: { width: document.documentElement.clientWidth, height: window.innerHeight },\n gutter: parseFloat(css.getPropertyValue('--sc-spacing-md')) || 16,\n offset: parseFloat(css.getPropertyValue('--sc-spacing-2xs')) || 4,\n rtl: css.direction === 'rtl',\n });\n panel.style.left = `${left}px`;\n panel.style.top = `${top}px`;\n };\n place();\n window.addEventListener('resize', place, { passive: true });\n window.addEventListener('scroll', place, { passive: true, capture: true });\n return () => {\n window.removeEventListener('resize', place);\n window.removeEventListener('scroll', place, { capture: true });\n panel.style.left = '';\n panel.style.top = '';\n };\n }, [expanded]);\n\n // Click outside and Escape close the panel. Escape returns focus to the toggle.\n useEffect(() => {\n if (!expanded) return;\n const onPointerDown = (event: PointerEvent) => {\n if (!moreRef.current?.contains(event.target as Node)) setOpen(false);\n };\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n const active = document.activeElement;\n setOpen(false);\n if (!active || active === document.body || moreRef.current?.contains(active))\n toggleRef.current?.focus();\n };\n document.addEventListener('pointerdown', onPointerDown);\n document.addEventListener('keydown', onKeyDown);\n return () => {\n document.removeEventListener('pointerdown', onPointerDown);\n document.removeEventListener('keydown', onKeyDown);\n };\n }, [expanded]);\n\n // Focus leaving the \"More\" item (Tab past the last link) closes the panel, as in the APG example.\n const onBlur = (event: FocusEvent<HTMLLIElement>) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node | null)) setOpen(false);\n };\n\n const link = (item: PriorityNavItem, inPanel: boolean) =>\n renderLink(\n {\n href: item.href,\n className: 'sc-priority-nav__link',\n 'aria-current': item.current ? 'page' : undefined,\n onClick: inPanel ? () => setOpen(false) : undefined,\n children: <span className=\"sc-priority-nav__label\">{item.label}</span>,\n },\n item,\n );\n\n return (\n <nav\n className={cx('sc-priority-nav', className)}\n data-measuring={measuring || undefined}\n data-overflowing={fit.overflowing || undefined}\n // A per-instance anchor name, so two navs on a page never anchor to each other's toggle.\n style={{ ...style, '--_anchor': `--sc-priority-nav${panelId.replace(/[^\\w-]/g, '')}` } as CSSProperties}\n {...rest}\n >\n <ul ref={listRef} className=\"sc-priority-nav__list\">\n {items.map((item, i) =>\n flags && !flags[i] ? null : (\n <li key={keyOf(item)} className=\"sc-priority-nav__item\" data-current={item.current || undefined}>\n {link(item, false)}\n </li>\n ),\n )}\n <li\n ref={moreRef}\n className=\"sc-priority-nav__more\"\n hidden={measuring || overflow.length === 0}\n onBlur={onBlur}\n >\n <button\n ref={toggleRef}\n type=\"button\"\n className=\"sc-priority-nav__toggle\"\n aria-expanded={expanded}\n aria-controls={panelId}\n onClick={() => setOpen((o) => !o)}\n >\n {/* Narrow navs (a container query) show only the ellipsis; the label stays in the name. */}\n <MoreHorizontalIcon className=\"sc-priority-nav__ellipsis\" />\n <span className=\"sc-priority-nav__toggle-label\">{moreLabel}</span>\n <span className=\"sc-visually-hidden\">, {moreCountLabel(overflow.length)}</span>\n <ChevronDownIcon size=\"sm\" className=\"sc-priority-nav__chevron\" />\n </button>\n <ul ref={panelRef} id={panelId} className=\"sc-priority-nav__panel\" hidden={!expanded}>\n {overflow.map((item) => (\n <li key={keyOf(item)}>{link(item, true)}</li>\n ))}\n </ul>\n </li>\n </ul>\n </nav>\n );\n}\n","// Pure layout arithmetic for PriorityNav: no DOM, unit-tested in fit.test.ts.\n\nexport interface FitInput {\n /** Measured inline size of each item, in order, px. */\n widths: readonly number[];\n /** Index of the current item, or -1. It is always kept inline. */\n current: number;\n /** Inline size of the row, px. */\n available: number;\n /** Inline size of the \"More\" item, px. */\n more: number;\n /** Gap between items, px. */\n gap: number;\n}\n\n/** Sub-pixel slack: measured widths are fractional and a row that fits exactly must not flip to \"More\". */\nconst EPSILON = 0.5;\n\n/**\n * How many of the non-current items stay inline, counted in order. Every item fits: all of them.\n * Otherwise room is made for the \"More\" item and the current item first, then items are added in order\n * until the next one does not fit. The run stays contiguous (a short item after a long one does not jump\n * the queue), so the row reads as the start of the list, plus the current page.\n */\n/** The inline size of every item in one row, gaps included. */\nexport function rowWidth(widths: readonly number[], gap: number): number {\n let total = 0;\n for (const w of widths) total += w;\n return widths.length > 1 ? total + gap * (widths.length - 1) : total;\n}\n\nexport function fitCount({ widths, current, available, more, gap }: FitInput): number {\n const n = widths.length;\n const hasCurrent = current >= 0 && current < n;\n const others = hasCurrent ? n - 1 : n;\n if (rowWidth(widths, gap) <= available + EPSILON) return others;\n\n let used = more + (hasCurrent ? widths[current]! + gap : 0);\n let count = 0;\n for (let i = 0; i < n; i++) {\n if (i === current) continue;\n const next = used + widths[i]! + gap;\n if (next > available + EPSILON) break;\n used = next;\n count++;\n }\n return count;\n}\n\n/**\n * Which items are inline, given `fitCount`'s answer: the first `count` non-current items, plus the\n * current one wherever it sits. Everything else goes into \"More\", in its original order.\n */\nexport function inlineFlags(length: number, current: number, count: number): boolean[] {\n const flags: boolean[] = [];\n let seen = 0;\n for (let i = 0; i < length; i++) {\n if (i === current) flags.push(true);\n else flags.push(seen++ < count);\n }\n return flags;\n}\n\nexport interface OverflowInput {\n widths: readonly number[];\n gap: number;\n available: number;\n /** The previous answer. */\n was: boolean;\n /** Extra room required, beyond fitting every item, before an overflowing row reports that it fits again. */\n hysteresis: number;\n}\n\n/**\n * Whether the row reports `overflowing`, with hysteresis. It starts as soon as the items do not all fit.\n * Once started, it ends only when every item fits with `hysteresis` px to spare: when a header reacts to\n * overflow by giving the row more room (an action button drops its label), the row then fits, and without\n * the margin it would report \"fits\", the label would come back, and the row would overflow again.\n */\nexport function isOverflowing({ widths, gap, available, was, hysteresis }: OverflowInput): boolean {\n const total = rowWidth(widths, gap);\n return was ? total + Math.max(0, hysteresis) > available + EPSILON : total > available + EPSILON;\n}\n","// Fallback placement for the \"More\" panel where CSS anchor positioning is missing. Pure: rects in, a\n// viewport position out. Unit-tested in place.test.ts.\n\nexport interface Rect {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport interface PlaceInput {\n /** The toggle's viewport rect. */\n anchor: Rect;\n /** The panel's size. */\n panel: { width: number; height: number };\n /** The viewport's size. */\n viewport: { width: number; height: number };\n /** Minimum distance from every viewport edge, px. */\n gutter: number;\n /** Space between the toggle and the panel, px. */\n offset: number;\n /** Writing direction: the panel prefers the toggle's inline-end edge. */\n rtl?: boolean | undefined;\n}\n\nconst clamp = (value: number, min: number, max: number) => Math.max(min, Math.min(value, max));\n\n/**\n * Mirrors the CSS: below the toggle, aligned to its inline-end edge; if that runs past the inline-start\n * side of the viewport, aligned to its inline-start edge instead; then shifted to stay inside the gutter.\n * Below the toggle unless only above has room. The width is capped by CSS, so it always fits.\n */\nexport function placePanel({ anchor, panel, viewport, gutter, offset, rtl = false }: PlaceInput): {\n left: number;\n top: number;\n} {\n const endAligned = rtl ? anchor.left : anchor.right - panel.width;\n const startAligned = rtl ? anchor.right - panel.width : anchor.left;\n const fitsX = (x: number) => x >= gutter && x + panel.width <= viewport.width - gutter;\n const x = fitsX(endAligned) ? endAligned : fitsX(startAligned) ? startAligned : endAligned;\n const left = clamp(x, gutter, Math.max(gutter, viewport.width - gutter - panel.width));\n\n const below = anchor.bottom + offset;\n const above = anchor.top - offset - panel.height;\n const fitsBelow = below + panel.height <= viewport.height - gutter;\n const top = fitsBelow || above < gutter ? below : above;\n return { left, top };\n}\n","import { Popover as BasePopover } from '@base-ui/react/popover';\nimport type { ReactNode } from 'react';\nimport { Button } from '../Button/Button';\nimport { XIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type PopoverSide = 'top' | 'bottom' | 'left' | 'right';\nexport type PopoverAlign = 'start' | 'center' | 'end';\n\nexport interface PopoverRootProps {\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the popover opens or closes. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /** Default `false`: the page stays interactive and focus may leave. `true` makes the page inert until it closes. */\n modal?: boolean | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Owns the open state. Wrap a `Popover.Trigger` and a `Popover.Content`. */\nfunction Root({ open, defaultOpen, onOpenChange, modal = false, children }: PopoverRootProps) {\n return (\n <BasePopover.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange ? (next) => onOpenChange(next) : undefined}\n modal={modal}\n >\n {children}\n </BasePopover.Root>\n );\n}\n\nexport interface PopoverTriggerProps extends Omit<BasePopover.Trigger.Props, 'className'> {\n className?: string | undefined;\n}\n\n/**\n * Opens the popover. With no `render` it is a secondary Button; pass any Button or IconButton through\n * `render`: `<Popover.Trigger render={<IconButton label=\"Sweeps: running\" dot=\"success\" />}>`.\n */\nfunction Trigger({ render, className, children, ...rest }: PopoverTriggerProps) {\n return (\n <BasePopover.Trigger\n render={render ?? <Button variant=\"secondary\" className={className} />}\n className={render ? className : undefined}\n {...rest}\n >\n {children}\n </BasePopover.Trigger>\n );\n}\n\nexport interface PopoverContentProps extends Omit<BasePopover.Popup.Props, 'className'> {\n /** Side of the trigger it opens on; flips when there is no room. Default `bottom`. */\n side?: PopoverSide | undefined;\n /** Alignment along that side. Default `center`. */\n align?: PopoverAlign | undefined;\n /** Distance from the trigger in px. Default 4, or 8 with `arrow`. */\n sideOffset?: number | undefined;\n /** Draws a tip pointing at the trigger. */\n arrow?: boolean | undefined;\n className?: string | undefined;\n}\n\n/** Portal, positioner and the panel. Any content goes inside; name it with `Popover.Title`. */\nfunction Content({\n side = 'bottom',\n align = 'center',\n sideOffset,\n arrow = false,\n className,\n children,\n ...rest\n}: PopoverContentProps) {\n return (\n <BasePopover.Portal>\n <BasePopover.Positioner\n side={side}\n align={align}\n sideOffset={sideOffset ?? (arrow ? 8 : 4)}\n className=\"sc-popover__positioner\"\n >\n <BasePopover.Popup className={cx('sc-popover', className)} {...rest}>\n {arrow ? <BasePopover.Arrow className=\"sc-popover__arrow\" /> : null}\n {children}\n </BasePopover.Popup>\n </BasePopover.Positioner>\n </BasePopover.Portal>\n );\n}\n\nexport interface PopoverTitleProps extends Omit<BasePopover.Title.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** Names the popover (`aria-labelledby`). A heading, `h2` by default. */\nfunction Title({ className, ...rest }: PopoverTitleProps) {\n return <BasePopover.Title className={cx('sc-popover__title', className)} {...rest} />;\n}\n\nexport interface PopoverDescriptionProps extends Omit<BasePopover.Description.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** Describes the popover (`aria-describedby`). Muted text. */\nfunction Description({ className, ...rest }: PopoverDescriptionProps) {\n return <BasePopover.Description className={cx('sc-popover__description', className)} {...rest} />;\n}\n\nexport interface PopoverCloseProps extends Omit<BasePopover.Close.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** With no children or `render`, the × in the corner. Otherwise wraps any Button: `<Popover.Close render={<Button variant=\"ghost\" />}>Done</Popover.Close>`. */\nfunction Close({ className, children, render, ...rest }: PopoverCloseProps) {\n if (children === undefined && render === undefined) {\n return (\n <BasePopover.Close className={cx('sc-popover__close', className)} aria-label=\"Close\" {...rest}>\n <XIcon />\n </BasePopover.Close>\n );\n }\n return (\n <BasePopover.Close className={className} render={render} {...rest}>\n {children}\n </BasePopover.Close>\n );\n}\n\n/** A non-modal panel anchored to a trigger, for a small form, a status summary or a legend. Built on Base UI's Popover. */\nexport const Popover = { Root, Trigger, Content, Title, Description, Close };\n","import type { ComponentPropsWithRef } from 'react';\nimport type { IconSize } from '../Icon/Icon';\nimport { cx } from '../../utils/cx';\n\nexport interface BroomIconProps extends Omit<ComponentPropsWithRef<'svg'>, 'children'> {\n /** Sweeps back and forth while dust drifts. With `prefers-reduced-motion` it holds still and shows the dust. */\n sweeping?: boolean | undefined;\n /** The Icon sizes (`lg` 20, the nav size, is the default), or `display` (72px, stroke 1.75px) for empty states and showcases. Inside an IconButton it fills the icon slot one step up, since it is drawn on a 24px grid. */\n size?: IconSize | 'display' | undefined;\n /** Gives the icon an accessible name (`role=\"img\"`). Without it the icon is decorative and hidden from assistive tech. */\n title?: string | undefined;\n}\n\n/**\n * An animated broom on a 24×24 grid, for \"a sweep is running\". Inline SVG, because CSS cannot animate\n * inside a `<use>` clone. Strokes keep a fixed screen width at every size (`vector-effect: non-scaling-stroke`).\n * Decorative by default: say what is happening in the surrounding control's label (\"Sweeps: running\").\n */\nexport function BroomIcon({ sweeping = false, size = 'lg', title, className, ...rest }: BroomIconProps) {\n return (\n <svg\n className={cx('sc-icon', 'sc-broom', className)}\n data-size={size}\n data-sweeping={sweeping || undefined}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n focusable=\"false\"\n aria-hidden={title ? undefined : true}\n role={title ? 'img' : undefined}\n aria-label={title}\n {...rest}\n >\n <g\n className=\"sc-broom__body\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M16.1 10.48 L19.36 1.86 A0.87 0.87 0 0 1 20.98 2.47 L17.84 10.78\" />\n <path d=\"M13.33 12 C14.23 10.67 16.73 9.87 18.17 11 C19.07 12.67 18.93 18.33 18.4 21.4 C16.07 22.4 11.07 22.07 6.4 18.07 C9.07 16.67 11.8 15 13.33 12 Z\" />\n <path className=\"sc-broom__band\" d=\"M13.47 12.13 L18.4 13.5 L18.33 14.1 L13.27 12.77 Z\" />\n <path d=\"M12.87 13.73 L14.4 14.47 M16.2 15.27 L18.47 15.87\" />\n <path d=\"M12.8 16.87 C11.86 18.24 10.75 19.38 9.57 20.23 M15.6 17.4 C15.22 18.96 14.6 20.44 13.77 21.71\" />\n </g>\n <g className=\"sc-broom__dust\" fill=\"none\" stroke=\"currentColor\">\n <circle cx=\"4.77\" cy=\"13.53\" r=\"0.5\" />\n <circle cx=\"2.7\" cy=\"15.53\" r=\"0.87\" />\n <circle cx=\"4.1\" cy=\"18.27\" r=\"0.5\" />\n </g>\n </svg>\n );\n}\n","export { Button, type ButtonProps, type ButtonSize, type ButtonVariant } from './components/Button/Button';\nexport {\n Badge,\n type BadgeProps,\n type BadgeSize,\n type BadgeTone,\n type BadgeVariant,\n} from './components/Badge/Badge';\nexport {\n Card,\n type CardElement,\n type CardPadding,\n type CardProps,\n type CardVariant,\n} from './components/Card/Card';\nexport {\n Stack,\n type StackAlign,\n type StackElement,\n type StackJustify,\n type StackProps,\n} from './components/Stack/Stack';\nexport {\n Inline,\n type InlineAlign,\n type InlineElement,\n type InlineJustify,\n type InlineProps,\n} from './components/Inline/Inline';\nexport { Kbd, type KbdGroupProps, type KbdProps } from './components/Kbd/Kbd';\nexport {\n Dialog,\n type DialogActionsProps,\n type DialogBodyProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogRootProps,\n type DialogSize,\n type DialogTitleProps,\n type DialogVariant,\n} from './components/Dialog/Dialog';\nexport { Icon, type IconGlyphProps, type IconProps, type IconSize } from './components/Icon/Icon';\nexport * from './icons/icons.gen';\nexport { iconNames, type IconName } from './icons/icon-names.gen';\nexport { IconButton, type IconButtonDotTone, type IconButtonProps } from './components/IconButton/IconButton';\nexport {\n Tooltip,\n type TooltipAlign,\n type TooltipProps,\n type TooltipSide,\n} from './components/Tooltip/Tooltip';\nexport {\n Menu,\n type MenuAlign,\n type MenuCheckboxItemProps,\n type MenuContentProps,\n type MenuGroupProps,\n type MenuItemProps,\n type MenuItemTone,\n type MenuLinkItemProps,\n type MenuRadioGroupProps,\n type MenuRadioItemProps,\n type MenuRootProps,\n type MenuSeparatorProps,\n type MenuSide,\n type MenuTriggerProps,\n} from './components/Menu/Menu';\nexport type { ControlSize, FieldProps } from './components/Field/FieldShell';\nexport { Input, type InputProps } from './components/Input/Input';\nexport { Textarea, type TextareaProps, type TextareaVariant } from './components/Textarea/Textarea';\nexport { Select, type SelectGroup, type SelectOption, type SelectProps } from './components/Select/Select';\nexport { Checkbox, type CheckboxProps } from './components/Checkbox/Checkbox';\nexport { Switch, type SwitchProps } from './components/Switch/Switch';\nexport {\n Tabs,\n type TabsListProps,\n type TabsListVariant,\n type TabsPanelProps,\n type TabsRootProps,\n type TabsTabProps,\n} from './components/Tabs/Tabs';\nexport {\n Toolbar,\n type ToolbarButtonProps,\n type ToolbarGroupProps,\n type ToolbarLinkProps,\n type ToolbarRootProps,\n type ToolbarSeparatorProps,\n type ToolbarSpacerProps,\n} from './components/Toolbar/Toolbar';\nexport { Banner, type BannerProps, type BannerTone } from './components/Banner/Banner';\nexport { Spinner, type SpinnerProps } from './components/Spinner/Spinner';\nexport {\n Progress,\n type ProgressProps,\n type ProgressSize,\n type ProgressTone,\n type ProgressVariant,\n} from './components/Progress/Progress';\nexport {\n Heading,\n type HeadingElement,\n type HeadingLevel,\n type HeadingProps,\n type HeadingSize,\n type TextTone,\n} from './components/Heading/Heading';\nexport {\n Text,\n type TextAlign,\n type TextElement,\n type TextProps,\n type TextSize,\n type TextWeight,\n} from './components/Text/Text';\nexport {\n Table,\n type TableAlign,\n type TableBodyProps,\n type TableCaptionProps,\n type TableCellProps,\n type TableDensity,\n type TableFootProps,\n type TableHeadProps,\n type TableHeaderProps,\n type TableRootProps,\n type TableRowProps,\n type TableSelectionCellProps,\n type TableSelectionHeaderProps,\n type TableSortDirection,\n} from './components/Table/Table';\nexport { useRowSelection, type RowSelection } from './components/Table/useRowSelection';\nexport type { RowSelectionHeaderState } from './components/Table/rowSelection';\nexport { SelectionBar, type SelectionBarProps } from './components/SelectionBar/SelectionBar';\nexport {\n Toast,\n useToast,\n type ToastApi,\n type ToastOptions,\n type ToastProviderProps,\n type ToastTone,\n} from './components/Toast/Toast';\nexport {\n Stat,\n type StatDeltaTone,\n type StatElement,\n type StatProps,\n type StatSize,\n type StatTrend,\n type StatVariant,\n} from './components/Stat/Stat';\nexport { Chip, type ChipProps, type ChipSize, type ChipTone } from './components/Chip/Chip';\nexport { Disclosure, type DisclosureProps } from './components/Disclosure/Disclosure';\nexport {\n EmptyState,\n type EmptyStateElement,\n type EmptyStateProps,\n type EmptyStateSize,\n} from './components/EmptyState/EmptyState';\nexport { Skeleton, type SkeletonProps, type SkeletonVariant } from './components/Skeleton/Skeleton';\nexport type { SpacingSize } from './types';\nexport const version = '0.1.1';\nexport { FileInput, type FileInputProps } from './components/FileInput/FileInput';\nexport {\n PriorityNav,\n type PriorityNavItem,\n type PriorityNavLinkProps,\n type PriorityNavProps,\n} from './components/PriorityNav/PriorityNav';\nexport {\n Popover,\n type PopoverAlign,\n type PopoverCloseProps,\n type PopoverContentProps,\n type PopoverDescriptionProps,\n type PopoverRootProps,\n type PopoverSide,\n type PopoverTitleProps,\n type PopoverTriggerProps,\n} from './components/Popover/Popover';\nexport { BroomIcon, type BroomIconProps } from './components/BroomIcon/BroomIcon';\n"],"mappings":";;;AACO,SAAS,MAAM,OAAyD;AAC7E,SAAO,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AACvC;;;AC8CI,SAaI,KAbJ;AAvBG,SAAS,OAAO;AAAA,EACrB,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ;AAAA,EACA,WAAW;AAAA,EACX,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAgB;AACd,QAAM,cAAc,CAAC,UAAyC;AAC5D,QAAI,SAAS;AACX,YAAM,eAAe;AACrB;AAAA,IACF;AACA,cAAU,KAAK;AAAA,EACjB;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,aAAa,SAAS;AAAA,MACpC,gBAAc;AAAA,MACd,aAAW;AAAA,MACX,gBAAc,WAAW;AAAA,MACzB,mBAAiB,aAAa;AAAA,MAC9B,kBAAgB,YAAY;AAAA,MAC5B,aAAW,WAAW;AAAA,MACtB,SAAS;AAAA,MACR,GAAG;AAAA,MAEH;AAAA,oBACC,oBAAC,UAAK,WAAU,mBAAkB,eAAY,QAC3C,qBACH,IACE;AAAA,QACJ,oBAAC,UAAK,WAAU,oBAAoB,UAAS;AAAA,QAC5C,UACC,oBAAC,UAAK,WAAU,mBAAkB,eAAY,QAC3C,mBACH,IACE;AAAA,QACH,WACC,oBAAC,UAAK,WAAU,uBAAsB,eAAY,QAC/C,oBACH,IACE;AAAA,QACH,UAAU,oBAAC,UAAK,WAAU,sBAAqB,eAAY,QAAO,IAAK;AAAA;AAAA;AAAA,EAC1E;AAE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BAAAA,MAAC,YAAO,IAAG,OAAM,IAAG,SAAQ,GAAE,QAAO;AAAA,UACrC,gBAAAA,MAAC,YAAO,IAAG,OAAM,IAAG,SAAQ,GAAE,OAAM;AAAA,WACtC;AAAA;AAAA;AAAA,EACF;AAEJ;;;AC8GO,IAAM,UAAU;","names":["jsx","jsxs","createElement","createElement","jsx","jsxs","jsx","jsx","jsxs","jsx","jsxs","useRender","jsx","jsxs","Fragment","jsx","jsxs","useRender","Fragment","jsx","jsxs","Root","Trigger","Content","Field","jsx","jsxs","jsx","jsxs","Field","Field","jsx","Field","jsx","jsxs","jsx","jsxs","useId","jsx","jsxs","useId","Fragment","jsx","jsxs","Root","jsx","Root","Group","Separator","Button","useState","jsx","jsxs","useState","jsx","jsxs","jsx","jsxs","createElement","createElement","createElement","clamp","createElement","BaseCheckbox","jsx","jsxs","Root","Body","BaseCheckbox","useState","Fragment","jsx","jsxs","useState","useMemo","jsx","jsxs","Provider","useMemo","createElement","Fragment","jsx","jsxs","createElement","Fragment","jsx","jsxs","useEffect","useRef","useState","jsx","jsxs","useState","useRef","useEffect","createElement","jsx","createElement","jsx","useEffect","useId","useRef","useState","jsx","jsxs","useId","useState","useRef","useEffect","error","useEffect","useId","useLayoutEffect","useRef","useState","x","jsx","jsxs","defaultCountLabel","useState","useId","useRef","useLayoutEffect","useEffect","toggle","jsx","jsxs","Root","Trigger","Content","Title","Description","Close","jsx","jsxs"]}
|
|
1
|
+
{"version":3,"sources":["../src/utils/cx.ts","../src/components/Button/Button.tsx","../src/components/Badge/Badge.tsx","../src/components/Card/Card.tsx","../src/components/Stack/Stack.tsx","../src/components/Inline/Inline.tsx","../src/components/Kbd/Kbd.tsx","../src/components/Dialog/Dialog.tsx","../src/components/Icon/Icon.tsx","../src/icons/icons.gen.tsx","../src/icons/icon-names.gen.ts","../src/components/IconButton/IconButton.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/Menu/Menu.tsx","../src/components/Input/Input.tsx","../src/components/Field/FieldShell.tsx","../src/components/Textarea/Textarea.tsx","../src/components/Select/Select.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Switch/Switch.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Toolbar/Toolbar.tsx","../src/components/Banner/Banner.tsx","../src/components/Spinner/Spinner.tsx","../src/components/Progress/Progress.tsx","../src/components/Heading/Heading.tsx","../src/components/Text/Text.tsx","../src/components/Table/Table.tsx","../src/components/Table/useRowSelection.ts","../src/components/Table/rowSelection.ts","../src/components/SelectionBar/SelectionBar.tsx","../src/components/Toast/Toast.tsx","../src/components/Stat/Stat.tsx","../src/components/Chip/Chip.tsx","../src/components/Disclosure/Disclosure.tsx","../src/components/EmptyState/EmptyState.tsx","../src/components/Skeleton/Skeleton.tsx","../src/components/FileInput/FileInput.tsx","../src/components/FilePreviewDialog/FilePreviewDialog.tsx","../src/components/FileInput/accept.ts","../src/utils/useMediaQuery.ts","../src/components/PriorityNav/PriorityNav.tsx","../src/components/PriorityNav/fit.ts","../src/components/PriorityNav/place.ts","../src/components/Popover/Popover.tsx","../src/components/BroomIcon/BroomIcon.tsx","../src/index.ts"],"sourcesContent":["/** Joins class names, dropping falsy entries. */\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(' ');\n}\n","import type { ComponentPropsWithRef, MouseEvent, ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps extends ComponentPropsWithRef<'button'> {\n /** `primary` for the one main action in a view, `secondary` for the rest, `ghost` in toolbars and rows, `danger` for destructive confirmations. */\n variant?: ButtonVariant | undefined;\n /** 32, 40 or 48px tall. Compact density shrinks each by one step. */\n size?: ButtonSize | undefined;\n /** A 16px icon before the label. */\n iconStart?: ReactNode | undefined;\n /** A 16px icon after the label. */\n iconEnd?: ReactNode | undefined;\n /** Keeps the width, hides the label, shows a spinner, sets `aria-busy` and ignores clicks. */\n loading?: boolean | undefined;\n /** Stretches to the container. */\n fullWidth?: boolean | undefined;\n /** A keyboard hint after the label: `shortcut={<Kbd>N</Kbd>}`. Hidden from assistive tech; announce the key with `aria-keyshortcuts=\"n\"`. */\n shortcut?: ReactNode | undefined;\n /** Shows only `iconStart` (or `iconEnd`) in a square button; the label stays the accessible name and the shortcut hides. Toggles without remounting, e.g. when a header runs out of room. Pair with a Tooltip carrying the label. */\n iconOnly?: boolean | undefined;\n}\n\n/** The one way to trigger an action. Renders a native `<button>`; `type` defaults to `button`. */\nexport function Button({\n variant = 'primary',\n size = 'md',\n iconStart,\n iconEnd,\n loading = false,\n fullWidth = false,\n shortcut,\n iconOnly = false,\n type = 'button',\n className,\n children,\n onClick,\n ...rest\n}: ButtonProps) {\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n };\n return (\n <button\n type={type}\n className={cx('sc-button', className)}\n data-variant={variant}\n data-size={size}\n data-loading={loading || undefined}\n data-full-width={fullWidth || undefined}\n data-icon-only={iconOnly || undefined}\n aria-busy={loading || undefined}\n onClick={handleClick}\n {...rest}\n >\n {iconStart ? (\n <span className=\"sc-button__icon\" aria-hidden=\"true\">\n {iconStart}\n </span>\n ) : null}\n <span className=\"sc-button__label\">{children}</span>\n {iconEnd ? (\n <span className=\"sc-button__icon\" aria-hidden=\"true\">\n {iconEnd}\n </span>\n ) : null}\n {shortcut ? (\n <span className=\"sc-button__shortcut\" aria-hidden=\"true\">\n {shortcut}\n </span>\n ) : null}\n {loading ? <span className=\"sc-button__spinner\" aria-hidden=\"true\" /> : null}\n </button>\n );\n}\n","import type { ComponentPropsWithRef } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type BadgeTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\nexport type BadgeVariant = 'soft' | 'solid' | 'outline';\nexport type BadgeSize = 'sm' | 'md';\n\nexport interface BadgeProps extends ComponentPropsWithRef<'span'> {\n /** Color reinforces the status; the word is the status. */\n tone?: BadgeTone | undefined;\n /** `soft` tinted fill (default), `solid` filled, `outline` hairline. */\n variant?: BadgeVariant | undefined;\n /** `md` 24px (default) or `sm` 20px for table rows and Card headers. */\n size?: BadgeSize | undefined;\n /** A 6px dot before the label for scannable lists. */\n dot?: boolean | undefined;\n}\n\n/** One or two words of status beside a thing. Text only; never clickable. */\nexport function Badge({\n tone = 'neutral',\n variant = 'soft',\n size = 'md',\n dot = false,\n className,\n children,\n ...rest\n}: BadgeProps) {\n return (\n <span\n className={cx('sc-badge', className)}\n data-tone={tone}\n data-variant={variant}\n data-size={size}\n {...rest}\n >\n {dot ? <span className=\"sc-badge__dot\" aria-hidden=\"true\" /> : null}\n {children}\n </span>\n );\n}\n","import { useRender } from '@base-ui/react/use-render';\nimport { cx } from '../../utils/cx';\n\nexport type CardVariant = 'outlined' | 'elevated' | 'filled';\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\nexport type CardElement = 'div' | 'article' | 'section' | 'nav' | 'li' | 'a' | 'button';\n\nexport interface CardProps extends useRender.ComponentProps<'div'> {\n /** `outlined` hairline (default), `elevated` floats, `filled` is an inset region. */\n variant?: CardVariant | undefined;\n /** `none`, `sm` 12px, `md` 16px (default), `lg` 24px. */\n padding?: CardPadding | undefined;\n /** Hover lifts the card and the whole card is the target. Render it as `a` or `button` so it is a real control. */\n interactive?: boolean | undefined;\n /** Accent border with a 1px inset, for the active row or chosen option. */\n selected?: boolean | undefined;\n /** Element to render when `render` is not given. Use `nav` (with an `aria-label`) for a carded navigation landmark. */\n as?: CardElement | undefined;\n}\n\n/** A bordered surface that groups related content. Compose the inside with Stack and Inline. */\nexport function Card({\n variant = 'outlined',\n padding = 'md',\n interactive = false,\n selected = false,\n as = 'div',\n render,\n className,\n ref,\n ...rest\n}: CardProps) {\n return useRender({\n render,\n ref,\n defaultTagName: as,\n props: {\n className: cx('sc-card', className),\n 'data-variant': variant,\n 'data-padding': padding,\n 'data-interactive': interactive || undefined,\n 'data-selected': selected || undefined,\n ...rest,\n },\n });\n}\n","import { createElement, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport type { SpacingSize } from '../../types';\nimport { cx } from '../../utils/cx';\n\nexport type StackAlign = 'stretch' | 'start' | 'center' | 'end';\nexport type StackJustify = 'start' | 'center' | 'end' | 'between';\nexport type StackElement =\n | 'div'\n | 'section'\n | 'article'\n | 'ul'\n | 'ol'\n | 'li'\n | 'nav'\n | 'form'\n | 'fieldset'\n | 'header'\n | 'footer'\n | 'main'\n | 'aside'\n | 'dl';\n\nexport interface StackProps extends ComponentPropsWithRef<'div'> {\n /** Gap from the spacing scale. Default `sm` (12px). */\n gap?: SpacingSize | undefined;\n /** Cross-axis alignment. Default `stretch`. */\n align?: StackAlign | undefined;\n /** Main-axis distribution. Default `start`. */\n justify?: StackJustify | undefined;\n /** Element to render. Use `ul`/`ol` for lists and `li` for an item that stacks its own content, so semantics survive the layout. */\n as?: StackElement | undefined;\n /** Lays out as `inline-flex`. */\n inline?: boolean | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Vertical flex layout with a token gap. The only way children should be spaced vertically. */\nexport function Stack({\n gap = 'sm',\n align = 'stretch',\n justify = 'start',\n as = 'div',\n inline = false,\n className,\n ...rest\n}: StackProps) {\n return createElement(as, {\n className: cx('sc-stack', className),\n 'data-gap': gap,\n 'data-align': align,\n 'data-justify': justify,\n 'data-inline': inline || undefined,\n ...rest,\n });\n}\n","import { createElement, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport type { SpacingSize } from '../../types';\nimport { cx } from '../../utils/cx';\n\nexport type InlineAlign = 'center' | 'start' | 'end' | 'baseline' | 'stretch';\nexport type InlineJustify = 'start' | 'center' | 'end' | 'between';\nexport type InlineElement =\n 'div' | 'span' | 'ul' | 'ol' | 'li' | 'nav' | 'header' | 'footer' | 'p' | 'label' | 'dd';\n\nexport interface InlineProps extends ComponentPropsWithRef<'div'> {\n /** Gap from the spacing scale. Default `xs` (8px). */\n gap?: SpacingSize | undefined;\n /** Cross-axis alignment. Default `center`; use `baseline` when mixing text sizes. */\n align?: InlineAlign | undefined;\n /** Main-axis distribution. Default `start`. */\n justify?: InlineJustify | undefined;\n /** Wraps by default; `false` for toolbars that scroll. */\n wrap?: boolean | undefined;\n /** Element to render. Use `ul`/`ol` for a row of items and `li` for an item laid out as a row. */\n as?: InlineElement | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Horizontal flex layout that wraps. For rows of buttons, badges, metadata and key combinations. */\nexport function Inline({\n gap = 'xs',\n align = 'center',\n justify = 'start',\n wrap = true,\n as = 'div',\n className,\n ...rest\n}: InlineProps) {\n return createElement(as, {\n className: cx('sc-inline', className),\n 'data-gap': gap,\n 'data-align': align,\n 'data-justify': justify,\n 'data-nowrap': wrap ? undefined : '',\n ...rest,\n });\n}\n","import { Children, Fragment, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type KbdProps = ComponentPropsWithRef<'kbd'>;\n\n/** A single key, rendered like a keycap. One Kbd per key; group keys with `Kbd.Group`. */\nfunction KbdBase({ className, ...rest }: KbdProps) {\n return <kbd className={cx('sc-kbd', className)} {...rest} />;\n}\n\nexport interface KbdGroupProps extends ComponentPropsWithRef<'span'> {\n /** The readable combination, announced instead of the symbols: \"Command K\". */\n label: string;\n /** `plus` (default) draws a muted + between keys; `space` leaves a gap. */\n separator?: 'plus' | 'space' | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Groups the keys of one shortcut. */\nfunction KbdGroup({ label, separator = 'plus', className, children, ...rest }: KbdGroupProps) {\n const keys = Children.toArray(children);\n return (\n <span role=\"group\" aria-label={label} className={cx('sc-kbd-group', className)} {...rest}>\n {keys.map((key, i) => (\n <Fragment key={i}>\n {i > 0 && separator === 'plus' ? (\n <span className=\"sc-kbd-group__sep\" aria-hidden=\"true\">\n +\n </span>\n ) : null}\n {key}\n </Fragment>\n ))}\n </span>\n );\n}\n\nexport const Kbd = Object.assign(KbdBase, { Group: KbdGroup });\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { Inline, type InlineProps } from '../Inline/Inline';\nimport { XIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type DialogSize = 'sm' | 'md' | 'lg';\nexport type DialogVariant = 'dialog' | 'sheet';\n\nexport interface DialogRootProps {\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the dialog opens or closes. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /** When `false`, Esc and backdrop clicks no longer close the dialog. Default `true`. */\n dismissible?: boolean | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Owns the open state. Wrap a `Dialog.Trigger` and a `Dialog.Content`. */\nfunction Root({ dismissible = true, onOpenChange, open, defaultOpen, children }: DialogRootProps) {\n return (\n <BaseDialog.Root\n open={open}\n defaultOpen={defaultOpen}\n disablePointerDismissal={!dismissible}\n onOpenChange={(next, details) => {\n if (\n !dismissible &&\n !next &&\n (details.reason === 'escape-key' || details.reason === 'outside-press')\n ) {\n details.cancel();\n return;\n }\n onOpenChange?.(next);\n }}\n >\n {children}\n </BaseDialog.Root>\n );\n}\n\n/** Opens the dialog. Pass the Button through `render`: `<Dialog.Trigger render={<Button />}>Open</Dialog.Trigger>`. */\nconst Trigger = BaseDialog.Trigger;\n\nexport interface DialogContentProps extends Omit<BaseDialog.Popup.Props, 'className'> {\n /**\n * Maximum width: `sm` 400px for yes/no, `md` 560px (default) for a short form, `lg` 720px rarely.\n * Every size clamps to the viewport minus a 16px gutter, so a 390px phone gets a 358px dialog.\n */\n size?: DialogSize | undefined;\n /**\n * `dialog` (default) centres the popup. `sheet` is the same on wide viewports but below 640px it\n * becomes a bottom sheet: full width, rounded top, title and actions pinned while `Dialog.Body`\n * scrolls, padding that clears the home indicator. Use it for forms and pickers opened from a list.\n */\n variant?: DialogVariant | undefined;\n className?: string | undefined;\n}\n\n/**\n * Portal, backdrop and the popup. Focus moves inside on open and returns to the trigger on close.\n * Menus, selects and tooltips opened from inside render above it (`--sc-z-dropdown` > `--sc-z-dialog`).\n */\nfunction Content({ size = 'md', variant = 'dialog', className, children, ...rest }: DialogContentProps) {\n return (\n <BaseDialog.Portal>\n <BaseDialog.Backdrop className=\"sc-dialog__backdrop\" />\n <BaseDialog.Popup\n className={cx('sc-dialog__popup', className)}\n data-size={size}\n data-variant={variant}\n aria-modal=\"true\"\n {...rest}\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n );\n}\n\nexport interface DialogTitleProps extends Omit<BaseDialog.Title.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** Required. Labels the dialog; a question or a statement. Renders an `<h2>`. */\nfunction Title({ className, ...rest }: DialogTitleProps) {\n return <BaseDialog.Title className={cx('sc-dialog__title', className)} {...rest} />;\n}\n\nexport interface DialogDescriptionProps extends Omit<BaseDialog.Description.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** Optional, muted. Says what will happen. */\nfunction Description({ className, ...rest }: DialogDescriptionProps) {\n return <BaseDialog.Description className={cx('sc-dialog__description', className)} {...rest} />;\n}\n\nexport type DialogBodyProps = ComponentPropsWithRef<'div'>;\n\n/** Free content between the description and the actions. In a `sheet` it is the part that scrolls. */\nfunction Body({ className, ...rest }: DialogBodyProps) {\n return <div className={cx('sc-dialog__body', className)} {...rest} />;\n}\n\nexport type DialogActionsProps = Omit<InlineProps, 'justify'>;\n\n/** Right-aligned row of Buttons. Put the confirming action last. */\nfunction Actions({ className, ...rest }: DialogActionsProps) {\n return <Inline justify=\"end\" className={cx('sc-dialog__actions', className)} {...rest} />;\n}\n\nexport interface DialogCloseProps extends Omit<BaseDialog.Close.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** With no children or `render`, the × in the corner. Otherwise wraps any Button: `<Dialog.Close render={<Button variant=\"secondary\" />}>Cancel</Dialog.Close>`. */\nfunction Close({ className, children, render, ...rest }: DialogCloseProps) {\n if (children === undefined && render === undefined) {\n return (\n <BaseDialog.Close className={cx('sc-dialog__close', className)} aria-label=\"Close\" {...rest}>\n <XIcon />\n </BaseDialog.Close>\n );\n }\n return (\n <BaseDialog.Close className={className} render={render} {...rest}>\n {children}\n </BaseDialog.Close>\n );\n}\n\n/** A modal that interrupts for a decision or a short form. Built on Base UI's Dialog. */\nexport const Dialog = { Root, Trigger, Content, Title, Description, Body, Actions, Close };\n","import type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'em';\n\nexport interface IconProps extends Omit<ComponentPropsWithRef<'svg'>, 'children'> {\n /** `xs` 12, `sm` 14, `md` 16 (default), `lg` 20, `xl` 24, or `em` to follow the surrounding font size. */\n size?: IconSize | undefined;\n /** Gives the icon an accessible name (`role=\"img\"`). Without it the icon is decorative and hidden from assistive tech. */\n title?: string | undefined;\n /** The glyph: `<path>`, `<circle>` … on a 16×16 grid, stroke `currentColor`. */\n children: ReactNode;\n}\n\n/** Props of a shipped icon such as `PlayIcon`: everything `Icon` takes except the glyph. */\nexport type IconGlyphProps = Omit<IconProps, 'children'>;\n\n/**\n * The frame every icon renders in: a 16×16 outline in `currentColor`, sized by `size`, decorative unless\n * `title` is given. Use the shipped `<Name>Icon` components, or wrap your own paths.\n */\nexport function Icon({ size = 'md', title, className, children, ...rest }: IconProps) {\n return (\n <svg\n className={cx('sc-icon', className)}\n data-size={size}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n focusable=\"false\"\n aria-hidden={title ? undefined : true}\n role={title ? 'img' : undefined}\n aria-label={title}\n {...rest}\n >\n {children}\n </svg>\n );\n}\n","// Generated by scripts/build-icons.mjs from src/icons/svg/*.svg. Do not edit; add an SVG and run `pnpm build`.\nimport { Icon, type IconGlyphProps } from '../components/Icon/Icon';\n\n/** `archive` */\nexport function ArchiveIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"2.25\" y=\"2.75\" width=\"11.5\" height=\"3\" rx=\".75\" />\n <path d=\"M3.25 5.75v6.5a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1v-6.5M6.5 8.75h3\" />\n </Icon>\n );\n}\n\n/** `arrow-down` */\nexport function ArrowDownIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 3v10M4 9l4 4 4-4\" />\n </Icon>\n );\n}\n\n/** `arrow-left` */\nexport function ArrowLeftIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M13 8H3M7 4 3 8l4 4\" />\n </Icon>\n );\n}\n\n/** `arrow-right` */\nexport function ArrowRightIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M3 8h10M9 4l4 4-4 4\" />\n </Icon>\n );\n}\n\n/** `arrow-up` */\nexport function ArrowUpIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 13V3M4 7l4-4 4 4\" />\n </Icon>\n );\n}\n\n/** `bell` */\nexport function BellIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M4 6.5a4 4 0 0 1 8 0v3l1.25 2H2.75L4 9.5z\" />\n <path d=\"M6.5 13.5a1.5 1.5 0 0 0 3 0\" />\n </Icon>\n );\n}\n\n/** `briefcase` */\nexport function BriefcaseIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"2\" y=\"4.75\" width=\"12\" height=\"8.5\" rx=\"1\" />\n <path d=\"M5.5 4.75V3.5a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1.25M2 8.5h12\" />\n </Icon>\n );\n}\n\n/** `calendar` */\nexport function CalendarIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"2.5\" y=\"3.25\" width=\"11\" height=\"10\" rx=\"1\" />\n <path d=\"M2.5 6.75h11M5.5 1.75v3M10.5 1.75v3\" />\n </Icon>\n );\n}\n\n/** `check` */\nexport function CheckIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m3 8.5 3.5 3.5L13 4.5\" />\n </Icon>\n );\n}\n\n/** `chevron-down` */\nexport function ChevronDownIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m4 6 4 4 4-4\" />\n </Icon>\n );\n}\n\n/** `chevron-left` */\nexport function ChevronLeftIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m10 4-4 4 4 4\" />\n </Icon>\n );\n}\n\n/** `chevron-right` */\nexport function ChevronRightIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m6 4 4 4-4 4\" />\n </Icon>\n );\n}\n\n/** `chevron-up` */\nexport function ChevronUpIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m4 10 4-4 4 4\" />\n </Icon>\n );\n}\n\n/** `circle-check` */\nexport function CircleCheckIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"6\" />\n <path d=\"m5.25 8 2 2 3.5-4\" />\n </Icon>\n );\n}\n\n/** `circle-x` */\nexport function CircleXIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"6\" />\n <path d=\"m6 6 4 4M10 6l-4 4\" />\n </Icon>\n );\n}\n\n/** `clock` */\nexport function ClockIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"6\" />\n <path d=\"M8 4.75V8l2.25 1.5\" />\n </Icon>\n );\n}\n\n/** `copy` */\nexport function CopyIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"6\" y=\"6\" width=\"7.5\" height=\"7.5\" rx=\"1\" />\n <path d=\"M4 10H3.25a1 1 0 0 1-1-1V3.25a1 1 0 0 1 1-1H9a1 1 0 0 1 1 1V4\" />\n </Icon>\n );\n}\n\n/** `document` */\nexport function DocumentIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M9 2.25H4.5a1 1 0 0 0-1 1v9.5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5.75z\" />\n <path d=\"M9 2.25v3.5h3.5M6 8.5h4M6 11h4\" />\n </Icon>\n );\n}\n\n/** `download` */\nexport function DownloadIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 2.5v8M4.75 7.25 8 10.5l3.25-3.25\" />\n <path d=\"M2.75 11v1.5a1 1 0 0 0 1 1h8.5a1 1 0 0 0 1-1V11\" />\n </Icon>\n );\n}\n\n/** `edit` */\nexport function EditIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m10.75 2.75 2.5 2.5-7.5 7.5H3.25v-2.5z\" />\n </Icon>\n );\n}\n\n/** `external-link` */\nexport function ExternalLinkIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M9 2.75h4.25V7M13.25 2.75 7.5 8.5\" />\n <path d=\"M11.25 9v3.25a1 1 0 0 1-1 1h-6.5a1 1 0 0 1-1-1v-6.5a1 1 0 0 1 1-1H7\" />\n </Icon>\n );\n}\n\n/** `eye` */\nexport function EyeIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M1.75 8s2.25-4.25 6.25-4.25S14.25 8 14.25 8s-2.25 4.25-6.25 4.25S1.75 8 1.75 8z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n </Icon>\n );\n}\n\n/** `filter` */\nexport function FilterIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.5 3h11l-4.25 5v4.25L6.75 13.5V8z\" />\n </Icon>\n );\n}\n\n/** `flag` */\nexport function FlagIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M3.5 14V2.75\" />\n <path d=\"M3.5 2.75h8.75l-2.25 3 2.25 3H3.5\" />\n </Icon>\n );\n}\n\n/** `inbox` */\nexport function InboxIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2 9v3.25a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V9l-1.6-4.6a1 1 0 0 0-.95-.65H4.55a1 1 0 0 0-.95.65z\" />\n <path d=\"M2 9h3.25l1 2h3.5l1-2H14\" />\n </Icon>\n );\n}\n\n/** `info` */\nexport function InfoIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"6\" />\n <path d=\"M8 7.25V11M8 5.25v.01\" />\n </Icon>\n );\n}\n\n/** `link` */\nexport function LinkIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M6.75 9.25a2.5 2.5 0 0 0 3.54 0l2-2a2.5 2.5 0 0 0-3.54-3.54l-.75.75\" />\n <path d=\"M9.25 6.75a2.5 2.5 0 0 0-3.54 0l-2 2a2.5 2.5 0 0 0 3.54 3.54l.75-.75\" />\n </Icon>\n );\n}\n\n/** `mail` */\nexport function MailIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"2\" y=\"3.5\" width=\"12\" height=\"9\" rx=\"1\" />\n <path d=\"m2.5 4.5 5.5 4.25L13.5 4.5\" />\n </Icon>\n );\n}\n\n/** `map-pin` */\nexport function MapPinIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 14s4.5-3.9 4.5-7.5a4.5 4.5 0 1 0-9 0C3.5 10.1 8 14 8 14z\" />\n <circle cx=\"8\" cy=\"6.5\" r=\"1.5\" />\n </Icon>\n );\n}\n\n/** `menu` */\nexport function MenuIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.5 4.5h11M2.5 8h11M2.5 11.5h11\" />\n </Icon>\n );\n}\n\n/** `minus` */\nexport function MinusIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M3 8h10\" />\n </Icon>\n );\n}\n\n/** `moon` */\nexport function MoonIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M13.25 9.5A5.5 5.5 0 0 1 6.5 2.75 5.5 5.5 0 1 0 13.25 9.5z\" />\n </Icon>\n );\n}\n\n/** `more-horizontal` */\nexport function MoreHorizontalIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"3.5\" cy=\"8\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"8\" cy=\"8\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"12.5\" cy=\"8\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n </Icon>\n );\n}\n\n/** `more-vertical` */\nexport function MoreVerticalIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"3.5\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"8\" cy=\"8\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"8\" cy=\"12.5\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\" />\n </Icon>\n );\n}\n\n/** `pause` */\nexport function PauseIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <rect x=\"3.75\" y=\"2.75\" width=\"3\" height=\"10.5\" rx=\".75\" />\n <rect x=\"9.25\" y=\"2.75\" width=\"3\" height=\"10.5\" rx=\".75\" />\n </Icon>\n );\n}\n\n/** `play` */\nexport function PlayIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M4.5 2.75v10.5L13 8z\" />\n </Icon>\n );\n}\n\n/** `plus` */\nexport function PlusIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 3v10M3 8h10\" />\n </Icon>\n );\n}\n\n/** `refresh` */\nexport function RefreshIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.75 8a5.25 5.25 0 0 1 9-3.7l1.5 1.45\" />\n <path d=\"M13.25 2.25v3.5h-3.5\" />\n <path d=\"M13.25 8a5.25 5.25 0 0 1-9 3.7l-1.5-1.45\" />\n <path d=\"M2.75 13.75v-3.5h3.5\" />\n </Icon>\n );\n}\n\n/** `search` */\nexport function SearchIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"7\" cy=\"7\" r=\"4.5\" />\n <path d=\"m10.5 10.5 3 3\" />\n </Icon>\n );\n}\n\n/** `settings` */\nexport function SettingsIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M13.01 6.42 14.67 6.94v2.12l-1.66.52-.35.84.8 1.55-1.49 1.49-1.55-.8-.84.35-.52 1.66H6.94l-.52-1.66-.84-.35-1.55.8-1.49-1.49.8-1.55-.35-.84-1.66-.52V6.94l1.66-.52.35-.84-.8-1.55 1.49-1.49 1.55.8.84-.35.52-1.66h2.12l.52 1.66.84.35 1.55-.8 1.49 1.49-.8 1.55z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2.25\" />\n </Icon>\n );\n}\n\n/** `star` */\nexport function StarIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"m8 2.25 1.8 3.8 4.2.55-3.1 2.9.8 4.15L8 11.6l-3.7 2.05.8-4.15L2 6.6l4.2-.55z\" />\n </Icon>\n );\n}\n\n/** `sun` */\nexport function SunIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"3\" />\n <path d=\"M8 1.75v1.5M8 12.75v1.5M1.75 8h1.5M12.75 8h1.5M3.58 3.58l1.06 1.06M11.36 11.36l1.06 1.06M3.58 12.42l1.06-1.06M11.36 4.64l1.06-1.06\" />\n </Icon>\n );\n}\n\n/** `thumbs-down` */\nexport function ThumbsDownIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M5 2.5H3a.5.5 0 0 0-.5.5v5.5a.5.5 0 0 0 .5.5h2\" />\n <path d=\"M5 9l2.5 4.5a1.5 1.5 0 0 0 1.5-1.5V9.5h3.25a1.25 1.25 0 0 0 1.23-1.45l-.9-5a1.25 1.25 0 0 0-1.23-1.05H5z\" />\n </Icon>\n );\n}\n\n/** `thumbs-up` */\nexport function ThumbsUpIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M5 13.5H3a.5.5 0 0 1-.5-.5V7.5A.5.5 0 0 1 3 7h2\" />\n <path d=\"M5 7l2.5-4.5a1.5 1.5 0 0 1 1.5 1.5v2.5h3.25a1.25 1.25 0 0 1 1.23 1.45l-.9 5a1.25 1.25 0 0 1-1.23 1.05H5z\" />\n </Icon>\n );\n}\n\n/** `trash` */\nexport function TrashIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.75 4.25h10.5M6.25 4.25V3a.75.75 0 0 1 .75-.75h2A.75.75 0 0 1 9.75 3v1.25\" />\n <path d=\"M4 4.25l.5 8.5a1 1 0 0 0 1 .95h5a1 1 0 0 0 1-.95l.5-8.5\" />\n <path d=\"M6.5 7v4M9.5 7v4\" />\n </Icon>\n );\n}\n\n/** `undo` */\nexport function UndoIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M3 7h7a3.5 3.5 0 0 1 0 7H6\" />\n <path d=\"M6 4 3 7l3 3\" />\n </Icon>\n );\n}\n\n/** `user` */\nexport function UserIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"5.25\" r=\"2.75\" />\n <path d=\"M2.75 13.75a5.25 5.25 0 0 1 10.5 0\" />\n </Icon>\n );\n}\n\n/** `warning` */\nexport function WarningIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 2.5 1.75 13.25h12.5z\" />\n <path d=\"M8 6.5v3M8 11.5v.01\" />\n </Icon>\n );\n}\n\n/** `x` */\nexport function XIcon(props: IconGlyphProps) {\n return (\n <Icon {...props}>\n <path d=\"M4 4l8 8M12 4l-8 8\" />\n </Icon>\n );\n}\n","// Generated by scripts/build-icons.mjs from src/icons/svg/*.svg. Do not edit; add an SVG and run `pnpm build`.\n/** Every icon shipped by this package, as `<Name>Icon` components. */\nexport const iconNames = [\n 'archive',\n 'arrow-down',\n 'arrow-left',\n 'arrow-right',\n 'arrow-up',\n 'bell',\n 'briefcase',\n 'calendar',\n 'check',\n 'chevron-down',\n 'chevron-left',\n 'chevron-right',\n 'chevron-up',\n 'circle-check',\n 'circle-x',\n 'clock',\n 'copy',\n 'document',\n 'download',\n 'edit',\n 'external-link',\n 'eye',\n 'filter',\n 'flag',\n 'inbox',\n 'info',\n 'link',\n 'mail',\n 'map-pin',\n 'menu',\n 'minus',\n 'moon',\n 'more-horizontal',\n 'more-vertical',\n 'pause',\n 'play',\n 'plus',\n 'refresh',\n 'search',\n 'settings',\n 'star',\n 'sun',\n 'thumbs-down',\n 'thumbs-up',\n 'trash',\n 'undo',\n 'user',\n 'warning',\n 'x',\n] as const;\nexport type IconName = (typeof iconNames)[number];\n","import { useRender } from '@base-ui/react/use-render';\nimport type { MouseEvent, ReactNode } from 'react';\nimport { Tooltip, type TooltipSide } from '../Tooltip/Tooltip';\nimport type { ButtonSize, ButtonVariant } from '../Button/Button';\nimport { cx } from '../../utils/cx';\n\nexport type IconButtonDotTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\n\nexport interface IconButtonProps extends Omit<useRender.ComponentProps<'button'>, 'children' | 'aria-label'> {\n /** Required. The accessible name, and the tooltip text when `tooltip` is `true`. */\n label: string;\n /** The icon, usually a shipped `<Name>Icon`. It is decorative; `label` names the button. Optional only so a popup trigger can supply it through `render`. */\n children?: ReactNode | undefined;\n /** `ghost` (default) in toolbars and rows, `secondary` when it must read as a button, `primary` and `danger` rarely. */\n variant?: ButtonVariant | undefined;\n /** Square: 32, 40 or 48px. Compact density shrinks each by one step. */\n size?: ButtonSize | undefined;\n /** `true` shows `label` as a tooltip on hover and focus; a string shows that text instead. */\n tooltip?: boolean | string | undefined;\n /** Side the tooltip opens on. Default `top`. */\n tooltipSide?: TooltipSide | undefined;\n /** Fully round, for avatars and floating actions. */\n round?: boolean | undefined;\n /** Shows a spinner, sets `aria-busy` and ignores clicks. */\n loading?: boolean | undefined;\n /** A status dot in the top-left corner, ringed in `--sc-icon-button-dot-ring` (default `surface-default`). Decorative: put the status in `label` too (\"Sweeps: paused\"). */\n dot?: IconButtonDotTone | undefined;\n}\n\n/**\n * A square Button for one icon. Always named by `label`; use `tooltip` to show that name on hover.\n * Renders a `<button>` unless `render` gives another element: `render={<a href=\"/settings\" />}` or a\n * Next.js `<Link href=\"/settings\" />` makes it a link with the same look and name.\n */\nexport function IconButton({\n label,\n children,\n variant = 'ghost',\n size = 'md',\n tooltip,\n tooltipSide = 'top',\n round = false,\n loading = false,\n dot,\n type,\n className,\n onClick,\n render,\n ref,\n ...rest\n}: IconButtonProps) {\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n };\n const button = useRender({\n render,\n ref,\n defaultTagName: 'button',\n props: {\n // `type` only means something on a real button; a rendered link keeps its own attributes.\n type: render ? type : (type ?? 'button'),\n className: cx('sc-button', 'sc-icon-button', className),\n 'data-variant': variant,\n 'data-size': size,\n 'data-round': round || undefined,\n 'data-loading': loading || undefined,\n 'aria-busy': loading || undefined,\n 'aria-label': label,\n onClick: handleClick,\n ...rest,\n children: (\n <>\n <span className=\"sc-button__icon\" aria-hidden=\"true\">\n {children}\n </span>\n {loading ? <span className=\"sc-button__spinner\" aria-hidden=\"true\" /> : null}\n {dot ? <span className=\"sc-icon-button__dot\" data-tone={dot} aria-hidden=\"true\" /> : null}\n </>\n ),\n },\n });\n if (!tooltip) return button;\n return (\n <Tooltip content={tooltip === true ? label : tooltip} side={tooltipSide}>\n {button}\n </Tooltip>\n );\n}\n","import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport type { ReactElement, ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type TooltipSide = 'top' | 'bottom' | 'left' | 'right';\nexport type TooltipAlign = 'start' | 'center' | 'end';\n\nexport interface TooltipProps {\n /** The hint. Short text; never anything the user cannot do without. */\n content: ReactNode;\n /** The trigger: one element that takes a ref and spreads props, such as `IconButton`, `Button` or `Badge`. */\n children: ReactElement;\n /** Which side of the trigger the hint opens on; flips when there is no room. Default `top`. */\n side?: TooltipSide | undefined;\n /** Alignment along that side. Default `center`. */\n align?: TooltipAlign | undefined;\n /** Hover delay in ms before opening. Default 300; inside `Tooltip.Provider` sibling tooltips open instantly once one is open. */\n delay?: number | undefined;\n /** Delay in ms before closing. Default 0. */\n closeDelay?: number | undefined;\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the hint opens or closes. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /** Never opens. */\n disabled?: boolean | undefined;\n className?: string | undefined;\n}\n\n/**\n * A hint that opens on hover and keyboard focus. Supplementary only: touch devices never see it and\n * screen readers hear the trigger's own name, so the trigger must already be labelled.\n */\nfunction TooltipBase({\n content,\n children,\n side = 'top',\n align = 'center',\n delay = 300,\n closeDelay,\n open,\n defaultOpen,\n onOpenChange,\n disabled,\n className,\n}: TooltipProps) {\n return (\n <BaseTooltip.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange ? (next) => onOpenChange(next) : undefined}\n disabled={disabled}\n >\n <BaseTooltip.Trigger render={children} delay={delay} closeDelay={closeDelay} />\n <BaseTooltip.Portal>\n <BaseTooltip.Positioner side={side} align={align} sideOffset={6} className=\"sc-tooltip__positioner\">\n <BaseTooltip.Popup role=\"tooltip\" className={cx('sc-tooltip', className)}>\n <BaseTooltip.Arrow className=\"sc-tooltip__arrow\" />\n {content}\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n </BaseTooltip.Portal>\n </BaseTooltip.Root>\n );\n}\n\n/** Wrap a toolbar or a row of icon buttons so moving between them skips the delay. */\nconst Provider = BaseTooltip.Provider;\n\nexport const Tooltip = Object.assign(TooltipBase, { Provider });\n","import { Menu as BaseMenu } from '@base-ui/react/menu';\nimport type { ReactNode } from 'react';\nimport { Button } from '../Button/Button';\nimport { CheckIcon, ChevronDownIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type MenuSide = 'top' | 'bottom' | 'left' | 'right';\nexport type MenuAlign = 'start' | 'center' | 'end';\nexport type MenuItemTone = 'default' | 'danger';\n\nexport interface MenuRootProps {\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the menu opens or closes. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /** Disables the trigger. */\n disabled?: boolean | undefined;\n /** Default `true`: the page behind the menu is inert until it closes. */\n modal?: boolean | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Owns the open state. Wrap a `Menu.Trigger` and a `Menu.Content`. */\nfunction Root({ open, defaultOpen, onOpenChange, disabled, modal = true, children }: MenuRootProps) {\n return (\n <BaseMenu.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange ? (next) => onOpenChange(next) : undefined}\n disabled={disabled}\n modal={modal}\n >\n {children}\n </BaseMenu.Root>\n );\n}\n\nexport interface MenuTriggerProps extends Omit<BaseMenu.Trigger.Props, 'className'> {\n className?: string | undefined;\n}\n\n/**\n * Opens the menu. With no `render` it is a secondary Button with a chevron; pass any Button or\n * IconButton through `render`: `<Menu.Trigger render={<IconButton label=\"More\" />}><MoreHorizontalIcon /></Menu.Trigger>`.\n */\nfunction Trigger({ render, className, children, ...rest }: MenuTriggerProps) {\n return (\n <BaseMenu.Trigger\n render={render ?? <Button variant=\"secondary\" iconEnd={<ChevronDownIcon />} className={className} />}\n className={render ? className : undefined}\n {...rest}\n >\n {children}\n </BaseMenu.Trigger>\n );\n}\n\nexport interface MenuContentProps extends Omit<BaseMenu.Popup.Props, 'className'> {\n /** Side of the trigger the menu opens on; flips when there is no room. Default `bottom`. */\n side?: MenuSide | undefined;\n /** Alignment along that side. Default `start`. */\n align?: MenuAlign | undefined;\n /** Distance from the trigger in px. Default 4. */\n sideOffset?: number | undefined;\n className?: string | undefined;\n}\n\n/** Portal, positioner and the popup. Items go inside. */\nfunction Content({\n side = 'bottom',\n align = 'start',\n sideOffset = 4,\n className,\n children,\n ...rest\n}: MenuContentProps) {\n return (\n <BaseMenu.Portal>\n <BaseMenu.Positioner side={side} align={align} sideOffset={sideOffset} className=\"sc-menu__positioner\">\n <BaseMenu.Popup className={cx('sc-menu', className)} {...rest}>\n {children}\n </BaseMenu.Popup>\n </BaseMenu.Positioner>\n </BaseMenu.Portal>\n );\n}\n\ninterface ItemSlots {\n /** A 16px icon before the label. */\n icon?: ReactNode | undefined;\n /** Muted text at the end: a shortcut (`<Kbd>`) or a count. */\n trailing?: ReactNode | undefined;\n /** `danger` for destructive actions; put them last, after a separator. */\n tone?: MenuItemTone | undefined;\n}\n\nfunction ItemBody({\n icon,\n trailing,\n children,\n}: {\n icon?: ReactNode;\n trailing?: ReactNode;\n children?: ReactNode;\n}) {\n return (\n <>\n <span className=\"sc-menu__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n <span className=\"sc-menu__label\">{children}</span>\n {trailing !== undefined ? <span className=\"sc-menu__trailing\">{trailing}</span> : null}\n </>\n );\n}\n\nexport interface MenuItemProps extends Omit<BaseMenu.Item.Props, 'className'>, ItemSlots {\n className?: string | undefined;\n}\n\n/** One action. Closes the menu when activated. */\nfunction Item({ icon, trailing, tone = 'default', className, children, ...rest }: MenuItemProps) {\n return (\n <BaseMenu.Item className={cx('sc-menu__item', className)} data-tone={tone} {...rest}>\n <ItemBody icon={icon} trailing={trailing}>\n {children}\n </ItemBody>\n </BaseMenu.Item>\n );\n}\n\nexport interface MenuLinkItemProps extends Omit<BaseMenu.LinkItem.Props, 'className'>, ItemSlots {\n className?: string | undefined;\n}\n\n/** An item that navigates: renders an `<a href>`. */\nfunction LinkItem({ icon, trailing, tone = 'default', className, children, ...rest }: MenuLinkItemProps) {\n return (\n <BaseMenu.LinkItem className={cx('sc-menu__item', className)} data-tone={tone} {...rest}>\n <ItemBody icon={icon} trailing={trailing}>\n {children}\n </ItemBody>\n </BaseMenu.LinkItem>\n );\n}\n\nexport interface MenuCheckboxItemProps extends Omit<\n BaseMenu.CheckboxItem.Props,\n 'className' | 'onCheckedChange'\n> {\n /** Called with the next checked state. */\n onCheckedChange?: ((checked: boolean) => void) | undefined;\n /** Muted text at the end. */\n trailing?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** A toggle. Stays open when activated so several can be flipped at once; pass `closeOnClick` to close. */\nfunction CheckboxItem({ trailing, onCheckedChange, className, children, ...rest }: MenuCheckboxItemProps) {\n return (\n <BaseMenu.CheckboxItem\n className={cx('sc-menu__item', className)}\n onCheckedChange={onCheckedChange ? (checked) => onCheckedChange(checked) : undefined}\n {...rest}\n >\n <BaseMenu.CheckboxItemIndicator className=\"sc-menu__icon sc-menu__indicator\">\n <CheckIcon size=\"sm\" />\n </BaseMenu.CheckboxItemIndicator>\n <span className=\"sc-menu__label\">{children}</span>\n {trailing !== undefined ? <span className=\"sc-menu__trailing\">{trailing}</span> : null}\n </BaseMenu.CheckboxItem>\n );\n}\n\nexport interface MenuRadioGroupProps<Value extends string = string> extends Omit<\n BaseMenu.RadioGroup.Props,\n 'className' | 'value' | 'defaultValue' | 'onValueChange'\n> {\n /** Controlled selected value. */\n value?: Value | undefined;\n /** Initial value when uncontrolled. */\n defaultValue?: Value | undefined;\n /** Called with the next selected value. */\n onValueChange?: ((value: Value) => void) | undefined;\n /** A heading for the group, rendered above the items. */\n label?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** A set of `Menu.RadioItem`s where exactly one is selected. */\nfunction RadioGroup<Value extends string = string>({\n label,\n onValueChange,\n className,\n children,\n ...rest\n}: MenuRadioGroupProps<Value>) {\n return (\n <BaseMenu.RadioGroup\n className={cx('sc-menu__group', className)}\n onValueChange={onValueChange ? (value: Value) => onValueChange(value) : undefined}\n {...rest}\n >\n {label !== undefined ? (\n <BaseMenu.GroupLabel className=\"sc-menu__group-label\">{label}</BaseMenu.GroupLabel>\n ) : null}\n {children}\n </BaseMenu.RadioGroup>\n );\n}\n\nexport interface MenuRadioItemProps extends Omit<BaseMenu.RadioItem.Props, 'className' | 'value'> {\n value: string;\n /** Muted text at the end. */\n trailing?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** One choice in a `Menu.RadioGroup`. Stays open when chosen; pass `closeOnClick` to close. */\nfunction RadioItem({ trailing, className, children, ...rest }: MenuRadioItemProps) {\n return (\n <BaseMenu.RadioItem className={cx('sc-menu__item', className)} {...rest}>\n <BaseMenu.RadioItemIndicator className=\"sc-menu__icon sc-menu__indicator\">\n <span className=\"sc-menu__radio-dot\" />\n </BaseMenu.RadioItemIndicator>\n <span className=\"sc-menu__label\">{children}</span>\n {trailing !== undefined ? <span className=\"sc-menu__trailing\">{trailing}</span> : null}\n </BaseMenu.RadioItem>\n );\n}\n\nexport interface MenuGroupProps extends Omit<BaseMenu.Group.Props, 'className'> {\n /** A heading for the group, rendered above the items. */\n label?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** Labels a run of items. */\nfunction Group({ label, className, children, ...rest }: MenuGroupProps) {\n return (\n <BaseMenu.Group className={cx('sc-menu__group', className)} {...rest}>\n {label !== undefined ? (\n <BaseMenu.GroupLabel className=\"sc-menu__group-label\">{label}</BaseMenu.GroupLabel>\n ) : null}\n {children}\n </BaseMenu.Group>\n );\n}\n\nexport interface MenuSeparatorProps extends Omit<BaseMenu.Separator.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** A hairline between runs of items. */\nfunction Separator({ className, ...rest }: MenuSeparatorProps) {\n return <BaseMenu.Separator className={cx('sc-menu__separator', className)} {...rest} />;\n}\n\n/** A dropdown of actions on a trigger, with full keyboard support. Built on Base UI's Menu. */\nexport const Menu = {\n Root,\n Trigger,\n Content,\n Item,\n LinkItem,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n Group,\n Separator,\n};\n","import { Field } from '@base-ui/react/field';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { FieldShell, type FieldProps } from '../Field/FieldShell';\n\nexport interface InputProps\n extends\n Omit<ComponentPropsWithRef<'input'>, 'size' | 'name' | 'disabled' | 'required' | 'className'>,\n FieldProps {\n /** A 16px icon inside the start edge, for search and URL fields. Decorative. */\n iconStart?: ReactNode | undefined;\n /** A 16px icon inside the end edge. Decorative; use an `IconButton` outside the field for an action. */\n iconEnd?: ReactNode | undefined;\n /** Called with the string value on every change, beside the native `onChange`. */\n onValueChange?: ((value: string) => void) | undefined;\n}\n\n/**\n * A labelled single-line text field. Renders a native `<input>` inside Base UI's Field, so every native\n * attribute passes through: `type=\"date\" | \"time\" | \"number\" | \"url\" | …` keep the same height and\n * `iconStart` slot; `list=\"id\"` with a `<datalist>` beside it gives native suggestions. Date and time\n * fields show the browser's picker at the end edge, so leave `iconEnd` off those.\n */\nexport function Input({\n label,\n hideLabel,\n description,\n error,\n invalid,\n required,\n disabled,\n name,\n size,\n className,\n iconStart,\n iconEnd,\n onValueChange,\n ...rest\n}: InputProps) {\n return (\n <FieldShell\n label={label}\n hideLabel={hideLabel}\n description={description}\n error={error}\n invalid={invalid}\n required={required}\n disabled={disabled}\n name={name}\n size={size}\n className={className}\n >\n <span\n className=\"sc-input-wrap\"\n data-icon-start={iconStart ? '' : undefined}\n data-icon-end={iconEnd ? '' : undefined}\n >\n {iconStart ? (\n <span className=\"sc-input__icon\" data-side=\"start\" aria-hidden=\"true\">\n {iconStart}\n </span>\n ) : null}\n <Field.Control\n className=\"sc-input\"\n required={required}\n onValueChange={onValueChange ? (value) => onValueChange(value) : undefined}\n {...rest}\n />\n {iconEnd ? (\n <span className=\"sc-input__icon\" data-side=\"end\" aria-hidden=\"true\">\n {iconEnd}\n </span>\n ) : null}\n </span>\n </FieldShell>\n );\n}\n","import { Field } from '@base-ui/react/field';\nimport type { ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type ControlSize = 'sm' | 'md' | 'lg';\n\n/** Props shared by every labelled form control: Input, Textarea, Select. */\nexport interface FieldProps {\n /** Required. The visible label; use `hideLabel` to keep it for assistive tech only. */\n label: ReactNode;\n /** Visually hides the label (a search box with an icon, a table filter). */\n hideLabel?: boolean | undefined;\n /** Help text under the control, wired with `aria-describedby`. */\n description?: ReactNode | undefined;\n /** The error message. When given the control is invalid and the message is announced. */\n error?: ReactNode | undefined;\n /** Marks the control invalid without a message. */\n invalid?: boolean | undefined;\n /** Shows a mark after the label and sets the native `required`. */\n required?: boolean | undefined;\n disabled?: boolean | undefined;\n /** Identifies the value when a form is submitted. */\n name?: string | undefined;\n /** Control height: 32, 40 (default) or 48px. Compact density shrinks each by one step. */\n size?: ControlSize | undefined;\n /** Class on the wrapper, not the control. */\n className?: string | undefined;\n}\n\ninterface FieldShellProps extends FieldProps {\n children: ReactNode;\n}\n\n/** Internal: Field.Root with label, control slot, description and error in the right order and ARIA. */\nexport function FieldShell({\n label,\n hideLabel = false,\n description,\n error,\n invalid = false,\n required = false,\n disabled = false,\n name,\n size = 'md',\n className,\n children,\n}: FieldShellProps) {\n return (\n <Field.Root\n className={cx('sc-field', className)}\n name={name}\n disabled={disabled}\n invalid={invalid || error != null}\n data-size={size}\n >\n <Field.Label className={cx('sc-field__label', hideLabel && 'sc-visually-hidden')}>\n {label}\n {required ? (\n <span className=\"sc-field__required\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </Field.Label>\n {children}\n {description != null ? (\n <Field.Description className=\"sc-field__description\">{description}</Field.Description>\n ) : null}\n {error != null ? (\n <Field.Error className=\"sc-field__error\" match>\n {error}\n </Field.Error>\n ) : null}\n </Field.Root>\n );\n}\n","import { Field } from '@base-ui/react/field';\nimport type { ComponentPropsWithRef } from 'react';\nimport { FieldShell, type FieldProps } from '../Field/FieldShell';\n\nexport type TextareaVariant = 'default' | 'code';\n\nexport interface TextareaProps\n extends\n Omit<ComponentPropsWithRef<'textarea'>, 'name' | 'disabled' | 'required' | 'className'>,\n Omit<FieldProps, 'size'> {\n /** Visible lines. Default 3. */\n rows?: number | undefined;\n /** `vertical` (default) lets the user drag it taller; `none` fixes the height. */\n resize?: 'vertical' | 'none' | undefined;\n /**\n * `code` for Markdown, JSON and other source: monospace, `tab-size: 2`, spellcheck, autocorrect and\n * autocapitalize off. Add the native `wrap=\"off\"` to keep long lines on one line and scroll sideways.\n */\n variant?: TextareaVariant | undefined;\n /** Called with the string value on every change, beside the native `onChange`. */\n onValueChange?: ((value: string) => void) | undefined;\n}\n\n/** A labelled multi-line text field. Renders a native `<textarea>` inside Base UI's Field. */\nexport function Textarea({\n label,\n hideLabel,\n description,\n error,\n invalid,\n required,\n disabled,\n name,\n className,\n rows = 3,\n resize = 'vertical',\n variant = 'default',\n onValueChange,\n spellCheck,\n autoCorrect,\n autoCapitalize,\n ...rest\n}: TextareaProps) {\n const code = variant === 'code';\n return (\n <FieldShell\n label={label}\n hideLabel={hideLabel}\n description={description}\n error={error}\n invalid={invalid}\n required={required}\n disabled={disabled}\n name={name}\n className={className}\n >\n <Field.Control\n render={\n <textarea\n rows={rows}\n spellCheck={spellCheck ?? (code ? false : undefined)}\n autoCorrect={autoCorrect ?? (code ? 'off' : undefined)}\n autoCapitalize={autoCapitalize ?? (code ? 'off' : undefined)}\n {...rest}\n />\n }\n className=\"sc-input sc-textarea\"\n data-resize={resize}\n data-variant={code ? 'code' : undefined}\n required={required}\n onValueChange={onValueChange ? (value) => onValueChange(value) : undefined}\n />\n </FieldShell>\n );\n}\n","import { Select as BaseSelect } from '@base-ui/react/select';\nimport { useState, type KeyboardEvent, type ReactNode } from 'react';\nimport { FieldShell, type FieldProps } from '../Field/FieldShell';\nimport { CheckIcon, ChevronDownIcon, XIcon } from '../../icons/icons.gen';\n\nexport interface SelectOption<Value extends string = string> {\n value: Value;\n label: ReactNode;\n disabled?: boolean | undefined;\n}\n\nexport interface SelectGroup<Value extends string = string> {\n /** Heading shown above the group's options. */\n label: ReactNode;\n options: SelectOption<Value>[];\n}\n\nexport interface SelectProps<Value extends string = string> extends FieldProps {\n /** Flat options, or groups of options with a heading. */\n options: Array<SelectOption<Value> | SelectGroup<Value>>;\n /** Controlled value; `null` for none, which shows `placeholder`. No sentinel option needed. */\n value?: Value | null | undefined;\n /** Initial value when uncontrolled; `null` (default) for none. */\n defaultValue?: Value | null | undefined;\n /** Called with the chosen value, or `null` when the field is cleared. */\n onValueChange?: ((value: Value | null) => void) | undefined;\n /** Shown in the trigger while nothing is chosen. */\n placeholder?: ReactNode | undefined;\n /**\n * Shows an × beside the chevron while a value is chosen; pressing it, or Backspace/Delete on the\n * focused trigger, sets the value to `null` and calls `onValueChange(null)`.\n */\n clearable?: boolean | undefined;\n /** Accessible name of the clear button. Default \"Clear\". */\n clearLabel?: string | undefined;\n /** Prevents choosing a different option. */\n readOnly?: boolean | undefined;\n /** Stretches the trigger to the container. */\n fullWidth?: boolean | undefined;\n id?: string | undefined;\n}\n\nfunction isGroup<V extends string>(entry: SelectOption<V> | SelectGroup<V>): entry is SelectGroup<V> {\n return 'options' in entry;\n}\n\nfunction Option<V extends string>({ option }: { option: SelectOption<V> }) {\n return (\n <BaseSelect.Item value={option.value} disabled={option.disabled} className=\"sc-select__item\">\n <BaseSelect.ItemIndicator className=\"sc-select__indicator\">\n <CheckIcon size=\"sm\" />\n </BaseSelect.ItemIndicator>\n <BaseSelect.ItemText className=\"sc-select__item-text\">{option.label}</BaseSelect.ItemText>\n </BaseSelect.Item>\n );\n}\n\n/**\n * A labelled single-choice dropdown. Built on Base UI's Select so the list is styled and keyboard\n * complete; submits like a native select through `name`.\n */\nexport function Select<Value extends string = string>({\n label,\n hideLabel,\n description,\n error,\n invalid,\n required,\n disabled,\n name,\n size = 'md',\n className,\n options,\n value,\n defaultValue,\n onValueChange,\n placeholder = 'Choose…',\n clearable = false,\n clearLabel = 'Clear',\n readOnly,\n fullWidth = false,\n id,\n}: SelectProps<Value>) {\n const items = options.flatMap((entry) => (isGroup(entry) ? entry.options : [entry]));\n const [internal, setInternal] = useState<Value | null>(defaultValue ?? null);\n const controlled = value !== undefined;\n const current = controlled ? value : internal;\n const setValue = (next: Value | null) => {\n if (!controlled) setInternal(next);\n onValueChange?.(next);\n };\n const canClear = clearable && current != null && !disabled && !readOnly;\n const onTriggerKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (canClear && (event.key === 'Backspace' || event.key === 'Delete')) {\n event.preventDefault();\n setValue(null);\n }\n };\n return (\n <FieldShell\n label={label}\n hideLabel={hideLabel}\n description={description}\n error={error}\n invalid={invalid}\n required={required}\n disabled={disabled}\n name={name}\n size={size}\n className={className}\n >\n <BaseSelect.Root<Value | null>\n items={items}\n value={current}\n onValueChange={(next) => setValue(next)}\n disabled={disabled}\n required={required}\n readOnly={readOnly}\n >\n <span className=\"sc-select__wrap\" data-full-width={fullWidth || undefined}>\n <BaseSelect.Trigger\n id={id}\n className=\"sc-select\"\n data-size={size}\n data-full-width={fullWidth || undefined}\n data-clearable={canClear || undefined}\n onKeyDown={onTriggerKeyDown}\n >\n <BaseSelect.Value className=\"sc-select__value\" placeholder={placeholder} />\n <BaseSelect.Icon className=\"sc-select__icon\">\n <ChevronDownIcon />\n </BaseSelect.Icon>\n </BaseSelect.Trigger>\n {canClear ? (\n <button\n type=\"button\"\n className=\"sc-select__clear\"\n aria-label={clearLabel}\n onClick={() => setValue(null)}\n >\n <XIcon size=\"sm\" />\n </button>\n ) : null}\n </span>\n <BaseSelect.Portal>\n <BaseSelect.Positioner\n className=\"sc-select__positioner\"\n sideOffset={4}\n alignItemWithTrigger={false}\n >\n <BaseSelect.Popup className=\"sc-select__popup\">\n <BaseSelect.List>\n {options.map((entry, i) =>\n isGroup(entry) ? (\n <BaseSelect.Group key={i} className=\"sc-select__group\">\n <BaseSelect.GroupLabel className=\"sc-select__group-label\">\n {entry.label}\n </BaseSelect.GroupLabel>\n {entry.options.map((option) => (\n <Option key={option.value} option={option} />\n ))}\n </BaseSelect.Group>\n ) : (\n <Option key={entry.value} option={entry} />\n ),\n )}\n </BaseSelect.List>\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n </BaseSelect.Root>\n </FieldShell>\n );\n}\n","import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport { useId, type ReactNode } from 'react';\nimport { CheckIcon, MinusIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport interface CheckboxProps extends Omit<\n BaseCheckbox.Root.Props,\n 'className' | 'onCheckedChange' | 'render' | 'children'\n> {\n /** Required. The visible label; clicking it toggles the box. */\n label: ReactNode;\n /** Help text under the label, wired with `aria-describedby`. */\n description?: ReactNode | undefined;\n /** Called with the next checked state. */\n onCheckedChange?: ((checked: boolean) => void) | undefined;\n className?: string | undefined;\n}\n\n/** A labelled checkbox. `indeterminate` shows a dash for \"some of these\". Built on Base UI's Checkbox. */\nexport function Checkbox({\n label,\n description,\n onCheckedChange,\n className,\n disabled,\n ...rest\n}: CheckboxProps) {\n const descriptionId = useId();\n return (\n <div className={cx('sc-choice', className)} data-disabled={disabled || undefined}>\n <label className=\"sc-choice__control\">\n <BaseCheckbox.Root\n className=\"sc-checkbox\"\n disabled={disabled}\n aria-describedby={description != null ? descriptionId : undefined}\n onCheckedChange={onCheckedChange ? (checked) => onCheckedChange(checked) : undefined}\n {...rest}\n >\n <BaseCheckbox.Indicator className=\"sc-checkbox__indicator\">\n <CheckIcon size=\"sm\" className=\"sc-checkbox__check\" />\n <MinusIcon size=\"sm\" className=\"sc-checkbox__dash\" />\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n <span className=\"sc-choice__label\">{label}</span>\n </label>\n {description != null ? (\n <span className=\"sc-choice__description\" id={descriptionId}>\n {description}\n </span>\n ) : null}\n </div>\n );\n}\n","import { Switch as BaseSwitch } from '@base-ui/react/switch';\nimport { useId, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport interface SwitchProps extends Omit<\n BaseSwitch.Root.Props,\n 'className' | 'onCheckedChange' | 'render' | 'children'\n> {\n /** Required. The visible label; clicking it flips the switch. */\n label: ReactNode;\n /** Help text under the label, wired with `aria-describedby`. */\n description?: ReactNode | undefined;\n /** Called with the next checked state. */\n onCheckedChange?: ((checked: boolean) => void) | undefined;\n /** `end` (default) puts the switch before the label; `start` puts the label first and the switch at the row's end. */\n labelPosition?: 'start' | 'end' | undefined;\n className?: string | undefined;\n}\n\n/** A labelled on/off switch for settings that apply at once. Built on Base UI's Switch. */\nexport function Switch({\n label,\n description,\n onCheckedChange,\n labelPosition = 'end',\n className,\n disabled,\n ...rest\n}: SwitchProps) {\n const descriptionId = useId();\n return (\n <div\n className={cx('sc-choice', className)}\n data-disabled={disabled || undefined}\n data-label-position={labelPosition}\n >\n <label className=\"sc-choice__control\">\n <BaseSwitch.Root\n className=\"sc-switch\"\n disabled={disabled}\n aria-describedby={description != null ? descriptionId : undefined}\n onCheckedChange={onCheckedChange ? (checked) => onCheckedChange(checked) : undefined}\n {...rest}\n >\n <BaseSwitch.Thumb className=\"sc-switch__thumb\" />\n </BaseSwitch.Root>\n <span className=\"sc-choice__label\">{label}</span>\n </label>\n {description != null ? (\n <span className=\"sc-choice__description\" id={descriptionId}>\n {description}\n </span>\n ) : null}\n </div>\n );\n}\n","import { Tabs as BaseTabs } from '@base-ui/react/tabs';\nimport type { ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport interface TabsRootProps extends Omit<\n BaseTabs.Root.Props,\n 'className' | 'value' | 'defaultValue' | 'onValueChange'\n> {\n /** Controlled active tab. */\n value?: string | undefined;\n /** Initial active tab when uncontrolled. Defaults to the first enabled tab. */\n defaultValue?: string | undefined;\n /** Called with the value of the newly active tab. */\n onValueChange?: ((value: string) => void) | undefined;\n className?: string | undefined;\n}\n\n/** Owns the active tab. Wrap a `Tabs.List` and one `Tabs.Panel` per tab. */\nfunction Root({ className, onValueChange, ...rest }: TabsRootProps) {\n return (\n <BaseTabs.Root\n className={cx('sc-tabs', className)}\n onValueChange={onValueChange ? (value) => onValueChange(String(value)) : undefined}\n {...rest}\n />\n );\n}\n\nexport type TabsListVariant = 'line' | 'segmented';\n\nexport interface TabsListProps extends Omit<BaseTabs.List.Props, 'className'> {\n /** Names the set of tabs for assistive tech: \"Inbox sections\". */\n 'aria-label': string;\n /** Tabs share the width equally instead of sizing to their labels. */\n fill?: boolean | undefined;\n /** `line` (default): an accent underline on the active tab. `segmented`: a quiet segmented control, a sunken track with the active tab raised and no accent colour. */\n variant?: TabsListVariant | undefined;\n className?: string | undefined;\n}\n\n/** The row of tabs with the sliding indicator. Arrow keys move between tabs; Enter or Space activates. */\nfunction List({ fill = false, variant = 'line', className, children, ...rest }: TabsListProps) {\n return (\n <BaseTabs.List\n className={cx('sc-tabs__list', className)}\n data-fill={fill || undefined}\n data-variant={variant}\n {...rest}\n >\n {children}\n <BaseTabs.Indicator className=\"sc-tabs__indicator\" />\n </BaseTabs.List>\n );\n}\n\nexport interface TabsTabProps extends Omit<BaseTabs.Tab.Props, 'className' | 'value'> {\n value: string;\n /** A 16px icon before the label. */\n icon?: ReactNode | undefined;\n /** A count after the label, muted: `12`. */\n count?: ReactNode | undefined;\n className?: string | undefined;\n}\n\n/** One tab. */\nfunction Tab({ icon, count, className, children, ...rest }: TabsTabProps) {\n return (\n <BaseTabs.Tab className={cx('sc-tabs__tab', className)} {...rest}>\n {icon ? (\n <span className=\"sc-tabs__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n <span className=\"sc-tabs__label\">{children}</span>\n {count != null ? (\n <>\n {' '}\n <span className=\"sc-tabs__count\">{count}</span>\n </>\n ) : null}\n </BaseTabs.Tab>\n );\n}\n\nexport interface TabsPanelProps extends Omit<BaseTabs.Panel.Props, 'className' | 'value'> {\n value: string;\n className?: string | undefined;\n}\n\n/** The content of one tab. Unmounted while hidden unless `keepMounted`. */\nfunction Panel({ className, ...rest }: TabsPanelProps) {\n return <BaseTabs.Panel className={cx('sc-tabs__panel', className)} {...rest} />;\n}\n\n/** Switches between sections of one view. Built on Base UI's Tabs. */\nexport const Tabs = { Root, List, Tab, Panel };\n","import { Toolbar as BaseToolbar } from '@base-ui/react/toolbar';\nimport type { SpacingSize } from '../../types';\nimport { cx } from '../../utils/cx';\n\nexport interface ToolbarRootProps extends Omit<BaseToolbar.Root.Props, 'className'> {\n /** Required. Names the toolbar for assistive tech: \"Inbox actions\". */\n 'aria-label': string;\n /** Wraps onto new lines on narrow widths (default). `false` keeps one line that overflows. */\n wrap?: boolean | undefined;\n /** Gap between items and groups. Default `xs`. */\n gap?: SpacingSize | undefined;\n className?: string | undefined;\n}\n\n/**\n * A row of controls with one tab stop: Tab enters, arrow keys move between items, Tab leaves. Put every\n * control through `Toolbar.Button` (`render={<IconButton … />}`) so it joins the roving focus.\n */\nfunction Root({ wrap = true, gap = 'xs', className, ...rest }: ToolbarRootProps) {\n return (\n <BaseToolbar.Root\n className={cx('sc-toolbar', className)}\n data-wrap={wrap || undefined}\n data-gap={gap}\n {...rest}\n />\n );\n}\n\nexport interface ToolbarGroupProps extends Omit<BaseToolbar.Group.Props, 'className'> {\n /** Names the group: \"Playback\". */\n 'aria-label'?: string | undefined;\n /** Gap inside the group. Default `2xs`. */\n gap?: SpacingSize | undefined;\n className?: string | undefined;\n}\n\n/** Keeps related controls together with a tighter gap. */\nfunction Group({ gap = '2xs', className, ...rest }: ToolbarGroupProps) {\n return <BaseToolbar.Group className={cx('sc-toolbar__group', className)} data-gap={gap} {...rest} />;\n}\n\nexport interface ToolbarSeparatorProps extends Omit<BaseToolbar.Separator.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** A hairline between groups. */\nfunction Separator({ className, ...rest }: ToolbarSeparatorProps) {\n return <BaseToolbar.Separator className={cx('sc-toolbar__separator', className)} {...rest} />;\n}\n\nexport interface ToolbarButtonProps extends Omit<BaseToolbar.Button.Props, 'className'> {\n className?: string | undefined;\n}\n\n/**\n * Joins a control to the toolbar's keyboard navigation. Pass the real control through `render`:\n * `<Toolbar.Button render={<IconButton label=\"Pause\" tooltip />}><PauseIcon /></Toolbar.Button>`.\n * For a Menu, nest: `<Toolbar.Button render={<Menu.Trigger render={<IconButton … />} />}>`.\n */\nconst Button = BaseToolbar.Button;\n\nexport interface ToolbarLinkProps extends Omit<BaseToolbar.Link.Props, 'className'> {\n className?: string | undefined;\n}\n\n/**\n * A link that joins the toolbar's keyboard navigation. With no `render` it is a plain `<a>`; for an\n * icon link pass an IconButton that itself renders the anchor (or a Next.js `Link`):\n * `<Toolbar.Link render={<IconButton label=\"Settings\" tooltip render={<a href=\"/settings\" />} />}><SettingsIcon /></Toolbar.Link>`.\n */\nconst Link = BaseToolbar.Link;\n\nexport interface ToolbarSpacerProps {\n className?: string | undefined;\n}\n\n/** Pushes what follows to the far end. */\nfunction Spacer({ className }: ToolbarSpacerProps) {\n return <div className={cx('sc-toolbar__spacer', className)} aria-hidden=\"true\" />;\n}\n\n/** A horizontal container of controls. Built on Base UI's Toolbar. */\nexport const Toolbar = { Root, Group, Separator, Button, Link, Spacer };\n","import { useState, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { IconButton } from '../IconButton/IconButton';\nimport { CircleCheckIcon, CircleXIcon, InfoIcon, WarningIcon, XIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type BannerTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral';\n\nexport interface BannerProps extends ComponentPropsWithRef<'div'> {\n /** Colour and default icon. `warning` and `danger` are announced as alerts; the rest as status. */\n tone?: BannerTone | undefined;\n /** Replaces the tone's icon; `false` removes it. */\n icon?: ReactNode | false | undefined;\n /** One Button, usually `variant=\"ghost\" size=\"sm\"`, at the end of the strip. */\n action?: ReactNode | undefined;\n /** Shows a close button that hides the banner. */\n dismissible?: boolean | undefined;\n /** Called when the close button is pressed. */\n onDismiss?: (() => void) | undefined;\n /** Controlled visibility when dismissible. */\n open?: boolean | undefined;\n /** Accessible name of the close button. Default \"Dismiss\". */\n dismissLabel?: string | undefined;\n}\n\nconst toneIcons: Record<BannerTone, ReactNode> = {\n info: <InfoIcon />,\n success: <CircleCheckIcon />,\n warning: <WarningIcon />,\n danger: <CircleXIcon />,\n neutral: null,\n};\n\n/** A single-line status strip across the top of a view: paused, offline, \"3 new since you looked\". */\nexport function Banner({\n tone = 'info',\n icon,\n action,\n dismissible = false,\n onDismiss,\n open,\n dismissLabel = 'Dismiss',\n role,\n className,\n children,\n ...rest\n}: BannerProps) {\n const [dismissed, setDismissed] = useState(false);\n const visible = open ?? !dismissed;\n if (!visible) return null;\n const glyph = icon === false ? null : (icon ?? toneIcons[tone]);\n return (\n <div\n role={role ?? (tone === 'warning' || tone === 'danger' ? 'alert' : 'status')}\n className={cx('sc-banner', className)}\n data-tone={tone}\n {...rest}\n >\n {glyph ? (\n <span className=\"sc-banner__icon\" aria-hidden=\"true\">\n {glyph}\n </span>\n ) : null}\n <div className=\"sc-banner__body\">{children}</div>\n {action ? <div className=\"sc-banner__action\">{action}</div> : null}\n {dismissible ? (\n <IconButton\n label={dismissLabel}\n size=\"sm\"\n className=\"sc-banner__dismiss\"\n onClick={() => {\n setDismissed(true);\n onDismiss?.();\n }}\n >\n <XIcon />\n </IconButton>\n ) : null}\n </div>\n );\n}\n","import type { ComponentPropsWithRef } from 'react';\nimport type { IconSize } from '../Icon/Icon';\nimport { cx } from '../../utils/cx';\n\nexport interface SpinnerProps extends ComponentPropsWithRef<'span'> {\n /** `xs` 12, `sm` 14, `md` 16 (default), `lg` 20, `xl` 24, or `em` to follow the font size. */\n size?: IconSize | undefined;\n /** What is happening, announced once as a status. Default \"Loading\". */\n label?: string | undefined;\n /** Hides it from assistive tech when the text beside it already says what is happening. */\n decorative?: boolean | undefined;\n}\n\n/** An indeterminate activity indicator in `currentColor`. Slows down, never stops, under reduced motion. */\nexport function Spinner({\n size = 'md',\n label = 'Loading',\n decorative = false,\n className,\n ...rest\n}: SpinnerProps) {\n return (\n <span\n className={cx('sc-spinner', className)}\n data-size={size}\n role={decorative ? undefined : 'status'}\n aria-label={decorative ? undefined : label}\n aria-hidden={decorative || undefined}\n {...rest}\n >\n <svg\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <circle className=\"sc-spinner__track\" cx=\"8\" cy=\"8\" r=\"6.25\" />\n <circle className=\"sc-spinner__arc\" cx=\"8\" cy=\"8\" r=\"6.25\" strokeLinecap=\"round\" />\n </svg>\n </span>\n );\n}\n","import { Progress as BaseProgress } from '@base-ui/react/progress';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { Spinner } from '../Spinner/Spinner';\nimport { cx } from '../../utils/cx';\n\nexport type ProgressTone = 'accent' | 'success' | 'warning' | 'danger' | 'neutral';\nexport type ProgressSize = 'sm' | 'md';\nexport type ProgressVariant = 'bar' | 'inline';\n\nexport interface ProgressProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {\n /** Current value. Omit or pass `null` while the amount of work is unknown (indeterminate). */\n value?: number | null | undefined;\n /** Default 100. Pass the total so `value` can be a count: `value={460} max={859}`. */\n max?: number | undefined;\n /** Default 0. */\n min?: number | undefined;\n /** What is happening: \"Verifying\". Visible, and names the bar for assistive tech. */\n label?: ReactNode | undefined;\n /** Detail at the end: \"460 of 859 · 3 min elapsed\". A string also becomes `aria-valuetext`. */\n valueText?: ReactNode | undefined;\n /** Shows the percentage when `valueText` is not given. */\n showValue?: boolean | undefined;\n /** Fill colour. Default `accent`; `success` when done, `danger` when it failed. */\n tone?: ProgressTone | undefined;\n /** Bar thickness: `sm` 4px, `md` 8px (default). Inline uses the text size. */\n size?: ProgressSize | undefined;\n /** `bar` (default) is label, value and a track; `inline` is a Spinner beside the text for toolbars and buttons. */\n variant?: ProgressVariant | undefined;\n /** Names the bar when there is no `label`. */\n 'aria-label'?: string | undefined;\n}\n\n/**\n * Says that something is processing and, when known, how far along it is. Built on Base UI's Progress:\n * `role=\"progressbar\"` with the aria value attributes, or none while indeterminate.\n */\nexport function Progress({\n value,\n max = 100,\n min = 0,\n label,\n valueText,\n showValue = false,\n tone = 'accent',\n size = 'md',\n variant = 'bar',\n className,\n ...rest\n}: ProgressProps) {\n const current = value ?? null;\n const hasValueText = valueText != null || (showValue && current !== null);\n return (\n <BaseProgress.Root\n value={current}\n max={max}\n min={min}\n getAriaValueText={(formatted) => (typeof valueText === 'string' ? valueText : (formatted ?? ''))}\n className={cx('sc-progress', className)}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n {...rest}\n >\n {variant === 'inline' ? <Spinner size=\"sm\" decorative className=\"sc-progress__spinner\" /> : null}\n {label != null ? <BaseProgress.Label className=\"sc-progress__label\">{label}</BaseProgress.Label> : null}\n {hasValueText ? (\n <BaseProgress.Value className=\"sc-progress__value\">\n {(formatted) => (valueText != null ? valueText : formatted)}\n </BaseProgress.Value>\n ) : null}\n {variant === 'bar' ? (\n <BaseProgress.Track className=\"sc-progress__track\">\n <BaseProgress.Indicator className=\"sc-progress__indicator\" />\n </BaseProgress.Track>\n ) : null}\n </BaseProgress.Root>\n );\n}\n","import { createElement, type ComponentPropsWithRef } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\nexport type HeadingSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span' | 'p';\nexport type TextTone = 'default' | 'muted' | 'subtle' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\n\nexport interface HeadingProps extends ComponentPropsWithRef<'h2'> {\n /** The outline level, rendered as `h1`–`h6`. Default 2. */\n level?: HeadingLevel | undefined;\n /** Visual size from the type scale, independent of the level. Defaults by level: 3xl, 2xl, xl, lg, md, sm. */\n size?: HeadingSize | undefined;\n /** Render a different element and keep the look; `div`/`span` for a card title that is not an outline entry. */\n as?: HeadingElement | undefined;\n /** Colour. Default is the text colour. */\n tone?: TextTone | undefined;\n /** One line with an ellipsis. */\n truncate?: boolean | undefined;\n}\n\nconst sizeByLevel: Record<HeadingLevel, HeadingSize> = {\n 1: '3xl',\n 2: '2xl',\n 3: 'xl',\n 4: 'lg',\n 5: 'md',\n 6: 'sm',\n};\n\n/** A heading from the type scale. `level` is the semantics, `size` the look; they are set separately on purpose. */\nexport function Heading({\n level = 2,\n size,\n as,\n tone = 'default',\n truncate = false,\n className,\n ...rest\n}: HeadingProps) {\n return createElement(as ?? `h${level}`, {\n className: cx('sc-heading', className),\n 'data-size': size ?? sizeByLevel[level],\n 'data-tone': tone,\n 'data-truncate': truncate || undefined,\n ...rest,\n });\n}\n","import { createElement, type ComponentPropsWithRef, type CSSProperties, type ReactElement } from 'react';\nimport type { TextTone } from '../Heading/Heading';\nimport { cx } from '../../utils/cx';\n\nexport type TextSize = 'xs' | 'sm' | 'md' | 'lg';\nexport type TextWeight = 'regular' | 'medium' | 'semibold';\nexport type TextAlign = 'start' | 'center' | 'end';\nexport type TextElement =\n | 'p'\n | 'span'\n | 'div'\n | 'label'\n | 'li'\n | 'dt'\n | 'dd'\n | 'strong'\n | 'em'\n | 'small'\n | 'time'\n | 'figcaption'\n | 'legend';\n\nexport interface TextProps extends ComponentPropsWithRef<'p'> {\n /** Element to render. Default `p`; `span` inside other text. */\n as?: TextElement | undefined;\n /** `xs` 12 captions, `sm` 14 UI text (default), `md` body copy, `lg` lede. */\n size?: TextSize | undefined;\n /** Colour. `muted` for metadata, `subtle` for placeholders, status tones for inline status. */\n tone?: TextTone | undefined;\n weight?: TextWeight | undefined;\n align?: TextAlign | undefined;\n /** `true` keeps one line with an ellipsis; a number clamps to that many lines. */\n truncate?: boolean | number | undefined;\n /** Tabular figures, for numbers that line up in columns. */\n numeric?: boolean | undefined;\n}\n\n/** Running text and labels from the type scale. Parents own spacing: Text has no margins. */\nexport function Text({\n as = 'p',\n size = 'sm',\n tone = 'default',\n weight = 'regular',\n align,\n truncate = false,\n numeric = false,\n className,\n style,\n ...rest\n}: TextProps): ReactElement {\n const clamp = typeof truncate === 'number' ? truncate : undefined;\n return createElement(as, {\n className: cx('sc-text', className),\n 'data-size': size,\n 'data-tone': tone,\n 'data-weight': weight,\n 'data-align': align,\n 'data-truncate': truncate === true ? '' : clamp !== undefined ? 'clamp' : undefined,\n 'data-numeric': numeric || undefined,\n style: clamp !== undefined ? ({ ...style, '--sc-text-lines': clamp } as CSSProperties) : style,\n ...rest,\n });\n}\n","import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport {\n createContext,\n useContext,\n type ComponentPropsWithRef,\n type CSSProperties,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n} from 'react';\nimport { ArrowDownIcon, ArrowUpIcon, CheckIcon, MinusIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\nimport type { RowSelection } from './useRowSelection';\n\nexport type TableAlign = 'start' | 'center' | 'end';\nexport type TableDensity = 'comfortable' | 'compact';\nexport type TableSortDirection = 'ascending' | 'descending' | 'none';\n\nexport interface TableRootProps extends Omit<ComponentPropsWithRef<'table'>, 'style'> {\n /** Column headers stay visible while the table scrolls. Give `maxHeight` to scroll inside the table; otherwise they stick to the page. */\n stickyHeader?: boolean | undefined;\n /** Limits the height and scrolls rows inside; pairs with `stickyHeader`. A CSS length. */\n maxHeight?: string | undefined;\n /** `compact` tightens row height and padding; `data-density=\"compact\"` on an ancestor does the same. */\n density?: TableDensity | undefined;\n /** Hairlines between rows (default) or none. */\n divided?: boolean | undefined;\n /** `fixed` column widths from the first row, for truncating cells. Default `auto`. */\n layout?: 'auto' | 'fixed' | undefined;\n /** Style and class for the scrolling wrapper; `className` goes on the `<table>`. */\n wrapperClassName?: string | undefined;\n wrapperStyle?: CSSProperties | undefined;\n style?: CSSProperties | undefined;\n children?: ReactNode | undefined;\n /**\n * `useRowSelection(ids)`. Turns on the selection column parts (`Table.SelectionHeader`, `Table.SelectionCell`),\n * modifier clicks on rows with a `selectionId`, and the keyboard: Cmd/Ctrl+A selects every row while focus\n * is inside the table, Escape clears.\n */\n selection?: RowSelection | undefined;\n}\n\nconst SelectionContext = createContext<RowSelection | null>(null);\nconst RowIdContext = createContext<string | undefined>(undefined);\n\nfunction useSelection(part: string): RowSelection {\n const selection = useContext(SelectionContext);\n if (!selection) throw new Error(`${part} needs Table.Root selection={useRowSelection(ids)}`);\n return selection;\n}\n\n/** Typing into a field inside the table keeps the browser's own Cmd/Ctrl+A and Escape. */\nfunction isTextEntry(target: EventTarget): boolean {\n if (!(target instanceof HTMLElement)) return false;\n if (\n target.isContentEditable ||\n target instanceof HTMLTextAreaElement ||\n target instanceof HTMLSelectElement\n )\n return true;\n return (\n target instanceof HTMLInputElement &&\n !['checkbox', 'radio', 'button', 'submit', 'reset', 'image', 'file', 'color', 'range'].includes(\n target.type,\n )\n );\n}\n\nconst CONTROLS =\n 'a[href], button, input, select, textarea, label, summary, [role=\"checkbox\"], [role=\"button\"], [role=\"link\"], [contenteditable=\"true\"]';\n\n/** The event started on a link, button or field inside `row`, which keeps its own click behaviour. */\nfunction fromControl(event: MouseEvent<HTMLElement>): boolean {\n const control = event.target instanceof Element ? event.target.closest(CONTROLS) : null;\n return control !== null && event.currentTarget.contains(control);\n}\n\n/** A semantic `<table>` in a horizontally scrolling wrapper. Compose `Table.Head`, `Table.Body`, `Table.Row`, `Table.Header`, `Table.Cell`. */\nfunction Root({\n stickyHeader = false,\n maxHeight,\n density,\n divided = true,\n layout = 'auto',\n wrapperClassName,\n wrapperStyle,\n className,\n style,\n children,\n selection,\n onKeyDown,\n ...rest\n}: TableRootProps) {\n const handleKeyDown = (event: KeyboardEvent<HTMLTableElement>) => {\n onKeyDown?.(event);\n if (!selection || event.defaultPrevented) return;\n // Popups portalled out of a cell still bubble here through React; they are not \"inside the table\".\n if (!(event.target instanceof Node) || !event.currentTarget.contains(event.target)) return;\n if (isTextEntry(event.target)) return;\n if ((event.metaKey || event.ctrlKey) && !event.altKey && event.key.toLowerCase() === 'a') {\n event.preventDefault();\n selection.selectAll();\n } else if (event.key === 'Escape' && selection.count > 0) {\n event.preventDefault();\n selection.clear();\n }\n };\n return (\n <div\n className={cx('sc-table-wrap', wrapperClassName)}\n data-sticky-header={stickyHeader || undefined}\n data-scroll={maxHeight ? '' : undefined}\n style={maxHeight ? { ...wrapperStyle, maxBlockSize: maxHeight } : wrapperStyle}\n >\n {/* Selection shortcuts are delegated from the focusable controls inside (checkboxes, links, sort buttons). */}\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}\n <table\n className={cx('sc-table', className)}\n data-density={density}\n data-divided={divided || undefined}\n data-layout={layout}\n style={style}\n onKeyDown={selection ? handleKeyDown : onKeyDown}\n {...rest}\n >\n <SelectionContext.Provider value={selection ?? null}>{children}</SelectionContext.Provider>\n </table>\n </div>\n );\n}\n\nexport type TableCaptionProps = ComponentPropsWithRef<'caption'>;\n\n/** Names the table for assistive tech; visually a muted line above it. */\nfunction Caption({ className, ...rest }: TableCaptionProps) {\n return <caption className={cx('sc-table__caption', className)} {...rest} />;\n}\n\nexport type TableHeadProps = ComponentPropsWithRef<'thead'>;\nfunction Head({ className, ...rest }: TableHeadProps) {\n return <thead className={cx('sc-table__head', className)} {...rest} />;\n}\n\nexport type TableBodyProps = ComponentPropsWithRef<'tbody'>;\nfunction Body({ className, ...rest }: TableBodyProps) {\n return <tbody className={cx('sc-table__body', className)} {...rest} />;\n}\n\nexport type TableFootProps = ComponentPropsWithRef<'tfoot'>;\nfunction Foot({ className, ...rest }: TableFootProps) {\n return <tfoot className={cx('sc-table__foot', className)} {...rest} />;\n}\n\nexport interface TableRowProps extends ComponentPropsWithRef<'tr'> {\n /** Accent wash, for the current row. With `selectionId` it defaults to the row's selection. */\n selected?: boolean | undefined;\n /** Hover wash and pointer; make the primary cell a link or button for the real target. */\n interactive?: boolean | undefined;\n /**\n * The row's id in `Table.Root selection`. Shift+click extends the range to this row and Cmd/Ctrl+click\n * toggles it, unless the click is on a link, button or field inside the row; neither reaches `onClick`,\n * so a plain click can still open the row.\n */\n selectionId?: string | undefined;\n}\n\nfunction Row({\n selected,\n interactive = false,\n selectionId,\n className,\n onClick,\n onMouseDown,\n ...rest\n}: TableRowProps) {\n const selection = useContext(SelectionContext);\n const selectable = selection !== null && selectionId !== undefined;\n const isSelected = selected ?? (selectable && selection.isSelected(selectionId));\n const row = (\n <tr\n className={cx('sc-table__row', className)}\n data-selected={isSelected || undefined}\n data-interactive={interactive || undefined}\n aria-selected={selectable ? isSelected : isSelected || undefined}\n onClick={\n selectable\n ? (event) => {\n if ((event.shiftKey || event.metaKey || event.ctrlKey) && !fromControl(event)) {\n event.preventDefault();\n if (event.shiftKey) selection.toggleRange(selectionId);\n else selection.toggle(selectionId);\n return;\n }\n onClick?.(event);\n }\n : onClick\n }\n onMouseDown={\n selectable\n ? (event) => {\n // Shift+click would otherwise select the text between the two clicks.\n if (event.shiftKey && !fromControl(event)) event.preventDefault();\n onMouseDown?.(event);\n }\n : onMouseDown\n }\n {...rest}\n />\n );\n return selectionId === undefined ? (\n row\n ) : (\n <RowIdContext.Provider value={selectionId}>{row}</RowIdContext.Provider>\n );\n}\n\nfunction SelectionBox({\n label,\n ...rest\n}: { label: string } & Omit<BaseCheckbox.Root.Props, 'className' | 'render'>) {\n return (\n <BaseCheckbox.Root className=\"sc-checkbox\" aria-label={label} {...rest}>\n <BaseCheckbox.Indicator className=\"sc-checkbox__indicator\">\n <CheckIcon size=\"sm\" className=\"sc-checkbox__check\" />\n <MinusIcon size=\"sm\" className=\"sc-checkbox__dash\" />\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n );\n}\n\nconst onCheckbox = (event: MouseEvent<HTMLElement>) =>\n event.target instanceof Element && event.target.closest('[role=\"checkbox\"]') !== null;\n\nexport interface TableSelectionHeaderProps extends Omit<ComponentPropsWithRef<'th'>, 'children'> {\n /** The checkbox's accessible name. Default \"Select all rows\". */\n label?: string | undefined;\n}\n\n/**\n * The selection column's header: a checkbox that is checked when every row is, mixed when some are, and\n * selects every row (or, when all are selected, none). The whole cell is the hit area.\n */\nfunction SelectionHeader({\n label = 'Select all rows',\n className,\n onClick,\n ...rest\n}: TableSelectionHeaderProps) {\n const selection = useSelection('Table.SelectionHeader');\n const disabled = selection.ids.length === 0;\n const toggleAll = () => (selection.headerState === 'all' ? selection.clear() : selection.selectAll());\n return (\n <th\n scope=\"col\"\n className={cx('sc-table__header', 'sc-table__select', className)}\n data-disabled={disabled || undefined}\n onClick={(event) => {\n onClick?.(event);\n if (!disabled && !onCheckbox(event)) toggleAll();\n }}\n {...rest}\n >\n <SelectionBox\n label={label}\n checked={selection.headerState === 'all'}\n indeterminate={selection.headerState === 'some'}\n disabled={disabled}\n onCheckedChange={toggleAll}\n />\n </th>\n );\n}\n\nexport interface TableSelectionCellProps extends Omit<ComponentPropsWithRef<'td'>, 'children'> {\n /** Required. Names the row's checkbox: \"Select Tailscale, Front End Engineer\". */\n label: string;\n}\n\n/**\n * The row's checkbox, inside a `Table.Row selectionId`. Click or Space toggles; Shift+click or Shift+Space\n * extends the range from the last toggled row. The whole cell is the hit area, and its clicks never reach the\n * row's `onClick`.\n */\nfunction SelectionCell({ label, className, onClick, onClickCapture, ...rest }: TableSelectionCellProps) {\n const selection = useSelection('Table.SelectionCell');\n const id = useContext(RowIdContext);\n if (id === undefined) throw new Error('Table.SelectionCell goes inside a Table.Row with selectionId');\n return (\n <td\n className={cx('sc-table__cell', 'sc-table__select', className)}\n onClickCapture={(event) => {\n onClickCapture?.(event);\n // Shift+click, and Shift+Space (Base UI turns the keyup into a click that keeps the modifiers), take the\n // range before the checkbox would flip on its own.\n if (!event.shiftKey) return;\n event.preventDefault();\n event.stopPropagation();\n selection.toggleRange(id);\n }}\n onClick={(event) => {\n onClick?.(event);\n event.stopPropagation();\n if (!onCheckbox(event)) selection.toggle(id);\n }}\n {...rest}\n >\n <SelectionBox\n label={label}\n checked={selection.isSelected(id)}\n onCheckedChange={() => selection.toggle(id)}\n />\n </td>\n );\n}\n\ninterface CellSlots {\n /** Horizontal alignment. Default `start`; `end` for numbers. */\n align?: TableAlign | undefined;\n /** Tabular figures and end alignment. */\n numeric?: boolean | undefined;\n /** No wrapping. */\n nowrap?: boolean | undefined;\n /** One line with an ellipsis; needs `layout=\"fixed\"` or a `width`. */\n truncate?: boolean | undefined;\n /** Column width as a CSS length, on headers. */\n width?: string | undefined;\n}\n\nexport interface TableHeaderProps extends Omit<ComponentPropsWithRef<'th'>, 'align' | 'width'>, CellSlots {\n /** Renders the label as a button that sorts the column. The table stays controlled: sort the rows yourself in `onSort`. */\n sortable?: boolean | undefined;\n /** The column's current sort, reflected as `aria-sort`. `none` (default) for every column but the sorted one. */\n sortDirection?: TableSortDirection | undefined;\n /** Called with the direction to apply: `ascending` first, then it toggles. */\n onSort?: ((direction: Exclude<TableSortDirection, 'none'>) => void) | undefined;\n}\n\n/** A `<th>`; `scope` defaults to `col`, pass `row` for the first cell of a row. */\nfunction Header({\n align,\n numeric = false,\n nowrap = false,\n truncate = false,\n width,\n sortable = false,\n sortDirection = 'none',\n onSort,\n scope = 'col',\n className,\n style,\n children,\n ...rest\n}: TableHeaderProps) {\n const sorted = sortable && sortDirection !== 'none';\n return (\n <th\n scope={scope}\n className={cx('sc-table__header', className)}\n data-align={align ?? (numeric ? 'end' : undefined)}\n data-numeric={numeric || undefined}\n data-nowrap={nowrap || undefined}\n data-truncate={truncate || undefined}\n data-sortable={sortable || undefined}\n data-sorted={sorted ? sortDirection : undefined}\n aria-sort={sorted ? sortDirection : undefined}\n style={width ? { ...style, inlineSize: width } : style}\n {...rest}\n >\n {sortable ? (\n <button\n type=\"button\"\n className=\"sc-table__sort\"\n onClick={() => onSort?.(sortDirection === 'ascending' ? 'descending' : 'ascending')}\n >\n <span className=\"sc-table__sort-label\">{children}</span>\n <span className=\"sc-table__sort-icon\" aria-hidden=\"true\">\n {sortDirection === 'descending' ? <ArrowDownIcon size=\"xs\" /> : <ArrowUpIcon size=\"xs\" />}\n </span>\n </button>\n ) : (\n children\n )}\n </th>\n );\n}\n\nexport interface TableCellProps extends Omit<ComponentPropsWithRef<'td'>, 'align' | 'width'>, CellSlots {}\n\nfunction Cell({\n align,\n numeric = false,\n nowrap = false,\n truncate = false,\n width,\n className,\n style,\n ...rest\n}: TableCellProps) {\n return (\n <td\n className={cx('sc-table__cell', className)}\n data-align={align ?? (numeric ? 'end' : undefined)}\n data-numeric={numeric || undefined}\n data-nowrap={nowrap || undefined}\n data-truncate={truncate || undefined}\n style={width ? { ...style, inlineSize: width } : style}\n {...rest}\n />\n );\n}\n\n/** Rows of records with column headers. Native table elements, so screen readers get rows and columns. */\nexport const Table = { Root, Caption, Head, Body, Foot, Row, Header, Cell, SelectionHeader, SelectionCell };\n","import { useMemo, useReducer } from 'react';\nimport {\n headerState,\n initRowSelection,\n rowSelectionReducer,\n sameIds,\n selectedIds,\n type RowSelectionHeaderState,\n} from './rowSelection';\n\nexport interface RowSelection {\n /** The selectable ids, in the order passed in. */\n ids: readonly string[];\n /** The selected ids; a subset of the ids passed in. */\n selected: ReadonlySet<string>;\n /** The selected ids in visible order. */\n selectedIds: readonly string[];\n count: number;\n /** Where the next Shift range starts. */\n anchor: string | null;\n /** For the header checkbox. */\n headerState: RowSelectionHeaderState;\n isSelected: (id: string) => boolean;\n toggle: (id: string) => void;\n /** Every row from the anchor to `id`, inclusive, in the current order, takes `id`'s new state. */\n toggleRange: (id: string) => void;\n selectAll: () => void;\n clear: () => void;\n}\n\n/**\n * Selection state for a list of rows, by id. Pass the selectable ids in visible order (after filtering and\n * sorting); when one disappears it leaves the selection and the rest stay. Hand the result to\n * `Table.Root selection` for the checkbox column and keyboard, or read it for a bulk-action bar.\n */\nexport function useRowSelection(ids: readonly string[]): RowSelection {\n const [stored, dispatch] = useReducer(rowSelectionReducer, ids, initRowSelection);\n // Rows changed since the last render: sync now (a render-phase update, so nothing paints a stale count),\n // and read the synced state this render.\n const state = sameIds(stored.ids, ids)\n ? stored\n : rowSelectionReducer(stored, { type: 'selection.sync', ids });\n if (state !== stored) dispatch({ type: 'selection.sync', ids });\n\n const actions = useMemo(\n () => ({\n toggle: (id: string) => dispatch({ type: 'selection.toggle', id }),\n toggleRange: (id: string) => dispatch({ type: 'selection.toggleRange', id }),\n selectAll: () => dispatch({ type: 'selection.selectAll' }),\n clear: () => dispatch({ type: 'selection.clear' }),\n }),\n [],\n );\n return useMemo(\n () => ({\n ids: state.ids,\n selected: state.selected,\n selectedIds: selectedIds(state),\n count: state.selected.size,\n anchor: state.anchor,\n headerState: headerState(state),\n isSelected: (id: string) => state.selected.has(id),\n ...actions,\n }),\n [state, actions],\n );\n}\n","// Row selection as a pure reducer: no React, no DOM. `useRowSelection` is the thin hook over it, and the Table's\n// selection column and keyboard handling only send it events. Events are namespaced `selection.*` (guideline 07).\n\n/** The header checkbox: nothing, some or every row selected. */\nexport type RowSelectionHeaderState = 'none' | 'some' | 'all';\n\nexport interface RowSelectionState {\n /** The selectable row ids in visible order (after the page's filter and sort). Unique. */\n readonly ids: readonly string[];\n /** The selected ids; always a subset of `ids`. */\n readonly selected: ReadonlySet<string>;\n /** Where the next range starts: the row toggled last, on its own or as the end of a range. */\n readonly anchor: string | null;\n}\n\nexport type RowSelectionEvent =\n /** The visible rows changed (filter, sort, new data): keep the order, drop what disappeared. */\n | { type: 'selection.sync'; ids: readonly string[] }\n /** Flip one row; it becomes the anchor. */\n | { type: 'selection.toggle'; id: string }\n /** Shift: every row from the anchor to `id`, inclusive, in visible order, takes `id`'s new state; `id` becomes the anchor. */\n | { type: 'selection.toggleRange'; id: string }\n | { type: 'selection.selectAll' }\n | { type: 'selection.clear' };\n\nexport function initRowSelection(ids: readonly string[]): RowSelectionState {\n return { ids, selected: new Set(), anchor: null };\n}\n\n/** Same ids in the same order. */\nexport function sameIds(a: readonly string[], b: readonly string[]): boolean {\n if (a === b) return true;\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i += 1) if (a[i] !== b[i]) return false;\n return true;\n}\n\nfunction toggle(state: RowSelectionState, id: string): RowSelectionState {\n if (!state.ids.includes(id)) return state;\n const selected = new Set(state.selected);\n if (selected.has(id)) selected.delete(id);\n else selected.add(id);\n return { ...state, selected, anchor: id };\n}\n\nfunction toggleRange(state: RowSelectionState, id: string): RowSelectionState {\n const to = state.ids.indexOf(id);\n if (to < 0) return state;\n const from = state.anchor === null ? -1 : state.ids.indexOf(state.anchor);\n if (from < 0 || from === to) return toggle(state, id);\n const on = !state.selected.has(id);\n const selected = new Set(state.selected);\n const [start, end] = from < to ? [from, to] : [to, from];\n for (let i = start; i <= end; i += 1) {\n const rowId = state.ids[i]!;\n if (on) selected.add(rowId);\n else selected.delete(rowId);\n }\n return { ...state, selected, anchor: id };\n}\n\nfunction sync(state: RowSelectionState, ids: readonly string[]): RowSelectionState {\n if (sameIds(state.ids, ids)) return state;\n const present = new Set(ids);\n let selected = state.selected;\n for (const id of state.selected) {\n if (present.has(id)) continue;\n selected = new Set([...state.selected].filter((x) => present.has(x)));\n break;\n }\n const anchor = state.anchor !== null && present.has(state.anchor) ? state.anchor : null;\n return { ids, selected, anchor };\n}\n\n/** Pure: returns `state` itself when an event changes nothing, so React can bail out. */\nexport function rowSelectionReducer(state: RowSelectionState, event: RowSelectionEvent): RowSelectionState {\n switch (event.type) {\n case 'selection.sync':\n return sync(state, event.ids);\n case 'selection.toggle':\n return toggle(state, event.id);\n case 'selection.toggleRange':\n return toggleRange(state, event.id);\n case 'selection.selectAll':\n return state.selected.size === state.ids.length ? state : { ...state, selected: new Set(state.ids) };\n case 'selection.clear':\n return state.selected.size === 0 && state.anchor === null\n ? state\n : { ...state, selected: new Set(), anchor: null };\n }\n}\n\nexport function headerState(state: RowSelectionState): RowSelectionHeaderState {\n if (state.selected.size === 0) return 'none';\n return state.selected.size === state.ids.length ? 'all' : 'some';\n}\n\n/** The selected ids in visible order. */\nexport function selectedIds(state: RowSelectionState): string[] {\n return state.ids.filter((id) => state.selected.has(id));\n}\n","import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ReactNode } from 'react';\nimport { Button } from '../Button/Button';\nimport { Toolbar } from '../Toolbar/Toolbar';\nimport { cx } from '../../utils/cx';\n\nexport interface SelectionBarProps {\n /** How many rows are selected. The bar shows from 1 and leaves at 0. */\n count: number;\n /** Clears the selection (the Clear button). */\n onClear: () => void;\n /** The actions, each a `Toolbar.Button`: `<Toolbar.Button render={<Button size=\"sm\" variant=\"secondary\" />}>Close 3</Toolbar.Button>`. */\n children?: ReactNode | undefined;\n /** Names the toolbar. Default \"Bulk actions\". */\n 'aria-label'?: string | undefined;\n /** The count text, visible and announced. Default `${count} selected`. */\n countLabel?: ((count: number) => string) | undefined;\n /** Default \"Clear\". */\n clearLabel?: string | undefined;\n /** Announced when the selection goes back to none. Default \"Selection cleared\". */\n clearedMessage?: string | undefined;\n className?: string | undefined;\n}\n\nconst defaultCountLabel = (count: number) => `${count} selected`;\n/** Matches `--sc-duration-base` in selection-bar.css: the bar stays mounted this long to fade out. */\nconst LEAVE_MS = 200;\n\n/**\n * A floating bar for bulk actions on selected rows, centred at the bottom of the viewport: the count, the actions\n * and Clear, as one Toolbar (one tab stop, arrow keys inside). A polite status region announces the count as it\n * changes. Put it after the table, at the end of the scrolling content: while it shows, it leaves a spacer as\n * tall as itself there, so the last rows can scroll clear of it. When it leaves while holding focus (an action\n * cleared the selection), focus goes back to where it came from, usually the last row checkbox.\n */\nexport function SelectionBar({\n count,\n onClear,\n children,\n 'aria-label': ariaLabel = 'Bulk actions',\n countLabel = defaultCountLabel,\n clearLabel = 'Clear',\n clearedMessage = 'Selection cleared',\n className,\n}: SelectionBarProps) {\n const open = count > 0;\n // Nothing is announced on load; \"cleared\" only after there was a selection.\n const [hadSelection, setHadSelection] = useState(open);\n if (open && !hadSelection) setHadSelection(true);\n const message = open ? countLabel(count) : hadSelection ? clearedMessage : '';\n\n // Stay mounted for the fade-out, still showing the last count.\n const [rendered, setRendered] = useState(open);\n const [shownCount, setShownCount] = useState(count);\n if (open && !rendered) setRendered(true);\n if (open && shownCount !== count) setShownCount(count);\n useEffect(() => {\n if (open || !rendered) return;\n const timer = setTimeout(() => setRendered(false), LEAVE_MS);\n return () => clearTimeout(timer);\n }, [open, rendered]);\n\n const barRef = useRef<HTMLDivElement>(null);\n const returnTo = useRef<HTMLElement | null>(null);\n useLayoutEffect(() => {\n const bar = barRef.current;\n if (open || !bar?.contains(bar.ownerDocument.activeElement)) return;\n if (returnTo.current?.isConnected) returnTo.current.focus();\n }, [open]);\n\n // The spacer follows the bar's height (it wraps on narrow screens).\n const [height, setHeight] = useState(0);\n useEffect(() => {\n const bar = barRef.current;\n if (!rendered || !bar || typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(([entry]) => setHeight(entry!.borderBoxSize[0]?.blockSize ?? 0));\n observer.observe(bar);\n return () => observer.disconnect();\n }, [rendered]);\n\n return (\n <>\n <span role=\"status\" className=\"sc-visually-hidden\">\n {message}\n </span>\n {rendered ? (\n <>\n {open ? (\n <div\n className=\"sc-selection-bar__spacer\"\n style={{ '--sc-selection-bar-height': `${height}px` } as CSSProperties}\n aria-hidden=\"true\"\n />\n ) : null}\n <div\n ref={barRef}\n className={cx('sc-selection-bar', className)}\n data-open={open || undefined}\n onFocus={(event) => {\n const from = event.relatedTarget;\n if (from instanceof HTMLElement && !event.currentTarget.contains(from)) returnTo.current = from;\n }}\n >\n <Toolbar.Root aria-label={ariaLabel} className=\"sc-selection-bar__toolbar\">\n <span className=\"sc-selection-bar__count\">{countLabel(shownCount)}</span>\n <Toolbar.Separator />\n {children}\n <Toolbar.Spacer />\n <Toolbar.Button render={<Button variant=\"ghost\" size=\"sm\" />} onClick={onClear}>\n {clearLabel}\n </Toolbar.Button>\n </Toolbar.Root>\n </div>\n </>\n ) : null}\n </>\n );\n}\n","import { Toast as BaseToast } from '@base-ui/react/toast';\nimport { useMemo, type ReactNode } from 'react';\nimport { XIcon } from '../../icons/icons.gen';\nimport { Button } from '../Button/Button';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type ToastTone = 'neutral' | 'success' | 'danger';\n\nexport interface ToastOptions {\n /** Required. One line: \"Closed 5 applications\". */\n title: ReactNode;\n description?: ReactNode | undefined;\n /** A coloured edge. Default `neutral`. */\n tone?: ToastTone | undefined;\n /** One action, usually Undo. It closes the toast after `onClick`. */\n action?: { label: string; onClick: () => void } | undefined;\n /** Milliseconds before it closes; paused while hovered or focused; `0` keeps it. Default: the Provider's. */\n timeout?: number | undefined;\n /** `high` announces assertively (errors). Default `low`, polite. */\n priority?: 'low' | 'high' | undefined;\n}\n\nexport interface ToastProviderProps {\n children?: ReactNode | undefined;\n /** Default auto-close, in milliseconds. Default 6000. */\n timeout?: number | undefined;\n /** How many show at once; older ones close. Default 3. */\n limit?: number | undefined;\n}\n\n/** Holds the toasts for `useToast()` below it and renders them, bottom-end, in the top layer. */\nfunction Provider({ children, timeout = 6000, limit = 3 }: ToastProviderProps) {\n return (\n <BaseToast.Provider timeout={timeout} limit={limit}>\n {children}\n <BaseToast.Portal>\n <Viewport />\n </BaseToast.Portal>\n </BaseToast.Provider>\n );\n}\n\nfunction Viewport() {\n const { toasts, close } = BaseToast.useToastManager();\n return (\n <BaseToast.Viewport className=\"sc-toast-viewport\">\n {toasts.map((toast) => (\n <BaseToast.Root key={toast.id} toast={toast} className=\"sc-toast\" data-tone={toast.type ?? 'neutral'}>\n <BaseToast.Content className=\"sc-toast__content\">\n <BaseToast.Title className=\"sc-toast__title\" />\n {toast.description != null ? <BaseToast.Description className=\"sc-toast__description\" /> : null}\n </BaseToast.Content>\n {toast.actionProps ? (\n <BaseToast.Action\n className=\"sc-toast__action\"\n render={<Button variant=\"secondary\" size=\"sm\" />}\n />\n ) : null}\n <IconButton label=\"Dismiss\" size=\"sm\" className=\"sc-toast__close\" onClick={() => close(toast.id)}>\n <XIcon />\n </IconButton>\n </BaseToast.Root>\n ))}\n </BaseToast.Viewport>\n );\n}\n\nexport interface ToastApi {\n /** Shows a toast and returns its id. */\n add: (options: ToastOptions) => string;\n /** Closes one toast, or every toast without an id. */\n close: (id?: string) => void;\n}\n\n/** Shows toasts from inside a `Toast.Provider`. */\nexport function useToast(): ToastApi {\n const manager = BaseToast.useToastManager();\n return useMemo(\n () => ({\n add: ({ title, description, tone = 'neutral', action, timeout, priority }: ToastOptions) => {\n let id = '';\n id = manager.add({\n title,\n description,\n type: tone,\n ...(timeout !== undefined ? { timeout } : {}),\n ...(priority ? { priority } : {}),\n ...(action\n ? {\n actionProps: {\n children: action.label,\n onClick: () => {\n action.onClick();\n manager.close(id);\n },\n },\n }\n : {}),\n });\n return id;\n },\n close: manager.close,\n }),\n [manager],\n );\n}\n\n/**\n * Short-lived status messages: \"Closed 5 applications · Undo\". Built on Base UI's Toast: announced through a\n * polite region (`priority: 'high'` for errors), paused while hovered or focused, F6 moves focus to them.\n */\nexport const Toast = { Provider };\n","import { createElement, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { ArrowDownIcon, ArrowRightIcon, ArrowUpIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type StatTrend = 'up' | 'down' | 'flat';\nexport type StatDeltaTone = 'positive' | 'negative' | 'neutral';\nexport type StatElement = 'div' | 'li' | 'article';\nexport type StatVariant = 'outlined' | 'filled' | 'plain';\nexport type StatSize = 'sm' | 'md';\n\nexport interface StatProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {\n /** What the number is: \"Applications\", \"Reply rate\". */\n label: ReactNode;\n /** The number, already formatted: \"1,204\", \"37%\". */\n value: ReactNode;\n /** The change beside the value: \"+12\", \"−3.1 pts\", \"same as last week\". */\n delta?: ReactNode | undefined;\n /** Colour of the delta: `positive` green, `negative` red, `neutral` muted (default). Say which is good; up is not always good. */\n deltaTone?: StatDeltaTone | undefined;\n /** Arrow before the delta. */\n trend?: StatTrend | undefined;\n /** Muted line under the value: \"last 7 days\", \"of 2,000 budget\". */\n hint?: ReactNode | undefined;\n /** A 20px icon in the corner. Decorative. */\n icon?: ReactNode | undefined;\n /** `outlined` surface (default), `filled` inset, `plain` no surface for a row of stats inside a Card. */\n variant?: StatVariant | undefined;\n /** `md` (default) or `sm` for dense rows. */\n size?: StatSize | undefined;\n /** Element to render; `li` in a list of stats. */\n as?: StatElement | undefined;\n}\n\nconst trendIcons: Record<StatTrend, ReactNode> = {\n up: <ArrowUpIcon size=\"xs\" />,\n down: <ArrowDownIcon size=\"xs\" />,\n flat: <ArrowRightIcon size=\"xs\" />,\n};\n\n/** One number with its label: a KPI tile. The value is text, so it reads as \"Applications, 1,204, up 12\". */\nexport function Stat({\n label,\n value,\n delta,\n deltaTone = 'neutral',\n trend,\n hint,\n icon,\n variant = 'outlined',\n size = 'md',\n as = 'div',\n className,\n ...rest\n}: StatProps) {\n return createElement(\n as,\n {\n className: cx('sc-stat', className),\n 'data-variant': variant,\n 'data-size': size,\n ...rest,\n },\n <>\n <div className=\"sc-stat__label\">{label}</div>\n {icon ? (\n <span className=\"sc-stat__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n <div className=\"sc-stat__value\">{value}</div>\n {delta != null ? (\n <div className=\"sc-stat__delta\" data-tone={deltaTone}>\n {trend ? (\n <span className=\"sc-stat__trend\" aria-hidden=\"true\">\n {trendIcons[trend]}\n </span>\n ) : null}\n {trend ? (\n <span className=\"sc-visually-hidden\">{trend === 'flat' ? 'unchanged' : trend} </span>\n ) : null}\n {delta}\n </div>\n ) : null}\n {hint != null ? <div className=\"sc-stat__hint\">{hint}</div> : null}\n </>,\n );\n}\n","import type { ComponentPropsWithRef, KeyboardEvent, MouseEvent, ReactNode } from 'react';\nimport { XIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type ChipTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\nexport type ChipSize = 'sm' | 'md';\n\nexport interface ChipProps extends Omit<ComponentPropsWithRef<'span'>, 'onClick' | 'onRemove'> {\n /** The chip text. Keep it to a word or three. */\n children: ReactNode;\n /** A 14px icon before the text. Decorative. */\n icon?: ReactNode | undefined;\n /** Colour. `neutral` (default) for filters, a status tone when the chip is the status. */\n tone?: ChipTone | undefined;\n /** `md` 32px (default) or `sm` 24px inside table rows and Card headers. */\n size?: ChipSize | undefined;\n /** Filled and `aria-pressed`. Use with `onClick` for a toggling filter chip. */\n selected?: boolean | undefined;\n /** Makes the chip a `<button>` that toggles; `selected` is reflected as `aria-pressed`. */\n onClick?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;\n /**\n * Adds a labelled × that calls this. Backspace or Delete on the focused chip (or on the ×) removes it\n * too. Focus is yours to manage after removal: move it to the next chip or the filter input.\n */\n onRemove?: (() => void) | undefined;\n /** Accessible name of the ×. Default \"Remove\" followed by the chip text when that text is a string. */\n removeLabel?: string | undefined;\n disabled?: boolean | undefined;\n}\n\n/**\n * A small pill: an applied filter, a tag, a selectable option in a row of a few. `onClick` makes it a\n * toggle button, `onRemove` adds the ×, and the two combine. Plain text otherwise.\n */\nexport function Chip({\n children,\n icon,\n tone = 'neutral',\n size = 'md',\n selected = false,\n onClick,\n onRemove,\n removeLabel,\n disabled = false,\n className,\n ...rest\n}: ChipProps) {\n const interactive = onClick !== undefined;\n const removeName = removeLabel ?? (typeof children === 'string' ? `Remove ${children}` : 'Remove');\n const handleRemoveKey = (event: KeyboardEvent<HTMLElement>) => {\n if (onRemove && !disabled && (event.key === 'Backspace' || event.key === 'Delete')) {\n event.preventDefault();\n onRemove();\n }\n };\n const shared = {\n className: cx('sc-chip', className),\n 'data-tone': tone,\n 'data-size': size,\n 'data-selected': selected || undefined,\n 'data-removable': onRemove ? '' : undefined,\n 'data-disabled': disabled || undefined,\n };\n const body = (\n <>\n {icon ? (\n <span className=\"sc-chip__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n <span className=\"sc-chip__label\">{children}</span>\n </>\n );\n const remove = onRemove ? (\n <button\n type=\"button\"\n className=\"sc-chip__remove\"\n aria-label={removeName}\n disabled={disabled}\n onClick={(event) => {\n event.stopPropagation();\n onRemove();\n }}\n onKeyDown={handleRemoveKey}\n >\n <XIcon size=\"xs\" />\n </button>\n ) : null;\n\n if (interactive) {\n return (\n <span {...shared} {...rest}>\n <button\n type=\"button\"\n className=\"sc-chip__action\"\n aria-pressed={selected}\n disabled={disabled}\n onClick={onClick}\n onKeyDown={handleRemoveKey}\n >\n {body}\n </button>\n {remove}\n </span>\n );\n }\n return (\n <span {...shared} {...rest}>\n {body}\n {remove}\n </span>\n );\n}\n","import {\n type CSSProperties,\n useEffect,\n useRef,\n useState,\n type ComponentPropsWithRef,\n type ReactNode,\n type SyntheticEvent,\n} from 'react';\nimport { ChevronDownIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport interface DisclosureProps extends Omit<ComponentPropsWithRef<'details'>, 'open' | 'onToggle'> {\n /** Required. The summary line, a verb phrase: \"Show full description\". */\n summary: ReactNode;\n /** Replaces `summary` while open: \"Show less\". */\n summaryOpen?: ReactNode | undefined;\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the user toggles it. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /**\n * While closed, shows this many lines of the content fading out, so a long description still reads\n * as a teaser. Puts the summary line under the preview. Needs `::details-content` (2025 browsers);\n * older ones show the summary alone.\n */\n previewLines?: number | undefined;\n /** Puts the summary line above (default) or below the content. Defaults to `end` with `previewLines`. */\n summaryPosition?: 'start' | 'end' | undefined;\n children?: ReactNode | undefined;\n}\n\n/**\n * A native `<details>` collapse with a styled summary. Works without JavaScript, is announced as a\n * disclosure, and shares `name` with siblings for an exclusive group.\n */\nexport function Disclosure({\n summary,\n summaryOpen,\n open,\n defaultOpen = false,\n onOpenChange,\n previewLines,\n summaryPosition,\n className,\n style,\n children,\n ref,\n ...rest\n}: DisclosureProps) {\n const controlled = open !== undefined;\n const [internal, setInternal] = useState(defaultOpen);\n const isOpen = controlled ? open : internal;\n const inner = useRef<HTMLDetailsElement | null>(null);\n // A native toggle flips the element itself; when controlled and the parent declines, put it back.\n useEffect(() => {\n if (controlled && inner.current && inner.current.open !== open) inner.current.open = open;\n });\n const onToggle = (event: SyntheticEvent<HTMLDetailsElement>) => {\n const next = event.currentTarget.open;\n if (next === isOpen) return;\n if (!controlled) setInternal(next);\n onOpenChange?.(next);\n };\n const position = summaryPosition ?? (previewLines ? 'end' : 'start');\n return (\n <details\n ref={(node) => {\n inner.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n className={cx('sc-disclosure', className)}\n open={isOpen}\n onToggle={onToggle}\n data-summary-position={position}\n data-preview={previewLines ? '' : undefined}\n style={previewLines ? ({ ...style, '--_lines': previewLines } as CSSProperties) : style}\n {...rest}\n >\n <summary className=\"sc-disclosure__summary\">\n <ChevronDownIcon className=\"sc-disclosure__chevron\" />\n <span className=\"sc-disclosure__summary-text\">\n {isOpen && summaryOpen != null ? summaryOpen : summary}\n </span>\n </summary>\n <div className=\"sc-disclosure__content\">{children}</div>\n </details>\n );\n}\n","import { createElement, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type EmptyStateSize = 'sm' | 'md';\nexport type EmptyStateElement = 'div' | 'section' | 'li';\n\nexport interface EmptyStateProps extends Omit<ComponentPropsWithRef<'div'>, 'title'> {\n /** Required. What is empty, as a short statement: \"No applications yet\". */\n title: ReactNode;\n /** One sentence on why, or what to do: \"Postings you apply to show up here.\" */\n description?: ReactNode | undefined;\n /** A 24px icon in a muted circle above the title. Decorative. */\n icon?: ReactNode | undefined;\n /** The actions, usually one primary Button and at most one secondary. Rendered in an Inline. */\n children?: ReactNode | undefined;\n /** `md` (default) for a whole view or panel, `sm` inside a Card or a table body. */\n size?: EmptyStateSize | undefined;\n /** Element to render. Default `div`. */\n as?: EmptyStateElement | undefined;\n}\n\n/**\n * Centred placeholder for a view with nothing in it: an icon, a title, a sentence and the action that\n * fills it. Say what is missing and the next step; never apologise.\n */\nexport function EmptyState({\n title,\n description,\n icon,\n children,\n size = 'md',\n as = 'div',\n className,\n ...rest\n}: EmptyStateProps) {\n return createElement(\n as,\n { className: cx('sc-empty-state', className), 'data-size': size, ...rest },\n icon ? (\n <span className=\"sc-empty-state__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : null,\n <p className=\"sc-empty-state__title\">{title}</p>,\n description != null ? <p className=\"sc-empty-state__description\">{description}</p> : null,\n children != null ? <div className=\"sc-empty-state__actions\">{children}</div> : null,\n );\n}\n","import type { ComponentPropsWithRef, CSSProperties } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport type SkeletonVariant = 'text' | 'rect' | 'circle';\n\nexport interface SkeletonProps extends ComponentPropsWithRef<'span'> {\n /** `text` (default) is one line of the current font size; `rect` a block; `circle` an avatar. */\n variant?: SkeletonVariant | undefined;\n /** Any CSS length. Default: text `100%`, rect `100%`, circle `40px`. */\n width?: string | number | undefined;\n /** Any CSS length. Default: text `1em` (one line), rect `80px`, circle = `width`. */\n height?: string | number | undefined;\n /** For `text`: how many lines; the last is shorter. Default 1. */\n lines?: number | undefined;\n /** Hides the shimmer. Default `false`; reduced motion hides it anyway. */\n still?: boolean | undefined;\n}\n\n/**\n * A placeholder shape shown while real content loads. It is hidden from assistive tech: put\n * `aria-busy=\"true\"` on the region being filled, or a `Spinner` with a label beside it, so the loading\n * state is announced once instead of per block.\n */\nexport function Skeleton({\n variant = 'text',\n width,\n height,\n lines = 1,\n still = false,\n className,\n style,\n ...rest\n}: SkeletonProps) {\n const size: CSSProperties = {\n ...style,\n ...(width !== undefined ? { inlineSize: width } : {}),\n ...(height !== undefined ? { blockSize: height } : {}),\n };\n if (variant === 'text' && lines > 1) {\n return (\n <span className={cx('sc-skeleton-lines', className)} aria-hidden=\"true\" style={style} {...rest}>\n {Array.from({ length: lines }, (_, i) => (\n <span\n key={i}\n className=\"sc-skeleton\"\n data-variant=\"text\"\n data-still={still || undefined}\n data-last={i === lines - 1 || undefined}\n style={width !== undefined ? { inlineSize: width } : undefined}\n />\n ))}\n </span>\n );\n }\n return (\n <span\n className={cx('sc-skeleton', className)}\n data-variant={variant}\n data-still={still || undefined}\n aria-hidden=\"true\"\n style={size}\n {...rest}\n />\n );\n}\n","import { useEffect, useId, useRef, useState } from 'react';\nimport type * as FilePondApi from 'filepond';\nimport type { FilePond, FilePondFile, FilePondOptions } from 'filepond';\nimport type { FieldProps } from '../Field/FieldShell';\nimport { cx } from '../../utils/cx';\nimport { FilePreviewDialog } from '../FilePreviewDialog/FilePreviewDialog';\nimport {\n describeAccept,\n escapeHtml,\n matchesAccept,\n parseAccept,\n parseSize,\n previewKind,\n rejectionMessage,\n type FileRejectionReason,\n} from './accept';\n\nexport interface FileInputProps extends FieldProps {\n /** Accepted types, as for the native attribute: `\".pdf,.docx,text/plain\"` or a list. Extensions, exact MIME types and `image/*` wildcards. */\n accept?: string | readonly string[] | undefined;\n /** How the accepted types read in the error message. Default derived from `accept` (\"PDF, DOCX or plain text\"). */\n acceptLabel?: string | undefined;\n /** Largest file accepted, in bytes or as `\"10MB\"` (base 1000, like the size shown in the list). */\n maxFileSize?: number | string | undefined;\n /** Allows several files. Without it a new file replaces the current one. */\n multiple?: boolean | undefined;\n /** With `multiple`, the most files the list holds. */\n maxFiles?: number | undefined;\n /** Controlled list of accepted files. Pass `[]` to clear. */\n files?: readonly File[] | undefined;\n /** Initial files when uncontrolled. */\n defaultFiles?: readonly File[] | undefined;\n /** Called with the accepted files (plain `File` objects) after every add or remove. Rejected files never appear here. */\n onFilesChange?: ((files: File[]) => void) | undefined;\n /** Drop zone text before the browse link. Default \"Drop a file here or\" (or \"Drop files here or\" with `multiple`). */\n idleLabel?: string | undefined;\n /** The browse link's text. Default \"browse\". */\n browseLabel?: string | undefined;\n /**\n * Lets people check a file before it is uploaded: the name of each PDF, plain text, Markdown or image\n * file becomes a button that opens it in a `FilePreviewDialog`. Other types (DOCX …) show a plain name.\n * Default `true`; no preview while `disabled`.\n */\n preview?: boolean | undefined;\n}\n\ntype FilePondModule = typeof FilePondApi;\n\nconst REMOVE_ICON =\n '<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M4 4l8 8M12 4l-8 8\"/></svg>';\n\nconst sameFiles = (a: readonly File[], b: readonly File[]) =>\n a.length === b.length && a.every((file, i) => file === b[i]);\n\n/**\n * A labelled file picker with a drop zone, on FilePond (docs/adr/0004). Files stay in the browser: the\n * component hands plain `File` objects to `onFilesChange`, and with `name` it also keeps them in a file\n * input so a `<form>` (or a Server Action) submits them. Type, size and count are checked before a file\n * joins the list; a rejected file never joins it, and the reason shows in the field's error slot and is\n * announced. FilePond loads on mount, so the server renders a static drop zone and nothing of FilePond.\n */\nexport function FileInput({\n label,\n hideLabel = false,\n description,\n error,\n invalid = false,\n required = false,\n disabled = false,\n name,\n size = 'md',\n className,\n accept,\n acceptLabel,\n maxFileSize,\n multiple = false,\n maxFiles,\n files,\n defaultFiles,\n onFilesChange,\n idleLabel,\n browseLabel = 'browse',\n preview = true,\n}: FileInputProps) {\n const id = useId();\n const labelId = `${id}label`;\n const descriptionId = `${id}description`;\n const messagesId = `${id}messages`;\n\n const controlled = files !== undefined;\n const [uncontrolledFiles, setUncontrolledFiles] = useState<readonly File[]>(defaultFiles ?? []);\n const current = controlled ? files : uncontrolledFiles;\n\n const [rejections, setRejections] = useState<string[]>([]);\n const [inputId, setInputId] = useState<string>();\n /** The file in the preview dialog (kept while it closes) and the row button that opened it. */\n const [previewFile, setPreviewFile] = useState<File | null>(null);\n const [previewOpen, setPreviewOpen] = useState(false);\n const previewTriggerRef = useRef<HTMLButtonElement | null>(null);\n /** Bumps every time a pond is created, so the sync effects run against the new instance. */\n const [pondVersion, setPondVersion] = useState(0);\n\n const hostRef = useRef<HTMLDivElement>(null);\n const pondRef = useRef<FilePond | null>(null);\n const moduleRef = useRef<FilePondModule | null>(null);\n const patchRef = useRef<() => void>(() => {});\n /** The files last handed out (or received), so FilePond's repeated events don't re-emit. */\n const settledRef = useRef<readonly File[]>(current);\n /** While the pond is being brought to the `files` prop, the list it should reach. */\n const targetRef = useRef<readonly File[] | null>(null);\n\n const acceptList = parseAccept(accept);\n const acceptAttr = acceptList.join(',');\n const maxBytes = parseSize(maxFileSize);\n const messages = [...rejections, ...(error != null ? [error] : [])];\n const isInvalid = invalid || messages.length > 0;\n const idleText =\n idleLabel ??\n (multiple\n ? 'Drop files here or'\n : current.length > 0\n ? 'Drop another file to replace it, or'\n : 'Drop a file here or');\n\n // Everything the long-lived FilePond callbacks read, refreshed on every render.\n const live = {\n acceptList,\n acceptLabel: acceptLabel ?? describeAccept(acceptList),\n maxBytes,\n maxFiles: multiple ? maxFiles : 1,\n multiple,\n current,\n controlled,\n onFilesChange,\n labelId,\n describedBy: [description != null ? descriptionId : null, messages.length > 0 ? messagesId : null],\n isInvalid,\n acceptAttr,\n preview: preview && !disabled,\n openPreview: (file: File, trigger: HTMLButtonElement) => {\n previewTriggerRef.current = trigger;\n setPreviewFile(file);\n setPreviewOpen(true);\n },\n };\n const liveRef = useRef(live);\n useEffect(() => {\n liveRef.current = live;\n });\n\n // Create the pond on mount; destroy it on unmount (and between StrictMode's double mount).\n useEffect(() => {\n let cancelled = false;\n let pond: FilePond | null = null;\n let observer: MutationObserver | null = null;\n const host = hostRef.current;\n if (!host) return undefined;\n\n const reject = (reason: FileRejectionReason, file?: File) => {\n const l = liveRef.current;\n const message = rejectionMessage(reason, {\n name: file?.name,\n size: file?.size,\n acceptLabel: l.acceptLabel,\n maxFileSize: l.maxBytes,\n maxFiles: l.maxFiles,\n });\n setRejections((list) => (list.includes(message) ? list : [...list, message]));\n // A file the `files` prop asked for but that fails validation: stop waiting for it.\n if (file && targetRef.current) {\n targetRef.current = targetRef.current.filter((f) => f !== file);\n queueMicrotask(emit);\n }\n };\n // A new drop or browse starts a new attempt: earlier rejections no longer apply.\n const startAttempt = () => setRejections((list) => (list.length ? [] : list));\n let removeIntent = false;\n const acceptedIds = new Set<string>();\n const noteRemove = (event: Event) => {\n if ((event.target as Element | null)?.closest?.('.filepond--action-remove-item')) removeIntent = true;\n };\n const onPreviewClick = (event: Event) => {\n const button = (event.target as Element | null)?.closest?.<HTMLButtonElement>(\n '.sc-file-input__preview',\n );\n const file = button?.dataset.fileId ? pond?.getFile(button.dataset.fileId)?.file : null;\n if (!button || !(file instanceof File)) return;\n // FilePond treats a click in a row as \"activate item\"; this click is ours.\n event.stopPropagation();\n liveRef.current.openPreview(file, button);\n };\n\n const emit = () => {\n const mod = moduleRef.current;\n if (!pond || !mod) return;\n const idle = pond\n .getFiles()\n .filter((item: FilePondFile) => item.status === mod.FileStatus.IDLE)\n .map((item: FilePondFile) => item.file as File);\n // Single mode: a new accepted file replaces the old one, which leaves a beat later.\n const accepted = liveRef.current.multiple ? idle : idle.slice(-1);\n const target = targetRef.current;\n if (target) {\n if (!sameFiles(accepted, target)) return;\n targetRef.current = null;\n settledRef.current = accepted;\n // The prop (or `defaultFiles`) asked for a file that was rejected: report what the pond holds.\n if (!sameFiles(accepted, liveRef.current.current)) {\n if (!liveRef.current.controlled) setUncontrolledFiles(accepted);\n liveRef.current.onFilesChange?.(accepted);\n }\n return;\n }\n if (sameFiles(accepted, settledRef.current)) return;\n settledRef.current = accepted;\n if (!liveRef.current.controlled) setUncontrolledFiles(accepted);\n liveRef.current.onFilesChange?.(accepted);\n };\n\n // Keeps FilePond's DOM wired to our label, description, errors and keyboard model.\n const patch = () => {\n if (!pond) return;\n const l = liveRef.current;\n const root = pond.element;\n if (!root) return;\n const set = (el: Element | null, attr: string, value: string | null) => {\n if (!el || el.getAttribute(attr) === value) return;\n if (value == null) el.removeAttribute(attr);\n else el.setAttribute(attr, value);\n };\n const input = root.querySelector<HTMLInputElement>('input.filepond--browser');\n const dropLabel = root.querySelector('.filepond--drop-label label');\n set(input, 'aria-labelledby', l.labelId);\n set(input, 'aria-describedby', [dropLabel?.id, ...l.describedBy].filter(Boolean).join(' ') || null);\n set(input, 'aria-invalid', l.isInvalid ? 'true' : null);\n set(input, 'accept', l.acceptAttr || null);\n // FilePond always runs in multi mode here (see `addfile`); the picker follows `multiple`.\n set(input, 'multiple', l.multiple ? '' : null);\n // One tab stop: the file input. FilePond also makes the \"browse\" text focusable, with no role.\n set(root.querySelector('.filepond--label-action'), 'tabindex', null);\n for (const item of root.querySelectorAll('.filepond--item')) {\n const fileName = item.querySelector('.filepond--file-info-main')?.textContent?.trim();\n const remove = item.querySelector('.filepond--action-remove-item');\n if (fileName) set(remove, 'aria-label', `Remove ${fileName}`);\n patchPreview(item, remove);\n }\n // FilePond drops its file input while disabled; the label's `for` follows.\n setInputId(input?.id || undefined);\n };\n\n // The file's name as a real button, a foreign node in FilePond's row. It goes before the × so the tab\n // order follows the row (name, then remove); FilePond attaches a row's children once, when it creates\n // the row, and never re-inserts them by index, so the extra node does not disturb it. FilePond's own\n // name span stays (it holds a reference to it) and is hidden by CSS while the button is there.\n const patchPreview = (item: Element, remove: Element | null) => {\n const row = item.querySelector('.filepond--file');\n if (!row) return;\n let button = row.querySelector<HTMLButtonElement>(':scope > .sc-file-input__preview');\n const id = item.id.replace(/^filepond--item-/, '');\n const file = pond?.getFile(id)?.file;\n if (!liveRef.current.preview || !(file instanceof File) || previewKind(file) == null) {\n button?.remove();\n return;\n }\n if (!button) {\n button = document.createElement('button');\n button.type = 'button';\n button.className = 'sc-file-input__preview';\n row.insertBefore(button, remove ?? row.firstChild);\n }\n // Only write what changed: these writes are seen by the observer that called this.\n if (button.dataset.fileId !== id) button.dataset.fileId = id;\n if (button.textContent !== file.name) button.textContent = file.name;\n const name = `Preview ${file.name}`;\n if (button.getAttribute('aria-label') !== name) button.setAttribute('aria-label', name);\n };\n\n void import('filepond').then((mod) => {\n if (cancelled || !mod.supported()) return;\n moduleRef.current = mod;\n const options: FilePondOptions = {\n credits: false,\n allowPaste: false,\n allowReorder: false,\n allowProcess: false,\n allowRevert: false,\n instantUpload: false,\n dropOnPage: false,\n // Always multi: FilePond's own single mode replaces the current file *before* validating the new\n // one, so a rejected file would discard a good one. Replacement happens in `addfile` instead.\n allowMultiple: true,\n allowReplace: false,\n itemInsertLocation: 'after',\n fileSizeBase: 1000,\n iconRemove: REMOVE_ICON,\n labelButtonRemoveItem: 'Remove',\n styleButtonRemoveItemPosition: 'right',\n beforeAddFile: (item) => {\n const l = liveRef.current;\n const file = item.file as File;\n if (!matchesAccept(file, l.acceptList)) return (reject('type', file), false);\n if (l.maxBytes != null && file.size > l.maxBytes) return (reject('size', file), false);\n return true;\n },\n };\n // At runtime `create(options)` builds a detached root; the typings only declare `create(element, options)`.\n pond = (mod.create as unknown as (o: FilePondOptions) => FilePond)(options);\n const root = pond.element;\n if (!root) return;\n host.appendChild(root);\n pondRef.current = pond;\n patchRef.current = patch;\n pond.on('addfile', (error: unknown, added: FilePondFile) => {\n if (!error) acceptedIds.add(added.id);\n if (!error && !liveRef.current.multiple)\n for (const other of pond?.getFiles() ?? []) if (other.id !== added.id) pond?.removeFile(other.id);\n emit();\n });\n pond.on('removefile', (_error: unknown, removed: FilePondFile) => {\n // Removing with the × takes focus with it; hand it back to the field's control.\n const active = document.activeElement;\n const inRemovedRow = active?.closest('.filepond--item')?.id === `filepond--item-${removed.id}`;\n if (inRemovedRow || (removeIntent && (active == null || active === document.body)))\n root.querySelector<HTMLInputElement>('input.filepond--browser')?.focus();\n removeIntent = false;\n // An accepted file leaving (the × or the `files` prop) ends the attempt a rejection was about. A\n // rejected file never fired `addfile`, so its own removal keeps the message.\n if (acceptedIds.delete(removed.id)) startAttempt();\n emit();\n });\n pond.on('updatefiles', emit);\n pond.on('warning', (warning: { body?: string } | undefined) => {\n if (warning?.body === 'Max files') reject('count');\n });\n observer = new MutationObserver(patch);\n observer.observe(root, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: ['tabindex', 'aria-labelledby', 'aria-describedby', 'accept', 'id', 'multiple'],\n });\n host.addEventListener('drop', startAttempt, true);\n host.addEventListener('change', startAttempt, true);\n host.addEventListener('click', noteRemove, true);\n host.addEventListener('click', onPreviewClick);\n settledRef.current = [];\n setPondVersion((v) => v + 1);\n });\n\n return () => {\n cancelled = true;\n host.removeEventListener('drop', startAttempt, true);\n host.removeEventListener('change', startAttempt, true);\n host.removeEventListener('click', noteRemove, true);\n host.removeEventListener('click', onPreviewClick);\n observer?.disconnect();\n if (pond) {\n pond.element?.remove();\n pond.destroy();\n }\n pondRef.current = null;\n patchRef.current = () => {};\n };\n }, []);\n\n // Props → FilePond options and DOM wiring.\n useEffect(() => {\n const pond = pondRef.current;\n if (!pond) return;\n pond.setOptions({\n name: name ?? '',\n storeAsFile: name != null,\n disabled,\n required,\n maxFiles: multiple ? (maxFiles ?? null) : null,\n allowRemove: !disabled,\n labelIdle: `${escapeHtml(idleText)} <span class=\"filepond--label-action\">${escapeHtml(browseLabel)}</span>`,\n });\n // FilePond rewrites some attributes on its next frame; the MutationObserver re-patches then.\n patchRef.current();\n }, [\n pondVersion,\n name,\n disabled,\n required,\n multiple,\n maxFiles,\n idleText,\n browseLabel,\n labelId,\n acceptAttr,\n isInvalid,\n description,\n messages.length,\n preview,\n ]);\n\n // The `files` prop (or `defaultFiles`) → the pond's list.\n useEffect(() => {\n const pond = pondRef.current;\n const mod = moduleRef.current;\n if (!pond || !mod) return;\n const items = pond.getFiles();\n const idle = items.filter((item) => item.status === mod.FileStatus.IDLE);\n const inPond = idle.map((item) => item.file as File);\n if (sameFiles(inPond, current)) {\n settledRef.current = current;\n return;\n }\n targetRef.current = current;\n for (const item of idle) if (!current.includes(item.file as File)) pond.removeFile(item.id);\n const toAdd = current.filter((file) => !inPond.includes(file));\n if (toAdd.length > 0) void pond.addFiles(toAdd);\n }, [current, pondVersion]);\n\n const ready = pondVersion > 0;\n return (\n <div\n className={cx('sc-field', 'sc-file-input-field', className)}\n data-size={size}\n data-disabled={disabled ? '' : undefined}\n data-invalid={isInvalid ? '' : undefined}\n >\n <label\n id={labelId}\n htmlFor={inputId}\n className={cx('sc-field__label', hideLabel && 'sc-visually-hidden')}\n >\n {label}\n {required ? (\n <span className=\"sc-field__required\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </label>\n <div\n className=\"sc-file-input\"\n data-ready={ready ? '' : undefined}\n data-disabled={disabled ? '' : undefined}\n data-invalid={isInvalid ? '' : undefined}\n data-multiple={multiple ? '' : undefined}\n >\n {ready ? null : (\n // Server render and first paint: the same drop zone, inert until FilePond takes over.\n <div className=\"sc-file-input__placeholder\" aria-hidden=\"true\">\n {idleText} <span className=\"sc-file-input__browse\">{browseLabel}</span>\n </div>\n )}\n {/* FilePond's root is appended here; React never renders children into this node. */}\n <div ref={hostRef} className=\"sc-file-input__pond\" />\n </div>\n {description != null ? (\n <p id={descriptionId} className=\"sc-field__description\">\n {description}\n </p>\n ) : null}\n {/* Always present so a rejection that appears after a drop is announced. */}\n <div id={messagesId} className=\"sc-file-input__messages\" aria-live=\"polite\">\n {messages.map((message, i) => (\n <p key={i} className=\"sc-field__error\">\n {message}\n </p>\n ))}\n </div>\n {previewFile ? (\n <FilePreviewDialog\n file={previewFile}\n open={previewOpen}\n onOpenChange={setPreviewOpen}\n // Focus returns to the name button; Safari does not focus a button on click, so say so.\n finalFocus={() => {\n const trigger = previewTriggerRef.current;\n if (trigger?.isConnected) return trigger;\n return hostRef.current?.querySelector<HTMLInputElement>('input.filepond--browser') ?? true;\n }}\n />\n ) : null}\n </div>\n );\n}\n","import { useEffect, useRef, useState } from 'react';\nimport { Dialog, type DialogContentProps } from '../Dialog/Dialog';\nimport { ExternalLinkIcon } from '../../icons/icons.gen';\nimport { fileTypeLabel, formatListSize, formatSize, previewKind } from '../FileInput/accept';\nimport { useMediaQuery } from '../../utils/useMediaQuery';\n\nexport interface FilePreviewDialogProps {\n /** The file to show. Kept while the dialog closes, so pass `null` only once it has. */\n file: File | null | undefined;\n /** Controlled open state. */\n open: boolean;\n /** Called when the dialog asks to close (Esc, the ×, the backdrop). */\n onOpenChange: (open: boolean) => void;\n /** Where focus goes on close. Default: the element that had focus when it opened. */\n finalFocus?: DialogContentProps['finalFocus'];\n}\n\n/** Text files longer than this show their beginning only. */\nconst TEXT_LIMIT = 1_000_000;\n/** Below this width a PDF opens in a new tab instead of a frame (iOS Safari only draws page 1 in a frame). */\nconst NARROW = '(max-width: 48rem)';\n\n/**\n * Shows a local file before it is uploaded: a PDF in the browser's own viewer, plain text and Markdown as\n * text, an image as an image. Any other type gets a short note and nothing else, because a blob URL runs\n * with the page's origin: only a PDF is ever framed, and it is re-typed `application/pdf` first, so an HTML\n * file named `.pdf` cannot run. The object URL exists only while the dialog is open.\n */\nexport function FilePreviewDialog({ file, open, onOpenChange, finalFocus }: FilePreviewDialogProps) {\n const kind = file ? previewKind(file) : null;\n const narrow = useMediaQuery(NARROW);\n const pdfInTab = kind === 'pdf' && narrow;\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content\n size=\"lg\"\n className=\"sc-file-preview\"\n data-kind={kind ?? 'none'}\n finalFocus={finalFocus}\n >\n <Dialog.Close />\n {file ? (\n <>\n <Dialog.Title>{file.name}</Dialog.Title>\n <Dialog.Description>\n {fileTypeLabel(file)}, {formatListSize(file.size)}\n </Dialog.Description>\n <Dialog.Body>\n <PreviewBody file={file} kind={kind} open={open} pdfInTab={pdfInTab} />\n </Dialog.Body>\n </>\n ) : (\n <Dialog.Title>Preview</Dialog.Title>\n )}\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n\nfunction PreviewBody({\n file,\n kind,\n open,\n pdfInTab,\n}: {\n file: File;\n kind: ReturnType<typeof previewKind>;\n open: boolean;\n pdfInTab: boolean;\n}) {\n const frameRef = useRef<HTMLIFrameElement>(null);\n const imageRef = useRef<HTMLImageElement>(null);\n const linkRef = useRef<HTMLAnchorElement>(null);\n const [text, setText] = useState<{ file: File; value: string } | null>(null);\n\n // The object URL lives exactly as long as the dialog is open on this file. It goes straight onto the\n // elements, so nothing renders with a revoked URL.\n useEffect(() => {\n if (!open || (kind !== 'pdf' && kind !== 'image')) return undefined;\n const url = URL.createObjectURL(kind === 'pdf' ? new Blob([file], { type: 'application/pdf' }) : file);\n if (frameRef.current) frameRef.current.src = url;\n if (imageRef.current) imageRef.current.src = url;\n if (linkRef.current) linkRef.current.href = url;\n return () => URL.revokeObjectURL(url);\n }, [open, file, kind, pdfInTab]);\n\n useEffect(() => {\n if (!open || kind !== 'text') return undefined;\n let cancelled = false;\n void file\n .slice(0, TEXT_LIMIT)\n .text()\n .then((value) => {\n if (!cancelled) setText({ file, value });\n });\n return () => {\n cancelled = true;\n };\n }, [open, file, kind]);\n\n if (kind === 'pdf') {\n const link = (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid -- the effect above sets href to the object URL on mount\n <a\n ref={linkRef}\n className=\"sc-button\"\n data-variant={pdfInTab ? 'primary' : 'secondary'}\n data-size=\"md\"\n target=\"_blank\"\n rel=\"noopener\"\n >\n Open in a new tab\n <ExternalLinkIcon />\n </a>\n );\n return pdfInTab ? (\n <div className=\"sc-file-preview__tab\">\n <p className=\"sc-file-preview__note\">On a small screen the PDF reads best in its own tab.</p>\n {link}\n </div>\n ) : (\n <>\n <iframe ref={frameRef} className=\"sc-file-preview__frame\" title={`Preview of ${file.name}`} />\n <div className=\"sc-file-preview__actions\">{link}</div>\n </>\n );\n }\n if (kind === 'text') {\n const value = text?.file === file ? text.value : null;\n return (\n <>\n <pre\n className=\"sc-file-preview__text\"\n role=\"region\"\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- a scrolling region takes focus so the keyboard can scroll it\n tabIndex={0}\n aria-label={`Contents of ${file.name}`}\n aria-busy={value == null || undefined}\n >\n {value}\n </pre>\n {file.size > TEXT_LIMIT ? (\n <p className=\"sc-file-preview__note\">Showing the first {formatSize(TEXT_LIMIT)}.</p>\n ) : null}\n </>\n );\n }\n if (kind === 'image') {\n return <img ref={imageRef} className=\"sc-file-preview__image\" alt={file.name} />;\n }\n return <p className=\"sc-file-preview__note\">There is no preview for {fileTypeLabel(file)} files.</p>;\n}\n","// Pure helpers for FileInput: parsing `accept` and sizes, matching files, and wording the messages.\n\n/** Splits `accept` (a native accept string or a list) into lower-cased entries. */\nexport function parseAccept(accept: string | readonly string[] | undefined): string[] {\n if (accept == null) return [];\n const list = typeof accept === 'string' ? accept.split(',') : accept;\n return list.map((entry) => entry.trim().toLowerCase()).filter(Boolean);\n}\n\n/**\n * Matches a file the way the native `accept` attribute does: `.pdf` against the name, `image/*` against\n * the type's prefix, `application/pdf` exactly. An empty list accepts everything.\n */\nexport function matchesAccept(file: { name: string; type: string }, accept: readonly string[]): boolean {\n if (accept.length === 0) return true;\n const name = file.name.toLowerCase();\n const type = file.type.toLowerCase();\n return accept.some((entry) => {\n if (entry.startsWith('.')) return name.endsWith(entry);\n if (entry.endsWith('/*')) return type.startsWith(entry.slice(0, -1));\n return type === entry;\n });\n}\n\nconst UNITS: Record<string, number> = { b: 1, kb: 1e3, mb: 1e6, gb: 1e9 };\n\n/** Bytes from a number or a string such as `\"10MB\"` or `\"500 KB\"` (base 1000, like the file list). */\nexport function parseSize(size: number | string | undefined): number | undefined {\n if (size == null) return undefined;\n if (typeof size === 'number') return size;\n const match = /^\\s*(\\d+(?:\\.\\d+)?)\\s*(b|kb|mb|gb)\\s*$/i.exec(size);\n if (!match) throw new Error(`FileInput: maxFileSize \"${size}\" is not a size like \"10MB\".`);\n return Math.round(Number(match[1]) * UNITS[match[2]!.toLowerCase()]!);\n}\n\n/** `1500000` → `1.5 MB`. Base 1000, at most one decimal; precise enough for a size limit message. */\nexport function formatSize(bytes: number): string {\n const [unit, base] =\n bytes >= 1e9 ? ['GB', 1e9] : bytes >= 1e6 ? ['MB', 1e6] : bytes >= 1e3 ? ['KB', 1e3] : ['bytes', 1];\n const value = bytes / base;\n return `${Number.isInteger(value) ? value : Number(value.toFixed(1))} ${unit}`;\n}\n\n/**\n * A file's size exactly as FilePond writes it in the list (whole KB rounded down, MB to one decimal, GB to\n * two), so the preview dialog agrees with the row it was opened from.\n */\nexport function formatListSize(bytes: number): string {\n const n = Math.round(Math.abs(bytes));\n const trim = (value: number, decimals: number) => value.toFixed(decimals).replace(/\\.0+$/, '');\n if (n < 1e3) return `${n} bytes`;\n if (n < 1e6) return `${Math.floor(n / 1e3)} KB`;\n if (n < 1e9) return `${trim(n / 1e6, 1)} MB`;\n return `${trim(n / 1e9, 2)} GB`;\n}\n\nconst MIME_NAMES: Record<string, string> = {\n 'application/pdf': 'PDF',\n 'application/msword': 'DOC',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'DOCX',\n 'application/json': 'JSON',\n 'text/plain': 'plain text',\n 'text/markdown': 'Markdown',\n 'text/csv': 'CSV',\n 'image/png': 'PNG',\n 'image/jpeg': 'JPEG',\n};\n\n/** A short human list of the accepted types: `.pdf, .docx, text/plain` → `PDF, DOCX or plain text`. */\nexport function describeAccept(accept: readonly string[]): string {\n const names = accept.map((entry) => {\n if (entry.startsWith('.')) return entry.slice(1).toUpperCase();\n if (entry.endsWith('/*')) return `any ${entry.slice(0, -2)}`;\n return MIME_NAMES[entry] ?? entry.split('/').pop()!.toUpperCase();\n });\n const unique = [...new Set(names)];\n if (unique.length <= 1) return unique[0] ?? '';\n return `${unique.slice(0, -1).join(', ')} or ${unique.at(-1)}`;\n}\n\nexport type FileRejectionReason = 'type' | 'size' | 'count';\n\nexport function rejectionMessage(\n reason: FileRejectionReason,\n detail: {\n name?: string | undefined;\n size?: number | undefined;\n acceptLabel?: string | undefined;\n maxFileSize?: number | undefined;\n maxFiles?: number | undefined;\n },\n): string {\n switch (reason) {\n case 'type':\n return `${detail.name} is not an accepted file type. Use ${detail.acceptLabel}.`;\n case 'size':\n return `${detail.name} is ${formatSize(detail.size ?? 0)}, over the ${formatSize(detail.maxFileSize ?? 0)} limit.`;\n case 'count':\n return detail.maxFiles === 1\n ? 'Choose one file.'\n : `Up to ${detail.maxFiles} files. Remove one to add another.`;\n }\n}\n\n/** Escapes text for FilePond's `labelIdle`, which it sets as HTML. */\nexport function escapeHtml(text: string): string {\n return text.replace(\n /[&<>\"']/g,\n (ch) => ({ '&': '&', '<': '<', '>': '>', '\"': '"', \"'\": ''' })[ch]!,\n );\n}\n\n/** What a file can be previewed as before upload, or `null` when it cannot. */\nexport type FilePreviewKind = 'pdf' | 'text' | 'image';\n\nconst extensionOf = (name: string) => {\n const dot = name.lastIndexOf('.');\n return dot > 0 ? name.slice(dot + 1).toLowerCase() : '';\n};\nconst TEXT_EXTENSIONS = new Set(['txt', 'text', 'md', 'markdown']);\nconst TEXT_TYPES = new Set(['text/plain', 'text/markdown', 'text/x-markdown']);\nconst IMAGE_EXTENSIONS = new Set(['png', 'jpg', 'jpeg', 'gif', 'webp', 'avif', 'svg', 'bmp']);\n// Image types most browsers cannot draw in an <img>.\nconst UNDRAWABLE_IMAGE_TYPES = new Set(['image/heic', 'image/heif', 'image/tiff']);\n\n/**\n * Classifies a file by extension or MIME type, as `accept` does. Only these three are previewed: a PDF in\n * the browser's viewer, plain text and Markdown as text, images in an `<img>`. Everything else (DOCX, HTML,\n * unknown types) is `null`: a blob URL runs with the page's origin, so nothing else is ever framed.\n */\nexport function previewKind(file: { name: string; type: string }): FilePreviewKind | null {\n const ext = extensionOf(file.name);\n const type = file.type.toLowerCase();\n if (ext === 'pdf' || type === 'application/pdf') return 'pdf';\n if (TEXT_EXTENSIONS.has(ext) || TEXT_TYPES.has(type)) return 'text';\n if (UNDRAWABLE_IMAGE_TYPES.has(type)) return null;\n if (IMAGE_EXTENSIONS.has(ext) || type.startsWith('image/')) return 'image';\n return null;\n}\n\n/** A short type name for a file: `PDF`, `MD`, or the MIME subtype when there is no extension. */\nexport function fileTypeLabel(file: { name: string; type: string }): string {\n const ext = extensionOf(file.name);\n if (ext) return ext.toUpperCase();\n return MIME_NAMES[file.type.toLowerCase()] ?? (file.type.split('/').pop()?.toUpperCase() || 'File');\n}\n","import { useCallback, useSyncExternalStore } from 'react';\n\n/** Whether a media query matches, kept current. `false` on the server and where `matchMedia` is missing. */\nexport function useMediaQuery(query: string): boolean {\n const subscribe = useCallback(\n (onChange: () => void) => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return () => {};\n const list = window.matchMedia(query);\n list.addEventListener?.('change', onChange);\n return () => list.removeEventListener?.('change', onChange);\n },\n [query],\n );\n return useSyncExternalStore(\n subscribe,\n () => typeof window.matchMedia === 'function' && window.matchMedia(query).matches,\n () => false,\n );\n}\n","import {\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type ComponentPropsWithRef,\n type FocusEvent,\n type CSSProperties,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { ChevronDownIcon, MoreHorizontalIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\nimport { fitCount, inlineFlags, isOverflowing } from './fit';\nimport { placePanel } from './place';\n\nexport interface PriorityNavItem {\n /** Where the link goes. */\n href: string;\n /** The visible text. A string (or number) is part of the width cache key; see `PriorityNav`. */\n label: ReactNode;\n /** A stable key. Defaults to `href`. */\n id?: string | undefined;\n /** The page being shown: `aria-current=\"page\"`, and the link never collapses into \"More\". */\n current?: boolean | undefined;\n}\n\n/** What `renderLink` receives: spread it onto your link component. */\nexport interface PriorityNavLinkProps {\n href: string;\n className: string;\n 'aria-current': 'page' | undefined;\n onClick: MouseEventHandler<HTMLAnchorElement> | undefined;\n children: ReactNode;\n}\n\nexport interface PriorityNavProps extends Omit<ComponentPropsWithRef<'nav'>, 'children'> {\n /** Names the landmark: \"Main\". */\n 'aria-label': string;\n /** The links, in priority order: the first ones stay inline longest. */\n items: readonly PriorityNavItem[];\n /** Visible text of the overflow toggle. Default \"More\". */\n moreLabel?: string | undefined;\n /** Appended to the toggle's accessible name only: \"More, 3 links\". Default `n link(s)`. */\n moreCountLabel?: ((hidden: number) => string) | undefined;\n /** Renders each link. Default a plain `<a>`; pass a router link: `(props) => <Link {...props} />`. */\n renderLink?: ((props: PriorityNavLinkProps, item: PriorityNavItem) => ReactElement) | undefined;\n /**\n * Called when links start or stop collapsing into \"More\" (also `data-overflowing` on the `nav`), so a\n * header can make room, e.g. an action button going icon-only.\n */\n onOverflowChange?: ((overflowing: boolean) => void) | undefined;\n /**\n * Room in px the row must have beyond fitting every link before it stops reporting overflow. Set it to\n * the space your header gives back on overflow (the button label's width), so the two cannot oscillate.\n * Default 0.\n */\n overflowHysteresis?: number | undefined;\n}\n\nconst defaultCountLabel = (n: number) => (n === 1 ? '1 link' : `${n} links`);\nconst defaultLink = ({ children, ...props }: PriorityNavLinkProps) => <a {...props}>{children}</a>;\nconst keyOf = (item: PriorityNavItem) => item.id ?? item.href;\n\n/** CSS anchor positioning places the panel where it exists; elsewhere `placePanel` does, from JS. */\nconst supportsAnchor = () =>\n typeof CSS !== 'undefined' && typeof CSS.supports === 'function' && CSS.supports('anchor-name: --a');\n/** The Popover API puts the panel in the top layer, above every ancestor's overflow clip. */\nconst supportsPopover = (el: HTMLElement) => typeof el.showPopover === 'function';\n\n/** Widths are re-measured when this changes: the keys and any string labels, in order. */\nfunction signatureOf(items: readonly PriorityNavItem[]): string {\n return items\n .map((item) => {\n const text = typeof item.label === 'string' || typeof item.label === 'number' ? item.label : '';\n return `${keyOf(item)}\\u0001${text}`;\n })\n .join('\\u0002');\n}\n\ninterface Fit {\n /** The item signature these numbers were measured for; `null` until the first measurement. */\n signature: string | null;\n /** The current index `count` was computed with. */\n current: number;\n /** How many non-current items are inline (`fitCount`). */\n count: number;\n /** Latched overflow signal (`isOverflowing`). */\n overflowing: boolean;\n}\n\ninterface Measured {\n widths: number[];\n more: number;\n gap: number;\n available: number;\n}\n\n/**\n * Priority+ navigation: a row of primary links that keeps the ones that fit inline and collapses the rest\n * into a \"More\" disclosure at the end of the row. The current page is never collapsed. Follows the\n * WAI-ARIA APG disclosure navigation pattern (links in a list, a real button with `aria-expanded`), not\n * `role=\"menu\"`. Server-renders every link inline, so it works before hydration and without JavaScript;\n * see docs/adr/0005-priority-nav.md.\n */\nexport function PriorityNav({\n items,\n moreLabel = 'More',\n moreCountLabel = defaultCountLabel,\n renderLink = defaultLink,\n onOverflowChange,\n overflowHysteresis = 0,\n className,\n style,\n ...rest\n}: PriorityNavProps) {\n const signature = signatureOf(items);\n const current = items.findIndex((item) => item.current);\n const [fit, setFit] = useState<Fit>({ signature: null, current: -1, count: 0, overflowing: false });\n const [open, setOpen] = useState(false);\n const panelId = useId();\n const listRef = useRef<HTMLUListElement>(null);\n const moreRef = useRef<HTMLLIElement>(null);\n const toggleRef = useRef<HTMLButtonElement>(null);\n const panelRef = useRef<HTMLUListElement>(null);\n const measured = useRef<Measured | null>(null);\n const currentRef = useRef(current);\n const fitRef = useRef(fit);\n const hysteresisRef = useRef(overflowHysteresis);\n const onOverflowRef = useRef(onOverflowChange);\n\n /** The split for the cached measurements: how many links stay inline, and the latched overflow flag. */\n const solve = (m: Measured, cur: number, was: boolean) => ({\n count: fitCount({ ...m, current: cur }),\n overflowing: isOverflowing({ ...m, was, hysteresis: hysteresisRef.current }),\n });\n\n // Until the items are measured (on the server, before hydration, after the items or the fonts change)\n // every link renders inline in a single line that clips (or scrolls without JS), and the toggle is laid\n // out invisibly so it can be measured too.\n const measuring = fit.signature !== signature;\n\n // Measure once per signature, then split. Reads first (all widths, the gap, the row), then one state\n // write; React re-renders before paint, so the measuring pass is never seen.\n useLayoutEffect(() => {\n currentRef.current = current;\n fitRef.current = fit;\n hysteresisRef.current = overflowHysteresis;\n onOverflowRef.current = onOverflowChange;\n });\n\n useLayoutEffect(() => {\n const list = listRef.current;\n const more = moreRef.current;\n if (!list || !more) return;\n if (measuring) {\n const widths = Array.from(\n list.querySelectorAll<HTMLElement>(':scope > .sc-priority-nav__item'),\n (el) => el.getBoundingClientRect().width,\n );\n measured.current = {\n widths,\n more: more.getBoundingClientRect().width,\n gap: parseFloat(getComputedStyle(list).columnGap) || 0,\n available: list.clientWidth,\n };\n } else if (fit.current === current) return;\n const m = measured.current;\n if (!m) return;\n setFit({ signature, current, ...solve(m, current, fit.overflowing) });\n }, [measuring, signature, current, fit]);\n\n // One observer, on the row and on the \"More\" item. Its callback reads sizes from the entries (no layout\n // read): the row's width, and the toggle's width when it switches between \"More\" and icon-only (a\n // container query). It writes state only when the inline count or the overflow flag changes.\n useEffect(() => {\n const list = listRef.current;\n const more = moreRef.current;\n if (!list || !more || typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver((entries) => {\n const m = measured.current;\n if (!m) return;\n for (const entry of entries) {\n if (entry.target === list)\n m.available = entry.contentBoxSize?.[0]?.inlineSize ?? entry.contentRect.width;\n else {\n // Hidden (no overflow) reports 0; keep the last real width.\n const width = entry.borderBoxSize?.[0]?.inlineSize ?? 0;\n if (width > 0) m.more = width;\n }\n }\n // Compare before calling setState: an unchanged split must not even schedule a render.\n const prev = fitRef.current;\n if (prev.signature === null) return;\n const next = solve(m, currentRef.current, prev.overflowing);\n if (prev.count !== next.count || prev.overflowing !== next.overflowing) setFit({ ...prev, ...next });\n });\n observer.observe(list);\n observer.observe(more);\n return () => observer.disconnect();\n }, []);\n\n // Tell the header when the overflow flag changes (not on mount: it starts false everywhere).\n const reported = useRef(false);\n useEffect(() => {\n if (reported.current === fit.overflowing) return;\n reported.current = fit.overflowing;\n onOverflowRef.current?.(fit.overflowing);\n }, [fit.overflowing]);\n\n // Web fonts change every width. If they are still loading at mount, measure again once they are ready.\n useEffect(() => {\n const fonts = typeof document === 'undefined' ? undefined : document.fonts;\n if (!fonts || fonts.status === 'loaded') return;\n let live = true;\n void fonts.ready.then(() => {\n if (live) setFit((prev) => ({ ...prev, signature: null }));\n });\n return () => {\n live = false;\n };\n }, []);\n\n const flags = measuring ? null : inlineFlags(items.length, current, fit.count);\n const overflow = flags ? items.filter((_, i) => !flags[i]) : [];\n const expanded = open && overflow.length > 0;\n\n // The panel lives in the top layer while open (popover=\"manual\": opening, Escape, outside clicks and\n // focus stay ours, so behaviour is the same with or without the Popover API). It stays a DOM sibling of\n // the toggle, so Tab moves from the toggle into the links with no invoker wiring.\n useLayoutEffect(() => {\n const panel = panelRef.current;\n if (!panel || !supportsPopover(panel)) return;\n // Set on the client only, where the API exists: the server HTML and browsers without it keep `hidden`.\n if (!panel.hasAttribute('popover')) panel.setAttribute('popover', 'manual');\n const shown = panel.matches(':popover-open');\n if (expanded && !shown) panel.showPopover();\n else if (!expanded && shown) panel.hidePopover();\n }, [expanded]);\n\n // Without CSS anchor positioning: place the panel from JS on open, and again on resize or scroll while\n // open. Each pass reads (two rects, one computed style), then writes `left`/`top` once.\n useLayoutEffect(() => {\n const panel = panelRef.current;\n const toggle = toggleRef.current;\n if (!expanded || !panel || !toggle || supportsAnchor()) return;\n const place = () => {\n const anchor = toggle.getBoundingClientRect();\n const box = panel.getBoundingClientRect();\n const css = getComputedStyle(panel);\n const { left, top } = placePanel({\n anchor,\n panel: { width: box.width, height: box.height },\n viewport: { width: document.documentElement.clientWidth, height: window.innerHeight },\n gutter: parseFloat(css.getPropertyValue('--sc-spacing-md')) || 16,\n offset: parseFloat(css.getPropertyValue('--sc-spacing-2xs')) || 4,\n rtl: css.direction === 'rtl',\n });\n panel.style.left = `${left}px`;\n panel.style.top = `${top}px`;\n };\n place();\n window.addEventListener('resize', place, { passive: true });\n window.addEventListener('scroll', place, { passive: true, capture: true });\n return () => {\n window.removeEventListener('resize', place);\n window.removeEventListener('scroll', place, { capture: true });\n panel.style.left = '';\n panel.style.top = '';\n };\n }, [expanded]);\n\n // Click outside and Escape close the panel. Escape returns focus to the toggle.\n useEffect(() => {\n if (!expanded) return;\n const onPointerDown = (event: PointerEvent) => {\n if (!moreRef.current?.contains(event.target as Node)) setOpen(false);\n };\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n const active = document.activeElement;\n setOpen(false);\n if (!active || active === document.body || moreRef.current?.contains(active))\n toggleRef.current?.focus();\n };\n document.addEventListener('pointerdown', onPointerDown);\n document.addEventListener('keydown', onKeyDown);\n return () => {\n document.removeEventListener('pointerdown', onPointerDown);\n document.removeEventListener('keydown', onKeyDown);\n };\n }, [expanded]);\n\n // Focus leaving the \"More\" item (Tab past the last link) closes the panel, as in the APG example.\n const onBlur = (event: FocusEvent<HTMLLIElement>) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node | null)) setOpen(false);\n };\n\n const link = (item: PriorityNavItem, inPanel: boolean) =>\n renderLink(\n {\n href: item.href,\n className: 'sc-priority-nav__link',\n 'aria-current': item.current ? 'page' : undefined,\n onClick: inPanel ? () => setOpen(false) : undefined,\n children: <span className=\"sc-priority-nav__label\">{item.label}</span>,\n },\n item,\n );\n\n return (\n <nav\n className={cx('sc-priority-nav', className)}\n data-measuring={measuring || undefined}\n data-overflowing={fit.overflowing || undefined}\n // A per-instance anchor name, so two navs on a page never anchor to each other's toggle.\n style={{ ...style, '--_anchor': `--sc-priority-nav${panelId.replace(/[^\\w-]/g, '')}` } as CSSProperties}\n {...rest}\n >\n <ul ref={listRef} className=\"sc-priority-nav__list\">\n {items.map((item, i) =>\n flags && !flags[i] ? null : (\n <li key={keyOf(item)} className=\"sc-priority-nav__item\" data-current={item.current || undefined}>\n {link(item, false)}\n </li>\n ),\n )}\n <li\n ref={moreRef}\n className=\"sc-priority-nav__more\"\n hidden={measuring || overflow.length === 0}\n onBlur={onBlur}\n >\n <button\n ref={toggleRef}\n type=\"button\"\n className=\"sc-priority-nav__toggle\"\n aria-expanded={expanded}\n aria-controls={panelId}\n onClick={() => setOpen((o) => !o)}\n >\n {/* Narrow navs (a container query) show only the ellipsis; the label stays in the name. */}\n <MoreHorizontalIcon className=\"sc-priority-nav__ellipsis\" />\n <span className=\"sc-priority-nav__toggle-label\">{moreLabel}</span>\n <span className=\"sc-visually-hidden\">, {moreCountLabel(overflow.length)}</span>\n <ChevronDownIcon size=\"sm\" className=\"sc-priority-nav__chevron\" />\n </button>\n <ul ref={panelRef} id={panelId} className=\"sc-priority-nav__panel\" hidden={!expanded}>\n {overflow.map((item) => (\n <li key={keyOf(item)}>{link(item, true)}</li>\n ))}\n </ul>\n </li>\n </ul>\n </nav>\n );\n}\n","// Pure layout arithmetic for PriorityNav: no DOM, unit-tested in fit.test.ts.\n\nexport interface FitInput {\n /** Measured inline size of each item, in order, px. */\n widths: readonly number[];\n /** Index of the current item, or -1. It is always kept inline. */\n current: number;\n /** Inline size of the row, px. */\n available: number;\n /** Inline size of the \"More\" item, px. */\n more: number;\n /** Gap between items, px. */\n gap: number;\n}\n\n/** Sub-pixel slack: measured widths are fractional and a row that fits exactly must not flip to \"More\". */\nconst EPSILON = 0.5;\n\n/**\n * How many of the non-current items stay inline, counted in order. Every item fits: all of them.\n * Otherwise room is made for the \"More\" item and the current item first, then items are added in order\n * until the next one does not fit. The run stays contiguous (a short item after a long one does not jump\n * the queue), so the row reads as the start of the list, plus the current page.\n */\n/** The inline size of every item in one row, gaps included. */\nexport function rowWidth(widths: readonly number[], gap: number): number {\n let total = 0;\n for (const w of widths) total += w;\n return widths.length > 1 ? total + gap * (widths.length - 1) : total;\n}\n\nexport function fitCount({ widths, current, available, more, gap }: FitInput): number {\n const n = widths.length;\n const hasCurrent = current >= 0 && current < n;\n const others = hasCurrent ? n - 1 : n;\n if (rowWidth(widths, gap) <= available + EPSILON) return others;\n\n let used = more + (hasCurrent ? widths[current]! + gap : 0);\n let count = 0;\n for (let i = 0; i < n; i++) {\n if (i === current) continue;\n const next = used + widths[i]! + gap;\n if (next > available + EPSILON) break;\n used = next;\n count++;\n }\n return count;\n}\n\n/**\n * Which items are inline, given `fitCount`'s answer: the first `count` non-current items, plus the\n * current one wherever it sits. Everything else goes into \"More\", in its original order.\n */\nexport function inlineFlags(length: number, current: number, count: number): boolean[] {\n const flags: boolean[] = [];\n let seen = 0;\n for (let i = 0; i < length; i++) {\n if (i === current) flags.push(true);\n else flags.push(seen++ < count);\n }\n return flags;\n}\n\nexport interface OverflowInput {\n widths: readonly number[];\n gap: number;\n available: number;\n /** The previous answer. */\n was: boolean;\n /** Extra room required, beyond fitting every item, before an overflowing row reports that it fits again. */\n hysteresis: number;\n}\n\n/**\n * Whether the row reports `overflowing`, with hysteresis. It starts as soon as the items do not all fit.\n * Once started, it ends only when every item fits with `hysteresis` px to spare: when a header reacts to\n * overflow by giving the row more room (an action button drops its label), the row then fits, and without\n * the margin it would report \"fits\", the label would come back, and the row would overflow again.\n */\nexport function isOverflowing({ widths, gap, available, was, hysteresis }: OverflowInput): boolean {\n const total = rowWidth(widths, gap);\n return was ? total + Math.max(0, hysteresis) > available + EPSILON : total > available + EPSILON;\n}\n","// Fallback placement for the \"More\" panel where CSS anchor positioning is missing. Pure: rects in, a\n// viewport position out. Unit-tested in place.test.ts.\n\nexport interface Rect {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\nexport interface PlaceInput {\n /** The toggle's viewport rect. */\n anchor: Rect;\n /** The panel's size. */\n panel: { width: number; height: number };\n /** The viewport's size. */\n viewport: { width: number; height: number };\n /** Minimum distance from every viewport edge, px. */\n gutter: number;\n /** Space between the toggle and the panel, px. */\n offset: number;\n /** Writing direction: the panel prefers the toggle's inline-end edge. */\n rtl?: boolean | undefined;\n}\n\nconst clamp = (value: number, min: number, max: number) => Math.max(min, Math.min(value, max));\n\n/**\n * Mirrors the CSS: below the toggle, aligned to its inline-end edge; if that runs past the inline-start\n * side of the viewport, aligned to its inline-start edge instead; then shifted to stay inside the gutter.\n * Below the toggle unless only above has room. The width is capped by CSS, so it always fits.\n */\nexport function placePanel({ anchor, panel, viewport, gutter, offset, rtl = false }: PlaceInput): {\n left: number;\n top: number;\n} {\n const endAligned = rtl ? anchor.left : anchor.right - panel.width;\n const startAligned = rtl ? anchor.right - panel.width : anchor.left;\n const fitsX = (x: number) => x >= gutter && x + panel.width <= viewport.width - gutter;\n const x = fitsX(endAligned) ? endAligned : fitsX(startAligned) ? startAligned : endAligned;\n const left = clamp(x, gutter, Math.max(gutter, viewport.width - gutter - panel.width));\n\n const below = anchor.bottom + offset;\n const above = anchor.top - offset - panel.height;\n const fitsBelow = below + panel.height <= viewport.height - gutter;\n const top = fitsBelow || above < gutter ? below : above;\n return { left, top };\n}\n","import { Popover as BasePopover } from '@base-ui/react/popover';\nimport type { ReactNode } from 'react';\nimport { Button } from '../Button/Button';\nimport { XIcon } from '../../icons/icons.gen';\nimport { cx } from '../../utils/cx';\n\nexport type PopoverSide = 'top' | 'bottom' | 'left' | 'right';\nexport type PopoverAlign = 'start' | 'center' | 'end';\n\nexport interface PopoverRootProps {\n /** Controlled open state. */\n open?: boolean | undefined;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean | undefined;\n /** Called when the popover opens or closes. */\n onOpenChange?: ((open: boolean) => void) | undefined;\n /** Default `false`: the page stays interactive and focus may leave. `true` makes the page inert until it closes. */\n modal?: boolean | undefined;\n children?: ReactNode | undefined;\n}\n\n/** Owns the open state. Wrap a `Popover.Trigger` and a `Popover.Content`. */\nfunction Root({ open, defaultOpen, onOpenChange, modal = false, children }: PopoverRootProps) {\n return (\n <BasePopover.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange ? (next) => onOpenChange(next) : undefined}\n modal={modal}\n >\n {children}\n </BasePopover.Root>\n );\n}\n\nexport interface PopoverTriggerProps extends Omit<BasePopover.Trigger.Props, 'className'> {\n className?: string | undefined;\n}\n\n/**\n * Opens the popover. With no `render` it is a secondary Button; pass any Button or IconButton through\n * `render`: `<Popover.Trigger render={<IconButton label=\"Sweeps: running\" dot=\"success\" />}>`.\n */\nfunction Trigger({ render, className, children, ...rest }: PopoverTriggerProps) {\n return (\n <BasePopover.Trigger\n render={render ?? <Button variant=\"secondary\" className={className} />}\n className={render ? className : undefined}\n {...rest}\n >\n {children}\n </BasePopover.Trigger>\n );\n}\n\nexport interface PopoverContentProps extends Omit<BasePopover.Popup.Props, 'className'> {\n /** Side of the trigger it opens on; flips when there is no room. Default `bottom`. */\n side?: PopoverSide | undefined;\n /** Alignment along that side. Default `center`. */\n align?: PopoverAlign | undefined;\n /** Distance from the trigger in px. Default 4, or 8 with `arrow`. */\n sideOffset?: number | undefined;\n /** Draws a tip pointing at the trigger. */\n arrow?: boolean | undefined;\n className?: string | undefined;\n}\n\n/** Portal, positioner and the panel. Any content goes inside; name it with `Popover.Title`. */\nfunction Content({\n side = 'bottom',\n align = 'center',\n sideOffset,\n arrow = false,\n className,\n children,\n ...rest\n}: PopoverContentProps) {\n return (\n <BasePopover.Portal>\n <BasePopover.Positioner\n side={side}\n align={align}\n sideOffset={sideOffset ?? (arrow ? 8 : 4)}\n className=\"sc-popover__positioner\"\n >\n <BasePopover.Popup className={cx('sc-popover', className)} {...rest}>\n {arrow ? <BasePopover.Arrow className=\"sc-popover__arrow\" /> : null}\n {children}\n </BasePopover.Popup>\n </BasePopover.Positioner>\n </BasePopover.Portal>\n );\n}\n\nexport interface PopoverTitleProps extends Omit<BasePopover.Title.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** Names the popover (`aria-labelledby`). A heading, `h2` by default. */\nfunction Title({ className, ...rest }: PopoverTitleProps) {\n return <BasePopover.Title className={cx('sc-popover__title', className)} {...rest} />;\n}\n\nexport interface PopoverDescriptionProps extends Omit<BasePopover.Description.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** Describes the popover (`aria-describedby`). Muted text. */\nfunction Description({ className, ...rest }: PopoverDescriptionProps) {\n return <BasePopover.Description className={cx('sc-popover__description', className)} {...rest} />;\n}\n\nexport interface PopoverCloseProps extends Omit<BasePopover.Close.Props, 'className'> {\n className?: string | undefined;\n}\n\n/** With no children or `render`, the × in the corner. Otherwise wraps any Button: `<Popover.Close render={<Button variant=\"ghost\" />}>Done</Popover.Close>`. */\nfunction Close({ className, children, render, ...rest }: PopoverCloseProps) {\n if (children === undefined && render === undefined) {\n return (\n <BasePopover.Close className={cx('sc-popover__close', className)} aria-label=\"Close\" {...rest}>\n <XIcon />\n </BasePopover.Close>\n );\n }\n return (\n <BasePopover.Close className={className} render={render} {...rest}>\n {children}\n </BasePopover.Close>\n );\n}\n\n/** A non-modal panel anchored to a trigger, for a small form, a status summary or a legend. Built on Base UI's Popover. */\nexport const Popover = { Root, Trigger, Content, Title, Description, Close };\n","import type { ComponentPropsWithRef } from 'react';\nimport type { IconSize } from '../Icon/Icon';\nimport { cx } from '../../utils/cx';\n\nexport interface BroomIconProps extends Omit<ComponentPropsWithRef<'svg'>, 'children'> {\n /** Sweeps back and forth while dust drifts. With `prefers-reduced-motion` it holds still and shows the dust. */\n sweeping?: boolean | undefined;\n /** The Icon sizes (`lg` 20, the nav size, is the default), or `display` (72px, stroke 1.75px) for empty states and showcases. Inside an IconButton it fills the icon slot one step up, since it is drawn on a 24px grid. */\n size?: IconSize | 'display' | undefined;\n /** Gives the icon an accessible name (`role=\"img\"`). Without it the icon is decorative and hidden from assistive tech. */\n title?: string | undefined;\n}\n\n/**\n * An animated broom on a 24×24 grid, for \"a sweep is running\". Inline SVG, because CSS cannot animate\n * inside a `<use>` clone. Strokes keep a fixed screen width at every size (`vector-effect: non-scaling-stroke`).\n * Decorative by default: say what is happening in the surrounding control's label (\"Sweeps: running\").\n */\nexport function BroomIcon({ sweeping = false, size = 'lg', title, className, ...rest }: BroomIconProps) {\n return (\n <svg\n className={cx('sc-icon', 'sc-broom', className)}\n data-size={size}\n data-sweeping={sweeping || undefined}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n focusable=\"false\"\n aria-hidden={title ? undefined : true}\n role={title ? 'img' : undefined}\n aria-label={title}\n {...rest}\n >\n <g\n className=\"sc-broom__body\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M16.1 10.48 L19.36 1.86 A0.87 0.87 0 0 1 20.98 2.47 L17.84 10.78\" />\n <path d=\"M13.33 12 C14.23 10.67 16.73 9.87 18.17 11 C19.07 12.67 18.93 18.33 18.4 21.4 C16.07 22.4 11.07 22.07 6.4 18.07 C9.07 16.67 11.8 15 13.33 12 Z\" />\n <path className=\"sc-broom__band\" d=\"M13.47 12.13 L18.4 13.5 L18.33 14.1 L13.27 12.77 Z\" />\n <path d=\"M12.87 13.73 L14.4 14.47 M16.2 15.27 L18.47 15.87\" />\n <path d=\"M12.8 16.87 C11.86 18.24 10.75 19.38 9.57 20.23 M15.6 17.4 C15.22 18.96 14.6 20.44 13.77 21.71\" />\n </g>\n <g className=\"sc-broom__dust\" fill=\"none\" stroke=\"currentColor\">\n <circle cx=\"4.77\" cy=\"13.53\" r=\"0.5\" />\n <circle cx=\"2.7\" cy=\"15.53\" r=\"0.87\" />\n <circle cx=\"4.1\" cy=\"18.27\" r=\"0.5\" />\n </g>\n </svg>\n );\n}\n","export { Button, type ButtonProps, type ButtonSize, type ButtonVariant } from './components/Button/Button';\nexport {\n Badge,\n type BadgeProps,\n type BadgeSize,\n type BadgeTone,\n type BadgeVariant,\n} from './components/Badge/Badge';\nexport {\n Card,\n type CardElement,\n type CardPadding,\n type CardProps,\n type CardVariant,\n} from './components/Card/Card';\nexport {\n Stack,\n type StackAlign,\n type StackElement,\n type StackJustify,\n type StackProps,\n} from './components/Stack/Stack';\nexport {\n Inline,\n type InlineAlign,\n type InlineElement,\n type InlineJustify,\n type InlineProps,\n} from './components/Inline/Inline';\nexport { Kbd, type KbdGroupProps, type KbdProps } from './components/Kbd/Kbd';\nexport {\n Dialog,\n type DialogActionsProps,\n type DialogBodyProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogRootProps,\n type DialogSize,\n type DialogTitleProps,\n type DialogVariant,\n} from './components/Dialog/Dialog';\nexport { Icon, type IconGlyphProps, type IconProps, type IconSize } from './components/Icon/Icon';\nexport * from './icons/icons.gen';\nexport { iconNames, type IconName } from './icons/icon-names.gen';\nexport { IconButton, type IconButtonDotTone, type IconButtonProps } from './components/IconButton/IconButton';\nexport {\n Tooltip,\n type TooltipAlign,\n type TooltipProps,\n type TooltipSide,\n} from './components/Tooltip/Tooltip';\nexport {\n Menu,\n type MenuAlign,\n type MenuCheckboxItemProps,\n type MenuContentProps,\n type MenuGroupProps,\n type MenuItemProps,\n type MenuItemTone,\n type MenuLinkItemProps,\n type MenuRadioGroupProps,\n type MenuRadioItemProps,\n type MenuRootProps,\n type MenuSeparatorProps,\n type MenuSide,\n type MenuTriggerProps,\n} from './components/Menu/Menu';\nexport type { ControlSize, FieldProps } from './components/Field/FieldShell';\nexport { Input, type InputProps } from './components/Input/Input';\nexport { Textarea, type TextareaProps, type TextareaVariant } from './components/Textarea/Textarea';\nexport { Select, type SelectGroup, type SelectOption, type SelectProps } from './components/Select/Select';\nexport { Checkbox, type CheckboxProps } from './components/Checkbox/Checkbox';\nexport { Switch, type SwitchProps } from './components/Switch/Switch';\nexport {\n Tabs,\n type TabsListProps,\n type TabsListVariant,\n type TabsPanelProps,\n type TabsRootProps,\n type TabsTabProps,\n} from './components/Tabs/Tabs';\nexport {\n Toolbar,\n type ToolbarButtonProps,\n type ToolbarGroupProps,\n type ToolbarLinkProps,\n type ToolbarRootProps,\n type ToolbarSeparatorProps,\n type ToolbarSpacerProps,\n} from './components/Toolbar/Toolbar';\nexport { Banner, type BannerProps, type BannerTone } from './components/Banner/Banner';\nexport { Spinner, type SpinnerProps } from './components/Spinner/Spinner';\nexport {\n Progress,\n type ProgressProps,\n type ProgressSize,\n type ProgressTone,\n type ProgressVariant,\n} from './components/Progress/Progress';\nexport {\n Heading,\n type HeadingElement,\n type HeadingLevel,\n type HeadingProps,\n type HeadingSize,\n type TextTone,\n} from './components/Heading/Heading';\nexport {\n Text,\n type TextAlign,\n type TextElement,\n type TextProps,\n type TextSize,\n type TextWeight,\n} from './components/Text/Text';\nexport {\n Table,\n type TableAlign,\n type TableBodyProps,\n type TableCaptionProps,\n type TableCellProps,\n type TableDensity,\n type TableFootProps,\n type TableHeadProps,\n type TableHeaderProps,\n type TableRootProps,\n type TableRowProps,\n type TableSelectionCellProps,\n type TableSelectionHeaderProps,\n type TableSortDirection,\n} from './components/Table/Table';\nexport { useRowSelection, type RowSelection } from './components/Table/useRowSelection';\nexport type { RowSelectionHeaderState } from './components/Table/rowSelection';\nexport { SelectionBar, type SelectionBarProps } from './components/SelectionBar/SelectionBar';\nexport {\n Toast,\n useToast,\n type ToastApi,\n type ToastOptions,\n type ToastProviderProps,\n type ToastTone,\n} from './components/Toast/Toast';\nexport {\n Stat,\n type StatDeltaTone,\n type StatElement,\n type StatProps,\n type StatSize,\n type StatTrend,\n type StatVariant,\n} from './components/Stat/Stat';\nexport { Chip, type ChipProps, type ChipSize, type ChipTone } from './components/Chip/Chip';\nexport { Disclosure, type DisclosureProps } from './components/Disclosure/Disclosure';\nexport {\n EmptyState,\n type EmptyStateElement,\n type EmptyStateProps,\n type EmptyStateSize,\n} from './components/EmptyState/EmptyState';\nexport { Skeleton, type SkeletonProps, type SkeletonVariant } from './components/Skeleton/Skeleton';\nexport type { SpacingSize } from './types';\nexport const version = '0.1.1';\nexport { FileInput, type FileInputProps } from './components/FileInput/FileInput';\nexport {\n FilePreviewDialog,\n type FilePreviewDialogProps,\n} from './components/FilePreviewDialog/FilePreviewDialog';\nexport {\n PriorityNav,\n type PriorityNavItem,\n type PriorityNavLinkProps,\n type PriorityNavProps,\n} from './components/PriorityNav/PriorityNav';\nexport {\n Popover,\n type PopoverAlign,\n type PopoverCloseProps,\n type PopoverContentProps,\n type PopoverDescriptionProps,\n type PopoverRootProps,\n type PopoverSide,\n type PopoverTitleProps,\n type PopoverTriggerProps,\n} from './components/Popover/Popover';\nexport { BroomIcon, type BroomIconProps } from './components/BroomIcon/BroomIcon';\n"],"mappings":";;;AACO,SAAS,MAAM,OAAyD;AAC7E,SAAO,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AACvC;;;AC8CI,SAaI,KAbJ;AAvBG,SAAS,OAAO;AAAA,EACrB,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ;AAAA,EACA,WAAW;AAAA,EACX,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EAC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AQ,GAAE,OAAM;AAAA,UACrC,gBAAAA,MAAC,YAAO,IAAG,OAAM,IAAG,SAAQ,GAAE,QAAO;AAAA,UACrC,gBAAAA,MAAC,YAAO,IAAG,OAAM,IAAG,SAAQ,GAAE,OAAM;AAAA,WACtC;AAAA;AAAA;AAAA,EACF;AAEJ;;;AC8GO,IAAM,UAAU;","names":["jsx","jsxs","createElement","createElement","jsx","jsxs","jsx","jsx","jsxs","jsx","jsxs","useRender","jsx","jsxs","Fragment","jsx","jsxs","useRender","Fragment","jsx","jsxs","Root","Trigger","Content","Field","jsx","jsxs","jsx","jsxs","Field","Field","jsx","Field","jsx","jsxs","jsx","jsxs","useId","jsx","jsxs","useId","Fragment","jsx","jsxs","Root","jsx","Root","Group","Separator","Button","useState","jsx","jsxs","useState","jsx","jsxs","jsx","jsxs","createElement","createElement","createElement","clamp","createElement","BaseCheckbox","jsx","jsxs","Root","Body","BaseCheckbox","useState","Fragment","jsx","jsxs","useState","useMemo","jsx","jsxs","Provider","useMemo","createElement","Fragment","jsx","jsxs","createElement","Fragment","jsx","jsxs","useEffect","useRef","useState","jsx","jsxs","useState","useRef","useEffect","createElement","jsx","createElement","jsx","useEffect","useId","useRef","useState","useEffect","useRef","useState","Fragment","jsx","jsxs","useRef","useState","useEffect","jsx","jsxs","useId","useState","useRef","useEffect","id","name","error","useEffect","useId","useLayoutEffect","useRef","useState","x","jsx","jsxs","defaultCountLabel","useState","useId","useRef","useLayoutEffect","useEffect","toggle","jsx","jsxs","Root","Trigger","Content","Title","Description","Close","jsx","jsxs"]}
|