@kiefer-tek/sophea-design-system 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/index.css +10 -0
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/tokens/index.d.ts +32 -2
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +8 -2
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/tailwind-preset.d.ts.map +1 -1
- package/dist/tokens/tailwind-preset.js +25 -1
- package/dist/tokens/tailwind-preset.js.map +1 -1
- package/dist/v2/components/ui/badge.d.ts +10 -0
- package/dist/v2/components/ui/badge.d.ts.map +1 -0
- package/dist/v2/components/ui/button.d.ts +25 -0
- package/dist/v2/components/ui/button.d.ts.map +1 -0
- package/dist/v2/components/ui/card.d.ts +24 -0
- package/dist/v2/components/ui/card.d.ts.map +1 -0
- package/dist/v2/components/ui/input.d.ts +24 -0
- package/dist/v2/components/ui/input.d.ts.map +1 -0
- package/dist/v2/components/ui/search-input.d.ts +40 -0
- package/dist/v2/components/ui/search-input.d.ts.map +1 -0
- package/dist/v2/components/ui/skeleton.d.ts +4 -0
- package/dist/v2/components/ui/skeleton.d.ts.map +1 -0
- package/dist/v2/components/ui/tabs.d.ts +54 -0
- package/dist/v2/components/ui/tabs.d.ts.map +1 -0
- package/dist/v2/index.d.ts +15 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.js +2787 -0
- package/dist/v2/lib/utils.d.ts +3 -0
- package/dist/v2/lib/utils.d.ts.map +1 -0
- package/dist/v2/patterns/searchable-tabs.d.ts +25 -0
- package/dist/v2/patterns/searchable-tabs.d.ts.map +1 -0
- package/dist/v2/styles.css +1 -0
- package/package.json +27 -5
- package/src/tokens/colors_and_type.css +82 -43
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/components/Tooltip/Tooltip.tsx","../src/components/AnimatedBorder/AnimatedBorder.tsx","../src/components/Button/Button.tsx","../src/components/Input/Input.tsx","../src/components/Badge/Badge.tsx","../src/components/RadioGroup/RadioGroup.tsx","../src/components/Switch/Switch.tsx","../src/components/Select/Select.tsx","../src/components/DatePicker/DatePicker.tsx","../src/components/Modal/Modal.tsx","../src/components/Toast/Toast.tsx","../src/components/Banner/Banner.tsx","../src/components/Skeleton/Skeleton.tsx","../src/components/Progress/Progress.tsx","../src/components/Spinner/Spinner.tsx","../src/components/Textarea/Textarea.tsx","../src/internal/interactive-buttons.tsx","../src/components/FeedbackThumbs/FeedbackThumbs.tsx","../src/components/Composer/Composer.tsx","../src/components/Composer/ComposerChip.tsx","../src/components/DropdownMenu/DropdownMenu.tsx","../src/components/Accordion/Accordion.tsx","../src/components/Collapsible/Collapsible.tsx","../src/components/ScrollArea/ScrollArea.tsx","../src/components/ScrollableList/ScrollableList.tsx","../src/components/Slider/Slider.tsx","../src/components/AlertDialog/AlertDialog.tsx","../src/components/ThemeProvider/ThemeProvider.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Table/Table.tsx","../src/components/Avatar/Avatar.tsx","../src/components/EmptyState/EmptyState.tsx","../src/components/Card/Card.tsx","../src/components/SearchInput/SearchInput.tsx","../src/components/DetailSection/DetailSection.tsx","../src/components/List/List.tsx","../src/components/Text/Text.tsx","../src/components/Interactive/Interactive.tsx","../src/components/Disabled/Disabled.tsx","../src/components/Hoverable/Hoverable.tsx","../src/components/SelectButton/SelectButton.tsx","../src/components/OpenButton/OpenButton.tsx","../src/components/ExpandableButton/ExpandableButton.tsx","../src/components/FilterButton/FilterButton.tsx","../src/components/LinkButton/LinkButton.tsx","../src/components/Tag/Tag.tsx","../src/components/Content/ContentXl.tsx","../src/components/Content/ContentLg.tsx","../src/components/Content/ContentMd.tsx","../src/components/Content/ContentSm.tsx","../src/components/Content/Content.tsx","../src/components/ContentAction/ContentAction.tsx","../src/components/InputLayouts/InputLayouts.tsx","../src/components/MessageCard/MessageCard.tsx","../src/components/EmptyMessageCard/EmptyMessageCard.tsx","../src/components/IllustrationContent/IllustrationContent.tsx","../src/patterns/AccountMenu/AccountMenu.tsx","../src/patterns/AppShell/AppShell.tsx"],"sourcesContent":["import * as RT from \"@radix-ui/react-tooltip\";\nimport { type ReactNode } from \"react\";\nimport styles from \"./Tooltip.module.css\";\nimport { isRichStr, resolveStr, type RichStr } from \"../Text/richstr\";\n\nexport interface TooltipProps {\n /**\n * Tooltip content. Supports inline markdown via `markdown()`. When\n * `undefined`, the children render bare — callers never need to wrap\n * conditionally.\n */\n content?: ReactNode | RichStr;\n children: ReactNode;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n align?: \"start\" | \"center\" | \"end\";\n delayDuration?: number;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n sideOffset?: number;\n /**\n * Visual treatment of the content surface. `\"default\"` renders the DS chrome\n * (padding, inverted background, radius) plus a filled arrow. `\"bare\"` drops\n * all chrome and the arrow so `content` can be a custom floating card.\n * @default \"default\"\n */\n variant?: \"default\" | \"bare\";\n /**\n * Show the filled arrow. Defaults to `true` for `variant=\"default\"` and\n * `false` for `variant=\"bare\"`. Set explicitly to override.\n */\n arrow?: boolean;\n /** Class merged onto the content element (after the DS classes). */\n contentClassName?: string;\n}\n\nexport const TooltipProvider = ({\n children,\n delayDuration = 500,\n skipDelayDuration = 150,\n}: {\n children: ReactNode;\n delayDuration?: number;\n skipDelayDuration?: number;\n}) => (\n <RT.Provider delayDuration={delayDuration} skipDelayDuration={skipDelayDuration}>\n {children}\n </RT.Provider>\n);\n\nexport function Tooltip({\n content,\n children,\n side = \"top\",\n align = \"center\",\n delayDuration,\n open,\n defaultOpen,\n onOpenChange,\n sideOffset = 8,\n variant = \"default\",\n arrow,\n contentClassName,\n}: TooltipProps) {\n if (content === undefined) return <>{children}</>;\n const showArrow = arrow ?? variant === \"default\";\n const contentClasses = [\n styles.content,\n variant === \"bare\" ? styles.bare : null,\n contentClassName,\n ]\n .filter(Boolean)\n .join(\" \");\n return (\n <RT.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n delayDuration={delayDuration}\n >\n <RT.Trigger asChild>{children}</RT.Trigger>\n <RT.Portal>\n <RT.Content side={side} align={align} sideOffset={sideOffset} className={contentClasses}>\n {isRichStr(content) ? resolveStr(content) : content}\n {showArrow ? <RT.Arrow className={styles.arrow} width={10} height={5} /> : null}\n </RT.Content>\n </RT.Portal>\n </RT.Root>\n );\n}\n","import { forwardRef, type CSSProperties, type HTMLAttributes } from \"react\";\n// Imported (and referenced below via `styles.ring`) so the library bundler keeps\n// this module's CSS — which registers the :global ring hooks + @property angles\n// — even though the visible class names are all :global. A bare side-effect\n// `import \"./AnimatedBorder.module.css\"` gets tree-shaken out of the lib build.\nimport styles from \"./AnimatedBorder.module.css\";\n\nexport type AnimatedBorderVariant = \"pulse\" | \"spin\";\n\n/**\n * Stable, unscoped class hooks for the animated ring. Apply these to any\n * existing positioned element (one with `position: relative` and a\n * `border-radius`) to opt it into the ring without wrapping it in\n * `<AnimatedBorder>` — useful when a host element must keep its DOM shape.\n *\n * Always combine the base hook with exactly one variant hook, e.g.\n * `` `${animatedBorderClasses.base} ${animatedBorderClasses.pulse}` ``.\n */\nexport const animatedBorderClasses = {\n /** Required base hook — sets up the ::before ring container. */\n base: \"sds-animated-border\",\n /** Red \"live now\" ring (action-danger family). */\n pulse: \"sds-animated-border-pulse\",\n /** Brand-blue \"armed / recording\" ring (theme-primary family). */\n spin: \"sds-animated-border-spin\",\n} as const;\n\n/** Default ring thickness per variant, matching the original Meet treatments.\n * Exported so other DS components (e.g. Button's `animated` prop) apply the\n * same default instead of the CSS 2px fallback. */\nexport const animatedBorderThickness: Record<AnimatedBorderVariant, string> = {\n pulse: \"2px\",\n spin: \"1.5px\",\n};\n\n/**\n * Build the className for an animated ring. Use when you are applying the ring\n * to an element you already render (instead of nesting it in `AnimatedBorder`).\n */\nexport function animatedBorderClassName(variant: AnimatedBorderVariant): string {\n return `${animatedBorderClasses.base} ${animatedBorderClasses[variant]}`;\n}\n\nexport interface AnimatedBorderProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Which attention ring to paint.\n * - `\"pulse\"` — red rotating ring for \"live now\" surfaces (e.g. a meeting\n * that is recording right now).\n * - `\"spin\"` — brand-blue rotating ring for an armed / active feature\n * (e.g. an enabled auto-record control).\n */\n variant: AnimatedBorderVariant;\n /**\n * Optional CSS color string overriding the variant's token color. Accepts any\n * CSS color. The translucent gradient stops are derived from it with\n * `color-mix`, so a single solid color is enough.\n */\n color?: string;\n /**\n * Corner radius of the ring. Defaults to `\"inherit\"` so the ring follows the\n * host's own `border-radius`. Pass a length (e.g. `14` or `\"14px\"`) to force\n * a radius when the host has none.\n */\n radius?: number | string;\n /** Ring thickness. Defaults to 2px (pulse) / 1.5px (spin). */\n thickness?: number | string;\n}\n\nconst toLen = (v: number | string): string => (typeof v === \"number\" ? `${v}px` : v);\n\n/**\n * Renders a positioned wrapper whose `::before` carries a rotating\n * conic-gradient attention ring, with `children` painted above it.\n *\n * If the element you want to ring already exists in your tree and you would\n * rather not re-nest it, apply {@link animatedBorderClasses} (or\n * {@link animatedBorderClassName}) to it directly instead.\n */\nexport const AnimatedBorder = forwardRef<HTMLDivElement, AnimatedBorderProps>(\n function AnimatedBorder(\n { variant, color, radius = \"inherit\", thickness, className, style, children, ...rest },\n ref,\n ) {\n const ringStyle: CSSProperties = {\n borderRadius: radius === \"inherit\" ? undefined : toLen(radius),\n // CSS custom properties consumed by the module CSS.\n [\"--sds-ab-thickness\" as string]: toLen(thickness ?? animatedBorderThickness[variant]),\n ...(color\n ? { [\"--sds-ab-color\" as string]: color, [\"--sds-ab-color-soft\" as string]: color }\n : null),\n ...style,\n };\n\n return (\n <div\n ref={ref}\n className={[styles.ring, animatedBorderClassName(variant), className]\n .filter(Boolean)\n .join(\" \")}\n style={ringStyle}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n","import {\n forwardRef,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type CSSProperties,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport styles from \"./Button.module.css\";\nimport { Tooltip, TooltipProvider } from \"../Tooltip/Tooltip\";\nimport { resolveNode, resolveStr, type RichStr } from \"../Text/richstr\";\nimport {\n animatedBorderClasses,\n animatedBorderThickness,\n type AnimatedBorderVariant,\n} from \"../AnimatedBorder/AnimatedBorder\";\n\nexport type ButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"danger\"\n | \"link\"\n | \"red\"\n | \"ghost\"\n | \"outline\"\n | \"outline-primary\"\n | \"soft\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\nexport type ButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/**\n * Returns the Button class string for a given variant/size — for styling\n * non-`<button>` elements (e.g. a Radix `AlertDialogAction`, a router link)\n * with DS button visuals without rendering a Button.\n */\nexport function buttonClassNames(opts?: {\n variant?: ButtonVariant;\n size?: ButtonSize;\n iconOnly?: boolean;\n fullWidth?: boolean;\n className?: string;\n}): string {\n const { variant = \"primary\", size = \"md\", iconOnly, fullWidth, className } = opts ?? {};\n return [\n styles.btn,\n styles[`btn-${variant}`],\n styles[`size-${size}`],\n iconOnly ? styles[\"icon-only\"] : null,\n fullWidth ? styles[\"full-width\"] : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n}\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n /**\n * Button label. Accepts plain text, arbitrary nodes, or `markdown()` for\n * inline markdown (`**bold**`, `*italic*`, `` `code` ``, `[links](url)`).\n */\n children?: ReactNode | RichStr;\n iconLeft?: ReactNode;\n iconRight?: ReactNode;\n iconOnly?: boolean;\n loading?: boolean;\n /**\n * Render the Button's styling/props onto the single child element instead of\n * a `<button>`/`<a>` (Radix `Slot`). Use for SPA-safe navigation, e.g.\n * `<Button asChild><Link to=\"/x\">Go</Link></Button>`. The child supplies its\n * own content — `iconLeft`/`iconRight`/`iconOnly` are ignored in this mode.\n */\n asChild?: boolean;\n /**\n * Animated attention ring around the button (the AnimatedBorder treatment),\n * composable with any variant. `true` (or `\"spin\"`) paints the brand-blue\n * \"armed\" ring — e.g. an outline-primary toggle waiting to be enabled;\n * `\"pulse\"` paints the red \"live now\" ring. The ring replaces the painted\n * border and rotates continuously (static at reduced opacity under\n * `prefers-reduced-motion`). Colors are theme-corrected (`--sophea-focus-ring`\n * / `--action-danger-05`) so the ring is visible in both light and dark.\n */\n animated?: boolean | AnimatedBorderVariant;\n /** Renders an `<a>` styled as a button. Disabled links lose their href. */\n href?: string;\n /** Link target. Only used with `href`; `_blank` adds the security rel. */\n target?: string;\n /** Tooltip shown on hover. Supports inline markdown via `markdown()`. */\n tooltip?: string | RichStr;\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: ButtonTooltipSide;\n /** Stretches the button to the container width. */\n fullWidth?: boolean;\n /**\n * Hides the label on narrow viewports, keeping the icon. Use only with\n * `iconLeft` or `iconRight` so the button never collapses to nothing.\n */\n responsiveHideText?: boolean;\n}\n\nexport const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(\n function Button(\n {\n variant = \"primary\",\n size = \"md\",\n iconLeft,\n iconRight,\n iconOnly = false,\n loading = false,\n disabled,\n asChild = false,\n animated = false,\n children,\n className,\n style,\n type = \"button\",\n href,\n target,\n tooltip,\n tooltipSide = \"top\",\n fullWidth = false,\n responsiveHideText = false,\n \"aria-busy\": ariaBusy,\n ...rest\n },\n ref,\n ) {\n const isDisabled = disabled ?? loading;\n\n // Attention ring (AnimatedBorder): resolve `true` to the brand \"spin\" ring,\n // apply the shared :global hook classes plus the variant's default\n // thickness (the bare CSS fallback is 2px — chunkier than the 1px border\n // the ring replaces on a small pill).\n const ring: AnimatedBorderVariant | null =\n animated === true ? \"spin\" : animated || null;\n const ringStyle = ring\n ? ({ \"--sds-ab-thickness\": animatedBorderThickness[ring] } as CSSProperties)\n : undefined;\n const mergedStyle = ringStyle || style ? { ...ringStyle, ...style } : undefined;\n\n const classes = [\n buttonClassNames({ variant, size, iconOnly, fullWidth, className }),\n responsiveHideText ? styles[\"responsive-hide-text\"] : null,\n ring ? `${animatedBorderClasses.base} ${animatedBorderClasses[ring]}` : null,\n ]\n .filter(Boolean)\n .join(\" \");\n\n // asChild: delegate rendering to the single child (Radix Slot) so callers\n // keep SPA-safe links/custom elements while wearing DS button styling. The\n // child owns its content, so the icon slots below don't apply.\n if (asChild) {\n return (\n <Slot ref={ref} className={classes} style={mergedStyle} aria-busy={ariaBusy ?? loading} {...rest}>\n {resolveNode(children)}\n </Slot>\n );\n }\n\n const content = (\n <>\n {iconLeft ? <span className={styles.icon}>{iconLeft}</span> : null}\n {!iconOnly && children ? <span className={styles.label}>{resolveNode(children)}</span> : null}\n {iconRight ? <span className={styles.icon}>{iconRight}</span> : null}\n </>\n );\n\n const element = href ? (\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n className={classes}\n style={mergedStyle}\n href={isDisabled ? undefined : href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n aria-disabled={isDisabled || undefined}\n aria-busy={ariaBusy ?? loading}\n {...(rest as AnchorHTMLAttributes<HTMLAnchorElement>)}\n >\n {content}\n </a>\n ) : (\n <button\n ref={ref as Ref<HTMLButtonElement>}\n type={type}\n className={classes}\n style={mergedStyle}\n disabled={isDisabled}\n aria-busy={ariaBusy ?? loading}\n {...rest}\n >\n {content}\n </button>\n );\n\n if (tooltip === undefined) return element;\n\n return (\n <TooltipProvider>\n <Tooltip\n content={typeof tooltip === \"string\" ? tooltip : resolveStr(tooltip)}\n side={tooltipSide}\n >\n {element}\n </Tooltip>\n </TooltipProvider>\n );\n },\n);\n","/**\n * Input\n *\n * Accessibility note: placeholder color is `--text-03` (meets WCAG AA after the\n * contrast-audit token darkening). Placeholder text MUST NOT be the only label —\n * callers MUST provide a visible `label` prop (rendered as `<label htmlFor>`).\n * Use `hint` for help text, not placeholder.\n */\nimport { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./Input.module.css\";\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n label?: string;\n hint?: string;\n error?: string;\n iconLeft?: ReactNode;\n trailing?: ReactNode;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { label, hint, error, iconLeft, trailing, id, className, required, ...rest },\n ref,\n) {\n const autoId = useId();\n const inputId = id ?? autoId;\n const hintId = `${inputId}-hint`;\n const errorId = `${inputId}-error`;\n const describedBy =\n [error ? errorId : null, hint && !error ? hintId : null].filter(Boolean).join(\" \") || undefined;\n\n return (\n <div className={[styles.wrapper, className].filter(Boolean).join(\" \")}>\n {label ? (\n <label htmlFor={inputId} className={styles.label}>\n {label}\n </label>\n ) : null}\n <div className={[styles.field, error ? styles[\"field-error\"] : null].filter(Boolean).join(\" \")}>\n {iconLeft ? <span className={styles.icon}>{iconLeft}</span> : null}\n <input\n ref={ref}\n id={inputId}\n className={styles.input}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy}\n required={required}\n {...rest}\n />\n {trailing ? <span className={styles.trailing}>{trailing}</span> : null}\n </div>\n {error ? (\n <span id={errorId} className={styles.error}>\n {error}\n </span>\n ) : hint ? (\n <span id={hintId} className={styles.hint}>\n {hint}\n </span>\n ) : null}\n </div>\n );\n});\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./Badge.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type BadgeTone = \"neutral\" | \"info\" | \"success\" | \"warning\" | \"error\" | \"purple\" | \"brand\";\nexport type BadgeProminence = \"subtle\" | \"bold\" | \"outline\";\n\nexport interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> {\n tone?: BadgeTone;\n prominence?: BadgeProminence;\n dot?: boolean;\n iconLeft?: ReactNode;\n children?: ReactNode | RichStr;\n}\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n { tone = \"neutral\", prominence = \"subtle\", dot = false, iconLeft, children, className, ...rest },\n ref,\n) {\n const classes = [styles.badge, styles[`tone-${tone}`], styles[`prom-${prominence}`], className]\n .filter(Boolean)\n .join(\" \");\n\n const ariaLabel = (rest as { \"aria-label\"?: string })[\"aria-label\"];\n const hasChildren = children != null && children !== \"\";\n\n if (dot && !hasChildren && !ariaLabel) {\n // Dot-only badges convey status visually; without text or aria-label they\n // are invisible to assistive technology. Warn in dev consoles only.\n const env =\n typeof globalThis !== \"undefined\"\n ? (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV\n : undefined;\n if (env !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\n \"[Badge] dot-only badges (no children) must receive an `aria-label` for screen reader users.\",\n );\n }\n }\n\n return (\n <span ref={ref} className={classes} {...rest}>\n {dot ? <span className={styles.dot} aria-hidden=\"true\" /> : null}\n {iconLeft ? <span className={styles.icon}>{iconLeft}</span> : null}\n {resolveNode(children)}\n {dot && !hasChildren && ariaLabel ? (\n <span className={styles.visuallyHidden}>{ariaLabel}</span>\n ) : null}\n </span>\n );\n});\n","import * as RG from \"@radix-ui/react-radio-group\";\nimport { forwardRef, useId, type ReactNode } from \"react\";\nimport styles from \"./RadioGroup.module.css\";\n\nexport interface RadioGroupProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n name?: string;\n disabled?: boolean;\n required?: boolean;\n legend?: ReactNode;\n orientation?: \"vertical\" | \"horizontal\";\n children?: ReactNode;\n className?: string;\n}\n\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(function RadioGroup(\n { value, defaultValue, onValueChange, name, disabled, required, legend, orientation = \"vertical\", children, className },\n ref,\n) {\n const legendId = useId();\n return (\n <div className={[styles.group, className].filter(Boolean).join(\" \")}>\n {legend ? (\n <span id={legendId} className={styles.legend}>\n {legend}\n </span>\n ) : null}\n <RG.Root\n ref={ref}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n name={name}\n disabled={disabled}\n required={required}\n orientation={orientation}\n aria-labelledby={legend ? legendId : undefined}\n className={styles.list}\n data-orientation={orientation}\n >\n {children}\n </RG.Root>\n </div>\n );\n});\n\nexport interface RadioProps {\n value: string;\n disabled?: boolean;\n id?: string;\n label: ReactNode;\n description?: ReactNode;\n className?: string;\n}\n\nexport const Radio = forwardRef<HTMLButtonElement, RadioProps>(function Radio(\n { value, disabled, id, label, description, className },\n ref,\n) {\n const autoId = useId();\n const rId = id ?? autoId;\n return (\n <label htmlFor={rId} className={[styles.opt, className].filter(Boolean).join(\" \")} data-disabled={disabled ? \"\" : undefined}>\n <RG.Item ref={ref} id={rId} value={value} disabled={disabled} className={styles.root}>\n <RG.Indicator className={styles.dot} />\n </RG.Item>\n <span className={styles.text}>\n <span className={styles.label}>{label}</span>\n {description ? <span className={styles.description}>{description}</span> : null}\n </span>\n </label>\n );\n});\n","import * as RS from \"@radix-ui/react-switch\";\nimport { forwardRef, useId, type ReactNode } from \"react\";\nimport styles from \"./Switch.module.css\";\n\nexport type SwitchSize = \"md\" | \"sm\";\n\nexport interface SwitchProps {\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n disabled?: boolean;\n required?: boolean;\n name?: string;\n value?: string;\n id?: string;\n size?: SwitchSize;\n label?: ReactNode;\n description?: ReactNode;\n className?: string;\n \"aria-label\"?: string;\n}\n\nexport const Switch = forwardRef<HTMLButtonElement, SwitchProps>(function Switch(\n {\n checked,\n defaultChecked,\n onCheckedChange,\n disabled,\n required,\n name,\n value,\n id,\n size = \"md\",\n label,\n description,\n className,\n \"aria-label\": ariaLabel,\n },\n ref,\n) {\n const autoId = useId();\n const sId = id ?? autoId;\n\n const root = (\n <RS.Root\n ref={ref}\n id={sId}\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n required={required}\n name={name}\n value={value}\n aria-label={ariaLabel}\n className={[styles.root, styles[`size-${size}`], className].filter(Boolean).join(\" \")}\n >\n <RS.Thumb className={styles.thumb} />\n </RS.Root>\n );\n\n if (!label && !description) return root;\n\n return (\n <label htmlFor={sId} className={styles.row} data-disabled={disabled ? \"\" : undefined}>\n <span className={styles.text}>\n <span className={styles.label}>{label}</span>\n {description ? <span className={styles.description}>{description}</span> : null}\n </span>\n {root}\n </label>\n );\n});\n","/**\n * Select\n *\n * Accessibility note: this component does NOT render its own visible label. If the\n * trigger is not associated with an external `<label htmlFor={id}>`, callers MUST\n * pass `aria-label` so screen-reader users get a name for the control.\n */\nimport * as RS from \"@radix-ui/react-select\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport styles from \"./Select.module.css\";\n\nexport interface SelectOption {\n value: string;\n label: ReactNode;\n description?: ReactNode;\n disabled?: boolean;\n}\n\nexport interface SelectProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n options: SelectOption[];\n placeholder?: string;\n disabled?: boolean;\n name?: string;\n id?: string;\n \"aria-label\"?: string;\n className?: string;\n}\n\nconst CaretDown = () => (\n <svg className={styles.caret} width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M6 9l6 6 6-6\" />\n </svg>\n);\n\nconst Check = () => (\n <svg className={styles.check} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M20 6L9 17l-5-5\" />\n </svg>\n);\n\nexport const Select = forwardRef<HTMLButtonElement, SelectProps>(function Select(\n { value, defaultValue, onValueChange, options, placeholder = \"Select…\", disabled, name, id, \"aria-label\": ariaLabel, className },\n ref,\n) {\n return (\n <RS.Root value={value} defaultValue={defaultValue} onValueChange={onValueChange} disabled={disabled} name={name}>\n <RS.Trigger\n ref={ref}\n id={id}\n aria-label={ariaLabel}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n >\n <RS.Value placeholder={placeholder} />\n <RS.Icon asChild>\n <CaretDown />\n </RS.Icon>\n </RS.Trigger>\n <RS.Portal>\n <RS.Content className={styles.content} position=\"popper\" sideOffset={4}>\n <RS.Viewport className={styles.viewport}>\n {options.map((opt) => (\n <RS.Item key={opt.value} value={opt.value} disabled={opt.disabled} className={styles.item}>\n <RS.ItemIndicator className={styles.indicator} asChild>\n <Check />\n </RS.ItemIndicator>\n <span className={styles.itemSlot}>\n <RS.ItemText>{opt.label}</RS.ItemText>\n {opt.description ? <span className={styles.itemDesc}>{opt.description}</span> : null}\n </span>\n </RS.Item>\n ))}\n </RS.Viewport>\n </RS.Content>\n </RS.Portal>\n </RS.Root>\n );\n});\n","import * as Popover from \"@radix-ui/react-popover\";\nimport { format as formatDate } from \"date-fns\";\nimport { forwardRef, useState, type ComponentProps, type ReactNode } from \"react\";\nimport { DayPicker, type DateRange } from \"react-day-picker\";\nimport styles from \"./DatePicker.module.css\";\n\nconst CalendarIcon = () => (\n <svg className={styles.icon} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M16 3v4M8 3v4M3 11h18\" />\n </svg>\n);\n\nconst ChevronLeft = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.8} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M15 18l-6-6 6-6\" />\n </svg>\n);\n\nconst ChevronRight = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.8} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M9 18l6-6-6-6\" />\n </svg>\n);\n\nconst SINGLE_LETTER_WEEKDAY = [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"];\n\nconst formatters = {\n formatWeekdayName: (d: Date) => SINGLE_LETTER_WEEKDAY[d.getDay()] ?? \"\",\n};\n\nconst dpClassNames = {\n root: styles.dpRoot,\n months: styles.dpMonths,\n month: styles.dpMonth,\n month_caption: styles.dpMonthCaption,\n caption_label: styles.dpCaptionLabel,\n nav: styles.dpNav,\n button_previous: styles.dpNavBtn,\n button_next: styles.dpNavBtn,\n chevron: styles.dpChevron,\n month_grid: styles.dpGrid,\n weekdays: styles.dpWeekdays,\n weekday: styles.dpWeekday,\n week: styles.dpWeek,\n day: styles.dpDay,\n day_button: styles.dpDayBtn,\n today: styles.dpToday,\n selected: styles.dpSelected,\n outside: styles.dpOutside,\n disabled: styles.dpDisabled,\n range_start: styles.dpRangeStart,\n range_end: styles.dpRangeEnd,\n range_middle: styles.dpRangeMiddle,\n} as const;\n\nconst dpComponents = {\n Chevron: ({ orientation }: { orientation?: \"left\" | \"right\" | \"up\" | \"down\" }) =>\n orientation === \"right\" ? <ChevronRight /> : <ChevronLeft />,\n};\n\nexport type CalendarProps = ComponentProps<typeof DayPicker>;\n\n/**\n * Bare, DS-styled calendar grid (react-day-picker passthrough) for consumers\n * that compose their own popover/inline placement — distinct from the bundled\n * DatePicker/DateRangePicker which own their popover + trigger. Supports\n * `mode`, `selected`, `onSelect`, `numberOfMonths`, `disabled`, etc.\n */\nexport function Calendar({ classNames, components, formatters: f, ...props }: CalendarProps) {\n return (\n <DayPicker\n weekStartsOn={1}\n ISOWeek\n classNames={{ ...dpClassNames, ...classNames }}\n components={{ ...dpComponents, ...components }}\n formatters={{ ...formatters, ...f }}\n {...props}\n />\n );\n}\n\nexport interface DatePickerProps {\n value?: Date | undefined;\n onChange?: (date: Date | undefined) => void;\n placeholder?: string;\n disabled?: boolean;\n id?: string;\n \"aria-label\"?: string;\n className?: string;\n triggerIcon?: ReactNode;\n dateFormat?: string;\n}\n\nexport const DatePicker = forwardRef<HTMLButtonElement, DatePickerProps>(function DatePicker(\n { value, onChange, placeholder = \"Pick a date\", disabled, id, \"aria-label\": ariaLabel, className, triggerIcon, dateFormat = \"d MMM yyyy\" },\n ref,\n) {\n const [open, setOpen] = useState(false);\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger\n ref={ref}\n id={id}\n aria-label={ariaLabel}\n disabled={disabled}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n >\n {triggerIcon ?? <CalendarIcon />}\n <span className={value ? styles.triggerValue : styles.triggerPlaceholder}>\n {value ? formatDate(value, dateFormat) : placeholder}\n </span>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content className={styles.popover} align=\"start\" sideOffset={4}>\n <DayPicker\n mode=\"single\"\n selected={value}\n onSelect={(d) => {\n onChange?.(d);\n if (d) setOpen(false);\n }}\n weekStartsOn={1}\n ISOWeek\n classNames={dpClassNames}\n components={dpComponents}\n formatters={formatters}\n />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n});\n\nexport interface DateRangePickerProps {\n value?: DateRange | undefined;\n onChange?: (range: DateRange | undefined) => void;\n placeholder?: string;\n disabled?: boolean;\n id?: string;\n \"aria-label\"?: string;\n className?: string;\n dateFormat?: string;\n}\n\nexport const DateRangePicker = forwardRef<HTMLButtonElement, DateRangePickerProps>(function DateRangePicker(\n { value, onChange, placeholder = \"Pick a date range\", disabled, id, \"aria-label\": ariaLabel, className, dateFormat = \"d MMM yyyy\" },\n ref,\n) {\n const [open, setOpen] = useState(false);\n const label =\n value?.from && value?.to\n ? `${formatDate(value.from, \"d MMM\")} – ${formatDate(value.to, dateFormat)}`\n : value?.from\n ? formatDate(value.from, dateFormat)\n : placeholder;\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger\n ref={ref}\n id={id}\n aria-label={ariaLabel}\n disabled={disabled}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n >\n <CalendarIcon />\n <span className={value?.from ? styles.triggerValue : styles.triggerPlaceholder}>{label}</span>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content className={styles.popover} align=\"start\" sideOffset={4}>\n <DayPicker\n mode=\"range\"\n selected={value}\n onSelect={onChange}\n weekStartsOn={1}\n ISOWeek\n classNames={dpClassNames}\n components={dpComponents}\n formatters={formatters}\n />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n});\n","import * as RD from \"@radix-ui/react-dialog\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport styles from \"./Modal.module.css\";\n\nexport interface ModalProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n trigger?: ReactNode;\n title: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n footer?: ReactNode;\n width?: number;\n closeLabel?: string;\n className?: string;\n}\n\nconst CloseIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </svg>\n);\n\nexport const Modal = forwardRef<HTMLDivElement, ModalProps>(function Modal(\n { open, defaultOpen, onOpenChange, trigger, title, description, children, footer, width, closeLabel = \"Close\", className },\n ref,\n) {\n return (\n <RD.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n {trigger ? <RD.Trigger asChild>{trigger}</RD.Trigger> : null}\n <RD.Portal>\n <RD.Overlay className={styles.overlay} />\n <RD.Content\n ref={ref}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n style={width ? { width: `${width}px` } : undefined}\n >\n <div className={styles.header}>\n <RD.Title className={styles.title}>{title}</RD.Title>\n {description ? (\n <RD.Description className={styles.description}>{description}</RD.Description>\n ) : null}\n <RD.Close className={styles.close} aria-label={closeLabel}>\n <CloseIcon />\n </RD.Close>\n </div>\n {children ? <div className={styles.body}>{children}</div> : null}\n {footer ? <div className={styles.footer}>{footer}</div> : null}\n </RD.Content>\n </RD.Portal>\n </RD.Root>\n );\n});\n\nexport const ModalClose = RD.Close;\n","import * as RT from \"@radix-ui/react-toast\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport styles from \"./Toast.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type ToastTone = \"success\" | \"info\" | \"warning\" | \"error\";\n\nconst DEFAULT_DURATION: Record<ToastTone, number> = {\n success: 5000,\n info: 5000,\n warning: 8000,\n error: 0, // manual dismiss only — error with action\n};\n\nexport interface ToastProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n tone?: ToastTone;\n title: ReactNode | RichStr;\n description?: ReactNode | RichStr;\n action?: { label: ReactNode; altText: string; onClick?: () => void };\n duration?: number;\n closeLabel?: string;\n}\n\nconst Icons: Record<ToastTone, ReactNode> = {\n success: \"✓\",\n info: \"i\",\n warning: \"!\",\n error: \"✕\",\n};\n\nexport const ToastProvider = ({\n children,\n swipeDirection = \"right\",\n duration = 5000,\n}: {\n children: ReactNode;\n swipeDirection?: \"right\" | \"left\" | \"up\" | \"down\";\n duration?: number;\n}) => (\n <RT.Provider swipeDirection={swipeDirection} duration={duration}>\n {children}\n <RT.Viewport className={styles.viewport} />\n </RT.Provider>\n);\n\nexport const Toast = forwardRef<HTMLLIElement, ToastProps>(function Toast(\n {\n open,\n defaultOpen,\n onOpenChange,\n tone = \"success\",\n title,\n description,\n action,\n duration,\n closeLabel = \"Dismiss\",\n },\n ref,\n) {\n return (\n <RT.Root\n ref={ref}\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n duration={duration ?? DEFAULT_DURATION[tone]}\n type={tone === \"error\" ? \"foreground\" : \"background\"}\n className={[styles.root, styles[`tone-${tone}`]].join(\" \")}\n >\n <span className={styles.icon} aria-hidden=\"true\">\n {Icons[tone]}\n </span>\n <div className={styles.body}>\n <RT.Title className={styles.title}>{resolveNode(title)}</RT.Title>\n {description ? (\n <RT.Description className={styles.description}>{resolveNode(description)}</RT.Description>\n ) : null}\n {action ? (\n <RT.Action altText={action.altText} onClick={action.onClick} className={styles.action}>\n {action.label}\n </RT.Action>\n ) : null}\n </div>\n <RT.Close aria-label={closeLabel} className={styles.close}>\n ×\n </RT.Close>\n </RT.Root>\n );\n});\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./Banner.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type BannerTone = \"info\" | \"success\" | \"warning\" | \"error\" | \"promo\";\n\nexport interface BannerProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\" | \"children\"> {\n tone?: BannerTone;\n title?: ReactNode | RichStr;\n children?: ReactNode | RichStr;\n icon?: ReactNode;\n actions?: ReactNode;\n onDismiss?: () => void;\n dismissLabel?: string;\n role?: \"status\" | \"alert\";\n /**\n * When true, the banner is announced assertively (`role=\"alert\"`).\n * Defaults to false. `tone=\"error\"` also forces `role=\"alert\"` unless\n * the caller explicitly overrides via `role`.\n */\n urgent?: boolean;\n}\n\nconst DefaultIcons: Record<BannerTone, ReactNode> = {\n info: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 8v4M12 16h.01\" />\n </svg>\n ),\n warning: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M10.3 3.86l-8.4 14a2 2 0 001.7 3h16.8a2 2 0 001.7-3l-8.4-14a2 2 0 00-3.4 0z\" />\n <path d=\"M12 9v4M12 17h.01\" />\n </svg>\n ),\n error: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M15 9l-6 6M9 9l6 6\" />\n </svg>\n ),\n success: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M8.5 12.5l2.5 2.5 4.5-5\" />\n </svg>\n ),\n promo: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M12 2l2 7h7l-5.5 4 2 7L12 16l-5.5 4 2-7L3 9h7z\" />\n </svg>\n ),\n};\n\nexport const Banner = forwardRef<HTMLDivElement, BannerProps>(function Banner(\n {\n tone = \"info\",\n title,\n children,\n icon,\n actions,\n onDismiss,\n dismissLabel = \"Dismiss\",\n role,\n urgent = false,\n className,\n ...rest\n },\n ref,\n) {\n const resolvedRole = role ?? (urgent || tone === \"error\" ? \"alert\" : \"status\");\n return (\n <div\n ref={ref}\n role={resolvedRole}\n className={[styles.root, styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <span className={styles.lead} aria-hidden=\"true\">\n {icon ?? DefaultIcons[tone]}\n </span>\n <span className={styles.text}>\n {title ? <span className={styles.title}>{resolveNode(title)}</span> : null}\n {resolveNode(children)}\n </span>\n {actions ? <div className={styles.actions}>{actions}</div> : null}\n {onDismiss ? (\n <button\n type=\"button\"\n className={styles.close}\n onClick={onDismiss}\n aria-label={dismissLabel}\n >\n ×\n </button>\n ) : null}\n </div>\n );\n});\n","import { forwardRef, type CSSProperties, type HTMLAttributes } from \"react\";\nimport styles from \"./Skeleton.module.css\";\n\nexport type SkeletonVariant = \"block\" | \"text\" | \"circle\";\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n variant?: SkeletonVariant;\n width?: number | string;\n height?: number | string;\n radius?: number | string;\n}\n\nexport const Skeleton = forwardRef<HTMLDivElement, SkeletonProps>(function Skeleton(\n { variant = \"block\", width, height, radius, className, style, ...rest },\n ref,\n) {\n const inline: CSSProperties = { ...style };\n if (width !== undefined) inline.width = typeof width === \"number\" ? `${width}px` : width;\n if (height !== undefined) inline.height = typeof height === \"number\" ? `${height}px` : height;\n if (radius !== undefined) inline.borderRadius = typeof radius === \"number\" ? `${radius}px` : radius;\n return (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={[styles.root, styles[`variant-${variant}`], className].filter(Boolean).join(\" \")}\n style={inline}\n {...rest}\n />\n );\n});\n","import { forwardRef, type CSSProperties, type HTMLAttributes } from \"react\";\nimport styles from \"./Progress.module.css\";\n\nexport type ProgressSize = \"sm\" | \"md\" | \"lg\";\nexport type ProgressTone = \"brand\" | \"success\" | \"warning\" | \"danger\" | \"neutral\";\n\nexport interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** 0-100. Omit for indeterminate. */\n value?: number;\n size?: ProgressSize;\n tone?: ProgressTone;\n label?: string;\n showValue?: boolean;\n /** Accessibility label when no visible label is rendered. */\n \"aria-label\"?: string;\n}\n\nfunction clamp(n: number) {\n if (Number.isNaN(n)) return 0;\n if (n < 0) return 0;\n if (n > 100) return 100;\n return n;\n}\n\nexport const Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n {\n value,\n size = \"md\",\n tone = \"brand\",\n label,\n showValue = false,\n className,\n style,\n \"aria-label\": ariaLabel,\n ...rest\n },\n ref,\n) {\n const indeterminate = value === undefined || value === null;\n const v = indeterminate ? 0 : clamp(value);\n const fillStyle: CSSProperties = indeterminate ? {} : { width: `${v}%` };\n\n return (\n <div\n ref={ref}\n className={[styles.root, className].filter(Boolean).join(\" \")}\n style={style}\n {...rest}\n >\n {(label || showValue) && (\n <div className={styles.header}>\n {label && <span className={styles.label}>{label}</span>}\n {showValue && !indeterminate && (\n <span className={styles.value}>{Math.round(v)}%</span>\n )}\n </div>\n )}\n <div\n role=\"progressbar\"\n aria-label={ariaLabel ?? label ?? \"Progress\"}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={indeterminate ? undefined : v}\n className={[\n styles.track,\n styles[`size-${size}`],\n styles[`tone-${tone}`],\n indeterminate ? styles.indeterminate : \"\",\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n <div className={styles.fill} style={fillStyle} />\n </div>\n </div>\n );\n});\n","import { forwardRef, type CSSProperties, type HTMLAttributes } from \"react\";\nimport styles from \"./Spinner.module.css\";\n\nexport type SpinnerSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\nexport type SpinnerTone = \"brand\" | \"neutral\" | \"inverse\";\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {\n size?: SpinnerSize;\n tone?: SpinnerTone;\n /** Accessible label for screen readers. Defaults to \"Loading\". */\n label?: string;\n}\n\nconst SIZE_PX: Record<SpinnerSize, number> = { xs: 12, sm: 16, md: 22, lg: 32 };\n\nexport const Spinner = forwardRef<HTMLSpanElement, SpinnerProps>(function Spinner(\n { size = \"md\", tone = \"brand\", label = \"Loading\", className, style, ...rest },\n ref,\n) {\n const px = SIZE_PX[size];\n const dim: CSSProperties = { width: px, height: px, ...style };\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-live=\"polite\"\n aria-label={label}\n className={[styles.root, styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n style={dim}\n {...rest}\n >\n <svg viewBox=\"0 0 24 24\" className={styles.svg} aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" className={styles.track} />\n <circle cx=\"12\" cy=\"12\" r=\"9\" className={styles.arc} />\n </svg>\n <span className={styles.sr}>{label}</span>\n </span>\n );\n});\n","import { forwardRef, useId, type TextareaHTMLAttributes } from \"react\";\nimport styles from \"./Textarea.module.css\";\n\nexport type TextareaResize = \"none\" | \"vertical\" | \"horizontal\" | \"both\";\n\nexport interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n label?: string;\n hint?: string;\n error?: string;\n resize?: TextareaResize;\n /** Visual character count footer. Reflects `value.length` if controlled, else `defaultValue.length`. */\n showCount?: boolean;\n}\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function Textarea(\n {\n label,\n hint,\n error,\n resize = \"vertical\",\n showCount,\n maxLength,\n id,\n className,\n required,\n rows = 4,\n value,\n defaultValue,\n ...rest\n },\n ref,\n) {\n const autoId = useId();\n const taId = id ?? autoId;\n const hintId = `${taId}-hint`;\n const errorId = `${taId}-error`;\n const countId = `${taId}-count`;\n const describedBy =\n [error ? errorId : null, hint && !error ? hintId : null, showCount ? countId : null]\n .filter(Boolean)\n .join(\" \") || undefined;\n\n const length =\n typeof value === \"string\"\n ? value.length\n : typeof defaultValue === \"string\"\n ? defaultValue.length\n : 0;\n\n return (\n <div className={[styles.wrapper, className].filter(Boolean).join(\" \")}>\n {label ? (\n <label htmlFor={taId} className={styles.label}>\n {label}\n </label>\n ) : null}\n <div className={[styles.field, error ? styles[\"field-error\"] : null].filter(Boolean).join(\" \")}>\n <textarea\n ref={ref}\n id={taId}\n rows={rows}\n maxLength={maxLength}\n value={value}\n defaultValue={defaultValue}\n className={styles.textarea}\n style={{ resize }}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy}\n required={required}\n {...rest}\n />\n </div>\n <div className={styles.footer}>\n {error ? (\n <span id={errorId} className={styles.error}>\n {error}\n </span>\n ) : hint ? (\n <span id={hintId} className={styles.hint}>\n {hint}\n </span>\n ) : (\n <span />\n )}\n {showCount ? (\n <span id={countId} className={styles.count}>\n {length}\n {maxLength ? ` / ${maxLength}` : \"\"}\n </span>\n ) : null}\n </div>\n </div>\n );\n});\n","import \"./interactive-buttons.css\";\nimport type { ComponentType, ReactNode, SVGProps } from \"react\";\nimport SvgChevronDownSmall from \"../icons/ChevronDownSmall\";\nimport { Tooltip, TooltipProvider } from \"../components/Tooltip/Tooltip\";\nimport { resolveStr, type RichStr } from \"../components/Text/richstr\";\n\n/** An icon component from `src/icons` (1em-sized SVG driven by font-size). */\nexport type IconComponent = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport type InteractiveButtonSize = \"lg\" | \"md\" | \"sm\" | \"xs\" | \"2xs\" | \"fit\";\n\nconst ICON_SIZE: Record<InteractiveButtonSize, { padding: string; rem: number }> = {\n lg: { padding: \"2px\", rem: 1 },\n md: { padding: \"2px\", rem: 1 },\n sm: { padding: \"0\", rem: 1 },\n xs: { padding: \"2px\", rem: 0.75 },\n \"2xs\": { padding: \"0\", rem: 0.75 },\n fit: { padding: \"2px\", rem: 1 },\n};\n\n/**\n * Renders an icon inside the `interactive-foreground-icon` wrapper so it\n * reads the Interactive color matrix's icon foreground. Returns an empty\n * spacer when no icon is given but column alignment is wanted.\n */\nexport function iconSlot(\n Icon: IconComponent | undefined,\n size: InteractiveButtonSize,\n includeSpacer: boolean,\n): ReactNode {\n const { padding, rem } = ICON_SIZE[size];\n if (Icon) {\n return (\n <span className=\"interactive-foreground-icon sds-icon-slot\" style={{ padding }}>\n <Icon style={{ width: `${rem}rem`, height: `${rem}rem`, flexShrink: 0 }} />\n </span>\n );\n }\n return includeSpacer ? <span /> : null;\n}\n\n/**\n * Chevron that rotates 180 degrees while the parent `.interactive` is in\n * hover or active state. Shared dropdown indicator for OpenButton and\n * FilterButton.\n */\nexport function ChevronIcon(props: SVGProps<SVGSVGElement>) {\n return (\n <SvgChevronDownSmall\n {...props}\n className={[\"sds-button-chevron\", props.className].filter(Boolean).join(\" \")}\n />\n );\n}\n\n/**\n * Wraps an element in a self-providing Tooltip when `tooltip` is set;\n * passes the element through untouched otherwise.\n */\nexport function withTooltip(\n element: ReactNode,\n tooltip: string | RichStr | undefined,\n side: \"top\" | \"right\" | \"bottom\" | \"left\",\n): ReactNode {\n if (tooltip === undefined) return element;\n return (\n <TooltipProvider>\n <Tooltip content={typeof tooltip === \"string\" ? tooltip : resolveStr(tooltip)} side={side}>\n {element}\n </Tooltip>\n </TooltipProvider>\n );\n}\n","import { forwardRef, useState, type HTMLAttributes } from \"react\";\nimport styles from \"./FeedbackThumbs.module.css\";\nimport { withTooltip } from \"../../internal/interactive-buttons\";\nimport type { RichStr } from \"../Text/richstr\";\n\nexport type FeedbackValue = \"up\" | \"down\" | null;\n\n/**\n * Per-thumb tooltip content. A `string`/`RichStr` shows the same hint\n * regardless of state; a function receives whether that thumb is currently\n * active so consumers can swap copy (e.g. \"Good response\" → \"Remove like\").\n * Returning `undefined` shows no tooltip for that state.\n */\nexport type FeedbackThumbTooltip =\n | string\n | RichStr\n | ((active: boolean) => string | RichStr | undefined);\n\nexport interface FeedbackThumbsProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"onChange\" | \"defaultValue\"> {\n value?: FeedbackValue;\n defaultValue?: FeedbackValue;\n onChange?: (next: FeedbackValue) => void;\n /** Accessible label for the control group. */\n label?: string;\n size?: \"sm\" | \"md\";\n disabled?: boolean;\n /** Hover tooltip for the thumbs-up control. State-aware via a callback. */\n upTooltip?: FeedbackThumbTooltip;\n /** Hover tooltip for the thumbs-down control. State-aware via a callback. */\n downTooltip?: FeedbackThumbTooltip;\n /** Side the tooltips open on. Defaults to `\"top\"`. */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\";\n}\n\nconst resolveTooltip = (\n tip: FeedbackThumbTooltip | undefined,\n active: boolean,\n): string | RichStr | undefined => (typeof tip === \"function\" ? tip(active) : tip);\n\nconst UpIcon = ({ size = 16 }: { size?: number }) => (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.6} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M7 22V11M2 13v7a2 2 0 0 0 2 2h3M22 11.5a3 3 0 0 0-3-3h-4l1.4-5.4a1 1 0 0 0-1-1.2l-.9.1a1 1 0 0 0-.8.6L7 11v11h11.3a2 2 0 0 0 2-1.7l1.7-7.8Z\" />\n </svg>\n);\n\nconst DownIcon = ({ size = 16 }: { size?: number }) => (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.6} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M17 2v11M22 11V4a2 2 0 0 0-2-2h-3M2 12.5a3 3 0 0 0 3 3h4l-1.4 5.4a1 1 0 0 0 1 1.2l.9-.1a1 1 0 0 0 .8-.6L17 13V2H5.7a2 2 0 0 0-2 1.7L2 11.5Z\" />\n </svg>\n);\n\nexport const FeedbackThumbs = forwardRef<HTMLDivElement, FeedbackThumbsProps>(\n function FeedbackThumbs(\n {\n value,\n defaultValue = null,\n onChange,\n label = \"Rate this response\",\n size = \"md\",\n disabled,\n upTooltip,\n downTooltip,\n tooltipSide = \"top\",\n className,\n ...rest\n },\n ref,\n ) {\n const controlled = value !== undefined;\n const [internal, setInternal] = useState<FeedbackValue>(defaultValue);\n const current = controlled ? value : internal;\n\n const set = (next: FeedbackValue) => {\n const v = current === next ? null : next;\n if (!controlled) setInternal(v);\n onChange?.(v);\n };\n\n const px = size === \"sm\" ? 14 : 16;\n\n const upButton = (\n <button\n type=\"button\"\n className={[styles.btn, current === \"up\" ? styles.active : null].filter(Boolean).join(\" \")}\n aria-pressed={current === \"up\"}\n aria-label=\"Helpful\"\n onClick={() => set(\"up\")}\n disabled={disabled}\n >\n <UpIcon size={px} />\n </button>\n );\n\n const downButton = (\n <button\n type=\"button\"\n className={[styles.btn, current === \"down\" ? styles.activeDown : null]\n .filter(Boolean)\n .join(\" \")}\n aria-pressed={current === \"down\"}\n aria-label=\"Not helpful\"\n onClick={() => set(\"down\")}\n disabled={disabled}\n >\n <DownIcon size={px} />\n </button>\n );\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={label}\n className={[styles.root, styles[`size-${size}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {withTooltip(upButton, resolveTooltip(upTooltip, current === \"up\"), tooltipSide)}\n {withTooltip(downButton, resolveTooltip(downTooltip, current === \"down\"), tooltipSide)}\n </div>\n );\n },\n);\n","import {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type KeyboardEvent,\n type ReactNode,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport styles from \"./Composer.module.css\";\n\nexport interface ComposerProps\n extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, \"onChange\" | \"onSubmit\" | \"value\"> {\n value?: string;\n defaultValue?: string;\n onChange?: (next: string) => void;\n onSubmit?: (text: string) => void;\n /** Render submit-disabled state and a spinner on the send button. */\n busy?: boolean;\n /** Text shown on the send button. Default: \"Send\". */\n sendLabel?: string;\n /** Replace the default send icon (paper-plane arrow). */\n sendIcon?: ReactNode;\n /** Top slot — attachment chips, citations, etc. */\n attachments?: ReactNode;\n /** Left toolbar slot — attach button, slash menu trigger, model picker. */\n leadingActions?: ReactNode;\n /** Right footer slot — token counter, helper text. */\n trailingMeta?: ReactNode;\n /** Greek-friendly placeholder. */\n placeholder?: string;\n /** Max visual rows before scroll. Default 12. */\n maxRows?: number;\n /** Submit on plain Enter (Shift+Enter for newline). Default true. */\n submitOnEnter?: boolean;\n}\n\nconst SendIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.75} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M5 12h14M13 5l7 7-7 7\" />\n </svg>\n);\n\nexport const Composer = forwardRef<HTMLTextAreaElement, ComposerProps>(function Composer(\n {\n value,\n defaultValue,\n onChange,\n onSubmit,\n busy,\n sendLabel = \"Send\",\n sendIcon,\n attachments,\n leadingActions,\n trailingMeta,\n placeholder = \"Ask anything…\",\n maxRows = 12,\n submitOnEnter = true,\n rows = 1,\n className,\n disabled,\n ...rest\n },\n ref,\n) {\n const controlled = value !== undefined;\n const [internal, setInternal] = useState(defaultValue ?? \"\");\n const text = controlled ? (value as string) : internal;\n const taRef = useRef<HTMLTextAreaElement | null>(null);\n\n const setText = (next: string) => {\n if (!controlled) setInternal(next);\n onChange?.(next);\n };\n\n // Auto-grow up to maxRows lines.\n useEffect(() => {\n const el = taRef.current;\n if (!el) return;\n el.style.height = \"auto\";\n const lineHeight = parseFloat(getComputedStyle(el).lineHeight || \"20\") || 20;\n const max = lineHeight * maxRows;\n el.style.height = `${Math.min(el.scrollHeight, max)}px`;\n el.style.overflowY = el.scrollHeight > max ? \"auto\" : \"hidden\";\n }, [text, maxRows]);\n\n const submit = () => {\n const trimmed = text.trim();\n if (!trimmed || busy || disabled) return;\n onSubmit?.(trimmed);\n if (!controlled) setInternal(\"\");\n };\n\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (submitOnEnter && e.key === \"Enter\" && !e.shiftKey && !e.nativeEvent.isComposing) {\n e.preventDefault();\n submit();\n }\n rest.onKeyDown?.(e);\n };\n\n const canSend = !!text.trim() && !busy && !disabled;\n\n return (\n <form\n className={[styles.root, className].filter(Boolean).join(\" \")}\n onSubmit={(e) => {\n e.preventDefault();\n submit();\n }}\n >\n {attachments ? <div className={styles.attachments}>{attachments}</div> : null}\n <div className={[styles.shell, disabled ? styles.disabled : null].filter(Boolean).join(\" \")}>\n <textarea\n ref={(el) => {\n taRef.current = el;\n if (typeof ref === \"function\") ref(el);\n else if (ref) (ref as { current: HTMLTextAreaElement | null }).current = el;\n }}\n rows={rows}\n className={styles.textarea}\n placeholder={placeholder}\n value={text}\n onChange={(e) => setText(e.target.value)}\n onKeyDown={onKeyDown}\n disabled={disabled || busy}\n {...rest}\n />\n <div className={styles.footer}>\n <div className={styles.leading}>{leadingActions}</div>\n <div className={styles.trailing}>\n {trailingMeta ? <span className={styles.meta}>{trailingMeta}</span> : null}\n <button\n type=\"submit\"\n className={styles.send}\n disabled={!canSend}\n aria-label={sendLabel}\n aria-busy={busy || undefined}\n >\n {busy ? (\n <span className={styles.spinner} aria-hidden=\"true\" />\n ) : (\n <span className={styles.sendIcon}>{sendIcon ?? <SendIcon />}</span>\n )}\n <span className={styles.sendLabel}>{sendLabel}</span>\n </button>\n </div>\n </div>\n </div>\n </form>\n );\n});\n","import {\n forwardRef,\n type ButtonHTMLAttributes,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport styles from \"./ComposerChip.module.css\";\nimport SvgX from \"../../icons/X\";\nimport { withTooltip } from \"../../internal/interactive-buttons\";\nimport type { RichStr } from \"../Text/richstr\";\n\nexport interface ComposerChipProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n /** Leading icon node. */\n icon?: ReactNode;\n /**\n * Status dot rendered before the label. Pass a CSS color (e.g. a token var\n * or hex) to show a small glowing indicator — used for model/status chips.\n */\n dot?: string;\n /**\n * Show a trailing chevron, signalling the chip opens a menu. Renders\n * independently — it coexists with {@link onRemove} / {@link trailing} /\n * {@link trailingActions} (caret first, interactive affordance after), so a\n * chip can show both a dropdown caret and a clear-X.\n */\n caret?: boolean;\n /** Selected/active styling. */\n active?: boolean;\n /**\n * When set, render a trailing remove control (an X) with its own click\n * target. Clicking (or activating via keyboard) it calls `onRemove` and does\n * NOT trigger the chip's primary `onClick`. Sugar over {@link trailing}.\n */\n onRemove?: () => void;\n /** Accessible name for the remove control. Defaults to `\"Remove\"`. */\n removeLabel?: string;\n /**\n * Generic trailing slot rendered after the label (and after the caret).\n * Clicks within it do not fire the chip's `onClick`. When `onRemove` is also\n * set, `onRemove` wins for this slot.\n */\n trailing?: ReactNode;\n /**\n * Extra interactive controls rendered at the chip's trailing edge, after the\n * caret and the remove/trailing affordance. Clicks within it do not fire the\n * chip's primary `onClick`. Use for secondary per-chip actions alongside a\n * caret and/or clear-X. Render `role=\"button\"` spans here, never a nested\n * `<button>` (the chip root is itself a `<button>`).\n */\n trailingActions?: ReactNode;\n /**\n * When set, wraps the chip in the DS Tooltip. Supports inline markdown via\n * `markdown()`. When `undefined`, the chip renders bare (no wrapper).\n */\n tooltip?: string | RichStr;\n /** Side the tooltip opens on. Defaults to `\"top\"`. */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\";\n children?: ReactNode;\n}\n\nconst Caret = () => (\n <svg\n className={styles.caret}\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M6 9l6 6 6-6\" />\n </svg>\n);\n\n/**\n * Pill-shaped action chip for the {@link Composer} toolbar (`leadingActions`\n * slot) — model pickers, source-scope filters, language toggles. Replaces the\n * ad-hoc inline-styled buttons chat surfaces used to hand-roll.\n *\n * The chip root is a `<button>`; any interactive trailing affordance is a\n * sibling `role=\"button\"` overlay (never a descendant `<button>`) to keep the\n * DOM free of nested interactive elements.\n */\nexport const ComposerChip = forwardRef<HTMLButtonElement, ComposerChipProps>(\n function ComposerChip(\n {\n icon,\n dot,\n caret = false,\n active = false,\n onRemove,\n removeLabel = \"Remove\",\n trailing,\n trailingActions,\n tooltip,\n tooltipSide = \"top\",\n children,\n className,\n type = \"button\",\n ...rest\n },\n ref,\n ) {\n const classes = [styles.chip, active ? styles.active : null, className]\n .filter(Boolean)\n .join(\" \");\n\n // The caret is decorative and renders independently. The interactive\n // affordance (onRemove's X, else the generic `trailing` slot) renders\n // after it, then any `trailingActions`. So caret + clear-X can coexist.\n let affordanceNode: ReactNode = null;\n if (onRemove) {\n const fire = () => onRemove();\n const onKeyDown = (e: KeyboardEvent<HTMLSpanElement>) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n e.stopPropagation();\n fire();\n }\n };\n const onClick = (e: MouseEvent<HTMLSpanElement>) => {\n e.stopPropagation();\n fire();\n };\n affordanceNode = (\n <span\n className={styles.remove}\n role=\"button\"\n tabIndex={0}\n aria-label={removeLabel}\n onClick={onClick}\n onKeyDown={onKeyDown}\n >\n <SvgX aria-hidden=\"true\" />\n </span>\n );\n } else if (trailing != null) {\n affordanceNode = (\n <span className={styles.trailing} onClick={(e) => e.stopPropagation()} role=\"presentation\">\n {trailing}\n </span>\n );\n }\n\n const trailingNode = (\n <>\n {caret ? <Caret /> : null}\n {affordanceNode}\n {trailingActions != null ? (\n <span className={styles.trailing} onClick={(e) => e.stopPropagation()} role=\"presentation\">\n {trailingActions}\n </span>\n ) : null}\n </>\n );\n\n const chip = (\n // eslint-disable-next-line react/button-has-type -- `type` defaults to \"button\", overridable via prop\n <button ref={ref} type={type} className={classes} {...rest}>\n {dot ? (\n <span\n className={styles.dot}\n aria-hidden=\"true\"\n style={{ background: dot, boxShadow: `0 0 6px ${dot}` }}\n />\n ) : null}\n {icon ? (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n {children != null ? <span className={styles.label}>{children}</span> : null}\n {trailingNode}\n </button>\n );\n\n return <>{withTooltip(chip, tooltip, tooltipSide)}</>;\n },\n);\n","import * as DM from \"@radix-ui/react-dropdown-menu\";\nimport { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from \"react\";\nimport styles from \"./DropdownMenu.module.css\";\n\nexport const DropdownMenu = DM.Root;\nexport const DropdownMenuTrigger = DM.Trigger;\nexport const DropdownMenuGroup = DM.Group;\nexport const DropdownMenuRadioGroup = DM.RadioGroup;\nexport const DropdownMenuSub = DM.Sub;\n\nexport const DropdownMenuContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.Content>\n>(function DropdownMenuContent({ className, sideOffset = 6, ...rest }, ref) {\n return (\n <DM.Portal>\n <DM.Content\n ref={ref}\n sideOffset={sideOffset}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n </DM.Portal>\n );\n});\n\nexport interface DropdownMenuItemProps extends ComponentPropsWithoutRef<typeof DM.Item> {\n icon?: ReactNode;\n shortcut?: ReactNode;\n tone?: \"default\" | \"danger\";\n}\n\nexport const DropdownMenuItem = forwardRef<HTMLDivElement, DropdownMenuItemProps>(\n function DropdownMenuItem({ icon, shortcut, tone = \"default\", className, children, ...rest }, ref) {\n return (\n <DM.Item\n ref={ref}\n className={[styles.item, styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {icon ? <span className={styles.icon} aria-hidden=\"true\">{icon}</span> : null}\n <span className={styles.label}>{children}</span>\n {shortcut ? <span className={styles.shortcut}>{shortcut}</span> : null}\n </DM.Item>\n );\n },\n);\n\nexport interface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithoutRef<typeof DM.CheckboxItem> {\n children: ReactNode;\n}\n\nexport const DropdownMenuCheckboxItem = forwardRef<HTMLDivElement, DropdownMenuCheckboxItemProps>(\n function DropdownMenuCheckboxItem({ className, children, ...rest }, ref) {\n return (\n <DM.CheckboxItem\n ref={ref}\n className={[styles.item, styles.indicatorItem, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <DM.ItemIndicator className={styles.indicator}>\n <CheckIcon />\n </DM.ItemIndicator>\n <span className={styles.label}>{children}</span>\n </DM.CheckboxItem>\n );\n },\n);\n\nexport interface DropdownMenuRadioItemProps\n extends ComponentPropsWithoutRef<typeof DM.RadioItem> {\n children: ReactNode;\n}\n\nexport const DropdownMenuRadioItem = forwardRef<HTMLDivElement, DropdownMenuRadioItemProps>(\n function DropdownMenuRadioItem({ className, children, ...rest }, ref) {\n return (\n <DM.RadioItem\n ref={ref}\n className={[styles.item, styles.indicatorItem, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <DM.ItemIndicator className={styles.indicator}>\n <span className={styles.radioDot} />\n </DM.ItemIndicator>\n <span className={styles.label}>{children}</span>\n </DM.RadioItem>\n );\n },\n);\n\nexport const DropdownMenuLabel = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.Label>\n>(function DropdownMenuLabel({ className, ...rest }, ref) {\n return (\n <DM.Label\n ref={ref}\n className={[styles.menuLabel, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport const DropdownMenuSeparator = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.Separator>\n>(function DropdownMenuSeparator({ className, ...rest }, ref) {\n return (\n <DM.Separator\n ref={ref}\n className={[styles.separator, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport const DropdownMenuSubTrigger = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.SubTrigger>\n>(function DropdownMenuSubTrigger({ className, children, ...rest }, ref) {\n return (\n <DM.SubTrigger\n ref={ref}\n className={[styles.item, styles.subTrigger, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <span className={styles.label}>{children}</span>\n <span className={styles.subChevron} aria-hidden=\"true\">▸</span>\n </DM.SubTrigger>\n );\n});\n\nexport const DropdownMenuSubContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.SubContent>\n>(function DropdownMenuSubContent({ className, ...rest }, ref) {\n return (\n <DM.Portal>\n <DM.SubContent\n ref={ref}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n </DM.Portal>\n );\n});\n\nfunction CheckIcon() {\n return (\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n","import * as A from \"@radix-ui/react-accordion\";\nimport { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from \"react\";\nimport styles from \"./Accordion.module.css\";\n\ntype AccordionRootProps = ComponentPropsWithoutRef<typeof A.Root>;\n\nexport const Accordion = forwardRef<HTMLDivElement, AccordionRootProps>(\n function Accordion(props, ref) {\n const { className, ...rest } = props as AccordionRootProps & { className?: string };\n return (\n <A.Root\n ref={ref}\n className={[styles.root, className].filter(Boolean).join(\" \")}\n {...(rest as AccordionRootProps)}\n />\n );\n },\n);\n\nexport const AccordionItem = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<typeof A.Item>>(\n function AccordionItem({ className, ...rest }, ref) {\n return (\n <A.Item\n ref={ref}\n className={[styles.item, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n },\n);\n\nexport interface AccordionTriggerProps extends ComponentPropsWithoutRef<typeof A.Trigger> {\n children: ReactNode;\n}\n\nexport const AccordionTrigger = forwardRef<HTMLButtonElement, AccordionTriggerProps>(\n function AccordionTrigger({ className, children, ...rest }, ref) {\n return (\n <A.Header className={styles.header}>\n <A.Trigger\n ref={ref}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <span className={styles.label}>{children}</span>\n <span className={styles.chev} aria-hidden=\"true\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.6} strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </A.Trigger>\n </A.Header>\n );\n },\n);\n\nexport const AccordionContent = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<typeof A.Content>>(\n function AccordionContent({ className, children, ...rest }, ref) {\n return (\n <A.Content\n ref={ref}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <div className={styles.contentInner}>{children}</div>\n </A.Content>\n );\n },\n);\n","import * as C from \"@radix-ui/react-collapsible\";\nimport { forwardRef, type ComponentPropsWithoutRef } from \"react\";\nimport styles from \"./Collapsible.module.css\";\n\n/**\n * Collapsible — a single show/hide disclosure (distinct from Accordion, which\n * groups several items under one value). Thin wrappers over Radix Collapsible:\n * controlled (`open`/`onOpenChange`) or uncontrolled (`defaultOpen`), and the\n * trigger supports `asChild` so callers can host their own button/row.\n */\nexport const Collapsible = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<typeof C.Root>>(\n function Collapsible({ className, ...rest }, ref) {\n return (\n <C.Root ref={ref} className={[styles.root, className].filter(Boolean).join(\" \")} {...rest} />\n );\n },\n);\n\nexport const CollapsibleTrigger = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef<typeof C.Trigger>\n>(function CollapsibleTrigger({ className, ...rest }, ref) {\n return (\n <C.Trigger\n ref={ref}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport const CollapsibleContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof C.Content>\n>(function CollapsibleContent({ className, children, ...rest }, ref) {\n return (\n <C.Content\n ref={ref}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {children}\n </C.Content>\n );\n});\n","import * as SA from \"@radix-ui/react-scroll-area\";\nimport { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from \"react\";\nimport styles from \"./ScrollArea.module.css\";\n\nexport type ScrollAreaOrientation = \"vertical\" | \"horizontal\" | \"both\";\n\nexport interface ScrollAreaProps extends ComponentPropsWithoutRef<typeof SA.Root> {\n orientation?: ScrollAreaOrientation;\n children: ReactNode;\n}\n\nexport const ScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(function ScrollArea(\n { orientation = \"vertical\", className, children, ...rest },\n ref,\n) {\n return (\n <SA.Root\n ref={ref}\n className={[styles.root, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {/* tabIndex={0} keeps the scrollable viewport keyboard-reachable (axe scrollable-region-focusable). */}\n <SA.Viewport className={styles.viewport} tabIndex={0}>\n {children}\n </SA.Viewport>\n {(orientation === \"vertical\" || orientation === \"both\") && (\n <SA.Scrollbar orientation=\"vertical\" className={styles.scrollbar}>\n <SA.Thumb className={styles.thumb} />\n </SA.Scrollbar>\n )}\n {(orientation === \"horizontal\" || orientation === \"both\") && (\n <SA.Scrollbar\n orientation=\"horizontal\"\n className={[styles.scrollbar, styles.scrollbarHorizontal].join(\" \")}\n >\n <SA.Thumb className={styles.thumb} />\n </SA.Scrollbar>\n )}\n <SA.Corner className={styles.corner} />\n </SA.Root>\n );\n});\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useImperativeHandle,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { Button } from \"../Button/Button\";\nimport SvgChevronUp from \"../../icons/ChevronUp\";\nimport styles from \"./ScrollableList.module.css\";\n\n/**\n * Kept for API compatibility. Headers no longer paint a surface — the pinned\n * title floats over the top fade mask (rows dissolve beneath it, exactly like\n * the bottom fade), so there is no header box to paint.\n *\n * @deprecated The header surface is no longer rendered; the prop is ignored.\n */\nexport type ScrollableListHeaderSurface = \"surface\" | \"glass\" | \"transparent\";\n\nexport interface ScrollStateChange {\n /** Content is hidden above the viewport (top fade is shown). */\n atTop: boolean;\n /** Content is hidden below the viewport (bottom fade is shown). */\n atBottom: boolean;\n /** The viewport actually overflows (is scrollable). */\n isScrollable: boolean;\n}\n\ninterface SectionEntry {\n element: HTMLElement | null;\n header: ReactNode;\n hasHeader: boolean;\n}\n\ninterface ScrollableListCtx {\n /** Sections upsert themselves every render so the root always has the\n * latest header node + element for the pinned-title scroll math. */\n updateSection: (id: string, entry: SectionEntry) => void;\n removeSection: (id: string) => void;\n}\n\nconst ScrollableListContext = createContext<ScrollableListCtx | null>(null);\n\nexport interface ScrollableListProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"onScroll\"> {\n /** Accessible name for the scroll `region`. Required for a labelled landmark. */\n ariaLabel: string;\n /** Max height of the scroll viewport. Number → px. Required to bound scrolling. */\n maxHeight: number | string;\n /** @deprecated Ignored — headers float over the fade and paint no surface. */\n headerSurface?: ScrollableListHeaderSurface;\n /**\n * Horizontal breathing room (px) so row hover shadows/glows aren't clipped\n * by the viewport's overflow-x. Layout-neutral: padding paired with an\n * equal negative margin. Default 16.\n */\n bleed?: number;\n /**\n * Stretch the scroll region to its container's full height even when the\n * content is shorter — keeps the region's bottom edge (and fade) aligned\n * with sibling panes. Pair with a definite-height parent (e.g. a 1fr grid\n * row). Default false (content-sized up to maxHeight).\n */\n fill?: boolean;\n /**\n * Show the back-to-top button in the header line. Visible whenever the list\n * is scrolled away from the top; smooth-scrolls to the top on click\n * (instant when `prefers-reduced-motion`). Default `true`.\n */\n backToTop?: boolean;\n /** Accessible label for the back-to-top button. Default \"Back to top\". */\n backToTopLabel?: string;\n /** Fired when the scroll edges or scrollability change. */\n onScrollStateChange?: (state: ScrollStateChange) => void;\n children?: ReactNode;\n}\n\nexport interface ScrollableListHandle {\n /** Smooth-scroll (or instant under reduced motion) the viewport to the top. */\n scrollToTop: () => void;\n /** The scrollable viewport element, for advanced callers. */\n readonly viewport: HTMLDivElement | null;\n}\n\nfunction prefersReducedMotion(): boolean {\n return (\n typeof window !== \"undefined\" &&\n typeof window.matchMedia === \"function\" &&\n window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n );\n}\n\n/**\n * ScrollableList — a bounded, fade-masked scroll region with floating pinned\n * section titles and an optional back-to-top control.\n *\n * Composition:\n * <ScrollableList ariaLabel=\"Past meetings\" maxHeight={480}>\n * <ScrollableList.Section header={<h3>Jun 5 · 7 recordings</h3>}>\n * …rows…\n * </ScrollableList.Section>\n * </ScrollableList>\n *\n * Fades: both edges are CSS `mask-image` on the viewport — content genuinely\n * dissolves, revealing whatever sits behind the list (solid surface or glass).\n * The top fade mirrors the bottom one exactly.\n *\n * Pinned titles: section headers render in normal flow and dissolve into the\n * top fade with their rows. The root tracks which section spans the top edge\n * and floats a crisp copy of its header above the fade (aria-hidden — the\n * in-flow header keeps the semantics). When the next section's header\n * approaches, the floating title is displaced upward, reproducing the classic\n * sticky hand-off without putting the header inside the masked subtree.\n */\nfunction ScrollableListRoot(\n {\n ariaLabel,\n maxHeight,\n headerSurface: _headerSurface = \"surface\",\n bleed = 16,\n fill = false,\n backToTop = true,\n backToTopLabel = \"Back to top\",\n onScrollStateChange,\n children,\n className,\n style,\n ...rest\n }: ScrollableListProps,\n ref: React.Ref<ScrollableListHandle>,\n) {\n const viewportRef = useRef<HTMLDivElement>(null);\n const topSentinelRef = useRef<HTMLDivElement>(null);\n const bottomSentinelRef = useRef<HTMLDivElement>(null);\n const pinnedRef = useRef<HTMLDivElement>(null);\n\n const [atTop, setAtTop] = useState(true);\n const [atBottom, setAtBottom] = useState(true);\n const [isScrollable, setIsScrollable] = useState(false);\n const [showBackToTop, setShowBackToTop] = useState(false);\n\n // Registry of sections for the pinned-title math. A ref (not state): the\n // rAF loop reads it; only the *active header* transition triggers a render.\n const sectionsRef = useRef(new Map<string, SectionEntry>());\n const [activeHeader, setActiveHeader] = useState<ReactNode>(null);\n const activeIdRef = useRef<string | null>(null);\n // In-flow headers inside the fade zone are hidden (visibility) — their\n // crisp floating twins are the only rendering there. Tracked for precise\n // restore when they leave the zone or the list unmounts.\n const hiddenHeadersRef = useRef(new Set<HTMLElement>());\n\n const updateSection = useCallback((id: string, entry: SectionEntry) => {\n sectionsRef.current.set(id, entry);\n // Keep the floating copy in sync when the active section's header node\n // itself re-renders (e.g. its count changes).\n if (activeIdRef.current === id) setActiveHeader(entry.header);\n }, []);\n const removeSection = useCallback((id: string) => {\n sectionsRef.current.delete(id);\n if (activeIdRef.current === id) {\n activeIdRef.current = null;\n setActiveHeader(null);\n }\n }, []);\n\n const onChangeRef = useRef(onScrollStateChange);\n onChangeRef.current = onScrollStateChange;\n const emit = useCallback((next: ScrollStateChange) => {\n onChangeRef.current?.(next);\n }, []);\n\n // Sentinel-based edge detection (zero-height lines at the content's ends).\n useEffect(() => {\n const viewport = viewportRef.current;\n const top = topSentinelRef.current;\n const bottom = bottomSentinelRef.current;\n if (!viewport || !top || !bottom) return;\n\n const io = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.target === top) setAtTop(entry.isIntersecting);\n else if (entry.target === bottom) setAtBottom(entry.isIntersecting);\n }\n },\n { root: viewport, threshold: 0 },\n );\n io.observe(top);\n io.observe(bottom);\n return () => io.disconnect();\n }, []);\n\n // rAF measure loop: overflow state, back-to-top visibility, and the pinned\n // section title (which section owns the top edge + hand-off displacement).\n useEffect(() => {\n const viewport = viewportRef.current;\n if (!viewport) return;\n\n let frame = 0;\n const measure = () => {\n frame = 0;\n const scrollable = viewport.scrollHeight - viewport.clientHeight > 1;\n setIsScrollable(scrollable);\n // Visible whenever the list is scrolled away from the top (stg behavior).\n setShowBackToTop(scrollable && viewport.scrollTop > 8);\n\n // ---- floating section title (single slot) ----\n // Only ONE title renders at a time: the pinned copy of the section\n // owning the top edge. In-flow headers are visibility-hidden through\n // the fade zone (they dissolve like rows); the pinned title slides out\n // as the next header reaches the top, completing its exit exactly when\n // the next section takes over (contact hand-off, no co-visible titles).\n const pinned = pinnedRef.current;\n const rootEl = viewport.parentElement as HTMLElement;\n const rootRect = rootEl.getBoundingClientRect();\n const vpTop = viewport.getBoundingClientRect().top;\n // The pane can sit at a fractional screen offset; transforms must\n // compensate so the title's FINAL position is whole-pixel (fractional\n // rasterization is what blurs the text).\n const snapY = (y: number) => Math.round(rootRect.top + y) - rootRect.top;\n const snapX = (x: number) => Math.round(rootRect.left + x) - rootRect.left;\n const fadeZone =\n parseFloat(getComputedStyle(viewport).getPropertyValue(\"--sds-list-fade-top\")) || 96;\n const entries = [...sectionsRef.current.entries()]\n .filter(([, e]) => e.element && e.hasHeader)\n .map(([id, e]) => {\n const rect = (e.element as HTMLElement).getBoundingClientRect();\n const headerEl = (e.element as HTMLElement)\n .firstElementChild as HTMLElement | null;\n const hRect = headerEl ? headerEl.getBoundingClientRect() : rect;\n return {\n id,\n entry: e,\n rect,\n headerEl,\n headerTop: hRect.top - vpTop,\n headerH: hRect.height,\n };\n })\n .sort((a, b) => a.rect.top - b.rect.top);\n\n let active: (typeof entries)[number] | null = null;\n let next: (typeof entries)[number] | null = null;\n for (const s of entries) {\n if (s.rect.top - vpTop <= 1) active = s;\n else if (!next) next = s;\n }\n\n if ((active?.id ?? null) !== activeIdRef.current) {\n activeIdRef.current = active?.id ?? null;\n setActiveHeader(active ? active.entry.header : null);\n }\n\n // At rest (scrollTop 0) the in-flow header is fully visible — only\n // float a copy once the real one has scrolled above the top edge.\n const activeObscured = active != null && active.headerTop < -0.5;\n\n // Hide in-flow headers whose text would ghost through the fade: the\n // active one (its copy is pinned) and the next one while inside the\n // zone. visibility (not display) — layout must not shift.\n const desiredHidden = new Set<HTMLElement>();\n if (active?.headerEl && activeObscured) desiredHidden.add(active.headerEl);\n if (next?.headerEl && next.headerTop < fadeZone) desiredHidden.add(next.headerEl);\n for (const el of hiddenHeadersRef.current) {\n if (!desiredHidden.has(el)) el.style.visibility = \"\";\n }\n for (const el of desiredHidden) el.style.visibility = \"hidden\";\n hiddenHeadersRef.current = desiredHidden;\n\n if (pinned) {\n if (active && activeObscured) {\n const h = pinned.offsetHeight;\n // Slide out on contact: as the next header covers the title's own\n // band [0..h], push the title up; it exits fully at the exact\n // moment the next section takes over (ty = -h at headerTop = 0).\n const ty = next ? Math.min(0, next.headerTop - h) : 0;\n const pinProgress = h > 0 ? Math.max(0, 1 + ty / h) : 1;\n pinned.style.transform =\n \"translate(\" + snapX(12 * pinProgress) + \"px, \" + snapY(ty) + \"px)\";\n pinned.style.opacity = \"1\";\n } else {\n pinned.style.opacity = \"0\";\n }\n }\n };\n const schedule = () => {\n if (frame) return;\n frame = requestAnimationFrame(measure);\n };\n\n measure();\n viewport.addEventListener(\"scroll\", schedule, { passive: true });\n const ro = new ResizeObserver(schedule);\n ro.observe(viewport);\n const content = viewport.firstElementChild;\n if (content) ro.observe(content);\n\n return () => {\n viewport.removeEventListener(\"scroll\", schedule);\n ro.disconnect();\n if (frame) cancelAnimationFrame(frame);\n for (const el of hiddenHeadersRef.current) el.style.visibility = \"\";\n hiddenHeadersRef.current = new Set();\n };\n }, []);\n\n useEffect(() => {\n emit({ atTop, atBottom, isScrollable });\n }, [atTop, atBottom, isScrollable, emit]);\n\n const scrollToTop = useCallback(() => {\n const viewport = viewportRef.current;\n if (!viewport) return;\n viewport.scrollTo({\n top: 0,\n behavior: prefersReducedMotion() ? \"auto\" : \"smooth\",\n });\n }, []);\n\n useImperativeHandle(\n ref,\n () => ({\n scrollToTop,\n get viewport() {\n return viewportRef.current;\n },\n }),\n [scrollToTop],\n );\n\n // Both fades are the same mask, mirrored. The pinned title lives OUTSIDE\n // the masked viewport, so it stays crisp while rows dissolve beneath it.\n const fadeTop = !atTop;\n const fadeBottom = isScrollable && !atBottom;\n\n return (\n <ScrollableListContext.Provider value={{ updateSection, removeSection }}>\n <div\n className={[styles.root, className].filter(Boolean).join(\" \")}\n style={fill ? { height: \"100%\", ...style } : style}\n {...rest}\n >\n <div\n ref={viewportRef}\n className={styles.viewport}\n role=\"region\"\n aria-label={ariaLabel}\n tabIndex={isScrollable ? 0 : undefined}\n data-fade-top={fadeTop ? \"\" : undefined}\n data-fade-bottom={fadeBottom ? \"\" : undefined}\n style={{\n maxHeight: typeof maxHeight === \"number\" ? `${maxHeight}px` : maxHeight,\n height: fill ? \"100%\" : undefined,\n paddingInline: bleed,\n marginInline: -bleed,\n }}\n >\n <div ref={topSentinelRef} className={styles.sentinel} aria-hidden=\"true\" />\n <div className={styles.content}>{children}</div>\n <div ref={bottomSentinelRef} className={styles.sentinel} aria-hidden=\"true\" />\n </div>\n\n {/* Floating copy of the active section's header. The in-flow header\n carries the semantics; this is presentation only. */}\n <div\n ref={pinnedRef}\n className={styles.pinnedHeader}\n data-visible={activeHeader != null && fadeTop ? \"\" : undefined}\n aria-hidden=\"true\"\n >\n {activeHeader}\n </div>\n\n {backToTop && (\n <div\n className={styles.backToTopSlot}\n data-visible={showBackToTop ? \"\" : undefined}\n aria-hidden={showBackToTop ? undefined : \"true\"}\n >\n <Button\n variant=\"tertiary\"\n size=\"md\"\n iconOnly\n iconLeft={<SvgChevronUp width={26} height={26} />}\n aria-label={backToTopLabel}\n tooltip={backToTopLabel}\n tabIndex={showBackToTop ? undefined : -1}\n onClick={scrollToTop}\n />\n </div>\n )}\n </div>\n </ScrollableListContext.Provider>\n );\n}\n\nconst ScrollableListForwardRef = forwardRef(ScrollableListRoot);\nScrollableListForwardRef.displayName = \"ScrollableList\";\n\nexport interface ScrollableListSectionProps extends HTMLAttributes<HTMLElement> {\n /**\n * Header for the section. Rendered in normal flow (it scrolls and dissolves\n * into the top fade with its rows); while the section spans the top edge the\n * root floats a crisp copy of it above the fade, displaced by the next\n * section's header on hand-off. Omit for an unheadered group.\n */\n header?: ReactNode;\n children?: ReactNode;\n}\n\n/**\n * A group of rows under a section header. IMPORTANT: when a header is present\n * it must be the section's first child (the root reads it for the floating\n * pinned copy) — this component guarantees that ordering.\n */\nconst ScrollableListSection = forwardRef<HTMLElement, ScrollableListSectionProps>(\n function ScrollableListSection({ header, children, className, ...rest }, ref) {\n const ctx = useContext(ScrollableListContext);\n const labelId = useId();\n const elementRef = useRef<HTMLElement | null>(null);\n\n // Upsert into the root registry every render so the floating copy always\n // shows the latest header content; remove on unmount.\n useEffect(() => {\n ctx?.updateSection(labelId, {\n element: elementRef.current,\n header,\n hasHeader: header != null,\n });\n });\n useEffect(() => {\n return () => ctx?.removeSection(labelId);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <section\n ref={(node) => {\n elementRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLElement | null>).current = node;\n }}\n className={[styles.section, className].filter(Boolean).join(\" \")}\n aria-labelledby={header ? labelId : undefined}\n {...rest}\n >\n {header != null && (\n <div id={labelId} className={styles.sectionHeader}>\n {header}\n </div>\n )}\n {children}\n </section>\n );\n },\n);\n\n/**\n * Compound export: `ScrollableList` is the forwardRef root with a `.Section`\n * member. Built via `Object.assign` so the static is present at the value's\n * type (a plain cast would assert a member that isn't attached yet).\n */\nexport const ScrollableList = Object.assign(ScrollableListForwardRef, {\n Section: ScrollableListSection,\n});\n\nexport { ScrollableListSection };\n","import * as S from \"@radix-ui/react-slider\";\nimport { forwardRef, type ComponentPropsWithoutRef } from \"react\";\nimport styles from \"./Slider.module.css\";\n\nexport interface SliderProps extends ComponentPropsWithoutRef<typeof S.Root> {\n /** Optional label rendered above the track. */\n label?: string;\n /** Optional value label rendered next to the label. */\n formatValue?: (value: number) => string;\n /** Show numeric value badge on the thumb. */\n showValueOnThumb?: boolean;\n}\n\nexport const Slider = forwardRef<HTMLSpanElement, SliderProps>(function Slider(\n { label, formatValue, showValueOnThumb, className, value, defaultValue, ...rest },\n ref,\n) {\n const v = (value ?? defaultValue ?? [0]) as number[];\n const display = formatValue ? v.map(formatValue).join(\" – \") : v.join(\" – \");\n\n return (\n <div className={[styles.wrapper, className].filter(Boolean).join(\" \")}>\n {label || formatValue ? (\n <div className={styles.header}>\n {label ? <span className={styles.label}>{label}</span> : <span />}\n <span className={styles.value}>{display}</span>\n </div>\n ) : null}\n <S.Root\n ref={ref}\n className={styles.root}\n value={value}\n defaultValue={defaultValue}\n {...rest}\n >\n <S.Track className={styles.track}>\n <S.Range className={styles.range} />\n </S.Track>\n {v.map((val, i) => (\n <S.Thumb key={i} className={styles.thumb} aria-label={label ?? \"Value\"}>\n {showValueOnThumb ? (\n <span className={styles.thumbValue}>{formatValue ? formatValue(val) : val}</span>\n ) : null}\n </S.Thumb>\n ))}\n </S.Root>\n </div>\n );\n});\n","import * as AD from \"@radix-ui/react-alert-dialog\";\nimport { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from \"react\";\nimport styles from \"./AlertDialog.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport const AlertDialog = AD.Root;\nexport const AlertDialogTrigger = AD.Trigger;\nexport const AlertDialogAction = AD.Action;\nexport const AlertDialogCancel = AD.Cancel;\n\nexport type AlertDialogTone = \"default\" | \"danger\";\n\nexport interface AlertDialogContentProps extends Omit<\n ComponentPropsWithoutRef<typeof AD.Content>,\n \"title\"\n> {\n title: ReactNode | RichStr;\n description?: ReactNode | RichStr;\n tone?: AlertDialogTone;\n}\n\nexport const AlertDialogContent = forwardRef<HTMLDivElement, AlertDialogContentProps>(\n function AlertDialogContent(\n { title, description, tone = \"default\", className, children, ...rest },\n ref,\n ) {\n return (\n <AD.Portal>\n <AD.Overlay className={styles.overlay} />\n <AD.Content\n ref={ref}\n className={[styles.content, styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <div className={styles.header}>\n {tone === \"danger\" ? (\n <span className={styles.toneIcon} aria-hidden=\"true\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\" />\n <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\" />\n <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\" />\n </svg>\n </span>\n ) : null}\n <div>\n <AD.Title className={styles.title}>{resolveNode(title)}</AD.Title>\n {description ? (\n <AD.Description className={styles.description}>\n {resolveNode(description)}\n </AD.Description>\n ) : null}\n </div>\n </div>\n {children}\n </AD.Content>\n </AD.Portal>\n );\n },\n);\n\nexport const AlertDialogFooter = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function AlertDialogFooter({ className, ...rest }, ref) {\n return (\n <div ref={ref} className={[styles.footer, className].filter(Boolean).join(\" \")} {...rest} />\n );\n },\n);\n","import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type ReactNode,\n} from \"react\";\n\nexport type Theme = \"light\" | \"dark\";\nexport type ThemeMode = Theme | \"system\";\n\nexport interface ThemeContextValue {\n /** Resolved theme actually applied to the document. Always `\"light\"` or `\"dark\"`. */\n theme: Theme;\n /** User-selected mode. `\"system\"` defers to `prefers-color-scheme`. */\n mode: ThemeMode;\n setMode: (mode: ThemeMode) => void;\n toggle: () => void;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n /** Initial mode if no stored value exists. Default: `\"system\"`. */\n defaultMode?: ThemeMode;\n /** Where to write the data attribute. Default: `document.documentElement` (`<html>`). */\n attribute?: \"data-theme\" | \"class\";\n /** localStorage key for persistence. Set to `null` to disable. Default: `\"sds-theme\"`. */\n storageKey?: string | null;\n /** Disable transitions during theme switch to avoid flicker. Default: true. */\n disableTransitionOnChange?: boolean;\n children: ReactNode;\n}\n\nfunction getSystemTheme(): Theme {\n if (typeof window === \"undefined\") return \"light\";\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n}\n\nfunction resolve(mode: ThemeMode): Theme {\n return mode === \"system\" ? getSystemTheme() : mode;\n}\n\nfunction applyTheme(\n theme: Theme,\n attribute: \"data-theme\" | \"class\",\n disableTransitions: boolean,\n) {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n let cleanup: (() => void) | null = null;\n if (disableTransitions) {\n const style = document.createElement(\"style\");\n style.appendChild(\n document.createTextNode(\n \"*,*::before,*::after{transition:none!important;animation-duration:0s!important}\",\n ),\n );\n document.head.appendChild(style);\n // Force reflow so the disable lands before attribute mutation.\n void root.offsetHeight;\n cleanup = () => {\n // Re-enable transitions next frame.\n requestAnimationFrame(() => {\n style.remove();\n });\n };\n }\n if (attribute === \"data-theme\") {\n root.setAttribute(\"data-theme\", theme);\n } else {\n root.classList.remove(\"light\", \"dark\");\n root.classList.add(theme);\n }\n cleanup?.();\n}\n\nexport function ThemeProvider({\n defaultMode = \"system\",\n attribute = \"data-theme\",\n storageKey = \"sds-theme\",\n disableTransitionOnChange = true,\n children,\n}: ThemeProviderProps) {\n const [mode, setModeState] = useState<ThemeMode>(() => {\n if (typeof window === \"undefined\" || !storageKey) return defaultMode;\n const stored = window.localStorage.getItem(storageKey);\n if (stored === \"light\" || stored === \"dark\" || stored === \"system\") return stored;\n return defaultMode;\n });\n\n const [theme, setTheme] = useState<Theme>(() => resolve(defaultMode));\n\n // Apply theme on every mode change.\n useEffect(() => {\n const next = resolve(mode);\n setTheme(next);\n applyTheme(next, attribute, disableTransitionOnChange);\n if (storageKey && typeof window !== \"undefined\") {\n window.localStorage.setItem(storageKey, mode);\n }\n }, [mode, attribute, disableTransitionOnChange, storageKey]);\n\n // Listen to system preference when mode is \"system\".\n useEffect(() => {\n if (mode !== \"system\" || typeof window === \"undefined\") return;\n const mql = window.matchMedia(\"(prefers-color-scheme: dark)\");\n const onChange = () => {\n const next = mql.matches ? \"dark\" : \"light\";\n setTheme(next);\n applyTheme(next, attribute, disableTransitionOnChange);\n };\n mql.addEventListener(\"change\", onChange);\n return () => mql.removeEventListener(\"change\", onChange);\n }, [mode, attribute, disableTransitionOnChange]);\n\n const setMode = useCallback((next: ThemeMode) => {\n setModeState(next);\n }, []);\n\n const toggle = useCallback(() => {\n setModeState((prev) => {\n const current = resolve(prev);\n return current === \"dark\" ? \"light\" : \"dark\";\n });\n }, []);\n\n const value = useMemo<ThemeContextValue>(\n () => ({ theme, mode, setMode, toggle }),\n [theme, mode, setMode, toggle],\n );\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme(): ThemeContextValue {\n const ctx = useContext(ThemeContext);\n if (!ctx) {\n throw new Error(\"useTheme() must be used inside <ThemeProvider>.\");\n }\n return ctx;\n}\n","import * as RT from \"@radix-ui/react-tabs\";\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type MutableRefObject,\n type ReactNode,\n} from \"react\";\nimport styles from \"./Tabs.module.css\";\n\nexport type TabsVariant = \"underline\" | \"segmented\" | \"pill\";\n\ninterface TabsCtx {\n value: string | undefined;\n groupId: string;\n variant: TabsVariant;\n /** Register/unregister a trigger's DOM node so the list can measure it. */\n registerTrigger: (value: string, node: HTMLButtonElement | null) => void;\n}\n\nconst TabsContext = createContext<TabsCtx | null>(null);\n\nexport interface TabsProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n variant?: TabsVariant;\n children?: ReactNode;\n className?: string;\n}\n\nexport function Tabs({\n value,\n defaultValue,\n onValueChange,\n variant = \"underline\",\n children,\n className,\n}: TabsProps) {\n const [internal, setInternal] = useState(defaultValue);\n const groupId = useId();\n const current = value ?? internal;\n\n // Map of tab value -> trigger node, shared with the list for measurement.\n const triggersRef = useRef(new Map<string, HTMLButtonElement>());\n const registerTrigger = useCallback((v: string, node: HTMLButtonElement | null) => {\n if (node) triggersRef.current.set(v, node);\n else triggersRef.current.delete(v);\n }, []);\n\n return (\n <TabsContext.Provider value={{ value: current, groupId, variant, registerTrigger }}>\n <TriggersRefContext.Provider value={triggersRef}>\n <RT.Root\n value={value}\n defaultValue={defaultValue}\n onValueChange={(v) => {\n if (value === undefined) setInternal(v);\n onValueChange?.(v);\n }}\n className={[styles.root, styles[`v-${variant}`], className].filter(Boolean).join(\" \")}\n >\n {children}\n </RT.Root>\n </TriggersRefContext.Provider>\n </TabsContext.Provider>\n );\n}\n\nconst TriggersRefContext = createContext<MutableRefObject<\n Map<string, HTMLButtonElement>\n> | null>(null);\n\nexport interface TabsListProps {\n children: ReactNode;\n ariaLabel?: string;\n}\n\nexport function TabsList({ children, ariaLabel }: TabsListProps) {\n const ctx = useContext(TabsContext);\n const triggersRef = useContext(TriggersRefContext);\n if (!ctx || !triggersRef) throw new Error(\"TabsList must be inside <Tabs>\");\n\n const listRef = useRef<HTMLDivElement>(null);\n const [indicator, setIndicator] = useState<{ left: number; width: number; ready: boolean }>({\n left: 0,\n width: 0,\n ready: false,\n });\n\n // Measure the active trigger relative to the list, in a layout effect so the\n // indicator never paints at a stale position.\n const measure = useCallback(() => {\n const list = listRef.current;\n if (!list || ctx.value === undefined) {\n setIndicator((prev) => (prev.ready ? { ...prev, ready: false } : prev));\n return;\n }\n const node = triggersRef.current.get(ctx.value);\n if (!node) {\n setIndicator((prev) => (prev.ready ? { ...prev, ready: false } : prev));\n return;\n }\n const listBox = list.getBoundingClientRect();\n const box = node.getBoundingClientRect();\n const left = box.left - listBox.left;\n // Bail out when nothing moved so observer fires can't cause render churn.\n setIndicator((prev) =>\n prev.ready && prev.left === left && prev.width === box.width\n ? prev\n : { left, width: box.width, ready: true },\n );\n }, [ctx.value, triggersRef]);\n\n useLayoutEffect(() => {\n measure();\n }, [measure]);\n\n // Keep the indicator correct on resize / content reflow.\n useEffect(() => {\n const list = listRef.current;\n if (!list || typeof ResizeObserver === \"undefined\") return;\n const ro = new ResizeObserver(() => measure());\n ro.observe(list);\n for (const node of triggersRef.current.values()) ro.observe(node);\n window.addEventListener(\"resize\", measure);\n return () => {\n ro.disconnect();\n window.removeEventListener(\"resize\", measure);\n };\n }, [measure, triggersRef]);\n\n return (\n <RT.List\n ref={listRef}\n aria-label={ariaLabel}\n className={[styles.list, styles[`list-${ctx.variant}`]].join(\" \")}\n >\n <span\n aria-hidden=\"true\"\n data-active={indicator.ready || undefined}\n className={[styles.indicator, styles[`indicator-${ctx.variant}`]].join(\" \")}\n style={{\n transform: `translateX(${indicator.left}px)`,\n width: indicator.width,\n }}\n />\n {children}\n </RT.List>\n );\n}\n\nexport interface TabsTriggerProps {\n value: string;\n children: ReactNode;\n disabled?: boolean;\n}\n\nexport const TabsTrigger = forwardRef<HTMLButtonElement, TabsTriggerProps>(function TabsTrigger(\n { value, children, disabled },\n ref,\n) {\n const ctx = useContext(TabsContext);\n if (!ctx) throw new Error(\"TabsTrigger must be inside <Tabs>\");\n\n const setRef = useCallback(\n (node: HTMLButtonElement | null) => {\n ctx.registerTrigger(value, node);\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [ctx, value, ref],\n );\n\n return (\n <RT.Trigger\n ref={setRef}\n value={value}\n disabled={disabled}\n className={[styles.trigger, styles[`trigger-${ctx.variant}`]].join(\" \")}\n >\n <span className={styles.label}>{children}</span>\n </RT.Trigger>\n );\n});\n\nexport const TabsContent = RT.Content;\n","import { forwardRef, type HTMLAttributes, type ReactNode, type TableHTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from \"react\";\nimport styles from \"./Table.module.css\";\n\nexport interface TableProps extends TableHTMLAttributes<HTMLTableElement> {\n stickyHeader?: boolean;\n caption?: ReactNode;\n}\n\nexport const Table = forwardRef<HTMLTableElement, TableProps>(function Table(\n { stickyHeader, caption, className, children, ...rest },\n ref,\n) {\n return (\n <table\n ref={ref}\n className={[styles.table, stickyHeader ? styles.sticky : null, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {caption ? <caption className={styles.caption}>{caption}</caption> : null}\n {children}\n </table>\n );\n});\n\nexport interface ThProps extends ThHTMLAttributes<HTMLTableCellElement> {\n numeric?: boolean;\n}\n\nexport const Th = forwardRef<HTMLTableCellElement, ThProps>(function Th(\n { numeric, className, scope, ...rest },\n ref,\n) {\n return (\n <th\n ref={ref}\n scope={scope ?? \"col\"}\n className={[styles.th, numeric ? styles.numeric : null, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport interface TdProps extends TdHTMLAttributes<HTMLTableCellElement> {\n numeric?: boolean;\n}\n\nexport const Td = forwardRef<HTMLTableCellElement, TdProps>(function Td(\n { numeric, className, ...rest },\n ref,\n) {\n return (\n <td\n ref={ref}\n className={[styles.td, numeric ? styles.numeric : null, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport const Thead = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function Thead(props, ref) {\n return <thead ref={ref} {...props} />;\n});\n\nexport const Tbody = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function Tbody(props, ref) {\n return <tbody ref={ref} {...props} />;\n});\n\nexport const Tr = forwardRef<HTMLTableRowElement, HTMLAttributes<HTMLTableRowElement>>(function Tr(props, ref) {\n return <tr ref={ref} {...props} />;\n});\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./Avatar.module.css\";\n\nexport type AvatarSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\nexport type AvatarTone = \"user\" | \"brand\" | \"success\" | \"warning\" | \"muted\";\nexport type AvatarStatus = \"online\" | \"away\" | \"off\";\n\nconst STATUS_LABELS: Record<AvatarStatus, string> = {\n online: \"Online\",\n away: \"Away\",\n off: \"Offline\",\n};\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n size?: AvatarSize;\n tone?: AvatarTone;\n status?: AvatarStatus;\n src?: string;\n alt?: string;\n children?: ReactNode;\n}\n\n/**\n * When `src` is omitted and `children` (typically initials) is rendered, the\n * wrapping span defaults to `role=\"img\"` and uses `aria-label` (or the children\n * value as fallback) so screen readers announce a meaningful identity. Callers\n * should pass `aria-label` with the full name where possible.\n */\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(\n { size = \"md\", tone = \"user\", status, src, alt, children, className, role, ...rest },\n ref,\n) {\n const isInitials = !src && children != null;\n const ariaLabel = (rest as { \"aria-label\"?: string })[\"aria-label\"];\n const inferredLabel = isInitials\n ? ariaLabel ?? (typeof children === \"string\" ? children : undefined)\n : undefined;\n const resolvedRole = role ?? (isInitials ? \"img\" : undefined);\n\n return (\n <span\n ref={ref}\n role={resolvedRole}\n aria-label={isInitials ? inferredLabel : ariaLabel}\n className={[styles.av, styles[`size-${size}`], styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {src ? <img src={src} alt={alt ?? \"\"} className={styles.img} /> : children}\n {status ? (\n <>\n <span className={[styles.status, styles[`status-${status}`]].join(\" \")} aria-hidden=\"true\" />\n <span className={styles.visuallyHidden}>{STATUS_LABELS[status]}</span>\n </>\n ) : null}\n </span>\n );\n});\n\nexport interface AvatarStackProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport const AvatarStack = forwardRef<HTMLDivElement, AvatarStackProps>(function AvatarStack(\n { children, className, ...rest },\n ref,\n) {\n return (\n <div ref={ref} className={[styles.stack, className].filter(Boolean).join(\" \")} {...rest}>\n {children}\n </div>\n );\n});\n\nexport interface AvatarChipProps extends HTMLAttributes<HTMLSpanElement> {\n initials?: ReactNode;\n src?: string;\n alt?: string;\n children: ReactNode;\n}\n\nexport const AvatarChip = forwardRef<HTMLSpanElement, AvatarChipProps>(function AvatarChip(\n { initials, src, alt, children, className, ...rest },\n ref,\n) {\n return (\n <span ref={ref} className={[styles.chip, className].filter(Boolean).join(\" \")} {...rest}>\n <Avatar size=\"xs\" src={src} alt={alt}>\n {initials}\n </Avatar>\n {children}\n </span>\n );\n});\n","import { createElement, forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./EmptyState.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n illustration?: ReactNode;\n title: ReactNode | RichStr;\n /** Heading level for the title; defaults to 3. Set per page hierarchy. */\n titleLevel?: HeadingLevel;\n description?: ReactNode | RichStr;\n actions?: ReactNode;\n}\n\nexport const EmptyState = forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState(\n { illustration, title, titleLevel = 3, description, actions, className, ...rest },\n ref,\n) {\n return (\n <div ref={ref} className={[styles.stage, className].filter(Boolean).join(\" \")} {...rest}>\n {illustration ? (\n <div className={styles.illu} aria-hidden=\"true\">\n {illustration}\n </div>\n ) : null}\n {createElement(`h${titleLevel}`, { className: styles.title }, resolveNode(title))}\n {description ? <div className={styles.desc}>{resolveNode(description)}</div> : null}\n {actions ? <div className={styles.actions}>{actions}</div> : null}\n </div>\n );\n});\n","import {\n createElement,\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from \"react\";\nimport styles from \"./Card.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\nimport { resolveSpacing, type Spacing } from \"../spacing/padding\";\n\nexport type CardSurface = \"panel\" | \"inset\" | \"elevated\";\n/** Legacy class-backed padding steps (asymmetric vertical/horizontal px). */\nexport type CardPadding = \"none\" | \"sm\" | \"md\" | \"lg\";\nconst LEGACY_PADDING = new Set<string>([\"none\", \"sm\", \"md\", \"lg\"]);\nexport type CardBorder = \"none\" | \"dashed\" | \"solid\";\nexport type CardBorderColor = \"default\" | \"info\" | \"success\" | \"warning\" | \"error\";\nexport type CardRounding = \"xs\" | \"sm\" | \"md\" | \"lg\";\nexport type CardBackground = \"none\" | \"light\" | \"heavy\";\n\ninterface CardBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n surface?: CardSurface;\n /**\n * Inner padding. The legacy keywords (`none`/`sm`/`md`/`lg`) keep their\n * established asymmetric spacing. Any other {@link PaddingVariant} keyword\n * (`xs`/`xl`/`2xl`/`fit`), a number (px), or a CSS length string applies\n * symmetric padding via inline style. Default: `\"md\"`.\n */\n padding?: CardPadding | Spacing;\n interactive?: boolean;\n asChild?: boolean;\n /** Border style override. Default: the surface's own border (solid). */\n border?: CardBorder;\n /** Border color from the status palette. No effect with `border=\"none\"`. */\n borderColor?: CardBorderColor;\n /** Corner rounding override. Default: the card's standard 12px radius. */\n rounding?: CardRounding;\n /**\n * Background fill override (Opal parity). `light` and `heavy` swap the card's\n * fill to a tinted surface; `none` makes it transparent. Default: undefined,\n * which preserves the surface's own background.\n */\n background?: CardBackground;\n}\n\ninterface CardPlainProps extends CardBaseProps {\n /** Plain card (default): children render inside a single styled div. */\n expandable?: false;\n}\n\ninterface CardExpandableProps extends CardBaseProps {\n /**\n * Expandable mode: `children` is the always-visible header,\n * `expandedContent` animates open and closed below it. Fully controlled —\n * the caller owns `expanded` and wires its own toggle.\n */\n expandable: true;\n /** Controlled expanded state. Default: false. */\n expanded?: boolean;\n /** Body rendered below the header, animating with `expanded`. */\n expandedContent?: ReactNode;\n /** Body height: `\"md\"` caps at 20rem with scroll, `\"fit\"` is natural height. Default: `\"md\"`. */\n expandableContentHeight?: \"md\" | \"fit\";\n}\n\nexport type CardProps = CardPlainProps | CardExpandableProps;\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(function Card(props, ref) {\n const {\n surface = \"panel\",\n padding = \"md\",\n interactive,\n border,\n borderColor,\n rounding,\n background,\n className,\n children,\n onClick,\n onKeyDown,\n role,\n tabIndex,\n } = props;\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (!interactive || !onClick || event.defaultPrevented) return;\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n onClick(event as unknown as Parameters<NonNullable<typeof onClick>>[0]);\n }\n };\n\n const interactiveProps = interactive\n ? {\n role: role ?? \"button\",\n tabIndex: tabIndex ?? 0,\n onKeyDown: handleKeyDown,\n }\n : { role, tabIndex, onKeyDown };\n\n // Legacy keywords keep their class-backed asymmetric padding; new variants /\n // numbers / arbitrary lengths apply symmetric padding via inline style on top\n // of a zero-padding base class.\n const isLegacyPadding = typeof padding === \"string\" && LEGACY_PADDING.has(padding);\n const padClass = isLegacyPadding ? styles[`pad-${padding}`] : styles[\"pad-none\"];\n const padStyle: CSSProperties | undefined = isLegacyPadding\n ? undefined\n : { padding: resolveSpacing(padding as Spacing) };\n\n const skinClasses = [\n styles.card,\n styles[`surface-${surface}`],\n padClass,\n interactive ? styles.interactive : null,\n border ? styles[`border-${border}`] : null,\n borderColor ? styles[`bc-${borderColor}`] : null,\n rounding ? styles[`round-${rounding}`] : null,\n background ? styles[`bg-${background}`] : null,\n ];\n\n if (!props.expandable) {\n const {\n surface: _s,\n padding: _p,\n interactive: _i,\n asChild: _a,\n border: _b,\n borderColor: _bc,\n rounding: _r,\n background: _bg,\n expandable: _e,\n className: _c,\n children: _ch,\n onClick: _oc,\n onKeyDown: _ok,\n role: _ro,\n tabIndex: _ti,\n style: styleProp,\n ...rest\n } = props;\n return (\n <div\n ref={ref}\n className={[...skinClasses, className].filter(Boolean).join(\" \")}\n style={padStyle ? { ...padStyle, ...styleProp } : styleProp}\n onClick={onClick}\n {...interactiveProps}\n {...rest}\n >\n {children}\n </div>\n );\n }\n\n // Expandable mode — header keeps the card skin; the body joins it seamlessly\n // (top rounding on header, bottom rounding on body) while expanded.\n const { expanded = false, expandedContent, expandableContentHeight = \"md\" } = props;\n const showContent = expanded && expandedContent !== undefined;\n\n return (\n <div ref={ref} className={[styles.expandableRoot, className].filter(Boolean).join(\" \")}>\n <div\n className={[\n ...skinClasses,\n styles.expandableHeader,\n showContent ? styles[`roundTop-${rounding ?? \"md\"}`] : null,\n ]\n .filter(Boolean)\n .join(\" \")}\n style={padStyle}\n onClick={onClick}\n {...interactiveProps}\n >\n {children}\n </div>\n {expandedContent !== undefined && (\n <div className={styles.expandWrapper} data-expanded={showContent ? \"true\" : \"false\"}>\n <div className={styles.expandInner}>\n <div\n className={[\n styles.expandBody,\n styles[`roundBottom-${rounding ?? \"md\"}`],\n border ? styles[`border-${border}`] : styles[\"border-solid\"],\n borderColor ? styles[`bc-${borderColor}`] : null,\n expandableContentHeight === \"md\" ? styles.expandBodyCapped : null,\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {expandedContent}\n </div>\n </div>\n </div>\n )}\n </div>\n );\n});\n\nexport type CardHeaderTitleLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n title?: ReactNode | RichStr;\n titleLevel?: CardHeaderTitleLevel;\n description?: ReactNode | RichStr;\n actions?: ReactNode;\n}\n\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(function CardHeader(\n { title, titleLevel = 3, description, actions, children, className, ...rest },\n ref,\n) {\n return (\n <div ref={ref} className={[styles.header, className].filter(Boolean).join(\" \")} {...rest}>\n <div className={styles.headerText}>\n {title\n ? createElement(`h${titleLevel}`, { className: styles.title }, resolveNode(title))\n : null}\n {description ? <div className={styles.description}>{resolveNode(description)}</div> : null}\n {children}\n </div>\n {actions ? <div className={styles.headerActions}>{actions}</div> : null}\n </div>\n );\n});\n\nexport const CardBody = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n function CardBody({ className, ...rest }, ref) {\n return (\n <div ref={ref} className={[styles.body, className].filter(Boolean).join(\" \")} {...rest} />\n );\n },\n);\n\nexport const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n function CardFooter({ className, ...rest }, ref) {\n return (\n <div ref={ref} className={[styles.footer, className].filter(Boolean).join(\" \")} {...rest} />\n );\n },\n);\n\nexport interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n /** Heading level rendered. Default: 3. */\n level?: CardHeaderTitleLevel;\n}\n\n/**\n * Standalone card title. Use inside `CardHeader` (or anywhere a card heading is\n * needed) when you need to forward `className`/`ref` — the `CardHeader title=`\n * prop does not. Renders `h{level}` carrying the shared `.title` token style.\n */\nexport const CardTitle = forwardRef<HTMLHeadingElement, CardTitleProps>(function CardTitle(\n { level = 3, className, children, ...rest },\n ref,\n) {\n return createElement(\n `h${level}`,\n { ref, className: [styles.title, className].filter(Boolean).join(\" \"), ...rest },\n children,\n );\n});\n\n/**\n * Standalone card description (className/ref-forwarding counterpart to the\n * `CardHeader description=` prop).\n */\nexport const CardDescription = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(function CardDescription({ className, ...rest }, ref) {\n return (\n <p ref={ref} className={[styles.description, className].filter(Boolean).join(\" \")} {...rest} />\n );\n});\n","/**\n * SearchInput\n *\n * Pre-styled Input with a leading search icon, optional trailing keyboard\n * shortcut, and a clearable X when the value is non-empty. While `loading`,\n * the search icon is replaced with a spinner.\n *\n * Mirrors the base Input prop surface so consumers can swap them as needed.\n */\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { SvgCancel, SvgLoader, SvgSearch } from \"../../icons\";\nimport styles from \"./SearchInput.module.css\";\n\ntype BaseProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"size\" | \"type\" | \"value\" | \"defaultValue\" | \"onChange\"\n>;\n\nexport interface SearchInputProps extends BaseProps {\n value?: string;\n defaultValue?: string;\n onChange?: (next: string) => void;\n onClear?: () => void;\n /** Trailing affordance, typically a `KeyboardShortcut`. */\n shortcut?: ReactNode;\n /** Replace the leading search icon with a spinner. */\n loading?: boolean;\n label?: string;\n hint?: string;\n error?: string;\n clearLabel?: string;\n /**\n * Optional debounced echo of the typed value. Fires `onDebouncedChange`\n * after the user has paused typing for `debounceMs`. `onChange` still\n * fires on every keystroke. Default: 0 (off).\n */\n debounceMs?: number;\n onDebouncedChange?: (next: string) => void;\n}\n\n/**\n * Internal debounce helper. Not exported. Used by SearchInput to feed the\n * optional `onDebouncedChange` callback.\n */\nfunction useDebouncedValue<T>(value: T, delayMs: number): T {\n const [debounced, setDebounced] = useState(value);\n useEffect(() => {\n if (delayMs <= 0) {\n setDebounced(value);\n return;\n }\n const t = setTimeout(() => setDebounced(value), delayMs);\n return () => clearTimeout(t);\n }, [value, delayMs]);\n return debounced;\n}\n\nexport const SearchInput = forwardRef<HTMLInputElement, SearchInputProps>(function SearchInput(\n {\n value,\n defaultValue,\n onChange,\n onClear,\n shortcut,\n loading,\n label,\n hint,\n error,\n clearLabel = \"Clear search\",\n debounceMs = 0,\n onDebouncedChange,\n id,\n className,\n placeholder = \"Search…\",\n required,\n disabled,\n ...rest\n },\n ref,\n) {\n const autoId = useId();\n const inputId = id ?? autoId;\n const hintId = `${inputId}-hint`;\n const errorId = `${inputId}-error`;\n const describedBy =\n [error ? errorId : null, hint && !error ? hintId : null].filter(Boolean).join(\" \") || undefined;\n\n const innerRef = useRef<HTMLInputElement | null>(null);\n const setRefs = useCallback(\n (node: HTMLInputElement | null) => {\n innerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as { current: HTMLInputElement | null }).current = node;\n },\n [ref],\n );\n\n const controlled = value !== undefined;\n const [internal, setInternal] = useState<string>(defaultValue ?? \"\");\n const current = controlled ? value ?? \"\" : internal;\n\n const debounced = useDebouncedValue(current, debounceMs);\n useEffect(() => {\n if (debounceMs > 0 && onDebouncedChange) onDebouncedChange(debounced);\n // We intentionally only fire when the debounced echo flips.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [debounced]);\n\n const handleChange = (next: string) => {\n if (!controlled) setInternal(next);\n onChange?.(next);\n };\n\n const clear = () => {\n if (!controlled) setInternal(\"\");\n onChange?.(\"\");\n onClear?.();\n innerRef.current?.focus();\n };\n\n const hasValue = current.length > 0;\n\n return (\n <div className={[styles.wrapper, className].filter(Boolean).join(\" \")}>\n {label ? (\n <label htmlFor={inputId} className={styles.label}>\n {label}\n </label>\n ) : null}\n <div className={[styles.field, error ? styles[\"field-error\"] : null].filter(Boolean).join(\" \")}>\n <span className={styles.icon} aria-hidden=\"true\">\n {loading ? (\n <SvgLoader className={styles.spin} width={16} height={16} />\n ) : (\n <SvgSearch width={16} height={16} />\n )}\n </span>\n <input\n ref={setRefs}\n id={inputId}\n type=\"search\"\n role=\"searchbox\"\n autoComplete=\"off\"\n className={styles.input}\n value={current}\n placeholder={placeholder}\n disabled={disabled}\n required={required}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy}\n onChange={(e) => handleChange(e.target.value)}\n {...rest}\n />\n {hasValue ? (\n <button\n type=\"button\"\n className={styles.clear}\n onClick={clear}\n aria-label={clearLabel}\n disabled={disabled}\n >\n <SvgCancel width={14} height={14} aria-hidden=\"true\" />\n </button>\n ) : shortcut ? (\n <span className={styles.trailing}>{shortcut}</span>\n ) : null}\n </div>\n {error ? (\n <span id={errorId} className={styles.error}>\n {error}\n </span>\n ) : hint ? (\n <span id={hintId} className={styles.hint}>\n {hint}\n </span>\n ) : null}\n </div>\n );\n});\n","import { useState, type ReactNode } from \"react\";\nimport styles from \"./DetailSection.module.css\";\nimport { Button } from \"../Button\";\nimport { SearchInput } from \"../SearchInput\";\nimport {\n SvgArrowRight as ArrowRight,\n SvgCheck as Check,\n SvgChevronRight as ChevronRight,\n SvgCopy as Copy,\n} from \"../../icons\";\n\n/**\n * Detail-section primitives — the shared shell for tabbed detail pages\n * (meeting detail, project detail). Presentational only: each page feeds its\n * own data into the same panels / rows / cards so the surfaces stay identical.\n *\n * A list tab is a fill panel with a pinned toolbar over an internally\n * scrolling list:\n *\n * ```tsx\n * <DetailPanel fill>\n * <DetailToolbar value={q} onChange={setQ} placeholder=\"Search…\">…actions…</DetailToolbar>\n * <DetailScrollRegion>\n * <DetailList>\n * {rows.map((r) => (\n * <DetailRow key={r.id} icon={<Icon />} onClick={() => open(r)}>…</DetailRow>\n * ))}\n * </DetailList>\n * </DetailScrollRegion>\n * </DetailPanel>\n * ```\n *\n * See **Guidelines / Scrollable list pages** (Shape B) for the page frame these\n * panels sit in.\n */\n\n/** Robust clipboard write with a legacy execCommand fallback (non-secure\n * contexts / older browsers). */\nasync function writeClipboard(text: string): Promise<void> {\n try {\n await navigator.clipboard.writeText(text);\n } catch {\n const ta = document.createElement(\"textarea\");\n ta.value = text;\n ta.style.position = \"fixed\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n try {\n document.execCommand(\"copy\");\n } catch {\n /* ignore */\n }\n ta.remove();\n }\n}\n\nconst cx = (...parts: Array<string | false | undefined>) => parts.filter(Boolean).join(\" \");\n\nexport interface CopyButtonProps {\n /** Returns the plain-text payload to copy (computed lazily on click). */\n getText: () => string;\n /** Used in the title/aria (\"Copy {label}\"). */\n label: string;\n /** Extra classes on the button root (e.g. a hover-reveal utility). */\n className?: string;\n}\n\n/**\n * Copy-to-clipboard button: a Copy glyph that flips to a Check for ~1.4s after\n * a successful copy. Visible by default; pass a className to control reveal\n * (OverviewCard reveals it on the card's hover).\n */\nexport function CopyButton({ getText, label, className }: CopyButtonProps) {\n const [done, setDone] = useState(false);\n return (\n <Button\n variant=\"tertiary\"\n size=\"sm\"\n iconOnly\n title={`Copy ${label}`}\n aria-label={`Copy ${label}`}\n className={className}\n onClick={async (e) => {\n e.stopPropagation();\n await writeClipboard(getText());\n setDone(true);\n setTimeout(() => setDone(false), 1400);\n }}\n iconLeft={done ? <Check width={16} height={16} /> : <Copy width={16} height={16} />}\n />\n );\n}\n\nexport interface DetailPanelProps {\n children: ReactNode;\n /** Fill a height-constrained flex parent so the list scrolls inside via\n * DetailScrollRegion while the toolbar stays pinned. Omit for normal flow. */\n fill?: boolean;\n className?: string;\n}\n\n/** Bordered card container for a tab section. */\nexport function DetailPanel({ children, fill = false, className }: DetailPanelProps) {\n return <div className={cx(styles.panel, fill && styles.panelFill, className)}>{children}</div>;\n}\n\n/** The scrolling body under a fixed toolbar — only meaningful inside a `fill`\n * panel. `data-scroll-region` lets a consumer centre an item inside it. */\nexport function DetailScrollRegion({ children }: { children: ReactNode }) {\n return (\n <div data-scroll-region className={styles.scrollRegion}>\n {children}\n </div>\n );\n}\n\nexport interface DetailToolbarProps {\n value: string;\n onChange: (v: string) => void;\n placeholder: string;\n ariaLabel?: string;\n clearLabel?: string;\n /** Right-aligned action slot (e.g. a Copy button, a Select, an export). */\n children?: ReactNode;\n}\n\n/** Search toolbar: a SearchInput on the left + an optional right action slot. */\nexport function DetailToolbar({ value, onChange, placeholder, ariaLabel, clearLabel, children }: DetailToolbarProps) {\n return (\n <div className={styles.toolbar}>\n <SearchInput\n value={value}\n onChange={onChange}\n onClear={() => onChange(\"\")}\n placeholder={placeholder}\n aria-label={ariaLabel ?? placeholder}\n {...(clearLabel ? { clearLabel } : {})}\n className={styles.toolbarSearch}\n />\n {children ? <div className={styles.toolbarActions}>{children}</div> : null}\n </div>\n );\n}\n\n/** Divided list wrapper for section rows. */\nexport function DetailList({ children }: { children: ReactNode }) {\n return <ul className={styles.list}>{children}</ul>;\n}\n\nexport interface DetailRowProps {\n icon?: ReactNode;\n children: ReactNode;\n onClick?: () => void;\n}\n\n/** A section row: leading icon + content + a reveal chevron on hover (when\n * clickable). The clickable hover affordance is a title underline. */\nexport function DetailRow({ icon, children, onClick }: DetailRowProps) {\n const clickable = !!onClick;\n return (\n <li className={cx(styles.row, clickable && styles.rowClickable)} onClick={onClick}>\n {icon ? <span className={styles.rowIcon}>{icon}</span> : null}\n <div className={styles.rowContent}>{children}</div>\n {clickable && <ChevronRight className={styles.rowChevron} />}\n </li>\n );\n}\n\n/** Centered italic empty message inside a panel. */\nexport function DetailEmptyRow({ children }: { children: ReactNode }) {\n return <p className={styles.emptyRow}>{children}</p>;\n}\n\nexport interface OverviewCardProps {\n icon: ReactNode;\n title: string;\n count?: number;\n children: ReactNode;\n onViewAll?: () => void;\n viewAllLabel?: string;\n /** When set, a hover-revealed copy button appears in the header. Returns the\n * section's plain-text representation. */\n copyText?: () => string;\n copyLabel?: string;\n}\n\n/** Overview dashboard card: icon + title + count header (with an optional\n * hover-revealed copy button), a body of jump rows, and an optional\n * full-width \"View all\" footer. */\nexport function OverviewCard({\n icon,\n title,\n count,\n children,\n onViewAll,\n viewAllLabel = \"View all\",\n copyText,\n copyLabel,\n}: OverviewCardProps) {\n return (\n <div className={styles.overviewCard}>\n <div className={styles.overviewHeader}>\n <span className={styles.overviewIcon}>{icon}</span>\n <h3 className={styles.overviewTitle}>\n {title}\n {typeof count === \"number\" && <span className={styles.overviewCount}>({count})</span>}\n </h3>\n {copyText && (\n <>\n <span className={styles.overviewSpacer} />\n <CopyButton getText={copyText} label={copyLabel ?? title} className={styles.overviewCopy} />\n </>\n )}\n </div>\n <div className={styles.overviewBody}>{children}</div>\n {onViewAll && (\n <button type=\"button\" onClick={onViewAll} className={styles.viewAll}>\n {viewAllLabel} <ArrowRight width={14} height={14} />\n </button>\n )}\n </div>\n );\n}\n\nexport interface OverviewBulletProps {\n children: ReactNode;\n onClick?: () => void;\n}\n\n/** A bullet jump-row inside an OverviewCard. */\nexport function OverviewBullet({ children, onClick }: OverviewBulletProps) {\n const clickable = !!onClick;\n return (\n <button\n type=\"button\"\n disabled={!clickable}\n onClick={onClick}\n className={cx(styles.bullet, clickable ? styles.bulletClickable : styles.bulletDisabled)}\n >\n <span aria-hidden className={styles.bulletDot} />\n <span className={styles.bulletText}>{children}</span>\n {clickable && <ChevronRight className={styles.bulletChevron} />}\n </button>\n );\n}\n","import {\n forwardRef,\n useId,\n type HTMLAttributes,\n type KeyboardEventHandler,\n type MouseEventHandler,\n type ReactNode,\n} from \"react\";\nimport styles from \"./List.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport interface ListProps extends HTMLAttributes<HTMLUListElement> {\n /** Hairline dividers between items. Default true. */\n dividers?: boolean;\n /** Wrap in a bordered panel surface. Default true. */\n bordered?: boolean;\n /** Compact row padding. */\n density?: \"compact\" | \"cozy\" | \"comfortable\";\n}\n\nexport const List = forwardRef<HTMLUListElement, ListProps>(function List(\n { dividers = true, bordered = true, density = \"cozy\", className, children, ...rest },\n ref,\n) {\n return (\n <ul\n ref={ref}\n className={[\n styles.root,\n bordered ? styles.bordered : null,\n dividers ? styles.dividers : null,\n styles[`density-${density}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n >\n {children}\n </ul>\n );\n});\n\nexport interface ListItemProps extends Omit<HTMLAttributes<HTMLLIElement>, \"title\"> {\n /** Left slot — avatar, icon. */\n leading?: ReactNode;\n /** Right slot — meta, status, action. */\n trailing?: ReactNode;\n /** Primary text. */\n title?: ReactNode | RichStr;\n /** Secondary text under title. */\n description?: ReactNode | RichStr;\n /** Make the row clickable (renders role=button + keyboard handler). */\n interactive?: boolean;\n /** Selected/active styling. */\n active?: boolean;\n}\n\nexport const ListItem = forwardRef<HTMLLIElement, ListItemProps>(function ListItem(\n {\n leading,\n trailing,\n title,\n description,\n interactive,\n active,\n className,\n children,\n onClick,\n onKeyDown,\n role,\n tabIndex,\n \"aria-current\": ariaCurrent,\n \"aria-label\": ariaLabel,\n ...rest\n },\n ref,\n) {\n // The row stays a plain listitem so the <ul> keeps a valid list structure.\n // When interactive, an absolutely-positioned transparent <button> overlays the\n // row as a sibling (never an ancestor) of the trailing slot. This keeps any\n // actions consumers drop into `trailing` out of the button's subtree, so the\n // primary row action and those actions never nest. Native button gives Enter +\n // Space activation for free.\n const titleId = useId();\n\n if (interactive) {\n // Overlay button has no text child; label it from the visible title when\n // present, else fall back to a caller-provided aria-label.\n const labelProps = title\n ? { \"aria-labelledby\": titleId }\n : ariaLabel\n ? { \"aria-label\": ariaLabel }\n : {};\n return (\n <li\n ref={ref}\n className={[styles.item, styles.interactive, active ? styles.active : null, className]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n >\n <button\n type=\"button\"\n className={styles.overlay}\n // Handlers are typed against the <li> in ListItemProps; the overlay\n // button receives them instead. Same DOM events at runtime.\n onClick={onClick as MouseEventHandler<HTMLElement> as MouseEventHandler<HTMLButtonElement>}\n onKeyDown={onKeyDown as KeyboardEventHandler<HTMLElement> as KeyboardEventHandler<HTMLButtonElement>}\n tabIndex={tabIndex}\n aria-current={ariaCurrent}\n {...labelProps}\n />\n {leading ? <span className={styles.leading}>{leading}</span> : null}\n <div className={styles.body}>\n {title ? (\n <span id={titleId} className={styles.title}>\n {resolveNode(title)}\n </span>\n ) : null}\n {description ? (\n <span className={styles.description}>{resolveNode(description)}</span>\n ) : null}\n {children}\n </div>\n {trailing ? <span className={styles.trailing}>{trailing}</span> : null}\n </li>\n );\n }\n\n return (\n <li\n ref={ref}\n className={[styles.item, active ? styles.active : null, className].filter(Boolean).join(\" \")}\n onClick={onClick}\n onKeyDown={onKeyDown}\n role={role}\n tabIndex={tabIndex}\n aria-current={ariaCurrent}\n aria-label={ariaLabel}\n {...rest}\n >\n {leading ? <span className={styles.leading}>{leading}</span> : null}\n <div className={styles.body}>\n {title ? <span className={styles.title}>{resolveNode(title)}</span> : null}\n {description ? (\n <span className={styles.description}>{resolveNode(description)}</span>\n ) : null}\n {children}\n </div>\n {trailing ? <span className={styles.trailing}>{trailing}</span> : null}\n </li>\n );\n});\n","import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport styles from \"./Text.module.css\";\nimport { resolveNode, type RichStr } from \"./richstr\";\n\n/**\n * Named font presets. Each bundles family + size + weight + leading + a\n * default color via the global `.font-*` classes in\n * `src/tokens/colors_and_type.css`. The preset is the single source of truth;\n * this component only selects one.\n */\nexport type TextFont =\n | \"heading-h1\"\n | \"heading-h2\"\n | \"heading-h3\"\n | \"heading-h4\"\n | \"main-ui-body\"\n | \"main-ui-action\"\n | \"main-content\"\n | \"secondary-body\"\n | \"secondary-action\"\n | \"section-title\"\n | \"code\"\n | \"secondary-mono\";\n\n/**\n * Optional color override. When omitted, the font preset's own color applies.\n * `inherit` defers to the parent (for use inside Buttons, Banners, etc.).\n */\nexport type TextColor =\n | \"inherit\"\n | \"text-01\"\n | \"text-02\"\n | \"text-03\"\n | \"text-04\"\n | \"text-05\"\n | \"text-inverted-03\"\n | \"text-inverted-04\"\n | \"text-inverted-05\";\n\nexport type TextTag = \"span\" | \"p\" | \"li\" | \"h1\" | \"h2\" | \"h3\" | \"h4\";\n\nexport interface TextProps\n extends Omit<HTMLAttributes<HTMLElement>, \"children\" | \"color\"> {\n /** Font preset. Default: `\"main-ui-body\"`. */\n font?: TextFont;\n /** Color override. Default: the preset's own color. */\n color?: TextColor;\n /** HTML tag to render. Default: `\"span\"`. */\n as?: TextTag;\n /** Prevent text wrapping. */\n nowrap?: boolean;\n /** Truncate to N lines with ellipsis. `1` uses single-line truncation; `2+` uses line clamping. */\n maxLines?: number;\n /**\n * Content. A plain string renders verbatim; `markdown()` (a {@link RichStr})\n * renders inline markdown (bold, italic, code, links); any other\n * `ReactNode` (e.g. react-markdown element children) renders verbatim with\n * the preset's typography applied via the `.font-*` class.\n */\n children?: ReactNode | RichStr;\n}\n\nconst COLOR_CLASS: Record<TextColor, string> = {\n inherit: \"color-inherit\",\n \"text-01\": \"color-text-01\",\n \"text-02\": \"color-text-02\",\n \"text-03\": \"color-text-03\",\n \"text-04\": \"color-text-04\",\n \"text-05\": \"color-text-05\",\n \"text-inverted-03\": \"color-text-inverted-03\",\n \"text-inverted-04\": \"color-text-inverted-04\",\n \"text-inverted-05\": \"color-text-inverted-05\",\n};\n\n/**\n * Typography primitive. Renders one of the named font presets from the token\n * sheet, with optional color override, wrapping control, and line clamping.\n * Accepts `string`, `markdown(\"**bold**\")` ({@link RichStr}), or any\n * `ReactNode` children — strings/markdown keep their existing behavior; other\n * nodes render verbatim with the preset's typography applied.\n */\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n {\n font = \"main-ui-body\",\n color,\n as: Tag = \"span\",\n nowrap = false,\n maxLines,\n children,\n className,\n style,\n ...rest\n },\n ref,\n) {\n const classes = [\n styles.text,\n `font-${font}`,\n color ? styles[COLOR_CLASS[color]] : null,\n nowrap ? styles.nowrap : null,\n maxLines === 1 ? styles.truncate : null,\n maxLines !== undefined && maxLines > 1 ? styles.clamp : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n const mergedStyle: CSSProperties | undefined =\n maxLines !== undefined && maxLines > 1\n ? { ...style, [\"--text-max-lines\" as string]: maxLines }\n : style;\n\n return (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- ref covers the heterogeneous tag union\n <Tag ref={ref as any} className={classes} style={mergedStyle} {...rest}>\n {children !== undefined ? resolveNode(children) : null}\n </Tag>\n );\n});\n","import \"./interactive.css\";\nimport \"./stateful.css\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n// ---------------------------------------------------------------------------\n// Shared types\n// ---------------------------------------------------------------------------\n\nexport type InteractiveButtonType = \"submit\" | \"button\" | \"reset\";\nexport type InteractiveInteraction = \"rest\" | \"hover\" | \"active\";\n\n/**\n * Guards an onClick handler against React synthetic event bubbling from\n * portalled children (e.g. Radix dialog overlays). React bubbles synthetic\n * events through the fiber tree, not the DOM tree, so a click on a portalled\n * overlay can reach a parent's onClick even though the overlay is not a DOM\n * descendant. This checks the click target is inside the handler's element.\n */\nfunction guardPortalClick<E extends MouseEvent>(\n onClick: ((e: E) => void) | undefined,\n): ((e: E) => void) | undefined {\n if (!onClick) return undefined;\n return (e: E) => {\n if (\n e.currentTarget instanceof Node &&\n e.target instanceof Node &&\n e.currentTarget.contains(e.target)\n ) {\n onClick(e);\n }\n };\n}\n\ninterface InteractiveBaseProps extends HTMLAttributes<HTMLElement> {\n /**\n * JS-controllable interaction override: `\"hover\"` and `\"active\"` force the\n * corresponding visual state without pointer events (e.g. while a menu\n * anchored to this element is open). Default: `\"rest\"`.\n */\n interaction?: InteractiveInteraction;\n /**\n * HTML button type. When set, the element is treated as inherently\n * interactive for cursor styling even without `onClick` or `href`.\n */\n type?: InteractiveButtonType;\n /** URL to navigate to when clicked. Passed through Slot to the child. */\n href?: string;\n /** Link target. Only used when `href` is provided. */\n target?: string;\n /** Applies variant-specific disabled colors and suppresses clicks. */\n disabled?: boolean;\n}\n\nfunction getInteractiveSlotProps(\n props: InteractiveBaseProps & { className?: string },\n dataAttrs: Record<string, string | undefined>,\n) {\n const { interaction = \"rest\", type, href, target, disabled, className, onClick, ...rest } = props;\n const isDisabled = !!disabled;\n\n const classes = [\n \"interactive\",\n !onClick && !href && !type ? \"interactive-inert\" : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return {\n className: classes,\n ...dataAttrs,\n \"data-interaction\": interaction !== \"rest\" ? interaction : undefined,\n \"data-disabled\": isDisabled ? \"true\" : undefined,\n \"aria-disabled\": isDisabled || undefined,\n ...(href\n ? {\n href: isDisabled ? undefined : href,\n target,\n rel: target === \"_blank\" ? \"noopener noreferrer\" : undefined,\n }\n : {}),\n ...rest,\n onClick: isDisabled\n ? href\n ? (e: MouseEvent) => e.preventDefault()\n : undefined\n : guardPortalClick(onClick),\n };\n}\n\n// ---------------------------------------------------------------------------\n// Interactive.Stateless\n// ---------------------------------------------------------------------------\n\nexport type InteractiveStatelessVariant = \"default\" | \"action\" | \"danger\";\nexport type InteractiveStatelessProminence = \"primary\" | \"secondary\" | \"tertiary\" | \"internal\";\n\nexport interface InteractiveStatelessProps extends InteractiveBaseProps {\n /** Visual variant controlling the color palette. Default: `\"default\"`. */\n variant?: InteractiveStatelessVariant;\n /** Prominence level controlling background intensity. Default: `\"primary\"`. */\n prominence?: InteractiveStatelessProminence;\n}\n\n/**\n * Stateless interactive surface primitive: the color system for buttons,\n * links, and any clickable element without selection state. Applies the\n * variant × prominence matrix via data attributes and merges onto a single\n * child element via Radix `Slot` (no extra DOM node).\n */\nconst InteractiveStateless = forwardRef<HTMLElement, InteractiveStatelessProps>(\n function InteractiveStateless({ variant = \"default\", prominence = \"primary\", ...props }, ref) {\n const slotProps = getInteractiveSlotProps(props, {\n \"data-interactive-variant\": variant,\n \"data-interactive-prominence\": prominence,\n });\n return <Slot ref={ref} {...slotProps} />;\n },\n);\n\n// ---------------------------------------------------------------------------\n// Interactive.Stateful\n// ---------------------------------------------------------------------------\n\nexport type InteractiveStatefulVariant =\n | \"select-light\"\n | \"select-heavy\"\n | \"select-card\"\n | \"select-tinted\"\n | \"select-input\"\n | \"select-filter\"\n | \"sidebar-heavy\"\n | \"sidebar-light\";\nexport type InteractiveStatefulState = \"empty\" | \"filled\" | \"selected\";\n\nexport interface InteractiveStatefulProps extends InteractiveBaseProps {\n /** Visual variant controlling the color palette. Default: `\"select-heavy\"`. */\n variant?: InteractiveStatefulVariant;\n /** Current value state: `\"empty\"`, `\"filled\"`, or `\"selected\"`. Default: `\"empty\"`. */\n state?: InteractiveStatefulState;\n}\n\n/**\n * Stateful interactive surface primitive: the color system for elements that\n * maintain a value state (toggles, selectable rows, sidebar items). Applies\n * the variant × state matrix via data attributes and merges onto a single\n * child element via Radix `Slot`.\n */\nconst InteractiveStateful = forwardRef<HTMLElement, InteractiveStatefulProps>(\n function InteractiveStateful({ variant = \"select-heavy\", state = \"empty\", ...props }, ref) {\n const slotProps = getInteractiveSlotProps(props, {\n \"data-interactive-variant\": variant,\n \"data-interactive-state\": state,\n });\n return <Slot ref={ref} {...slotProps} />;\n },\n);\n\n// ---------------------------------------------------------------------------\n// Interactive.Container\n// ---------------------------------------------------------------------------\n\nexport type InteractiveContainerSize = \"lg\" | \"md\" | \"sm\" | \"xs\" | \"2xs\" | \"fit\";\nexport type InteractiveContainerRounding = \"md\" | \"sm\" | \"xs\";\nexport type InteractiveContainerWidth = \"fit\" | \"full\";\n\nexport interface InteractiveContainerProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * HTML button type. When provided, renders a `<button>` instead of a\n * `<div>` so styling stays on one element. Mutually exclusive with the\n * `href` injected by a parent Stateless/Stateful Slot.\n */\n type?: InteractiveButtonType;\n /** Draws a 1px border in the theme border color. Default: false. */\n border?: boolean;\n /** Corner rounding preset. Default: `\"md\"`. */\n rounding?: InteractiveContainerRounding;\n /** Size preset controlling height, min-width, and padding. Default: `\"lg\"`. */\n size?: InteractiveContainerSize;\n /** Width preset. Default: `\"fit\"`. */\n width?: InteractiveContainerWidth;\n}\n\n/**\n * Structural box for use inside `Interactive.Stateless` / `Interactive.Stateful`.\n * Carries height, padding, rounding, and border; the parent primitive carries\n * color. Renders `<a>` when a parent Slot injects `href`, `<button>` when\n * `type` is set, `<div>` otherwise.\n */\nconst InteractiveContainer = forwardRef<HTMLElement, InteractiveContainerProps>(\n function InteractiveContainer(\n { type, border, rounding = \"md\", size = \"lg\", width = \"fit\", className, ...props },\n ref,\n ) {\n const {\n href,\n target,\n rel,\n style,\n ...rest\n } = props as InteractiveContainerProps & {\n href?: string;\n target?: string;\n rel?: string;\n style?: CSSProperties;\n };\n\n const sharedProps = {\n ...rest,\n className: [\n \"interactive-container\",\n `interactive-rounding-${rounding}`,\n `interactive-size-${size}`,\n `interactive-width-${width}`,\n className,\n ]\n .filter(Boolean)\n .join(\" \"),\n \"data-border\": border ? (\"true\" as const) : undefined,\n style,\n };\n\n if (href) {\n return (\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n href={href}\n target={target}\n rel={rel}\n {...(sharedProps as HTMLAttributes<HTMLAnchorElement>)}\n />\n );\n }\n if (type) {\n const ariaDisabled = (rest as Record<string, unknown>)[\"aria-disabled\"];\n const nativeDisabled = ariaDisabled === true || ariaDisabled === \"true\" || undefined;\n return (\n <button\n ref={ref as Ref<HTMLButtonElement>}\n type={type}\n disabled={nativeDisabled}\n {...(sharedProps as HTMLAttributes<HTMLButtonElement>)}\n />\n );\n }\n return <div ref={ref as Ref<HTMLDivElement>} {...sharedProps} />;\n },\n);\n\n// ---------------------------------------------------------------------------\n// Interactive.Foldable\n// ---------------------------------------------------------------------------\n\nexport interface InteractiveFoldableProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * Zero-width collapsible wrapper that expands when its ancestor\n * `.interactive` element is hovered, focused within, or carries an\n * interaction override. Uses a CSS grid `0fr ↔ 1fr` animation. The flex\n * parent holding persistent + foldable content should add the\n * `interactive-foldable-host` class for synchronized gap transitions.\n */\nconst InteractiveFoldable = forwardRef<HTMLDivElement, InteractiveFoldableProps>(\n function InteractiveFoldable({ children, className, ...props }, ref) {\n return (\n <div\n ref={ref}\n {...props}\n className={[\"interactive-foldable\", className].filter(Boolean).join(\" \")}\n >\n <div className=\"interactive-foldable-inner\">{children}</div>\n </div>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// Compound export\n// ---------------------------------------------------------------------------\n\n/**\n * Core interactive primitives. Most code should use higher-level components\n * (Button, etc.); reach for these when building new interactive surfaces.\n *\n * - `Interactive.Stateless` — variant × prominence color matrix\n * - `Interactive.Stateful` — variant × state (empty/filled/selected) matrix\n * - `Interactive.Container` — structural box (size, rounding, border)\n * - `Interactive.Foldable` — zero-width collapse revealed on hover/focus\n */\nexport const Interactive = {\n Stateless: InteractiveStateless,\n Stateful: InteractiveStateful,\n Container: InteractiveContainer,\n Foldable: InteractiveFoldable,\n};\n\nexport { InteractiveStateless, InteractiveStateful, InteractiveContainer, InteractiveFoldable };\n","import \"./disabled.css\";\nimport { forwardRef, type HTMLAttributes, type ReactElement } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Tooltip, TooltipProvider } from \"../Tooltip/Tooltip\";\nimport { resolveStr, type RichStr } from \"../Text/richstr\";\n\nexport type DisabledTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface DisabledProps extends HTMLAttributes<HTMLElement> {\n /** When truthy, applies disabled styling to the child element. */\n disabled?: boolean;\n /**\n * Re-enables pointer events while keeping the disabled visual treatment.\n * Useful when the element must keep receiving hover or click at a higher\n * level. Default: false.\n */\n allowClick?: boolean;\n /**\n * Tooltip shown on hover while disabled (the \"why is this disabled\" hint).\n * Implies `allowClick` so the trigger can receive pointer events. Supports\n * inline markdown via `markdown()`.\n */\n tooltip?: string | RichStr;\n /** Tooltip side. Default: `\"right\"`. */\n tooltipSide?: DisabledTooltipSide;\n children: ReactElement;\n}\n\n/**\n * Applies baseline disabled visuals (opacity, cursor, pointer-events) to a\n * single child element via Radix `Slot` — no wrapper DOM node. Interactive\n * primitives handle their own disabled colors; this wrapper covers arbitrary\n * subtrees and composites that expose no `disabled` prop, and enables\n * tooltips on disabled elements (native disabled controls swallow pointer\n * events, so the hint never fires without this).\n */\nexport const Disabled = forwardRef<HTMLElement, DisabledProps>(function Disabled(\n { disabled, allowClick, tooltip, tooltipSide = \"right\", children, ...rest },\n ref,\n) {\n const showTooltip = Boolean(disabled && tooltip);\n const enableClick = allowClick || showTooltip;\n\n const wrapper = (\n <Slot\n ref={ref}\n {...rest}\n aria-disabled={disabled || undefined}\n data-sds-disabled={disabled || undefined}\n data-allow-click={disabled && enableClick ? \"\" : undefined}\n >\n {children}\n </Slot>\n );\n\n if (!showTooltip || tooltip === undefined) return wrapper;\n\n // Own provider so the wrapper works without an app-level TooltipProvider.\n return (\n <TooltipProvider>\n <Tooltip\n content={typeof tooltip === \"string\" ? tooltip : resolveStr(tooltip)}\n side={tooltipSide}\n >\n {wrapper}\n </Tooltip>\n </TooltipProvider>\n );\n});\n","import \"./hoverable.css\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\n\nexport type HoverableInteraction = \"rest\" | \"hover\";\nexport type HoverableItemVariant = \"opacity-on-hover\";\nexport type HoverableWidth = \"fit\" | \"full\";\n\nexport interface HoverableRootProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /** Group identifier matched by descendant `Hoverable.Item group` props. */\n group: string;\n /** Width preset. Default: `\"full\"`. */\n width?: HoverableWidth;\n /**\n * Interaction override. `\"hover\"` forces items visible regardless of hover\n * state — set it while a menu or modal opened from a hoverable action is\n * up, so the user keeps seeing which element they are acting on.\n * Default: `\"rest\"`.\n */\n interaction?: HoverableInteraction;\n}\n\n/**\n * Hover-tracking container for a named group. Entirely CSS-driven: the\n * browser's `:hover` controls descendant `Hoverable.Item` visibility, so\n * hover state clears automatically when modals or portals steal pointer\n * events. No React state or context.\n */\nconst HoverableRoot = forwardRef<HTMLDivElement, HoverableRootProps>(function HoverableRoot(\n { group, children, width = \"full\", interaction = \"rest\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={[width === \"full\" ? \"hoverable-width-full\" : \"hoverable-width-fit\", className]\n .filter(Boolean)\n .join(\" \")}\n data-hover-group={group}\n data-interaction={interaction !== \"rest\" ? interaction : undefined}\n >\n {children}\n </div>\n );\n});\n\nexport interface HoverableItemProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /**\n * Group mode: matches an ancestor `Hoverable.Root group`. Omit for local\n * mode, where the item reveals on its own `:hover`.\n */\n group?: string;\n /** Reveal animation variant. Default: `\"opacity-on-hover\"`. */\n variant?: HoverableItemVariant;\n}\n\n/**\n * An element revealed on hover. Group mode (with `group`): visibility driven\n * by `:hover` on the nearest `Hoverable.Root`. Local mode (no `group`): the\n * item handles its own `:hover`. Keyboard focus inside the group or item\n * also reveals it.\n */\nconst HoverableItem = forwardRef<HTMLDivElement, HoverableItemProps>(function HoverableItem(\n { group, variant = \"opacity-on-hover\", children, className, ...props },\n ref,\n) {\n const isLocal = group === undefined;\n return (\n <div\n {...props}\n ref={ref}\n className={[\"hoverable-item\", className].filter(Boolean).join(\" \")}\n data-hoverable-variant={variant}\n data-hoverable-local={isLocal ? \"true\" : undefined}\n >\n {children}\n </div>\n );\n});\n\n/**\n * Hover-to-reveal compound component.\n *\n * - `Hoverable.Root` — the hover area (e.g. a row or card)\n * - `Hoverable.Item` — the revealed element (e.g. a delete button)\n */\nexport const Hoverable = {\n Root: HoverableRoot,\n Item: HoverableItem,\n};\n\nexport { HoverableRoot, HoverableItem };\n","import { Interactive, type InteractiveStatefulProps } from \"../Interactive/Interactive\";\nimport { Text } from \"../Text/Text\";\nimport type { RichStr } from \"../Text/richstr\";\nimport {\n iconSlot,\n withTooltip,\n type IconComponent,\n type InteractiveButtonSize,\n} from \"../../internal/interactive-buttons\";\n\nexport type SelectButtonSize = InteractiveButtonSize;\nexport type SelectButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/**\n * Content union enforced on `foldable`:\n * - `foldable: true` → `icon` and `children` required (icon stays, label and\n * rightIcon fold away)\n * - otherwise at least one of `icon` or `children`\n */\ntype SelectButtonContentProps =\n | { foldable: true; icon: IconComponent; children: string | RichStr; rightIcon?: IconComponent }\n | {\n foldable?: false;\n icon?: IconComponent;\n children: string | RichStr;\n rightIcon?: IconComponent;\n }\n | {\n foldable?: false;\n icon: IconComponent;\n children?: string | RichStr;\n rightIcon?: IconComponent;\n };\n\nexport type SelectButtonProps = Omit<InteractiveStatefulProps, \"children\"> &\n SelectButtonContentProps & {\n /** Size preset controlling height, text size, and rounding. Default: `\"lg\"`. */\n size?: SelectButtonSize;\n /** Tooltip shown on hover. Folded disabled buttons fall back to the label. */\n tooltip?: string;\n /** Width preset. Default: `\"fit\"`. */\n width?: \"fit\" | \"full\";\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: SelectButtonTooltipSide;\n };\n\n/**\n * Stateful toggle button over `Interactive.Stateful`: empty / filled /\n * selected color states, optional foldable label that expands on hover.\n */\nexport function SelectButton({\n icon: Icon,\n children,\n rightIcon: RightIcon,\n size = \"lg\",\n type = \"button\",\n foldable,\n width,\n tooltip,\n tooltipSide = \"top\",\n disabled,\n ...statefulProps\n}: SelectButtonProps) {\n const isLarge = size === \"lg\";\n\n const labelEl = children ? (\n <Text font={isLarge ? \"main-ui-body\" : \"secondary-body\"} color=\"inherit\" nowrap>\n {children}\n </Text>\n ) : null;\n\n const button = (\n <Interactive.Stateful disabled={disabled} {...statefulProps}>\n <Interactive.Container\n type={type}\n size={size}\n width={width}\n rounding={isLarge ? \"md\" : size === \"2xs\" ? \"xs\" : \"sm\"}\n >\n <span\n className={[\"sds-button-row\", foldable ? \"interactive-foldable-host\" : \"sds-button-row-gap\"].join(\" \")}\n >\n {iconSlot(Icon, size, !foldable && !!children)}\n {foldable ? (\n <Interactive.Foldable>\n {labelEl}\n {iconSlot(RightIcon, size, !!children)}\n </Interactive.Foldable>\n ) : (\n <>\n {labelEl}\n {iconSlot(RightIcon, size, !!children)}\n </>\n )}\n </span>\n </Interactive.Container>\n </Interactive.Stateful>\n );\n\n const resolvedTooltip =\n tooltip ??\n (foldable && disabled && typeof children === \"string\" ? children : undefined);\n\n return <>{withTooltip(button, resolvedTooltip, tooltipSide)}</>;\n}\n","import {\n Interactive,\n type InteractiveContainerRounding,\n type InteractiveInteraction,\n type InteractiveStatefulProps,\n} from \"../Interactive/Interactive\";\nimport { Text } from \"../Text/Text\";\nimport type { RichStr } from \"../Text/richstr\";\nimport {\n ChevronIcon,\n iconSlot,\n withTooltip,\n type IconComponent,\n type InteractiveButtonSize,\n} from \"../../internal/interactive-buttons\";\n\nexport type OpenButtonVariant = \"select-light\" | \"select-heavy\" | \"select-tinted\";\nexport type OpenButtonSize = InteractiveButtonSize;\nexport type OpenButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/**\n * Content union enforced on `foldable`:\n * - `foldable: true` → `icon` and `children` required (icon stays, label and\n * chevron fold away)\n * - otherwise at least one of `icon` or `children`\n */\ntype OpenButtonContentProps =\n | { foldable: true; icon: IconComponent; children: string | RichStr }\n | { foldable?: false; icon?: IconComponent; children: string | RichStr }\n | { foldable?: false; icon: IconComponent; children?: string | RichStr };\n\nexport type OpenButtonProps = Omit<InteractiveStatefulProps, \"variant\" | \"children\"> &\n OpenButtonContentProps & {\n /** Visual variant. Default: `\"select-heavy\"`. */\n variant?: OpenButtonVariant;\n /** Size preset. Default: `\"lg\"`. */\n size?: OpenButtonSize;\n /** Width preset. Default: `\"fit\"`. */\n width?: \"fit\" | \"full\";\n /**\n * When `\"between\"`, icon + label group left and the chevron pushes to the\n * right edge. Default keeps a tight row.\n */\n justifyContent?: \"between\";\n /** Tooltip shown on hover. */\n tooltip?: string;\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: OpenButtonTooltipSide;\n /** Override the rounding derived from `size`. */\n rounding?: InteractiveContainerRounding;\n };\n\n/**\n * Dropdown trigger button with a built-in rotating chevron. When rendered as\n * a Radix trigger (DropdownMenu, Popover), the injected `data-state=\"open\"`\n * automatically forces the hover visual while the menu is open.\n */\nexport function OpenButton({\n icon: Icon,\n children,\n size = \"lg\",\n foldable,\n width,\n justifyContent,\n tooltip,\n tooltipSide = \"top\",\n rounding: roundingOverride,\n interaction,\n variant = \"select-heavy\",\n disabled,\n ...statefulProps\n}: OpenButtonProps) {\n // Derive open state: explicit prop, else Radix data-state injected via Slot.\n const dataState = (statefulProps as Record<string, unknown>)[\"data-state\"] as\n | string\n | undefined;\n const resolvedInteraction: InteractiveInteraction =\n interaction ?? (dataState === \"open\" ? \"hover\" : \"rest\");\n\n const isLarge = size === \"lg\";\n\n const labelEl = children ? (\n <Text font={isLarge ? \"main-ui-body\" : \"secondary-body\"} color=\"inherit\" nowrap>\n {children}\n </Text>\n ) : null;\n\n const rowClass = [\n \"sds-button-row\",\n justifyContent === \"between\"\n ? \"sds-button-row-between\"\n : foldable\n ? \"interactive-foldable-host\"\n : \"sds-button-row-gap\",\n ].join(\" \");\n\n const button = (\n <Interactive.Stateful\n variant={variant}\n interaction={resolvedInteraction}\n disabled={disabled}\n {...statefulProps}\n >\n <Interactive.Container\n type=\"button\"\n size={size}\n width={width}\n rounding={roundingOverride ?? (isLarge ? \"md\" : size === \"2xs\" ? \"xs\" : \"sm\")}\n >\n <span className={rowClass}>\n {justifyContent === \"between\" ? (\n <>\n <span className=\"sds-button-row sds-button-row-gap\">\n {iconSlot(Icon, size, !foldable && !!children)}\n {labelEl}\n </span>\n {iconSlot(ChevronIcon, size, !!children)}\n </>\n ) : foldable ? (\n <>\n {iconSlot(Icon, size, false)}\n <Interactive.Foldable>\n {labelEl}\n {iconSlot(ChevronIcon, size, !!children)}\n </Interactive.Foldable>\n </>\n ) : (\n <>\n {iconSlot(Icon, size, !!children)}\n {labelEl}\n {iconSlot(ChevronIcon, size, !!children)}\n </>\n )}\n </span>\n </Interactive.Container>\n </Interactive.Stateful>\n );\n\n const resolvedTooltip =\n tooltip ??\n (foldable && disabled && typeof children === \"string\" ? children : undefined);\n\n return <>{withTooltip(button, resolvedTooltip, tooltipSide)}</>;\n}\n","import { forwardRef, type ReactNode } from \"react\";\nimport styles from \"./ExpandableButton.module.css\";\nimport { Button, type ButtonProps } from \"../Button/Button\";\n\nexport interface ExpandableButtonProps\n extends Omit<ButtonProps, \"iconLeft\" | \"iconRight\" | \"iconOnly\" | \"children\" | \"title\"> {\n /** Icon rendered in the fixed square box. Stays visible at rest. */\n icon: ReactNode;\n /**\n * Text label. Collapsed (width 0) at rest; slides out on hover / keyboard\n * focus. Also used as the `title` and `aria-label` so the control is always\n * announced even while the label is visually collapsed.\n */\n label: string;\n /**\n * When true, the label also expands while an ancestor element carrying the\n * `data-expand-trigger` attribute is hovered — so a whole card can reveal the\n * label on hover, not just the button itself. Default: false.\n */\n expandOnContainerHover?: boolean;\n}\n\n/**\n * A square icon Button whose text label is collapsed at rest and slides out\n * smoothly on hover / keyboard focus (and, optionally, while an ancestor\n * `[data-expand-trigger]` is hovered). Composes the DS `Button` for all visual\n * styling — variant, size, and every other Button prop passes straight through.\n */\nexport const ExpandableButton = forwardRef<HTMLButtonElement, ExpandableButtonProps>(\n function ExpandableButton(\n { icon, label, expandOnContainerHover = false, className, ...rest },\n ref,\n ) {\n const classes = [\n styles.root,\n expandOnContainerHover ? styles.containerHover : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Button\n ref={ref}\n className={classes}\n title={label}\n aria-label={label}\n iconLeft={\n <span className={styles.iconBox} aria-hidden=\"true\">\n {icon}\n </span>\n }\n {...rest}\n >\n <span className={styles.label}>{label}</span>\n </Button>\n );\n },\n);\n","import {\n Interactive,\n type InteractiveInteraction,\n type InteractiveStatefulProps,\n} from \"../Interactive/Interactive\";\nimport { Text } from \"../Text/Text\";\nimport type { RichStr } from \"../Text/richstr\";\nimport SvgX from \"../../icons/X\";\nimport styles from \"./FilterButton.module.css\";\nimport {\n ChevronIcon,\n iconSlot,\n withTooltip,\n type IconComponent,\n} from \"../../internal/interactive-buttons\";\n\nexport type FilterButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface FilterButtonProps\n extends Omit<InteractiveStatefulProps, \"variant\" | \"state\" | \"children\"> {\n /** Left icon, always visible. */\n icon: IconComponent;\n /** Label between the icon and the trailing indicator. */\n children: string | RichStr;\n /** Whether the filter has an active selection. Default: false. */\n active?: boolean;\n /** Called when the clear (X) control is clicked in the active state. */\n onClear: () => void;\n /** Tooltip shown on hover. */\n tooltip?: string;\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: FilterButtonTooltipSide;\n}\n\n/**\n * Filter chip: chevron when inactive, clear-X when a selection is active.\n * Active state uses the inverted `select-filter` palette.\n */\nexport function FilterButton({\n icon: Icon,\n children,\n onClear,\n tooltip,\n tooltipSide = \"top\",\n active = false,\n interaction,\n ...statefulProps\n}: FilterButtonProps) {\n // Derive open state: explicit prop, else Radix data-state injected via Slot.\n const dataState = (statefulProps as Record<string, unknown>)[\"data-state\"] as\n | string\n | undefined;\n const resolvedInteraction: InteractiveInteraction =\n interaction ?? (dataState === \"open\" ? \"hover\" : \"rest\");\n\n const button = (\n <span className={styles.anchor}>\n <Interactive.Stateful\n {...statefulProps}\n variant=\"select-filter\"\n interaction={resolvedInteraction}\n state={active ? \"selected\" : \"empty\"}\n >\n <Interactive.Container type=\"button\">\n <span className=\"sds-button-row sds-button-row-gap\">\n {iconSlot(Icon, \"lg\", true)}\n {/* Consume the resolved interactive foreground explicitly. `color`\n inherit lost to the font preset's own color class by stylesheet\n order, leaving the selected-state label unreadable in dark mode;\n the inline value wins deterministically and tracks every state. */}\n <Text\n font=\"main-ui-action\"\n nowrap\n style={{ color: \"var(--interactive-foreground)\" }}\n >\n {children}\n </Text>\n <span style={{ visibility: active ? \"hidden\" : \"visible\" }}>\n {iconSlot(ChevronIcon, \"lg\", true)}\n </span>\n </span>\n </Interactive.Container>\n </Interactive.Stateful>\n\n {active && (\n <span className={styles.clear}>\n {/* Forced hover keeps the X prominent against the inverted selected\n background; at rest it renders dimmed and looks disabled. */}\n <Interactive.Stateless\n variant=\"default\"\n prominence=\"tertiary\"\n interaction=\"hover\"\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n onClear();\n }}\n >\n <Interactive.Container type=\"button\" size=\"2xs\" rounding=\"xs\" aria-label=\"Clear filter\">\n <SvgX className={styles.clearIcon} />\n </Interactive.Container>\n </Interactive.Stateless>\n </span>\n )}\n </span>\n );\n\n return <>{withTooltip(button, tooltip, tooltipSide)}</>;\n}\n","import type { MouseEvent } from \"react\";\nimport styles from \"./LinkButton.module.css\";\nimport SvgExternalLink from \"../../icons/ExternalLink\";\nimport { withTooltip } from \"../../internal/interactive-buttons\";\nimport type { RichStr } from \"../Text/richstr\";\n\nexport type LinkButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface LinkButtonProps {\n /** Visible label, rendered as underlined link text. */\n children: string;\n /** Destination URL. When provided, renders an `<a>`. */\n href?: string;\n /** Anchor target. Only meaningful with `href`. */\n target?: string;\n /** Click handler. Without `href`, renders a `<button>`. */\n onClick?: () => void;\n /** Applies disabled styling and suppresses navigation/clicks. */\n disabled?: boolean;\n /** Tooltip shown on hover. Pass `markdown()` for inline markdown. */\n tooltip?: string | RichStr;\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: LinkButtonTooltipSide;\n}\n\n/**\n * A bare, anchor-styled link with a trailing external-link glyph. For inline\n * references (\"Pricing\", \"Docs\"), not interactive surfaces that need hover\n * backgrounds or prominence tiers — use `Button` for those. Deliberately\n * does not use the Interactive primitives: their height, rounding, and color\n * matrix are wrong for an inline text link.\n */\nexport function LinkButton({\n children,\n href,\n target,\n onClick,\n disabled,\n tooltip,\n tooltipSide = \"top\",\n}: LinkButtonProps) {\n const inner = (\n <>\n <span className={`${styles.label} font-secondary-body`}>{children}</span>\n <SvgExternalLink style={{ width: 12, height: 12 }} />\n </>\n );\n\n // Always stop propagation so clicks don't bubble to interactive ancestors\n // (cards, list rows). If disabled, also prevent anchor navigation.\n const handleAnchorClick = (e: MouseEvent<HTMLAnchorElement>) => {\n e.stopPropagation();\n if (disabled) e.preventDefault();\n };\n\n const handleButtonClick = (e: MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n if (disabled) return;\n onClick?.();\n };\n\n const element = href ? (\n <a\n className={styles.linkButton}\n href={disabled ? undefined : href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n aria-disabled={disabled || undefined}\n data-disabled={disabled || undefined}\n onClick={handleAnchorClick}\n >\n {inner}\n </a>\n ) : (\n <button\n type=\"button\"\n className={styles.linkButton}\n onClick={handleButtonClick}\n disabled={disabled}\n data-disabled={disabled || undefined}\n >\n {inner}\n </button>\n );\n\n return <>{withTooltip(element, tooltip, tooltipSide)}</>;\n}\n","import styles from \"./Tag.module.css\";\nimport { resolveStr, type RichStr } from \"../Text/richstr\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\n\nexport type TagColor = \"green\" | \"purple\" | \"blue\" | \"gray\" | \"amber\";\nexport type TagSize = \"sm\" | \"md\";\n\nexport interface TagProps {\n /** Optional leading icon. */\n icon?: IconComponent;\n /** Label text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Color variant. Default: `\"gray\"`. */\n color?: TagColor;\n /** Size variant. Default: `\"sm\"`. */\n size?: TagSize;\n}\n\n/**\n * Categorical color label. Distinct from `Badge`: Badge communicates status\n * tone (success, warning, error); Tag classifies (team, topic, model).\n */\nexport function Tag({ icon: Icon, title, color = \"gray\", size = \"sm\" }: TagProps) {\n return (\n <span className={[styles.tag, styles[`color-${color}`]].join(\" \")} data-size={size}>\n {Icon ? (\n <span className={styles.iconContainer}>\n <Icon className={styles.icon} />\n </span>\n ) : null}\n <span className={styles.title}>{resolveStr(title)}</span>\n </span>\n );\n}\n","import { forwardRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { Button } from \"../Button/Button\";\nimport SvgEdit from \"../../icons/Edit\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport { Text, type TextFont } from \"../Text/Text\";\nimport { toPlainString, type RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ContentXlSizePreset = \"headline\" | \"section\";\n\n/** Edit-button size on the DS Button scale (`sm | md | lg`). */\ntype EditButtonSize = \"sm\" | \"md\";\n\ninterface ContentXlPresetConfig {\n /** Icon width/height (CSS value). */\n iconSize: string;\n /** Padding on the icon container (CSS value). */\n iconContainerPadding: string;\n /** More-icon-1 width/height (CSS value). */\n moreIcon1Size: string;\n /** Padding on the more-icon-1 container (CSS value). */\n moreIcon1ContainerPadding: string;\n /** More-icon-2 width/height (CSS value). */\n moreIcon2Size: string;\n /** Padding on the more-icon-2 container (CSS value). */\n moreIcon2ContainerPadding: string;\n /** Font preset for the title. */\n titleFont: TextFont;\n /** Title line-height — also used as icon container min-height (CSS value). */\n lineHeight: string;\n /** Button `size` prop for the edit button. */\n editButtonSize: EditButtonSize;\n /** Padding on the edit-button container (CSS value). */\n editButtonPadding: string;\n}\n\nexport interface ContentXlProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description below the title. */\n description?: string | RichStr;\n /** Enable inline editing of the title. */\n editable?: boolean;\n /** Called when the user commits an edit. */\n onTitleChange?: (newTitle: string) => void;\n /** Size preset. Default: `\"headline\"`. */\n sizePreset?: ContentXlSizePreset;\n /** Optional secondary icon rendered in the icon row. */\n moreIcon1?: IconComponent;\n /** Optional tertiary icon rendered in the icon row. */\n moreIcon2?: IconComponent;\n /**\n * Action slot rendered on the right side of the content row.\n * Naturally hosts a `ContentAction` trigger, button, badge, or arbitrary\n * nodes. When set, the root becomes a row pairing the content with the slot.\n */\n rightChildren?: ReactNode;\n /** Extra class for the root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Presets\n// ---------------------------------------------------------------------------\n\nconst CONTENT_XL_PRESETS: Record<ContentXlSizePreset, ContentXlPresetConfig> = {\n headline: {\n iconSize: \"2rem\",\n iconContainerPadding: \"0.125rem\",\n moreIcon1Size: \"1rem\",\n moreIcon1ContainerPadding: \"0.125rem\",\n moreIcon2Size: \"2rem\",\n moreIcon2ContainerPadding: \"0.125rem\",\n titleFont: \"heading-h2\",\n lineHeight: \"2.25rem\",\n editButtonSize: \"md\",\n editButtonPadding: \"0.25rem\",\n },\n section: {\n iconSize: \"1.5rem\",\n iconContainerPadding: \"0.125rem\",\n moreIcon1Size: \"0.75rem\",\n moreIcon1ContainerPadding: \"0.125rem\",\n moreIcon2Size: \"1.5rem\",\n moreIcon2ContainerPadding: \"0.125rem\",\n // DS lacks `heading-h3-section`; nearest is `heading-h3`.\n titleFont: \"heading-h3\",\n lineHeight: \"1.75rem\",\n editButtonSize: \"sm\",\n editButtonPadding: \"0.125rem\",\n },\n};\n\n// ---------------------------------------------------------------------------\n// ContentXl — icon row on top (flex-col)\n// ---------------------------------------------------------------------------\n\nexport const ContentXl = forwardRef<HTMLDivElement, ContentXlProps>(\n function ContentXl(\n {\n sizePreset = \"headline\",\n icon: Icon,\n title,\n description,\n editable,\n onTitleChange,\n moreIcon1: MoreIcon1,\n moreIcon2: MoreIcon2,\n rightChildren,\n className,\n },\n ref,\n ) {\n const [editing, setEditing] = useState(false);\n const [editValue, setEditValue] = useState(toPlainString(title));\n\n const config = CONTENT_XL_PRESETS[sizePreset];\n\n function startEditing() {\n setEditValue(toPlainString(title));\n setEditing(true);\n }\n\n function commit() {\n const value = editValue.trim();\n if (value && value !== toPlainString(title)) onTitleChange?.(value);\n setEditing(false);\n }\n\n const classes = [\"sds-content-xl\", className].filter(Boolean).join(\" \");\n\n const inner = (\n <>\n {(Icon || MoreIcon1 || MoreIcon2) && (\n <div className=\"sds-content-xl-icon-row\">\n {Icon && (\n <div\n className=\"sds-content-xl-icon-container\"\n style={{\n padding: config.iconContainerPadding,\n minHeight: config.lineHeight,\n }}\n >\n <Icon\n className=\"sds-content-xl-icon\"\n style={{ width: config.iconSize, height: config.iconSize }}\n />\n </div>\n )}\n\n {MoreIcon1 && (\n <div\n className=\"sds-content-xl-more-icon-container\"\n style={{ padding: config.moreIcon1ContainerPadding }}\n >\n <MoreIcon1\n className=\"sds-content-xl-icon\"\n style={{\n width: config.moreIcon1Size,\n height: config.moreIcon1Size,\n }}\n />\n </div>\n )}\n\n {MoreIcon2 && (\n <div\n className=\"sds-content-xl-more-icon-container\"\n style={{ padding: config.moreIcon2ContainerPadding }}\n >\n <MoreIcon2\n className=\"sds-content-xl-icon\"\n style={{\n width: config.moreIcon2Size,\n height: config.moreIcon2Size,\n }}\n />\n </div>\n )}\n </div>\n )}\n\n <div className=\"sds-content-xl-body\">\n <div className=\"sds-content-xl-title-row\">\n {editing ? (\n <div className=\"sds-content-xl-input-sizer\">\n <span\n className={`sds-content-xl-input-mirror font-${config.titleFont}`}\n >\n {editValue || \" \"}\n </span>\n <input\n className={`sds-content-xl-input font-${config.titleFont}`}\n value={editValue}\n onChange={(e) => setEditValue(e.target.value)}\n size={1}\n autoFocus\n onFocus={(e) => e.currentTarget.select()}\n onBlur={commit}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") commit();\n if (e.key === \"Escape\") {\n setEditValue(toPlainString(title));\n setEditing(false);\n }\n }}\n style={{ height: config.lineHeight } as CSSProperties}\n />\n </div>\n ) : (\n <Text\n font={config.titleFont}\n color=\"inherit\"\n maxLines={1}\n title={toPlainString(title)}\n onClick={editable ? startEditing : undefined}\n >\n {title}\n </Text>\n )}\n\n {editable && !editing && (\n <div\n className=\"sds-content-xl-edit-button\"\n style={{ padding: config.editButtonPadding }}\n >\n <Button\n variant=\"tertiary\"\n size={config.editButtonSize}\n iconLeft={<SvgEdit />}\n iconOnly\n tooltip=\"Edit\"\n tooltipSide=\"right\"\n aria-label=\"Edit\"\n onClick={startEditing}\n />\n </div>\n )}\n </div>\n\n {description && toPlainString(description) && (\n <div className=\"sds-content-xl-description\">\n <Text font=\"secondary-body\" color=\"text-03\" as=\"p\">\n {description}\n </Text>\n </div>\n )}\n </div>\n </>\n );\n\n if (rightChildren) {\n return (\n <div ref={ref} className={classes} data-has-right>\n <div className=\"sds-content-xl-main\">{inner}</div>\n <div className=\"sds-content-right\">{rightChildren}</div>\n </div>\n );\n }\n\n return (\n <div ref={ref} className={classes}>\n {inner}\n </div>\n );\n },\n);\n","import { forwardRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { Button } from \"../Button/Button\";\nimport SvgEdit from \"../../icons/Edit\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport { Text, type TextFont } from \"../Text/Text\";\nimport { toPlainString, type RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ContentLgSizePreset = \"headline\" | \"section\";\n\n/** Edit-button size on the DS Button scale (`sm | md | lg`). */\ntype EditButtonSize = \"sm\" | \"md\";\n\ninterface ContentLgPresetConfig {\n /** Icon width/height (CSS value). */\n iconSize: string;\n /** Padding on the icon container (CSS value). */\n iconContainerPadding: string;\n /** Gap between icon container and content (CSS value). */\n gap: string;\n /** Font preset for the title. */\n titleFont: TextFont;\n /** Title line-height — also used as icon container min-height (CSS value). */\n lineHeight: string;\n /** Button `size` prop for the edit button. */\n editButtonSize: EditButtonSize;\n /** Padding on the edit-button container (CSS value). */\n editButtonPadding: string;\n}\n\nexport interface ContentLgProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description below the title. */\n description?: string | RichStr;\n /** Enable inline editing of the title. */\n editable?: boolean;\n /** Called when the user commits an edit. */\n onTitleChange?: (newTitle: string) => void;\n /** Size preset. Default: `\"headline\"`. */\n sizePreset?: ContentLgSizePreset;\n /**\n * Action slot rendered on the right side of the content row.\n * Naturally hosts a `ContentAction` trigger, button, badge, or arbitrary\n * nodes. When set, the root becomes a row pairing the content with the slot.\n */\n rightChildren?: ReactNode;\n /** Extra class for the root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Presets\n// ---------------------------------------------------------------------------\n\nconst CONTENT_LG_PRESETS: Record<ContentLgSizePreset, ContentLgPresetConfig> = {\n headline: {\n iconSize: \"2rem\",\n iconContainerPadding: \"0.125rem\",\n gap: \"0.25rem\",\n titleFont: \"heading-h2\",\n lineHeight: \"2.25rem\",\n editButtonSize: \"md\",\n editButtonPadding: \"0.25rem\",\n },\n section: {\n iconSize: \"1.25rem\",\n iconContainerPadding: \"0.25rem\",\n gap: \"0rem\",\n // DS lacks `heading-h3-muted`; nearest is `heading-h3`.\n titleFont: \"heading-h3\",\n lineHeight: \"1.75rem\",\n editButtonSize: \"sm\",\n editButtonPadding: \"0.125rem\",\n },\n};\n\n// ---------------------------------------------------------------------------\n// ContentLg — icon inline (flex-row)\n// ---------------------------------------------------------------------------\n\nexport const ContentLg = forwardRef<HTMLDivElement, ContentLgProps>(\n function ContentLg(\n {\n sizePreset = \"headline\",\n icon: Icon,\n title,\n description,\n editable,\n onTitleChange,\n rightChildren,\n className,\n },\n ref,\n ) {\n const [editing, setEditing] = useState(false);\n const [editValue, setEditValue] = useState(toPlainString(title));\n\n const config = CONTENT_LG_PRESETS[sizePreset];\n\n function startEditing() {\n setEditValue(toPlainString(title));\n setEditing(true);\n }\n\n function commit() {\n const value = editValue.trim();\n if (value && value !== toPlainString(title)) onTitleChange?.(value);\n setEditing(false);\n }\n\n const classes = [\"sds-content-lg\", className].filter(Boolean).join(\" \");\n\n const inner = (\n <>\n {Icon && (\n <div\n className=\"sds-content-lg-icon-container\"\n style={{\n padding: config.iconContainerPadding,\n minHeight: config.lineHeight,\n }}\n >\n <Icon\n className=\"sds-content-lg-icon\"\n style={{ width: config.iconSize, height: config.iconSize }}\n />\n </div>\n )}\n\n <div className=\"sds-content-lg-body\">\n <div className=\"sds-content-lg-title-row\">\n {editing ? (\n <div className=\"sds-content-lg-input-sizer\">\n <span\n className={`sds-content-lg-input-mirror font-${config.titleFont}`}\n >\n {editValue || \"\\u00A0\"}\n </span>\n <input\n className={`sds-content-lg-input font-${config.titleFont}`}\n value={editValue}\n onChange={(e) => setEditValue(e.target.value)}\n size={1}\n autoFocus\n onFocus={(e) => e.currentTarget.select()}\n onBlur={commit}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") commit();\n if (e.key === \"Escape\") {\n setEditValue(toPlainString(title));\n setEditing(false);\n }\n }}\n style={{ height: config.lineHeight } as CSSProperties}\n />\n </div>\n ) : (\n <Text\n font={config.titleFont}\n color=\"inherit\"\n maxLines={1}\n title={toPlainString(title)}\n onClick={editable ? startEditing : undefined}\n >\n {title}\n </Text>\n )}\n\n {editable && !editing && (\n <div\n className=\"sds-content-lg-edit-button\"\n style={{ padding: config.editButtonPadding }}\n >\n <Button\n variant=\"tertiary\"\n size={config.editButtonSize}\n iconLeft={<SvgEdit />}\n iconOnly\n tooltip=\"Edit\"\n tooltipSide=\"right\"\n aria-label=\"Edit\"\n onClick={startEditing}\n />\n </div>\n )}\n </div>\n\n {description && toPlainString(description) && (\n <div className=\"sds-content-lg-description\">\n <Text font=\"secondary-body\" color=\"text-03\" as=\"p\">\n {description}\n </Text>\n </div>\n )}\n </div>\n </>\n );\n\n if (rightChildren) {\n return (\n <div ref={ref} className={classes} data-has-right>\n <div className=\"sds-content-lg-main\" style={{ gap: config.gap }}>\n {inner}\n </div>\n <div className=\"sds-content-right\">{rightChildren}</div>\n </div>\n );\n }\n\n return (\n <div ref={ref} className={classes} style={{ gap: config.gap }}>\n {inner}\n </div>\n );\n },\n);\n","import {\n forwardRef,\n useRef,\n useState,\n type CSSProperties,\n type ReactNode,\n} from \"react\";\nimport { Button } from \"../Button/Button\";\nimport { Tag, type TagProps } from \"../Tag/Tag\";\nimport SvgAlertCircle from \"../../icons/AlertCircle\";\nimport SvgAlertTriangle from \"../../icons/AlertTriangle\";\nimport SvgEdit from \"../../icons/Edit\";\nimport SvgXOctagon from \"../../icons/XOctagon\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport { Text, type TextFont } from \"../Text/Text\";\nimport { toPlainString, type RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ContentMdSizePreset = \"main-content\" | \"main-ui\" | \"secondary\";\n\nexport type ContentMdAuxIcon = \"info-gray\" | \"info-blue\" | \"warning\" | \"error\";\n\nexport type ContentMdSuffix = \"optional\" | (string & {});\n\n/** Edit-button size on the DS Button scale (`sm | md | lg`). */\ntype EditButtonSize = \"sm\" | \"md\";\n\ninterface ContentMdPresetConfig {\n iconSize: string;\n /** Padding on the icon container (CSS value). */\n iconContainerPadding: string;\n /** Icon color token. */\n iconColor: string;\n titleFont: TextFont;\n lineHeight: string;\n /** Button `size` prop for the edit button. */\n editButtonSize: EditButtonSize;\n /** Padding on the edit-button container (CSS value). */\n editButtonPadding: string;\n /** Font preset for the muted suffix. */\n suffixFont: TextFont;\n /** Aux icon size = lineHeight − 2 × icon padding. */\n auxIconSize: string;\n /** Left indent for the description so it aligns with the title (past the icon). */\n descriptionIndent: string;\n}\n\nexport interface ContentMdProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description text below the title. */\n description?: string | RichStr;\n /** Enable inline editing of the title. */\n editable?: boolean;\n /** Called when the user commits an edit. */\n onTitleChange?: (newTitle: string) => void;\n /**\n * Muted suffix rendered beside the title.\n * Use `\"optional\"` for the standard \"(Optional)\" label, or pass any string.\n */\n suffix?: ContentMdSuffix;\n /** Auxiliary status icon rendered beside the title. */\n auxIcon?: ContentMdAuxIcon;\n /** Tag rendered beside the title. */\n tag?: TagProps;\n /** Size preset. Default: `\"main-ui\"`. */\n sizePreset?: ContentMdSizePreset;\n /**\n * Action slot rendered on the right side of the content row.\n * Naturally hosts a `ContentAction` trigger, button, badge, or arbitrary\n * nodes. When set, the root becomes a row pairing the content with the slot.\n */\n rightChildren?: ReactNode;\n /** Extra class for the root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Presets\n// ---------------------------------------------------------------------------\n\nconst CONTENT_MD_PRESETS: Record<ContentMdSizePreset, ContentMdPresetConfig> = {\n \"main-content\": {\n iconSize: \"1rem\",\n iconContainerPadding: \"0.25rem\",\n iconColor: \"var(--text-04)\",\n // DS lacks `main-content-emphasis`; nearest emphasis preset is `main-ui-action`.\n titleFont: \"main-ui-action\",\n lineHeight: \"1.5rem\",\n // DS Button has no xs/2xs; `sm` is the smallest preset.\n editButtonSize: \"sm\",\n editButtonPadding: \"0rem\",\n // DS lacks `main-content-muted`; nearest is `main-content`.\n suffixFont: \"main-content\",\n auxIconSize: \"1.25rem\",\n descriptionIndent: \"1.625rem\",\n },\n \"main-ui\": {\n iconSize: \"1rem\",\n iconContainerPadding: \"0.125rem\",\n iconColor: \"var(--text-03)\",\n titleFont: \"main-ui-action\",\n lineHeight: \"1.25rem\",\n editButtonSize: \"sm\",\n editButtonPadding: \"0rem\",\n // DS lacks `main-ui-muted`; nearest is `main-ui-body`.\n suffixFont: \"main-ui-body\",\n auxIconSize: \"1rem\",\n descriptionIndent: \"1.375rem\",\n },\n secondary: {\n iconSize: \"0.75rem\",\n iconContainerPadding: \"0.125rem\",\n iconColor: \"var(--text-04)\",\n titleFont: \"secondary-action\",\n lineHeight: \"1rem\",\n editButtonSize: \"sm\",\n editButtonPadding: \"0rem\",\n suffixFont: \"secondary-action\",\n auxIconSize: \"0.75rem\",\n descriptionIndent: \"1.125rem\",\n },\n};\n\nconst AUX_ICON_CONFIG: Record<\n ContentMdAuxIcon,\n { icon: IconComponent; color: string }\n> = {\n \"info-gray\": { icon: SvgAlertCircle, color: \"var(--text-02)\" },\n \"info-blue\": { icon: SvgAlertCircle, color: \"var(--status-info-05)\" },\n warning: { icon: SvgAlertTriangle, color: \"var(--status-warning-05)\" },\n error: { icon: SvgXOctagon, color: \"var(--status-error-05)\" },\n};\n\n// ---------------------------------------------------------------------------\n// ContentMd — compact inline (flex-row)\n// ---------------------------------------------------------------------------\n\nexport const ContentMd = forwardRef<HTMLDivElement, ContentMdProps>(\n function ContentMd(\n {\n icon: Icon,\n title,\n description,\n editable,\n onTitleChange,\n suffix,\n auxIcon,\n tag,\n sizePreset = \"main-ui\",\n rightChildren,\n className,\n },\n ref,\n ) {\n const [editing, setEditing] = useState(false);\n const [editValue, setEditValue] = useState(toPlainString(title));\n const inputRef = useRef<HTMLInputElement>(null);\n\n const config = CONTENT_MD_PRESETS[sizePreset];\n\n function startEditing() {\n setEditValue(toPlainString(title));\n setEditing(true);\n }\n\n function commit() {\n const value = editValue.trim();\n if (value && value !== toPlainString(title)) onTitleChange?.(value);\n setEditing(false);\n }\n\n const classes = [\"sds-content-md\", className].filter(Boolean).join(\" \");\n\n const inner = (\n <>\n <div\n className=\"sds-content-md-header\"\n data-editing={editing || undefined}\n >\n {Icon && (\n <div\n className=\"sds-content-md-icon-container\"\n style={{\n padding: config.iconContainerPadding,\n minHeight: config.lineHeight,\n }}\n >\n <Icon\n className=\"sds-content-md-icon\"\n style={{\n width: config.iconSize,\n height: config.iconSize,\n color: config.iconColor,\n }}\n />\n </div>\n )}\n\n <div className=\"sds-content-md-title-row\">\n {editing ? (\n <div className=\"sds-content-md-input-sizer\">\n <span\n className={`sds-content-md-input-mirror font-${config.titleFont}`}\n >\n {editValue || \"\\u00A0\"}\n </span>\n <input\n ref={inputRef}\n className={`sds-content-md-input font-${config.titleFont}`}\n value={editValue}\n onChange={(e) => setEditValue(e.target.value)}\n size={1}\n autoFocus\n onFocus={(e) => e.currentTarget.select()}\n onBlur={commit}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") commit();\n if (e.key === \"Escape\") {\n setEditValue(toPlainString(title));\n setEditing(false);\n }\n }}\n style={{ height: config.lineHeight } as CSSProperties}\n />\n </div>\n ) : (\n <Text\n font={config.titleFont}\n color=\"inherit\"\n maxLines={1}\n title={toPlainString(title)}\n onClick={editable ? startEditing : undefined}\n >\n {title}\n </Text>\n )}\n\n {suffix && (\n <Text font={config.suffixFont} color=\"text-03\">\n {suffix === \"optional\" ? \"(Optional)\" : suffix}\n </Text>\n )}\n\n {auxIcon &&\n (() => {\n const { icon: AuxIcon, color } = AUX_ICON_CONFIG[auxIcon];\n return (\n <div\n className=\"sds-content-md-aux-icon\"\n style={{ height: config.lineHeight }}\n >\n <AuxIcon\n style={{\n width: config.auxIconSize,\n height: config.auxIconSize,\n color,\n }}\n />\n </div>\n );\n })()}\n\n {tag && <Tag {...tag} />}\n\n {editable && !editing && (\n <div\n className=\"sds-content-md-edit-button\"\n style={{ padding: config.editButtonPadding }}\n >\n <Button\n variant=\"tertiary\"\n size={config.editButtonSize}\n iconLeft={<SvgEdit />}\n iconOnly\n tooltip=\"Edit\"\n tooltipSide=\"right\"\n aria-label=\"Edit\"\n onClick={startEditing}\n />\n </div>\n )}\n </div>\n </div>\n\n {description && toPlainString(description) && (\n <div\n className=\"sds-content-md-description\"\n style={\n Icon ? { paddingLeft: config.descriptionIndent } : undefined\n }\n >\n <Text font=\"secondary-body\" color=\"text-03\" as=\"p\">\n {description}\n </Text>\n </div>\n )}\n </>\n );\n\n if (rightChildren) {\n return (\n <div ref={ref} className={classes} data-has-right>\n <div className=\"sds-content-md-main\">{inner}</div>\n <div className=\"sds-content-right\">{rightChildren}</div>\n </div>\n );\n }\n\n return (\n <div ref={ref} className={classes}>\n {inner}\n </div>\n );\n },\n);\n","import { forwardRef, type ReactNode } from \"react\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport { Text, type TextFont } from \"../Text/Text\";\nimport { toPlainString, type RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ContentSmSizePreset = \"main-content\" | \"main-ui\" | \"secondary\";\nexport type ContentSmOrientation = \"vertical\" | \"inline\" | \"reverse\";\nexport type ContentSmProminence = \"default\" | \"muted\";\n\ninterface ContentSmPresetConfig {\n /** Icon width/height (CSS value). */\n iconSize: string;\n /** Padding on the icon container (CSS value). */\n iconContainerPadding: string;\n /** Font preset for the title. */\n titleFont: TextFont;\n /** Title line-height — also used as icon container min-height (CSS value). */\n lineHeight: string;\n /** Gap between icon container and title (CSS value). */\n gap: string;\n}\n\n/** Props for {@link ContentSm}. Does not support editing or descriptions. */\nexport interface ContentSmProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text (read-only — editing is not supported). */\n title: string | RichStr;\n /** Size preset. Default: `\"main-ui\"`. */\n sizePreset?: ContentSmSizePreset;\n /** Layout orientation. Default: `\"inline\"`. */\n orientation?: ContentSmOrientation;\n /** Title prominence. Default: `\"default\"`. */\n prominence?: ContentSmProminence;\n /**\n * Action slot rendered on the right side of the content row.\n * Naturally hosts a `ContentAction` trigger, button, badge, or arbitrary\n * nodes. When set, the root becomes a row pairing the content with the slot.\n */\n rightChildren?: ReactNode;\n /** Extra class for the root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Presets\n// ---------------------------------------------------------------------------\n\nconst CONTENT_SM_PRESETS: Record<ContentSmSizePreset, ContentSmPresetConfig> = {\n \"main-content\": {\n iconSize: \"1rem\",\n iconContainerPadding: \"0.25rem\",\n // DS lacks `main-content-body`; nearest is `main-content`.\n titleFont: \"main-content\",\n lineHeight: \"1.5rem\",\n gap: \"0.125rem\",\n },\n \"main-ui\": {\n iconSize: \"1rem\",\n iconContainerPadding: \"0.125rem\",\n titleFont: \"main-ui-action\",\n lineHeight: \"1.25rem\",\n gap: \"0.25rem\",\n },\n secondary: {\n iconSize: \"0.75rem\",\n iconContainerPadding: \"0.125rem\",\n titleFont: \"secondary-action\",\n lineHeight: \"1rem\",\n gap: \"0.125rem\",\n },\n};\n\n// ---------------------------------------------------------------------------\n// ContentSm — body-text layout (orientation-driven)\n// ---------------------------------------------------------------------------\n\nexport const ContentSm = forwardRef<HTMLDivElement, ContentSmProps>(\n function ContentSm(\n {\n icon: Icon,\n title,\n sizePreset = \"main-ui\",\n orientation = \"inline\",\n prominence = \"default\",\n rightChildren,\n className,\n },\n ref,\n ) {\n const config = CONTENT_SM_PRESETS[sizePreset];\n\n const classes = [\"sds-content-sm\", className].filter(Boolean).join(\" \");\n\n const inner = (\n <>\n {Icon && (\n <div\n className=\"sds-content-sm-icon-container\"\n style={{\n padding: config.iconContainerPadding,\n minHeight: config.lineHeight,\n }}\n >\n <Icon\n className=\"sds-content-sm-icon\"\n style={{ width: config.iconSize, height: config.iconSize }}\n />\n </div>\n )}\n\n <Text\n font={config.titleFont}\n color=\"inherit\"\n maxLines={1}\n title={toPlainString(title)}\n >\n {title}\n </Text>\n </>\n );\n\n if (rightChildren) {\n return (\n <div\n ref={ref}\n className={classes}\n data-prominence={prominence}\n data-has-right\n >\n <div\n className=\"sds-content-sm-main\"\n data-orientation={orientation}\n style={{ gap: config.gap }}\n >\n {inner}\n </div>\n <div className=\"sds-content-right\">{rightChildren}</div>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n className={classes}\n data-orientation={orientation}\n data-prominence={prominence}\n style={{ gap: config.gap }}\n >\n {inner}\n </div>\n );\n },\n);\n","import \"./content.css\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport { ContentXl, type ContentXlProps } from \"./ContentXl\";\nimport { ContentLg, type ContentLgProps } from \"./ContentLg\";\nimport {\n ContentMd,\n type ContentMdProps,\n type ContentMdAuxIcon,\n type ContentMdSuffix,\n} from \"./ContentMd\";\nimport {\n ContentSm,\n type ContentSmProps,\n type ContentSmOrientation,\n type ContentSmProminence,\n} from \"./ContentSm\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport type { TagProps } from \"../Tag/Tag\";\nimport type { RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Shared types\n// ---------------------------------------------------------------------------\n\nexport type SizePreset =\n | \"headline\"\n | \"section\"\n | \"main-content\"\n | \"main-ui\"\n | \"secondary\";\n\nexport type ContentVariant = \"heading\" | \"section\" | \"body\";\n\n/** Horizontal width preset for the wrapper. */\nexport type ContentWidth = \"auto\" | \"fit\" | \"full\";\n\ninterface ContentBaseProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description below the title. */\n description?: string | RichStr;\n /** Enable inline editing of the title. */\n editable?: boolean;\n /** Called when the user commits an edit. */\n onTitleChange?: (newTitle: string) => void;\n /**\n * Width preset controlling the component's horizontal size.\n *\n * - `\"auto\"` / `\"fit\"` — Shrink-wraps to content width\n * - `\"full\"` — Stretches to fill the parent's width\n *\n * @default \"full\"\n */\n width?: ContentWidth;\n /**\n * Opt out of the automatic interactive color override.\n *\n * When `Content` is nested inside an `.interactive` element, its title and\n * icon colors are normally overridden by the interactive foreground palette.\n * Set this to `true` to keep Content's own colors regardless of context.\n *\n * @default false\n */\n nonInteractive?: boolean;\n /**\n * Action slot rendered on the right side of the content row.\n *\n * Naturally hosts a `ContentAction` trigger, `Button`, `Badge`, or any\n * arbitrary node(s). When set, the resolved layout's root becomes a row that\n * pairs the content with a trailing, vertically-centered action slot. The\n * slot is forwarded to whichever internal layout (`ContentXl` / `Lg` / `Md`\n * / `Sm`) the `sizePreset` × `variant` combination resolves to.\n */\n rightChildren?: ReactNode;\n /** Extra class for the resolved layout's root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Discriminated union: valid sizePreset × variant combinations\n// ---------------------------------------------------------------------------\n\nexport type XlContentProps = ContentBaseProps & {\n /** Size preset. Default: `\"headline\"`. */\n sizePreset?: \"headline\" | \"section\";\n /** Variant. Default: `\"heading\"` for heading-eligible presets. */\n variant?: \"heading\";\n /** Optional secondary icon rendered in the icon row (ContentXl only). */\n moreIcon1?: IconComponent;\n /** Optional tertiary icon rendered in the icon row (ContentXl only). */\n moreIcon2?: IconComponent;\n};\n\nexport type LgContentProps = ContentBaseProps & {\n /** Size preset. Default: `\"headline\"`. */\n sizePreset?: \"headline\" | \"section\";\n /** Variant. */\n variant: \"section\";\n};\n\nexport type MdContentProps = ContentBaseProps & {\n sizePreset: \"main-content\" | \"main-ui\" | \"secondary\";\n variant?: \"section\";\n /** Muted suffix rendered beside the title. Use `\"optional\"` for \"(Optional)\". */\n suffix?: ContentMdSuffix;\n /** Auxiliary status icon rendered beside the title. */\n auxIcon?: ContentMdAuxIcon;\n /** Tag rendered beside the title. */\n tag?: TagProps;\n};\n\n/** ContentSm does not support descriptions or inline editing. */\nexport type SmContentProps = Omit<\n ContentBaseProps,\n \"description\" | \"editable\" | \"onTitleChange\"\n> & {\n sizePreset: \"main-content\" | \"main-ui\" | \"secondary\";\n variant: \"body\";\n /** Layout orientation. Default: `\"inline\"`. */\n orientation?: ContentSmOrientation;\n /** Title prominence. Default: `\"default\"`. */\n prominence?: ContentSmProminence;\n};\n\nexport type ContentProps =\n | XlContentProps\n | LgContentProps\n | MdContentProps\n | SmContentProps;\n\nconst WIDTH_CLASS: Record<ContentWidth, string> = {\n auto: \"sds-content-width-fit\",\n fit: \"sds-content-width-fit\",\n full: \"sds-content-width-full\",\n};\n\n// ---------------------------------------------------------------------------\n// Content — routes to the appropriate internal layout\n// ---------------------------------------------------------------------------\n\n/**\n * Two-axis layout that pairs an optional icon with a title and description,\n * routing to one of four internal layouts based on `sizePreset` × `variant`:\n *\n * | sizePreset | variant | layout |\n * |-----------------------|--------------------|-------------|\n * | headline / section | heading | ContentXl |\n * | headline / section | section | ContentLg |\n * | main-* / secondary | section / heading | ContentMd |\n * | main-* / secondary | body | ContentSm |\n */\nexport const Content = forwardRef<HTMLDivElement, ContentProps>(\n function Content(props, ref) {\n const {\n sizePreset = \"headline\",\n variant = \"heading\",\n width = \"full\",\n nonInteractive,\n ...rest\n } = props as ContentBaseProps & {\n sizePreset?: SizePreset;\n variant?: ContentVariant;\n };\n\n let layout: React.ReactNode = null;\n\n if (sizePreset === \"headline\" || sizePreset === \"section\") {\n if (variant === \"heading\") {\n layout = (\n <ContentXl\n sizePreset={sizePreset}\n ref={ref}\n {...(rest as Omit<ContentXlProps, \"sizePreset\">)}\n />\n );\n } else {\n layout = (\n <ContentLg\n sizePreset={sizePreset}\n ref={ref}\n {...(rest as Omit<ContentLgProps, \"sizePreset\">)}\n />\n );\n }\n } else if (variant === \"section\" || variant === \"heading\") {\n layout = (\n <ContentMd\n sizePreset={sizePreset}\n ref={ref}\n {...(rest as Omit<ContentMdProps, \"sizePreset\">)}\n />\n );\n } else if (variant === \"body\") {\n layout = (\n <ContentSm\n sizePreset={sizePreset}\n ref={ref}\n {...(rest as Omit<ContentSmProps, \"sizePreset\">)}\n />\n );\n }\n\n // This case should NEVER be hit.\n if (!layout)\n throw new Error(\n `Content: no layout matched for sizePreset=\"${sizePreset}\" variant=\"${variant}\"`,\n );\n\n return (\n <div\n className={WIDTH_CLASS[width]}\n data-non-interactive={nonInteractive || undefined}\n >\n {layout}\n </div>\n );\n },\n);\n","import { forwardRef, type ReactNode } from \"react\";\nimport { Content, type ContentProps } from \"../Content/Content\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/** Padding preset for the `Content` area. Mirrors the DS size scale. */\nexport type ContentActionPadding = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\";\n\nexport type ContentActionProps = ContentProps & {\n /** Content rendered on the right side, stretched to full height. */\n rightChildren?: ReactNode;\n /**\n * Padding applied around the `Content` area.\n *\n * @default \"lg\"\n */\n padding?: ContentActionPadding;\n /** Extra class for the root row `<div>`. */\n className?: string;\n};\n\nconst PADDING_VALUE: Record<ContentActionPadding, string> = {\n \"2xs\": \"var(--space-1)\", /* 4px */\n xs: \"var(--space-1)\", /* 4px */\n sm: \"var(--space-2)\", /* 8px */\n md: \"var(--space-2)\", /* 8px */\n lg: \"var(--space-3)\", /* 12px */\n};\n\n// ---------------------------------------------------------------------------\n// ContentAction\n// ---------------------------------------------------------------------------\n\n/**\n * A row layout that pairs a {@link Content} block with optional right-side\n * action children (e.g. buttons, badges).\n *\n * The `Content` area receives padding controlled by `padding`. The\n * `rightChildren` wrapper stretches to the full height of the row.\n */\nexport const ContentAction = forwardRef<HTMLDivElement, ContentActionProps>(\n function ContentAction(\n { rightChildren, padding = \"lg\", className, ...contentProps },\n ref,\n ) {\n const classes = [\"sds-content-action\", className].filter(Boolean).join(\" \");\n\n return (\n <div ref={ref} className={classes}>\n <div\n className=\"sds-content-action-main\"\n style={{ padding: PADDING_VALUE[padding] }}\n >\n <Content {...(contentProps as ContentProps)} />\n </div>\n {rightChildren && (\n <div className=\"sds-content-action-right\">{rightChildren}</div>\n )}\n </div>\n );\n },\n);\n","import {\n forwardRef,\n type HTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport styles from \"./InputLayouts.module.css\";\nimport { Text } from \"../Text/Text\";\nimport { type RichStr } from \"../Text/richstr\";\nimport { Separator } from \"../Separator/Separator\";\nimport { Tag, type TagProps } from \"../Tag/Tag\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport SvgXOctagon from \"../../icons/XOctagon\";\nimport SvgAlertCircle from \"../../icons/AlertCircle\";\n\n// ---------------------------------------------------------------------------\n// Label\n// ---------------------------------------------------------------------------\n\nexport interface LabelProps\n extends Omit<LabelHTMLAttributes<HTMLLabelElement>, \"htmlFor\"> {\n /** Sets `htmlFor` on the `<label>` to associate it with a form element by id. */\n label?: string;\n /** Switches cursor from `pointer` to `not-allowed`. */\n disabled?: boolean;\n}\n\n/**\n * Block-level `<label>` wrapper that stretches to fill its row and forwards\n * clicks to the associated form element (via `htmlFor`) or the first labelable\n * descendant.\n */\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(function Label(\n { label, disabled, className, ...props },\n ref,\n) {\n return (\n <label\n ref={ref}\n className={[styles.label, className].filter(Boolean).join(\" \")}\n htmlFor={label}\n data-disabled={disabled || undefined}\n {...props}\n />\n );\n});\n\n// ---------------------------------------------------------------------------\n// InputErrorText\n// ---------------------------------------------------------------------------\n\nexport type InputErrorType = \"error\" | \"warning\";\n\nexport interface InputErrorTextProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n children?: string | RichStr;\n type?: InputErrorType;\n}\n\n/**\n * Inline validation message with a leading status icon. `error` uses the\n * x-octagon glyph and error color; `warning` uses the alert-circle glyph and\n * warning color. The message text carries `role=\"alert\"` so assistive tech\n * announces it.\n */\nexport const InputErrorText = forwardRef<HTMLDivElement, InputErrorTextProps>(\n function InputErrorText({ children, type = \"error\", className, ...rest }, ref) {\n const Icon: IconComponent = type === \"error\" ? SvgXOctagon : SvgAlertCircle;\n return (\n <div\n ref={ref}\n className={[styles.errorText, styles[`error-${type}`], className]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n >\n <Icon className={styles.errorIcon} aria-hidden=\"true\" />\n <span role=\"alert\">\n <Text font=\"secondary-body\" color=\"inherit\">\n {children ?? \"\"}\n </Text>\n </span>\n </div>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// Shared title / description header\n// ---------------------------------------------------------------------------\n\ninterface InputLayoutProps {\n /**\n * Controls the `<label>` wrapper.\n *\n * - `false` (default) — no `<label>`.\n * - `true` — implicit `<label>` (no `htmlFor`). The browser forwards clicks\n * to the first labelable descendant.\n * - `string` — `<label htmlFor={string}>` associated with a form element by\n * id.\n */\n withLabel?: boolean | string;\n disabled?: boolean;\n children?: ReactNode;\n title: string | RichStr;\n description?: string | RichStr;\n suffix?: \"optional\" | (string & {});\n /** Categorical tag rendered beside the title. */\n tag?: TagProps;\n /** Validation error message, rendered through `InputErrorText`. */\n error?: string;\n /** Validation warning message, rendered through `InputErrorText`. */\n warning?: string;\n}\n\n/**\n * Renders the title + optional suffix + optional description block.\n *\n * NOTE: Opal routes this through its `Content` layout. The DS `Content` port is\n * being done in parallel and may not exist yet, so title/description are\n * rendered directly with `Text`: title in `main-ui-action`, suffix and\n * description in muted `secondary-body`.\n */\ninterface InputHeaderProps {\n title: string | RichStr;\n description?: string | RichStr;\n suffix?: string;\n tag?: TagProps;\n}\n\nfunction InputHeader({ title, description, suffix, tag }: InputHeaderProps) {\n return (\n <div className={styles.header}>\n <div className={styles.titleRow}>\n <Text font=\"main-ui-action\" color=\"text-05\">\n {title}\n </Text>\n {tag && <Tag {...tag} />}\n {suffix && (\n <Text font=\"secondary-body\" color=\"text-03\">\n {suffix}\n </Text>\n )}\n </div>\n {description && (\n <Text font=\"secondary-body\" color=\"text-04\">\n {description}\n </Text>\n )}\n </div>\n );\n}\n\n/** Picks the error message first, then warning, then renders nothing. */\nfunction InputValidation({\n error,\n warning,\n}: {\n error?: string;\n warning?: string;\n}) {\n if (error) return <InputErrorText type=\"error\">{error}</InputErrorText>;\n if (warning) return <InputErrorText type=\"warning\">{warning}</InputErrorText>;\n return null;\n}\n\nfunction maybeWrapInLabel(\n withLabel: boolean | string,\n disabled: boolean | undefined,\n content: ReactNode,\n): ReactNode {\n if (!withLabel) return content;\n const fieldName = typeof withLabel === \"string\" ? withLabel : undefined;\n return (\n <Label label={fieldName} disabled={disabled}>\n {content}\n </Label>\n );\n}\n\n// ---------------------------------------------------------------------------\n// InputVertical\n// ---------------------------------------------------------------------------\n\nexport interface InputVerticalProps extends InputLayoutProps {\n /** Smaller helper text rendered below the input. */\n subDescription?: string | RichStr;\n}\n\n/**\n * Stacks the title/description header above the input control, with optional\n * validation message and sub-description below. Set `withLabel` to wrap the\n * whole block in a `<label>`.\n */\nexport const InputVertical = forwardRef<HTMLDivElement, InputVerticalProps>(\n function InputVertical(\n {\n withLabel = false,\n disabled,\n children,\n subDescription,\n title,\n description,\n suffix,\n tag,\n error,\n warning,\n },\n ref,\n ) {\n const content = (\n <div ref={ref} className={styles.vertical}>\n <InputHeader title={title} description={description} suffix={suffix} tag={tag} />\n {children}\n <InputValidation error={error} warning={warning} />\n {subDescription && (\n <Text font=\"secondary-body\" color=\"text-04\">\n {subDescription}\n </Text>\n )}\n </div>\n );\n return <>{maybeWrapInLabel(withLabel, disabled, content)}</>;\n },\n);\n\n// ---------------------------------------------------------------------------\n// InputHorizontal\n// ---------------------------------------------------------------------------\n\nexport interface InputHorizontalProps extends InputLayoutProps {\n /** Vertically center the input against the label/description. */\n center?: boolean;\n}\n\n/**\n * Places the title/description header on the left and the input control on the\n * right of the same row, with an optional validation message below. Set\n * `center` to vertically center the control against the header.\n */\nexport const InputHorizontal = forwardRef<HTMLDivElement, InputHorizontalProps>(\n function InputHorizontal(\n {\n withLabel = false,\n disabled,\n children,\n center,\n title,\n description,\n suffix,\n tag,\n error,\n warning,\n },\n ref,\n ) {\n const content = (\n <div ref={ref} className={styles.horizontal}>\n <div\n className={[styles.row, center ? styles.rowCenter : null]\n .filter(Boolean)\n .join(\" \")}\n >\n <div className={styles.rowMain}>\n <InputHeader\n title={title}\n description={description}\n suffix={suffix}\n tag={tag}\n />\n </div>\n <div className={styles.rowAside}>{children}</div>\n </div>\n <InputValidation error={error} warning={warning} />\n </div>\n );\n return <>{maybeWrapInLabel(withLabel, disabled, content)}</>;\n },\n);\n\n// ---------------------------------------------------------------------------\n// InputDivider\n// ---------------------------------------------------------------------------\n\nexport type InputDividerProps = HTMLAttributes<HTMLDivElement>;\n\n/**\n * Padded horizontal rule between input rows. Wraps the DS `Separator` (the\n * equivalent of Opal's `Divider`) with consistent vertical spacing.\n */\nexport const InputDivider = forwardRef<HTMLDivElement, InputDividerProps>(\n function InputDivider({ className, ...rest }, ref) {\n return (\n <div\n ref={ref}\n className={[styles.divider, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <Separator />\n </div>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// InputPadder\n// ---------------------------------------------------------------------------\n\nexport type InputPadderProps = HTMLAttributes<HTMLDivElement>;\n\n/** Full-width padded container for grouping input rows. */\nexport const InputPadder = forwardRef<HTMLDivElement, InputPadderProps>(\n function InputPadder({ className, ...props }, ref) {\n return (\n <div\n ref={ref}\n className={[styles.padder, className].filter(Boolean).join(\" \")}\n {...props}\n />\n );\n },\n);\n","import { forwardRef, useMemo, type ReactNode, type SVGProps } from \"react\";\nimport styles from \"./MessageCard.module.css\";\nimport { ContentAction } from \"../ContentAction/ContentAction\";\nimport { Separator } from \"../Separator/Separator\";\nimport { Interactive } from \"../Interactive/Interactive\";\nimport type { RichStr } from \"../Text/richstr\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport SvgAlertCircle from \"../../icons/AlertCircle\";\nimport SvgAlertTriangle from \"../../icons/AlertTriangle\";\nimport SvgCheckCircle from \"../../icons/CheckCircle\";\nimport SvgX from \"../../icons/X\";\nimport SvgXOctagon from \"../../icons/XOctagon\";\n\nexport type MessageCardVariant = \"default\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\ninterface MessageCardBaseProps {\n /** Visual variant controlling background, border, and icon. Default: `\"default\"`. */\n variant?: MessageCardVariant;\n /** Override the variant's default icon. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description below the title. */\n description?: string | RichStr;\n /** Padding preset. Default: `\"sm\"`. */\n padding?: \"sm\" | \"xs\";\n /** Content rendered below a divider, under the main content area. */\n bottomChildren?: ReactNode;\n}\n\nexport type MessageCardProps = MessageCardBaseProps &\n (\n | {\n /** Right-side content. Mutually exclusive with `onClose`. */\n rightChildren?: ReactNode;\n onClose?: never;\n }\n | {\n rightChildren?: never;\n /** Close button callback. Mutually exclusive with `rightChildren`. */\n onClose?: () => void;\n }\n );\n\nconst VARIANT_ICON: Record<MessageCardVariant, IconComponent> = {\n default: SvgAlertCircle,\n info: SvgAlertCircle,\n success: SvgCheckCircle,\n warning: SvgAlertTriangle,\n error: SvgXOctagon,\n};\n\n/**\n * Card-level status block: inline message, alert, or notification. Uses\n * `ContentAction` for the icon + title + description + right-actions layout.\n * Page-level announcements stay with `Banner`; this is for in-flow surfaces.\n */\nexport const MessageCard = forwardRef<HTMLDivElement, MessageCardProps>(function MessageCard(\n {\n variant = \"default\",\n icon: iconOverride,\n title,\n description,\n padding = \"sm\",\n bottomChildren,\n rightChildren,\n onClose,\n },\n ref,\n) {\n const Icon = iconOverride ?? VARIANT_ICON[variant];\n // Wrapper injects the variant color class; DS icons stroke currentColor.\n // Memoized on Icon so the SVG keeps a stable component identity.\n const ColoredIcon = useMemo(\n () =>\n function ColoredIcon(props: SVGProps<SVGSVGElement>) {\n return (\n <Icon {...props} className={[styles.icon, props.className].filter(Boolean).join(\" \")} />\n );\n },\n [Icon],\n );\n\n const right = onClose ? (\n <Interactive.Stateless\n variant=\"default\"\n prominence=\"internal\"\n type=\"button\"\n onClick={onClose}\n >\n <Interactive.Container type=\"button\" size=\"md\" rounding=\"sm\" aria-label=\"Close\">\n <SvgX className={styles.closeIcon} />\n </Interactive.Container>\n </Interactive.Stateless>\n ) : (\n rightChildren\n );\n\n return (\n <div\n ref={ref}\n className={[styles.card, styles[`pad-${padding}`]].join(\" \")}\n data-variant={variant}\n >\n <ContentAction\n icon={ColoredIcon}\n title={title}\n description={description}\n sizePreset=\"main-ui\"\n variant=\"section\"\n padding=\"md\"\n rightChildren={right}\n />\n {bottomChildren && (\n <>\n <Separator />\n {bottomChildren}\n </>\n )}\n </div>\n );\n});\n","import { forwardRef } from \"react\";\nimport styles from \"./EmptyMessageCard.module.css\";\nimport { Card } from \"../Card/Card\";\nimport { Content } from \"../Content/Content\";\nimport type { RichStr } from \"../Text/richstr\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport SvgBoxes from \"../../icons/Boxes\";\n\nexport type EmptyMessageCardPadding = \"none\" | \"sm\" | \"md\" | \"lg\";\n\ninterface EmptyMessageCardBaseProps {\n /** Icon displayed beside the title. Default: `SvgBoxes`. */\n icon?: IconComponent;\n /** Primary message text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Card padding preset. Default: `\"md\"`. */\n padding?: EmptyMessageCardPadding;\n className?: string;\n}\n\nexport type EmptyMessageCardProps =\n | (EmptyMessageCardBaseProps & {\n /** Compact single-line message. Default. */\n sizePreset?: \"secondary\";\n })\n | (EmptyMessageCardBaseProps & {\n sizePreset: \"main-ui\";\n /** Optional description below the title. */\n description?: string | RichStr;\n });\n\n/**\n * Inline dashed-border placeholder for empty slots: empty lists, empty\n * sections, \"nothing here yet\" rows. Page-level empty states stay with\n * `EmptyState`; this is for in-flow surfaces.\n */\nexport const EmptyMessageCard = forwardRef<HTMLDivElement, EmptyMessageCardProps>(\n function EmptyMessageCard(props, ref) {\n const { sizePreset = \"secondary\", icon = SvgBoxes, title, padding = \"md\", className } = props;\n\n return (\n <Card\n ref={ref}\n border=\"dashed\"\n padding={padding}\n rounding=\"md\"\n className={[styles.transparent, className].filter(Boolean).join(\" \")}\n >\n {sizePreset === \"secondary\" ? (\n <Content icon={icon} title={title} sizePreset=\"secondary\" variant=\"body\" prominence=\"muted\" />\n ) : (\n <Content\n icon={icon}\n title={title}\n description={\"description\" in props ? props.description : undefined}\n sizePreset=\"main-ui\"\n variant=\"section\"\n />\n )}\n </Card>\n );\n },\n);\n","import { createElement, forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./IllustrationContent.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type IllustrationHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\nexport type IllustrationSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface IllustrationContentProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** Illustration glyph — e.g. one of the `./illustrations` stroke SVGs. */\n illustration?: ReactNode;\n /** Title. Supports `markdown()` and arbitrary nodes. */\n title: ReactNode | RichStr;\n /** Heading level for the title. Default: 3. */\n titleLevel?: IllustrationHeadingLevel;\n /** Supporting copy below the title. */\n description?: ReactNode | RichStr;\n /** Optional action slot (buttons, links) below the text. */\n actions?: ReactNode;\n /** Illustration size. Default: `\"md\"` (64px). `sm`=48px, `lg`=96px. */\n size?: IllustrationSize;\n /** Horizontal alignment of the stack. Default: `\"center\"`. */\n align?: \"center\" | \"start\";\n}\n\n/**\n * Centered illustration + title + description layout (with optional actions).\n * Pairs the `./illustrations` glyphs with copy for empty / error / permission\n * states. The illustration inherits `currentColor`; size it via the `size`\n * prop, which sets the glyph's `font-size`.\n */\nexport const IllustrationContent = forwardRef<HTMLDivElement, IllustrationContentProps>(\n function IllustrationContent(\n {\n illustration,\n title,\n titleLevel = 3,\n description,\n actions,\n size = \"md\",\n align = \"center\",\n className,\n ...rest\n },\n ref,\n ) {\n return (\n <div\n ref={ref}\n className={[styles.root, styles[`align-${align}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {illustration ? (\n <div className={[styles.illu, styles[`size-${size}`]].join(\" \")} aria-hidden=\"true\">\n {illustration}\n </div>\n ) : null}\n {createElement(`h${titleLevel}`, { className: styles.title }, resolveNode(title))}\n {description ? <div className={styles.desc}>{resolveNode(description)}</div> : null}\n {actions ? <div className={styles.actions}>{actions}</div> : null}\n </div>\n );\n },\n);\n","/**\n * AccountMenu\n *\n * The bottom-of-rail account cluster (à la nous): an avatar that opens a\n * dropdown with an identity header and consumer-supplied items (Settings,\n * Download, Log out, …). One item can reveal a **notifications** view inside\n * the same dropdown, and the unread count surfaces as a badge on both the\n * avatar and that item.\n *\n * Notifications render as a second VIEW of the same dropdown (not a separate\n * popover) — selecting the item swaps the menu content to a back-bar + the\n * consumer's panel. Keeping it in one overlay sidesteps the menu→popover\n * dismiss race (where the click that closes the menu also dismisses the\n * popover). The consumer owns the notifications data/panel, item actions, and\n * any confirm dialogs.\n *\n * Composed from DS Avatar + DropdownMenu. Tokens only.\n */\nimport { forwardRef, Fragment, useState, type ReactNode } from \"react\";\nimport { Avatar, type AvatarTone, type AvatarSize } from \"../../components/Avatar\";\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n} from \"../../components/DropdownMenu\";\nimport { SvgArrowLeft } from \"../../icons\";\nimport styles from \"./AccountMenu.module.css\";\n\nconst cx = (...parts: Array<string | false | null | undefined>) => parts.filter(Boolean).join(\" \");\n\nexport interface AccountMenuItem {\n /** Stable key. */\n id: string;\n label: ReactNode;\n /** Leading glyph (consumer-supplied, ~16px). */\n icon?: ReactNode;\n /** `danger` renders the destructive tone (e.g. Log out). */\n tone?: \"default\" | \"danger\";\n /** Chosen via click/Enter. Ignored when `opensNotifications` is set. */\n onSelect?: () => void;\n /**\n * Marks this as the notifications row: selecting it swaps the dropdown to the\n * notifications view (see `notifications`) instead of firing `onSelect`, and\n * it shows the unread badge.\n */\n opensNotifications?: boolean;\n /** Render a divider above this row (e.g. to set Log out apart). */\n separatorBefore?: boolean;\n}\n\nexport interface AccountMenuNotifications {\n /** Unread count → badge on the avatar and the notifications item. */\n count?: number;\n /**\n * The notifications body. May be a render function receiving a `close`\n * callback — call it after navigating from a notification to dismiss the menu.\n */\n panel: ReactNode | ((close: () => void) => ReactNode);\n /** Title shown in the notifications view's back-bar. Default \"Notifications\". */\n title?: ReactNode;\n}\n\nexport interface AccountMenuProps {\n name?: ReactNode;\n email?: ReactNode;\n initials?: ReactNode;\n avatarSrc?: string;\n avatarAlt?: string;\n avatarTone?: AvatarTone;\n avatarSize?: AvatarSize;\n items: AccountMenuItem[];\n /**\n * Trigger shape. `\"avatar\"` (default) is the bare avatar (for a narrow rail).\n * `\"bar\"` is a full-width row — avatar + name/email — for a wide sidebar.\n */\n triggerVariant?: \"avatar\" | \"bar\";\n /** Notifications config; omit to disable the notifications affordance. */\n notifications?: AccountMenuNotifications;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n align?: \"start\" | \"center\" | \"end\";\n sideOffset?: number;\n \"aria-label\"?: string;\n className?: string;\n}\n\nconst formatBadge = (n: number) => (n > 99 ? \"99+\" : String(n));\n\nexport const AccountMenu = forwardRef<HTMLButtonElement, AccountMenuProps>(function AccountMenu(\n {\n name,\n email,\n initials,\n avatarSrc,\n avatarAlt,\n avatarTone = \"brand\",\n avatarSize = \"md\",\n items,\n triggerVariant = \"avatar\",\n notifications,\n side = \"right\",\n align = \"end\",\n sideOffset = 12,\n \"aria-label\": ariaLabel = \"Account\",\n className,\n },\n ref,\n) {\n const [open, setOpen] = useState(false);\n const [view, setView] = useState<\"menu\" | \"notifications\">(\"menu\");\n\n const count = notifications?.count ?? 0;\n const hasUnread = count > 0;\n const close = () => setOpen(false);\n\n const onOpenChange = (next: boolean) => {\n setOpen(next);\n if (!next) setView(\"menu\"); // always reopen on the account view\n };\n\n return (\n <DropdownMenu open={open} onOpenChange={onOpenChange}>\n <DropdownMenuTrigger asChild>\n <button\n ref={ref}\n type=\"button\"\n aria-label={ariaLabel}\n className={cx(triggerVariant === \"bar\" ? styles.triggerBar : styles.trigger, className)}\n >\n <span className={styles.avatarWrap}>\n <Avatar src={avatarSrc} alt={avatarAlt} tone={avatarTone} size={avatarSize}>\n {initials}\n </Avatar>\n {notifications && hasUnread ? (\n <span className={styles.avatarBadge} aria-hidden=\"true\">\n {formatBadge(count)}\n </span>\n ) : null}\n </span>\n {triggerVariant === \"bar\" ? (\n <span className={styles.barIdentity}>\n {name ? <span className={styles.identityName}>{name}</span> : null}\n {email ? <span className={styles.identityEmail}>{email}</span> : null}\n </span>\n ) : null}\n </button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent\n side={side}\n align={align}\n sideOffset={sideOffset}\n className={view === \"notifications\" ? styles.notifContent : undefined}\n >\n {view === \"menu\" ? (\n <>\n {name || email ? (\n <>\n <DropdownMenuLabel>\n {name ? <span className={styles.identityName}>{name}</span> : null}\n {email ? <span className={styles.identityEmail}>{email}</span> : null}\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n </>\n ) : null}\n\n {items.map((item) => (\n <Fragment key={item.id}>\n {item.separatorBefore ? <DropdownMenuSeparator /> : null}\n {item.opensNotifications ? (\n <DropdownMenuItem\n icon={item.icon}\n tone={item.tone}\n shortcut={\n notifications && hasUnread ? (\n <span className={styles.itemBadge}>{formatBadge(count)}</span>\n ) : undefined\n }\n // Keep the dropdown open and swap to the notifications view.\n onSelect={(e) => {\n e.preventDefault();\n setView(\"notifications\");\n }}\n >\n {item.label}\n </DropdownMenuItem>\n ) : (\n <DropdownMenuItem icon={item.icon} tone={item.tone} onClick={item.onSelect}>\n {item.label}\n </DropdownMenuItem>\n )}\n </Fragment>\n ))}\n </>\n ) : (\n <div className={styles.notifView}>\n <div className={styles.notifBar}>\n <button\n type=\"button\"\n className={styles.backButton}\n aria-label=\"Back\"\n onClick={() => setView(\"menu\")}\n >\n <SvgArrowLeft width={16} height={16} aria-hidden=\"true\" />\n </button>\n {notifications?.title ? <span className={styles.notifTitle}>{notifications.title}</span> : null}\n </div>\n <div className={styles.notifBody}>\n {notifications\n ? typeof notifications.panel === \"function\"\n ? notifications.panel(close)\n : notifications.panel\n : null}\n </div>\n </div>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n});\n","import {\n Children,\n createContext,\n forwardRef,\n isValidElement,\n useCallback,\n useContext,\n useRef,\n useState,\n type ButtonHTMLAttributes,\n type ComponentType,\n type HTMLAttributes,\n type MouseEvent as ReactMouseEvent,\n type PointerEvent as ReactPointerEvent,\n type ReactNode,\n type SVGProps,\n} from \"react\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport styles from \"./AppShell.module.css\";\n\nconst cx = (...parts: Array<string | false | null | undefined>) =>\n parts.filter(Boolean).join(\" \");\n\n// Static marker used by Root/Main to place a child in the correct region\n// without forcing the consumer to nest extra wrappers. The compound parts\n// carry this so the spec's flat JSX (Rail/Sidebar/Main as direct Root children)\n// works while the mobile-drawer wrapper still groups rail + sidebar.\ntype ShellRole = \"drawer\" | \"header\" | \"footer\";\nconst ROLE = \"__appShellRole\" as const;\nconst roleOf = (node: ReactNode): ShellRole | undefined =>\n isValidElement(node)\n ? ((node.type as { [ROLE]?: ShellRole })[ROLE] ?? undefined)\n : undefined;\n\n// ---------------------------------------------------------------------------\n// Context — shared, optional state. Controlled props on Root/Rail/Sidebar\n// always win; the Provider only fills the gaps (uncontrolled convenience).\n// It owns NO persistence and NO keyboard shortcut — those stay in the consumer.\n// ---------------------------------------------------------------------------\n\ninterface AppShellContextValue {\n drawerOpen: boolean;\n setDrawerOpen: (open: boolean) => void;\n railCollapsed: boolean;\n setRailCollapsed: (collapsed: boolean) => void;\n sidebarFolded: boolean;\n setSidebarFolded: (folded: boolean) => void;\n}\n\nconst AppShellContext = createContext<AppShellContextValue | null>(null);\n\n/**\n * Access the shared shell state when an {@link AppShellProvider} is mounted.\n * Returns `null` outside a provider (controlled usage never needs it).\n */\nexport function useAppShell(): AppShellContextValue | null {\n return useContext(AppShellContext);\n}\n\nexport interface AppShellProviderProps {\n children: ReactNode;\n defaultRailCollapsed?: boolean;\n defaultSidebarFolded?: boolean;\n defaultDrawerOpen?: boolean;\n}\n\n/**\n * Optional uncontrolled holder for the three shell states (rail collapse,\n * sidebar fold, mobile drawer). Convenience only — controlled props on Root /\n * Rail / Sidebar work without it. Deliberately omits persistence and the\n * `Cmd/Ctrl+E` shortcut; the consuming app owns those.\n */\nfunction AppShellProvider({\n children,\n defaultRailCollapsed = false,\n defaultSidebarFolded = false,\n defaultDrawerOpen = false,\n}: AppShellProviderProps) {\n const [drawerOpen, setDrawerOpen] = useState(defaultDrawerOpen);\n const [railCollapsed, setRailCollapsed] = useState(defaultRailCollapsed);\n const [sidebarFolded, setSidebarFolded] = useState(defaultSidebarFolded);\n return (\n <AppShellContext.Provider\n value={{\n drawerOpen,\n setDrawerOpen,\n railCollapsed,\n setRailCollapsed,\n sidebarFolded,\n setSidebarFolded,\n }}\n >\n {children}\n </AppShellContext.Provider>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Root — the rounded shell card. Groups Rail + Sidebar into the mobile-drawer\n// wrapper (which dissolves to `display: contents` at the md breakpoint so they\n// participate directly in the flex row); everything else renders in-row.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellRootProps extends HTMLAttributes<HTMLDivElement> {\n /** Controlled mobile-drawer open state. Falls back to the Provider. */\n drawerOpen?: boolean;\n onDrawerOpenChange?: (open: boolean) => void;\n /**\n * Surface treatment. `\"glass\"` (default) is the translucent/blurred shell.\n * `\"solid\"` swaps every region (rail, sidebar, drawer, main) to opaque\n * theme surfaces with no backdrop blur — a flat dark shell in the dark\n * theme. Tunable via the `--shell-solid-*` CSS variables.\n */\n surface?: \"glass\" | \"solid\";\n}\n\nconst AppShellRoot = forwardRef<HTMLDivElement, AppShellRootProps>(function AppShellRoot(\n { drawerOpen, onDrawerOpenChange, surface = \"glass\", children, className, ...rest },\n ref,\n) {\n const ctx = useContext(AppShellContext);\n const open = drawerOpen ?? ctx?.drawerOpen ?? false;\n const setOpen = onDrawerOpenChange ?? ctx?.setDrawerOpen;\n\n const drawerChildren: ReactNode[] = [];\n const rowChildren: ReactNode[] = [];\n Children.forEach(children, (child) => {\n if (roleOf(child) === \"drawer\") drawerChildren.push(child);\n else rowChildren.push(child);\n });\n\n return (\n <div ref={ref} className={cx(styles.root, className)} data-surface={surface} {...rest}>\n <span className={styles.topAccent} aria-hidden=\"true\" />\n <button\n type=\"button\"\n className={styles.scrim}\n data-open={open ? \"true\" : \"false\"}\n aria-hidden={!open}\n tabIndex={open ? 0 : -1}\n aria-label=\"Close navigation\"\n onClick={() => setOpen?.(false)}\n />\n <div className={styles.drawer} data-open={open ? \"true\" : \"false\"}>\n {drawerChildren}\n </div>\n {rowChildren}\n </div>\n );\n});\n\n// ---------------------------------------------------------------------------\n// Rail — vertical activity navigation. Width is fit-content (so longer locale\n// labels can widen it up to a cap); collapse animates max-width because\n// fit-content cannot interpolate.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellRailProps extends HTMLAttributes<HTMLElement> {\n /** Controlled collapse. Falls back to the Provider. */\n collapsed?: boolean;\n /** Top slot — typically the product logo. */\n header?: ReactNode;\n /** Bottom slot — typically avatar / settings. */\n footer?: ReactNode;\n}\n\nconst AppShellRail = forwardRef<HTMLElement, AppShellRailProps>(function AppShellRail(\n { collapsed, header, footer, children, className, \"aria-label\": ariaLabel, ...rest },\n ref,\n) {\n const ctx = useContext(AppShellContext);\n const isCollapsed = collapsed ?? ctx?.railCollapsed ?? false;\n return (\n <nav\n ref={ref}\n className={cx(styles.rail, className)}\n data-collapsed={isCollapsed ? \"true\" : \"false\"}\n aria-label={ariaLabel ?? \"Sidebar activities\"}\n aria-hidden={isCollapsed || undefined}\n {...rest}\n >\n {header ? <div className={styles.railHeader}>{header}</div> : null}\n <div className={styles.railItems}>{children}</div>\n {footer ? <div className={styles.railFooter}>{footer}</div> : null}\n </nav>\n );\n});\n(AppShellRail as { [ROLE]?: ShellRole })[ROLE] = \"drawer\";\n\n// ---------------------------------------------------------------------------\n// RailItem — stacked icon over an 11px label, with a selection pill. Renders a\n// <button> by default; `asChild` slots the consumer's <a>/<Link> as the host\n// element (for SPA routing / real hrefs) while RailItem keeps the visual\n// content via Radix Slottable.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellRailItemProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"onSelect\"> {\n /** Icon component, rendered at 24px. */\n icon?: ComponentType<SVGProps<SVGSVGElement>>;\n label: ReactNode;\n selected?: boolean;\n onSelect?: () => void;\n /** Render onto the single child element (e.g. a router `<Link>`). */\n asChild?: boolean;\n /**\n * Icon-only: hide the stacked label, leaving just the glyph — for a compact\n * rail that surfaces the name via a hover tooltip instead. A string `label`\n * is still applied as the element's `aria-label` so the control keeps its\n * accessible name. Default `false` (label shown).\n */\n hideLabel?: boolean;\n}\n\nconst AppShellRailItem = forwardRef<HTMLButtonElement, AppShellRailItemProps>(\n function AppShellRailItem(\n { icon: Icon, label, selected = false, onSelect, asChild = false, hideLabel = false, className, children, onClick, \"aria-label\": ariaLabel, ...rest },\n ref,\n ) {\n const Comp = asChild ? Slot : \"button\";\n // When the label is hidden, keep an accessible name: prefer an explicit\n // aria-label, else a string label.\n const accessibleName =\n ariaLabel ?? (hideLabel && typeof label === \"string\" ? label : undefined);\n // Compose any externally-supplied onClick (e.g. injected by a wrapping\n // Radix Tooltip/Popover trigger via asChild) with onSelect. Pulling\n // `onClick` out of `...rest` is essential: spreading rest last would\n // otherwise overwrite our handler and silently drop onSelect (the trigger's\n // onClick only closes the tooltip), so the item would stop navigating.\n const handleClick = (event: ReactMouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onSelect?.();\n };\n return (\n <Comp\n ref={ref}\n className={cx(styles.railItem, hideLabel && styles.railItemIconOnly, className)}\n data-selected={selected ? \"true\" : \"false\"}\n {...(accessibleName ? { \"aria-label\": accessibleName } : {})}\n {...(asChild ? {} : { type: \"button\", \"aria-pressed\": selected })}\n {...rest}\n onClick={handleClick}\n >\n {/* In asChild mode this element becomes the host (the consumer's <a>);\n the pill/icon/label below become its children. */}\n <Slottable>{asChild ? children : null}</Slottable>\n {selected ? <span className={styles.railItemPill} aria-hidden=\"true\" /> : null}\n {Icon ? <Icon className={styles.railItemIcon} width={24} height={24} aria-hidden=\"true\" /> : null}\n {hideLabel ? null : <span className={styles.railItemLabel}>{label}</span>}\n </Comp>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// Sidebar — contextual panel. Width is consumed from a CSS variable (default\n// `--app-sidebar-w`); the optional resize handle writes that variable\n// imperatively to documentElement and toggles `data-resizing` (the attribute\n// other components key off to opt out of transitions), matching the existing\n// nous ResizeHandle mechanism. No controlled width prop, no built-in persist.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellSidebarProps extends HTMLAttributes<HTMLElement> {\n /** Controlled fold. Falls back to the Provider. */\n folded?: boolean;\n /** CSS variable the width lives in. Default `--app-sidebar-w`. */\n widthVar?: string;\n /** Fallback width when the variable is unset. Default `15rem`. */\n defaultWidth?: string;\n /** Clamp (px) applied by the resize handle. */\n minWidth?: number;\n maxWidth?: number;\n resizable?: boolean;\n /** Fires on drag end (and double-click reset) so the consumer can persist. */\n onWidthCommit?: (px: number) => void;\n}\n\nconst AppShellSidebar = forwardRef<HTMLElement, AppShellSidebarProps>(function AppShellSidebar(\n {\n folded,\n widthVar = \"--app-sidebar-w\",\n defaultWidth = \"15rem\",\n minWidth,\n maxWidth,\n resizable = false,\n onWidthCommit,\n children,\n className,\n style,\n ...rest\n },\n ref,\n) {\n const ctx = useContext(AppShellContext);\n const isFolded = folded ?? ctx?.sidebarFolded ?? false;\n const innerRef = useRef<HTMLElement | null>(null);\n\n const setRefs = useCallback(\n (node: HTMLElement | null) => {\n innerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as { current: HTMLElement | null }).current = node;\n },\n [ref],\n );\n\n const clamp = useCallback(\n (px: number) => {\n let next = px;\n if (typeof minWidth === \"number\") next = Math.max(minWidth, next);\n if (typeof maxWidth === \"number\") next = Math.min(maxWidth, next);\n return next;\n },\n [minWidth, maxWidth],\n );\n\n const startDrag = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n event.preventDefault();\n const docEl = document.documentElement;\n const startX = event.clientX;\n const startWidth = innerRef.current?.getBoundingClientRect().width ?? 0;\n docEl.setAttribute(\"data-resizing\", \"\");\n\n const onMove = (ev: PointerEvent) => {\n const next = clamp(startWidth + (ev.clientX - startX));\n docEl.style.setProperty(widthVar, `${next}px`);\n };\n const onUp = () => {\n window.removeEventListener(\"pointermove\", onMove);\n window.removeEventListener(\"pointerup\", onUp);\n docEl.removeAttribute(\"data-resizing\");\n const committed = parseFloat(docEl.style.getPropertyValue(widthVar));\n if (!Number.isNaN(committed)) onWidthCommit?.(committed);\n };\n window.addEventListener(\"pointermove\", onMove);\n window.addEventListener(\"pointerup\", onUp);\n },\n [clamp, widthVar, onWidthCommit],\n );\n\n // Double-click resets to the default width and reports the measured px.\n const resetWidth = useCallback(() => {\n document.documentElement.style.setProperty(widthVar, defaultWidth);\n const px = innerRef.current?.getBoundingClientRect().width;\n if (px) onWidthCommit?.(px);\n }, [widthVar, defaultWidth, onWidthCommit]);\n\n return (\n <aside\n ref={setRefs}\n className={cx(styles.sidebar, className)}\n data-folded={isFolded ? \"true\" : \"false\"}\n style={{ [\"--shell-sidebar-width\" as string]: `var(${widthVar}, ${defaultWidth})`, ...style }}\n {...rest}\n >\n <div className={styles.sidebarInner}>{children}</div>\n {resizable ? (\n <div\n role=\"separator\"\n aria-orientation=\"vertical\"\n aria-label=\"Resize sidebar\"\n tabIndex={0}\n className={styles.resizeHandle}\n onPointerDown={startDrag}\n onDoubleClick={resetWidth}\n />\n ) : null}\n </aside>\n );\n});\n(AppShellSidebar as { [ROLE]?: ShellRole })[ROLE] = \"drawer\";\n\n// ---------------------------------------------------------------------------\n// SingleSidebar — the \"one sidebar\" shell variant: a single full-height,\n// collapsible sidebar (nav + contextual content together) flush against the\n// content pane, instead of the Rail + contextual-Sidebar split. Frosted glass\n// over the aurora by default (`--shell-region-glass` + blur) or an opaque solid\n// surface (`--surface-s1`); a divider separates it from Main and the Root's\n// rounded card clips its outer corners. The consumer fills it with content\n// (brand, nav, projects, a pinned `mt-auto` footer) and reads `collapsed` to\n// render icon-only when narrow — this component owns only the panel chrome +\n// the collapse WIDTH. Pair with `--shell-main-backdrop` on Main to keep the\n// content pane opaque while the sidebar is glass (or the inverse).\n// ---------------------------------------------------------------------------\n\nexport interface AppShellSingleSidebarProps extends HTMLAttributes<HTMLElement> {\n /** Frosted glass over the aurora (true, default) or an opaque solid surface. */\n glass?: boolean;\n /** Collapsed (icon-only) width. Falls back to the Provider's sidebarFolded. */\n collapsed?: boolean;\n /** Expanded width in px. Default 232. */\n expandedWidth?: number;\n /** Collapsed width in px. Default 64. */\n collapsedWidth?: number;\n}\n\nconst AppShellSingleSidebar = forwardRef<HTMLElement, AppShellSingleSidebarProps>(\n function AppShellSingleSidebar(\n {\n glass = true,\n collapsed,\n expandedWidth = 232,\n collapsedWidth = 64,\n children,\n className,\n style,\n \"aria-label\": ariaLabel,\n ...rest\n },\n ref,\n ) {\n const ctx = useContext(AppShellContext);\n const isCollapsed = collapsed ?? ctx?.sidebarFolded ?? false;\n return (\n <aside\n ref={ref}\n className={cx(styles.singleSidebar, className)}\n data-glass={glass ? \"true\" : \"false\"}\n data-collapsed={isCollapsed ? \"true\" : \"false\"}\n aria-label={ariaLabel ?? \"Sidebar\"}\n style={{ width: isCollapsed ? collapsedWidth : expandedWidth, ...style }}\n {...rest}\n >\n {children}\n </aside>\n );\n },\n);\n(AppShellSingleSidebar as { [ROLE]?: ShellRole })[ROLE] = \"drawer\";\n\n// ---------------------------------------------------------------------------\n// SidebarToggle — the header chrome button that folds/unfolds the Sidebar.\n// Ported from the nous header fold toggle (28px icon-only button, panel-layout\n// glyph, --shell-chrome-hover-bg hover). Controlled via `folded` /\n// `onFoldedChange`, falling back to the Provider. Deliberately owns NO\n// keyboard shortcut and NO persistence — those stay in the consumer.\n// ---------------------------------------------------------------------------\n\nconst SidebarToggleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" width={16} height={16} {...props}>\n <path stroke=\"currentColor\" strokeWidth={1.5} d=\"M2.5 9h19M8 21.5V9\" />\n <path\n stroke=\"currentColor\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n d=\"M5.5 21.5h13a3 3 0 0 0 3-3v-13a3 3 0 0 0-3-3h-13a3 3 0 0 0-3 3v13a3 3 0 0 0 3 3Z\"\n />\n </svg>\n);\n\nexport interface AppShellSidebarToggleProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n /** Controlled fold state. Falls back to the Provider. */\n folded?: boolean;\n /** Receives the next fold state. Falls back to the Provider. */\n onFoldedChange?: (folded: boolean) => void;\n}\n\nconst AppShellSidebarToggle = forwardRef<HTMLButtonElement, AppShellSidebarToggleProps>(\n function AppShellSidebarToggle(\n { folded, onFoldedChange, className, onClick, \"aria-label\": ariaLabel, ...rest },\n ref,\n ) {\n const ctx = useContext(AppShellContext);\n const isFolded = folded ?? ctx?.sidebarFolded ?? false;\n const setFolded = onFoldedChange ?? ctx?.setSidebarFolded;\n return (\n <button\n ref={ref}\n type=\"button\"\n className={cx(styles.sidebarToggle, className)}\n aria-label={ariaLabel ?? \"Toggle sidebar\"}\n aria-expanded={!isFolded}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) setFolded?.(!isFolded);\n }}\n {...rest}\n >\n <SidebarToggleIcon aria-hidden=\"true\" />\n </button>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// Main — header bar, scrollable content, footer. Renders a backdrop underlay\n// (region glass, or a frosted custom background image when `backgroundCss` is\n// supplied). Header/MainFooter children are pulled to the top/bottom; the rest\n// becomes the scroll container (carries `data-main-container` + a container\n// query for portal-targeting parity).\n// ---------------------------------------------------------------------------\n\nexport interface AppShellMainProps extends HTMLAttributes<HTMLElement> {\n /** A CSS `background` value painted behind the frost layer. */\n backgroundCss?: string;\n}\n\nconst AppShellMain = forwardRef<HTMLElement, AppShellMainProps>(function AppShellMain(\n { backgroundCss, children, className, ...rest },\n ref,\n) {\n let header: ReactNode = null;\n let footer: ReactNode = null;\n const content: ReactNode[] = [];\n Children.forEach(children, (child) => {\n const role = roleOf(child);\n if (role === \"header\") header = child;\n else if (role === \"footer\") footer = child;\n else content.push(child);\n });\n\n return (\n <section ref={ref} className={cx(styles.main, className)} {...rest}>\n <div className={styles.mainBackdrop} aria-hidden=\"true\">\n {backgroundCss ? (\n <>\n <div className={styles.mainBackdropImage} style={{ background: backgroundCss }} />\n <div className={styles.mainBackdropFrost} />\n </>\n ) : null}\n </div>\n {header}\n <div className={styles.mainContent} data-main-container=\"\">\n {content}\n </div>\n {footer}\n </section>\n );\n});\n\n// ---------------------------------------------------------------------------\n// Header — full-width 3-region bar. Left/right take flex-1 on desktop so the\n// center stays centered; on mobile they shrink to a 10% basis.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellHeaderProps extends HTMLAttributes<HTMLElement> {\n left?: ReactNode;\n center?: ReactNode;\n right?: ReactNode;\n /**\n * Full-width custom content. When provided, the 3-region (left/center/right)\n * layout is bypassed and `children` fill the bar — for consumers that want to\n * align the header's inner content to their own page container instead of the\n * centered-center layout.\n */\n children?: ReactNode;\n}\n\nconst AppShellHeader = forwardRef<HTMLElement, AppShellHeaderProps>(function AppShellHeader(\n { left, center, right, children, className, ...rest },\n ref,\n) {\n return (\n <header ref={ref} className={cx(styles.header, className)} {...rest}>\n {children != null ? (\n children\n ) : (\n <>\n <div className={styles.headerLeft}>{left}</div>\n <div className={styles.headerCenter}>{center}</div>\n <div className={styles.headerRight}>{right}</div>\n </>\n )}\n </header>\n );\n});\n(AppShellHeader as { [ROLE]?: ShellRole })[ROLE] = \"header\";\n\n// ---------------------------------------------------------------------------\n// MainFooter — pinned below the scroll area.\n// ---------------------------------------------------------------------------\n\nexport type AppShellMainFooterProps = HTMLAttributes<HTMLElement>;\n\nconst AppShellMainFooter = forwardRef<HTMLElement, AppShellMainFooterProps>(\n function AppShellMainFooter({ className, children, ...rest }, ref) {\n return (\n <footer ref={ref} className={cx(styles.mainFooter, className)} {...rest}>\n {children}\n </footer>\n );\n },\n);\n(AppShellMainFooter as { [ROLE]?: ShellRole })[ROLE] = \"footer\";\n\n// ---------------------------------------------------------------------------\n// Compound export.\n// ---------------------------------------------------------------------------\n\nexport const AppShell = Object.assign(AppShellRoot, {\n Root: AppShellRoot,\n Rail: AppShellRail,\n RailItem: AppShellRailItem,\n Sidebar: AppShellSidebar,\n SingleSidebar: AppShellSingleSidebar,\n SidebarToggle: AppShellSidebarToggle,\n Main: AppShellMain,\n Header: AppShellHeader,\n MainFooter: AppShellMainFooter,\n Provider: AppShellProvider,\n});\n\nexport {\n AppShellRoot,\n AppShellRail,\n AppShellRailItem,\n AppShellSidebar,\n AppShellSingleSidebar,\n AppShellSidebarToggle,\n AppShellMain,\n AppShellHeader,\n AppShellMainFooter,\n AppShellProvider,\n};\n"],"names":["content","arrow","styles","v","AnimatedBorder","iconOnly","fullWidth","Button","disabled","responsiveHideText","ring","Input","label","hint","error","trailing","Badge","dot","RadioGroup","value","legend","Radio","description","Switch","root","Select","RS","opt","d","f","DatePicker","formatDate","DateRangePicker","Modal","trigger","title","footer","RT","Toast","action","Banner","icon","actions","Skeleton","clamp","n","Progress","indeterminate","Spinner","Textarea","SvgChevronDownSmall","active","FeedbackThumbs","Composer","sendLabel","sendIcon","attachments","text","e","ComposerChip","caret","SvgX","chip","DropdownMenuContent","DropdownMenuItem","shortcut","DropdownMenuCheckboxItem","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuSubTrigger","DropdownMenuSubContent","Accordion","AccordionItem","AccordionTrigger","AccordionContent","Collapsible","C","CollapsibleTrigger","CollapsibleContent","ScrollArea","fill","viewport","y","x","a","b","s","h","SvgChevronUp","ScrollableListSection","header","Slider","i","AlertDialogContent","AlertDialogFooter","indicator","list","TabsTrigger","Table","caption","Th","numeric","Td","Thead","Tbody","Tr","Avatar","status","AvatarStack","AvatarChip","EmptyState","Card","interactive","CardHeader","CardBody","CardFooter","CardTitle","CardDescription","t","SearchInput","clear","SvgLoader","SvgSearch","SvgCancel","cx","Check","Copy","ChevronRight","count","ArrowRight","List","dividers","bordered","density","ListItem","leading","Text","Tag","nowrap","InteractiveStateless","InteractiveStateful","InteractiveContainer","InteractiveFoldable","Disabled","wrapper","HoverableRoot","group","HoverableItem","ExpandableButton","SvgExternalLink","ContentXl","SvgEdit","ContentLg","SvgAlertCircle","SvgAlertTriangle","SvgXOctagon","ContentMd","tag","ContentSm","Content","ContentAction","Label","InputErrorText","InputVertical","InputHorizontal","InputDivider","InputPadder","SvgCheckCircle","MessageCard","ColoredIcon","EmptyMessageCard","SvgBoxes","IllustrationContent","AccountMenu","close","item","Fragment","SvgArrowLeft","AppShellRoot","AppShellRail","AppShellRailItem","AppShellSidebar","AppShellSingleSidebar","AppShellSidebarToggle","AppShellMain","AppShellHeader","AppShellMainFooter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,MAAM,kBAAkB,CAAC;AAAA,EAC9B;AAAA,EACA,gBAAgB;AAAA,EAChB,oBAAoB;AACtB,0BAKG,GAAG,UAAH,EAAY,eAA8B,mBACxC,SAAA,CACH;AAGK,SAAS,QAAQ;AAAA,EACtB,SAAAA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,UAAU;AAAA,EACV,OAAAC;AAAA,EACA;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AAU,GAAG,KAAA,GAAQ,KAAK;AACjE,WACE,oBAAC,UAAA,EAAO,KAAU,WAAW,GAAG,OAAO,YAAY,SAAS,GAAI,GAAG,MAChE,SAAA,CACH;AAAA,EAEJ;AACF;AACC,mBAA8C,IAAI,IAAI;AAMhD,MAAM,WAAW,OAAO,OAAO,cAAc;AAAA,EAClD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,eAAe;AAAA,EACf,eAAe;AAAA,EACf,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,UAAU;AACZ,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/Tooltip/Tooltip.tsx","../src/components/AnimatedBorder/AnimatedBorder.tsx","../src/components/Button/Button.tsx","../src/components/Input/Input.tsx","../src/components/Badge/Badge.tsx","../src/components/RadioGroup/RadioGroup.tsx","../src/components/Switch/Switch.tsx","../src/components/Select/Select.tsx","../src/components/DatePicker/DatePicker.tsx","../src/components/Modal/Modal.tsx","../src/components/Toast/Toast.tsx","../src/components/Banner/Banner.tsx","../src/components/Skeleton/Skeleton.tsx","../src/components/Progress/Progress.tsx","../src/components/Spinner/Spinner.tsx","../src/components/Textarea/Textarea.tsx","../src/internal/interactive-buttons.tsx","../src/components/FeedbackThumbs/FeedbackThumbs.tsx","../src/components/Composer/Composer.tsx","../src/components/Composer/ComposerChip.tsx","../src/components/DropdownMenu/DropdownMenu.tsx","../src/components/Accordion/Accordion.tsx","../src/components/Collapsible/Collapsible.tsx","../src/components/ScrollArea/ScrollArea.tsx","../src/components/ScrollableList/ScrollableList.tsx","../src/components/Slider/Slider.tsx","../src/components/AlertDialog/AlertDialog.tsx","../src/components/ThemeProvider/ThemeProvider.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Table/Table.tsx","../src/components/Avatar/Avatar.tsx","../src/components/EmptyState/EmptyState.tsx","../src/components/Card/Card.tsx","../src/components/SearchInput/SearchInput.tsx","../src/components/DetailSection/DetailSection.tsx","../src/components/List/List.tsx","../src/components/Text/Text.tsx","../src/components/Interactive/Interactive.tsx","../src/components/Disabled/Disabled.tsx","../src/components/Hoverable/Hoverable.tsx","../src/components/SelectButton/SelectButton.tsx","../src/components/OpenButton/OpenButton.tsx","../src/components/ExpandableButton/ExpandableButton.tsx","../src/components/FilterButton/FilterButton.tsx","../src/components/LinkButton/LinkButton.tsx","../src/components/Tag/Tag.tsx","../src/components/Content/ContentXl.tsx","../src/components/Content/ContentLg.tsx","../src/components/Content/ContentMd.tsx","../src/components/Content/ContentSm.tsx","../src/components/Content/Content.tsx","../src/components/ContentAction/ContentAction.tsx","../src/components/InputLayouts/InputLayouts.tsx","../src/components/MessageCard/MessageCard.tsx","../src/components/EmptyMessageCard/EmptyMessageCard.tsx","../src/components/IllustrationContent/IllustrationContent.tsx","../src/patterns/AccountMenu/AccountMenu.tsx","../src/patterns/AppShell/AppShell.tsx"],"sourcesContent":["import * as RT from \"@radix-ui/react-tooltip\";\nimport { type ReactNode } from \"react\";\nimport styles from \"./Tooltip.module.css\";\nimport { isRichStr, resolveStr, type RichStr } from \"../Text/richstr\";\n\nexport interface TooltipProps {\n /**\n * Tooltip content. Supports inline markdown via `markdown()`. When\n * `undefined`, the children render bare — callers never need to wrap\n * conditionally.\n */\n content?: ReactNode | RichStr;\n children: ReactNode;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n align?: \"start\" | \"center\" | \"end\";\n delayDuration?: number;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n sideOffset?: number;\n /**\n * Visual treatment of the content surface. `\"default\"` renders the DS chrome\n * (padding, inverted background, radius) plus a filled arrow. `\"bare\"` drops\n * all chrome and the arrow so `content` can be a custom floating card.\n * @default \"default\"\n */\n variant?: \"default\" | \"bare\";\n /**\n * Show the filled arrow. Defaults to `true` for `variant=\"default\"` and\n * `false` for `variant=\"bare\"`. Set explicitly to override.\n */\n arrow?: boolean;\n /** Class merged onto the content element (after the DS classes). */\n contentClassName?: string;\n}\n\nexport const TooltipProvider = ({\n children,\n delayDuration = 500,\n skipDelayDuration = 150,\n}: {\n children: ReactNode;\n delayDuration?: number;\n skipDelayDuration?: number;\n}) => (\n <RT.Provider delayDuration={delayDuration} skipDelayDuration={skipDelayDuration}>\n {children}\n </RT.Provider>\n);\n\nexport function Tooltip({\n content,\n children,\n side = \"top\",\n align = \"center\",\n delayDuration,\n open,\n defaultOpen,\n onOpenChange,\n sideOffset = 8,\n variant = \"default\",\n arrow,\n contentClassName,\n}: TooltipProps) {\n if (content === undefined) return <>{children}</>;\n const showArrow = arrow ?? variant === \"default\";\n const contentClasses = [\n styles.content,\n variant === \"bare\" ? styles.bare : null,\n contentClassName,\n ]\n .filter(Boolean)\n .join(\" \");\n return (\n <RT.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n delayDuration={delayDuration}\n >\n <RT.Trigger asChild>{children}</RT.Trigger>\n <RT.Portal>\n <RT.Content side={side} align={align} sideOffset={sideOffset} className={contentClasses}>\n {isRichStr(content) ? resolveStr(content) : content}\n {showArrow ? <RT.Arrow className={styles.arrow} width={10} height={5} /> : null}\n </RT.Content>\n </RT.Portal>\n </RT.Root>\n );\n}\n","import { forwardRef, type CSSProperties, type HTMLAttributes } from \"react\";\n// Imported (and referenced below via `styles.ring`) so the library bundler keeps\n// this module's CSS — which registers the :global ring hooks + @property angles\n// — even though the visible class names are all :global. A bare side-effect\n// `import \"./AnimatedBorder.module.css\"` gets tree-shaken out of the lib build.\nimport styles from \"./AnimatedBorder.module.css\";\n\nexport type AnimatedBorderVariant = \"pulse\" | \"spin\";\n\n/**\n * Stable, unscoped class hooks for the animated ring. Apply these to any\n * existing positioned element (one with `position: relative` and a\n * `border-radius`) to opt it into the ring without wrapping it in\n * `<AnimatedBorder>` — useful when a host element must keep its DOM shape.\n *\n * Always combine the base hook with exactly one variant hook, e.g.\n * `` `${animatedBorderClasses.base} ${animatedBorderClasses.pulse}` ``.\n */\nexport const animatedBorderClasses = {\n /** Required base hook — sets up the ::before ring container. */\n base: \"sds-animated-border\",\n /** Red \"live now\" ring (action-danger family). */\n pulse: \"sds-animated-border-pulse\",\n /** Brand-blue \"armed / recording\" ring (theme-primary family). */\n spin: \"sds-animated-border-spin\",\n} as const;\n\n/** Default ring thickness per variant, matching the original Meet treatments.\n * Exported so other DS components (e.g. Button's `animated` prop) apply the\n * same default instead of the CSS 2px fallback. */\nexport const animatedBorderThickness: Record<AnimatedBorderVariant, string> = {\n pulse: \"2px\",\n spin: \"1.5px\",\n};\n\n/**\n * Build the className for an animated ring. Use when you are applying the ring\n * to an element you already render (instead of nesting it in `AnimatedBorder`).\n */\nexport function animatedBorderClassName(variant: AnimatedBorderVariant): string {\n return `${animatedBorderClasses.base} ${animatedBorderClasses[variant]}`;\n}\n\nexport interface AnimatedBorderProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Which attention ring to paint.\n * - `\"pulse\"` — red rotating ring for \"live now\" surfaces (e.g. a meeting\n * that is recording right now).\n * - `\"spin\"` — brand-blue rotating ring for an armed / active feature\n * (e.g. an enabled auto-record control).\n */\n variant: AnimatedBorderVariant;\n /**\n * Optional CSS color string overriding the variant's token color. Accepts any\n * CSS color. The translucent gradient stops are derived from it with\n * `color-mix`, so a single solid color is enough.\n */\n color?: string;\n /**\n * Corner radius of the ring. Defaults to `\"inherit\"` so the ring follows the\n * host's own `border-radius`. Pass a length (e.g. `14` or `\"14px\"`) to force\n * a radius when the host has none.\n */\n radius?: number | string;\n /** Ring thickness. Defaults to 2px (pulse) / 1.5px (spin). */\n thickness?: number | string;\n}\n\nconst toLen = (v: number | string): string => (typeof v === \"number\" ? `${v}px` : v);\n\n/**\n * Renders a positioned wrapper whose `::before` carries a rotating\n * conic-gradient attention ring, with `children` painted above it.\n *\n * If the element you want to ring already exists in your tree and you would\n * rather not re-nest it, apply {@link animatedBorderClasses} (or\n * {@link animatedBorderClassName}) to it directly instead.\n */\nexport const AnimatedBorder = forwardRef<HTMLDivElement, AnimatedBorderProps>(\n function AnimatedBorder(\n { variant, color, radius = \"inherit\", thickness, className, style, children, ...rest },\n ref,\n ) {\n const ringStyle: CSSProperties = {\n borderRadius: radius === \"inherit\" ? undefined : toLen(radius),\n // CSS custom properties consumed by the module CSS.\n [\"--sds-ab-thickness\" as string]: toLen(thickness ?? animatedBorderThickness[variant]),\n ...(color\n ? { [\"--sds-ab-color\" as string]: color, [\"--sds-ab-color-soft\" as string]: color }\n : null),\n ...style,\n };\n\n return (\n <div\n ref={ref}\n className={[styles.ring, animatedBorderClassName(variant), className]\n .filter(Boolean)\n .join(\" \")}\n style={ringStyle}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n","import {\n forwardRef,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type CSSProperties,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport styles from \"./Button.module.css\";\nimport { Tooltip, TooltipProvider } from \"../Tooltip/Tooltip\";\nimport { resolveNode, resolveStr, type RichStr } from \"../Text/richstr\";\nimport {\n animatedBorderClasses,\n animatedBorderThickness,\n type AnimatedBorderVariant,\n} from \"../AnimatedBorder/AnimatedBorder\";\n\nexport type ButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"danger\"\n | \"link\"\n | \"red\"\n | \"ghost\"\n | \"outline\"\n | \"outline-primary\"\n | \"soft\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\nexport type ButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/**\n * Returns the Button class string for a given variant/size — for styling\n * non-`<button>` elements (e.g. a Radix `AlertDialogAction`, a router link)\n * with DS button visuals without rendering a Button.\n */\nexport function buttonClassNames(opts?: {\n variant?: ButtonVariant;\n size?: ButtonSize;\n iconOnly?: boolean;\n fullWidth?: boolean;\n className?: string;\n}): string {\n const { variant = \"primary\", size = \"md\", iconOnly, fullWidth, className } = opts ?? {};\n return [\n styles.btn,\n styles[`btn-${variant}`],\n styles[`size-${size}`],\n iconOnly ? styles[\"icon-only\"] : null,\n fullWidth ? styles[\"full-width\"] : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n}\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n /**\n * Button label. Accepts plain text, arbitrary nodes, or `markdown()` for\n * inline markdown (`**bold**`, `*italic*`, `` `code` ``, `[links](url)`).\n */\n children?: ReactNode | RichStr;\n iconLeft?: ReactNode;\n iconRight?: ReactNode;\n iconOnly?: boolean;\n loading?: boolean;\n /**\n * Render the Button's styling/props onto the single child element instead of\n * a `<button>`/`<a>` (Radix `Slot`). Use for SPA-safe navigation, e.g.\n * `<Button asChild><Link to=\"/x\">Go</Link></Button>`. The child supplies its\n * own content — `iconLeft`/`iconRight`/`iconOnly` are ignored in this mode.\n */\n asChild?: boolean;\n /**\n * Animated attention ring around the button (the AnimatedBorder treatment),\n * composable with any variant. `true` (or `\"spin\"`) paints the brand-blue\n * \"armed\" ring — e.g. an outline-primary toggle waiting to be enabled;\n * `\"pulse\"` paints the red \"live now\" ring. The ring replaces the painted\n * border and rotates continuously (static at reduced opacity under\n * `prefers-reduced-motion`). Colors are theme-corrected (`--sophea-focus-ring`\n * / `--action-danger-05`) so the ring is visible in both light and dark.\n */\n animated?: boolean | AnimatedBorderVariant;\n /** Renders an `<a>` styled as a button. Disabled links lose their href. */\n href?: string;\n /** Link target. Only used with `href`; `_blank` adds the security rel. */\n target?: string;\n /** Tooltip shown on hover. Supports inline markdown via `markdown()`. */\n tooltip?: string | RichStr;\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: ButtonTooltipSide;\n /** Stretches the button to the container width. */\n fullWidth?: boolean;\n /**\n * Hides the label on narrow viewports, keeping the icon. Use only with\n * `iconLeft` or `iconRight` so the button never collapses to nothing.\n */\n responsiveHideText?: boolean;\n}\n\nexport const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(\n function Button(\n {\n variant = \"primary\",\n size = \"md\",\n iconLeft,\n iconRight,\n iconOnly = false,\n loading = false,\n disabled,\n asChild = false,\n animated = false,\n children,\n className,\n style,\n type = \"button\",\n href,\n target,\n tooltip,\n tooltipSide = \"top\",\n fullWidth = false,\n responsiveHideText = false,\n \"aria-busy\": ariaBusy,\n ...rest\n },\n ref,\n ) {\n const isDisabled = disabled ?? loading;\n\n // Attention ring (AnimatedBorder): resolve `true` to the brand \"spin\" ring,\n // apply the shared :global hook classes plus the variant's default\n // thickness (the bare CSS fallback is 2px — chunkier than the 1px border\n // the ring replaces on a small pill).\n const ring: AnimatedBorderVariant | null =\n animated === true ? \"spin\" : animated || null;\n const ringStyle = ring\n ? ({ \"--sds-ab-thickness\": animatedBorderThickness[ring] } as CSSProperties)\n : undefined;\n const mergedStyle = ringStyle || style ? { ...ringStyle, ...style } : undefined;\n\n const classes = [\n buttonClassNames({ variant, size, iconOnly, fullWidth, className }),\n responsiveHideText ? styles[\"responsive-hide-text\"] : null,\n ring ? `${animatedBorderClasses.base} ${animatedBorderClasses[ring]}` : null,\n ]\n .filter(Boolean)\n .join(\" \");\n\n // asChild: delegate rendering to the single child (Radix Slot) so callers\n // keep SPA-safe links/custom elements while wearing DS button styling. The\n // child owns its content, so the icon slots below don't apply.\n if (asChild) {\n return (\n <Slot ref={ref} className={classes} style={mergedStyle} aria-busy={ariaBusy ?? loading} {...rest}>\n {resolveNode(children)}\n </Slot>\n );\n }\n\n const content = (\n <>\n {iconLeft ? <span className={styles.icon}>{iconLeft}</span> : null}\n {!iconOnly && children ? <span className={styles.label}>{resolveNode(children)}</span> : null}\n {iconRight ? <span className={styles.icon}>{iconRight}</span> : null}\n </>\n );\n\n const element = href ? (\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n className={classes}\n style={mergedStyle}\n href={isDisabled ? undefined : href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n aria-disabled={isDisabled || undefined}\n aria-busy={ariaBusy ?? loading}\n {...(rest as AnchorHTMLAttributes<HTMLAnchorElement>)}\n >\n {content}\n </a>\n ) : (\n <button\n ref={ref as Ref<HTMLButtonElement>}\n type={type}\n className={classes}\n style={mergedStyle}\n disabled={isDisabled}\n aria-busy={ariaBusy ?? loading}\n {...rest}\n >\n {content}\n </button>\n );\n\n if (tooltip === undefined) return element;\n\n return (\n <TooltipProvider>\n <Tooltip\n content={typeof tooltip === \"string\" ? tooltip : resolveStr(tooltip)}\n side={tooltipSide}\n >\n {element}\n </Tooltip>\n </TooltipProvider>\n );\n },\n);\n","/**\n * Input\n *\n * Accessibility note: placeholder color is `--text-03` (meets WCAG AA after the\n * contrast-audit token darkening). Placeholder text MUST NOT be the only label —\n * callers MUST provide a visible `label` prop (rendered as `<label htmlFor>`).\n * Use `hint` for help text, not placeholder.\n */\nimport { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./Input.module.css\";\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n label?: string;\n hint?: string;\n error?: string;\n iconLeft?: ReactNode;\n trailing?: ReactNode;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { label, hint, error, iconLeft, trailing, id, className, required, ...rest },\n ref,\n) {\n const autoId = useId();\n const inputId = id ?? autoId;\n const hintId = `${inputId}-hint`;\n const errorId = `${inputId}-error`;\n const describedBy =\n [error ? errorId : null, hint && !error ? hintId : null].filter(Boolean).join(\" \") || undefined;\n\n return (\n <div className={[styles.wrapper, className].filter(Boolean).join(\" \")}>\n {label ? (\n <label htmlFor={inputId} className={styles.label}>\n {label}\n </label>\n ) : null}\n <div className={[styles.field, error ? styles[\"field-error\"] : null].filter(Boolean).join(\" \")}>\n {iconLeft ? <span className={styles.icon}>{iconLeft}</span> : null}\n <input\n ref={ref}\n id={inputId}\n className={styles.input}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy}\n required={required}\n {...rest}\n />\n {trailing ? <span className={styles.trailing}>{trailing}</span> : null}\n </div>\n {error ? (\n <span id={errorId} className={styles.error}>\n {error}\n </span>\n ) : hint ? (\n <span id={hintId} className={styles.hint}>\n {hint}\n </span>\n ) : null}\n </div>\n );\n});\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./Badge.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type BadgeTone = \"neutral\" | \"info\" | \"success\" | \"warning\" | \"error\" | \"purple\" | \"brand\";\nexport type BadgeProminence = \"subtle\" | \"bold\" | \"outline\";\n\nexport interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> {\n tone?: BadgeTone;\n prominence?: BadgeProminence;\n dot?: boolean;\n iconLeft?: ReactNode;\n children?: ReactNode | RichStr;\n}\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n { tone = \"neutral\", prominence = \"subtle\", dot = false, iconLeft, children, className, ...rest },\n ref,\n) {\n const classes = [styles.badge, styles[`tone-${tone}`], styles[`prom-${prominence}`], className]\n .filter(Boolean)\n .join(\" \");\n\n const ariaLabel = (rest as { \"aria-label\"?: string })[\"aria-label\"];\n const hasChildren = children != null && children !== \"\";\n\n if (dot && !hasChildren && !ariaLabel) {\n // Dot-only badges convey status visually; without text or aria-label they\n // are invisible to assistive technology. Warn in dev consoles only.\n const env =\n typeof globalThis !== \"undefined\"\n ? (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV\n : undefined;\n if (env !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\n \"[Badge] dot-only badges (no children) must receive an `aria-label` for screen reader users.\",\n );\n }\n }\n\n return (\n <span ref={ref} className={classes} {...rest}>\n {dot ? <span className={styles.dot} aria-hidden=\"true\" /> : null}\n {iconLeft ? <span className={styles.icon}>{iconLeft}</span> : null}\n {resolveNode(children)}\n {dot && !hasChildren && ariaLabel ? (\n <span className={styles.visuallyHidden}>{ariaLabel}</span>\n ) : null}\n </span>\n );\n});\n","import * as RG from \"@radix-ui/react-radio-group\";\nimport { forwardRef, useId, type ReactNode } from \"react\";\nimport styles from \"./RadioGroup.module.css\";\n\nexport interface RadioGroupProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n name?: string;\n disabled?: boolean;\n required?: boolean;\n legend?: ReactNode;\n orientation?: \"vertical\" | \"horizontal\";\n children?: ReactNode;\n className?: string;\n}\n\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(function RadioGroup(\n { value, defaultValue, onValueChange, name, disabled, required, legend, orientation = \"vertical\", children, className },\n ref,\n) {\n const legendId = useId();\n return (\n <div className={[styles.group, className].filter(Boolean).join(\" \")}>\n {legend ? (\n <span id={legendId} className={styles.legend}>\n {legend}\n </span>\n ) : null}\n <RG.Root\n ref={ref}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n name={name}\n disabled={disabled}\n required={required}\n orientation={orientation}\n aria-labelledby={legend ? legendId : undefined}\n className={styles.list}\n data-orientation={orientation}\n >\n {children}\n </RG.Root>\n </div>\n );\n});\n\nexport interface RadioProps {\n value: string;\n disabled?: boolean;\n id?: string;\n label: ReactNode;\n description?: ReactNode;\n className?: string;\n}\n\nexport const Radio = forwardRef<HTMLButtonElement, RadioProps>(function Radio(\n { value, disabled, id, label, description, className },\n ref,\n) {\n const autoId = useId();\n const rId = id ?? autoId;\n return (\n <label htmlFor={rId} className={[styles.opt, className].filter(Boolean).join(\" \")} data-disabled={disabled ? \"\" : undefined}>\n <RG.Item ref={ref} id={rId} value={value} disabled={disabled} className={styles.root}>\n <RG.Indicator className={styles.dot} />\n </RG.Item>\n <span className={styles.text}>\n <span className={styles.label}>{label}</span>\n {description ? <span className={styles.description}>{description}</span> : null}\n </span>\n </label>\n );\n});\n","import * as RS from \"@radix-ui/react-switch\";\nimport { forwardRef, useId, type ReactNode } from \"react\";\nimport styles from \"./Switch.module.css\";\n\nexport type SwitchSize = \"md\" | \"sm\";\n\nexport interface SwitchProps {\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n disabled?: boolean;\n required?: boolean;\n name?: string;\n value?: string;\n id?: string;\n size?: SwitchSize;\n label?: ReactNode;\n description?: ReactNode;\n className?: string;\n \"aria-label\"?: string;\n}\n\nexport const Switch = forwardRef<HTMLButtonElement, SwitchProps>(function Switch(\n {\n checked,\n defaultChecked,\n onCheckedChange,\n disabled,\n required,\n name,\n value,\n id,\n size = \"md\",\n label,\n description,\n className,\n \"aria-label\": ariaLabel,\n },\n ref,\n) {\n const autoId = useId();\n const sId = id ?? autoId;\n\n const root = (\n <RS.Root\n ref={ref}\n id={sId}\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n required={required}\n name={name}\n value={value}\n aria-label={ariaLabel}\n className={[styles.root, styles[`size-${size}`], className].filter(Boolean).join(\" \")}\n >\n <RS.Thumb className={styles.thumb} />\n </RS.Root>\n );\n\n if (!label && !description) return root;\n\n return (\n <label htmlFor={sId} className={styles.row} data-disabled={disabled ? \"\" : undefined}>\n <span className={styles.text}>\n <span className={styles.label}>{label}</span>\n {description ? <span className={styles.description}>{description}</span> : null}\n </span>\n {root}\n </label>\n );\n});\n","/**\n * Select\n *\n * Accessibility note: this component does NOT render its own visible label. If the\n * trigger is not associated with an external `<label htmlFor={id}>`, callers MUST\n * pass `aria-label` so screen-reader users get a name for the control.\n */\nimport * as RS from \"@radix-ui/react-select\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport styles from \"./Select.module.css\";\n\nexport interface SelectOption {\n value: string;\n label: ReactNode;\n description?: ReactNode;\n disabled?: boolean;\n}\n\nexport interface SelectProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n options: SelectOption[];\n placeholder?: string;\n disabled?: boolean;\n name?: string;\n id?: string;\n \"aria-label\"?: string;\n className?: string;\n}\n\nconst CaretDown = () => (\n <svg className={styles.caret} width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M6 9l6 6 6-6\" />\n </svg>\n);\n\nconst Check = () => (\n <svg className={styles.check} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M20 6L9 17l-5-5\" />\n </svg>\n);\n\nexport const Select = forwardRef<HTMLButtonElement, SelectProps>(function Select(\n { value, defaultValue, onValueChange, options, placeholder = \"Select…\", disabled, name, id, \"aria-label\": ariaLabel, className },\n ref,\n) {\n return (\n <RS.Root value={value} defaultValue={defaultValue} onValueChange={onValueChange} disabled={disabled} name={name}>\n <RS.Trigger\n ref={ref}\n id={id}\n aria-label={ariaLabel}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n >\n <RS.Value placeholder={placeholder} />\n <RS.Icon asChild>\n <CaretDown />\n </RS.Icon>\n </RS.Trigger>\n <RS.Portal>\n <RS.Content className={styles.content} position=\"popper\" sideOffset={4}>\n <RS.Viewport className={styles.viewport}>\n {options.map((opt) => (\n <RS.Item key={opt.value} value={opt.value} disabled={opt.disabled} className={styles.item}>\n <RS.ItemIndicator className={styles.indicator} asChild>\n <Check />\n </RS.ItemIndicator>\n <span className={styles.itemSlot}>\n <RS.ItemText>{opt.label}</RS.ItemText>\n {opt.description ? <span className={styles.itemDesc}>{opt.description}</span> : null}\n </span>\n </RS.Item>\n ))}\n </RS.Viewport>\n </RS.Content>\n </RS.Portal>\n </RS.Root>\n );\n});\n","import * as Popover from \"@radix-ui/react-popover\";\nimport { format as formatDate } from \"date-fns\";\nimport { forwardRef, useState, type ComponentProps, type ReactNode } from \"react\";\nimport { DayPicker, type DateRange } from \"react-day-picker\";\nimport styles from \"./DatePicker.module.css\";\n\nconst CalendarIcon = () => (\n <svg className={styles.icon} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M16 3v4M8 3v4M3 11h18\" />\n </svg>\n);\n\nconst ChevronLeft = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.8} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M15 18l-6-6 6-6\" />\n </svg>\n);\n\nconst ChevronRight = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.8} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M9 18l6-6-6-6\" />\n </svg>\n);\n\nconst SINGLE_LETTER_WEEKDAY = [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"];\n\nconst formatters = {\n formatWeekdayName: (d: Date) => SINGLE_LETTER_WEEKDAY[d.getDay()] ?? \"\",\n};\n\nconst dpClassNames = {\n root: styles.dpRoot,\n months: styles.dpMonths,\n month: styles.dpMonth,\n month_caption: styles.dpMonthCaption,\n caption_label: styles.dpCaptionLabel,\n nav: styles.dpNav,\n button_previous: styles.dpNavBtn,\n button_next: styles.dpNavBtn,\n chevron: styles.dpChevron,\n month_grid: styles.dpGrid,\n weekdays: styles.dpWeekdays,\n weekday: styles.dpWeekday,\n week: styles.dpWeek,\n day: styles.dpDay,\n day_button: styles.dpDayBtn,\n today: styles.dpToday,\n selected: styles.dpSelected,\n outside: styles.dpOutside,\n disabled: styles.dpDisabled,\n range_start: styles.dpRangeStart,\n range_end: styles.dpRangeEnd,\n range_middle: styles.dpRangeMiddle,\n} as const;\n\nconst dpComponents = {\n Chevron: ({ orientation }: { orientation?: \"left\" | \"right\" | \"up\" | \"down\" }) =>\n orientation === \"right\" ? <ChevronRight /> : <ChevronLeft />,\n};\n\nexport type CalendarProps = ComponentProps<typeof DayPicker>;\n\n/**\n * Bare, DS-styled calendar grid (react-day-picker passthrough) for consumers\n * that compose their own popover/inline placement — distinct from the bundled\n * DatePicker/DateRangePicker which own their popover + trigger. Supports\n * `mode`, `selected`, `onSelect`, `numberOfMonths`, `disabled`, etc.\n */\nexport function Calendar({ classNames, components, formatters: f, ...props }: CalendarProps) {\n return (\n <DayPicker\n weekStartsOn={1}\n ISOWeek\n classNames={{ ...dpClassNames, ...classNames }}\n components={{ ...dpComponents, ...components }}\n formatters={{ ...formatters, ...f }}\n {...props}\n />\n );\n}\n\nexport interface DatePickerProps {\n value?: Date | undefined;\n onChange?: (date: Date | undefined) => void;\n placeholder?: string;\n disabled?: boolean;\n id?: string;\n \"aria-label\"?: string;\n className?: string;\n triggerIcon?: ReactNode;\n dateFormat?: string;\n}\n\nexport const DatePicker = forwardRef<HTMLButtonElement, DatePickerProps>(function DatePicker(\n { value, onChange, placeholder = \"Pick a date\", disabled, id, \"aria-label\": ariaLabel, className, triggerIcon, dateFormat = \"d MMM yyyy\" },\n ref,\n) {\n const [open, setOpen] = useState(false);\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger\n ref={ref}\n id={id}\n aria-label={ariaLabel}\n disabled={disabled}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n >\n {triggerIcon ?? <CalendarIcon />}\n <span className={value ? styles.triggerValue : styles.triggerPlaceholder}>\n {value ? formatDate(value, dateFormat) : placeholder}\n </span>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content className={styles.popover} align=\"start\" sideOffset={4}>\n <DayPicker\n mode=\"single\"\n selected={value}\n onSelect={(d) => {\n onChange?.(d);\n if (d) setOpen(false);\n }}\n weekStartsOn={1}\n ISOWeek\n classNames={dpClassNames}\n components={dpComponents}\n formatters={formatters}\n />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n});\n\nexport interface DateRangePickerProps {\n value?: DateRange | undefined;\n onChange?: (range: DateRange | undefined) => void;\n placeholder?: string;\n disabled?: boolean;\n id?: string;\n \"aria-label\"?: string;\n className?: string;\n dateFormat?: string;\n}\n\nexport const DateRangePicker = forwardRef<HTMLButtonElement, DateRangePickerProps>(function DateRangePicker(\n { value, onChange, placeholder = \"Pick a date range\", disabled, id, \"aria-label\": ariaLabel, className, dateFormat = \"d MMM yyyy\" },\n ref,\n) {\n const [open, setOpen] = useState(false);\n const label =\n value?.from && value?.to\n ? `${formatDate(value.from, \"d MMM\")} – ${formatDate(value.to, dateFormat)}`\n : value?.from\n ? formatDate(value.from, dateFormat)\n : placeholder;\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger\n ref={ref}\n id={id}\n aria-label={ariaLabel}\n disabled={disabled}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n >\n <CalendarIcon />\n <span className={value?.from ? styles.triggerValue : styles.triggerPlaceholder}>{label}</span>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content className={styles.popover} align=\"start\" sideOffset={4}>\n <DayPicker\n mode=\"range\"\n selected={value}\n onSelect={onChange}\n weekStartsOn={1}\n ISOWeek\n classNames={dpClassNames}\n components={dpComponents}\n formatters={formatters}\n />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n});\n","import * as RD from \"@radix-ui/react-dialog\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport styles from \"./Modal.module.css\";\n\nexport interface ModalProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n trigger?: ReactNode;\n title: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n footer?: ReactNode;\n width?: number;\n closeLabel?: string;\n className?: string;\n}\n\nconst CloseIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </svg>\n);\n\nexport const Modal = forwardRef<HTMLDivElement, ModalProps>(function Modal(\n { open, defaultOpen, onOpenChange, trigger, title, description, children, footer, width, closeLabel = \"Close\", className },\n ref,\n) {\n return (\n <RD.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n {trigger ? <RD.Trigger asChild>{trigger}</RD.Trigger> : null}\n <RD.Portal>\n <RD.Overlay className={styles.overlay} />\n <RD.Content\n ref={ref}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n style={width ? { width: `${width}px` } : undefined}\n >\n <div className={styles.header}>\n <RD.Title className={styles.title}>{title}</RD.Title>\n {description ? (\n <RD.Description className={styles.description}>{description}</RD.Description>\n ) : null}\n <RD.Close className={styles.close} aria-label={closeLabel}>\n <CloseIcon />\n </RD.Close>\n </div>\n {children ? <div className={styles.body}>{children}</div> : null}\n {footer ? <div className={styles.footer}>{footer}</div> : null}\n </RD.Content>\n </RD.Portal>\n </RD.Root>\n );\n});\n\nexport const ModalClose = RD.Close;\n","import * as RT from \"@radix-ui/react-toast\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport styles from \"./Toast.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type ToastTone = \"success\" | \"info\" | \"warning\" | \"error\";\n\nconst DEFAULT_DURATION: Record<ToastTone, number> = {\n success: 5000,\n info: 5000,\n warning: 8000,\n error: 0, // manual dismiss only — error with action\n};\n\nexport interface ToastProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n tone?: ToastTone;\n title: ReactNode | RichStr;\n description?: ReactNode | RichStr;\n action?: { label: ReactNode; altText: string; onClick?: () => void };\n duration?: number;\n closeLabel?: string;\n}\n\nconst Icons: Record<ToastTone, ReactNode> = {\n success: \"✓\",\n info: \"i\",\n warning: \"!\",\n error: \"✕\",\n};\n\nexport const ToastProvider = ({\n children,\n swipeDirection = \"right\",\n duration = 5000,\n}: {\n children: ReactNode;\n swipeDirection?: \"right\" | \"left\" | \"up\" | \"down\";\n duration?: number;\n}) => (\n <RT.Provider swipeDirection={swipeDirection} duration={duration}>\n {children}\n <RT.Viewport className={styles.viewport} />\n </RT.Provider>\n);\n\nexport const Toast = forwardRef<HTMLLIElement, ToastProps>(function Toast(\n {\n open,\n defaultOpen,\n onOpenChange,\n tone = \"success\",\n title,\n description,\n action,\n duration,\n closeLabel = \"Dismiss\",\n },\n ref,\n) {\n return (\n <RT.Root\n ref={ref}\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n duration={duration ?? DEFAULT_DURATION[tone]}\n type={tone === \"error\" ? \"foreground\" : \"background\"}\n className={[styles.root, styles[`tone-${tone}`]].join(\" \")}\n >\n <span className={styles.icon} aria-hidden=\"true\">\n {Icons[tone]}\n </span>\n <div className={styles.body}>\n <RT.Title className={styles.title}>{resolveNode(title)}</RT.Title>\n {description ? (\n <RT.Description className={styles.description}>{resolveNode(description)}</RT.Description>\n ) : null}\n {action ? (\n <RT.Action altText={action.altText} onClick={action.onClick} className={styles.action}>\n {action.label}\n </RT.Action>\n ) : null}\n </div>\n <RT.Close aria-label={closeLabel} className={styles.close}>\n ×\n </RT.Close>\n </RT.Root>\n );\n});\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./Banner.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type BannerTone = \"info\" | \"success\" | \"warning\" | \"error\" | \"promo\";\n\nexport interface BannerProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\" | \"children\"> {\n tone?: BannerTone;\n title?: ReactNode | RichStr;\n children?: ReactNode | RichStr;\n icon?: ReactNode;\n actions?: ReactNode;\n onDismiss?: () => void;\n dismissLabel?: string;\n role?: \"status\" | \"alert\";\n /**\n * When true, the banner is announced assertively (`role=\"alert\"`).\n * Defaults to false. `tone=\"error\"` also forces `role=\"alert\"` unless\n * the caller explicitly overrides via `role`.\n */\n urgent?: boolean;\n}\n\nconst DefaultIcons: Record<BannerTone, ReactNode> = {\n info: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 8v4M12 16h.01\" />\n </svg>\n ),\n warning: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M10.3 3.86l-8.4 14a2 2 0 001.7 3h16.8a2 2 0 001.7-3l-8.4-14a2 2 0 00-3.4 0z\" />\n <path d=\"M12 9v4M12 17h.01\" />\n </svg>\n ),\n error: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M15 9l-6 6M9 9l6 6\" />\n </svg>\n ),\n success: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M8.5 12.5l2.5 2.5 4.5-5\" />\n </svg>\n ),\n promo: (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M12 2l2 7h7l-5.5 4 2 7L12 16l-5.5 4 2-7L3 9h7z\" />\n </svg>\n ),\n};\n\nexport const Banner = forwardRef<HTMLDivElement, BannerProps>(function Banner(\n {\n tone = \"info\",\n title,\n children,\n icon,\n actions,\n onDismiss,\n dismissLabel = \"Dismiss\",\n role,\n urgent = false,\n className,\n ...rest\n },\n ref,\n) {\n const resolvedRole = role ?? (urgent || tone === \"error\" ? \"alert\" : \"status\");\n return (\n <div\n ref={ref}\n role={resolvedRole}\n className={[styles.root, styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <span className={styles.lead} aria-hidden=\"true\">\n {icon ?? DefaultIcons[tone]}\n </span>\n <span className={styles.text}>\n {title ? <span className={styles.title}>{resolveNode(title)}</span> : null}\n {resolveNode(children)}\n </span>\n {actions ? <div className={styles.actions}>{actions}</div> : null}\n {onDismiss ? (\n <button\n type=\"button\"\n className={styles.close}\n onClick={onDismiss}\n aria-label={dismissLabel}\n >\n ×\n </button>\n ) : null}\n </div>\n );\n});\n","import { forwardRef, type CSSProperties, type HTMLAttributes } from \"react\";\nimport styles from \"./Skeleton.module.css\";\n\nexport type SkeletonVariant = \"block\" | \"text\" | \"circle\";\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n variant?: SkeletonVariant;\n width?: number | string;\n height?: number | string;\n radius?: number | string;\n}\n\nexport const Skeleton = forwardRef<HTMLDivElement, SkeletonProps>(function Skeleton(\n { variant = \"block\", width, height, radius, className, style, ...rest },\n ref,\n) {\n const inline: CSSProperties = { ...style };\n if (width !== undefined) inline.width = typeof width === \"number\" ? `${width}px` : width;\n if (height !== undefined) inline.height = typeof height === \"number\" ? `${height}px` : height;\n if (radius !== undefined) inline.borderRadius = typeof radius === \"number\" ? `${radius}px` : radius;\n return (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={[styles.root, styles[`variant-${variant}`], className].filter(Boolean).join(\" \")}\n style={inline}\n {...rest}\n />\n );\n});\n","import { forwardRef, type CSSProperties, type HTMLAttributes } from \"react\";\nimport styles from \"./Progress.module.css\";\n\nexport type ProgressSize = \"sm\" | \"md\" | \"lg\";\nexport type ProgressTone = \"brand\" | \"success\" | \"warning\" | \"danger\" | \"neutral\";\n\nexport interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** 0-100. Omit for indeterminate. */\n value?: number;\n size?: ProgressSize;\n tone?: ProgressTone;\n label?: string;\n showValue?: boolean;\n /** Accessibility label when no visible label is rendered. */\n \"aria-label\"?: string;\n}\n\nfunction clamp(n: number) {\n if (Number.isNaN(n)) return 0;\n if (n < 0) return 0;\n if (n > 100) return 100;\n return n;\n}\n\nexport const Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n {\n value,\n size = \"md\",\n tone = \"brand\",\n label,\n showValue = false,\n className,\n style,\n \"aria-label\": ariaLabel,\n ...rest\n },\n ref,\n) {\n const indeterminate = value === undefined || value === null;\n const v = indeterminate ? 0 : clamp(value);\n const fillStyle: CSSProperties = indeterminate ? {} : { width: `${v}%` };\n\n return (\n <div\n ref={ref}\n className={[styles.root, className].filter(Boolean).join(\" \")}\n style={style}\n {...rest}\n >\n {(label || showValue) && (\n <div className={styles.header}>\n {label && <span className={styles.label}>{label}</span>}\n {showValue && !indeterminate && (\n <span className={styles.value}>{Math.round(v)}%</span>\n )}\n </div>\n )}\n <div\n role=\"progressbar\"\n aria-label={ariaLabel ?? label ?? \"Progress\"}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={indeterminate ? undefined : v}\n className={[\n styles.track,\n styles[`size-${size}`],\n styles[`tone-${tone}`],\n indeterminate ? styles.indeterminate : \"\",\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n <div className={styles.fill} style={fillStyle} />\n </div>\n </div>\n );\n});\n","import { forwardRef, type CSSProperties, type HTMLAttributes } from \"react\";\nimport styles from \"./Spinner.module.css\";\n\nexport type SpinnerSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\nexport type SpinnerTone = \"brand\" | \"neutral\" | \"inverse\";\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {\n size?: SpinnerSize;\n tone?: SpinnerTone;\n /** Accessible label for screen readers. Defaults to \"Loading\". */\n label?: string;\n}\n\nconst SIZE_PX: Record<SpinnerSize, number> = { xs: 12, sm: 16, md: 22, lg: 32 };\n\nexport const Spinner = forwardRef<HTMLSpanElement, SpinnerProps>(function Spinner(\n { size = \"md\", tone = \"brand\", label = \"Loading\", className, style, ...rest },\n ref,\n) {\n const px = SIZE_PX[size];\n const dim: CSSProperties = { width: px, height: px, ...style };\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-live=\"polite\"\n aria-label={label}\n className={[styles.root, styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n style={dim}\n {...rest}\n >\n <svg viewBox=\"0 0 24 24\" className={styles.svg} aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" className={styles.track} />\n <circle cx=\"12\" cy=\"12\" r=\"9\" className={styles.arc} />\n </svg>\n <span className={styles.sr}>{label}</span>\n </span>\n );\n});\n","import { forwardRef, useId, type TextareaHTMLAttributes } from \"react\";\nimport styles from \"./Textarea.module.css\";\n\nexport type TextareaResize = \"none\" | \"vertical\" | \"horizontal\" | \"both\";\n\nexport interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n label?: string;\n hint?: string;\n error?: string;\n resize?: TextareaResize;\n /** Visual character count footer. Reflects `value.length` if controlled, else `defaultValue.length`. */\n showCount?: boolean;\n}\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function Textarea(\n {\n label,\n hint,\n error,\n resize = \"vertical\",\n showCount,\n maxLength,\n id,\n className,\n required,\n rows = 4,\n value,\n defaultValue,\n ...rest\n },\n ref,\n) {\n const autoId = useId();\n const taId = id ?? autoId;\n const hintId = `${taId}-hint`;\n const errorId = `${taId}-error`;\n const countId = `${taId}-count`;\n const describedBy =\n [error ? errorId : null, hint && !error ? hintId : null, showCount ? countId : null]\n .filter(Boolean)\n .join(\" \") || undefined;\n\n const length =\n typeof value === \"string\"\n ? value.length\n : typeof defaultValue === \"string\"\n ? defaultValue.length\n : 0;\n\n return (\n <div className={[styles.wrapper, className].filter(Boolean).join(\" \")}>\n {label ? (\n <label htmlFor={taId} className={styles.label}>\n {label}\n </label>\n ) : null}\n <div className={[styles.field, error ? styles[\"field-error\"] : null].filter(Boolean).join(\" \")}>\n <textarea\n ref={ref}\n id={taId}\n rows={rows}\n maxLength={maxLength}\n value={value}\n defaultValue={defaultValue}\n className={styles.textarea}\n style={{ resize }}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy}\n required={required}\n {...rest}\n />\n </div>\n <div className={styles.footer}>\n {error ? (\n <span id={errorId} className={styles.error}>\n {error}\n </span>\n ) : hint ? (\n <span id={hintId} className={styles.hint}>\n {hint}\n </span>\n ) : (\n <span />\n )}\n {showCount ? (\n <span id={countId} className={styles.count}>\n {length}\n {maxLength ? ` / ${maxLength}` : \"\"}\n </span>\n ) : null}\n </div>\n </div>\n );\n});\n","import \"./interactive-buttons.css\";\nimport type { ComponentType, ReactNode, SVGProps } from \"react\";\nimport SvgChevronDownSmall from \"../icons/ChevronDownSmall\";\nimport { Tooltip, TooltipProvider } from \"../components/Tooltip/Tooltip\";\nimport { resolveStr, type RichStr } from \"../components/Text/richstr\";\n\n/** An icon component from `src/icons` (1em-sized SVG driven by font-size). */\nexport type IconComponent = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport type InteractiveButtonSize = \"lg\" | \"md\" | \"sm\" | \"xs\" | \"2xs\" | \"fit\";\n\nconst ICON_SIZE: Record<InteractiveButtonSize, { padding: string; rem: number }> = {\n lg: { padding: \"2px\", rem: 1 },\n md: { padding: \"2px\", rem: 1 },\n sm: { padding: \"0\", rem: 1 },\n xs: { padding: \"2px\", rem: 0.75 },\n \"2xs\": { padding: \"0\", rem: 0.75 },\n fit: { padding: \"2px\", rem: 1 },\n};\n\n/**\n * Renders an icon inside the `interactive-foreground-icon` wrapper so it\n * reads the Interactive color matrix's icon foreground. Returns an empty\n * spacer when no icon is given but column alignment is wanted.\n */\nexport function iconSlot(\n Icon: IconComponent | undefined,\n size: InteractiveButtonSize,\n includeSpacer: boolean,\n): ReactNode {\n const { padding, rem } = ICON_SIZE[size];\n if (Icon) {\n return (\n <span className=\"interactive-foreground-icon sds-icon-slot\" style={{ padding }}>\n <Icon style={{ width: `${rem}rem`, height: `${rem}rem`, flexShrink: 0 }} />\n </span>\n );\n }\n return includeSpacer ? <span /> : null;\n}\n\n/**\n * Chevron that rotates 180 degrees while the parent `.interactive` is in\n * hover or active state. Shared dropdown indicator for OpenButton and\n * FilterButton.\n */\nexport function ChevronIcon(props: SVGProps<SVGSVGElement>) {\n return (\n <SvgChevronDownSmall\n {...props}\n className={[\"sds-button-chevron\", props.className].filter(Boolean).join(\" \")}\n />\n );\n}\n\n/**\n * Wraps an element in a self-providing Tooltip when `tooltip` is set;\n * passes the element through untouched otherwise.\n */\nexport function withTooltip(\n element: ReactNode,\n tooltip: string | RichStr | undefined,\n side: \"top\" | \"right\" | \"bottom\" | \"left\",\n): ReactNode {\n if (tooltip === undefined) return element;\n return (\n <TooltipProvider>\n <Tooltip content={typeof tooltip === \"string\" ? tooltip : resolveStr(tooltip)} side={side}>\n {element}\n </Tooltip>\n </TooltipProvider>\n );\n}\n","import { forwardRef, useState, type HTMLAttributes } from \"react\";\nimport styles from \"./FeedbackThumbs.module.css\";\nimport { withTooltip } from \"../../internal/interactive-buttons\";\nimport type { RichStr } from \"../Text/richstr\";\n\nexport type FeedbackValue = \"up\" | \"down\" | null;\n\n/**\n * Per-thumb tooltip content. A `string`/`RichStr` shows the same hint\n * regardless of state; a function receives whether that thumb is currently\n * active so consumers can swap copy (e.g. \"Good response\" → \"Remove like\").\n * Returning `undefined` shows no tooltip for that state.\n */\nexport type FeedbackThumbTooltip =\n | string\n | RichStr\n | ((active: boolean) => string | RichStr | undefined);\n\nexport interface FeedbackThumbsProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"onChange\" | \"defaultValue\"> {\n value?: FeedbackValue;\n defaultValue?: FeedbackValue;\n onChange?: (next: FeedbackValue) => void;\n /** Accessible label for the control group. */\n label?: string;\n size?: \"sm\" | \"md\";\n disabled?: boolean;\n /** Hover tooltip for the thumbs-up control. State-aware via a callback. */\n upTooltip?: FeedbackThumbTooltip;\n /** Hover tooltip for the thumbs-down control. State-aware via a callback. */\n downTooltip?: FeedbackThumbTooltip;\n /** Side the tooltips open on. Defaults to `\"top\"`. */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\";\n}\n\nconst resolveTooltip = (\n tip: FeedbackThumbTooltip | undefined,\n active: boolean,\n): string | RichStr | undefined => (typeof tip === \"function\" ? tip(active) : tip);\n\nconst UpIcon = ({ size = 16 }: { size?: number }) => (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.6} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M7 22V11M2 13v7a2 2 0 0 0 2 2h3M22 11.5a3 3 0 0 0-3-3h-4l1.4-5.4a1 1 0 0 0-1-1.2l-.9.1a1 1 0 0 0-.8.6L7 11v11h11.3a2 2 0 0 0 2-1.7l1.7-7.8Z\" />\n </svg>\n);\n\nconst DownIcon = ({ size = 16 }: { size?: number }) => (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.6} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M17 2v11M22 11V4a2 2 0 0 0-2-2h-3M2 12.5a3 3 0 0 0 3 3h4l-1.4 5.4a1 1 0 0 0 1 1.2l.9-.1a1 1 0 0 0 .8-.6L17 13V2H5.7a2 2 0 0 0-2 1.7L2 11.5Z\" />\n </svg>\n);\n\nexport const FeedbackThumbs = forwardRef<HTMLDivElement, FeedbackThumbsProps>(\n function FeedbackThumbs(\n {\n value,\n defaultValue = null,\n onChange,\n label = \"Rate this response\",\n size = \"md\",\n disabled,\n upTooltip,\n downTooltip,\n tooltipSide = \"top\",\n className,\n ...rest\n },\n ref,\n ) {\n const controlled = value !== undefined;\n const [internal, setInternal] = useState<FeedbackValue>(defaultValue);\n const current = controlled ? value : internal;\n\n const set = (next: FeedbackValue) => {\n const v = current === next ? null : next;\n if (!controlled) setInternal(v);\n onChange?.(v);\n };\n\n const px = size === \"sm\" ? 14 : 16;\n\n const upButton = (\n <button\n type=\"button\"\n className={[styles.btn, current === \"up\" ? styles.active : null].filter(Boolean).join(\" \")}\n aria-pressed={current === \"up\"}\n aria-label=\"Helpful\"\n onClick={() => set(\"up\")}\n disabled={disabled}\n >\n <UpIcon size={px} />\n </button>\n );\n\n const downButton = (\n <button\n type=\"button\"\n className={[styles.btn, current === \"down\" ? styles.activeDown : null]\n .filter(Boolean)\n .join(\" \")}\n aria-pressed={current === \"down\"}\n aria-label=\"Not helpful\"\n onClick={() => set(\"down\")}\n disabled={disabled}\n >\n <DownIcon size={px} />\n </button>\n );\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={label}\n className={[styles.root, styles[`size-${size}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {withTooltip(upButton, resolveTooltip(upTooltip, current === \"up\"), tooltipSide)}\n {withTooltip(downButton, resolveTooltip(downTooltip, current === \"down\"), tooltipSide)}\n </div>\n );\n },\n);\n","import {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type KeyboardEvent,\n type ReactNode,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport styles from \"./Composer.module.css\";\n\nexport interface ComposerProps\n extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, \"onChange\" | \"onSubmit\" | \"value\"> {\n value?: string;\n defaultValue?: string;\n onChange?: (next: string) => void;\n onSubmit?: (text: string) => void;\n /** Render submit-disabled state and a spinner on the send button. */\n busy?: boolean;\n /** Text shown on the send button. Default: \"Send\". */\n sendLabel?: string;\n /** Replace the default send icon (paper-plane arrow). */\n sendIcon?: ReactNode;\n /** Top slot — attachment chips, citations, etc. */\n attachments?: ReactNode;\n /** Left toolbar slot — attach button, slash menu trigger, model picker. */\n leadingActions?: ReactNode;\n /** Right footer slot — token counter, helper text. */\n trailingMeta?: ReactNode;\n /** Greek-friendly placeholder. */\n placeholder?: string;\n /** Max visual rows before scroll. Default 12. */\n maxRows?: number;\n /** Submit on plain Enter (Shift+Enter for newline). Default true. */\n submitOnEnter?: boolean;\n}\n\nconst SendIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.75} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M5 12h14M13 5l7 7-7 7\" />\n </svg>\n);\n\nexport const Composer = forwardRef<HTMLTextAreaElement, ComposerProps>(function Composer(\n {\n value,\n defaultValue,\n onChange,\n onSubmit,\n busy,\n sendLabel = \"Send\",\n sendIcon,\n attachments,\n leadingActions,\n trailingMeta,\n placeholder = \"Ask anything…\",\n maxRows = 12,\n submitOnEnter = true,\n rows = 1,\n className,\n disabled,\n ...rest\n },\n ref,\n) {\n const controlled = value !== undefined;\n const [internal, setInternal] = useState(defaultValue ?? \"\");\n const text = controlled ? (value as string) : internal;\n const taRef = useRef<HTMLTextAreaElement | null>(null);\n\n const setText = (next: string) => {\n if (!controlled) setInternal(next);\n onChange?.(next);\n };\n\n // Auto-grow up to maxRows lines.\n useEffect(() => {\n const el = taRef.current;\n if (!el) return;\n el.style.height = \"auto\";\n const lineHeight = parseFloat(getComputedStyle(el).lineHeight || \"20\") || 20;\n const max = lineHeight * maxRows;\n el.style.height = `${Math.min(el.scrollHeight, max)}px`;\n el.style.overflowY = el.scrollHeight > max ? \"auto\" : \"hidden\";\n }, [text, maxRows]);\n\n const submit = () => {\n const trimmed = text.trim();\n if (!trimmed || busy || disabled) return;\n onSubmit?.(trimmed);\n if (!controlled) setInternal(\"\");\n };\n\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (submitOnEnter && e.key === \"Enter\" && !e.shiftKey && !e.nativeEvent.isComposing) {\n e.preventDefault();\n submit();\n }\n rest.onKeyDown?.(e);\n };\n\n const canSend = !!text.trim() && !busy && !disabled;\n\n return (\n <form\n className={[styles.root, className].filter(Boolean).join(\" \")}\n onSubmit={(e) => {\n e.preventDefault();\n submit();\n }}\n >\n {attachments ? <div className={styles.attachments}>{attachments}</div> : null}\n <div className={[styles.shell, disabled ? styles.disabled : null].filter(Boolean).join(\" \")}>\n <textarea\n ref={(el) => {\n taRef.current = el;\n if (typeof ref === \"function\") ref(el);\n else if (ref) (ref as { current: HTMLTextAreaElement | null }).current = el;\n }}\n rows={rows}\n className={styles.textarea}\n placeholder={placeholder}\n value={text}\n onChange={(e) => setText(e.target.value)}\n onKeyDown={onKeyDown}\n disabled={disabled || busy}\n {...rest}\n />\n <div className={styles.footer}>\n <div className={styles.leading}>{leadingActions}</div>\n <div className={styles.trailing}>\n {trailingMeta ? <span className={styles.meta}>{trailingMeta}</span> : null}\n <button\n type=\"submit\"\n className={styles.send}\n disabled={!canSend}\n aria-label={sendLabel}\n aria-busy={busy || undefined}\n >\n {busy ? (\n <span className={styles.spinner} aria-hidden=\"true\" />\n ) : (\n <span className={styles.sendIcon}>{sendIcon ?? <SendIcon />}</span>\n )}\n <span className={styles.sendLabel}>{sendLabel}</span>\n </button>\n </div>\n </div>\n </div>\n </form>\n );\n});\n","import {\n forwardRef,\n type ButtonHTMLAttributes,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport styles from \"./ComposerChip.module.css\";\nimport SvgX from \"../../icons/X\";\nimport { withTooltip } from \"../../internal/interactive-buttons\";\nimport type { RichStr } from \"../Text/richstr\";\n\nexport interface ComposerChipProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n /** Leading icon node. */\n icon?: ReactNode;\n /**\n * Status dot rendered before the label. Pass a CSS color (e.g. a token var\n * or hex) to show a small glowing indicator — used for model/status chips.\n */\n dot?: string;\n /**\n * Show a trailing chevron, signalling the chip opens a menu. Renders\n * independently — it coexists with {@link onRemove} / {@link trailing} /\n * {@link trailingActions} (caret first, interactive affordance after), so a\n * chip can show both a dropdown caret and a clear-X.\n */\n caret?: boolean;\n /** Selected/active styling. */\n active?: boolean;\n /**\n * When set, render a trailing remove control (an X) with its own click\n * target. Clicking (or activating via keyboard) it calls `onRemove` and does\n * NOT trigger the chip's primary `onClick`. Sugar over {@link trailing}.\n */\n onRemove?: () => void;\n /** Accessible name for the remove control. Defaults to `\"Remove\"`. */\n removeLabel?: string;\n /**\n * Generic trailing slot rendered after the label (and after the caret).\n * Clicks within it do not fire the chip's `onClick`. When `onRemove` is also\n * set, `onRemove` wins for this slot.\n */\n trailing?: ReactNode;\n /**\n * Extra interactive controls rendered at the chip's trailing edge, after the\n * caret and the remove/trailing affordance. Clicks within it do not fire the\n * chip's primary `onClick`. Use for secondary per-chip actions alongside a\n * caret and/or clear-X. Render `role=\"button\"` spans here, never a nested\n * `<button>` (the chip root is itself a `<button>`).\n */\n trailingActions?: ReactNode;\n /**\n * When set, wraps the chip in the DS Tooltip. Supports inline markdown via\n * `markdown()`. When `undefined`, the chip renders bare (no wrapper).\n */\n tooltip?: string | RichStr;\n /** Side the tooltip opens on. Defaults to `\"top\"`. */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\";\n children?: ReactNode;\n}\n\nconst Caret = () => (\n <svg\n className={styles.caret}\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M6 9l6 6 6-6\" />\n </svg>\n);\n\n/**\n * Pill-shaped action chip for the {@link Composer} toolbar (`leadingActions`\n * slot) — model pickers, source-scope filters, language toggles. Replaces the\n * ad-hoc inline-styled buttons chat surfaces used to hand-roll.\n *\n * The chip root is a `<button>`; any interactive trailing affordance is a\n * sibling `role=\"button\"` overlay (never a descendant `<button>`) to keep the\n * DOM free of nested interactive elements.\n */\nexport const ComposerChip = forwardRef<HTMLButtonElement, ComposerChipProps>(\n function ComposerChip(\n {\n icon,\n dot,\n caret = false,\n active = false,\n onRemove,\n removeLabel = \"Remove\",\n trailing,\n trailingActions,\n tooltip,\n tooltipSide = \"top\",\n children,\n className,\n type = \"button\",\n ...rest\n },\n ref,\n ) {\n const classes = [styles.chip, active ? styles.active : null, className]\n .filter(Boolean)\n .join(\" \");\n\n // The caret is decorative and renders independently. The interactive\n // affordance (onRemove's X, else the generic `trailing` slot) renders\n // after it, then any `trailingActions`. So caret + clear-X can coexist.\n let affordanceNode: ReactNode = null;\n if (onRemove) {\n const fire = () => onRemove();\n const onKeyDown = (e: KeyboardEvent<HTMLSpanElement>) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n e.stopPropagation();\n fire();\n }\n };\n const onClick = (e: MouseEvent<HTMLSpanElement>) => {\n e.stopPropagation();\n fire();\n };\n affordanceNode = (\n <span\n className={styles.remove}\n role=\"button\"\n tabIndex={0}\n aria-label={removeLabel}\n onClick={onClick}\n onKeyDown={onKeyDown}\n >\n <SvgX aria-hidden=\"true\" />\n </span>\n );\n } else if (trailing != null) {\n affordanceNode = (\n <span className={styles.trailing} onClick={(e) => e.stopPropagation()} role=\"presentation\">\n {trailing}\n </span>\n );\n }\n\n const trailingNode = (\n <>\n {caret ? <Caret /> : null}\n {affordanceNode}\n {trailingActions != null ? (\n <span className={styles.trailing} onClick={(e) => e.stopPropagation()} role=\"presentation\">\n {trailingActions}\n </span>\n ) : null}\n </>\n );\n\n const chip = (\n // eslint-disable-next-line react/button-has-type -- `type` defaults to \"button\", overridable via prop\n <button ref={ref} type={type} className={classes} {...rest}>\n {dot ? (\n <span\n className={styles.dot}\n aria-hidden=\"true\"\n style={{ background: dot, boxShadow: `0 0 6px ${dot}` }}\n />\n ) : null}\n {icon ? (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n {children != null ? <span className={styles.label}>{children}</span> : null}\n {trailingNode}\n </button>\n );\n\n return <>{withTooltip(chip, tooltip, tooltipSide)}</>;\n },\n);\n","import * as DM from \"@radix-ui/react-dropdown-menu\";\nimport { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from \"react\";\nimport styles from \"./DropdownMenu.module.css\";\n\nexport const DropdownMenu = DM.Root;\nexport const DropdownMenuTrigger = DM.Trigger;\nexport const DropdownMenuGroup = DM.Group;\nexport const DropdownMenuRadioGroup = DM.RadioGroup;\nexport const DropdownMenuSub = DM.Sub;\n\nexport const DropdownMenuContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.Content>\n>(function DropdownMenuContent({ className, sideOffset = 6, ...rest }, ref) {\n return (\n <DM.Portal>\n <DM.Content\n ref={ref}\n sideOffset={sideOffset}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n </DM.Portal>\n );\n});\n\nexport interface DropdownMenuItemProps extends ComponentPropsWithoutRef<typeof DM.Item> {\n icon?: ReactNode;\n shortcut?: ReactNode;\n tone?: \"default\" | \"danger\";\n}\n\nexport const DropdownMenuItem = forwardRef<HTMLDivElement, DropdownMenuItemProps>(\n function DropdownMenuItem({ icon, shortcut, tone = \"default\", className, children, ...rest }, ref) {\n return (\n <DM.Item\n ref={ref}\n className={[styles.item, styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {icon ? <span className={styles.icon} aria-hidden=\"true\">{icon}</span> : null}\n <span className={styles.label}>{children}</span>\n {shortcut ? <span className={styles.shortcut}>{shortcut}</span> : null}\n </DM.Item>\n );\n },\n);\n\nexport interface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithoutRef<typeof DM.CheckboxItem> {\n children: ReactNode;\n}\n\nexport const DropdownMenuCheckboxItem = forwardRef<HTMLDivElement, DropdownMenuCheckboxItemProps>(\n function DropdownMenuCheckboxItem({ className, children, ...rest }, ref) {\n return (\n <DM.CheckboxItem\n ref={ref}\n className={[styles.item, styles.indicatorItem, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <DM.ItemIndicator className={styles.indicator}>\n <CheckIcon />\n </DM.ItemIndicator>\n <span className={styles.label}>{children}</span>\n </DM.CheckboxItem>\n );\n },\n);\n\nexport interface DropdownMenuRadioItemProps\n extends ComponentPropsWithoutRef<typeof DM.RadioItem> {\n children: ReactNode;\n}\n\nexport const DropdownMenuRadioItem = forwardRef<HTMLDivElement, DropdownMenuRadioItemProps>(\n function DropdownMenuRadioItem({ className, children, ...rest }, ref) {\n return (\n <DM.RadioItem\n ref={ref}\n className={[styles.item, styles.indicatorItem, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <DM.ItemIndicator className={styles.indicator}>\n <span className={styles.radioDot} />\n </DM.ItemIndicator>\n <span className={styles.label}>{children}</span>\n </DM.RadioItem>\n );\n },\n);\n\nexport const DropdownMenuLabel = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.Label>\n>(function DropdownMenuLabel({ className, ...rest }, ref) {\n return (\n <DM.Label\n ref={ref}\n className={[styles.menuLabel, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport const DropdownMenuSeparator = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.Separator>\n>(function DropdownMenuSeparator({ className, ...rest }, ref) {\n return (\n <DM.Separator\n ref={ref}\n className={[styles.separator, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport const DropdownMenuSubTrigger = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.SubTrigger>\n>(function DropdownMenuSubTrigger({ className, children, ...rest }, ref) {\n return (\n <DM.SubTrigger\n ref={ref}\n className={[styles.item, styles.subTrigger, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <span className={styles.label}>{children}</span>\n <span className={styles.subChevron} aria-hidden=\"true\">▸</span>\n </DM.SubTrigger>\n );\n});\n\nexport const DropdownMenuSubContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DM.SubContent>\n>(function DropdownMenuSubContent({ className, ...rest }, ref) {\n return (\n <DM.Portal>\n <DM.SubContent\n ref={ref}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n </DM.Portal>\n );\n});\n\nfunction CheckIcon() {\n return (\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n","import * as A from \"@radix-ui/react-accordion\";\nimport { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from \"react\";\nimport styles from \"./Accordion.module.css\";\n\ntype AccordionRootProps = ComponentPropsWithoutRef<typeof A.Root>;\n\nexport const Accordion = forwardRef<HTMLDivElement, AccordionRootProps>(\n function Accordion(props, ref) {\n const { className, ...rest } = props as AccordionRootProps & { className?: string };\n return (\n <A.Root\n ref={ref}\n className={[styles.root, className].filter(Boolean).join(\" \")}\n {...(rest as AccordionRootProps)}\n />\n );\n },\n);\n\nexport const AccordionItem = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<typeof A.Item>>(\n function AccordionItem({ className, ...rest }, ref) {\n return (\n <A.Item\n ref={ref}\n className={[styles.item, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n },\n);\n\nexport interface AccordionTriggerProps extends ComponentPropsWithoutRef<typeof A.Trigger> {\n children: ReactNode;\n}\n\nexport const AccordionTrigger = forwardRef<HTMLButtonElement, AccordionTriggerProps>(\n function AccordionTrigger({ className, children, ...rest }, ref) {\n return (\n <A.Header className={styles.header}>\n <A.Trigger\n ref={ref}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <span className={styles.label}>{children}</span>\n <span className={styles.chev} aria-hidden=\"true\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.6} strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </A.Trigger>\n </A.Header>\n );\n },\n);\n\nexport const AccordionContent = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<typeof A.Content>>(\n function AccordionContent({ className, children, ...rest }, ref) {\n return (\n <A.Content\n ref={ref}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <div className={styles.contentInner}>{children}</div>\n </A.Content>\n );\n },\n);\n","import * as C from \"@radix-ui/react-collapsible\";\nimport { forwardRef, type ComponentPropsWithoutRef } from \"react\";\nimport styles from \"./Collapsible.module.css\";\n\n/**\n * Collapsible — a single show/hide disclosure (distinct from Accordion, which\n * groups several items under one value). Thin wrappers over Radix Collapsible:\n * controlled (`open`/`onOpenChange`) or uncontrolled (`defaultOpen`), and the\n * trigger supports `asChild` so callers can host their own button/row.\n */\nexport const Collapsible = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<typeof C.Root>>(\n function Collapsible({ className, ...rest }, ref) {\n return (\n <C.Root ref={ref} className={[styles.root, className].filter(Boolean).join(\" \")} {...rest} />\n );\n },\n);\n\nexport const CollapsibleTrigger = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef<typeof C.Trigger>\n>(function CollapsibleTrigger({ className, ...rest }, ref) {\n return (\n <C.Trigger\n ref={ref}\n className={[styles.trigger, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport const CollapsibleContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof C.Content>\n>(function CollapsibleContent({ className, children, ...rest }, ref) {\n return (\n <C.Content\n ref={ref}\n className={[styles.content, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {children}\n </C.Content>\n );\n});\n","import * as SA from \"@radix-ui/react-scroll-area\";\nimport { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from \"react\";\nimport styles from \"./ScrollArea.module.css\";\n\nexport type ScrollAreaOrientation = \"vertical\" | \"horizontal\" | \"both\";\n\nexport interface ScrollAreaProps extends ComponentPropsWithoutRef<typeof SA.Root> {\n orientation?: ScrollAreaOrientation;\n children: ReactNode;\n}\n\nexport const ScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(function ScrollArea(\n { orientation = \"vertical\", className, children, ...rest },\n ref,\n) {\n return (\n <SA.Root\n ref={ref}\n className={[styles.root, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {/* tabIndex={0} keeps the scrollable viewport keyboard-reachable (axe scrollable-region-focusable). */}\n <SA.Viewport className={styles.viewport} tabIndex={0}>\n {children}\n </SA.Viewport>\n {(orientation === \"vertical\" || orientation === \"both\") && (\n <SA.Scrollbar orientation=\"vertical\" className={styles.scrollbar}>\n <SA.Thumb className={styles.thumb} />\n </SA.Scrollbar>\n )}\n {(orientation === \"horizontal\" || orientation === \"both\") && (\n <SA.Scrollbar\n orientation=\"horizontal\"\n className={[styles.scrollbar, styles.scrollbarHorizontal].join(\" \")}\n >\n <SA.Thumb className={styles.thumb} />\n </SA.Scrollbar>\n )}\n <SA.Corner className={styles.corner} />\n </SA.Root>\n );\n});\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useImperativeHandle,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { Button } from \"../Button/Button\";\nimport SvgChevronUp from \"../../icons/ChevronUp\";\nimport styles from \"./ScrollableList.module.css\";\n\n/**\n * Kept for API compatibility. Headers no longer paint a surface — the pinned\n * title floats over the top fade mask (rows dissolve beneath it, exactly like\n * the bottom fade), so there is no header box to paint.\n *\n * @deprecated The header surface is no longer rendered; the prop is ignored.\n */\nexport type ScrollableListHeaderSurface = \"surface\" | \"glass\" | \"transparent\";\n\nexport interface ScrollStateChange {\n /** Content is hidden above the viewport (top fade is shown). */\n atTop: boolean;\n /** Content is hidden below the viewport (bottom fade is shown). */\n atBottom: boolean;\n /** The viewport actually overflows (is scrollable). */\n isScrollable: boolean;\n}\n\ninterface SectionEntry {\n element: HTMLElement | null;\n header: ReactNode;\n hasHeader: boolean;\n}\n\ninterface ScrollableListCtx {\n /** Sections upsert themselves every render so the root always has the\n * latest header node + element for the pinned-title scroll math. */\n updateSection: (id: string, entry: SectionEntry) => void;\n removeSection: (id: string) => void;\n}\n\nconst ScrollableListContext = createContext<ScrollableListCtx | null>(null);\n\nexport interface ScrollableListProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"onScroll\"> {\n /** Accessible name for the scroll `region`. Required for a labelled landmark. */\n ariaLabel: string;\n /** Max height of the scroll viewport. Number → px. Required to bound scrolling. */\n maxHeight: number | string;\n /** @deprecated Ignored — headers float over the fade and paint no surface. */\n headerSurface?: ScrollableListHeaderSurface;\n /**\n * Horizontal breathing room (px) so row hover shadows/glows aren't clipped\n * by the viewport's overflow-x. Layout-neutral: padding paired with an\n * equal negative margin. Default 16.\n */\n bleed?: number;\n /**\n * Stretch the scroll region to its container's full height even when the\n * content is shorter — keeps the region's bottom edge (and fade) aligned\n * with sibling panes. Pair with a definite-height parent (e.g. a 1fr grid\n * row). Default false (content-sized up to maxHeight).\n */\n fill?: boolean;\n /**\n * Show the back-to-top button in the header line. Visible whenever the list\n * is scrolled away from the top; smooth-scrolls to the top on click\n * (instant when `prefers-reduced-motion`). Default `true`.\n */\n backToTop?: boolean;\n /** Accessible label for the back-to-top button. Default \"Back to top\". */\n backToTopLabel?: string;\n /** Fired when the scroll edges or scrollability change. */\n onScrollStateChange?: (state: ScrollStateChange) => void;\n children?: ReactNode;\n}\n\nexport interface ScrollableListHandle {\n /** Smooth-scroll (or instant under reduced motion) the viewport to the top. */\n scrollToTop: () => void;\n /** The scrollable viewport element, for advanced callers. */\n readonly viewport: HTMLDivElement | null;\n}\n\nfunction prefersReducedMotion(): boolean {\n return (\n typeof window !== \"undefined\" &&\n typeof window.matchMedia === \"function\" &&\n window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n );\n}\n\n/**\n * ScrollableList — a bounded, fade-masked scroll region with floating pinned\n * section titles and an optional back-to-top control.\n *\n * Composition:\n * <ScrollableList ariaLabel=\"Past meetings\" maxHeight={480}>\n * <ScrollableList.Section header={<h3>Jun 5 · 7 recordings</h3>}>\n * …rows…\n * </ScrollableList.Section>\n * </ScrollableList>\n *\n * Fades: both edges are CSS `mask-image` on the viewport — content genuinely\n * dissolves, revealing whatever sits behind the list (solid surface or glass).\n * The top fade mirrors the bottom one exactly.\n *\n * Pinned titles: section headers render in normal flow and dissolve into the\n * top fade with their rows. The root tracks which section spans the top edge\n * and floats a crisp copy of its header above the fade (aria-hidden — the\n * in-flow header keeps the semantics). When the next section's header\n * approaches, the floating title is displaced upward, reproducing the classic\n * sticky hand-off without putting the header inside the masked subtree.\n */\nfunction ScrollableListRoot(\n {\n ariaLabel,\n maxHeight,\n headerSurface: _headerSurface = \"surface\",\n bleed = 16,\n fill = false,\n backToTop = true,\n backToTopLabel = \"Back to top\",\n onScrollStateChange,\n children,\n className,\n style,\n ...rest\n }: ScrollableListProps,\n ref: React.Ref<ScrollableListHandle>,\n) {\n const viewportRef = useRef<HTMLDivElement>(null);\n const topSentinelRef = useRef<HTMLDivElement>(null);\n const bottomSentinelRef = useRef<HTMLDivElement>(null);\n const pinnedRef = useRef<HTMLDivElement>(null);\n\n const [atTop, setAtTop] = useState(true);\n const [atBottom, setAtBottom] = useState(true);\n const [isScrollable, setIsScrollable] = useState(false);\n const [showBackToTop, setShowBackToTop] = useState(false);\n\n // Registry of sections for the pinned-title math. A ref (not state): the\n // rAF loop reads it; only the *active header* transition triggers a render.\n const sectionsRef = useRef(new Map<string, SectionEntry>());\n const [activeHeader, setActiveHeader] = useState<ReactNode>(null);\n const activeIdRef = useRef<string | null>(null);\n // In-flow headers inside the fade zone are hidden (visibility) — their\n // crisp floating twins are the only rendering there. Tracked for precise\n // restore when they leave the zone or the list unmounts.\n const hiddenHeadersRef = useRef(new Set<HTMLElement>());\n\n const updateSection = useCallback((id: string, entry: SectionEntry) => {\n sectionsRef.current.set(id, entry);\n // Keep the floating copy in sync when the active section's header node\n // itself re-renders (e.g. its count changes).\n if (activeIdRef.current === id) setActiveHeader(entry.header);\n }, []);\n const removeSection = useCallback((id: string) => {\n sectionsRef.current.delete(id);\n if (activeIdRef.current === id) {\n activeIdRef.current = null;\n setActiveHeader(null);\n }\n }, []);\n\n const onChangeRef = useRef(onScrollStateChange);\n onChangeRef.current = onScrollStateChange;\n const emit = useCallback((next: ScrollStateChange) => {\n onChangeRef.current?.(next);\n }, []);\n\n // Sentinel-based edge detection (zero-height lines at the content's ends).\n useEffect(() => {\n const viewport = viewportRef.current;\n const top = topSentinelRef.current;\n const bottom = bottomSentinelRef.current;\n if (!viewport || !top || !bottom) return;\n\n const io = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.target === top) setAtTop(entry.isIntersecting);\n else if (entry.target === bottom) setAtBottom(entry.isIntersecting);\n }\n },\n { root: viewport, threshold: 0 },\n );\n io.observe(top);\n io.observe(bottom);\n return () => io.disconnect();\n }, []);\n\n // rAF measure loop: overflow state, back-to-top visibility, and the pinned\n // section title (which section owns the top edge + hand-off displacement).\n useEffect(() => {\n const viewport = viewportRef.current;\n if (!viewport) return;\n\n let frame = 0;\n const measure = () => {\n frame = 0;\n const scrollable = viewport.scrollHeight - viewport.clientHeight > 1;\n setIsScrollable(scrollable);\n // Visible whenever the list is scrolled away from the top (stg behavior).\n setShowBackToTop(scrollable && viewport.scrollTop > 8);\n\n // ---- floating section title (single slot) ----\n // Only ONE title renders at a time: the pinned copy of the section\n // owning the top edge. In-flow headers are visibility-hidden through\n // the fade zone (they dissolve like rows); the pinned title slides out\n // as the next header reaches the top, completing its exit exactly when\n // the next section takes over (contact hand-off, no co-visible titles).\n const pinned = pinnedRef.current;\n const rootEl = viewport.parentElement as HTMLElement;\n const rootRect = rootEl.getBoundingClientRect();\n const vpTop = viewport.getBoundingClientRect().top;\n // The pane can sit at a fractional screen offset; transforms must\n // compensate so the title's FINAL position is whole-pixel (fractional\n // rasterization is what blurs the text).\n const snapY = (y: number) => Math.round(rootRect.top + y) - rootRect.top;\n const snapX = (x: number) => Math.round(rootRect.left + x) - rootRect.left;\n const fadeZone =\n parseFloat(getComputedStyle(viewport).getPropertyValue(\"--sds-list-fade-top\")) || 96;\n const entries = [...sectionsRef.current.entries()]\n .filter(([, e]) => e.element && e.hasHeader)\n .map(([id, e]) => {\n const rect = (e.element as HTMLElement).getBoundingClientRect();\n const headerEl = (e.element as HTMLElement)\n .firstElementChild as HTMLElement | null;\n const hRect = headerEl ? headerEl.getBoundingClientRect() : rect;\n return {\n id,\n entry: e,\n rect,\n headerEl,\n headerTop: hRect.top - vpTop,\n headerH: hRect.height,\n };\n })\n .sort((a, b) => a.rect.top - b.rect.top);\n\n let active: (typeof entries)[number] | null = null;\n let next: (typeof entries)[number] | null = null;\n for (const s of entries) {\n if (s.rect.top - vpTop <= 1) active = s;\n else if (!next) next = s;\n }\n\n if ((active?.id ?? null) !== activeIdRef.current) {\n activeIdRef.current = active?.id ?? null;\n setActiveHeader(active ? active.entry.header : null);\n }\n\n // At rest (scrollTop 0) the in-flow header is fully visible — only\n // float a copy once the real one has scrolled above the top edge.\n const activeObscured = active != null && active.headerTop < -0.5;\n\n // Hide in-flow headers whose text would ghost through the fade: the\n // active one (its copy is pinned) and the next one while inside the\n // zone. visibility (not display) — layout must not shift.\n const desiredHidden = new Set<HTMLElement>();\n if (active?.headerEl && activeObscured) desiredHidden.add(active.headerEl);\n if (next?.headerEl && next.headerTop < fadeZone) desiredHidden.add(next.headerEl);\n for (const el of hiddenHeadersRef.current) {\n if (!desiredHidden.has(el)) el.style.visibility = \"\";\n }\n for (const el of desiredHidden) el.style.visibility = \"hidden\";\n hiddenHeadersRef.current = desiredHidden;\n\n if (pinned) {\n if (active && activeObscured) {\n const h = pinned.offsetHeight;\n // Slide out on contact: as the next header covers the title's own\n // band [0..h], push the title up; it exits fully at the exact\n // moment the next section takes over (ty = -h at headerTop = 0).\n const ty = next ? Math.min(0, next.headerTop - h) : 0;\n const pinProgress = h > 0 ? Math.max(0, 1 + ty / h) : 1;\n pinned.style.transform =\n \"translate(\" + snapX(12 * pinProgress) + \"px, \" + snapY(ty) + \"px)\";\n pinned.style.opacity = \"1\";\n } else {\n pinned.style.opacity = \"0\";\n }\n }\n };\n const schedule = () => {\n if (frame) return;\n frame = requestAnimationFrame(measure);\n };\n\n measure();\n viewport.addEventListener(\"scroll\", schedule, { passive: true });\n const ro = new ResizeObserver(schedule);\n ro.observe(viewport);\n const content = viewport.firstElementChild;\n if (content) ro.observe(content);\n\n return () => {\n viewport.removeEventListener(\"scroll\", schedule);\n ro.disconnect();\n if (frame) cancelAnimationFrame(frame);\n for (const el of hiddenHeadersRef.current) el.style.visibility = \"\";\n hiddenHeadersRef.current = new Set();\n };\n }, []);\n\n useEffect(() => {\n emit({ atTop, atBottom, isScrollable });\n }, [atTop, atBottom, isScrollable, emit]);\n\n const scrollToTop = useCallback(() => {\n const viewport = viewportRef.current;\n if (!viewport) return;\n viewport.scrollTo({\n top: 0,\n behavior: prefersReducedMotion() ? \"auto\" : \"smooth\",\n });\n }, []);\n\n useImperativeHandle(\n ref,\n () => ({\n scrollToTop,\n get viewport() {\n return viewportRef.current;\n },\n }),\n [scrollToTop],\n );\n\n // Both fades are the same mask, mirrored. The pinned title lives OUTSIDE\n // the masked viewport, so it stays crisp while rows dissolve beneath it.\n const fadeTop = !atTop;\n const fadeBottom = isScrollable && !atBottom;\n\n return (\n <ScrollableListContext.Provider value={{ updateSection, removeSection }}>\n <div\n className={[styles.root, className].filter(Boolean).join(\" \")}\n style={fill ? { height: \"100%\", ...style } : style}\n {...rest}\n >\n <div\n ref={viewportRef}\n className={styles.viewport}\n role=\"region\"\n aria-label={ariaLabel}\n tabIndex={isScrollable ? 0 : undefined}\n data-fade-top={fadeTop ? \"\" : undefined}\n data-fade-bottom={fadeBottom ? \"\" : undefined}\n style={{\n maxHeight: typeof maxHeight === \"number\" ? `${maxHeight}px` : maxHeight,\n height: fill ? \"100%\" : undefined,\n paddingInline: bleed,\n marginInline: -bleed,\n }}\n >\n <div ref={topSentinelRef} className={styles.sentinel} aria-hidden=\"true\" />\n <div className={styles.content}>{children}</div>\n <div ref={bottomSentinelRef} className={styles.sentinel} aria-hidden=\"true\" />\n </div>\n\n {/* Floating copy of the active section's header. The in-flow header\n carries the semantics; this is presentation only. */}\n <div\n ref={pinnedRef}\n className={styles.pinnedHeader}\n data-visible={activeHeader != null && fadeTop ? \"\" : undefined}\n aria-hidden=\"true\"\n >\n {activeHeader}\n </div>\n\n {backToTop && (\n <div\n className={styles.backToTopSlot}\n data-visible={showBackToTop ? \"\" : undefined}\n aria-hidden={showBackToTop ? undefined : \"true\"}\n >\n <Button\n variant=\"tertiary\"\n size=\"md\"\n iconOnly\n iconLeft={<SvgChevronUp width={26} height={26} />}\n aria-label={backToTopLabel}\n tooltip={backToTopLabel}\n tabIndex={showBackToTop ? undefined : -1}\n onClick={scrollToTop}\n />\n </div>\n )}\n </div>\n </ScrollableListContext.Provider>\n );\n}\n\nconst ScrollableListForwardRef = forwardRef(ScrollableListRoot);\nScrollableListForwardRef.displayName = \"ScrollableList\";\n\nexport interface ScrollableListSectionProps extends HTMLAttributes<HTMLElement> {\n /**\n * Header for the section. Rendered in normal flow (it scrolls and dissolves\n * into the top fade with its rows); while the section spans the top edge the\n * root floats a crisp copy of it above the fade, displaced by the next\n * section's header on hand-off. Omit for an unheadered group.\n */\n header?: ReactNode;\n children?: ReactNode;\n}\n\n/**\n * A group of rows under a section header. IMPORTANT: when a header is present\n * it must be the section's first child (the root reads it for the floating\n * pinned copy) — this component guarantees that ordering.\n */\nconst ScrollableListSection = forwardRef<HTMLElement, ScrollableListSectionProps>(\n function ScrollableListSection({ header, children, className, ...rest }, ref) {\n const ctx = useContext(ScrollableListContext);\n const labelId = useId();\n const elementRef = useRef<HTMLElement | null>(null);\n\n // Upsert into the root registry every render so the floating copy always\n // shows the latest header content; remove on unmount.\n useEffect(() => {\n ctx?.updateSection(labelId, {\n element: elementRef.current,\n header,\n hasHeader: header != null,\n });\n });\n useEffect(() => {\n return () => ctx?.removeSection(labelId);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <section\n ref={(node) => {\n elementRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLElement | null>).current = node;\n }}\n className={[styles.section, className].filter(Boolean).join(\" \")}\n aria-labelledby={header ? labelId : undefined}\n {...rest}\n >\n {header != null && (\n <div id={labelId} className={styles.sectionHeader}>\n {header}\n </div>\n )}\n {children}\n </section>\n );\n },\n);\n\n/**\n * Compound export: `ScrollableList` is the forwardRef root with a `.Section`\n * member. Built via `Object.assign` so the static is present at the value's\n * type (a plain cast would assert a member that isn't attached yet).\n */\nexport const ScrollableList = Object.assign(ScrollableListForwardRef, {\n Section: ScrollableListSection,\n});\n\nexport { ScrollableListSection };\n","import * as S from \"@radix-ui/react-slider\";\nimport { forwardRef, type ComponentPropsWithoutRef } from \"react\";\nimport styles from \"./Slider.module.css\";\n\nexport interface SliderProps extends ComponentPropsWithoutRef<typeof S.Root> {\n /** Optional label rendered above the track. */\n label?: string;\n /** Optional value label rendered next to the label. */\n formatValue?: (value: number) => string;\n /** Show numeric value badge on the thumb. */\n showValueOnThumb?: boolean;\n}\n\nexport const Slider = forwardRef<HTMLSpanElement, SliderProps>(function Slider(\n { label, formatValue, showValueOnThumb, className, value, defaultValue, ...rest },\n ref,\n) {\n const v = (value ?? defaultValue ?? [0]) as number[];\n const display = formatValue ? v.map(formatValue).join(\" – \") : v.join(\" – \");\n\n return (\n <div className={[styles.wrapper, className].filter(Boolean).join(\" \")}>\n {label || formatValue ? (\n <div className={styles.header}>\n {label ? <span className={styles.label}>{label}</span> : <span />}\n <span className={styles.value}>{display}</span>\n </div>\n ) : null}\n <S.Root\n ref={ref}\n className={styles.root}\n value={value}\n defaultValue={defaultValue}\n {...rest}\n >\n <S.Track className={styles.track}>\n <S.Range className={styles.range} />\n </S.Track>\n {v.map((val, i) => (\n <S.Thumb key={i} className={styles.thumb} aria-label={label ?? \"Value\"}>\n {showValueOnThumb ? (\n <span className={styles.thumbValue}>{formatValue ? formatValue(val) : val}</span>\n ) : null}\n </S.Thumb>\n ))}\n </S.Root>\n </div>\n );\n});\n","import * as AD from \"@radix-ui/react-alert-dialog\";\nimport { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from \"react\";\nimport styles from \"./AlertDialog.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport const AlertDialog = AD.Root;\nexport const AlertDialogTrigger = AD.Trigger;\nexport const AlertDialogAction = AD.Action;\nexport const AlertDialogCancel = AD.Cancel;\n\nexport type AlertDialogTone = \"default\" | \"danger\";\n\nexport interface AlertDialogContentProps extends Omit<\n ComponentPropsWithoutRef<typeof AD.Content>,\n \"title\"\n> {\n title: ReactNode | RichStr;\n description?: ReactNode | RichStr;\n tone?: AlertDialogTone;\n}\n\nexport const AlertDialogContent = forwardRef<HTMLDivElement, AlertDialogContentProps>(\n function AlertDialogContent(\n { title, description, tone = \"default\", className, children, ...rest },\n ref,\n ) {\n return (\n <AD.Portal>\n <AD.Overlay className={styles.overlay} />\n <AD.Content\n ref={ref}\n className={[styles.content, styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <div className={styles.header}>\n {tone === \"danger\" ? (\n <span className={styles.toneIcon} aria-hidden=\"true\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\" />\n <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\" />\n <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\" />\n </svg>\n </span>\n ) : null}\n <div>\n <AD.Title className={styles.title}>{resolveNode(title)}</AD.Title>\n {description ? (\n <AD.Description className={styles.description}>\n {resolveNode(description)}\n </AD.Description>\n ) : null}\n </div>\n </div>\n {children}\n </AD.Content>\n </AD.Portal>\n );\n },\n);\n\nexport const AlertDialogFooter = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function AlertDialogFooter({ className, ...rest }, ref) {\n return (\n <div ref={ref} className={[styles.footer, className].filter(Boolean).join(\" \")} {...rest} />\n );\n },\n);\n","import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type ReactNode,\n} from \"react\";\n\nexport type Theme = \"light\" | \"dark\";\nexport type ThemeMode = Theme | \"system\";\n\nexport interface ThemeContextValue {\n /** Resolved theme actually applied to the document. Always `\"light\"` or `\"dark\"`. */\n theme: Theme;\n /** User-selected mode. `\"system\"` defers to `prefers-color-scheme`. */\n mode: ThemeMode;\n setMode: (mode: ThemeMode) => void;\n toggle: () => void;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n /** Initial mode if no stored value exists. Default: `\"system\"`. */\n defaultMode?: ThemeMode;\n /** Where to write the data attribute. Default: `document.documentElement` (`<html>`). */\n attribute?: \"data-theme\" | \"class\";\n /** localStorage key for persistence. Set to `null` to disable. Default: `\"sds-theme\"`. */\n storageKey?: string | null;\n /** Disable transitions during theme switch to avoid flicker. Default: true. */\n disableTransitionOnChange?: boolean;\n children: ReactNode;\n}\n\nfunction getSystemTheme(): Theme {\n if (typeof window === \"undefined\") return \"light\";\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n}\n\nfunction resolve(mode: ThemeMode): Theme {\n return mode === \"system\" ? getSystemTheme() : mode;\n}\n\nfunction applyTheme(\n theme: Theme,\n attribute: \"data-theme\" | \"class\",\n disableTransitions: boolean,\n) {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n let cleanup: (() => void) | null = null;\n if (disableTransitions) {\n const style = document.createElement(\"style\");\n style.appendChild(\n document.createTextNode(\n \"*,*::before,*::after{transition:none!important;animation-duration:0s!important}\",\n ),\n );\n document.head.appendChild(style);\n // Force reflow so the disable lands before attribute mutation.\n void root.offsetHeight;\n cleanup = () => {\n // Force a restyle so the attribute swap is committed while transitions\n // are still disabled, then re-enable. Use setTimeout, NOT\n // requestAnimationFrame: rAF is paused in background/hidden tabs, so a\n // theme applied there (initial mount in a backgrounded tab, a system\n // preference change, React StrictMode's double-invoked mount effect)\n // would leave this `transition:none!important` style stuck in <head>\n // and kill every CSS transition app-wide until the tab regained focus.\n // setTimeout still fires (throttled at worst) when hidden, so it always\n // self-heals. Matches next-themes' disableTransitionOnChange approach.\n window.getComputedStyle(document.body);\n window.setTimeout(() => {\n style.remove();\n }, 0);\n };\n }\n if (attribute === \"data-theme\") {\n root.setAttribute(\"data-theme\", theme);\n } else {\n root.classList.remove(\"light\", \"dark\");\n root.classList.add(theme);\n }\n cleanup?.();\n}\n\nexport function ThemeProvider({\n defaultMode = \"system\",\n attribute = \"data-theme\",\n storageKey = \"sds-theme\",\n disableTransitionOnChange = true,\n children,\n}: ThemeProviderProps) {\n const [mode, setModeState] = useState<ThemeMode>(() => {\n if (typeof window === \"undefined\" || !storageKey) return defaultMode;\n const stored = window.localStorage.getItem(storageKey);\n if (stored === \"light\" || stored === \"dark\" || stored === \"system\") return stored;\n return defaultMode;\n });\n\n const [theme, setTheme] = useState<Theme>(() => resolve(defaultMode));\n\n // Apply theme on every mode change.\n useEffect(() => {\n const next = resolve(mode);\n setTheme(next);\n applyTheme(next, attribute, disableTransitionOnChange);\n if (storageKey && typeof window !== \"undefined\") {\n window.localStorage.setItem(storageKey, mode);\n }\n }, [mode, attribute, disableTransitionOnChange, storageKey]);\n\n // Listen to system preference when mode is \"system\".\n useEffect(() => {\n if (mode !== \"system\" || typeof window === \"undefined\") return;\n const mql = window.matchMedia(\"(prefers-color-scheme: dark)\");\n const onChange = () => {\n const next = mql.matches ? \"dark\" : \"light\";\n setTheme(next);\n applyTheme(next, attribute, disableTransitionOnChange);\n };\n mql.addEventListener(\"change\", onChange);\n return () => mql.removeEventListener(\"change\", onChange);\n }, [mode, attribute, disableTransitionOnChange]);\n\n const setMode = useCallback((next: ThemeMode) => {\n setModeState(next);\n }, []);\n\n const toggle = useCallback(() => {\n setModeState((prev) => {\n const current = resolve(prev);\n return current === \"dark\" ? \"light\" : \"dark\";\n });\n }, []);\n\n const value = useMemo<ThemeContextValue>(\n () => ({ theme, mode, setMode, toggle }),\n [theme, mode, setMode, toggle],\n );\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme(): ThemeContextValue {\n const ctx = useContext(ThemeContext);\n if (!ctx) {\n throw new Error(\"useTheme() must be used inside <ThemeProvider>.\");\n }\n return ctx;\n}\n","import * as RT from \"@radix-ui/react-tabs\";\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type MutableRefObject,\n type ReactNode,\n} from \"react\";\nimport styles from \"./Tabs.module.css\";\n\nexport type TabsVariant = \"underline\" | \"segmented\" | \"pill\";\n\ninterface TabsCtx {\n value: string | undefined;\n groupId: string;\n variant: TabsVariant;\n /** Register/unregister a trigger's DOM node so the list can measure it. */\n registerTrigger: (value: string, node: HTMLButtonElement | null) => void;\n}\n\nconst TabsContext = createContext<TabsCtx | null>(null);\n\nexport interface TabsProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n variant?: TabsVariant;\n children?: ReactNode;\n className?: string;\n}\n\nexport function Tabs({\n value,\n defaultValue,\n onValueChange,\n variant = \"underline\",\n children,\n className,\n}: TabsProps) {\n const [internal, setInternal] = useState(defaultValue);\n const groupId = useId();\n const current = value ?? internal;\n\n // Map of tab value -> trigger node, shared with the list for measurement.\n const triggersRef = useRef(new Map<string, HTMLButtonElement>());\n const registerTrigger = useCallback((v: string, node: HTMLButtonElement | null) => {\n if (node) triggersRef.current.set(v, node);\n else triggersRef.current.delete(v);\n }, []);\n\n return (\n <TabsContext.Provider value={{ value: current, groupId, variant, registerTrigger }}>\n <TriggersRefContext.Provider value={triggersRef}>\n <RT.Root\n value={value}\n defaultValue={defaultValue}\n onValueChange={(v) => {\n if (value === undefined) setInternal(v);\n onValueChange?.(v);\n }}\n className={[styles.root, styles[`v-${variant}`], className].filter(Boolean).join(\" \")}\n >\n {children}\n </RT.Root>\n </TriggersRefContext.Provider>\n </TabsContext.Provider>\n );\n}\n\nconst TriggersRefContext = createContext<MutableRefObject<\n Map<string, HTMLButtonElement>\n> | null>(null);\n\nexport interface TabsListProps {\n children: ReactNode;\n ariaLabel?: string;\n}\n\nexport function TabsList({ children, ariaLabel }: TabsListProps) {\n const ctx = useContext(TabsContext);\n const triggersRef = useContext(TriggersRefContext);\n if (!ctx || !triggersRef) throw new Error(\"TabsList must be inside <Tabs>\");\n\n const listRef = useRef<HTMLDivElement>(null);\n const [indicator, setIndicator] = useState<{ left: number; width: number; ready: boolean }>({\n left: 0,\n width: 0,\n ready: false,\n });\n\n // Measure the active trigger relative to the list, in a layout effect so the\n // indicator never paints at a stale position.\n const measure = useCallback(() => {\n const list = listRef.current;\n if (!list || ctx.value === undefined) {\n setIndicator((prev) => (prev.ready ? { ...prev, ready: false } : prev));\n return;\n }\n const node = triggersRef.current.get(ctx.value);\n if (!node) {\n setIndicator((prev) => (prev.ready ? { ...prev, ready: false } : prev));\n return;\n }\n const listBox = list.getBoundingClientRect();\n const box = node.getBoundingClientRect();\n const left = box.left - listBox.left;\n // Bail out when nothing moved so observer fires can't cause render churn.\n setIndicator((prev) =>\n prev.ready && prev.left === left && prev.width === box.width\n ? prev\n : { left, width: box.width, ready: true },\n );\n }, [ctx.value, triggersRef]);\n\n useLayoutEffect(() => {\n measure();\n }, [measure]);\n\n // Keep the indicator correct on resize / content reflow.\n useEffect(() => {\n const list = listRef.current;\n if (!list || typeof ResizeObserver === \"undefined\") return;\n const ro = new ResizeObserver(() => measure());\n ro.observe(list);\n for (const node of triggersRef.current.values()) ro.observe(node);\n window.addEventListener(\"resize\", measure);\n return () => {\n ro.disconnect();\n window.removeEventListener(\"resize\", measure);\n };\n }, [measure, triggersRef]);\n\n return (\n <RT.List\n ref={listRef}\n aria-label={ariaLabel}\n className={[styles.list, styles[`list-${ctx.variant}`]].join(\" \")}\n >\n <span\n aria-hidden=\"true\"\n data-active={indicator.ready || undefined}\n className={[styles.indicator, styles[`indicator-${ctx.variant}`]].join(\" \")}\n style={{\n transform: `translateX(${indicator.left}px)`,\n width: indicator.width,\n }}\n />\n {children}\n </RT.List>\n );\n}\n\nexport interface TabsTriggerProps {\n value: string;\n children: ReactNode;\n disabled?: boolean;\n}\n\nexport const TabsTrigger = forwardRef<HTMLButtonElement, TabsTriggerProps>(function TabsTrigger(\n { value, children, disabled },\n ref,\n) {\n const ctx = useContext(TabsContext);\n if (!ctx) throw new Error(\"TabsTrigger must be inside <Tabs>\");\n\n const setRef = useCallback(\n (node: HTMLButtonElement | null) => {\n ctx.registerTrigger(value, node);\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [ctx, value, ref],\n );\n\n return (\n <RT.Trigger\n ref={setRef}\n value={value}\n disabled={disabled}\n className={[styles.trigger, styles[`trigger-${ctx.variant}`]].join(\" \")}\n >\n <span className={styles.label}>{children}</span>\n </RT.Trigger>\n );\n});\n\nexport const TabsContent = RT.Content;\n","import { forwardRef, type HTMLAttributes, type ReactNode, type TableHTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from \"react\";\nimport styles from \"./Table.module.css\";\n\nexport interface TableProps extends TableHTMLAttributes<HTMLTableElement> {\n stickyHeader?: boolean;\n caption?: ReactNode;\n}\n\nexport const Table = forwardRef<HTMLTableElement, TableProps>(function Table(\n { stickyHeader, caption, className, children, ...rest },\n ref,\n) {\n return (\n <table\n ref={ref}\n className={[styles.table, stickyHeader ? styles.sticky : null, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {caption ? <caption className={styles.caption}>{caption}</caption> : null}\n {children}\n </table>\n );\n});\n\nexport interface ThProps extends ThHTMLAttributes<HTMLTableCellElement> {\n numeric?: boolean;\n}\n\nexport const Th = forwardRef<HTMLTableCellElement, ThProps>(function Th(\n { numeric, className, scope, ...rest },\n ref,\n) {\n return (\n <th\n ref={ref}\n scope={scope ?? \"col\"}\n className={[styles.th, numeric ? styles.numeric : null, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport interface TdProps extends TdHTMLAttributes<HTMLTableCellElement> {\n numeric?: boolean;\n}\n\nexport const Td = forwardRef<HTMLTableCellElement, TdProps>(function Td(\n { numeric, className, ...rest },\n ref,\n) {\n return (\n <td\n ref={ref}\n className={[styles.td, numeric ? styles.numeric : null, className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport const Thead = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function Thead(props, ref) {\n return <thead ref={ref} {...props} />;\n});\n\nexport const Tbody = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function Tbody(props, ref) {\n return <tbody ref={ref} {...props} />;\n});\n\nexport const Tr = forwardRef<HTMLTableRowElement, HTMLAttributes<HTMLTableRowElement>>(function Tr(props, ref) {\n return <tr ref={ref} {...props} />;\n});\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./Avatar.module.css\";\n\nexport type AvatarSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\nexport type AvatarTone = \"user\" | \"brand\" | \"success\" | \"warning\" | \"muted\";\nexport type AvatarStatus = \"online\" | \"away\" | \"off\";\n\nconst STATUS_LABELS: Record<AvatarStatus, string> = {\n online: \"Online\",\n away: \"Away\",\n off: \"Offline\",\n};\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n size?: AvatarSize;\n tone?: AvatarTone;\n status?: AvatarStatus;\n src?: string;\n alt?: string;\n children?: ReactNode;\n}\n\n/**\n * When `src` is omitted and `children` (typically initials) is rendered, the\n * wrapping span defaults to `role=\"img\"` and uses `aria-label` (or the children\n * value as fallback) so screen readers announce a meaningful identity. Callers\n * should pass `aria-label` with the full name where possible.\n */\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(\n { size = \"md\", tone = \"user\", status, src, alt, children, className, role, ...rest },\n ref,\n) {\n const isInitials = !src && children != null;\n const ariaLabel = (rest as { \"aria-label\"?: string })[\"aria-label\"];\n const inferredLabel = isInitials\n ? ariaLabel ?? (typeof children === \"string\" ? children : undefined)\n : undefined;\n const resolvedRole = role ?? (isInitials ? \"img\" : undefined);\n\n return (\n <span\n ref={ref}\n role={resolvedRole}\n aria-label={isInitials ? inferredLabel : ariaLabel}\n className={[styles.av, styles[`size-${size}`], styles[`tone-${tone}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {src ? <img src={src} alt={alt ?? \"\"} className={styles.img} /> : children}\n {status ? (\n <>\n <span className={[styles.status, styles[`status-${status}`]].join(\" \")} aria-hidden=\"true\" />\n <span className={styles.visuallyHidden}>{STATUS_LABELS[status]}</span>\n </>\n ) : null}\n </span>\n );\n});\n\nexport interface AvatarStackProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport const AvatarStack = forwardRef<HTMLDivElement, AvatarStackProps>(function AvatarStack(\n { children, className, ...rest },\n ref,\n) {\n return (\n <div ref={ref} className={[styles.stack, className].filter(Boolean).join(\" \")} {...rest}>\n {children}\n </div>\n );\n});\n\nexport interface AvatarChipProps extends HTMLAttributes<HTMLSpanElement> {\n initials?: ReactNode;\n src?: string;\n alt?: string;\n children: ReactNode;\n}\n\nexport const AvatarChip = forwardRef<HTMLSpanElement, AvatarChipProps>(function AvatarChip(\n { initials, src, alt, children, className, ...rest },\n ref,\n) {\n return (\n <span ref={ref} className={[styles.chip, className].filter(Boolean).join(\" \")} {...rest}>\n <Avatar size=\"xs\" src={src} alt={alt}>\n {initials}\n </Avatar>\n {children}\n </span>\n );\n});\n","import { createElement, forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./EmptyState.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n illustration?: ReactNode;\n title: ReactNode | RichStr;\n /** Heading level for the title; defaults to 3. Set per page hierarchy. */\n titleLevel?: HeadingLevel;\n description?: ReactNode | RichStr;\n actions?: ReactNode;\n}\n\nexport const EmptyState = forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState(\n { illustration, title, titleLevel = 3, description, actions, className, ...rest },\n ref,\n) {\n return (\n <div ref={ref} className={[styles.stage, className].filter(Boolean).join(\" \")} {...rest}>\n {illustration ? (\n <div className={styles.illu} aria-hidden=\"true\">\n {illustration}\n </div>\n ) : null}\n {createElement(`h${titleLevel}`, { className: styles.title }, resolveNode(title))}\n {description ? <div className={styles.desc}>{resolveNode(description)}</div> : null}\n {actions ? <div className={styles.actions}>{actions}</div> : null}\n </div>\n );\n});\n","import {\n createElement,\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from \"react\";\nimport styles from \"./Card.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\nimport { resolveSpacing, type Spacing } from \"../spacing/padding\";\n\nexport type CardSurface = \"panel\" | \"inset\" | \"elevated\";\n/** Legacy class-backed padding steps (asymmetric vertical/horizontal px). */\nexport type CardPadding = \"none\" | \"sm\" | \"md\" | \"lg\";\nconst LEGACY_PADDING = new Set<string>([\"none\", \"sm\", \"md\", \"lg\"]);\nexport type CardBorder = \"none\" | \"dashed\" | \"solid\";\nexport type CardBorderColor = \"default\" | \"info\" | \"success\" | \"warning\" | \"error\";\nexport type CardRounding = \"xs\" | \"sm\" | \"md\" | \"lg\";\nexport type CardBackground = \"none\" | \"light\" | \"heavy\";\n\ninterface CardBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n surface?: CardSurface;\n /**\n * Inner padding. The legacy keywords (`none`/`sm`/`md`/`lg`) keep their\n * established asymmetric spacing. Any other {@link PaddingVariant} keyword\n * (`xs`/`xl`/`2xl`/`fit`), a number (px), or a CSS length string applies\n * symmetric padding via inline style. Default: `\"md\"`.\n */\n padding?: CardPadding | Spacing;\n interactive?: boolean;\n asChild?: boolean;\n /** Border style override. Default: the surface's own border (solid). */\n border?: CardBorder;\n /** Border color from the status palette. No effect with `border=\"none\"`. */\n borderColor?: CardBorderColor;\n /** Corner rounding override. Default: the card's standard 12px radius. */\n rounding?: CardRounding;\n /**\n * Background fill override (Opal parity). `light` and `heavy` swap the card's\n * fill to a tinted surface; `none` makes it transparent. Default: undefined,\n * which preserves the surface's own background.\n */\n background?: CardBackground;\n}\n\ninterface CardPlainProps extends CardBaseProps {\n /** Plain card (default): children render inside a single styled div. */\n expandable?: false;\n}\n\ninterface CardExpandableProps extends CardBaseProps {\n /**\n * Expandable mode: `children` is the always-visible header,\n * `expandedContent` animates open and closed below it. Fully controlled —\n * the caller owns `expanded` and wires its own toggle.\n */\n expandable: true;\n /** Controlled expanded state. Default: false. */\n expanded?: boolean;\n /** Body rendered below the header, animating with `expanded`. */\n expandedContent?: ReactNode;\n /** Body height: `\"md\"` caps at 20rem with scroll, `\"fit\"` is natural height. Default: `\"md\"`. */\n expandableContentHeight?: \"md\" | \"fit\";\n}\n\nexport type CardProps = CardPlainProps | CardExpandableProps;\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(function Card(props, ref) {\n const {\n surface = \"panel\",\n padding = \"md\",\n interactive,\n border,\n borderColor,\n rounding,\n background,\n className,\n children,\n onClick,\n onKeyDown,\n role,\n tabIndex,\n } = props;\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (!interactive || !onClick || event.defaultPrevented) return;\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n onClick(event as unknown as Parameters<NonNullable<typeof onClick>>[0]);\n }\n };\n\n const interactiveProps = interactive\n ? {\n role: role ?? \"button\",\n tabIndex: tabIndex ?? 0,\n onKeyDown: handleKeyDown,\n }\n : { role, tabIndex, onKeyDown };\n\n // Legacy keywords keep their class-backed asymmetric padding; new variants /\n // numbers / arbitrary lengths apply symmetric padding via inline style on top\n // of a zero-padding base class.\n const isLegacyPadding = typeof padding === \"string\" && LEGACY_PADDING.has(padding);\n const padClass = isLegacyPadding ? styles[`pad-${padding}`] : styles[\"pad-none\"];\n const padStyle: CSSProperties | undefined = isLegacyPadding\n ? undefined\n : { padding: resolveSpacing(padding as Spacing) };\n\n const skinClasses = [\n styles.card,\n styles[`surface-${surface}`],\n padClass,\n interactive ? styles.interactive : null,\n border ? styles[`border-${border}`] : null,\n borderColor ? styles[`bc-${borderColor}`] : null,\n rounding ? styles[`round-${rounding}`] : null,\n background ? styles[`bg-${background}`] : null,\n ];\n\n if (!props.expandable) {\n const {\n surface: _s,\n padding: _p,\n interactive: _i,\n asChild: _a,\n border: _b,\n borderColor: _bc,\n rounding: _r,\n background: _bg,\n expandable: _e,\n className: _c,\n children: _ch,\n onClick: _oc,\n onKeyDown: _ok,\n role: _ro,\n tabIndex: _ti,\n style: styleProp,\n ...rest\n } = props;\n return (\n <div\n ref={ref}\n className={[...skinClasses, className].filter(Boolean).join(\" \")}\n style={padStyle ? { ...padStyle, ...styleProp } : styleProp}\n onClick={onClick}\n {...interactiveProps}\n {...rest}\n >\n {children}\n </div>\n );\n }\n\n // Expandable mode — header keeps the card skin; the body joins it seamlessly\n // (top rounding on header, bottom rounding on body) while expanded.\n const { expanded = false, expandedContent, expandableContentHeight = \"md\" } = props;\n const showContent = expanded && expandedContent !== undefined;\n\n return (\n <div ref={ref} className={[styles.expandableRoot, className].filter(Boolean).join(\" \")}>\n <div\n className={[\n ...skinClasses,\n styles.expandableHeader,\n showContent ? styles[`roundTop-${rounding ?? \"md\"}`] : null,\n ]\n .filter(Boolean)\n .join(\" \")}\n style={padStyle}\n onClick={onClick}\n {...interactiveProps}\n >\n {children}\n </div>\n {expandedContent !== undefined && (\n <div className={styles.expandWrapper} data-expanded={showContent ? \"true\" : \"false\"}>\n <div className={styles.expandInner}>\n <div\n className={[\n styles.expandBody,\n styles[`roundBottom-${rounding ?? \"md\"}`],\n border ? styles[`border-${border}`] : styles[\"border-solid\"],\n borderColor ? styles[`bc-${borderColor}`] : null,\n expandableContentHeight === \"md\" ? styles.expandBodyCapped : null,\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {expandedContent}\n </div>\n </div>\n </div>\n )}\n </div>\n );\n});\n\nexport type CardHeaderTitleLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n title?: ReactNode | RichStr;\n titleLevel?: CardHeaderTitleLevel;\n description?: ReactNode | RichStr;\n actions?: ReactNode;\n}\n\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(function CardHeader(\n { title, titleLevel = 3, description, actions, children, className, ...rest },\n ref,\n) {\n return (\n <div ref={ref} className={[styles.header, className].filter(Boolean).join(\" \")} {...rest}>\n <div className={styles.headerText}>\n {title\n ? createElement(`h${titleLevel}`, { className: styles.title }, resolveNode(title))\n : null}\n {description ? <div className={styles.description}>{resolveNode(description)}</div> : null}\n {children}\n </div>\n {actions ? <div className={styles.headerActions}>{actions}</div> : null}\n </div>\n );\n});\n\nexport const CardBody = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n function CardBody({ className, ...rest }, ref) {\n return (\n <div ref={ref} className={[styles.body, className].filter(Boolean).join(\" \")} {...rest} />\n );\n },\n);\n\nexport const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n function CardFooter({ className, ...rest }, ref) {\n return (\n <div ref={ref} className={[styles.footer, className].filter(Boolean).join(\" \")} {...rest} />\n );\n },\n);\n\nexport interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n /** Heading level rendered. Default: 3. */\n level?: CardHeaderTitleLevel;\n}\n\n/**\n * Standalone card title. Use inside `CardHeader` (or anywhere a card heading is\n * needed) when you need to forward `className`/`ref` — the `CardHeader title=`\n * prop does not. Renders `h{level}` carrying the shared `.title` token style.\n */\nexport const CardTitle = forwardRef<HTMLHeadingElement, CardTitleProps>(function CardTitle(\n { level = 3, className, children, ...rest },\n ref,\n) {\n return createElement(\n `h${level}`,\n { ref, className: [styles.title, className].filter(Boolean).join(\" \"), ...rest },\n children,\n );\n});\n\n/**\n * Standalone card description (className/ref-forwarding counterpart to the\n * `CardHeader description=` prop).\n */\nexport const CardDescription = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(function CardDescription({ className, ...rest }, ref) {\n return (\n <p ref={ref} className={[styles.description, className].filter(Boolean).join(\" \")} {...rest} />\n );\n});\n","/**\n * SearchInput\n *\n * Pre-styled Input with a leading search icon, optional trailing keyboard\n * shortcut, and a clearable X when the value is non-empty. While `loading`,\n * the search icon is replaced with a spinner.\n *\n * Mirrors the base Input prop surface so consumers can swap them as needed.\n */\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { SvgCancel, SvgLoader, SvgSearch } from \"../../icons\";\nimport styles from \"./SearchInput.module.css\";\n\ntype BaseProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"size\" | \"type\" | \"value\" | \"defaultValue\" | \"onChange\"\n>;\n\nexport interface SearchInputProps extends BaseProps {\n value?: string;\n defaultValue?: string;\n onChange?: (next: string) => void;\n onClear?: () => void;\n /** Trailing affordance, typically a `KeyboardShortcut`. */\n shortcut?: ReactNode;\n /** Replace the leading search icon with a spinner. */\n loading?: boolean;\n label?: string;\n hint?: string;\n error?: string;\n clearLabel?: string;\n /**\n * Optional debounced echo of the typed value. Fires `onDebouncedChange`\n * after the user has paused typing for `debounceMs`. `onChange` still\n * fires on every keystroke. Default: 0 (off).\n */\n debounceMs?: number;\n onDebouncedChange?: (next: string) => void;\n}\n\n/**\n * Internal debounce helper. Not exported. Used by SearchInput to feed the\n * optional `onDebouncedChange` callback.\n */\nfunction useDebouncedValue<T>(value: T, delayMs: number): T {\n const [debounced, setDebounced] = useState(value);\n useEffect(() => {\n if (delayMs <= 0) {\n setDebounced(value);\n return;\n }\n const t = setTimeout(() => setDebounced(value), delayMs);\n return () => clearTimeout(t);\n }, [value, delayMs]);\n return debounced;\n}\n\nexport const SearchInput = forwardRef<HTMLInputElement, SearchInputProps>(function SearchInput(\n {\n value,\n defaultValue,\n onChange,\n onClear,\n shortcut,\n loading,\n label,\n hint,\n error,\n clearLabel = \"Clear search\",\n debounceMs = 0,\n onDebouncedChange,\n id,\n className,\n placeholder = \"Search…\",\n required,\n disabled,\n ...rest\n },\n ref,\n) {\n const autoId = useId();\n const inputId = id ?? autoId;\n const hintId = `${inputId}-hint`;\n const errorId = `${inputId}-error`;\n const describedBy =\n [error ? errorId : null, hint && !error ? hintId : null].filter(Boolean).join(\" \") || undefined;\n\n const innerRef = useRef<HTMLInputElement | null>(null);\n const setRefs = useCallback(\n (node: HTMLInputElement | null) => {\n innerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as { current: HTMLInputElement | null }).current = node;\n },\n [ref],\n );\n\n const controlled = value !== undefined;\n const [internal, setInternal] = useState<string>(defaultValue ?? \"\");\n const current = controlled ? value ?? \"\" : internal;\n\n const debounced = useDebouncedValue(current, debounceMs);\n useEffect(() => {\n if (debounceMs > 0 && onDebouncedChange) onDebouncedChange(debounced);\n // We intentionally only fire when the debounced echo flips.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [debounced]);\n\n const handleChange = (next: string) => {\n if (!controlled) setInternal(next);\n onChange?.(next);\n };\n\n const clear = () => {\n if (!controlled) setInternal(\"\");\n onChange?.(\"\");\n onClear?.();\n innerRef.current?.focus();\n };\n\n const hasValue = current.length > 0;\n\n return (\n <div className={[styles.wrapper, className].filter(Boolean).join(\" \")}>\n {label ? (\n <label htmlFor={inputId} className={styles.label}>\n {label}\n </label>\n ) : null}\n <div className={[styles.field, error ? styles[\"field-error\"] : null].filter(Boolean).join(\" \")}>\n <span className={styles.icon} aria-hidden=\"true\">\n {loading ? (\n <SvgLoader className={styles.spin} width={16} height={16} />\n ) : (\n <SvgSearch width={16} height={16} />\n )}\n </span>\n <input\n ref={setRefs}\n id={inputId}\n type=\"search\"\n role=\"searchbox\"\n autoComplete=\"off\"\n className={styles.input}\n value={current}\n placeholder={placeholder}\n disabled={disabled}\n required={required}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy}\n onChange={(e) => handleChange(e.target.value)}\n {...rest}\n />\n {hasValue ? (\n <button\n type=\"button\"\n className={styles.clear}\n onClick={clear}\n aria-label={clearLabel}\n disabled={disabled}\n >\n <SvgCancel width={14} height={14} aria-hidden=\"true\" />\n </button>\n ) : shortcut ? (\n <span className={styles.trailing}>{shortcut}</span>\n ) : null}\n </div>\n {error ? (\n <span id={errorId} className={styles.error}>\n {error}\n </span>\n ) : hint ? (\n <span id={hintId} className={styles.hint}>\n {hint}\n </span>\n ) : null}\n </div>\n );\n});\n","import { useState, type ReactNode } from \"react\";\nimport styles from \"./DetailSection.module.css\";\nimport { Button } from \"../Button\";\nimport { SearchInput } from \"../SearchInput\";\nimport {\n SvgArrowRight as ArrowRight,\n SvgCheck as Check,\n SvgChevronRight as ChevronRight,\n SvgCopy as Copy,\n} from \"../../icons\";\n\n/**\n * Detail-section primitives — the shared shell for tabbed detail pages\n * (meeting detail, project detail). Presentational only: each page feeds its\n * own data into the same panels / rows / cards so the surfaces stay identical.\n *\n * A list tab is a fill panel with a pinned toolbar over an internally\n * scrolling list:\n *\n * ```tsx\n * <DetailPanel fill>\n * <DetailToolbar value={q} onChange={setQ} placeholder=\"Search…\">…actions…</DetailToolbar>\n * <DetailScrollRegion>\n * <DetailList>\n * {rows.map((r) => (\n * <DetailRow key={r.id} icon={<Icon />} onClick={() => open(r)}>…</DetailRow>\n * ))}\n * </DetailList>\n * </DetailScrollRegion>\n * </DetailPanel>\n * ```\n *\n * See **Guidelines / Scrollable list pages** (Shape B) for the page frame these\n * panels sit in.\n */\n\n/** Robust clipboard write with a legacy execCommand fallback (non-secure\n * contexts / older browsers). */\nasync function writeClipboard(text: string): Promise<void> {\n try {\n await navigator.clipboard.writeText(text);\n } catch {\n const ta = document.createElement(\"textarea\");\n ta.value = text;\n ta.style.position = \"fixed\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n try {\n document.execCommand(\"copy\");\n } catch {\n /* ignore */\n }\n ta.remove();\n }\n}\n\nconst cx = (...parts: Array<string | false | undefined>) => parts.filter(Boolean).join(\" \");\n\nexport interface CopyButtonProps {\n /** Returns the plain-text payload to copy (computed lazily on click). */\n getText: () => string;\n /** Used in the title/aria (\"Copy {label}\"). */\n label: string;\n /** Extra classes on the button root (e.g. a hover-reveal utility). */\n className?: string;\n}\n\n/**\n * Copy-to-clipboard button: a Copy glyph that flips to a Check for ~1.4s after\n * a successful copy. Visible by default; pass a className to control reveal\n * (OverviewCard reveals it on the card's hover).\n */\nexport function CopyButton({ getText, label, className }: CopyButtonProps) {\n const [done, setDone] = useState(false);\n return (\n <Button\n variant=\"tertiary\"\n size=\"sm\"\n iconOnly\n title={`Copy ${label}`}\n aria-label={`Copy ${label}`}\n className={className}\n onClick={async (e) => {\n e.stopPropagation();\n await writeClipboard(getText());\n setDone(true);\n setTimeout(() => setDone(false), 1400);\n }}\n iconLeft={done ? <Check width={16} height={16} /> : <Copy width={16} height={16} />}\n />\n );\n}\n\nexport interface DetailPanelProps {\n children: ReactNode;\n /** Fill a height-constrained flex parent so the list scrolls inside via\n * DetailScrollRegion while the toolbar stays pinned. Omit for normal flow. */\n fill?: boolean;\n className?: string;\n}\n\n/** Bordered card container for a tab section. */\nexport function DetailPanel({ children, fill = false, className }: DetailPanelProps) {\n return <div className={cx(styles.panel, fill && styles.panelFill, className)}>{children}</div>;\n}\n\n/** The scrolling body under a fixed toolbar — only meaningful inside a `fill`\n * panel. `data-scroll-region` lets a consumer centre an item inside it. */\nexport function DetailScrollRegion({ children }: { children: ReactNode }) {\n return (\n <div data-scroll-region className={styles.scrollRegion}>\n {children}\n </div>\n );\n}\n\nexport interface DetailToolbarProps {\n value: string;\n onChange: (v: string) => void;\n placeholder: string;\n ariaLabel?: string;\n clearLabel?: string;\n /** Right-aligned action slot (e.g. a Copy button, a Select, an export). */\n children?: ReactNode;\n}\n\n/** Search toolbar: a SearchInput on the left + an optional right action slot. */\nexport function DetailToolbar({ value, onChange, placeholder, ariaLabel, clearLabel, children }: DetailToolbarProps) {\n return (\n <div className={styles.toolbar}>\n <SearchInput\n value={value}\n onChange={onChange}\n onClear={() => onChange(\"\")}\n placeholder={placeholder}\n aria-label={ariaLabel ?? placeholder}\n {...(clearLabel ? { clearLabel } : {})}\n className={styles.toolbarSearch}\n />\n {children ? <div className={styles.toolbarActions}>{children}</div> : null}\n </div>\n );\n}\n\n/** Divided list wrapper for section rows. */\nexport function DetailList({ children }: { children: ReactNode }) {\n return <ul className={styles.list}>{children}</ul>;\n}\n\nexport interface DetailRowProps {\n icon?: ReactNode;\n children: ReactNode;\n onClick?: () => void;\n}\n\n/** A section row: leading icon + content + a reveal chevron on hover (when\n * clickable). The clickable hover affordance is a title underline. */\nexport function DetailRow({ icon, children, onClick }: DetailRowProps) {\n const clickable = !!onClick;\n return (\n <li className={cx(styles.row, clickable && styles.rowClickable)} onClick={onClick}>\n {icon ? <span className={styles.rowIcon}>{icon}</span> : null}\n <div className={styles.rowContent}>{children}</div>\n {clickable && <ChevronRight className={styles.rowChevron} />}\n </li>\n );\n}\n\n/** Centered italic empty message inside a panel. */\nexport function DetailEmptyRow({ children }: { children: ReactNode }) {\n return <p className={styles.emptyRow}>{children}</p>;\n}\n\nexport interface OverviewCardProps {\n icon: ReactNode;\n title: string;\n count?: number;\n children: ReactNode;\n onViewAll?: () => void;\n viewAllLabel?: string;\n /** When set, a hover-revealed copy button appears in the header. Returns the\n * section's plain-text representation. */\n copyText?: () => string;\n copyLabel?: string;\n}\n\n/** Overview dashboard card: icon + title + count header (with an optional\n * hover-revealed copy button), a body of jump rows, and an optional\n * full-width \"View all\" footer. */\nexport function OverviewCard({\n icon,\n title,\n count,\n children,\n onViewAll,\n viewAllLabel = \"View all\",\n copyText,\n copyLabel,\n}: OverviewCardProps) {\n return (\n <div className={styles.overviewCard}>\n <div className={styles.overviewHeader}>\n <span className={styles.overviewIcon}>{icon}</span>\n <h3 className={styles.overviewTitle}>\n {title}\n {typeof count === \"number\" && <span className={styles.overviewCount}>({count})</span>}\n </h3>\n {copyText && (\n <>\n <span className={styles.overviewSpacer} />\n <CopyButton getText={copyText} label={copyLabel ?? title} className={styles.overviewCopy} />\n </>\n )}\n </div>\n <div className={styles.overviewBody}>{children}</div>\n {onViewAll && (\n <button type=\"button\" onClick={onViewAll} className={styles.viewAll}>\n {viewAllLabel} <ArrowRight width={14} height={14} />\n </button>\n )}\n </div>\n );\n}\n\nexport interface OverviewBulletProps {\n children: ReactNode;\n onClick?: () => void;\n}\n\n/** A bullet jump-row inside an OverviewCard. */\nexport function OverviewBullet({ children, onClick }: OverviewBulletProps) {\n const clickable = !!onClick;\n return (\n <button\n type=\"button\"\n disabled={!clickable}\n onClick={onClick}\n className={cx(styles.bullet, clickable ? styles.bulletClickable : styles.bulletDisabled)}\n >\n <span aria-hidden className={styles.bulletDot} />\n <span className={styles.bulletText}>{children}</span>\n {clickable && <ChevronRight className={styles.bulletChevron} />}\n </button>\n );\n}\n","import {\n forwardRef,\n useId,\n type HTMLAttributes,\n type KeyboardEventHandler,\n type MouseEventHandler,\n type ReactNode,\n} from \"react\";\nimport styles from \"./List.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport interface ListProps extends HTMLAttributes<HTMLUListElement> {\n /** Hairline dividers between items. Default true. */\n dividers?: boolean;\n /** Wrap in a bordered panel surface. Default true. */\n bordered?: boolean;\n /** Compact row padding. */\n density?: \"compact\" | \"cozy\" | \"comfortable\";\n}\n\nexport const List = forwardRef<HTMLUListElement, ListProps>(function List(\n { dividers = true, bordered = true, density = \"cozy\", className, children, ...rest },\n ref,\n) {\n return (\n <ul\n ref={ref}\n className={[\n styles.root,\n bordered ? styles.bordered : null,\n dividers ? styles.dividers : null,\n styles[`density-${density}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n >\n {children}\n </ul>\n );\n});\n\nexport interface ListItemProps extends Omit<HTMLAttributes<HTMLLIElement>, \"title\"> {\n /** Left slot — avatar, icon. */\n leading?: ReactNode;\n /** Right slot — meta, status, action. */\n trailing?: ReactNode;\n /** Primary text. */\n title?: ReactNode | RichStr;\n /** Secondary text under title. */\n description?: ReactNode | RichStr;\n /** Make the row clickable (renders role=button + keyboard handler). */\n interactive?: boolean;\n /** Selected/active styling. */\n active?: boolean;\n}\n\nexport const ListItem = forwardRef<HTMLLIElement, ListItemProps>(function ListItem(\n {\n leading,\n trailing,\n title,\n description,\n interactive,\n active,\n className,\n children,\n onClick,\n onKeyDown,\n role,\n tabIndex,\n \"aria-current\": ariaCurrent,\n \"aria-label\": ariaLabel,\n ...rest\n },\n ref,\n) {\n // The row stays a plain listitem so the <ul> keeps a valid list structure.\n // When interactive, an absolutely-positioned transparent <button> overlays the\n // row as a sibling (never an ancestor) of the trailing slot. This keeps any\n // actions consumers drop into `trailing` out of the button's subtree, so the\n // primary row action and those actions never nest. Native button gives Enter +\n // Space activation for free.\n const titleId = useId();\n\n if (interactive) {\n // Overlay button has no text child; label it from the visible title when\n // present, else fall back to a caller-provided aria-label.\n const labelProps = title\n ? { \"aria-labelledby\": titleId }\n : ariaLabel\n ? { \"aria-label\": ariaLabel }\n : {};\n return (\n <li\n ref={ref}\n className={[styles.item, styles.interactive, active ? styles.active : null, className]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n >\n <button\n type=\"button\"\n className={styles.overlay}\n // Handlers are typed against the <li> in ListItemProps; the overlay\n // button receives them instead. Same DOM events at runtime.\n onClick={onClick as MouseEventHandler<HTMLElement> as MouseEventHandler<HTMLButtonElement>}\n onKeyDown={onKeyDown as KeyboardEventHandler<HTMLElement> as KeyboardEventHandler<HTMLButtonElement>}\n tabIndex={tabIndex}\n aria-current={ariaCurrent}\n {...labelProps}\n />\n {leading ? <span className={styles.leading}>{leading}</span> : null}\n <div className={styles.body}>\n {title ? (\n <span id={titleId} className={styles.title}>\n {resolveNode(title)}\n </span>\n ) : null}\n {description ? (\n <span className={styles.description}>{resolveNode(description)}</span>\n ) : null}\n {children}\n </div>\n {trailing ? <span className={styles.trailing}>{trailing}</span> : null}\n </li>\n );\n }\n\n return (\n <li\n ref={ref}\n className={[styles.item, active ? styles.active : null, className].filter(Boolean).join(\" \")}\n onClick={onClick}\n onKeyDown={onKeyDown}\n role={role}\n tabIndex={tabIndex}\n aria-current={ariaCurrent}\n aria-label={ariaLabel}\n {...rest}\n >\n {leading ? <span className={styles.leading}>{leading}</span> : null}\n <div className={styles.body}>\n {title ? <span className={styles.title}>{resolveNode(title)}</span> : null}\n {description ? (\n <span className={styles.description}>{resolveNode(description)}</span>\n ) : null}\n {children}\n </div>\n {trailing ? <span className={styles.trailing}>{trailing}</span> : null}\n </li>\n );\n});\n","import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport styles from \"./Text.module.css\";\nimport { resolveNode, type RichStr } from \"./richstr\";\n\n/**\n * Named font presets. Each bundles family + size + weight + leading + a\n * default color via the global `.font-*` classes in\n * `src/tokens/colors_and_type.css`. The preset is the single source of truth;\n * this component only selects one.\n */\nexport type TextFont =\n | \"heading-h1\"\n | \"heading-h2\"\n | \"heading-h3\"\n | \"heading-h4\"\n | \"main-ui-body\"\n | \"main-ui-action\"\n | \"main-content\"\n | \"secondary-body\"\n | \"secondary-action\"\n | \"section-title\"\n | \"code\"\n | \"secondary-mono\";\n\n/**\n * Optional color override. When omitted, the font preset's own color applies.\n * `inherit` defers to the parent (for use inside Buttons, Banners, etc.).\n */\nexport type TextColor =\n | \"inherit\"\n | \"text-01\"\n | \"text-02\"\n | \"text-03\"\n | \"text-04\"\n | \"text-05\"\n | \"text-inverted-03\"\n | \"text-inverted-04\"\n | \"text-inverted-05\";\n\nexport type TextTag = \"span\" | \"p\" | \"li\" | \"h1\" | \"h2\" | \"h3\" | \"h4\";\n\nexport interface TextProps\n extends Omit<HTMLAttributes<HTMLElement>, \"children\" | \"color\"> {\n /** Font preset. Default: `\"main-ui-body\"`. */\n font?: TextFont;\n /** Color override. Default: the preset's own color. */\n color?: TextColor;\n /** HTML tag to render. Default: `\"span\"`. */\n as?: TextTag;\n /** Prevent text wrapping. */\n nowrap?: boolean;\n /** Truncate to N lines with ellipsis. `1` uses single-line truncation; `2+` uses line clamping. */\n maxLines?: number;\n /**\n * Content. A plain string renders verbatim; `markdown()` (a {@link RichStr})\n * renders inline markdown (bold, italic, code, links); any other\n * `ReactNode` (e.g. react-markdown element children) renders verbatim with\n * the preset's typography applied via the `.font-*` class.\n */\n children?: ReactNode | RichStr;\n}\n\nconst COLOR_CLASS: Record<TextColor, string> = {\n inherit: \"color-inherit\",\n \"text-01\": \"color-text-01\",\n \"text-02\": \"color-text-02\",\n \"text-03\": \"color-text-03\",\n \"text-04\": \"color-text-04\",\n \"text-05\": \"color-text-05\",\n \"text-inverted-03\": \"color-text-inverted-03\",\n \"text-inverted-04\": \"color-text-inverted-04\",\n \"text-inverted-05\": \"color-text-inverted-05\",\n};\n\n/**\n * Typography primitive. Renders one of the named font presets from the token\n * sheet, with optional color override, wrapping control, and line clamping.\n * Accepts `string`, `markdown(\"**bold**\")` ({@link RichStr}), or any\n * `ReactNode` children — strings/markdown keep their existing behavior; other\n * nodes render verbatim with the preset's typography applied.\n */\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n {\n font = \"main-ui-body\",\n color,\n as: Tag = \"span\",\n nowrap = false,\n maxLines,\n children,\n className,\n style,\n ...rest\n },\n ref,\n) {\n const classes = [\n styles.text,\n `font-${font}`,\n color ? styles[COLOR_CLASS[color]] : null,\n nowrap ? styles.nowrap : null,\n maxLines === 1 ? styles.truncate : null,\n maxLines !== undefined && maxLines > 1 ? styles.clamp : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n const mergedStyle: CSSProperties | undefined =\n maxLines !== undefined && maxLines > 1\n ? { ...style, [\"--text-max-lines\" as string]: maxLines }\n : style;\n\n return (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- ref covers the heterogeneous tag union\n <Tag ref={ref as any} className={classes} style={mergedStyle} {...rest}>\n {children !== undefined ? resolveNode(children) : null}\n </Tag>\n );\n});\n","import \"./interactive.css\";\nimport \"./stateful.css\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n// ---------------------------------------------------------------------------\n// Shared types\n// ---------------------------------------------------------------------------\n\nexport type InteractiveButtonType = \"submit\" | \"button\" | \"reset\";\nexport type InteractiveInteraction = \"rest\" | \"hover\" | \"active\";\n\n/**\n * Guards an onClick handler against React synthetic event bubbling from\n * portalled children (e.g. Radix dialog overlays). React bubbles synthetic\n * events through the fiber tree, not the DOM tree, so a click on a portalled\n * overlay can reach a parent's onClick even though the overlay is not a DOM\n * descendant. This checks the click target is inside the handler's element.\n */\nfunction guardPortalClick<E extends MouseEvent>(\n onClick: ((e: E) => void) | undefined,\n): ((e: E) => void) | undefined {\n if (!onClick) return undefined;\n return (e: E) => {\n if (\n e.currentTarget instanceof Node &&\n e.target instanceof Node &&\n e.currentTarget.contains(e.target)\n ) {\n onClick(e);\n }\n };\n}\n\ninterface InteractiveBaseProps extends HTMLAttributes<HTMLElement> {\n /**\n * JS-controllable interaction override: `\"hover\"` and `\"active\"` force the\n * corresponding visual state without pointer events (e.g. while a menu\n * anchored to this element is open). Default: `\"rest\"`.\n */\n interaction?: InteractiveInteraction;\n /**\n * HTML button type. When set, the element is treated as inherently\n * interactive for cursor styling even without `onClick` or `href`.\n */\n type?: InteractiveButtonType;\n /** URL to navigate to when clicked. Passed through Slot to the child. */\n href?: string;\n /** Link target. Only used when `href` is provided. */\n target?: string;\n /** Applies variant-specific disabled colors and suppresses clicks. */\n disabled?: boolean;\n}\n\nfunction getInteractiveSlotProps(\n props: InteractiveBaseProps & { className?: string },\n dataAttrs: Record<string, string | undefined>,\n) {\n const { interaction = \"rest\", type, href, target, disabled, className, onClick, ...rest } = props;\n const isDisabled = !!disabled;\n\n const classes = [\n \"interactive\",\n !onClick && !href && !type ? \"interactive-inert\" : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return {\n className: classes,\n ...dataAttrs,\n \"data-interaction\": interaction !== \"rest\" ? interaction : undefined,\n \"data-disabled\": isDisabled ? \"true\" : undefined,\n \"aria-disabled\": isDisabled || undefined,\n ...(href\n ? {\n href: isDisabled ? undefined : href,\n target,\n rel: target === \"_blank\" ? \"noopener noreferrer\" : undefined,\n }\n : {}),\n ...rest,\n onClick: isDisabled\n ? href\n ? (e: MouseEvent) => e.preventDefault()\n : undefined\n : guardPortalClick(onClick),\n };\n}\n\n// ---------------------------------------------------------------------------\n// Interactive.Stateless\n// ---------------------------------------------------------------------------\n\nexport type InteractiveStatelessVariant = \"default\" | \"action\" | \"danger\";\nexport type InteractiveStatelessProminence = \"primary\" | \"secondary\" | \"tertiary\" | \"internal\";\n\nexport interface InteractiveStatelessProps extends InteractiveBaseProps {\n /** Visual variant controlling the color palette. Default: `\"default\"`. */\n variant?: InteractiveStatelessVariant;\n /** Prominence level controlling background intensity. Default: `\"primary\"`. */\n prominence?: InteractiveStatelessProminence;\n}\n\n/**\n * Stateless interactive surface primitive: the color system for buttons,\n * links, and any clickable element without selection state. Applies the\n * variant × prominence matrix via data attributes and merges onto a single\n * child element via Radix `Slot` (no extra DOM node).\n */\nconst InteractiveStateless = forwardRef<HTMLElement, InteractiveStatelessProps>(\n function InteractiveStateless({ variant = \"default\", prominence = \"primary\", ...props }, ref) {\n const slotProps = getInteractiveSlotProps(props, {\n \"data-interactive-variant\": variant,\n \"data-interactive-prominence\": prominence,\n });\n return <Slot ref={ref} {...slotProps} />;\n },\n);\n\n// ---------------------------------------------------------------------------\n// Interactive.Stateful\n// ---------------------------------------------------------------------------\n\nexport type InteractiveStatefulVariant =\n | \"select-light\"\n | \"select-heavy\"\n | \"select-card\"\n | \"select-tinted\"\n | \"select-input\"\n | \"select-filter\"\n | \"sidebar-heavy\"\n | \"sidebar-light\";\nexport type InteractiveStatefulState = \"empty\" | \"filled\" | \"selected\";\n\nexport interface InteractiveStatefulProps extends InteractiveBaseProps {\n /** Visual variant controlling the color palette. Default: `\"select-heavy\"`. */\n variant?: InteractiveStatefulVariant;\n /** Current value state: `\"empty\"`, `\"filled\"`, or `\"selected\"`. Default: `\"empty\"`. */\n state?: InteractiveStatefulState;\n}\n\n/**\n * Stateful interactive surface primitive: the color system for elements that\n * maintain a value state (toggles, selectable rows, sidebar items). Applies\n * the variant × state matrix via data attributes and merges onto a single\n * child element via Radix `Slot`.\n */\nconst InteractiveStateful = forwardRef<HTMLElement, InteractiveStatefulProps>(\n function InteractiveStateful({ variant = \"select-heavy\", state = \"empty\", ...props }, ref) {\n const slotProps = getInteractiveSlotProps(props, {\n \"data-interactive-variant\": variant,\n \"data-interactive-state\": state,\n });\n return <Slot ref={ref} {...slotProps} />;\n },\n);\n\n// ---------------------------------------------------------------------------\n// Interactive.Container\n// ---------------------------------------------------------------------------\n\nexport type InteractiveContainerSize = \"lg\" | \"md\" | \"sm\" | \"xs\" | \"2xs\" | \"fit\";\nexport type InteractiveContainerRounding = \"md\" | \"sm\" | \"xs\";\nexport type InteractiveContainerWidth = \"fit\" | \"full\";\n\nexport interface InteractiveContainerProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * HTML button type. When provided, renders a `<button>` instead of a\n * `<div>` so styling stays on one element. Mutually exclusive with the\n * `href` injected by a parent Stateless/Stateful Slot.\n */\n type?: InteractiveButtonType;\n /** Draws a 1px border in the theme border color. Default: false. */\n border?: boolean;\n /** Corner rounding preset. Default: `\"md\"`. */\n rounding?: InteractiveContainerRounding;\n /** Size preset controlling height, min-width, and padding. Default: `\"lg\"`. */\n size?: InteractiveContainerSize;\n /** Width preset. Default: `\"fit\"`. */\n width?: InteractiveContainerWidth;\n}\n\n/**\n * Structural box for use inside `Interactive.Stateless` / `Interactive.Stateful`.\n * Carries height, padding, rounding, and border; the parent primitive carries\n * color. Renders `<a>` when a parent Slot injects `href`, `<button>` when\n * `type` is set, `<div>` otherwise.\n */\nconst InteractiveContainer = forwardRef<HTMLElement, InteractiveContainerProps>(\n function InteractiveContainer(\n { type, border, rounding = \"md\", size = \"lg\", width = \"fit\", className, ...props },\n ref,\n ) {\n const {\n href,\n target,\n rel,\n style,\n ...rest\n } = props as InteractiveContainerProps & {\n href?: string;\n target?: string;\n rel?: string;\n style?: CSSProperties;\n };\n\n const sharedProps = {\n ...rest,\n className: [\n \"interactive-container\",\n `interactive-rounding-${rounding}`,\n `interactive-size-${size}`,\n `interactive-width-${width}`,\n className,\n ]\n .filter(Boolean)\n .join(\" \"),\n \"data-border\": border ? (\"true\" as const) : undefined,\n style,\n };\n\n if (href) {\n return (\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n href={href}\n target={target}\n rel={rel}\n {...(sharedProps as HTMLAttributes<HTMLAnchorElement>)}\n />\n );\n }\n if (type) {\n const ariaDisabled = (rest as Record<string, unknown>)[\"aria-disabled\"];\n const nativeDisabled = ariaDisabled === true || ariaDisabled === \"true\" || undefined;\n return (\n <button\n ref={ref as Ref<HTMLButtonElement>}\n type={type}\n disabled={nativeDisabled}\n {...(sharedProps as HTMLAttributes<HTMLButtonElement>)}\n />\n );\n }\n return <div ref={ref as Ref<HTMLDivElement>} {...sharedProps} />;\n },\n);\n\n// ---------------------------------------------------------------------------\n// Interactive.Foldable\n// ---------------------------------------------------------------------------\n\nexport interface InteractiveFoldableProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * Zero-width collapsible wrapper that expands when its ancestor\n * `.interactive` element is hovered, focused within, or carries an\n * interaction override. Uses a CSS grid `0fr ↔ 1fr` animation. The flex\n * parent holding persistent + foldable content should add the\n * `interactive-foldable-host` class for synchronized gap transitions.\n */\nconst InteractiveFoldable = forwardRef<HTMLDivElement, InteractiveFoldableProps>(\n function InteractiveFoldable({ children, className, ...props }, ref) {\n return (\n <div\n ref={ref}\n {...props}\n className={[\"interactive-foldable\", className].filter(Boolean).join(\" \")}\n >\n <div className=\"interactive-foldable-inner\">{children}</div>\n </div>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// Compound export\n// ---------------------------------------------------------------------------\n\n/**\n * Core interactive primitives. Most code should use higher-level components\n * (Button, etc.); reach for these when building new interactive surfaces.\n *\n * - `Interactive.Stateless` — variant × prominence color matrix\n * - `Interactive.Stateful` — variant × state (empty/filled/selected) matrix\n * - `Interactive.Container` — structural box (size, rounding, border)\n * - `Interactive.Foldable` — zero-width collapse revealed on hover/focus\n */\nexport const Interactive = {\n Stateless: InteractiveStateless,\n Stateful: InteractiveStateful,\n Container: InteractiveContainer,\n Foldable: InteractiveFoldable,\n};\n\nexport { InteractiveStateless, InteractiveStateful, InteractiveContainer, InteractiveFoldable };\n","import \"./disabled.css\";\nimport { forwardRef, type HTMLAttributes, type ReactElement } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Tooltip, TooltipProvider } from \"../Tooltip/Tooltip\";\nimport { resolveStr, type RichStr } from \"../Text/richstr\";\n\nexport type DisabledTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface DisabledProps extends HTMLAttributes<HTMLElement> {\n /** When truthy, applies disabled styling to the child element. */\n disabled?: boolean;\n /**\n * Re-enables pointer events while keeping the disabled visual treatment.\n * Useful when the element must keep receiving hover or click at a higher\n * level. Default: false.\n */\n allowClick?: boolean;\n /**\n * Tooltip shown on hover while disabled (the \"why is this disabled\" hint).\n * Implies `allowClick` so the trigger can receive pointer events. Supports\n * inline markdown via `markdown()`.\n */\n tooltip?: string | RichStr;\n /** Tooltip side. Default: `\"right\"`. */\n tooltipSide?: DisabledTooltipSide;\n children: ReactElement;\n}\n\n/**\n * Applies baseline disabled visuals (opacity, cursor, pointer-events) to a\n * single child element via Radix `Slot` — no wrapper DOM node. Interactive\n * primitives handle their own disabled colors; this wrapper covers arbitrary\n * subtrees and composites that expose no `disabled` prop, and enables\n * tooltips on disabled elements (native disabled controls swallow pointer\n * events, so the hint never fires without this).\n */\nexport const Disabled = forwardRef<HTMLElement, DisabledProps>(function Disabled(\n { disabled, allowClick, tooltip, tooltipSide = \"right\", children, ...rest },\n ref,\n) {\n const showTooltip = Boolean(disabled && tooltip);\n const enableClick = allowClick || showTooltip;\n\n const wrapper = (\n <Slot\n ref={ref}\n {...rest}\n aria-disabled={disabled || undefined}\n data-sds-disabled={disabled || undefined}\n data-allow-click={disabled && enableClick ? \"\" : undefined}\n >\n {children}\n </Slot>\n );\n\n if (!showTooltip || tooltip === undefined) return wrapper;\n\n // Own provider so the wrapper works without an app-level TooltipProvider.\n return (\n <TooltipProvider>\n <Tooltip\n content={typeof tooltip === \"string\" ? tooltip : resolveStr(tooltip)}\n side={tooltipSide}\n >\n {wrapper}\n </Tooltip>\n </TooltipProvider>\n );\n});\n","import \"./hoverable.css\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\n\nexport type HoverableInteraction = \"rest\" | \"hover\";\nexport type HoverableItemVariant = \"opacity-on-hover\";\nexport type HoverableWidth = \"fit\" | \"full\";\n\nexport interface HoverableRootProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /** Group identifier matched by descendant `Hoverable.Item group` props. */\n group: string;\n /** Width preset. Default: `\"full\"`. */\n width?: HoverableWidth;\n /**\n * Interaction override. `\"hover\"` forces items visible regardless of hover\n * state — set it while a menu or modal opened from a hoverable action is\n * up, so the user keeps seeing which element they are acting on.\n * Default: `\"rest\"`.\n */\n interaction?: HoverableInteraction;\n}\n\n/**\n * Hover-tracking container for a named group. Entirely CSS-driven: the\n * browser's `:hover` controls descendant `Hoverable.Item` visibility, so\n * hover state clears automatically when modals or portals steal pointer\n * events. No React state or context.\n */\nconst HoverableRoot = forwardRef<HTMLDivElement, HoverableRootProps>(function HoverableRoot(\n { group, children, width = \"full\", interaction = \"rest\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={[width === \"full\" ? \"hoverable-width-full\" : \"hoverable-width-fit\", className]\n .filter(Boolean)\n .join(\" \")}\n data-hover-group={group}\n data-interaction={interaction !== \"rest\" ? interaction : undefined}\n >\n {children}\n </div>\n );\n});\n\nexport interface HoverableItemProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /**\n * Group mode: matches an ancestor `Hoverable.Root group`. Omit for local\n * mode, where the item reveals on its own `:hover`.\n */\n group?: string;\n /** Reveal animation variant. Default: `\"opacity-on-hover\"`. */\n variant?: HoverableItemVariant;\n}\n\n/**\n * An element revealed on hover. Group mode (with `group`): visibility driven\n * by `:hover` on the nearest `Hoverable.Root`. Local mode (no `group`): the\n * item handles its own `:hover`. Keyboard focus inside the group or item\n * also reveals it.\n */\nconst HoverableItem = forwardRef<HTMLDivElement, HoverableItemProps>(function HoverableItem(\n { group, variant = \"opacity-on-hover\", children, className, ...props },\n ref,\n) {\n const isLocal = group === undefined;\n return (\n <div\n {...props}\n ref={ref}\n className={[\"hoverable-item\", className].filter(Boolean).join(\" \")}\n data-hoverable-variant={variant}\n data-hoverable-local={isLocal ? \"true\" : undefined}\n >\n {children}\n </div>\n );\n});\n\n/**\n * Hover-to-reveal compound component.\n *\n * - `Hoverable.Root` — the hover area (e.g. a row or card)\n * - `Hoverable.Item` — the revealed element (e.g. a delete button)\n */\nexport const Hoverable = {\n Root: HoverableRoot,\n Item: HoverableItem,\n};\n\nexport { HoverableRoot, HoverableItem };\n","import { Interactive, type InteractiveStatefulProps } from \"../Interactive/Interactive\";\nimport { Text } from \"../Text/Text\";\nimport type { RichStr } from \"../Text/richstr\";\nimport {\n iconSlot,\n withTooltip,\n type IconComponent,\n type InteractiveButtonSize,\n} from \"../../internal/interactive-buttons\";\n\nexport type SelectButtonSize = InteractiveButtonSize;\nexport type SelectButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/**\n * Content union enforced on `foldable`:\n * - `foldable: true` → `icon` and `children` required (icon stays, label and\n * rightIcon fold away)\n * - otherwise at least one of `icon` or `children`\n */\ntype SelectButtonContentProps =\n | { foldable: true; icon: IconComponent; children: string | RichStr; rightIcon?: IconComponent }\n | {\n foldable?: false;\n icon?: IconComponent;\n children: string | RichStr;\n rightIcon?: IconComponent;\n }\n | {\n foldable?: false;\n icon: IconComponent;\n children?: string | RichStr;\n rightIcon?: IconComponent;\n };\n\nexport type SelectButtonProps = Omit<InteractiveStatefulProps, \"children\"> &\n SelectButtonContentProps & {\n /** Size preset controlling height, text size, and rounding. Default: `\"lg\"`. */\n size?: SelectButtonSize;\n /** Tooltip shown on hover. Folded disabled buttons fall back to the label. */\n tooltip?: string;\n /** Width preset. Default: `\"fit\"`. */\n width?: \"fit\" | \"full\";\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: SelectButtonTooltipSide;\n };\n\n/**\n * Stateful toggle button over `Interactive.Stateful`: empty / filled /\n * selected color states, optional foldable label that expands on hover.\n */\nexport function SelectButton({\n icon: Icon,\n children,\n rightIcon: RightIcon,\n size = \"lg\",\n type = \"button\",\n foldable,\n width,\n tooltip,\n tooltipSide = \"top\",\n disabled,\n ...statefulProps\n}: SelectButtonProps) {\n const isLarge = size === \"lg\";\n\n const labelEl = children ? (\n <Text font={isLarge ? \"main-ui-body\" : \"secondary-body\"} color=\"inherit\" nowrap>\n {children}\n </Text>\n ) : null;\n\n const button = (\n <Interactive.Stateful disabled={disabled} {...statefulProps}>\n <Interactive.Container\n type={type}\n size={size}\n width={width}\n rounding={isLarge ? \"md\" : size === \"2xs\" ? \"xs\" : \"sm\"}\n >\n <span\n className={[\"sds-button-row\", foldable ? \"interactive-foldable-host\" : \"sds-button-row-gap\"].join(\" \")}\n >\n {iconSlot(Icon, size, !foldable && !!children)}\n {foldable ? (\n <Interactive.Foldable>\n {labelEl}\n {iconSlot(RightIcon, size, !!children)}\n </Interactive.Foldable>\n ) : (\n <>\n {labelEl}\n {iconSlot(RightIcon, size, !!children)}\n </>\n )}\n </span>\n </Interactive.Container>\n </Interactive.Stateful>\n );\n\n const resolvedTooltip =\n tooltip ??\n (foldable && disabled && typeof children === \"string\" ? children : undefined);\n\n return <>{withTooltip(button, resolvedTooltip, tooltipSide)}</>;\n}\n","import {\n Interactive,\n type InteractiveContainerRounding,\n type InteractiveInteraction,\n type InteractiveStatefulProps,\n} from \"../Interactive/Interactive\";\nimport { Text } from \"../Text/Text\";\nimport type { RichStr } from \"../Text/richstr\";\nimport {\n ChevronIcon,\n iconSlot,\n withTooltip,\n type IconComponent,\n type InteractiveButtonSize,\n} from \"../../internal/interactive-buttons\";\n\nexport type OpenButtonVariant = \"select-light\" | \"select-heavy\" | \"select-tinted\";\nexport type OpenButtonSize = InteractiveButtonSize;\nexport type OpenButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/**\n * Content union enforced on `foldable`:\n * - `foldable: true` → `icon` and `children` required (icon stays, label and\n * chevron fold away)\n * - otherwise at least one of `icon` or `children`\n */\ntype OpenButtonContentProps =\n | { foldable: true; icon: IconComponent; children: string | RichStr }\n | { foldable?: false; icon?: IconComponent; children: string | RichStr }\n | { foldable?: false; icon: IconComponent; children?: string | RichStr };\n\nexport type OpenButtonProps = Omit<InteractiveStatefulProps, \"variant\" | \"children\"> &\n OpenButtonContentProps & {\n /** Visual variant. Default: `\"select-heavy\"`. */\n variant?: OpenButtonVariant;\n /** Size preset. Default: `\"lg\"`. */\n size?: OpenButtonSize;\n /** Width preset. Default: `\"fit\"`. */\n width?: \"fit\" | \"full\";\n /**\n * When `\"between\"`, icon + label group left and the chevron pushes to the\n * right edge. Default keeps a tight row.\n */\n justifyContent?: \"between\";\n /** Tooltip shown on hover. */\n tooltip?: string;\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: OpenButtonTooltipSide;\n /** Override the rounding derived from `size`. */\n rounding?: InteractiveContainerRounding;\n };\n\n/**\n * Dropdown trigger button with a built-in rotating chevron. When rendered as\n * a Radix trigger (DropdownMenu, Popover), the injected `data-state=\"open\"`\n * automatically forces the hover visual while the menu is open.\n */\nexport function OpenButton({\n icon: Icon,\n children,\n size = \"lg\",\n foldable,\n width,\n justifyContent,\n tooltip,\n tooltipSide = \"top\",\n rounding: roundingOverride,\n interaction,\n variant = \"select-heavy\",\n disabled,\n ...statefulProps\n}: OpenButtonProps) {\n // Derive open state: explicit prop, else Radix data-state injected via Slot.\n const dataState = (statefulProps as Record<string, unknown>)[\"data-state\"] as\n | string\n | undefined;\n const resolvedInteraction: InteractiveInteraction =\n interaction ?? (dataState === \"open\" ? \"hover\" : \"rest\");\n\n const isLarge = size === \"lg\";\n\n const labelEl = children ? (\n <Text font={isLarge ? \"main-ui-body\" : \"secondary-body\"} color=\"inherit\" nowrap>\n {children}\n </Text>\n ) : null;\n\n const rowClass = [\n \"sds-button-row\",\n justifyContent === \"between\"\n ? \"sds-button-row-between\"\n : foldable\n ? \"interactive-foldable-host\"\n : \"sds-button-row-gap\",\n ].join(\" \");\n\n const button = (\n <Interactive.Stateful\n variant={variant}\n interaction={resolvedInteraction}\n disabled={disabled}\n {...statefulProps}\n >\n <Interactive.Container\n type=\"button\"\n size={size}\n width={width}\n rounding={roundingOverride ?? (isLarge ? \"md\" : size === \"2xs\" ? \"xs\" : \"sm\")}\n >\n <span className={rowClass}>\n {justifyContent === \"between\" ? (\n <>\n <span className=\"sds-button-row sds-button-row-gap\">\n {iconSlot(Icon, size, !foldable && !!children)}\n {labelEl}\n </span>\n {iconSlot(ChevronIcon, size, !!children)}\n </>\n ) : foldable ? (\n <>\n {iconSlot(Icon, size, false)}\n <Interactive.Foldable>\n {labelEl}\n {iconSlot(ChevronIcon, size, !!children)}\n </Interactive.Foldable>\n </>\n ) : (\n <>\n {iconSlot(Icon, size, !!children)}\n {labelEl}\n {iconSlot(ChevronIcon, size, !!children)}\n </>\n )}\n </span>\n </Interactive.Container>\n </Interactive.Stateful>\n );\n\n const resolvedTooltip =\n tooltip ??\n (foldable && disabled && typeof children === \"string\" ? children : undefined);\n\n return <>{withTooltip(button, resolvedTooltip, tooltipSide)}</>;\n}\n","import { forwardRef, type ReactNode } from \"react\";\nimport styles from \"./ExpandableButton.module.css\";\nimport { Button, type ButtonProps } from \"../Button/Button\";\n\nexport interface ExpandableButtonProps\n extends Omit<ButtonProps, \"iconLeft\" | \"iconRight\" | \"iconOnly\" | \"children\" | \"title\"> {\n /** Icon rendered in the fixed square box. Stays visible at rest. */\n icon: ReactNode;\n /**\n * Text label. Collapsed (width 0) at rest; slides out on hover / keyboard\n * focus. Also used as the `title` and `aria-label` so the control is always\n * announced even while the label is visually collapsed.\n */\n label: string;\n /**\n * When true, the label also expands while an ancestor element carrying the\n * `data-expand-trigger` attribute is hovered — so a whole card can reveal the\n * label on hover, not just the button itself. Default: false.\n */\n expandOnContainerHover?: boolean;\n}\n\n/**\n * A square icon Button whose text label is collapsed at rest and slides out\n * smoothly on hover / keyboard focus (and, optionally, while an ancestor\n * `[data-expand-trigger]` is hovered). Composes the DS `Button` for all visual\n * styling — variant, size, and every other Button prop passes straight through.\n */\nexport const ExpandableButton = forwardRef<HTMLButtonElement, ExpandableButtonProps>(\n function ExpandableButton(\n { icon, label, expandOnContainerHover = false, className, ...rest },\n ref,\n ) {\n const classes = [\n styles.root,\n expandOnContainerHover ? styles.containerHover : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Button\n ref={ref}\n className={classes}\n title={label}\n aria-label={label}\n iconLeft={\n <span className={styles.iconBox} aria-hidden=\"true\">\n {icon}\n </span>\n }\n {...rest}\n >\n <span className={styles.label}>{label}</span>\n </Button>\n );\n },\n);\n","import {\n Interactive,\n type InteractiveInteraction,\n type InteractiveStatefulProps,\n} from \"../Interactive/Interactive\";\nimport { Text } from \"../Text/Text\";\nimport type { RichStr } from \"../Text/richstr\";\nimport SvgX from \"../../icons/X\";\nimport styles from \"./FilterButton.module.css\";\nimport {\n ChevronIcon,\n iconSlot,\n withTooltip,\n type IconComponent,\n} from \"../../internal/interactive-buttons\";\n\nexport type FilterButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface FilterButtonProps\n extends Omit<InteractiveStatefulProps, \"variant\" | \"state\" | \"children\"> {\n /** Left icon, always visible. */\n icon: IconComponent;\n /** Label between the icon and the trailing indicator. */\n children: string | RichStr;\n /** Whether the filter has an active selection. Default: false. */\n active?: boolean;\n /** Called when the clear (X) control is clicked in the active state. */\n onClear: () => void;\n /** Tooltip shown on hover. */\n tooltip?: string;\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: FilterButtonTooltipSide;\n}\n\n/**\n * Filter chip: chevron when inactive, clear-X when a selection is active.\n * Active state uses the inverted `select-filter` palette.\n */\nexport function FilterButton({\n icon: Icon,\n children,\n onClear,\n tooltip,\n tooltipSide = \"top\",\n active = false,\n interaction,\n ...statefulProps\n}: FilterButtonProps) {\n // Derive open state: explicit prop, else Radix data-state injected via Slot.\n const dataState = (statefulProps as Record<string, unknown>)[\"data-state\"] as\n | string\n | undefined;\n const resolvedInteraction: InteractiveInteraction =\n interaction ?? (dataState === \"open\" ? \"hover\" : \"rest\");\n\n const button = (\n <span className={styles.anchor}>\n <Interactive.Stateful\n {...statefulProps}\n variant=\"select-filter\"\n interaction={resolvedInteraction}\n state={active ? \"selected\" : \"empty\"}\n >\n <Interactive.Container type=\"button\">\n <span className=\"sds-button-row sds-button-row-gap\">\n {iconSlot(Icon, \"lg\", true)}\n {/* Consume the resolved interactive foreground explicitly. `color`\n inherit lost to the font preset's own color class by stylesheet\n order, leaving the selected-state label unreadable in dark mode;\n the inline value wins deterministically and tracks every state. */}\n <Text\n font=\"main-ui-action\"\n nowrap\n style={{ color: \"var(--interactive-foreground)\" }}\n >\n {children}\n </Text>\n <span style={{ visibility: active ? \"hidden\" : \"visible\" }}>\n {iconSlot(ChevronIcon, \"lg\", true)}\n </span>\n </span>\n </Interactive.Container>\n </Interactive.Stateful>\n\n {active && (\n <span className={styles.clear}>\n {/* Forced hover keeps the X prominent against the inverted selected\n background; at rest it renders dimmed and looks disabled. */}\n <Interactive.Stateless\n variant=\"default\"\n prominence=\"tertiary\"\n interaction=\"hover\"\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n onClear();\n }}\n >\n <Interactive.Container type=\"button\" size=\"2xs\" rounding=\"xs\" aria-label=\"Clear filter\">\n <SvgX className={styles.clearIcon} />\n </Interactive.Container>\n </Interactive.Stateless>\n </span>\n )}\n </span>\n );\n\n return <>{withTooltip(button, tooltip, tooltipSide)}</>;\n}\n","import type { MouseEvent } from \"react\";\nimport styles from \"./LinkButton.module.css\";\nimport SvgExternalLink from \"../../icons/ExternalLink\";\nimport { withTooltip } from \"../../internal/interactive-buttons\";\nimport type { RichStr } from \"../Text/richstr\";\n\nexport type LinkButtonTooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface LinkButtonProps {\n /** Visible label, rendered as underlined link text. */\n children: string;\n /** Destination URL. When provided, renders an `<a>`. */\n href?: string;\n /** Anchor target. Only meaningful with `href`. */\n target?: string;\n /** Click handler. Without `href`, renders a `<button>`. */\n onClick?: () => void;\n /** Applies disabled styling and suppresses navigation/clicks. */\n disabled?: boolean;\n /** Tooltip shown on hover. Pass `markdown()` for inline markdown. */\n tooltip?: string | RichStr;\n /** Tooltip side. Default: `\"top\"`. */\n tooltipSide?: LinkButtonTooltipSide;\n}\n\n/**\n * A bare, anchor-styled link with a trailing external-link glyph. For inline\n * references (\"Pricing\", \"Docs\"), not interactive surfaces that need hover\n * backgrounds or prominence tiers — use `Button` for those. Deliberately\n * does not use the Interactive primitives: their height, rounding, and color\n * matrix are wrong for an inline text link.\n */\nexport function LinkButton({\n children,\n href,\n target,\n onClick,\n disabled,\n tooltip,\n tooltipSide = \"top\",\n}: LinkButtonProps) {\n const inner = (\n <>\n <span className={`${styles.label} font-secondary-body`}>{children}</span>\n <SvgExternalLink style={{ width: 12, height: 12 }} />\n </>\n );\n\n // Always stop propagation so clicks don't bubble to interactive ancestors\n // (cards, list rows). If disabled, also prevent anchor navigation.\n const handleAnchorClick = (e: MouseEvent<HTMLAnchorElement>) => {\n e.stopPropagation();\n if (disabled) e.preventDefault();\n };\n\n const handleButtonClick = (e: MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n if (disabled) return;\n onClick?.();\n };\n\n const element = href ? (\n <a\n className={styles.linkButton}\n href={disabled ? undefined : href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n aria-disabled={disabled || undefined}\n data-disabled={disabled || undefined}\n onClick={handleAnchorClick}\n >\n {inner}\n </a>\n ) : (\n <button\n type=\"button\"\n className={styles.linkButton}\n onClick={handleButtonClick}\n disabled={disabled}\n data-disabled={disabled || undefined}\n >\n {inner}\n </button>\n );\n\n return <>{withTooltip(element, tooltip, tooltipSide)}</>;\n}\n","import styles from \"./Tag.module.css\";\nimport { resolveStr, type RichStr } from \"../Text/richstr\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\n\nexport type TagColor = \"green\" | \"purple\" | \"blue\" | \"gray\" | \"amber\";\nexport type TagSize = \"sm\" | \"md\";\n\nexport interface TagProps {\n /** Optional leading icon. */\n icon?: IconComponent;\n /** Label text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Color variant. Default: `\"gray\"`. */\n color?: TagColor;\n /** Size variant. Default: `\"sm\"`. */\n size?: TagSize;\n}\n\n/**\n * Categorical color label. Distinct from `Badge`: Badge communicates status\n * tone (success, warning, error); Tag classifies (team, topic, model).\n */\nexport function Tag({ icon: Icon, title, color = \"gray\", size = \"sm\" }: TagProps) {\n return (\n <span className={[styles.tag, styles[`color-${color}`]].join(\" \")} data-size={size}>\n {Icon ? (\n <span className={styles.iconContainer}>\n <Icon className={styles.icon} />\n </span>\n ) : null}\n <span className={styles.title}>{resolveStr(title)}</span>\n </span>\n );\n}\n","import { forwardRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { Button } from \"../Button/Button\";\nimport SvgEdit from \"../../icons/Edit\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport { Text, type TextFont } from \"../Text/Text\";\nimport { toPlainString, type RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ContentXlSizePreset = \"headline\" | \"section\";\n\n/** Edit-button size on the DS Button scale (`sm | md | lg`). */\ntype EditButtonSize = \"sm\" | \"md\";\n\ninterface ContentXlPresetConfig {\n /** Icon width/height (CSS value). */\n iconSize: string;\n /** Padding on the icon container (CSS value). */\n iconContainerPadding: string;\n /** More-icon-1 width/height (CSS value). */\n moreIcon1Size: string;\n /** Padding on the more-icon-1 container (CSS value). */\n moreIcon1ContainerPadding: string;\n /** More-icon-2 width/height (CSS value). */\n moreIcon2Size: string;\n /** Padding on the more-icon-2 container (CSS value). */\n moreIcon2ContainerPadding: string;\n /** Font preset for the title. */\n titleFont: TextFont;\n /** Title line-height — also used as icon container min-height (CSS value). */\n lineHeight: string;\n /** Button `size` prop for the edit button. */\n editButtonSize: EditButtonSize;\n /** Padding on the edit-button container (CSS value). */\n editButtonPadding: string;\n}\n\nexport interface ContentXlProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description below the title. */\n description?: string | RichStr;\n /** Enable inline editing of the title. */\n editable?: boolean;\n /** Called when the user commits an edit. */\n onTitleChange?: (newTitle: string) => void;\n /** Size preset. Default: `\"headline\"`. */\n sizePreset?: ContentXlSizePreset;\n /** Optional secondary icon rendered in the icon row. */\n moreIcon1?: IconComponent;\n /** Optional tertiary icon rendered in the icon row. */\n moreIcon2?: IconComponent;\n /**\n * Action slot rendered on the right side of the content row.\n * Naturally hosts a `ContentAction` trigger, button, badge, or arbitrary\n * nodes. When set, the root becomes a row pairing the content with the slot.\n */\n rightChildren?: ReactNode;\n /** Extra class for the root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Presets\n// ---------------------------------------------------------------------------\n\nconst CONTENT_XL_PRESETS: Record<ContentXlSizePreset, ContentXlPresetConfig> = {\n headline: {\n iconSize: \"2rem\",\n iconContainerPadding: \"0.125rem\",\n moreIcon1Size: \"1rem\",\n moreIcon1ContainerPadding: \"0.125rem\",\n moreIcon2Size: \"2rem\",\n moreIcon2ContainerPadding: \"0.125rem\",\n titleFont: \"heading-h2\",\n lineHeight: \"2.25rem\",\n editButtonSize: \"md\",\n editButtonPadding: \"0.25rem\",\n },\n section: {\n iconSize: \"1.5rem\",\n iconContainerPadding: \"0.125rem\",\n moreIcon1Size: \"0.75rem\",\n moreIcon1ContainerPadding: \"0.125rem\",\n moreIcon2Size: \"1.5rem\",\n moreIcon2ContainerPadding: \"0.125rem\",\n // DS lacks `heading-h3-section`; nearest is `heading-h3`.\n titleFont: \"heading-h3\",\n lineHeight: \"1.75rem\",\n editButtonSize: \"sm\",\n editButtonPadding: \"0.125rem\",\n },\n};\n\n// ---------------------------------------------------------------------------\n// ContentXl — icon row on top (flex-col)\n// ---------------------------------------------------------------------------\n\nexport const ContentXl = forwardRef<HTMLDivElement, ContentXlProps>(\n function ContentXl(\n {\n sizePreset = \"headline\",\n icon: Icon,\n title,\n description,\n editable,\n onTitleChange,\n moreIcon1: MoreIcon1,\n moreIcon2: MoreIcon2,\n rightChildren,\n className,\n },\n ref,\n ) {\n const [editing, setEditing] = useState(false);\n const [editValue, setEditValue] = useState(toPlainString(title));\n\n const config = CONTENT_XL_PRESETS[sizePreset];\n\n function startEditing() {\n setEditValue(toPlainString(title));\n setEditing(true);\n }\n\n function commit() {\n const value = editValue.trim();\n if (value && value !== toPlainString(title)) onTitleChange?.(value);\n setEditing(false);\n }\n\n const classes = [\"sds-content-xl\", className].filter(Boolean).join(\" \");\n\n const inner = (\n <>\n {(Icon || MoreIcon1 || MoreIcon2) && (\n <div className=\"sds-content-xl-icon-row\">\n {Icon && (\n <div\n className=\"sds-content-xl-icon-container\"\n style={{\n padding: config.iconContainerPadding,\n minHeight: config.lineHeight,\n }}\n >\n <Icon\n className=\"sds-content-xl-icon\"\n style={{ width: config.iconSize, height: config.iconSize }}\n />\n </div>\n )}\n\n {MoreIcon1 && (\n <div\n className=\"sds-content-xl-more-icon-container\"\n style={{ padding: config.moreIcon1ContainerPadding }}\n >\n <MoreIcon1\n className=\"sds-content-xl-icon\"\n style={{\n width: config.moreIcon1Size,\n height: config.moreIcon1Size,\n }}\n />\n </div>\n )}\n\n {MoreIcon2 && (\n <div\n className=\"sds-content-xl-more-icon-container\"\n style={{ padding: config.moreIcon2ContainerPadding }}\n >\n <MoreIcon2\n className=\"sds-content-xl-icon\"\n style={{\n width: config.moreIcon2Size,\n height: config.moreIcon2Size,\n }}\n />\n </div>\n )}\n </div>\n )}\n\n <div className=\"sds-content-xl-body\">\n <div className=\"sds-content-xl-title-row\">\n {editing ? (\n <div className=\"sds-content-xl-input-sizer\">\n <span\n className={`sds-content-xl-input-mirror font-${config.titleFont}`}\n >\n {editValue || \" \"}\n </span>\n <input\n className={`sds-content-xl-input font-${config.titleFont}`}\n value={editValue}\n onChange={(e) => setEditValue(e.target.value)}\n size={1}\n autoFocus\n onFocus={(e) => e.currentTarget.select()}\n onBlur={commit}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") commit();\n if (e.key === \"Escape\") {\n setEditValue(toPlainString(title));\n setEditing(false);\n }\n }}\n style={{ height: config.lineHeight } as CSSProperties}\n />\n </div>\n ) : (\n <Text\n font={config.titleFont}\n color=\"inherit\"\n maxLines={1}\n title={toPlainString(title)}\n onClick={editable ? startEditing : undefined}\n >\n {title}\n </Text>\n )}\n\n {editable && !editing && (\n <div\n className=\"sds-content-xl-edit-button\"\n style={{ padding: config.editButtonPadding }}\n >\n <Button\n variant=\"tertiary\"\n size={config.editButtonSize}\n iconLeft={<SvgEdit />}\n iconOnly\n tooltip=\"Edit\"\n tooltipSide=\"right\"\n aria-label=\"Edit\"\n onClick={startEditing}\n />\n </div>\n )}\n </div>\n\n {description && toPlainString(description) && (\n <div className=\"sds-content-xl-description\">\n <Text font=\"secondary-body\" color=\"text-03\" as=\"p\">\n {description}\n </Text>\n </div>\n )}\n </div>\n </>\n );\n\n if (rightChildren) {\n return (\n <div ref={ref} className={classes} data-has-right>\n <div className=\"sds-content-xl-main\">{inner}</div>\n <div className=\"sds-content-right\">{rightChildren}</div>\n </div>\n );\n }\n\n return (\n <div ref={ref} className={classes}>\n {inner}\n </div>\n );\n },\n);\n","import { forwardRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { Button } from \"../Button/Button\";\nimport SvgEdit from \"../../icons/Edit\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport { Text, type TextFont } from \"../Text/Text\";\nimport { toPlainString, type RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ContentLgSizePreset = \"headline\" | \"section\";\n\n/** Edit-button size on the DS Button scale (`sm | md | lg`). */\ntype EditButtonSize = \"sm\" | \"md\";\n\ninterface ContentLgPresetConfig {\n /** Icon width/height (CSS value). */\n iconSize: string;\n /** Padding on the icon container (CSS value). */\n iconContainerPadding: string;\n /** Gap between icon container and content (CSS value). */\n gap: string;\n /** Font preset for the title. */\n titleFont: TextFont;\n /** Title line-height — also used as icon container min-height (CSS value). */\n lineHeight: string;\n /** Button `size` prop for the edit button. */\n editButtonSize: EditButtonSize;\n /** Padding on the edit-button container (CSS value). */\n editButtonPadding: string;\n}\n\nexport interface ContentLgProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description below the title. */\n description?: string | RichStr;\n /** Enable inline editing of the title. */\n editable?: boolean;\n /** Called when the user commits an edit. */\n onTitleChange?: (newTitle: string) => void;\n /** Size preset. Default: `\"headline\"`. */\n sizePreset?: ContentLgSizePreset;\n /**\n * Action slot rendered on the right side of the content row.\n * Naturally hosts a `ContentAction` trigger, button, badge, or arbitrary\n * nodes. When set, the root becomes a row pairing the content with the slot.\n */\n rightChildren?: ReactNode;\n /** Extra class for the root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Presets\n// ---------------------------------------------------------------------------\n\nconst CONTENT_LG_PRESETS: Record<ContentLgSizePreset, ContentLgPresetConfig> = {\n headline: {\n iconSize: \"2rem\",\n iconContainerPadding: \"0.125rem\",\n gap: \"0.25rem\",\n titleFont: \"heading-h2\",\n lineHeight: \"2.25rem\",\n editButtonSize: \"md\",\n editButtonPadding: \"0.25rem\",\n },\n section: {\n iconSize: \"1.25rem\",\n iconContainerPadding: \"0.25rem\",\n gap: \"0rem\",\n // DS lacks `heading-h3-muted`; nearest is `heading-h3`.\n titleFont: \"heading-h3\",\n lineHeight: \"1.75rem\",\n editButtonSize: \"sm\",\n editButtonPadding: \"0.125rem\",\n },\n};\n\n// ---------------------------------------------------------------------------\n// ContentLg — icon inline (flex-row)\n// ---------------------------------------------------------------------------\n\nexport const ContentLg = forwardRef<HTMLDivElement, ContentLgProps>(\n function ContentLg(\n {\n sizePreset = \"headline\",\n icon: Icon,\n title,\n description,\n editable,\n onTitleChange,\n rightChildren,\n className,\n },\n ref,\n ) {\n const [editing, setEditing] = useState(false);\n const [editValue, setEditValue] = useState(toPlainString(title));\n\n const config = CONTENT_LG_PRESETS[sizePreset];\n\n function startEditing() {\n setEditValue(toPlainString(title));\n setEditing(true);\n }\n\n function commit() {\n const value = editValue.trim();\n if (value && value !== toPlainString(title)) onTitleChange?.(value);\n setEditing(false);\n }\n\n const classes = [\"sds-content-lg\", className].filter(Boolean).join(\" \");\n\n const inner = (\n <>\n {Icon && (\n <div\n className=\"sds-content-lg-icon-container\"\n style={{\n padding: config.iconContainerPadding,\n minHeight: config.lineHeight,\n }}\n >\n <Icon\n className=\"sds-content-lg-icon\"\n style={{ width: config.iconSize, height: config.iconSize }}\n />\n </div>\n )}\n\n <div className=\"sds-content-lg-body\">\n <div className=\"sds-content-lg-title-row\">\n {editing ? (\n <div className=\"sds-content-lg-input-sizer\">\n <span\n className={`sds-content-lg-input-mirror font-${config.titleFont}`}\n >\n {editValue || \"\\u00A0\"}\n </span>\n <input\n className={`sds-content-lg-input font-${config.titleFont}`}\n value={editValue}\n onChange={(e) => setEditValue(e.target.value)}\n size={1}\n autoFocus\n onFocus={(e) => e.currentTarget.select()}\n onBlur={commit}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") commit();\n if (e.key === \"Escape\") {\n setEditValue(toPlainString(title));\n setEditing(false);\n }\n }}\n style={{ height: config.lineHeight } as CSSProperties}\n />\n </div>\n ) : (\n <Text\n font={config.titleFont}\n color=\"inherit\"\n maxLines={1}\n title={toPlainString(title)}\n onClick={editable ? startEditing : undefined}\n >\n {title}\n </Text>\n )}\n\n {editable && !editing && (\n <div\n className=\"sds-content-lg-edit-button\"\n style={{ padding: config.editButtonPadding }}\n >\n <Button\n variant=\"tertiary\"\n size={config.editButtonSize}\n iconLeft={<SvgEdit />}\n iconOnly\n tooltip=\"Edit\"\n tooltipSide=\"right\"\n aria-label=\"Edit\"\n onClick={startEditing}\n />\n </div>\n )}\n </div>\n\n {description && toPlainString(description) && (\n <div className=\"sds-content-lg-description\">\n <Text font=\"secondary-body\" color=\"text-03\" as=\"p\">\n {description}\n </Text>\n </div>\n )}\n </div>\n </>\n );\n\n if (rightChildren) {\n return (\n <div ref={ref} className={classes} data-has-right>\n <div className=\"sds-content-lg-main\" style={{ gap: config.gap }}>\n {inner}\n </div>\n <div className=\"sds-content-right\">{rightChildren}</div>\n </div>\n );\n }\n\n return (\n <div ref={ref} className={classes} style={{ gap: config.gap }}>\n {inner}\n </div>\n );\n },\n);\n","import {\n forwardRef,\n useRef,\n useState,\n type CSSProperties,\n type ReactNode,\n} from \"react\";\nimport { Button } from \"../Button/Button\";\nimport { Tag, type TagProps } from \"../Tag/Tag\";\nimport SvgAlertCircle from \"../../icons/AlertCircle\";\nimport SvgAlertTriangle from \"../../icons/AlertTriangle\";\nimport SvgEdit from \"../../icons/Edit\";\nimport SvgXOctagon from \"../../icons/XOctagon\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport { Text, type TextFont } from \"../Text/Text\";\nimport { toPlainString, type RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ContentMdSizePreset = \"main-content\" | \"main-ui\" | \"secondary\";\n\nexport type ContentMdAuxIcon = \"info-gray\" | \"info-blue\" | \"warning\" | \"error\";\n\nexport type ContentMdSuffix = \"optional\" | (string & {});\n\n/** Edit-button size on the DS Button scale (`sm | md | lg`). */\ntype EditButtonSize = \"sm\" | \"md\";\n\ninterface ContentMdPresetConfig {\n iconSize: string;\n /** Padding on the icon container (CSS value). */\n iconContainerPadding: string;\n /** Icon color token. */\n iconColor: string;\n titleFont: TextFont;\n lineHeight: string;\n /** Button `size` prop for the edit button. */\n editButtonSize: EditButtonSize;\n /** Padding on the edit-button container (CSS value). */\n editButtonPadding: string;\n /** Font preset for the muted suffix. */\n suffixFont: TextFont;\n /** Aux icon size = lineHeight − 2 × icon padding. */\n auxIconSize: string;\n /** Left indent for the description so it aligns with the title (past the icon). */\n descriptionIndent: string;\n}\n\nexport interface ContentMdProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description text below the title. */\n description?: string | RichStr;\n /** Enable inline editing of the title. */\n editable?: boolean;\n /** Called when the user commits an edit. */\n onTitleChange?: (newTitle: string) => void;\n /**\n * Muted suffix rendered beside the title.\n * Use `\"optional\"` for the standard \"(Optional)\" label, or pass any string.\n */\n suffix?: ContentMdSuffix;\n /** Auxiliary status icon rendered beside the title. */\n auxIcon?: ContentMdAuxIcon;\n /** Tag rendered beside the title. */\n tag?: TagProps;\n /** Size preset. Default: `\"main-ui\"`. */\n sizePreset?: ContentMdSizePreset;\n /**\n * Action slot rendered on the right side of the content row.\n * Naturally hosts a `ContentAction` trigger, button, badge, or arbitrary\n * nodes. When set, the root becomes a row pairing the content with the slot.\n */\n rightChildren?: ReactNode;\n /** Extra class for the root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Presets\n// ---------------------------------------------------------------------------\n\nconst CONTENT_MD_PRESETS: Record<ContentMdSizePreset, ContentMdPresetConfig> = {\n \"main-content\": {\n iconSize: \"1rem\",\n iconContainerPadding: \"0.25rem\",\n iconColor: \"var(--text-04)\",\n // DS lacks `main-content-emphasis`; nearest emphasis preset is `main-ui-action`.\n titleFont: \"main-ui-action\",\n lineHeight: \"1.5rem\",\n // DS Button has no xs/2xs; `sm` is the smallest preset.\n editButtonSize: \"sm\",\n editButtonPadding: \"0rem\",\n // DS lacks `main-content-muted`; nearest is `main-content`.\n suffixFont: \"main-content\",\n auxIconSize: \"1.25rem\",\n descriptionIndent: \"1.625rem\",\n },\n \"main-ui\": {\n iconSize: \"1rem\",\n iconContainerPadding: \"0.125rem\",\n iconColor: \"var(--text-03)\",\n titleFont: \"main-ui-action\",\n lineHeight: \"1.25rem\",\n editButtonSize: \"sm\",\n editButtonPadding: \"0rem\",\n // DS lacks `main-ui-muted`; nearest is `main-ui-body`.\n suffixFont: \"main-ui-body\",\n auxIconSize: \"1rem\",\n descriptionIndent: \"1.375rem\",\n },\n secondary: {\n iconSize: \"0.75rem\",\n iconContainerPadding: \"0.125rem\",\n iconColor: \"var(--text-04)\",\n titleFont: \"secondary-action\",\n lineHeight: \"1rem\",\n editButtonSize: \"sm\",\n editButtonPadding: \"0rem\",\n suffixFont: \"secondary-action\",\n auxIconSize: \"0.75rem\",\n descriptionIndent: \"1.125rem\",\n },\n};\n\nconst AUX_ICON_CONFIG: Record<\n ContentMdAuxIcon,\n { icon: IconComponent; color: string }\n> = {\n \"info-gray\": { icon: SvgAlertCircle, color: \"var(--text-02)\" },\n \"info-blue\": { icon: SvgAlertCircle, color: \"var(--status-info-05)\" },\n warning: { icon: SvgAlertTriangle, color: \"var(--status-warning-05)\" },\n error: { icon: SvgXOctagon, color: \"var(--status-error-05)\" },\n};\n\n// ---------------------------------------------------------------------------\n// ContentMd — compact inline (flex-row)\n// ---------------------------------------------------------------------------\n\nexport const ContentMd = forwardRef<HTMLDivElement, ContentMdProps>(\n function ContentMd(\n {\n icon: Icon,\n title,\n description,\n editable,\n onTitleChange,\n suffix,\n auxIcon,\n tag,\n sizePreset = \"main-ui\",\n rightChildren,\n className,\n },\n ref,\n ) {\n const [editing, setEditing] = useState(false);\n const [editValue, setEditValue] = useState(toPlainString(title));\n const inputRef = useRef<HTMLInputElement>(null);\n\n const config = CONTENT_MD_PRESETS[sizePreset];\n\n function startEditing() {\n setEditValue(toPlainString(title));\n setEditing(true);\n }\n\n function commit() {\n const value = editValue.trim();\n if (value && value !== toPlainString(title)) onTitleChange?.(value);\n setEditing(false);\n }\n\n const classes = [\"sds-content-md\", className].filter(Boolean).join(\" \");\n\n const inner = (\n <>\n <div\n className=\"sds-content-md-header\"\n data-editing={editing || undefined}\n >\n {Icon && (\n <div\n className=\"sds-content-md-icon-container\"\n style={{\n padding: config.iconContainerPadding,\n minHeight: config.lineHeight,\n }}\n >\n <Icon\n className=\"sds-content-md-icon\"\n style={{\n width: config.iconSize,\n height: config.iconSize,\n color: config.iconColor,\n }}\n />\n </div>\n )}\n\n <div className=\"sds-content-md-title-row\">\n {editing ? (\n <div className=\"sds-content-md-input-sizer\">\n <span\n className={`sds-content-md-input-mirror font-${config.titleFont}`}\n >\n {editValue || \"\\u00A0\"}\n </span>\n <input\n ref={inputRef}\n className={`sds-content-md-input font-${config.titleFont}`}\n value={editValue}\n onChange={(e) => setEditValue(e.target.value)}\n size={1}\n autoFocus\n onFocus={(e) => e.currentTarget.select()}\n onBlur={commit}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") commit();\n if (e.key === \"Escape\") {\n setEditValue(toPlainString(title));\n setEditing(false);\n }\n }}\n style={{ height: config.lineHeight } as CSSProperties}\n />\n </div>\n ) : (\n <Text\n font={config.titleFont}\n color=\"inherit\"\n maxLines={1}\n title={toPlainString(title)}\n onClick={editable ? startEditing : undefined}\n >\n {title}\n </Text>\n )}\n\n {suffix && (\n <Text font={config.suffixFont} color=\"text-03\">\n {suffix === \"optional\" ? \"(Optional)\" : suffix}\n </Text>\n )}\n\n {auxIcon &&\n (() => {\n const { icon: AuxIcon, color } = AUX_ICON_CONFIG[auxIcon];\n return (\n <div\n className=\"sds-content-md-aux-icon\"\n style={{ height: config.lineHeight }}\n >\n <AuxIcon\n style={{\n width: config.auxIconSize,\n height: config.auxIconSize,\n color,\n }}\n />\n </div>\n );\n })()}\n\n {tag && <Tag {...tag} />}\n\n {editable && !editing && (\n <div\n className=\"sds-content-md-edit-button\"\n style={{ padding: config.editButtonPadding }}\n >\n <Button\n variant=\"tertiary\"\n size={config.editButtonSize}\n iconLeft={<SvgEdit />}\n iconOnly\n tooltip=\"Edit\"\n tooltipSide=\"right\"\n aria-label=\"Edit\"\n onClick={startEditing}\n />\n </div>\n )}\n </div>\n </div>\n\n {description && toPlainString(description) && (\n <div\n className=\"sds-content-md-description\"\n style={\n Icon ? { paddingLeft: config.descriptionIndent } : undefined\n }\n >\n <Text font=\"secondary-body\" color=\"text-03\" as=\"p\">\n {description}\n </Text>\n </div>\n )}\n </>\n );\n\n if (rightChildren) {\n return (\n <div ref={ref} className={classes} data-has-right>\n <div className=\"sds-content-md-main\">{inner}</div>\n <div className=\"sds-content-right\">{rightChildren}</div>\n </div>\n );\n }\n\n return (\n <div ref={ref} className={classes}>\n {inner}\n </div>\n );\n },\n);\n","import { forwardRef, type ReactNode } from \"react\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport { Text, type TextFont } from \"../Text/Text\";\nimport { toPlainString, type RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ContentSmSizePreset = \"main-content\" | \"main-ui\" | \"secondary\";\nexport type ContentSmOrientation = \"vertical\" | \"inline\" | \"reverse\";\nexport type ContentSmProminence = \"default\" | \"muted\";\n\ninterface ContentSmPresetConfig {\n /** Icon width/height (CSS value). */\n iconSize: string;\n /** Padding on the icon container (CSS value). */\n iconContainerPadding: string;\n /** Font preset for the title. */\n titleFont: TextFont;\n /** Title line-height — also used as icon container min-height (CSS value). */\n lineHeight: string;\n /** Gap between icon container and title (CSS value). */\n gap: string;\n}\n\n/** Props for {@link ContentSm}. Does not support editing or descriptions. */\nexport interface ContentSmProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text (read-only — editing is not supported). */\n title: string | RichStr;\n /** Size preset. Default: `\"main-ui\"`. */\n sizePreset?: ContentSmSizePreset;\n /** Layout orientation. Default: `\"inline\"`. */\n orientation?: ContentSmOrientation;\n /** Title prominence. Default: `\"default\"`. */\n prominence?: ContentSmProminence;\n /**\n * Action slot rendered on the right side of the content row.\n * Naturally hosts a `ContentAction` trigger, button, badge, or arbitrary\n * nodes. When set, the root becomes a row pairing the content with the slot.\n */\n rightChildren?: ReactNode;\n /** Extra class for the root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Presets\n// ---------------------------------------------------------------------------\n\nconst CONTENT_SM_PRESETS: Record<ContentSmSizePreset, ContentSmPresetConfig> = {\n \"main-content\": {\n iconSize: \"1rem\",\n iconContainerPadding: \"0.25rem\",\n // DS lacks `main-content-body`; nearest is `main-content`.\n titleFont: \"main-content\",\n lineHeight: \"1.5rem\",\n gap: \"0.125rem\",\n },\n \"main-ui\": {\n iconSize: \"1rem\",\n iconContainerPadding: \"0.125rem\",\n titleFont: \"main-ui-action\",\n lineHeight: \"1.25rem\",\n gap: \"0.25rem\",\n },\n secondary: {\n iconSize: \"0.75rem\",\n iconContainerPadding: \"0.125rem\",\n titleFont: \"secondary-action\",\n lineHeight: \"1rem\",\n gap: \"0.125rem\",\n },\n};\n\n// ---------------------------------------------------------------------------\n// ContentSm — body-text layout (orientation-driven)\n// ---------------------------------------------------------------------------\n\nexport const ContentSm = forwardRef<HTMLDivElement, ContentSmProps>(\n function ContentSm(\n {\n icon: Icon,\n title,\n sizePreset = \"main-ui\",\n orientation = \"inline\",\n prominence = \"default\",\n rightChildren,\n className,\n },\n ref,\n ) {\n const config = CONTENT_SM_PRESETS[sizePreset];\n\n const classes = [\"sds-content-sm\", className].filter(Boolean).join(\" \");\n\n const inner = (\n <>\n {Icon && (\n <div\n className=\"sds-content-sm-icon-container\"\n style={{\n padding: config.iconContainerPadding,\n minHeight: config.lineHeight,\n }}\n >\n <Icon\n className=\"sds-content-sm-icon\"\n style={{ width: config.iconSize, height: config.iconSize }}\n />\n </div>\n )}\n\n <Text\n font={config.titleFont}\n color=\"inherit\"\n maxLines={1}\n title={toPlainString(title)}\n >\n {title}\n </Text>\n </>\n );\n\n if (rightChildren) {\n return (\n <div\n ref={ref}\n className={classes}\n data-prominence={prominence}\n data-has-right\n >\n <div\n className=\"sds-content-sm-main\"\n data-orientation={orientation}\n style={{ gap: config.gap }}\n >\n {inner}\n </div>\n <div className=\"sds-content-right\">{rightChildren}</div>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n className={classes}\n data-orientation={orientation}\n data-prominence={prominence}\n style={{ gap: config.gap }}\n >\n {inner}\n </div>\n );\n },\n);\n","import \"./content.css\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport { ContentXl, type ContentXlProps } from \"./ContentXl\";\nimport { ContentLg, type ContentLgProps } from \"./ContentLg\";\nimport {\n ContentMd,\n type ContentMdProps,\n type ContentMdAuxIcon,\n type ContentMdSuffix,\n} from \"./ContentMd\";\nimport {\n ContentSm,\n type ContentSmProps,\n type ContentSmOrientation,\n type ContentSmProminence,\n} from \"./ContentSm\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport type { TagProps } from \"../Tag/Tag\";\nimport type { RichStr } from \"../Text/richstr\";\n\n// ---------------------------------------------------------------------------\n// Shared types\n// ---------------------------------------------------------------------------\n\nexport type SizePreset =\n | \"headline\"\n | \"section\"\n | \"main-content\"\n | \"main-ui\"\n | \"secondary\";\n\nexport type ContentVariant = \"heading\" | \"section\" | \"body\";\n\n/** Horizontal width preset for the wrapper. */\nexport type ContentWidth = \"auto\" | \"fit\" | \"full\";\n\ninterface ContentBaseProps {\n /** Optional icon component. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description below the title. */\n description?: string | RichStr;\n /** Enable inline editing of the title. */\n editable?: boolean;\n /** Called when the user commits an edit. */\n onTitleChange?: (newTitle: string) => void;\n /**\n * Width preset controlling the component's horizontal size.\n *\n * - `\"auto\"` / `\"fit\"` — Shrink-wraps to content width\n * - `\"full\"` — Stretches to fill the parent's width\n *\n * @default \"full\"\n */\n width?: ContentWidth;\n /**\n * Opt out of the automatic interactive color override.\n *\n * When `Content` is nested inside an `.interactive` element, its title and\n * icon colors are normally overridden by the interactive foreground palette.\n * Set this to `true` to keep Content's own colors regardless of context.\n *\n * @default false\n */\n nonInteractive?: boolean;\n /**\n * Action slot rendered on the right side of the content row.\n *\n * Naturally hosts a `ContentAction` trigger, `Button`, `Badge`, or any\n * arbitrary node(s). When set, the resolved layout's root becomes a row that\n * pairs the content with a trailing, vertically-centered action slot. The\n * slot is forwarded to whichever internal layout (`ContentXl` / `Lg` / `Md`\n * / `Sm`) the `sizePreset` × `variant` combination resolves to.\n */\n rightChildren?: ReactNode;\n /** Extra class for the resolved layout's root `<div>`. */\n className?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Discriminated union: valid sizePreset × variant combinations\n// ---------------------------------------------------------------------------\n\nexport type XlContentProps = ContentBaseProps & {\n /** Size preset. Default: `\"headline\"`. */\n sizePreset?: \"headline\" | \"section\";\n /** Variant. Default: `\"heading\"` for heading-eligible presets. */\n variant?: \"heading\";\n /** Optional secondary icon rendered in the icon row (ContentXl only). */\n moreIcon1?: IconComponent;\n /** Optional tertiary icon rendered in the icon row (ContentXl only). */\n moreIcon2?: IconComponent;\n};\n\nexport type LgContentProps = ContentBaseProps & {\n /** Size preset. Default: `\"headline\"`. */\n sizePreset?: \"headline\" | \"section\";\n /** Variant. */\n variant: \"section\";\n};\n\nexport type MdContentProps = ContentBaseProps & {\n sizePreset: \"main-content\" | \"main-ui\" | \"secondary\";\n variant?: \"section\";\n /** Muted suffix rendered beside the title. Use `\"optional\"` for \"(Optional)\". */\n suffix?: ContentMdSuffix;\n /** Auxiliary status icon rendered beside the title. */\n auxIcon?: ContentMdAuxIcon;\n /** Tag rendered beside the title. */\n tag?: TagProps;\n};\n\n/** ContentSm does not support descriptions or inline editing. */\nexport type SmContentProps = Omit<\n ContentBaseProps,\n \"description\" | \"editable\" | \"onTitleChange\"\n> & {\n sizePreset: \"main-content\" | \"main-ui\" | \"secondary\";\n variant: \"body\";\n /** Layout orientation. Default: `\"inline\"`. */\n orientation?: ContentSmOrientation;\n /** Title prominence. Default: `\"default\"`. */\n prominence?: ContentSmProminence;\n};\n\nexport type ContentProps =\n | XlContentProps\n | LgContentProps\n | MdContentProps\n | SmContentProps;\n\nconst WIDTH_CLASS: Record<ContentWidth, string> = {\n auto: \"sds-content-width-fit\",\n fit: \"sds-content-width-fit\",\n full: \"sds-content-width-full\",\n};\n\n// ---------------------------------------------------------------------------\n// Content — routes to the appropriate internal layout\n// ---------------------------------------------------------------------------\n\n/**\n * Two-axis layout that pairs an optional icon with a title and description,\n * routing to one of four internal layouts based on `sizePreset` × `variant`:\n *\n * | sizePreset | variant | layout |\n * |-----------------------|--------------------|-------------|\n * | headline / section | heading | ContentXl |\n * | headline / section | section | ContentLg |\n * | main-* / secondary | section / heading | ContentMd |\n * | main-* / secondary | body | ContentSm |\n */\nexport const Content = forwardRef<HTMLDivElement, ContentProps>(\n function Content(props, ref) {\n const {\n sizePreset = \"headline\",\n variant = \"heading\",\n width = \"full\",\n nonInteractive,\n ...rest\n } = props as ContentBaseProps & {\n sizePreset?: SizePreset;\n variant?: ContentVariant;\n };\n\n let layout: React.ReactNode = null;\n\n if (sizePreset === \"headline\" || sizePreset === \"section\") {\n if (variant === \"heading\") {\n layout = (\n <ContentXl\n sizePreset={sizePreset}\n ref={ref}\n {...(rest as Omit<ContentXlProps, \"sizePreset\">)}\n />\n );\n } else {\n layout = (\n <ContentLg\n sizePreset={sizePreset}\n ref={ref}\n {...(rest as Omit<ContentLgProps, \"sizePreset\">)}\n />\n );\n }\n } else if (variant === \"section\" || variant === \"heading\") {\n layout = (\n <ContentMd\n sizePreset={sizePreset}\n ref={ref}\n {...(rest as Omit<ContentMdProps, \"sizePreset\">)}\n />\n );\n } else if (variant === \"body\") {\n layout = (\n <ContentSm\n sizePreset={sizePreset}\n ref={ref}\n {...(rest as Omit<ContentSmProps, \"sizePreset\">)}\n />\n );\n }\n\n // This case should NEVER be hit.\n if (!layout)\n throw new Error(\n `Content: no layout matched for sizePreset=\"${sizePreset}\" variant=\"${variant}\"`,\n );\n\n return (\n <div\n className={WIDTH_CLASS[width]}\n data-non-interactive={nonInteractive || undefined}\n >\n {layout}\n </div>\n );\n },\n);\n","import { forwardRef, type ReactNode } from \"react\";\nimport { Content, type ContentProps } from \"../Content/Content\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/** Padding preset for the `Content` area. Mirrors the DS size scale. */\nexport type ContentActionPadding = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\";\n\nexport type ContentActionProps = ContentProps & {\n /** Content rendered on the right side, stretched to full height. */\n rightChildren?: ReactNode;\n /**\n * Padding applied around the `Content` area.\n *\n * @default \"lg\"\n */\n padding?: ContentActionPadding;\n /** Extra class for the root row `<div>`. */\n className?: string;\n};\n\nconst PADDING_VALUE: Record<ContentActionPadding, string> = {\n \"2xs\": \"var(--space-1)\", /* 4px */\n xs: \"var(--space-1)\", /* 4px */\n sm: \"var(--space-2)\", /* 8px */\n md: \"var(--space-2)\", /* 8px */\n lg: \"var(--space-3)\", /* 12px */\n};\n\n// ---------------------------------------------------------------------------\n// ContentAction\n// ---------------------------------------------------------------------------\n\n/**\n * A row layout that pairs a {@link Content} block with optional right-side\n * action children (e.g. buttons, badges).\n *\n * The `Content` area receives padding controlled by `padding`. The\n * `rightChildren` wrapper stretches to the full height of the row.\n */\nexport const ContentAction = forwardRef<HTMLDivElement, ContentActionProps>(\n function ContentAction(\n { rightChildren, padding = \"lg\", className, ...contentProps },\n ref,\n ) {\n const classes = [\"sds-content-action\", className].filter(Boolean).join(\" \");\n\n return (\n <div ref={ref} className={classes}>\n <div\n className=\"sds-content-action-main\"\n style={{ padding: PADDING_VALUE[padding] }}\n >\n <Content {...(contentProps as ContentProps)} />\n </div>\n {rightChildren && (\n <div className=\"sds-content-action-right\">{rightChildren}</div>\n )}\n </div>\n );\n },\n);\n","import {\n forwardRef,\n type HTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport styles from \"./InputLayouts.module.css\";\nimport { Text } from \"../Text/Text\";\nimport { type RichStr } from \"../Text/richstr\";\nimport { Separator } from \"../Separator/Separator\";\nimport { Tag, type TagProps } from \"../Tag/Tag\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport SvgXOctagon from \"../../icons/XOctagon\";\nimport SvgAlertCircle from \"../../icons/AlertCircle\";\n\n// ---------------------------------------------------------------------------\n// Label\n// ---------------------------------------------------------------------------\n\nexport interface LabelProps\n extends Omit<LabelHTMLAttributes<HTMLLabelElement>, \"htmlFor\"> {\n /** Sets `htmlFor` on the `<label>` to associate it with a form element by id. */\n label?: string;\n /** Switches cursor from `pointer` to `not-allowed`. */\n disabled?: boolean;\n}\n\n/**\n * Block-level `<label>` wrapper that stretches to fill its row and forwards\n * clicks to the associated form element (via `htmlFor`) or the first labelable\n * descendant.\n */\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(function Label(\n { label, disabled, className, ...props },\n ref,\n) {\n return (\n <label\n ref={ref}\n className={[styles.label, className].filter(Boolean).join(\" \")}\n htmlFor={label}\n data-disabled={disabled || undefined}\n {...props}\n />\n );\n});\n\n// ---------------------------------------------------------------------------\n// InputErrorText\n// ---------------------------------------------------------------------------\n\nexport type InputErrorType = \"error\" | \"warning\";\n\nexport interface InputErrorTextProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n children?: string | RichStr;\n type?: InputErrorType;\n}\n\n/**\n * Inline validation message with a leading status icon. `error` uses the\n * x-octagon glyph and error color; `warning` uses the alert-circle glyph and\n * warning color. The message text carries `role=\"alert\"` so assistive tech\n * announces it.\n */\nexport const InputErrorText = forwardRef<HTMLDivElement, InputErrorTextProps>(\n function InputErrorText({ children, type = \"error\", className, ...rest }, ref) {\n const Icon: IconComponent = type === \"error\" ? SvgXOctagon : SvgAlertCircle;\n return (\n <div\n ref={ref}\n className={[styles.errorText, styles[`error-${type}`], className]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n >\n <Icon className={styles.errorIcon} aria-hidden=\"true\" />\n <span role=\"alert\">\n <Text font=\"secondary-body\" color=\"inherit\">\n {children ?? \"\"}\n </Text>\n </span>\n </div>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// Shared title / description header\n// ---------------------------------------------------------------------------\n\ninterface InputLayoutProps {\n /**\n * Controls the `<label>` wrapper.\n *\n * - `false` (default) — no `<label>`.\n * - `true` — implicit `<label>` (no `htmlFor`). The browser forwards clicks\n * to the first labelable descendant.\n * - `string` — `<label htmlFor={string}>` associated with a form element by\n * id.\n */\n withLabel?: boolean | string;\n disabled?: boolean;\n children?: ReactNode;\n title: string | RichStr;\n description?: string | RichStr;\n suffix?: \"optional\" | (string & {});\n /** Categorical tag rendered beside the title. */\n tag?: TagProps;\n /** Validation error message, rendered through `InputErrorText`. */\n error?: string;\n /** Validation warning message, rendered through `InputErrorText`. */\n warning?: string;\n}\n\n/**\n * Renders the title + optional suffix + optional description block.\n *\n * NOTE: Opal routes this through its `Content` layout. The DS `Content` port is\n * being done in parallel and may not exist yet, so title/description are\n * rendered directly with `Text`: title in `main-ui-action`, suffix and\n * description in muted `secondary-body`.\n */\ninterface InputHeaderProps {\n title: string | RichStr;\n description?: string | RichStr;\n suffix?: string;\n tag?: TagProps;\n}\n\nfunction InputHeader({ title, description, suffix, tag }: InputHeaderProps) {\n return (\n <div className={styles.header}>\n <div className={styles.titleRow}>\n <Text font=\"main-ui-action\" color=\"text-05\">\n {title}\n </Text>\n {tag && <Tag {...tag} />}\n {suffix && (\n <Text font=\"secondary-body\" color=\"text-03\">\n {suffix}\n </Text>\n )}\n </div>\n {description && (\n <Text font=\"secondary-body\" color=\"text-04\">\n {description}\n </Text>\n )}\n </div>\n );\n}\n\n/** Picks the error message first, then warning, then renders nothing. */\nfunction InputValidation({\n error,\n warning,\n}: {\n error?: string;\n warning?: string;\n}) {\n if (error) return <InputErrorText type=\"error\">{error}</InputErrorText>;\n if (warning) return <InputErrorText type=\"warning\">{warning}</InputErrorText>;\n return null;\n}\n\nfunction maybeWrapInLabel(\n withLabel: boolean | string,\n disabled: boolean | undefined,\n content: ReactNode,\n): ReactNode {\n if (!withLabel) return content;\n const fieldName = typeof withLabel === \"string\" ? withLabel : undefined;\n return (\n <Label label={fieldName} disabled={disabled}>\n {content}\n </Label>\n );\n}\n\n// ---------------------------------------------------------------------------\n// InputVertical\n// ---------------------------------------------------------------------------\n\nexport interface InputVerticalProps extends InputLayoutProps {\n /** Smaller helper text rendered below the input. */\n subDescription?: string | RichStr;\n}\n\n/**\n * Stacks the title/description header above the input control, with optional\n * validation message and sub-description below. Set `withLabel` to wrap the\n * whole block in a `<label>`.\n */\nexport const InputVertical = forwardRef<HTMLDivElement, InputVerticalProps>(\n function InputVertical(\n {\n withLabel = false,\n disabled,\n children,\n subDescription,\n title,\n description,\n suffix,\n tag,\n error,\n warning,\n },\n ref,\n ) {\n const content = (\n <div ref={ref} className={styles.vertical}>\n <InputHeader title={title} description={description} suffix={suffix} tag={tag} />\n {children}\n <InputValidation error={error} warning={warning} />\n {subDescription && (\n <Text font=\"secondary-body\" color=\"text-04\">\n {subDescription}\n </Text>\n )}\n </div>\n );\n return <>{maybeWrapInLabel(withLabel, disabled, content)}</>;\n },\n);\n\n// ---------------------------------------------------------------------------\n// InputHorizontal\n// ---------------------------------------------------------------------------\n\nexport interface InputHorizontalProps extends InputLayoutProps {\n /** Vertically center the input against the label/description. */\n center?: boolean;\n}\n\n/**\n * Places the title/description header on the left and the input control on the\n * right of the same row, with an optional validation message below. Set\n * `center` to vertically center the control against the header.\n */\nexport const InputHorizontal = forwardRef<HTMLDivElement, InputHorizontalProps>(\n function InputHorizontal(\n {\n withLabel = false,\n disabled,\n children,\n center,\n title,\n description,\n suffix,\n tag,\n error,\n warning,\n },\n ref,\n ) {\n const content = (\n <div ref={ref} className={styles.horizontal}>\n <div\n className={[styles.row, center ? styles.rowCenter : null]\n .filter(Boolean)\n .join(\" \")}\n >\n <div className={styles.rowMain}>\n <InputHeader\n title={title}\n description={description}\n suffix={suffix}\n tag={tag}\n />\n </div>\n <div className={styles.rowAside}>{children}</div>\n </div>\n <InputValidation error={error} warning={warning} />\n </div>\n );\n return <>{maybeWrapInLabel(withLabel, disabled, content)}</>;\n },\n);\n\n// ---------------------------------------------------------------------------\n// InputDivider\n// ---------------------------------------------------------------------------\n\nexport type InputDividerProps = HTMLAttributes<HTMLDivElement>;\n\n/**\n * Padded horizontal rule between input rows. Wraps the DS `Separator` (the\n * equivalent of Opal's `Divider`) with consistent vertical spacing.\n */\nexport const InputDivider = forwardRef<HTMLDivElement, InputDividerProps>(\n function InputDivider({ className, ...rest }, ref) {\n return (\n <div\n ref={ref}\n className={[styles.divider, className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <Separator />\n </div>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// InputPadder\n// ---------------------------------------------------------------------------\n\nexport type InputPadderProps = HTMLAttributes<HTMLDivElement>;\n\n/** Full-width padded container for grouping input rows. */\nexport const InputPadder = forwardRef<HTMLDivElement, InputPadderProps>(\n function InputPadder({ className, ...props }, ref) {\n return (\n <div\n ref={ref}\n className={[styles.padder, className].filter(Boolean).join(\" \")}\n {...props}\n />\n );\n },\n);\n","import { forwardRef, useMemo, type ReactNode, type SVGProps } from \"react\";\nimport styles from \"./MessageCard.module.css\";\nimport { ContentAction } from \"../ContentAction/ContentAction\";\nimport { Separator } from \"../Separator/Separator\";\nimport { Interactive } from \"../Interactive/Interactive\";\nimport type { RichStr } from \"../Text/richstr\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport SvgAlertCircle from \"../../icons/AlertCircle\";\nimport SvgAlertTriangle from \"../../icons/AlertTriangle\";\nimport SvgCheckCircle from \"../../icons/CheckCircle\";\nimport SvgX from \"../../icons/X\";\nimport SvgXOctagon from \"../../icons/XOctagon\";\n\nexport type MessageCardVariant = \"default\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\ninterface MessageCardBaseProps {\n /** Visual variant controlling background, border, and icon. Default: `\"default\"`. */\n variant?: MessageCardVariant;\n /** Override the variant's default icon. */\n icon?: IconComponent;\n /** Main title text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Optional description below the title. */\n description?: string | RichStr;\n /** Padding preset. Default: `\"sm\"`. */\n padding?: \"sm\" | \"xs\";\n /** Content rendered below a divider, under the main content area. */\n bottomChildren?: ReactNode;\n}\n\nexport type MessageCardProps = MessageCardBaseProps &\n (\n | {\n /** Right-side content. Mutually exclusive with `onClose`. */\n rightChildren?: ReactNode;\n onClose?: never;\n }\n | {\n rightChildren?: never;\n /** Close button callback. Mutually exclusive with `rightChildren`. */\n onClose?: () => void;\n }\n );\n\nconst VARIANT_ICON: Record<MessageCardVariant, IconComponent> = {\n default: SvgAlertCircle,\n info: SvgAlertCircle,\n success: SvgCheckCircle,\n warning: SvgAlertTriangle,\n error: SvgXOctagon,\n};\n\n/**\n * Card-level status block: inline message, alert, or notification. Uses\n * `ContentAction` for the icon + title + description + right-actions layout.\n * Page-level announcements stay with `Banner`; this is for in-flow surfaces.\n */\nexport const MessageCard = forwardRef<HTMLDivElement, MessageCardProps>(function MessageCard(\n {\n variant = \"default\",\n icon: iconOverride,\n title,\n description,\n padding = \"sm\",\n bottomChildren,\n rightChildren,\n onClose,\n },\n ref,\n) {\n const Icon = iconOverride ?? VARIANT_ICON[variant];\n // Wrapper injects the variant color class; DS icons stroke currentColor.\n // Memoized on Icon so the SVG keeps a stable component identity.\n const ColoredIcon = useMemo(\n () =>\n function ColoredIcon(props: SVGProps<SVGSVGElement>) {\n return (\n <Icon {...props} className={[styles.icon, props.className].filter(Boolean).join(\" \")} />\n );\n },\n [Icon],\n );\n\n const right = onClose ? (\n <Interactive.Stateless\n variant=\"default\"\n prominence=\"internal\"\n type=\"button\"\n onClick={onClose}\n >\n <Interactive.Container type=\"button\" size=\"md\" rounding=\"sm\" aria-label=\"Close\">\n <SvgX className={styles.closeIcon} />\n </Interactive.Container>\n </Interactive.Stateless>\n ) : (\n rightChildren\n );\n\n return (\n <div\n ref={ref}\n className={[styles.card, styles[`pad-${padding}`]].join(\" \")}\n data-variant={variant}\n >\n <ContentAction\n icon={ColoredIcon}\n title={title}\n description={description}\n sizePreset=\"main-ui\"\n variant=\"section\"\n padding=\"md\"\n rightChildren={right}\n />\n {bottomChildren && (\n <>\n <Separator />\n {bottomChildren}\n </>\n )}\n </div>\n );\n});\n","import { forwardRef } from \"react\";\nimport styles from \"./EmptyMessageCard.module.css\";\nimport { Card } from \"../Card/Card\";\nimport { Content } from \"../Content/Content\";\nimport type { RichStr } from \"../Text/richstr\";\nimport type { IconComponent } from \"../../internal/interactive-buttons\";\nimport SvgBoxes from \"../../icons/Boxes\";\n\nexport type EmptyMessageCardPadding = \"none\" | \"sm\" | \"md\" | \"lg\";\n\ninterface EmptyMessageCardBaseProps {\n /** Icon displayed beside the title. Default: `SvgBoxes`. */\n icon?: IconComponent;\n /** Primary message text. Supports inline markdown via `markdown()`. */\n title: string | RichStr;\n /** Card padding preset. Default: `\"md\"`. */\n padding?: EmptyMessageCardPadding;\n className?: string;\n}\n\nexport type EmptyMessageCardProps =\n | (EmptyMessageCardBaseProps & {\n /** Compact single-line message. Default. */\n sizePreset?: \"secondary\";\n })\n | (EmptyMessageCardBaseProps & {\n sizePreset: \"main-ui\";\n /** Optional description below the title. */\n description?: string | RichStr;\n });\n\n/**\n * Inline dashed-border placeholder for empty slots: empty lists, empty\n * sections, \"nothing here yet\" rows. Page-level empty states stay with\n * `EmptyState`; this is for in-flow surfaces.\n */\nexport const EmptyMessageCard = forwardRef<HTMLDivElement, EmptyMessageCardProps>(\n function EmptyMessageCard(props, ref) {\n const { sizePreset = \"secondary\", icon = SvgBoxes, title, padding = \"md\", className } = props;\n\n return (\n <Card\n ref={ref}\n border=\"dashed\"\n padding={padding}\n rounding=\"md\"\n className={[styles.transparent, className].filter(Boolean).join(\" \")}\n >\n {sizePreset === \"secondary\" ? (\n <Content icon={icon} title={title} sizePreset=\"secondary\" variant=\"body\" prominence=\"muted\" />\n ) : (\n <Content\n icon={icon}\n title={title}\n description={\"description\" in props ? props.description : undefined}\n sizePreset=\"main-ui\"\n variant=\"section\"\n />\n )}\n </Card>\n );\n },\n);\n","import { createElement, forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport styles from \"./IllustrationContent.module.css\";\nimport { resolveNode, type RichStr } from \"../Text/richstr\";\n\nexport type IllustrationHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\nexport type IllustrationSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface IllustrationContentProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** Illustration glyph — e.g. one of the `./illustrations` stroke SVGs. */\n illustration?: ReactNode;\n /** Title. Supports `markdown()` and arbitrary nodes. */\n title: ReactNode | RichStr;\n /** Heading level for the title. Default: 3. */\n titleLevel?: IllustrationHeadingLevel;\n /** Supporting copy below the title. */\n description?: ReactNode | RichStr;\n /** Optional action slot (buttons, links) below the text. */\n actions?: ReactNode;\n /** Illustration size. Default: `\"md\"` (64px). `sm`=48px, `lg`=96px. */\n size?: IllustrationSize;\n /** Horizontal alignment of the stack. Default: `\"center\"`. */\n align?: \"center\" | \"start\";\n}\n\n/**\n * Centered illustration + title + description layout (with optional actions).\n * Pairs the `./illustrations` glyphs with copy for empty / error / permission\n * states. The illustration inherits `currentColor`; size it via the `size`\n * prop, which sets the glyph's `font-size`.\n */\nexport const IllustrationContent = forwardRef<HTMLDivElement, IllustrationContentProps>(\n function IllustrationContent(\n {\n illustration,\n title,\n titleLevel = 3,\n description,\n actions,\n size = \"md\",\n align = \"center\",\n className,\n ...rest\n },\n ref,\n ) {\n return (\n <div\n ref={ref}\n className={[styles.root, styles[`align-${align}`], className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {illustration ? (\n <div className={[styles.illu, styles[`size-${size}`]].join(\" \")} aria-hidden=\"true\">\n {illustration}\n </div>\n ) : null}\n {createElement(`h${titleLevel}`, { className: styles.title }, resolveNode(title))}\n {description ? <div className={styles.desc}>{resolveNode(description)}</div> : null}\n {actions ? <div className={styles.actions}>{actions}</div> : null}\n </div>\n );\n },\n);\n","/**\n * AccountMenu\n *\n * The bottom-of-rail account cluster (à la nous): an avatar that opens a\n * dropdown with an identity header and consumer-supplied items (Settings,\n * Download, Log out, …). One item can reveal a **notifications** view inside\n * the same dropdown, and the unread count surfaces as a badge on both the\n * avatar and that item.\n *\n * Notifications render as a second VIEW of the same dropdown (not a separate\n * popover) — selecting the item swaps the menu content to a back-bar + the\n * consumer's panel. Keeping it in one overlay sidesteps the menu→popover\n * dismiss race (where the click that closes the menu also dismisses the\n * popover). The consumer owns the notifications data/panel, item actions, and\n * any confirm dialogs.\n *\n * Composed from DS Avatar + DropdownMenu. Tokens only.\n */\nimport { forwardRef, Fragment, useState, type ReactNode } from \"react\";\nimport { Avatar, type AvatarTone, type AvatarSize } from \"../../components/Avatar\";\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n} from \"../../components/DropdownMenu\";\nimport { SvgArrowLeft } from \"../../icons\";\nimport styles from \"./AccountMenu.module.css\";\n\nconst cx = (...parts: Array<string | false | null | undefined>) => parts.filter(Boolean).join(\" \");\n\nexport interface AccountMenuItem {\n /** Stable key. */\n id: string;\n label: ReactNode;\n /** Leading glyph (consumer-supplied, ~16px). */\n icon?: ReactNode;\n /** `danger` renders the destructive tone (e.g. Log out). */\n tone?: \"default\" | \"danger\";\n /** Chosen via click/Enter. Ignored when `opensNotifications` is set. */\n onSelect?: () => void;\n /**\n * Marks this as the notifications row: selecting it swaps the dropdown to the\n * notifications view (see `notifications`) instead of firing `onSelect`, and\n * it shows the unread badge.\n */\n opensNotifications?: boolean;\n /** Render a divider above this row (e.g. to set Log out apart). */\n separatorBefore?: boolean;\n}\n\nexport interface AccountMenuNotifications {\n /** Unread count → badge on the avatar and the notifications item. */\n count?: number;\n /**\n * The notifications body. May be a render function receiving a `close`\n * callback — call it after navigating from a notification to dismiss the menu.\n */\n panel: ReactNode | ((close: () => void) => ReactNode);\n /** Title shown in the notifications view's back-bar. Default \"Notifications\". */\n title?: ReactNode;\n}\n\nexport interface AccountMenuProps {\n name?: ReactNode;\n email?: ReactNode;\n initials?: ReactNode;\n avatarSrc?: string;\n avatarAlt?: string;\n avatarTone?: AvatarTone;\n avatarSize?: AvatarSize;\n items: AccountMenuItem[];\n /**\n * Trigger shape. `\"avatar\"` (default) is the bare avatar (for a narrow rail).\n * `\"bar\"` is a full-width row — avatar + name/email — for a wide sidebar.\n */\n triggerVariant?: \"avatar\" | \"bar\";\n /** Notifications config; omit to disable the notifications affordance. */\n notifications?: AccountMenuNotifications;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n align?: \"start\" | \"center\" | \"end\";\n sideOffset?: number;\n \"aria-label\"?: string;\n className?: string;\n}\n\nconst formatBadge = (n: number) => (n > 99 ? \"99+\" : String(n));\n\nexport const AccountMenu = forwardRef<HTMLButtonElement, AccountMenuProps>(function AccountMenu(\n {\n name,\n email,\n initials,\n avatarSrc,\n avatarAlt,\n avatarTone = \"brand\",\n avatarSize = \"md\",\n items,\n triggerVariant = \"avatar\",\n notifications,\n side = \"right\",\n align = \"end\",\n sideOffset = 12,\n \"aria-label\": ariaLabel = \"Account\",\n className,\n },\n ref,\n) {\n const [open, setOpen] = useState(false);\n const [view, setView] = useState<\"menu\" | \"notifications\">(\"menu\");\n\n const count = notifications?.count ?? 0;\n const hasUnread = count > 0;\n const close = () => setOpen(false);\n\n const onOpenChange = (next: boolean) => {\n setOpen(next);\n if (!next) setView(\"menu\"); // always reopen on the account view\n };\n\n return (\n <DropdownMenu open={open} onOpenChange={onOpenChange}>\n <DropdownMenuTrigger asChild>\n <button\n ref={ref}\n type=\"button\"\n aria-label={ariaLabel}\n className={cx(triggerVariant === \"bar\" ? styles.triggerBar : styles.trigger, className)}\n >\n <span className={styles.avatarWrap}>\n <Avatar src={avatarSrc} alt={avatarAlt} tone={avatarTone} size={avatarSize}>\n {initials}\n </Avatar>\n {notifications && hasUnread ? (\n <span className={styles.avatarBadge} aria-hidden=\"true\">\n {formatBadge(count)}\n </span>\n ) : null}\n </span>\n {triggerVariant === \"bar\" ? (\n <span className={styles.barIdentity}>\n {name ? <span className={styles.identityName}>{name}</span> : null}\n {email ? <span className={styles.identityEmail}>{email}</span> : null}\n </span>\n ) : null}\n </button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent\n side={side}\n align={align}\n sideOffset={sideOffset}\n className={view === \"notifications\" ? styles.notifContent : undefined}\n >\n {view === \"menu\" ? (\n <>\n {name || email ? (\n <>\n <DropdownMenuLabel>\n {name ? <span className={styles.identityName}>{name}</span> : null}\n {email ? <span className={styles.identityEmail}>{email}</span> : null}\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n </>\n ) : null}\n\n {items.map((item) => (\n <Fragment key={item.id}>\n {item.separatorBefore ? <DropdownMenuSeparator /> : null}\n {item.opensNotifications ? (\n <DropdownMenuItem\n icon={item.icon}\n tone={item.tone}\n shortcut={\n notifications && hasUnread ? (\n <span className={styles.itemBadge}>{formatBadge(count)}</span>\n ) : undefined\n }\n // Keep the dropdown open and swap to the notifications view.\n onSelect={(e) => {\n e.preventDefault();\n setView(\"notifications\");\n }}\n >\n {item.label}\n </DropdownMenuItem>\n ) : (\n <DropdownMenuItem icon={item.icon} tone={item.tone} onClick={item.onSelect}>\n {item.label}\n </DropdownMenuItem>\n )}\n </Fragment>\n ))}\n </>\n ) : (\n <div className={styles.notifView}>\n <div className={styles.notifBar}>\n <button\n type=\"button\"\n className={styles.backButton}\n aria-label=\"Back\"\n onClick={() => setView(\"menu\")}\n >\n <SvgArrowLeft width={16} height={16} aria-hidden=\"true\" />\n </button>\n {notifications?.title ? <span className={styles.notifTitle}>{notifications.title}</span> : null}\n </div>\n <div className={styles.notifBody}>\n {notifications\n ? typeof notifications.panel === \"function\"\n ? notifications.panel(close)\n : notifications.panel\n : null}\n </div>\n </div>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n});\n","import {\n Children,\n createContext,\n forwardRef,\n isValidElement,\n useCallback,\n useContext,\n useRef,\n useState,\n type ButtonHTMLAttributes,\n type ComponentType,\n type HTMLAttributes,\n type MouseEvent as ReactMouseEvent,\n type PointerEvent as ReactPointerEvent,\n type ReactNode,\n type SVGProps,\n} from \"react\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport styles from \"./AppShell.module.css\";\n\nconst cx = (...parts: Array<string | false | null | undefined>) =>\n parts.filter(Boolean).join(\" \");\n\n// Static marker used by Root/Main to place a child in the correct region\n// without forcing the consumer to nest extra wrappers. The compound parts\n// carry this so the spec's flat JSX (Rail/Sidebar/Main as direct Root children)\n// works while the mobile-drawer wrapper still groups rail + sidebar.\ntype ShellRole = \"drawer\" | \"header\" | \"footer\";\nconst ROLE = \"__appShellRole\" as const;\nconst roleOf = (node: ReactNode): ShellRole | undefined =>\n isValidElement(node)\n ? ((node.type as { [ROLE]?: ShellRole })[ROLE] ?? undefined)\n : undefined;\n\n// ---------------------------------------------------------------------------\n// Context — shared, optional state. Controlled props on Root/Rail/Sidebar\n// always win; the Provider only fills the gaps (uncontrolled convenience).\n// It owns NO persistence and NO keyboard shortcut — those stay in the consumer.\n// ---------------------------------------------------------------------------\n\ninterface AppShellContextValue {\n drawerOpen: boolean;\n setDrawerOpen: (open: boolean) => void;\n railCollapsed: boolean;\n setRailCollapsed: (collapsed: boolean) => void;\n sidebarFolded: boolean;\n setSidebarFolded: (folded: boolean) => void;\n}\n\nconst AppShellContext = createContext<AppShellContextValue | null>(null);\n\n/**\n * Access the shared shell state when an {@link AppShellProvider} is mounted.\n * Returns `null` outside a provider (controlled usage never needs it).\n */\nexport function useAppShell(): AppShellContextValue | null {\n return useContext(AppShellContext);\n}\n\nexport interface AppShellProviderProps {\n children: ReactNode;\n defaultRailCollapsed?: boolean;\n defaultSidebarFolded?: boolean;\n defaultDrawerOpen?: boolean;\n}\n\n/**\n * Optional uncontrolled holder for the three shell states (rail collapse,\n * sidebar fold, mobile drawer). Convenience only — controlled props on Root /\n * Rail / Sidebar work without it. Deliberately omits persistence and the\n * `Cmd/Ctrl+E` shortcut; the consuming app owns those.\n */\nfunction AppShellProvider({\n children,\n defaultRailCollapsed = false,\n defaultSidebarFolded = false,\n defaultDrawerOpen = false,\n}: AppShellProviderProps) {\n const [drawerOpen, setDrawerOpen] = useState(defaultDrawerOpen);\n const [railCollapsed, setRailCollapsed] = useState(defaultRailCollapsed);\n const [sidebarFolded, setSidebarFolded] = useState(defaultSidebarFolded);\n return (\n <AppShellContext.Provider\n value={{\n drawerOpen,\n setDrawerOpen,\n railCollapsed,\n setRailCollapsed,\n sidebarFolded,\n setSidebarFolded,\n }}\n >\n {children}\n </AppShellContext.Provider>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Root — the rounded shell card. Groups Rail + Sidebar into the mobile-drawer\n// wrapper (which dissolves to `display: contents` at the md breakpoint so they\n// participate directly in the flex row); everything else renders in-row.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellRootProps extends HTMLAttributes<HTMLDivElement> {\n /** Controlled mobile-drawer open state. Falls back to the Provider. */\n drawerOpen?: boolean;\n onDrawerOpenChange?: (open: boolean) => void;\n /**\n * Surface treatment. `\"glass\"` (default) is the translucent/blurred shell.\n * `\"solid\"` swaps every region (rail, sidebar, drawer, main) to opaque\n * theme surfaces with no backdrop blur — a flat dark shell in the dark\n * theme. Tunable via the `--shell-solid-*` CSS variables.\n */\n surface?: \"glass\" | \"solid\";\n}\n\nconst AppShellRoot = forwardRef<HTMLDivElement, AppShellRootProps>(function AppShellRoot(\n { drawerOpen, onDrawerOpenChange, surface = \"glass\", children, className, ...rest },\n ref,\n) {\n const ctx = useContext(AppShellContext);\n const open = drawerOpen ?? ctx?.drawerOpen ?? false;\n const setOpen = onDrawerOpenChange ?? ctx?.setDrawerOpen;\n\n const drawerChildren: ReactNode[] = [];\n const rowChildren: ReactNode[] = [];\n Children.forEach(children, (child) => {\n if (roleOf(child) === \"drawer\") drawerChildren.push(child);\n else rowChildren.push(child);\n });\n\n return (\n <div ref={ref} className={cx(styles.root, className)} data-surface={surface} {...rest}>\n <span className={styles.topAccent} aria-hidden=\"true\" />\n <button\n type=\"button\"\n className={styles.scrim}\n data-open={open ? \"true\" : \"false\"}\n aria-hidden={!open}\n tabIndex={open ? 0 : -1}\n aria-label=\"Close navigation\"\n onClick={() => setOpen?.(false)}\n />\n <div className={styles.drawer} data-open={open ? \"true\" : \"false\"}>\n {drawerChildren}\n </div>\n {rowChildren}\n </div>\n );\n});\n\n// ---------------------------------------------------------------------------\n// Rail — vertical activity navigation. Width is fit-content (so longer locale\n// labels can widen it up to a cap); collapse animates max-width because\n// fit-content cannot interpolate.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellRailProps extends HTMLAttributes<HTMLElement> {\n /** Controlled collapse. Falls back to the Provider. */\n collapsed?: boolean;\n /** Top slot — typically the product logo. */\n header?: ReactNode;\n /** Bottom slot — typically avatar / settings. */\n footer?: ReactNode;\n}\n\nconst AppShellRail = forwardRef<HTMLElement, AppShellRailProps>(function AppShellRail(\n { collapsed, header, footer, children, className, \"aria-label\": ariaLabel, ...rest },\n ref,\n) {\n const ctx = useContext(AppShellContext);\n const isCollapsed = collapsed ?? ctx?.railCollapsed ?? false;\n return (\n <nav\n ref={ref}\n className={cx(styles.rail, className)}\n data-collapsed={isCollapsed ? \"true\" : \"false\"}\n aria-label={ariaLabel ?? \"Sidebar activities\"}\n aria-hidden={isCollapsed || undefined}\n {...rest}\n >\n {header ? <div className={styles.railHeader}>{header}</div> : null}\n <div className={styles.railItems}>{children}</div>\n {footer ? <div className={styles.railFooter}>{footer}</div> : null}\n </nav>\n );\n});\n(AppShellRail as { [ROLE]?: ShellRole })[ROLE] = \"drawer\";\n\n// ---------------------------------------------------------------------------\n// RailItem — stacked icon over an 11px label, with a selection pill. Renders a\n// <button> by default; `asChild` slots the consumer's <a>/<Link> as the host\n// element (for SPA routing / real hrefs) while RailItem keeps the visual\n// content via Radix Slottable.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellRailItemProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"onSelect\"> {\n /** Icon component, rendered at 24px. */\n icon?: ComponentType<SVGProps<SVGSVGElement>>;\n label: ReactNode;\n selected?: boolean;\n onSelect?: () => void;\n /** Render onto the single child element (e.g. a router `<Link>`). */\n asChild?: boolean;\n /**\n * Icon-only: hide the stacked label, leaving just the glyph — for a compact\n * rail that surfaces the name via a hover tooltip instead. A string `label`\n * is still applied as the element's `aria-label` so the control keeps its\n * accessible name. Default `false` (label shown).\n */\n hideLabel?: boolean;\n}\n\nconst AppShellRailItem = forwardRef<HTMLButtonElement, AppShellRailItemProps>(\n function AppShellRailItem(\n { icon: Icon, label, selected = false, onSelect, asChild = false, hideLabel = false, className, children, onClick, \"aria-label\": ariaLabel, ...rest },\n ref,\n ) {\n const Comp = asChild ? Slot : \"button\";\n // When the label is hidden, keep an accessible name: prefer an explicit\n // aria-label, else a string label.\n const accessibleName =\n ariaLabel ?? (hideLabel && typeof label === \"string\" ? label : undefined);\n // Compose any externally-supplied onClick (e.g. injected by a wrapping\n // Radix Tooltip/Popover trigger via asChild) with onSelect. Pulling\n // `onClick` out of `...rest` is essential: spreading rest last would\n // otherwise overwrite our handler and silently drop onSelect (the trigger's\n // onClick only closes the tooltip), so the item would stop navigating.\n const handleClick = (event: ReactMouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onSelect?.();\n };\n return (\n <Comp\n ref={ref}\n className={cx(styles.railItem, hideLabel && styles.railItemIconOnly, className)}\n data-selected={selected ? \"true\" : \"false\"}\n {...(accessibleName ? { \"aria-label\": accessibleName } : {})}\n {...(asChild ? {} : { type: \"button\", \"aria-pressed\": selected })}\n {...rest}\n onClick={handleClick}\n >\n {/* In asChild mode this element becomes the host (the consumer's <a>);\n the pill/icon/label below become its children. */}\n <Slottable>{asChild ? children : null}</Slottable>\n {selected ? <span className={styles.railItemPill} aria-hidden=\"true\" /> : null}\n {Icon ? <Icon className={styles.railItemIcon} width={24} height={24} aria-hidden=\"true\" /> : null}\n {hideLabel ? null : <span className={styles.railItemLabel}>{label}</span>}\n </Comp>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// Sidebar — contextual panel. Width is consumed from a CSS variable (default\n// `--app-sidebar-w`); the optional resize handle writes that variable\n// imperatively to documentElement and toggles `data-resizing` (the attribute\n// other components key off to opt out of transitions), matching the existing\n// nous ResizeHandle mechanism. No controlled width prop, no built-in persist.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellSidebarProps extends HTMLAttributes<HTMLElement> {\n /** Controlled fold. Falls back to the Provider. */\n folded?: boolean;\n /** CSS variable the width lives in. Default `--app-sidebar-w`. */\n widthVar?: string;\n /** Fallback width when the variable is unset. Default `15rem`. */\n defaultWidth?: string;\n /** Clamp (px) applied by the resize handle. */\n minWidth?: number;\n maxWidth?: number;\n resizable?: boolean;\n /** Fires on drag end (and double-click reset) so the consumer can persist. */\n onWidthCommit?: (px: number) => void;\n}\n\nconst AppShellSidebar = forwardRef<HTMLElement, AppShellSidebarProps>(function AppShellSidebar(\n {\n folded,\n widthVar = \"--app-sidebar-w\",\n defaultWidth = \"15rem\",\n minWidth,\n maxWidth,\n resizable = false,\n onWidthCommit,\n children,\n className,\n style,\n ...rest\n },\n ref,\n) {\n const ctx = useContext(AppShellContext);\n const isFolded = folded ?? ctx?.sidebarFolded ?? false;\n const innerRef = useRef<HTMLElement | null>(null);\n\n const setRefs = useCallback(\n (node: HTMLElement | null) => {\n innerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as { current: HTMLElement | null }).current = node;\n },\n [ref],\n );\n\n const clamp = useCallback(\n (px: number) => {\n let next = px;\n if (typeof minWidth === \"number\") next = Math.max(minWidth, next);\n if (typeof maxWidth === \"number\") next = Math.min(maxWidth, next);\n return next;\n },\n [minWidth, maxWidth],\n );\n\n const startDrag = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n event.preventDefault();\n const docEl = document.documentElement;\n const startX = event.clientX;\n const startWidth = innerRef.current?.getBoundingClientRect().width ?? 0;\n docEl.setAttribute(\"data-resizing\", \"\");\n\n const onMove = (ev: PointerEvent) => {\n const next = clamp(startWidth + (ev.clientX - startX));\n docEl.style.setProperty(widthVar, `${next}px`);\n };\n const onUp = () => {\n window.removeEventListener(\"pointermove\", onMove);\n window.removeEventListener(\"pointerup\", onUp);\n docEl.removeAttribute(\"data-resizing\");\n const committed = parseFloat(docEl.style.getPropertyValue(widthVar));\n if (!Number.isNaN(committed)) onWidthCommit?.(committed);\n };\n window.addEventListener(\"pointermove\", onMove);\n window.addEventListener(\"pointerup\", onUp);\n },\n [clamp, widthVar, onWidthCommit],\n );\n\n // Double-click resets to the default width and reports the measured px.\n const resetWidth = useCallback(() => {\n document.documentElement.style.setProperty(widthVar, defaultWidth);\n const px = innerRef.current?.getBoundingClientRect().width;\n if (px) onWidthCommit?.(px);\n }, [widthVar, defaultWidth, onWidthCommit]);\n\n return (\n <aside\n ref={setRefs}\n className={cx(styles.sidebar, className)}\n data-folded={isFolded ? \"true\" : \"false\"}\n style={{ [\"--shell-sidebar-width\" as string]: `var(${widthVar}, ${defaultWidth})`, ...style }}\n {...rest}\n >\n <div className={styles.sidebarInner}>{children}</div>\n {resizable ? (\n <div\n role=\"separator\"\n aria-orientation=\"vertical\"\n aria-label=\"Resize sidebar\"\n tabIndex={0}\n className={styles.resizeHandle}\n onPointerDown={startDrag}\n onDoubleClick={resetWidth}\n />\n ) : null}\n </aside>\n );\n});\n(AppShellSidebar as { [ROLE]?: ShellRole })[ROLE] = \"drawer\";\n\n// ---------------------------------------------------------------------------\n// SingleSidebar — the \"one sidebar\" shell variant: a single full-height,\n// collapsible sidebar (nav + contextual content together) flush against the\n// content pane, instead of the Rail + contextual-Sidebar split. Frosted glass\n// over the aurora by default (`--shell-region-glass` + blur) or an opaque solid\n// surface (`--surface-s1`); a divider separates it from Main and the Root's\n// rounded card clips its outer corners. The consumer fills it with content\n// (brand, nav, projects, a pinned `mt-auto` footer) and reads `collapsed` to\n// render icon-only when narrow — this component owns only the panel chrome +\n// the collapse WIDTH. Pair with `--shell-main-backdrop` on Main to keep the\n// content pane opaque while the sidebar is glass (or the inverse).\n// ---------------------------------------------------------------------------\n\nexport interface AppShellSingleSidebarProps extends HTMLAttributes<HTMLElement> {\n /** Frosted glass over the aurora (true, default) or an opaque solid surface. */\n glass?: boolean;\n /** Collapsed (icon-only) width. Falls back to the Provider's sidebarFolded. */\n collapsed?: boolean;\n /** Expanded width in px. Default 232. */\n expandedWidth?: number;\n /** Collapsed width in px. Default 64. */\n collapsedWidth?: number;\n}\n\nconst AppShellSingleSidebar = forwardRef<HTMLElement, AppShellSingleSidebarProps>(\n function AppShellSingleSidebar(\n {\n glass = true,\n collapsed,\n expandedWidth = 232,\n collapsedWidth = 64,\n children,\n className,\n style,\n \"aria-label\": ariaLabel,\n ...rest\n },\n ref,\n ) {\n const ctx = useContext(AppShellContext);\n const isCollapsed = collapsed ?? ctx?.sidebarFolded ?? false;\n return (\n <aside\n ref={ref}\n className={cx(styles.singleSidebar, className)}\n data-glass={glass ? \"true\" : \"false\"}\n data-collapsed={isCollapsed ? \"true\" : \"false\"}\n aria-label={ariaLabel ?? \"Sidebar\"}\n style={{ width: isCollapsed ? collapsedWidth : expandedWidth, ...style }}\n {...rest}\n >\n {children}\n </aside>\n );\n },\n);\n(AppShellSingleSidebar as { [ROLE]?: ShellRole })[ROLE] = \"drawer\";\n\n// ---------------------------------------------------------------------------\n// SidebarToggle — the header chrome button that folds/unfolds the Sidebar.\n// Ported from the nous header fold toggle (28px icon-only button, panel-layout\n// glyph, --shell-chrome-hover-bg hover). Controlled via `folded` /\n// `onFoldedChange`, falling back to the Provider. Deliberately owns NO\n// keyboard shortcut and NO persistence — those stay in the consumer.\n// ---------------------------------------------------------------------------\n\nconst SidebarToggleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" width={16} height={16} {...props}>\n <path stroke=\"currentColor\" strokeWidth={1.5} d=\"M2.5 9h19M8 21.5V9\" />\n <path\n stroke=\"currentColor\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n d=\"M5.5 21.5h13a3 3 0 0 0 3-3v-13a3 3 0 0 0-3-3h-13a3 3 0 0 0-3 3v13a3 3 0 0 0 3 3Z\"\n />\n </svg>\n);\n\nexport interface AppShellSidebarToggleProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n /** Controlled fold state. Falls back to the Provider. */\n folded?: boolean;\n /** Receives the next fold state. Falls back to the Provider. */\n onFoldedChange?: (folded: boolean) => void;\n}\n\nconst AppShellSidebarToggle = forwardRef<HTMLButtonElement, AppShellSidebarToggleProps>(\n function AppShellSidebarToggle(\n { folded, onFoldedChange, className, onClick, \"aria-label\": ariaLabel, ...rest },\n ref,\n ) {\n const ctx = useContext(AppShellContext);\n const isFolded = folded ?? ctx?.sidebarFolded ?? false;\n const setFolded = onFoldedChange ?? ctx?.setSidebarFolded;\n return (\n <button\n ref={ref}\n type=\"button\"\n className={cx(styles.sidebarToggle, className)}\n aria-label={ariaLabel ?? \"Toggle sidebar\"}\n aria-expanded={!isFolded}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) setFolded?.(!isFolded);\n }}\n {...rest}\n >\n <SidebarToggleIcon aria-hidden=\"true\" />\n </button>\n );\n },\n);\n\n// ---------------------------------------------------------------------------\n// Main — header bar, scrollable content, footer. Renders a backdrop underlay\n// (region glass, or a frosted custom background image when `backgroundCss` is\n// supplied). Header/MainFooter children are pulled to the top/bottom; the rest\n// becomes the scroll container (carries `data-main-container` + a container\n// query for portal-targeting parity).\n// ---------------------------------------------------------------------------\n\nexport interface AppShellMainProps extends HTMLAttributes<HTMLElement> {\n /** A CSS `background` value painted behind the frost layer. */\n backgroundCss?: string;\n}\n\nconst AppShellMain = forwardRef<HTMLElement, AppShellMainProps>(function AppShellMain(\n { backgroundCss, children, className, ...rest },\n ref,\n) {\n let header: ReactNode = null;\n let footer: ReactNode = null;\n const content: ReactNode[] = [];\n Children.forEach(children, (child) => {\n const role = roleOf(child);\n if (role === \"header\") header = child;\n else if (role === \"footer\") footer = child;\n else content.push(child);\n });\n\n return (\n <section ref={ref} className={cx(styles.main, className)} {...rest}>\n <div className={styles.mainBackdrop} aria-hidden=\"true\">\n {backgroundCss ? (\n <>\n <div className={styles.mainBackdropImage} style={{ background: backgroundCss }} />\n <div className={styles.mainBackdropFrost} />\n </>\n ) : null}\n </div>\n {header}\n <div className={styles.mainContent} data-main-container=\"\">\n {content}\n </div>\n {footer}\n </section>\n );\n});\n\n// ---------------------------------------------------------------------------\n// Header — full-width 3-region bar. Left/right take flex-1 on desktop so the\n// center stays centered; on mobile they shrink to a 10% basis.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellHeaderProps extends HTMLAttributes<HTMLElement> {\n left?: ReactNode;\n center?: ReactNode;\n right?: ReactNode;\n /**\n * Full-width custom content. When provided, the 3-region (left/center/right)\n * layout is bypassed and `children` fill the bar — for consumers that want to\n * align the header's inner content to their own page container instead of the\n * centered-center layout.\n */\n children?: ReactNode;\n}\n\nconst AppShellHeader = forwardRef<HTMLElement, AppShellHeaderProps>(function AppShellHeader(\n { left, center, right, children, className, ...rest },\n ref,\n) {\n return (\n <header ref={ref} className={cx(styles.header, className)} {...rest}>\n {children != null ? (\n children\n ) : (\n <>\n <div className={styles.headerLeft}>{left}</div>\n <div className={styles.headerCenter}>{center}</div>\n <div className={styles.headerRight}>{right}</div>\n </>\n )}\n </header>\n );\n});\n(AppShellHeader as { [ROLE]?: ShellRole })[ROLE] = \"header\";\n\n// ---------------------------------------------------------------------------\n// MainFooter — pinned below the scroll area.\n// ---------------------------------------------------------------------------\n\nexport type AppShellMainFooterProps = HTMLAttributes<HTMLElement>;\n\nconst AppShellMainFooter = forwardRef<HTMLElement, AppShellMainFooterProps>(\n function AppShellMainFooter({ className, children, ...rest }, ref) {\n return (\n <footer ref={ref} className={cx(styles.mainFooter, className)} {...rest}>\n {children}\n </footer>\n );\n },\n);\n(AppShellMainFooter as { [ROLE]?: ShellRole })[ROLE] = \"footer\";\n\n// ---------------------------------------------------------------------------\n// Compound export.\n// ---------------------------------------------------------------------------\n\nexport const AppShell = Object.assign(AppShellRoot, {\n Root: AppShellRoot,\n Rail: AppShellRail,\n RailItem: AppShellRailItem,\n Sidebar: AppShellSidebar,\n SingleSidebar: AppShellSingleSidebar,\n SidebarToggle: AppShellSidebarToggle,\n Main: AppShellMain,\n Header: AppShellHeader,\n MainFooter: AppShellMainFooter,\n Provider: AppShellProvider,\n});\n\nexport {\n AppShellRoot,\n AppShellRail,\n AppShellRailItem,\n AppShellSidebar,\n AppShellSingleSidebar,\n AppShellSidebarToggle,\n AppShellMain,\n AppShellHeader,\n AppShellMainFooter,\n AppShellProvider,\n};\n"],"names":["content","arrow","styles","v","AnimatedBorder","iconOnly","fullWidth","Button","disabled","responsiveHideText","ring","Input","label","hint","error","trailing","Badge","dot","RadioGroup","value","legend","Radio","description","Switch","root","Select","RS","opt","d","f","DatePicker","formatDate","DateRangePicker","Modal","trigger","title","footer","RT","Toast","action","Banner","icon","actions","Skeleton","clamp","n","Progress","indeterminate","Spinner","Textarea","SvgChevronDownSmall","active","FeedbackThumbs","Composer","sendLabel","sendIcon","attachments","text","e","ComposerChip","caret","SvgX","chip","DropdownMenuContent","DropdownMenuItem","shortcut","DropdownMenuCheckboxItem","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuSubTrigger","DropdownMenuSubContent","Accordion","AccordionItem","AccordionTrigger","AccordionContent","Collapsible","C","CollapsibleTrigger","CollapsibleContent","ScrollArea","fill","viewport","y","x","a","b","s","h","SvgChevronUp","ScrollableListSection","header","Slider","i","AlertDialogContent","AlertDialogFooter","indicator","list","TabsTrigger","Table","caption","Th","numeric","Td","Thead","Tbody","Tr","Avatar","status","AvatarStack","AvatarChip","EmptyState","Card","interactive","CardHeader","CardBody","CardFooter","CardTitle","CardDescription","t","SearchInput","clear","SvgLoader","SvgSearch","SvgCancel","cx","Check","Copy","ChevronRight","count","ArrowRight","List","dividers","bordered","density","ListItem","leading","Text","Tag","nowrap","InteractiveStateless","InteractiveStateful","InteractiveContainer","InteractiveFoldable","Disabled","wrapper","HoverableRoot","group","HoverableItem","ExpandableButton","SvgExternalLink","ContentXl","SvgEdit","ContentLg","SvgAlertCircle","SvgAlertTriangle","SvgXOctagon","ContentMd","tag","ContentSm","Content","ContentAction","Label","InputErrorText","InputVertical","InputHorizontal","InputDivider","InputPadder","SvgCheckCircle","MessageCard","ColoredIcon","EmptyMessageCard","SvgBoxes","IllustrationContent","AccountMenu","close","item","Fragment","SvgArrowLeft","AppShellRoot","AppShellRail","AppShellRailItem","AppShellSidebar","AppShellSingleSidebar","glass","AppShellSidebarToggle","AppShellMain","AppShellHeader","AppShellMainFooter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,MAAM,kBAAkB,CAAC;AAAA,EAC9B;AAAA,EACA,gBAAgB;AAAA,EAChB,oBAAoB;AACtB,0BAKG,GAAG,UAAH,EAAY,eAA8B,mBACxC,SAAA,CACH;AAGK,SAAS,QAAQ;AAAA,EACtB,SAAAA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,UAAU;AAAA,EACV,OAAAC;AAAA,EACA;AACF,GAAiB;AACf,MAAID,aAAY,OAAW,QAAO,oBAAA,UAAA,EAAG,UAAS;AAC9C,QAAM,YAAYC,UAAS,YAAY;AACvC,QAAM,iBAAiB;AAAA,IACrBC,SAAO;AAAA,IACP,YAAY,SAASA,SAAO,OAAO;AAAA,IACnC;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SACE;AAAA,IAAC,GAAG;AAAA,IAAH;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAAA,oBAAC,GAAG,SAAH,EAAW,SAAO,MAAE,UAAS;AAAA,QAC9B,oBAAC,GAAG,QAAH,EACC,UAAA,qBAAC,GAAG,SAAH,EAAW,MAAY,OAAc,YAAwB,WAAW,gBACtE,UAAA;AAAA,UAAA,UAAUF,QAAO,IAAI,WAAWA,Q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