@discuss-ds/ui 0.8.2 → 0.9.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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/components/Buttons & Actions/Button.tsx","../src/lib/utils.ts","../src/components/Buttons & Actions/Switch.tsx","../src/components/Buttons & Actions/Toggle.tsx","../src/components/Conversation & AI Chat/AIMiniAvatar.tsx","../src/components/Conversation & AI Chat/aiGlyphPaths.ts","../src/components/Conversation & AI Chat/AIResponseContainer.tsx","../src/components/Conversation & AI Chat/AskAiToggle.tsx","../src/components/Conversation & AI Chat/ChatChoices.tsx","../src/components/Forms & Data Entry/Checkbox.tsx","../src/components/Forms & Data Entry/Label.tsx","../src/components/Forms & Data Entry/RadioGroup.tsx","../src/components/Conversation & AI Chat/ChatInput.tsx","../src/components/Conversation & AI Chat/FileAttachment.tsx","../src/components/Conversation & AI Chat/ProjectSelector.tsx","../src/components/Overlays & Feedback/DropdownMenu.tsx","../src/components/Conversation & AI Chat/Timestamp.tsx","../src/components/Conversation & AI Chat/TopicCard.tsx","../src/components/Conversation & AI Chat/UserMessageBubble.tsx","../src/components/Forms & Data Entry/Calendar.tsx","../src/components/Forms & Data Entry/DateTimePicker.tsx","../src/components/Forms & Data Entry/Field.tsx","../src/components/Forms & Data Entry/formatDateTime.ts","../src/components/Forms & Data Entry/TimePicker.tsx","../src/components/Navigation/TabItem.tsx","../src/components/Navigation/TabNavigation.tsx","../src/components/Forms & Data Entry/Form.tsx","../src/components/Forms & Data Entry/InlineEdit.tsx","../src/components/Forms & Data Entry/Input.tsx","../src/components/Forms & Data Entry/InputWithAction.tsx","../src/components/Forms & Data Entry/NumberInput.tsx","../src/components/Forms & Data Entry/SearchBar.tsx","../src/components/Forms & Data Entry/Select.tsx","../src/components/Forms & Data Entry/Slider.tsx","../src/components/Forms & Data Entry/Textarea.tsx","../src/components/Overlays & Feedback/Dialog.tsx","../src/components/Overlays & Feedback/Toast.tsx","../src/components/Overlays & Feedback/Tooltip.tsx","../src/components/Question Types/FileUpload.tsx","../src/components/Tags & Badges/Tag.tsx","../src/components/Question Types/Media.tsx","../src/components/Question Types/OpenEndAnswer.tsx","../src/components/Question Types/QuestionCard.tsx","../src/components/Question Types/QuestionEditorCard.tsx","../src/components/Question Types/QuestionHeader.tsx","../src/components/Question Types/QuestionNavItem.tsx","../src/components/Question Types/QuestionTypeIcon.tsx","../src/components/Question Types/QuestionOption.tsx","../src/components/Question Types/RankList.tsx","../src/components/Question Types/RatingScale.tsx","../src/components/Question Types/StimulusCard.tsx","../src/components/Data Display/Progress.tsx","../src/components/Data Display/Table.tsx","../src/components/Data Display/StatCard.tsx","../src/components/Research-Specific/ActivityStructure.tsx","../src/components/Tags & Badges/EditableTag.tsx","../src/components/Tags & Badges/Badge.tsx","../src/components/Utility/Pagination.tsx"],"sourcesContent":["// Public component exports.\n//\n// Each implemented component is re-exported here from its folder under\n// src/components/<Section>/<Component>. See ../../../.context/COMPONENT_STATUS.md\n// for the build queue and ../../../.context/COMPONENT_CONTRACTS.md for the\n// export-barrel convention components must follow once they land here.\nexport * from './components/Buttons & Actions';\nexport * from './components/Conversation & AI Chat';\nexport * from './components/Forms & Data Entry';\nexport * from './components/Navigation';\nexport * from './components/Overlays & Feedback';\nexport * from './components/Question Types';\nexport * from './components/Data Display';\nexport * from './components/Research-Specific';\nexport * from './components/Tags & Badges';\nexport * from './components/Utility';\n","import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\nconst subtle =\n 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground hover:bg-accent-soft hover:bg-none hover:text-accent-soft-foreground disabled:bg-muted disabled:bg-none disabled:text-muted-foreground';\n\n// Figma: Buttons (13) + Button Small/Reaction (16). Disabled is a flat 50%\n// opacity for every type; the hover fill is `accent-soft` everywhere except\n// primary (`primary-hover`) and destructive (a 10% black overlay).\nconst buttonVariants = cva(\n 'inline-flex shrink-0 items-center justify-center whitespace-nowrap text-ui-label transition-colors disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'bg-primary text-label hover:bg-primary-hover',\n subtle,\n // Alias of `subtle`, kept so existing consumers don't break.\n secondary: subtle,\n destructive: 'bg-destructive text-label hover:bg-destructive-hover',\n outline:\n 'border border-border bg-surface text-surface-foreground hover:border-input hover:bg-accent-soft hover:text-accent-soft-foreground disabled:bg-transparent disabled:border-input disabled:text-muted-foreground',\n ghost:\n 'text-surface-foreground hover:bg-accent-soft hover:text-accent-soft-foreground disabled:text-muted-foreground',\n link: 'text-surface-foreground underline hover:text-accent-foreground',\n },\n size: {\n md: 'h-10 min-w-10 gap-2.5 rounded-md px-4 py-2',\n sm: 'h-8 min-w-8 gap-1 rounded-sm px-2.5 py-1.5',\n lg: 'h-12 gap-2.5 rounded-md px-6 py-3 text-ui-label-large',\n icon: 'size-10 rounded-md p-0',\n 'icon-sm': 'size-8 rounded-sm p-0',\n },\n },\n compoundVariants: [\n // Primary icon-only is a circle at 40px (and a rounded square at 32px).\n { variant: 'default', size: 'icon', className: 'rounded-full' },\n {\n variant: 'default',\n size: ['icon', 'icon-sm'],\n className: 'disabled:border disabled:border-border disabled:bg-transparent disabled:text-muted-foreground disabled:opacity-100',\n },\n // Destructive icon-only drops the fill and tints the glyph instead.\n {\n variant: 'destructive',\n size: ['icon', 'icon-sm'],\n className: 'bg-transparent text-destructive hover:bg-destructive-soft-hover',\n },\n { variant: 'outline', size: ['icon', 'icon-sm'], className: 'disabled:border-border' },\n // Links have no box of their own.\n { variant: 'link', className: 'rounded-md bg-transparent px-4' },\n ],\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /**\n * Render `props.children` into the child element instead of wrapping it in\n * a `<button>` (Radix `Slot`) — lets consumers compose e.g.\n * `<Button asChild><a href=\"...\">Label</a></Button>` without double-wrapping.\n * The ref then targets whatever element the child renders, not necessarily\n * an `HTMLButtonElement`.\n */\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot.Root : 'button';\n return <Comp ref={ref} className={cn(buttonVariants({ variant, size }), className)} {...props} />;\n },\n);\nButton.displayName = 'Button';\n","import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n// tailwind-merge only knows Tailwind's built-in class names. Without these\n// registrations it reads our composite type styles (`text-ui-label`) as a text\n// *colour* — so a later `text-surface-foreground` silently drops the type\n// style — and `bg-linear-to-r` (Tailwind v4) as a background colour, dropping\n// `bg-secondary`.\nconst twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n 'font-size': [\n {\n text: [\n 'heading-h1',\n 'heading-h2',\n 'heading-h3',\n 'heading-h4',\n 'body-section',\n 'body-base',\n 'body-small',\n 'body-xs',\n 'body-xxs',\n 'ui-label',\n 'ui-label-large',\n 'ui-badge',\n 'ui-caption',\n 'ui-overline',\n 'ui-code',\n 'ui-placeholder',\n 'ui-input-value',\n ],\n },\n ],\n 'bg-image': [{ 'bg-linear': ['to-t', 'to-tr', 'to-r', 'to-br', 'to-b', 'to-bl', 'to-l', 'to-tl'] }],\n },\n },\n});\n\n/**\n * Merge class lists, resolving Tailwind class conflicts so a consumer-supplied\n * `className` always wins over an internal default. See COMPONENT_CONTRACTS.md.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from 'react';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport type SwitchProps = React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>;\n\n// Figma: Toggle / Switch (17) — 44×24 track, 20px white thumb. Off is `muted`, on is the accent.\nexport const Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitive.Root>, SwitchProps>(\n ({ className, ...props }, ref) => (\n <SwitchPrimitive.Root\n ref={ref}\n className={cn(\n 'inline-flex h-6 w-11 shrink-0 items-center rounded-full p-0.5 transition-colors',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Brand override: selected controls use `ring`, not `primary`/`accent`.\n 'data-[state=checked]:bg-ring data-[state=unchecked]:bg-muted',\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n className={cn(\n 'block size-5 rounded-full bg-surface shadow-sm transition-transform',\n 'data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0',\n )}\n />\n </SwitchPrimitive.Root>\n ),\n);\nSwitch.displayName = 'Switch';\n","import * as React from 'react';\nimport { Toggle as TogglePrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport type ToggleProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>;\n\n// Figma: Toggle / Switch (17) › Toggle menu — a 40px square icon button that fills with `secondary` when pressed.\nexport const Toggle = React.forwardRef<React.ElementRef<typeof TogglePrimitive.Root>, ToggleProps>(\n ({ className, ...props }, ref) => (\n <TogglePrimitive.Root\n ref={ref}\n className={cn(\n 'inline-flex size-10 shrink-0 items-center justify-center rounded-md text-surface-foreground transition-colors',\n 'hover:bg-accent-soft hover:text-accent-soft-foreground',\n 'data-[state=on]:bg-secondary data-[state=on]:hover:bg-accent-soft',\n 'disabled:pointer-events-none disabled:opacity-50',\n className,\n )}\n {...props}\n />\n ),\n);\nToggle.displayName = 'Toggle';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { AI_GLYPH_THINKING, AI_GLYPH_WORKING } from './aiGlyphPaths';\n\nexport type AIStatus = 'idle' | 'thinking' | 'executing' | 'working';\n\nconst defaultLabel: Record<Exclude<AIStatus, 'idle'>, string> = {\n thinking: 'Thinking...',\n executing: 'Executing...',\n working: 'Working on it...',\n};\n\nexport interface AIMiniAvatarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** `idle` shows only the mark; the others add a status line next to it. */\n status?: AIStatus;\n /** Override the status text. */\n label?: React.ReactNode;\n /** Elapsed time shown after the label while `working` (e.g. \"45 s\"). */\n elapsed?: React.ReactNode;\n}\n\n// Figma: AI Mini Avatar (57) › AI feedback — the accent squiggle mark with an optional status line.\nexport const AIMiniAvatar = React.forwardRef<HTMLDivElement, AIMiniAvatarProps>(\n ({ className, status = 'idle', label, elapsed, ...props }, ref) => {\n const glyph = status === 'working' ? AI_GLYPH_WORKING : AI_GLYPH_THINKING;\n const busy = status !== 'idle';\n return (\n <div\n ref={ref}\n role=\"status\"\n aria-live=\"polite\"\n className={cn('flex items-center gap-2.5', className)}\n {...props}\n >\n <svg\n aria-hidden=\"true\"\n viewBox={glyph.viewBox}\n fill=\"none\"\n className={cn(\n 'h-5.75 shrink-0 fill-accent',\n status === 'working' ? 'w-5' : 'w-5.25',\n busy && 'motion-safe:animate-pulse',\n )}\n >\n <path d={glyph.d} />\n </svg>\n {busy && (\n <span\n className={cn(\n 'text-ui-caption whitespace-nowrap',\n status === 'executing'\n ? 'bg-linear-to-r from-secondary-muted-foreground to-secondary-muted-foreground/40 bg-clip-text text-transparent'\n : 'text-secondary-muted-foreground',\n )}\n >\n {label ?? defaultLabel[status]}\n </span>\n )}\n {status === 'working' && elapsed != null && (\n <>\n <span aria-hidden=\"true\" className=\"size-0.5 rounded-full bg-secondary-muted-foreground\" />\n <span className=\"text-ui-caption whitespace-nowrap text-secondary-muted-foreground\">{elapsed}</span>\n </>\n )}\n </div>\n );\n },\n);\nAIMiniAvatar.displayName = 'AIMiniAvatar';\n","// Hand-off from Figma (AI feedback › AI assistant): the squiggle mark shown while the assistant works.\n// The path data is the exported vector, unmodified.\nexport const AI_GLYPH_THINKING = {\n viewBox: '0 0 23.5102 10.31',\n d: 'M20.7764 6.13895C20.8091 6.08935 20.9139 6.07477 20.9653 6.02535C21.1265 5.87047 21.227 5.79769 21.3523 5.6889L21.3349 5.70985C21.3757 5.67187 21.4194 5.629 21.4687 5.57648C21.7621 5.26894 22.4786 4.16096 22.8403 4.43013C22.8403 4.43014 22.8403 4.43014 22.8403 4.43015C22.8438 4.43279 22.8474 4.43556 22.8508 4.43847C22.9168 4.49352 22.9251 4.63928 22.993 4.71056C23.061 4.78185 23.5711 5.14655 23.5041 5.29532C23.4036 5.50831 22.9412 5.85678 22.8715 5.95956C22.8242 6.02999 22.8059 6.14803 22.7475 6.24057C22.6464 6.40032 22.5565 6.50906 22.4809 6.62923C22.4785 6.632 22.4718 6.64062 22.4693 6.64331C22.3989 6.74734 22.341 6.85851 22.2892 7.02244C22.1391 7.06575 21.9883 7.10631 21.8375 7.14262C21.7434 7.29292 21.476 7.39415 21.4003 7.4664C21.3382 7.52673 21.3404 7.6092 21.2705 7.66966C21.2189 7.71436 21.1282 7.74838 21.0302 7.79812C21.0228 7.80313 21.0008 7.8182 20.9928 7.8224C20.9494 7.83706 20.9028 7.85865 20.856 7.89199C20.6266 8.05556 20.6529 8.23489 20.4981 8.34362C20.4171 8.3997 20.2989 8.44071 20.1779 8.48367C20.0629 8.52373 19.9434 8.57023 19.8501 8.64564C19.8314 8.67452 19.8127 8.70339 19.7937 8.73228C19.83 8.76183 19.8664 8.79129 19.9028 8.82072C19.8037 8.88716 19.7221 8.82963 19.622 8.8719C19.5039 8.92146 19.4745 9.02208 19.3928 9.05557C19.3259 9.0829 19.2105 9.05922 19.1237 9.09701C18.9965 9.1516 19.0573 9.22895 18.9919 9.2717C18.9722 9.29205 18.4308 9.51795 18.3887 9.52197C18.1304 9.58812 18.0801 9.46546 17.8631 9.48595C17.8361 9.48814 17.8091 9.4903 17.782 9.49237C17.3207 9.52161 16.8743 9.67817 16.3789 9.7352C16.285 9.7455 16.1851 9.74966 16.0822 9.74684C15.9622 9.74345 15.8411 9.73294 15.7225 9.71759C16.0452 9.39607 15.3567 9.12062 15.6025 9.64387C15.3808 9.56394 15.2157 9.69807 14.9941 9.66267C14.8498 9.63874 14.7566 9.5627 14.5364 9.54137C14.3208 9.51495 14.0878 9.5587 13.7616 9.41848C13.6405 9.36165 13.5631 9.27393 13.5919 9.09969C13.4354 9.05602 13.2983 8.98697 13.1658 8.92556C13.0992 8.89457 13.0342 8.86595 12.9619 8.83793C12.8815 8.79834 12.8349 8.81997 12.6347 8.66553C12.5818 8.65788 12.5185 8.66138 12.4458 8.68578C12.3597 8.6238 12.3017 8.26898 12.2414 8.14791C12.1605 8.05685 11.7146 7.13701 11.7091 6.94414C11.7083 6.94093 11.7074 6.93768 11.7065 6.93438C11.6552 6.75979 11.6158 6.47257 11.5821 6.33303C11.5388 6.16728 11.1933 5.9876 11.6352 5.69928C11.6536 5.50058 11.6924 5.35814 11.7614 5.21539C11.7996 5.14267 11.8487 5.06108 11.9231 4.94138C11.9508 4.89665 12.0069 4.91427 12.0188 4.88607C12.0432 4.82851 12.0458 4.71199 12.0891 4.60378C12.1604 4.42562 12.3223 4.38132 12.1443 4.31661C12.1745 4.18591 12.2099 4.05361 12.2533 3.91918C12.3093 3.89617 12.3653 3.87434 12.4217 3.85356C12.4277 3.77084 12.4368 3.68676 12.4498 3.60124C12.6122 3.82914 12.8149 3.31965 12.5882 3.35167C12.6971 3.26408 12.8129 3.18134 12.936 3.10694C13.0432 3.05147 13.1502 2.9942 13.2575 2.93523C13.445 3.18433 13.6433 2.62036 13.4965 2.52782C13.5159 2.50978 13.5359 2.49118 13.5559 2.47273C13.6468 2.43151 13.7186 2.3762 13.8101 2.30215C13.9339 2.20399 14.0605 2.08848 14.2572 2.00205C14.5866 1.86654 14.5863 1.91818 14.7383 2.00328C14.8117 1.96386 14.8906 1.92778 14.9768 1.89808C15.2046 1.61986 15.3871 1.74917 15.5554 1.87821C15.6574 1.92057 15.8644 2.08723 15.9086 2.24717C15.9561 2.38086 15.9647 2.4401 16.0174 2.50589C16.0362 2.5325 16.059 2.56113 16.0862 2.59267C15.9089 2.83438 16.1252 3.33908 16.1251 3.71466C16.1272 3.75694 16.1742 3.7651 16.1787 3.82326C16.1923 3.96864 16.0396 4.27583 16.1879 4.30844C16.1104 4.40775 16.0302 4.50104 15.9487 4.58956C15.9485 4.59211 15.9483 4.59466 15.9481 4.59722C15.9434 4.68512 15.9381 4.77303 15.9326 4.86089C15.9773 4.87807 16.0219 4.89524 16.0666 4.91242C15.8514 5.01394 15.8076 5.2888 15.7201 5.39794C15.7026 5.41968 15.6395 5.39969 15.591 5.46924C15.5342 5.55031 15.482 5.72425 15.4171 5.82229C15.4664 5.89261 15.5154 5.96317 15.5642 6.03418C15.516 6.24242 15.3088 6.23112 15.2434 6.33666C15.2371 6.34685 15.1897 6.45661 15.1414 6.56252C15.1003 6.65319 15.0605 6.74017 15.0575 6.75026C14.9983 6.92736 15.1953 6.94548 14.8653 7.42471C14.8017 7.51174 14.7031 7.55363 14.6374 7.63359C14.5939 7.68676 14.5258 7.79471 14.4522 7.90588C14.359 8.0661 14.2337 8.27035 14.258 8.34435C13.9929 8.37671 13.5599 8.69876 13.4026 8.72273C13.3557 8.73114 13.3039 8.65181 13.1715 8.69189C13.1196 8.70739 13.0387 8.75964 12.9539 8.81245C12.8709 8.86549 12.783 8.9216 12.7186 8.94208C12.5852 8.98412 12.5082 8.92996 12.4483 8.94919C12.3923 8.9672 12.3668 9.04791 12.2925 9.07862C12.0591 9.1738 11.8082 9.16385 11.6213 9.23522C11.3502 9.33814 11.1776 9.60661 10.949 9.76888C10.9348 9.77067 10.9203 9.77115 10.9058 9.77095C10.8529 9.76975 10.7975 9.7598 10.7466 9.77439C9.99772 10.0005 9.00243 10.0857 8.1768 9.85282C8.13481 9.84174 8.09342 9.83033 8.0522 9.8185C7.65595 9.74342 6.84265 9.06031 6.88897 9.55865C6.80575 9.55556 6.53393 9.38444 6.29758 9.12608C6.231 9.02829 5.91504 8.73378 5.8576 8.6732C5.70806 8.5387 5.53716 8.47446 5.42743 8.35204C5.23871 8.13938 5.11803 7.9385 4.98784 7.72031C4.93094 7.62219 4.78289 7.41761 4.64906 7.18544C4.56629 7.04595 4.42492 6.92507 4.39704 6.84099C4.36359 6.73961 4.41467 6.60764 4.3839 6.48312C4.3266 6.25751 4.2228 5.90491 4.15903 5.6261C4.13709 5.5314 4.11932 5.43956 4.10919 5.36422C4.10191 5.30774 4.17499 5.27443 4.18647 5.19139C4.22915 4.86817 4.21424 4.52439 3.96715 4.59214C4.0923 4.18224 4.00781 3.80768 4.06914 3.4305C4.07049 3.42228 4.07191 3.41407 4.0734 3.40587C4.17848 2.77229 4.60265 1.62744 5.42728 1.02539C5.5388 0.936113 5.63885 0.851595 5.72033 0.774897C6.02466 0.499997 5.92843 0.404094 6.57046 0.168732C6.72019 0.118531 6.87745 0.0750992 7.10515 0.029663C7.44001 -0.0409616 8.00784 0.000885725 8.42487 0.305113C8.52342 0.370349 8.66824 0.438081 8.84918 0.507494C9.00601 0.701494 9.15341 0.965493 9.19962 1.24429C9.25461 1.59798 9.20706 1.9295 9.02072 2.15487C9.06272 2.2086 9.10331 2.26358 9.14209 2.32146C9.12853 2.38467 9.11273 2.44783 9.09564 2.50868C9.04342 2.51339 8.99124 2.51735 8.93911 2.52058C8.80099 2.92074 8.72119 3.45798 8.53257 3.73379C8.51917 3.75362 8.50452 3.77482 8.48864 3.79731C8.18299 4.22988 7.45145 5.14772 7.14208 5.47284C6.97081 5.65357 7.04778 5.72472 6.79141 5.71506C6.77155 5.76833 6.75129 5.82205 6.73113 5.87552C6.74881 5.93119 6.76688 5.98626 6.78446 6.04197C6.67655 6.19317 6.53517 6.34587 6.39918 6.49486C6.30179 6.60171 6.20676 6.7071 6.12771 6.80983C5.86753 7.16626 5.41116 7.79089 4.96904 8.10513C4.87549 8.1762 4.78037 8.24183 4.68809 8.2947C4.56491 8.36535 4.36563 8.39839 4.25536 8.48329C4.09377 8.60676 4.15002 8.76609 3.93397 8.92203C3.68203 9.10323 3.21465 9.30524 2.7946 9.44827C2.61334 9.50835 2.4488 9.5679 2.33086 9.62822C2.22328 9.68313 2.19724 9.76099 2.12265 9.80252C1.81329 9.9754 1.54922 10.089 1.27057 10.31C0.871376 10.3138 0.823743 10.1166 0.644008 9.97432C0.509878 9.86688 0.126525 9.63933 0.0856048 9.51058C0.0484623 9.42509 0.051783 9.29751 0 9.20711C0.311082 9.00323 0.527575 9.0048 0.893831 9.00304C1.355 8.7957 1.81246 8.57815 2.27037 8.35384C2.37271 8.30354 2.47492 8.24832 2.57658 8.1893C2.6503 8.2117 2.72528 8.23255 2.80124 8.252C2.8013 8.25211 2.80136 8.25221 2.80143 8.25232C3.03486 8.18581 3.03979 8.00743 3.12463 7.91046C3.36205 7.63959 3.68578 7.33424 4.07988 6.99574C4.53563 6.62516 4.89846 6.21727 5.32159 5.69439C5.74872 5.17021 6.15919 4.65793 6.46139 4.25093C6.64154 4.00919 7.13955 3.16034 7.33028 3.04133C7.34208 3.03408 7.35548 3.03074 7.36955 3.02924C7.41387 3.02544 7.46598 3.03904 7.49046 3.00739C7.70834 2.58993 7.86103 2.13779 7.83041 1.79989C7.8547 1.70941 7.86312 1.62307 7.85378 1.53151C7.87209 1.5287 7.84915 1.45435 7.69179 1.34775C7.77026 1.34362 7.49926 1.35778 7.23888 1.52474C6.97348 1.67631 6.69939 1.87603 6.42229 2.07271C6.36356 2.11454 6.30432 2.15719 6.24453 2.20056C5.85524 2.48354 5.60232 3.08823 5.49387 3.71498C5.39928 4.24892 5.42498 4.76811 5.56179 5.30683C5.73246 5.96207 5.84566 6.51339 6.19333 6.98921C6.31865 7.19227 6.46019 7.37337 6.62146 7.53296C6.79615 7.70852 6.92033 7.78019 7.25856 8.05634C7.33453 8.12545 7.42269 8.18946 7.52192 8.24799C7.75285 8.38685 8.10613 8.47857 8.4572 8.54593C8.61666 8.57713 8.77013 8.59963 8.91167 8.62268C9.08941 8.64956 9.17441 8.79085 9.4164 8.66989C9.42212 8.70681 9.42791 8.74373 9.43379 8.78063C9.65293 8.71479 9.77712 8.60908 10.021 8.54539C10.1203 8.51928 10.2997 8.46967 10.4831 8.41151C10.6699 8.35263 10.8737 8.27862 10.9746 8.24849C11.0761 8.21757 11.0641 8.29673 11.157 8.26042C11.3161 8.19806 11.6214 7.97025 11.8416 7.87728C12.0071 7.80802 12.2892 7.74718 12.4664 7.68389C12.5014 7.67152 12.5303 7.65958 12.5544 7.6466C12.9362 7.44059 13.2264 7.19551 13.4781 6.90736C13.5439 6.83289 13.5972 6.76236 13.6731 6.65907C13.7546 6.55024 13.9356 6.40299 13.9581 6.35458C14.0011 6.26124 13.9376 6.19233 13.9591 6.12514C13.9721 6.08459 13.9882 6.04256 14.0073 5.9983C14.1356 5.69579 14.4023 5.27933 14.5269 4.98849C14.6407 4.72311 14.7511 4.44958 14.8552 4.17601C14.9522 3.92097 15.0207 3.66979 15.0372 3.45937C15.0531 3.24138 15.027 3.11048 14.9379 2.78902C14.9187 2.70766 14.878 2.57482 14.9201 2.69356C14.9293 2.78057 15.2047 3.01121 15.3025 3.00426C15.3103 3.005 15.2823 2.99694 15.209 3.02009C15.1006 3.05115 14.8991 3.17087 14.6896 3.3475C14.4622 3.54526 14.1241 3.87681 13.8343 4.11513C13.7102 4.21459 13.5954 4.34064 13.4984 4.45314C13.4195 4.54661 13.3558 4.46837 13.2997 4.56139C13.2381 4.66643 13.2646 4.75718 13.2429 4.81048C13.1582 5.0115 13.0582 5.33059 12.8983 5.73083C12.8528 5.84656 12.829 6.11681 12.8105 6.25296C12.8013 6.311 12.7318 6.36264 12.7373 6.39885C12.74 6.41716 12.7967 6.44932 12.8133 6.49994C12.8239 6.53247 12.835 6.56327 12.8464 6.59222C13.0113 6.99361 13.2145 7.29577 13.6284 7.75962C13.6287 7.75995 13.629 7.76028 13.6292 7.7606C13.5327 7.66867 13.5735 7.71591 13.5864 7.71996C13.6067 7.73297 13.6364 7.74994 13.6682 7.76708C13.7325 7.8017 13.8061 7.838 13.8819 7.87409C14.0342 7.94645 14.1967 8.01873 14.3624 8.09149C14.4295 8.12341 14.8213 8.16242 15.1241 8.16799C15.4466 8.17777 15.7837 8.17904 16.12 8.1862C16.4042 8.19173 16.7364 8.16186 17.0675 8.14113C17.3555 8.12227 17.5732 8.24796 17.6136 8.24221C17.625 8.2406 17.6357 8.23751 17.6461 8.23323C17.7042 8.20464 17.7441 8.12089 17.8688 8.07355C18.3421 7.89885 19.1022 7.67963 19.5971 7.39003C19.6136 7.38042 19.6303 7.37015 19.6473 7.35931C19.8747 7.2155 20.0413 6.98443 20.2828 6.80153C20.3065 6.7842 20.3357 6.76481 20.3699 6.74391L20.298 6.79064C20.4619 6.66741 20.7621 6.44192 20.7839 6.34931C20.7993 6.28776 20.7412 6.19318 20.7764 6.13895ZM14.3029 9.42491C14.3405 9.34309 14.2314 9.3194 14.1139 9.3164C13.9993 9.31488 13.861 9.3268 13.9789 9.41542C14.0391 9.45982 14.2868 9.46988 14.3029 9.42491ZM9.59175 9.70184C9.60097 9.75063 9.61033 9.7994 9.61981 9.84815C9.67917 9.8212 9.73753 9.79318 9.79481 9.76425C9.75681 9.73961 9.71928 9.71456 9.68227 9.6891C9.65216 9.69362 9.62202 9.69787 9.59175 9.70184Z',\n} as const;\n\nexport const AI_GLYPH_WORKING = {\n viewBox: '0 0 21.6653 7.31887',\n d: 'M21.5195 2.20094C21.5632 2.27281 21.5435 2.40302 21.5694 2.49163C21.6275 2.6923 21.6417 2.82523 21.6527 2.95596C21.6564 2.97027 21.6628 3.01397 21.6653 3.02853C21.6641 3.13693 21.6598 3.24436 21.6586 3.38773C21.6816 3.85362 21.6618 5.13496 21.204 5.07451C21.204 5.0745 21.204 5.0745 21.204 5.0745C21.1996 5.074 21.1952 5.07338 21.1907 5.07263C21.1061 5.05815 21.0241 4.94601 20.929 4.92104C20.8337 4.89639 20.2098 4.84129 20.1872 4.70468C20.162 4.5075 20.3424 4.05165 20.3322 3.94693C20.3275 3.87626 20.2696 3.79112 20.2564 3.70362C20.2253 3.50095 20.228 3.36832 20.1618 3.22753L20.1705 3.27725C20.1408 3.22743 20.1002 3.17862 20.0419 3.13125C20.0967 3.02469 20.1456 2.91373 20.1862 2.79711C20.1085 2.70121 20.1178 2.49436 20.0701 2.43438C20.0329 2.38632 19.9603 2.39539 19.9218 2.35006C19.8787 2.3002 19.8633 2.1732 19.7612 2.09203C19.7034 2.0461 19.6466 2.03107 19.595 2.02843L19.7627 2.11426C19.6671 2.14605 19.6042 2.2088 19.5173 2.20366C19.3811 2.19547 19.1788 2.06914 18.9898 2.10943C18.9652 2.12544 18.9407 2.1416 18.9163 2.1579C18.9287 2.20111 18.9406 2.24436 18.9521 2.28762C18.8618 2.29819 18.8311 2.20964 18.7478 2.20237C18.6497 2.19419 18.5963 2.27357 18.5308 2.27097C18.4776 2.26885 18.4048 2.20215 18.3342 2.20612C18.2309 2.21188 18.2544 2.30623 18.2002 2.32458C18.1776 2.32896 17.7784 2.40078 17.7565 2.40615C17.5856 2.42463 17.557 2.29863 17.4163 2.30438C17.0252 2.32264 16.6544 2.50901 16.341 2.64771C16.2001 2.7096 16.0505 2.75491 15.9061 2.79231C16.0092 2.39243 15.4001 2.37041 15.7957 2.76269C15.7449 2.76246 15.7042 2.7768 15.67 2.79808C15.5564 2.86487 15.4802 2.97434 15.3466 3.01614C15.2272 3.05323 15.1197 3.02273 14.9627 3.09457C14.6814 3.2228 14.4809 3.53873 14.2487 3.24296C13.9703 3.44596 13.6586 3.47244 13.7401 3.80561C13.6873 3.86035 13.4234 3.80763 13.3424 3.84086C13.2469 3.85834 12.8209 4.21338 12.8015 4.30503C12.7577 4.37886 12.704 4.52293 12.7165 4.60386C12.7165 4.60456 12.7165 4.60525 12.7166 4.60594C12.7245 4.73675 13.038 4.86932 12.6198 5.00545C12.6218 5.24087 12.6062 5.31289 12.5709 5.505C12.5653 5.5391 12.5078 5.54892 12.51 5.56912C12.5148 5.61101 12.5679 5.67144 12.5899 5.73138C12.625 5.82708 12.5422 5.92847 12.7068 5.83917C12.7265 5.85366 12.7463 5.86629 12.7663 5.87733C12.8032 5.90096 12.8414 5.92124 12.8766 5.93338C12.8592 5.96968 12.8434 6.00666 12.8291 6.04399C12.8751 6.0348 12.9151 6.01504 12.9349 5.9805C12.8531 6.08998 12.8602 6.12516 12.8542 6.09438C12.8536 6.06287 12.7741 5.97616 12.8523 5.90639C12.814 5.91011 12.7686 5.91968 12.7291 5.93658C12.8704 5.95935 13.0187 5.97102 13.1668 5.97103C13.2458 6.27758 13.5375 5.8631 13.4165 5.7269C13.4322 5.71942 13.4481 5.7116 13.4633 5.70383C13.6382 5.70301 13.7156 5.57219 13.8729 5.49571C14.0312 5.4108 14.0391 5.43683 14.1889 5.47644C14.2098 5.43405 14.2279 5.39151 14.2438 5.3483C14.0282 5.01309 14.4813 5.23839 14.467 4.9003C14.4628 4.86036 14.4497 4.81226 14.424 4.75824C14.6924 4.64645 14.5813 4.22813 14.4827 3.98518C14.4718 3.95634 14.4244 3.95942 14.4063 3.92204C14.3646 3.8314 14.3895 3.57996 14.2385 3.6136C14.269 3.52481 14.297 3.43419 14.3224 3.34163C14.2805 3.27925 14.2374 3.21883 14.1932 3.15937C14.147 3.17171 14.1008 3.18404 14.0545 3.19636C14.1795 3.02404 14.0534 2.83228 14.0536 2.72057C14.0538 2.69796 14.1146 2.67123 14.1077 2.60167C14.1053 2.5772 14.097 2.54816 14.0858 2.51695C14.0606 2.4458 14.0206 2.3664 14.0068 2.30319C13.9256 2.30215 13.845 2.30379 13.7653 2.30835C13.664 2.19886 13.8037 2.06102 13.7674 1.97878C13.7632 1.95836 13.5836 1.76062 13.569 1.76088C13.4625 1.71319 13.3938 1.83751 13.1876 1.69055C13.1768 1.68378 13.1679 1.67414 13.1594 1.66314C13.1251 1.62875 13.0976 1.58516 13.0563 1.56847C12.9543 1.52205 12.6158 1.57037 12.5754 1.68805C12.488 1.51352 12.1471 1.54577 12.0499 1.50822C12.0197 1.49536 12.0125 1.39933 11.915 1.38294C11.8348 1.36858 11.641 1.46343 11.5414 1.4673C11.4886 1.46852 11.4499 1.45238 11.417 1.43601C11.379 1.41974 11.3502 1.40253 11.3222 1.40479C11.2702 1.40908 11.2364 1.48093 11.1663 1.49376C10.9506 1.53213 10.7369 1.4686 10.5668 1.5019C10.3215 1.54967 10.1495 1.7839 9.97459 1.91406C9.92313 1.91395 9.86479 1.88637 9.81474 1.89889C9.18393 2.05373 8.52084 2.24974 8.06049 2.55947C7.97673 2.61393 7.82886 2.68357 7.70707 2.77585C7.47457 2.96164 7.29957 3.141 7.58115 3.23461C7.55145 3.37335 6.85892 3.81217 6.75779 3.91528C6.65223 4.01974 6.62886 4.1568 6.55292 4.24037C6.3287 4.49052 6.12192 4.63806 5.97447 4.97688C5.93734 5.06497 5.97217 5.18888 5.95013 5.22858C5.92305 5.27641 5.81725 5.29086 5.78729 5.35168C5.72348 5.47691 5.72292 5.63535 5.74247 5.70235C5.7392 5.69015 5.73474 5.68324 5.73057 5.6806C5.7259 5.67767 5.6564 5.71443 5.64159 5.73607C5.59977 5.79621 5.66356 5.86599 5.71545 5.8044C5.74124 5.7781 5.76378 5.72791 5.79373 5.65487C5.7797 5.76571 5.84646 5.7256 5.86464 5.68044C5.89311 5.65904 5.9217 5.63652 5.95175 5.6189C6.02236 5.57879 6.10324 5.51868 6.14438 5.46754C6.52517 4.99861 6.93077 4.48918 7.03916 4.16128C7.131 3.87843 7.03817 3.83671 7.2777 3.53191C7.3285 3.46368 7.38339 3.39761 7.43515 3.31198C7.55556 3.123 7.78512 2.91105 7.53243 2.74719C7.53788 2.72612 7.54202 2.70518 7.54516 2.6844C7.57114 2.34511 7.5461 2.13531 7.71559 1.91428C7.66205 1.8939 7.6084 1.87498 7.55468 1.85784C7.54899 1.82465 7.54284 1.79249 7.53625 1.76174C7.58249 1.7438 7.62858 1.72536 7.6745 1.70638C7.66025 1.58943 7.57775 1.48171 7.50533 1.44831C7.42954 1.40963 7.39741 1.46692 7.42084 1.47901C7.42785 1.48323 7.43783 1.48634 7.4422 1.48541C7.17989 1.34605 6.43947 1.33364 6.13402 1.38718C5.94822 1.40777 5.97834 1.51041 5.80067 1.34866C5.76607 1.37821 5.73267 1.40807 5.6993 1.43868C5.69344 1.49226 5.68877 1.54561 5.68469 1.59899C5.60346 1.6368 5.51247 1.67081 5.41947 1.70715C5.25719 1.77218 5.08842 1.83937 4.95565 1.92193C4.5607 2.16343 4.07316 2.6724 3.66471 2.90149C3.56135 2.95829 3.38743 2.97861 3.30147 3.05515C3.17694 3.16659 3.25374 3.3124 3.10481 3.45557C2.97543 3.58045 2.7598 3.72772 2.55869 3.88391C2.36237 4.0352 2.17431 4.20354 2.0791 4.34155C2.02181 4.42439 2.04245 4.49771 2.00764 4.55703C1.86276 4.80728 1.7279 5.00722 1.67572 5.28395C1.40472 5.45513 1.24398 5.34517 1.02204 5.34271C0.85587 5.34339 0.443166 5.39397 0.298309 5.53289C0.195382 5.59242 0.114988 5.33164 0 5.398C0.0672404 4.97998 0.13697 4.91763 0.231708 4.78102C0.32599 4.66409 0.441105 4.57777 0.588846 4.47063C0.890159 3.96002 1.2295 3.4868 1.62503 3.03919C1.6425 3.01952 1.66013 2.99985 1.67793 2.98018C1.75746 2.97633 1.83576 2.97461 1.91436 2.97328C1.91444 2.97336 1.91453 2.97345 1.91462 2.97353C2.12092 2.85218 2.0899 2.68327 2.15819 2.5722C2.597 1.85461 3.67978 1.04205 4.76963 0.519159C5.32989 0.243909 5.91307 0.0975681 6.38788 0.0444249C6.6555 -0.0118234 7.54053 -0.0488161 7.88667 0.153048C7.94618 0.17965 7.98958 0.207339 8.01918 0.232423C8.08533 0.290805 8.06243 0.37677 8.1281 0.424204C8.788 0.858895 8.84837 1.50779 8.95406 1.97915C8.94198 2.20167 8.92957 2.41449 8.93075 2.60529C8.95493 3.51671 8.63286 4.38247 8.20801 5.05868C7.91193 5.53227 7.58085 5.95424 7.27747 6.35851C7.01913 6.69107 6.69575 6.90231 6.33432 7.03688C5.96029 7.1761 5.5056 7.15874 5.13666 6.97761C4.77988 6.8026 4.46111 6.49764 4.34143 6.02344C4.13016 4.94119 4.72195 4.23827 5.12818 3.69949C5.57383 3.15323 6.05227 2.7034 6.49909 2.26167C6.60356 2.1588 6.70991 2.04377 6.81333 1.92552C7.11534 1.5805 7.51671 1.27415 7.87436 1.12238C8.09128 1.03067 8.22986 1.1177 8.46139 0.914443C8.47778 0.948059 8.49413 0.981695 8.51042 1.01535C8.72666 0.884509 8.85128 0.753639 9.11283 0.667108C9.33416 0.590984 9.91261 0.445577 10.1078 0.420265C10.2081 0.405908 10.1856 0.481938 10.2787 0.461915C10.4358 0.427279 10.7555 0.265817 10.9724 0.225515C11.0344 0.213886 11.1095 0.207961 11.1911 0.203672C11.3902 0.189668 11.6101 0.200757 11.7294 0.184671C12.3244 0.0941229 13.0686 0.0795288 13.6887 0.360932C13.7173 0.373361 13.7452 0.386407 13.7732 0.400348C13.9935 0.504733 14.1863 0.761282 14.2374 0.804733C14.3459 0.889986 14.4353 0.85695 14.5099 0.917486C14.8544 1.19506 15.0555 1.7393 15.1651 2.08618C15.1811 2.13408 15.1962 2.17883 15.2114 2.2209C15.5209 3.10883 15.7231 4.06037 15.5398 5.11604C15.4759 5.44103 15.3468 5.76469 15.156 6.04424C14.7344 6.73319 13.702 7.23955 12.966 7.30853C12.4728 7.37179 12.1947 7.12924 12.0524 6.99922C11.8908 6.83031 12.009 6.80775 11.9034 6.68162C11.8329 6.59062 11.7694 6.53954 11.7184 6.49409C11.6899 6.46762 11.6662 6.44349 11.6504 6.41689C11.2557 5.85657 11.3479 4.693 11.5144 4.34149C11.5151 4.33971 11.5158 4.33796 11.5166 4.33623C11.5524 4.24664 11.6398 4.2033 11.6561 4.14998C11.6648 4.12266 11.6353 4.04477 11.6651 3.9555C11.9475 3.16456 12.4817 2.80074 13.0494 2.47332C13.7152 2.10344 14.4121 1.81425 15.0508 1.49401C15.5692 1.23861 16.1097 1.07617 16.6335 0.991567C16.9162 0.946369 17.1285 1.06931 17.1663 1.06219C17.2508 1.04785 17.2925 0.940458 17.4657 0.897656C18.0451 0.752637 18.8417 0.865944 19.4146 0.908582C19.6055 0.920524 19.8557 0.905474 20.0965 0.923509C20.1598 0.938582 20.3128 1.02252 20.3653 1.06104C20.4783 1.12075 20.5849 1.18937 20.6707 1.26172C20.897 1.42686 21.21 2.00184 21.2965 2.08728C21.3583 2.13718 21.4717 2.12365 21.5195 2.20094ZM14.7616 3.09249C14.7223 2.91995 14.4452 3.20284 14.6094 3.23071C14.6457 3.23713 14.7714 3.13732 14.7616 3.09249ZM8.90352 1.8629C8.92394 1.90808 8.94428 1.9533 8.96454 1.99855C8.99986 1.96338 9.03568 1.92859 9.07244 1.894C9.0381 1.87445 9.00388 1.85503 8.96929 1.83592C8.94712 1.84485 8.92519 1.85385 8.90352 1.8629Z',\n} as const;\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface AIResponseContainerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Display-font heading at the top of the reply (e.g. \"Confirm new project.\"). */\n title?: React.ReactNode;\n /** Message actions row — a `Timestamp` with copy / like / dislike / retry buttons. */\n actions?: React.ReactNode;\n /** Status line under the reply — an `AIMiniAvatar`. */\n feedback?: React.ReactNode;\n}\n\n// Figma: AI Response Container (55) › Chat reply — 16px-gapped column with an h4 title, rich content, actions and AI status.\nexport const AIResponseContainer = React.forwardRef<HTMLDivElement, AIResponseContainerProps>(\n ({ className, title, children, actions, feedback, ...props }, ref) => (\n <div ref={ref} className={cn('flex w-full max-w-188 flex-col items-start gap-4', className)} {...props}>\n {title && <h2 className=\"text-heading-h4 text-surface-foreground\">{title}</h2>}\n <div className=\"flex w-full flex-col gap-4 text-body-base text-surface-foreground [&>p]:opacity-90\">{children}</div>\n {actions}\n {feedback}\n </div>\n ),\n);\nAIResponseContainer.displayName = 'AIResponseContainer';\n","import * as React from 'react';\nimport { Sparkle } from '@phosphor-icons/react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Toggle as TogglePrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nconst askAiToggleVariants = cva(\n 'inline-flex shrink-0 items-center justify-center text-surface-foreground transition-colors disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n type: {\n // 40px, filled with the subtle fill until pressed.\n menu: 'size-10 rounded-md bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 data-[state=on]:bg-accent-soft data-[state=on]:bg-none data-[state=on]:text-accent-soft-foreground',\n // 32px, bare until pressed.\n action: 'size-8 rounded-sm hover:bg-accent-soft data-[state=on]:bg-accent-soft data-[state=on]:text-accent-soft-foreground',\n },\n },\n defaultVariants: { type: 'menu' },\n },\n);\n\nexport interface AskAiToggleProps\n extends Omit<React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, 'type'>,\n VariantProps<typeof askAiToggleVariants> {}\n\n// Figma: User Message Bubble (54) › Ask AI toggle — sparkle toggle in a 40px menu or a 32px action size.\nexport const AskAiToggle = React.forwardRef<React.ElementRef<typeof TogglePrimitive.Root>, AskAiToggleProps>(\n ({ className, type, 'aria-label': ariaLabel = 'Ask AI', pressed, defaultPressed, ...props }, ref) => {\n const [internal, setInternal] = React.useState(defaultPressed ?? false);\n const on = pressed ?? internal;\n return (\n <TogglePrimitive.Root\n ref={ref}\n aria-label={ariaLabel}\n pressed={pressed}\n defaultPressed={defaultPressed}\n onPressedChange={(next) => {\n setInternal(next);\n props.onPressedChange?.(next);\n }}\n className={cn(askAiToggleVariants({ type }), className)}\n {...props}\n >\n <Sparkle size={16} weight={on ? 'fill' : 'regular'} aria-hidden />\n </TogglePrimitive.Root>\n );\n },\n);\nAskAiToggle.displayName = 'AskAiToggle';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Checkbox } from '../Forms & Data Entry/Checkbox';\nimport { RadioGroupItem } from '../Forms & Data Entry/RadioGroup';\n\nexport interface ChatChoicesProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The question the assistant is asking. */\n title: React.ReactNode;\n}\n\n// Figma: Chat Input (56) › Choices — a question header over a list of options, shown above the input.\nexport const ChatChoices = React.forwardRef<HTMLDivElement, ChatChoicesProps>(\n ({ className, title, children, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col', className)} {...props}>\n <div className=\"border-b border-border px-6 pt-5 pb-4\">\n <p className=\"text-body-section text-surface-foreground\">{title}</p>\n </div>\n {children}\n </div>\n ),\n);\nChatChoices.displayName = 'ChatChoices';\n\ninterface ChatOptionBaseProps {\n title: React.ReactNode;\n description?: React.ReactNode;\n className?: string;\n}\n\nexport interface ChatOptionActionProps\n extends ChatOptionBaseProps,\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {\n kind?: 'action';\n}\n\nexport interface ChatOptionRadioProps extends ChatOptionBaseProps {\n kind: 'radio';\n /** Value in the surrounding `RadioGroup`. */\n value: string;\n disabled?: boolean;\n}\n\nexport interface ChatOptionCheckboxProps extends ChatOptionBaseProps {\n kind: 'checkbox';\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n disabled?: boolean;\n}\n\nexport type ChatOptionProps = ChatOptionActionProps | ChatOptionRadioProps | ChatOptionCheckboxProps;\n\nconst rowClasses = 'flex w-full flex-col gap-1 border-b border-border px-6 py-4 text-left text-body-small';\n\n// Figma: Chat Input (56) › AI option — a quick reply (action), or a radio / checkbox choice with a description.\nexport function ChatOption(props: ChatOptionProps) {\n const id = React.useId();\n const descriptionId = `${id}-description`;\n\n if (props.kind === 'radio' || props.kind === 'checkbox') {\n const { title, description, className } = props;\n const control =\n props.kind === 'radio' ? (\n <RadioGroupItem id={id} value={props.value} disabled={props.disabled} aria-describedby={description ? descriptionId : undefined} />\n ) : (\n <Checkbox\n id={id}\n checked={props.checked}\n defaultChecked={props.defaultChecked}\n onCheckedChange={(next) => props.onCheckedChange?.(next === true)}\n disabled={props.disabled}\n aria-describedby={description ? descriptionId : undefined}\n />\n );\n return (\n <div className={cn(rowClasses, 'cursor-default', className)}>\n <div className=\"flex items-center gap-2.5 py-1\">\n {control}\n <label htmlFor={id} className=\"text-ui-label text-surface-foreground\">\n {title}\n </label>\n </div>\n {description && (\n <p id={descriptionId} className=\"pl-7.75 text-sm leading-[1.4] text-secondary-muted-foreground\">\n {description}\n </p>\n )}\n </div>\n );\n }\n\n const { title, description, className, kind: _kind, ...buttonProps } = props;\n return (\n <button\n type=\"button\"\n className={cn(rowClasses, 'transition-colors hover:bg-accent-soft', className)}\n {...buttonProps}\n >\n <span className=\"text-ui-label text-surface-foreground\">{title}</span>\n {description && <span className=\"text-body-small text-secondary-muted-foreground\">{description}</span>}\n </button>\n );\n}\n","import * as React from 'react';\nimport { Check, Minus } from '@phosphor-icons/react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Label } from './Label';\n\nexport type CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\n\n// Figma: Checkbox (21) — 1.5px muted border at rest; accent fill when checked or indeterminate.\nexport const Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer inline-flex size-4 shrink-0 items-center justify-center rounded-xxs border-2 border-input bg-surface transition-colors',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Brand override: selected controls use `ring`, not `primary`/`accent`.\n 'data-[state=checked]:border-ring data-[state=checked]:bg-ring data-[state=checked]:text-label',\n 'data-[state=indeterminate]:border-ring data-[state=indeterminate]:bg-ring data-[state=indeterminate]:text-label',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n {props.checked === 'indeterminate' ? <Minus size={12} weight=\"bold\" aria-hidden /> : <Check size={12} weight=\"bold\" aria-hidden />}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = 'Checkbox';\n\nexport interface CheckboxFieldProps extends CheckboxProps {\n label: React.ReactNode;\n /** Secondary line under the label. */\n description?: React.ReactNode;\n}\n\n/** Checkbox with its label (and optional description) laid out per Figma. */\nexport const CheckboxField = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxFieldProps>(\n ({ label, description, id, className, disabled, ...props }, ref) => {\n const generatedId = React.useId();\n const controlId = id ?? generatedId;\n const descriptionId = `${controlId}-description`;\n return (\n <div\n className={cn('flex gap-2', description ? 'items-start pt-0.5' : 'items-center', disabled && 'opacity-50', className)}\n >\n <Checkbox\n ref={ref}\n id={controlId}\n disabled={disabled}\n aria-describedby={description ? descriptionId : undefined}\n className={description ? 'mt-0.5' : undefined}\n {...props}\n />\n <div className=\"flex flex-col gap-0.5\">\n <Label htmlFor={controlId} className={cn(!description && 'font-normal leading-5')}>\n {label}\n </Label>\n {description && (\n <p id={descriptionId} className=\"text-xs text-secondary-muted-foreground\">\n {description}\n </p>\n )}\n </div>\n </div>\n );\n },\n);\nCheckboxField.displayName = 'CheckboxField';\n","import * as React from 'react';\nimport { Label as LabelPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport type LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nexport const Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(\n 'text-ui-label text-surface-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n ),\n);\nLabel.displayName = 'Label';\n","import * as React from 'react';\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Label } from './Label';\n\nexport type RadioGroupProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;\n\nexport const RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root ref={ref} className={cn('flex flex-col gap-2', className)} {...props} />\n ),\n);\nRadioGroup.displayName = 'RadioGroup';\n\nexport type RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;\n\n// Figma: Radio Group (24) — 16px ring in muted (same size as the checkbox), accent when selected with a solid centre dot.\nexport const RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n RadioGroupItemProps\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'peer inline-flex size-4 shrink-0 items-center justify-center rounded-full border-2 border-input bg-surface transition-colors',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Brand override: selected controls use `ring`, not `primary`/`accent`.\n 'data-[state=checked]:border-ring',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"size-2 rounded-full bg-ring\" />\n </RadioGroupPrimitive.Item>\n));\nRadioGroupItem.displayName = 'RadioGroupItem';\n\nexport interface RadioGroupFieldItemProps extends RadioGroupItemProps {\n label: React.ReactNode;\n /** Secondary line under the label. */\n description?: React.ReactNode;\n}\n\n/** A radio with its label (and optional description) laid out per Figma. */\nexport const RadioGroupFieldItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n RadioGroupFieldItemProps\n>(({ label, description, id, className, disabled, ...props }, ref) => {\n const generatedId = React.useId();\n const controlId = id ?? generatedId;\n const descriptionId = `${controlId}-description`;\n return (\n <div\n className={cn('flex gap-2', description ? 'items-start pt-0.5' : 'items-center', disabled && 'opacity-50', className)}\n >\n <RadioGroupItem\n ref={ref}\n id={controlId}\n disabled={disabled}\n aria-describedby={description ? descriptionId : undefined}\n {...props}\n />\n <div className=\"flex flex-col gap-0.5\">\n <Label htmlFor={controlId} className={cn(!description && 'font-normal leading-5')}>\n {label}\n </Label>\n {description && (\n <p id={descriptionId} className=\"text-xs text-secondary-muted-foreground\">\n {description}\n </p>\n )}\n </div>\n </div>\n );\n});\nRadioGroupFieldItem.displayName = 'RadioGroupFieldItem';\n","import * as React from 'react';\nimport { ArrowUp, Plus } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport interface ChatInputProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit' | 'defaultValue' | 'onChange'> {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n /** Called with the text when the send button (or Enter) is pressed. */\n onSubmit?: (value: string) => void;\n placeholder?: string;\n /** Accessible name for the text area. */\n 'aria-label'?: string;\n /** Attached files (`FileAttachment`s) shown above the text. */\n attachments?: React.ReactNode;\n /** A `ChatChoices` block shown above the text area. */\n choices?: React.ReactNode;\n /** Slot before the send button — usually a `ProjectSelector`. */\n trailing?: React.ReactNode;\n /** Called when the add (+) button is pressed. Hides the button when omitted. */\n onAdd?: () => void;\n addLabel?: string;\n sendLabel?: string;\n disabled?: boolean;\n}\n\n// Figma: Chat Input (56) › Chat input — a rounded card: optional choices, attachments + text, then an actions row.\nexport const ChatInput = React.forwardRef<HTMLDivElement, ChatInputProps>(\n (\n {\n className,\n value,\n defaultValue = '',\n onValueChange,\n onSubmit,\n placeholder = 'Add context or ask for changes...',\n 'aria-label': ariaLabel = 'Message',\n attachments,\n choices,\n trailing,\n onAdd,\n addLabel = 'Add',\n sendLabel = 'Send',\n disabled,\n ...props\n },\n ref,\n ) => {\n const [internal, setInternal] = React.useState(defaultValue);\n const text = value ?? internal;\n const filled = text.trim() !== '' || attachments != null;\n\n const submit = () => {\n if (!text.trim() && attachments == null) return;\n onSubmit?.(text);\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n 'flex w-full flex-col overflow-hidden rounded-2xl border border-border bg-surface shadow-xs',\n 'focus-within:border-input-accent',\n className,\n )}\n {...props}\n >\n {choices}\n <div className=\"flex flex-col gap-4 p-4\">\n {attachments && <div className=\"flex flex-wrap gap-4\">{attachments}</div>}\n <textarea\n rows={1}\n aria-label={ariaLabel}\n value={text}\n disabled={disabled}\n placeholder={placeholder}\n onChange={(event) => {\n setInternal(event.target.value);\n onValueChange?.(event.target.value);\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n submit();\n }\n }}\n className=\"field-sizing-content max-h-60 min-h-7 w-full resize-none bg-transparent text-body-base text-surface-foreground outline-none placeholder:text-muted-foreground\"\n />\n </div>\n <div className=\"flex items-center gap-1.5 px-2.5 pt-2 pb-2.5\">\n {onAdd && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon\" aria-label={addLabel} disabled={disabled} onClick={onAdd}>\n <Plus size={16} aria-hidden />\n </Button>\n )}\n <div className=\"flex flex-1 items-center justify-end gap-1.5\">\n {trailing}\n <Button\n type=\"button\"\n variant={filled ? 'default' : 'outline'}\n size=\"icon\"\n aria-label={sendLabel}\n disabled={disabled || !filled}\n onClick={submit}\n className={cn(!filled && 'disabled:opacity-100 disabled:border-border disabled:text-muted-foreground')}\n >\n <ArrowUp size={16} aria-hidden />\n </Button>\n </div>\n </div>\n </div>\n );\n },\n);\nChatInput.displayName = 'ChatInput';\n\nexport interface AskAiInputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onSubmit'> {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n onSubmit?: (value: string) => void;\n sendLabel?: string;\n}\n\n// Figma: Chat Input (56) › Ask AI — the compact one-line pill (\"Ask for changes\").\nexport const AskAiInput = React.forwardRef<HTMLInputElement, AskAiInputProps>(\n (\n { className, value, defaultValue = '', onValueChange, onSubmit, sendLabel = 'Send', placeholder = 'Ask for changes', disabled, ...props },\n ref,\n ) => {\n const [internal, setInternal] = React.useState(defaultValue);\n const text = value ?? internal;\n const filled = text.trim() !== '';\n return (\n <form\n className={cn(\n 'flex min-h-10 w-full items-center gap-2 rounded-full border border-border bg-surface py-1.5 pr-1.5 pl-2 shadow-sm',\n 'focus-within:border-input-accent',\n className,\n )}\n onSubmit={(event) => {\n event.preventDefault();\n if (filled) onSubmit?.(text);\n }}\n >\n <input\n ref={ref}\n value={text}\n disabled={disabled}\n placeholder={placeholder}\n onChange={(event) => {\n setInternal(event.target.value);\n onValueChange?.(event.target.value);\n }}\n className=\"min-w-0 flex-1 bg-transparent text-body-small text-surface-foreground outline-none placeholder:text-muted-foreground\"\n {...props}\n />\n <Button\n type=\"submit\"\n variant={filled ? 'default' : 'outline'}\n size=\"icon\"\n aria-label={sendLabel}\n disabled={disabled || !filled}\n className={cn(!filled && 'disabled:opacity-100 disabled:border-border disabled:text-muted-foreground')}\n >\n <ArrowUp size={16} aria-hidden />\n </Button>\n </form>\n );\n },\n);\nAskAiInput.displayName = 'AskAiInput';\n","import * as React from 'react';\nimport { X } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport interface FileAttachmentProps extends React.HTMLAttributes<HTMLDivElement> {\n name: string;\n /** File type badge text, e.g. \"PDF\". */\n type?: string;\n /** Shows the round remove button on hover or keyboard focus (Figma: Default). Omit for the sent-message card (Figma: Variant 3). */\n onRemove?: () => void;\n removeLabel?: string;\n}\n\n// Figma: User Message Bubble (54) › File attached — 128px card; the composer variant has a remove button.\nexport const FileAttachment = React.forwardRef<HTMLDivElement, FileAttachmentProps>(\n ({ className, name, type, onRemove, removeLabel, ...props }, ref) => (\n <div ref={ref} className={cn('group/file relative w-32 shrink-0', className)} {...props}>\n <div\n className={cn(\n 'flex flex-col gap-1.5 border border-border bg-surface px-2.5 pt-2.5 pb-3',\n onRemove ? 'rounded-xl' : 'rounded-lg',\n )}\n >\n <p className=\"line-clamp-2 min-h-8 break-all text-ui-caption text-surface-foreground\" title={name}>\n {name}\n </p>\n {type && (\n <span className=\"w-fit rounded-xs bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-1.5 py-px text-body-xxs font-semibold tracking-wider text-secondary-muted-foreground uppercase\">\n {type}\n </span>\n )}\n </div>\n {onRemove && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={removeLabel ?? `Remove ${name}`}\n onClick={onRemove}\n className=\"absolute right-0 bottom-0 rounded-full opacity-0 transition-opacity group-hover/file:opacity-100 group-focus-within/file:opacity-100\"\n >\n <X size={16} aria-hidden />\n </Button>\n )}\n </div>\n ),\n);\nFileAttachment.displayName = 'FileAttachment';\n","import * as React from 'react';\nimport { CaretDown, FolderOpen, FolderSimple } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuTrigger,\n} from '../Overlays & Feedback/DropdownMenu';\n\nconst NEW_PROJECT = '__new__';\n\nexport interface ProjectSelectorProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue'> {\n /** Name of the chosen project. Leave empty for \"New Project\". */\n project?: string;\n /**\n * Existing project names. When given, pressing the selector opens a menu with\n * \"New Project\" and these names; the current choice is checked.\n */\n projects?: string[];\n /** Called with the chosen project name, or `undefined` for \"New Project\". */\n onProjectChange?: (project: string | undefined) => void;\n /** Label of the \"new project\" menu item and of the pill when no project is chosen. */\n newProjectLabel?: string;\n /**\n * `selected` means the project is locked for this chat: the pill is read-only\n * (no caret, neutral border). Otherwise it is a trigger with a caret.\n */\n selected?: boolean;\n}\n\n// Figma: Chat Input (56) › Project selector — a pill showing the project folder, \"New Project\" until one is chosen.\nexport const ProjectSelector = React.forwardRef<HTMLButtonElement, ProjectSelectorProps>(\n ({ className, project, projects, onProjectChange, newProjectLabel = 'New Project', selected = false, children, ...props }, ref) => {\n const label = children ?? project ?? newProjectLabel;\n const classes = cn(\n 'inline-flex h-10 items-center gap-2 rounded-full border bg-surface px-3 py-2 text-ui-label whitespace-nowrap text-surface-foreground transition-colors',\n selected\n ? 'border-border'\n : 'border-input hover:border-input hover:bg-accent-soft hover:text-accent-soft-foreground data-[state=open]:bg-accent-soft data-[state=open]:text-accent-soft-foreground',\n className,\n );\n const content = (\n <>\n {project ? (\n <FolderOpen size={16} weight=\"fill\" aria-hidden className=\"shrink-0\" />\n ) : (\n <FolderSimple size={16} aria-hidden className=\"shrink-0\" />\n )}\n <span>{label}</span>\n {!selected && <CaretDown size={16} aria-hidden className=\"shrink-0\" />}\n </>\n );\n if (selected) {\n return (\n <span className={classes} title={typeof label === 'string' ? label : undefined}>\n {content}\n </span>\n );\n }\n const trigger = (\n <button ref={ref} type=\"button\" aria-haspopup=\"menu\" className={classes} {...props}>\n {content}\n </button>\n );\n if (!projects) return trigger;\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>\n <DropdownMenuContent side=\"top\" align=\"end\" className=\"min-w-60\">\n <DropdownMenuRadioGroup\n value={project ?? NEW_PROJECT}\n onValueChange={(next) => onProjectChange?.(next === NEW_PROJECT ? undefined : next)}\n >\n <DropdownMenuRadioItem value={NEW_PROJECT}>{newProjectLabel}</DropdownMenuRadioItem>\n {projects.map((name) => (\n <DropdownMenuRadioItem key={name} value={name}>\n {name}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n },\n);\nProjectSelector.displayName = 'ProjectSelector';\n","import * as React from 'react';\nimport { CaretRight, Check, Trash } from '@phosphor-icons/react';\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\n// Figma: Dropdown Menu (50) — white card, 1px border, 8px radius, 4px padding and 2px between items.\nconst contentClasses =\n 'min-w-80 overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md';\n\nexport type DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;\n\n/**\n * Radix moves DOM focus to the hovered item, so `:focus-visible` can't tell hover\n * from keyboard navigation. Track the last input modality instead: hover only\n * fills the item, and the ring is drawn only after a key press.\n */\nfunction useKeyboardModality<T extends HTMLElement>(\n onKeyDown?: React.KeyboardEventHandler<T>,\n onPointerMove?: React.PointerEventHandler<T>,\n) {\n const [keyboard, setKeyboard] = React.useState(false);\n return {\n 'data-keyboard': keyboard ? '' : undefined,\n onKeyDown: (event: React.KeyboardEvent<T>) => {\n setKeyboard(true);\n onKeyDown?.(event);\n },\n onPointerMove: (event: React.PointerEvent<T>) => {\n setKeyboard(false);\n onPointerMove?.(event);\n },\n };\n}\n\nexport const DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n DropdownMenuContentProps\n>(({ className, sideOffset = 4, onKeyDown, onPointerMove, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n style={{ zIndex: 'var(--sys-z-30)' }}\n className={cn(contentClasses, 'group/menu flex flex-col gap-0.5', className)}\n {...useKeyboardModality(onKeyDown, onPointerMove)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = 'DropdownMenuContent';\n\nconst itemBase =\n 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-body-base text-surface-foreground outline-none select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50';\nconst itemHover =\n 'data-[highlighted]:bg-accent-soft group-data-[keyboard]/menu:data-[highlighted]:outline-solid group-data-[keyboard]/menu:data-[highlighted]:outline-2 group-data-[keyboard]/menu:data-[highlighted]:-outline-offset-2 group-data-[keyboard]/menu:data-[highlighted]:outline-ring';\nconst selectedItem = 'data-[state=checked]:text-ui-label-large data-[state=checked]:text-accent-foreground';\n\nexport interface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n /** Secondary line under the label. */\n description?: React.ReactNode;\n /** `destructive` shows a trash icon and red text (Figma: State = Destructive). */\n variant?: 'default' | 'destructive';\n /** Leading icon. */\n icon?: React.ReactNode;\n}\n\nfunction ItemBody({ children, description }: { children: React.ReactNode; description?: React.ReactNode }) {\n return (\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span>{children}</span>\n {description && <span className=\"text-xs leading-normal text-secondary-muted-foreground\">{description}</span>}\n </span>\n );\n}\n\nexport const DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n DropdownMenuItemProps\n>(({ className, children, description, variant = 'default', icon, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n itemBase,\n variant === 'destructive'\n ? 'text-ui-label-large text-destructive data-[highlighted]:bg-destructive-soft-hover group-data-[keyboard]/menu:data-[highlighted]:outline-solid group-data-[keyboard]/menu:data-[highlighted]:outline-2 group-data-[keyboard]/menu:data-[highlighted]:-outline-offset-2 group-data-[keyboard]/menu:data-[highlighted]:outline-ring'\n : itemHover,\n className,\n )}\n {...props}\n >\n {variant === 'destructive' && !icon ? <Trash size={16} aria-hidden className=\"shrink-0\" /> : icon}\n <ItemBody description={description}>{children}</ItemBody>\n </DropdownMenuPrimitive.Item>\n));\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\nexport interface DropdownMenuSelectableItemProps {\n description?: React.ReactNode;\n}\n\n/** A checkable item: the selected state is accent-coloured with a trailing check (Figma: State = Selected). */\nexport const DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem> & DropdownMenuSelectableItemProps\n>(({ className, children, description, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem ref={ref} className={cn(itemBase, itemHover, selectedItem, className)} {...props}>\n <ItemBody description={description}>{children}</ItemBody>\n <DropdownMenuPrimitive.ItemIndicator>\n <Check size={16} aria-hidden />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';\n\n/** One choice of a `DropdownMenuRadioGroup`, styled like a selected item when active. */\nexport const DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> & DropdownMenuSelectableItemProps\n>(({ className, children, description, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem ref={ref} className={cn(itemBase, itemHover, selectedItem, className)} {...props}>\n <ItemBody description={description}>{children}</ItemBody>\n <DropdownMenuPrimitive.ItemIndicator>\n <Check size={16} aria-hidden />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';\n\n/** Item that opens a submenu, with a trailing caret (Figma: Expand = Yes). */\nexport const DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(itemBase, itemHover, 'data-[state=open]:bg-accent-soft', className)}\n {...props}\n >\n <span className=\"flex-1\">{children}</span>\n <CaretRight size={16} aria-hidden />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';\n\nexport const DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, onKeyDown, onPointerMove, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n style={{ zIndex: 'var(--sys-z-30)' }}\n className={cn(contentClasses, 'group/menu flex flex-col gap-0.5', className)}\n {...useKeyboardModality(onKeyDown, onPointerMove)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent';\n\nexport const DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-ui-caption text-secondary-muted-foreground', className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = 'DropdownMenuLabel';\n\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px bg-border', className)} {...props} />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface TimestampProps extends React.HTMLAttributes<HTMLDivElement> {\n /** The time text, e.g. \"5 minutes ago\". */\n time: React.ReactNode;\n /** Action buttons (ghost icon `Button`s) shown next to the time. */\n children?: React.ReactNode;\n /** `before` puts the time left of the actions (user messages); `after` puts it right of them (AI replies). */\n timePosition?: 'before' | 'after';\n}\n\n// Figma: Timestamp (58) — 12px/16px `secondary-muted` time with 40px icon actions.\nexport const Timestamp = React.forwardRef<HTMLDivElement, TimestampProps>(\n ({ className, time, children, timePosition = 'before', ...props }, ref) => {\n const timeNode = (\n <time className=\"text-ui-caption whitespace-nowrap text-secondary-muted-foreground\">{time}</time>\n );\n return (\n <div\n ref={ref}\n className={cn('flex items-center gap-2', timePosition === 'before' && 'justify-end', className)}\n {...props}\n >\n {timePosition === 'before' && timeNode}\n {children && (\n <div role=\"toolbar\" aria-label=\"Message actions\" className=\"flex items-center\">\n {children}\n </div>\n )}\n {timePosition === 'after' && timeNode}\n </div>\n );\n },\n);\nTimestamp.displayName = 'Timestamp';\n","import * as React from 'react';\nimport { CaretRight, Check } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface TopicCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Leading 24px icon (a Phosphor icon, e.g. `<FolderOpen weight=\"fill\" />`). */\n icon?: React.ReactNode;\n title: React.ReactNode;\n /** Small tag beside the title (e.g. a language `Badge`). */\n badge?: React.ReactNode;\n description: React.ReactNode;\n /** Chips under the description (e.g. topic tags). */\n tags?: React.ReactNode;\n /** Meta line under the description (e.g. \"7 Questions · 30 minutes\"). */\n meta?: React.ReactNode;\n}\n\n// Figma: AI Response Container (55) › Topic — bordered 16px-radius card with a display-font title.\nexport const TopicCard = React.forwardRef<HTMLDivElement, TopicCardProps>(\n ({ className, icon, title, badge, description, tags, meta, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex w-full flex-col gap-4 overflow-hidden rounded-xl border border-border bg-surface p-4', className)}\n {...props}\n >\n <div className=\"flex items-center gap-4\">\n <div className=\"flex items-center gap-4 text-primary\">\n {icon && <span className=\"flex size-6 shrink-0 items-center justify-center [&>svg]:size-6\">{icon}</span>}\n <h3 className=\"text-heading-h3 whitespace-nowrap\">{title}</h3>\n </div>\n {badge}\n </div>\n <p className=\"text-body-base text-surface-foreground\">{description}</p>\n {tags && <div className=\"flex flex-wrap items-center gap-2\">{tags}</div>}\n {meta && <div className=\"flex items-center gap-2 text-ui-caption text-secondary-muted-foreground\">{meta}</div>}\n </div>\n ),\n);\nTopicCard.displayName = 'TopicCard';\n\nexport interface TopicCardMetaItemProps extends React.HTMLAttributes<HTMLSpanElement> {\n icon: React.ReactNode;\n}\n\n/** An icon + text item for `TopicCard`'s `meta` line. */\nexport function TopicCardMetaItem({ icon, children, className, ...props }: TopicCardMetaItemProps) {\n return (\n <span className={cn('flex items-center gap-1', className)} {...props}>\n <span aria-hidden=\"true\" className=\"flex size-4 items-center justify-center [&>svg]:size-4\">\n {icon}\n </span>\n {children}\n </span>\n );\n}\n\n/** A short chip for `TopicCard`'s `tags` row. */\nexport function TopicCardTag({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {\n return (\n <span\n className={cn(\n 'rounded-sm bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2 py-1 text-ui-caption text-surface-foreground',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport interface TopicActivityRowProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {\n /** Status text, e.g. \"New Activity Created\". */\n status: React.ReactNode;\n}\n\n// Figma: Topic › Variant 5 — a divider row linking to the created item.\nexport const TopicActivityRow = React.forwardRef<HTMLButtonElement, TopicActivityRowProps>(\n ({ className, status, children, ...props }, ref) => (\n <button\n ref={ref}\n type=\"button\"\n className={cn(\n 'flex w-full items-center gap-4 border-b border-border bg-surface p-4 text-left text-body-small text-surface-foreground',\n className,\n )}\n {...props}\n >\n <span className=\"flex items-center gap-2 whitespace-nowrap\">\n <Check size={16} aria-hidden className=\"text-accent\" />\n {status}\n </span>\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <CaretRight size={16} aria-hidden />\n </button>\n ),\n);\nTopicActivityRow.displayName = 'TopicActivityRow';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface UserMessageBubbleProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Attached files (`FileAttachment`s) shown above the text. */\n attachments?: React.ReactNode;\n /** Row under the bubble, usually a `Timestamp` with message actions. */\n footer?: React.ReactNode;\n}\n\n// Figma: User Message Bubble (54) › Message — `secondary` fill, 16px radius with a 4px bottom-right corner.\nexport const UserMessageBubble = React.forwardRef<HTMLDivElement, UserMessageBubbleProps>(\n ({ className, children, attachments, footer, ...props }, ref) => (\n <div ref={ref} className={cn('flex w-full max-w-125 flex-col items-end gap-2.5', className)} {...props}>\n <div className=\"flex w-full flex-col gap-4 rounded-tl-xl rounded-tr-xl rounded-br-xs rounded-bl-xl bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 p-4 text-body-base text-surface-foreground\">\n {attachments && <div className=\"flex flex-wrap gap-4\">{attachments}</div>}\n <p className=\"break-words\">{children}</p>\n </div>\n {footer && <div className=\"w-full\">{footer}</div>}\n </div>\n ),\n);\nUserMessageBubble.displayName = 'UserMessageBubble';\n","import { CaretDown, CaretLeft, CaretRight } from '@phosphor-icons/react';\nimport { DayPicker, type DayPickerProps } from 'react-day-picker';\n\nimport { cn } from '../../lib/utils';\n\nexport type CalendarProps = DayPickerProps & {\n /** Days to mark with a dashed outline (e.g. suggested interview slots). */\n recommendedDates?: Date[];\n};\n\nconst subtleFill = 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5';\n\n// Figma: Calendar (25) › Calendar / DayCell-24 — 36px round day cells on a 4px grid, month + year pickers in the header.\nexport function Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'dropdown',\n recommendedDates,\n modifiers,\n modifiersClassNames,\n startMonth,\n endMonth,\n ...props\n}: CalendarProps) {\n const year = new Date().getFullYear();\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n captionLayout={captionLayout}\n startMonth={startMonth ?? new Date(year - 10, 0)}\n endMonth={endMonth ?? new Date(year + 10, 11)}\n className={cn('w-71 text-surface-foreground', className)}\n modifiers={{ ...(recommendedDates ? { recommended: recommendedDates } : {}), ...modifiers }}\n modifiersClassNames={{\n recommended: 'border border-dashed border-border *:text-surface-foreground',\n ...modifiersClassNames,\n }}\n classNames={{\n root: 'relative',\n months: 'flex flex-col',\n month: 'flex flex-col items-center gap-4',\n nav: 'absolute inset-x-0 top-0 flex h-8 items-center justify-between',\n button_previous:\n 'inline-flex size-8 items-center justify-center rounded-sm text-surface-foreground hover:bg-accent-soft hover:text-accent-soft-foreground disabled:opacity-50',\n button_next:\n 'inline-flex size-8 items-center justify-center rounded-sm text-surface-foreground hover:bg-accent-soft hover:text-accent-soft-foreground disabled:opacity-50',\n month_caption: 'flex h-8 items-center justify-center',\n dropdowns: 'flex items-center gap-1',\n dropdown_root:\n 'relative inline-flex items-center rounded-md border border-input bg-surface px-3 py-1.5 text-body-small shadow-xs hover:border-input-accent',\n dropdown: 'absolute inset-0 cursor-pointer opacity-0',\n caption_label: 'flex items-center gap-2 text-body-small text-surface-foreground',\n month_grid: 'w-full border-collapse',\n weekdays: 'flex gap-1',\n weekday: 'flex h-8 w-9 items-center justify-center text-ui-caption text-muted-foreground',\n weeks: 'flex flex-col gap-1',\n week: 'flex gap-1',\n day: 'size-9 rounded-full p-0 text-center',\n day_button:\n 'flex size-full items-center justify-center rounded-full text-ui-caption text-secondary-muted-foreground transition-colors hover:bg-accent-soft hover:text-accent-soft-foreground',\n selected: cn(subtleFill, '*:text-surface-foreground'),\n today: 'font-semibold',\n outside: 'opacity-60 *:text-muted-foreground',\n disabled: 'opacity-60 *:pointer-events-none *:text-muted-foreground',\n hidden: 'invisible',\n ...classNames,\n }}\n components={{\n Chevron: ({ orientation }) =>\n orientation === 'left' ? (\n <CaretLeft size={16} aria-hidden />\n ) : orientation === 'right' ? (\n <CaretRight size={16} aria-hidden />\n ) : (\n <CaretDown size={16} aria-hidden />\n ),\n }}\n {...props}\n />\n );\n}\nCalendar.displayName = 'Calendar';\n","import * as React from 'react';\nimport { CalendarBlank } from '@phosphor-icons/react';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Calendar, type CalendarProps } from './Calendar';\nimport { Field } from './Field';\nimport { formatDateTime } from './formatDateTime';\nimport { TimePicker, type TimePickerProps, type TimeValue } from './TimePicker';\n\nfunction toTimeValue(date: Date | undefined): TimeValue | undefined {\n if (!date) return undefined;\n const hours = date.getHours();\n return { hour: hours % 12 === 0 ? 12 : hours % 12, minute: date.getMinutes(), period: hours >= 12 ? 'PM' : 'AM' };\n}\n\nfunction combine(date: Date, time: TimeValue): Date {\n const next = new Date(date);\n next.setHours((time.hour % 12) + (time.period === 'PM' ? 12 : 0), time.minute, 0, 0);\n return next;\n}\n\nexport interface DateTimePickerProps {\n /** Initial selection. The picker keeps its own draft until Apply, so remount it (e.g. with a `key`) to reset from a new value. */\n value?: Date;\n defaultValue?: Date;\n /** Called with the chosen date (time included when `showTime`) when Apply is pressed. */\n onApply?: (value: Date | undefined) => void;\n onReset?: () => void;\n /** Show the time picker column next to the calendar. */\n showTime?: boolean;\n calendarProps?: Omit<CalendarProps, 'mode' | 'selected' | 'onSelect'>;\n timePickerProps?: Omit<TimePickerProps, 'value' | 'onValueChange'>;\n className?: string;\n}\n\n// Figma: Calendar (25) › Date & time picker — card with the calendar, an optional time column and Reset / Apply.\nexport function DateTimePicker({\n value,\n defaultValue,\n onApply,\n onReset,\n showTime = true,\n calendarProps,\n timePickerProps,\n className,\n}: DateTimePickerProps) {\n const [date, setDate] = React.useState<Date | undefined>(value ?? defaultValue);\n const [time, setTime] = React.useState<TimeValue | undefined>(toTimeValue(value ?? defaultValue));\n\n const apply = () => {\n if (!date) return onApply?.(undefined);\n onApply?.(showTime ? combine(date, time ?? { hour: 12, minute: 0, period: 'AM' }) : date);\n };\n\n return (\n <div\n className={cn(\n 'inline-flex flex-col gap-4 rounded-lg border border-border bg-surface p-4 shadow-md',\n className,\n )}\n >\n <div className=\"flex items-center gap-6\">\n <Calendar mode=\"single\" selected={date} onSelect={setDate} defaultMonth={date} {...calendarProps} />\n {showTime && (\n <>\n <div className=\"h-70 w-px self-center bg-border\" aria-hidden=\"true\" />\n <TimePicker value={time} onValueChange={setTime} {...timePickerProps} />\n </>\n )}\n </div>\n <div className=\"flex items-center justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => {\n setDate(undefined);\n setTime(undefined);\n onReset?.();\n }}\n >\n Reset\n </Button>\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={apply}>\n Apply\n </Button>\n </div>\n </div>\n );\n}\n\nexport interface DatePickerProps extends Omit<DateTimePickerProps, 'onApply' | 'className'> {\n label?: React.ReactNode;\n placeholder?: string;\n onValueChange?: (value: Date | undefined) => void;\n className?: string;\n}\n\n/** Field-style trigger that opens a `DateTimePicker` in a popover. Figma: Calendar (25) › Calendar & time. */\nexport const DatePicker = React.forwardRef<HTMLButtonElement, DatePickerProps>(\n ({ label, placeholder = 'Select date and time', value, defaultValue, onValueChange, showTime = true, className, ...pickerProps }, ref) => {\n const [open, setOpen] = React.useState(false);\n const [internal, setInternal] = React.useState<Date | undefined>(defaultValue);\n const current = value ?? internal;\n\n return (\n <Field label={label} className={cn('w-75', className)}>\n {(control) => (\n <PopoverPrimitive.Root open={open} onOpenChange={setOpen}>\n <PopoverPrimitive.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n {...control}\n className=\"flex h-10 w-full items-center gap-3 rounded-md border border-input bg-surface px-3 py-2.5 text-left shadow-xs transition-colors hover:border-input-accent data-[state=open]:border-input-accent\"\n >\n <CalendarBlank size={24} aria-hidden className=\"shrink-0 text-surface-foreground\" />\n <span className={cn('truncate', current ? 'text-ui-label-large text-surface-foreground' : 'text-body-base text-muted-foreground')}>\n {current ? formatDateTime(current, showTime) : placeholder}\n </span>\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content align=\"start\" sideOffset={8} style={{ zIndex: 'var(--sys-z-20)' }}>\n <DateTimePicker\n {...pickerProps}\n showTime={showTime}\n value={current}\n onApply={(next) => {\n setInternal(next);\n onValueChange?.(next);\n setOpen(false);\n }}\n />\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n )}\n </Field>\n );\n },\n);\nDatePicker.displayName = 'DatePicker';\n","import * as React from 'react';\nimport { CheckCircle, WarningCircle } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Label } from './Label';\n\nexport type FieldStatus = 'default' | 'success' | 'error';\n\n/**\n * Classes for a bordered field surface (Figma: Text Input / Textarea / Select).\n * Hover and the open \"select\" state use `input-accent`; success and error swap\n * the border colour. Focus is handled by the global `:focus-visible` ring.\n */\nexport function fieldSurfaceClasses(status: FieldStatus = 'default') {\n return cn(\n 'border bg-surface text-surface-foreground transition-colors',\n status === 'success' && 'border-success-foreground',\n status === 'error' && 'border-destructive',\n status === 'default' && 'border-input hover:border-input-accent',\n );\n}\n\nexport interface FieldControlProps {\n id: string;\n 'aria-describedby'?: string;\n 'aria-invalid'?: true;\n}\n\nexport interface FieldProps {\n /** Label shown above the control. */\n label?: React.ReactNode;\n /** Neutral helper text shown under the control. Replaced by `message` on success/error. */\n description?: React.ReactNode;\n /** Status message shown with an icon when `status` is `success` or `error`. */\n message?: React.ReactNode;\n status?: FieldStatus;\n /** Id for the control; generated when omitted. */\n id?: string;\n className?: string;\n /** Render the control, spreading the supplied props onto it. */\n children: (control: FieldControlProps) => React.ReactNode;\n}\n\n/**\n * Label + control + helper/status message, wired together with\n * `htmlFor`/`aria-describedby`/`aria-invalid`. Shared by Text Input, Textarea,\n * Select, Numerical input and Input with action.\n */\nexport function Field({ label, description, message, status = 'default', id, className, children }: FieldProps) {\n const generatedId = React.useId();\n const controlId = id ?? generatedId;\n const messageId = `${controlId}-message`;\n const showStatus = status !== 'default' && message != null;\n const text = showStatus ? message : description;\n\n return (\n <div className={cn('flex w-full flex-col gap-1.5', className)}>\n {label != null && <Label htmlFor={controlId}>{label}</Label>}\n {children({\n id: controlId,\n 'aria-describedby': text != null ? messageId : undefined,\n 'aria-invalid': status === 'error' ? true : undefined,\n })}\n {text != null && (\n <p\n id={messageId}\n className={cn(\n 'flex gap-2 text-ui-caption',\n status === 'default' && 'text-secondary-muted-foreground',\n status === 'success' && 'items-center text-success-foreground',\n status === 'error' && 'items-start text-destructive',\n )}\n >\n {showStatus &&\n (status === 'error' ? (\n <WarningCircle size={16} aria-hidden className=\"shrink-0\" />\n ) : (\n <CheckCircle size={16} aria-hidden className=\"shrink-0\" />\n ))}\n {text}\n </p>\n )}\n </div>\n );\n}\n","/** `September 23, 2026 - 11:30 AM` (or just the date when `showTime` is false). */\nexport function formatDateTime(date: Date, showTime = true) {\n const day = date.toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' });\n if (!showTime) return day;\n return `${day} - ${date.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' })}`;\n}\n","import * as React from 'react';\nimport { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { TabItem } from '../Navigation/TabItem';\nimport { TabNavigation, Tabs } from '../Navigation/TabNavigation';\n\nexport interface TimeValue {\n /** 1–12 */\n hour: number;\n /** 0–59 */\n minute: number;\n period: 'AM' | 'PM';\n}\n\nexport interface TimeItemProps extends React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> {\n /** Dashed outline to suggest this slot. */\n recommended?: boolean;\n}\n\n// Figma: Calendar (25) › Time Item — a 12px/16px chip; selected is the subtle fill, hover is accent-soft.\nexport const TimeItem = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Item>, TimeItemProps>(\n ({ className, recommended, ...props }, ref) => (\n <ToggleGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'flex w-full justify-center rounded-sm px-2.5 py-1.5 text-ui-caption text-secondary-muted-foreground transition-colors',\n 'hover:bg-accent-soft hover:text-accent-soft-foreground',\n 'data-[state=on]:bg-secondary data-[state=on]:bg-linear-to-r data-[state=on]:from-overlay-dark-5 data-[state=on]:to-overlay-dark-5 data-[state=on]:text-surface-foreground',\n 'data-[state=on]:hover:bg-accent-soft data-[state=on]:hover:bg-none data-[state=on]:hover:text-accent-soft-foreground',\n 'disabled:pointer-events-none disabled:opacity-60 disabled:text-muted-foreground',\n recommended && 'border border-dashed border-border text-surface-foreground',\n className,\n )}\n {...props}\n />\n ),\n);\nTimeItem.displayName = 'TimeItem';\n\nexport interface TimePickerProps {\n value?: TimeValue;\n onValueChange?: (value: TimeValue) => void;\n /** Minute interval between options. */\n minuteStep?: number;\n isHourDisabled?: (hour: number, period: 'AM' | 'PM') => boolean;\n isMinuteDisabled?: (minute: number, hour: number, period: 'AM' | 'PM') => boolean;\n isHourRecommended?: (hour: number, period: 'AM' | 'PM') => boolean;\n isMinuteRecommended?: (minute: number, hour: number, period: 'AM' | 'PM') => boolean;\n className?: string;\n}\n\nconst pad = (n: number) => String(n).padStart(2, '0');\n\n/** Figma: Calendar (25) › Time Picker Panel — AM/PM switch with hour and minute columns. */\nexport function TimePicker({\n value,\n onValueChange,\n minuteStep = 5,\n isHourDisabled,\n isMinuteDisabled,\n isHourRecommended,\n isMinuteRecommended,\n className,\n}: TimePickerProps) {\n const current: TimeValue = value ?? { hour: 12, minute: 0, period: 'AM' };\n const root = React.useRef<HTMLDivElement>(null);\n // Bring the selected hour / minute into view when the (scrollable) columns mount.\n React.useEffect(() => {\n root.current?.querySelectorAll<HTMLElement>('[data-state=\"on\"]').forEach((item) => {\n const column = item.parentElement;\n if (column) column.scrollTop = Math.max(0, item.offsetTop - column.offsetTop - column.clientHeight / 2 + item.clientHeight / 2);\n });\n }, []);\n const hours = Array.from({ length: 12 }, (_, i) => i + 1);\n const minutes = Array.from({ length: Math.ceil(60 / minuteStep) }, (_, i) => i * minuteStep);\n\n return (\n <div ref={root} className={cn('flex w-45 flex-col gap-4 pt-2', className)}>\n <p className=\"text-ui-label text-surface-foreground\">Select Time</p>\n <Tabs\n value={current.period}\n onValueChange={(period) => onValueChange?.({ ...current, period: period as 'AM' | 'PM' })}\n >\n <TabNavigation variant=\"toggle\" aria-label=\"AM or PM\" className=\"self-start\">\n {(['AM', 'PM'] as const).map((period) => (\n <TabItem key={period} value={period}>\n {period}\n </TabItem>\n ))}\n </TabNavigation>\n </Tabs>\n <div className=\"flex h-47.5 w-full items-start gap-3\">\n <ToggleGroupPrimitive.Root\n type=\"single\"\n aria-label=\"Hour\"\n value={String(current.hour)}\n onValueChange={(next) => next && onValueChange?.({ ...current, hour: Number(next) })}\n className=\"flex h-full min-w-0 flex-1 flex-col gap-1 overflow-y-auto\"\n >\n {hours.map((hour) => (\n <TimeItem\n key={hour}\n value={String(hour)}\n disabled={isHourDisabled?.(hour, current.period)}\n recommended={isHourRecommended?.(hour, current.period)}\n >\n {pad(hour)}\n </TimeItem>\n ))}\n </ToggleGroupPrimitive.Root>\n <div className=\"flex h-full items-center text-ui-label-large text-surface-foreground\" aria-hidden=\"true\">\n :\n </div>\n <ToggleGroupPrimitive.Root\n type=\"single\"\n aria-label=\"Minute\"\n value={String(current.minute)}\n onValueChange={(next) => next && onValueChange?.({ ...current, minute: Number(next) })}\n className=\"flex h-full min-w-0 flex-1 flex-col gap-1 overflow-y-auto\"\n >\n {minutes.map((minute) => (\n <TimeItem\n key={minute}\n value={String(minute)}\n disabled={isMinuteDisabled?.(minute, current.hour, current.period)}\n recommended={isMinuteRecommended?.(minute, current.hour, current.period)}\n >\n {pad(minute)}\n </TimeItem>\n ))}\n </ToggleGroupPrimitive.Root>\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { Tabs as TabsPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { TabNavigationContext } from './TabNavigation';\n\nexport type TabItemProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>;\n\n// Figma: Tab Item (08). The shape and states follow the parent TabNavigation variant.\nconst base =\n 'inline-flex h-7 items-center justify-center gap-1 whitespace-nowrap px-2.5 py-1 text-ui-label transition-colors disabled:pointer-events-none disabled:opacity-50';\nconst filter =\n 'rounded-full text-surface-foreground hover:text-accent data-[state=active]:bg-secondary data-[state=active]:bg-linear-to-r data-[state=active]:from-overlay-dark-5 data-[state=active]:to-overlay-dark-5 data-[state=active]:hover:bg-accent-soft data-[state=active]:hover:bg-none data-[state=active]:hover:text-accent-soft-foreground disabled:text-muted-foreground';\nconst toggle =\n 'rounded-sm text-secondary-muted-foreground hover:text-surface-foreground data-[state=active]:bg-surface data-[state=active]:text-surface-foreground';\n\nexport const TabItem = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Trigger>, TabItemProps>(\n ({ className, ...props }, ref) => {\n const variant = React.useContext(TabNavigationContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(base, variant === 'toggle' ? toggle : filter, className)}\n {...props}\n />\n );\n },\n);\nTabItem.displayName = 'TabItem';\n","import * as React from 'react';\nimport { Tabs as TabsPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\n/** `filter` is the pill-shaped table filter; `toggle` is the icon-only mode switch. */\nexport type TabNavigationVariant = 'filter' | 'toggle';\n\nexport const TabNavigationContext = React.createContext<TabNavigationVariant>('filter');\n\nconst tabNavigationVariants = cva('inline-flex items-start gap-1 p-0.5', {\n variants: {\n variant: {\n filter: 'rounded-full border border-border bg-surface',\n toggle: 'rounded-md bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5',\n },\n },\n defaultVariants: { variant: 'filter' },\n});\n\n/** Radix `Tabs.Root` — owns the selected value; pair with `TabNavigation` + `TabItem` + `TabsContent`. */\nexport const Tabs = TabsPrimitive.Root;\nexport const TabsContent = TabsPrimitive.Content;\n\nexport interface TabNavigationProps\n extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>,\n VariantProps<typeof tabNavigationVariants> {}\n\nexport const TabNavigation = React.forwardRef<React.ElementRef<typeof TabsPrimitive.List>, TabNavigationProps>(\n ({ className, variant = 'filter', ...props }, ref) => (\n <TabNavigationContext.Provider value={variant ?? 'filter'}>\n <TabsPrimitive.List ref={ref} className={cn(tabNavigationVariants({ variant }), className)} {...props} />\n </TabNavigationContext.Provider>\n ),\n);\nTabNavigation.displayName = 'TabNavigation';\n","import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport { cn } from '../../lib/utils';\nimport { Label } from './Label';\n\nexport const Form = FormProvider;\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nexport function FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(props: ControllerProps<TFieldValues, TName>) {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nexport function useFormField() {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext?.name });\n\n if (!fieldContext) {\n throw new Error('useFormField must be used within <FormField>');\n }\n if (!itemContext) {\n throw new Error('useFormField must be used within <FormItem>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n}\n\nexport type FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FormItem = React.forwardRef<HTMLDivElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('flex flex-col gap-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\nFormItem.displayName = 'FormItem';\n\n// Deliberately not `ComponentPropsWithoutRef<typeof Label>` — that type\n// transitively references a private @radix-ui/react-label type that tsup's\n// declaration build can't re-export portably. Label's own prop surface is\n// just native label attributes, so this is equivalent.\nexport type FormLabelProps = React.LabelHTMLAttributes<HTMLLabelElement>;\n\nexport const FormLabel = React.forwardRef<HTMLLabelElement, FormLabelProps>(\n ({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n return (\n <Label\n ref={ref}\n htmlFor={formItemId}\n className={cn(error && 'text-destructive-foreground', className)}\n {...props}\n />\n );\n },\n);\nFormLabel.displayName = 'FormLabel';\n\nexport type FormControlProps = React.ComponentPropsWithoutRef<typeof Slot.Root>;\n\nexport const FormControl = React.forwardRef<React.ElementRef<typeof Slot.Root>, FormControlProps>((props, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n return (\n <Slot.Root\n ref={ref}\n id={formItemId}\n aria-describedby={error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId}\n aria-invalid={!!error}\n {...props}\n />\n );\n});\nFormControl.displayName = 'FormControl';\n\nexport type FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nexport const FormDescription = React.forwardRef<HTMLParagraphElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-sm text-secondary-muted-foreground', className)}\n {...props}\n />\n );\n },\n);\nFormDescription.displayName = 'FormDescription';\n\nexport type FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nexport const FormMessage = React.forwardRef<HTMLParagraphElement, FormMessageProps>(\n ({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn('text-sm text-destructive-foreground', className)} {...props}>\n {body}\n </p>\n );\n },\n);\nFormMessage.displayName = 'FormMessage';\n","import * as React from 'react';\nimport { PencilSimple } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { fieldSurfaceClasses } from './Field';\n\nexport interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {\n /** Controlled value. Pair with `onValueChange`. */\n value?: string;\n defaultValue?: string;\n /** Called when an edit is committed (Enter, blur or the commit key for multiline) with a changed value. */\n onValueChange?: (value: string) => void;\n /** Shown in read mode, muted, while the value is empty. */\n placeholder?: string;\n /** Accessible name for the read button and the field. Required: there is no visible label. */\n 'aria-label': string;\n /** Use a textarea. Enter inserts a line break; Cmd/Ctrl+Enter commits. */\n multiline?: boolean;\n maxLength?: number;\n disabled?: boolean;\n /** Called when editing starts or ends. */\n onEditingChange?: (editing: boolean) => void;\n /** Called on every keystroke while editing (and with the saved value when editing ends), e.g. for a live character counter. */\n onDraftChange?: (value: string) => void;\n /**\n * `default` is a rounded field. A short single-line label shows the pencil and hugs its text; `multiline` (longer\n * text) hides the pencil and fills the width. `question` is for question text: it fills the width with no pencil,\n * has square corners and shows a 1px bottom border on hover and focus (in the input border colour) that becomes a bolder 2px accent border while `selected`. Enter saves; Shift+Enter adds a\n * line break when `multiline`.\n */\n variant?: 'default' | 'question';\n /** `question` variant: keeps the bottom border while the owning question is selected. */\n selected?: boolean;\n /** Classes for the displayed/edited text, e.g. a heading text style. The field itself keeps the same box. */\n textClassName?: string;\n}\n\n// Not in Figma: shadcn has no inline-edit primitive, so this is a plain toggle between a button and a field.\n// Read mode is a button (so it is keyboard- and screen-reader-reachable); editing swaps in an input that commits on\n// Enter/blur and reverts on Escape.\nexport const InlineEdit = React.forwardRef<HTMLDivElement, InlineEditProps>(\n (\n {\n className,\n textClassName,\n value: valueProp,\n defaultValue = '',\n onValueChange,\n placeholder = 'Click to edit',\n multiline,\n maxLength,\n disabled,\n onEditingChange,\n onDraftChange,\n variant = 'default',\n selected,\n 'aria-label': ariaLabel,\n ...props\n },\n ref,\n ) => {\n const [internal, setInternal] = React.useState(defaultValue);\n const value = valueProp ?? internal;\n const [editing, setEditing] = React.useState(false);\n const [draft, setDraft] = React.useState(value);\n const fieldRef = React.useRef<HTMLInputElement & HTMLTextAreaElement>(null);\n const readRef = React.useRef<HTMLButtonElement>(null);\n // Set while an Escape revert is pending so the blur that follows it does not commit.\n const cancelled = React.useRef(false);\n const restoreFocus = React.useRef(false);\n\n React.useEffect(() => {\n if (editing) {\n fieldRef.current?.focus();\n fieldRef.current?.select();\n } else if (restoreFocus.current) {\n restoreFocus.current = false;\n readRef.current?.focus();\n }\n }, [editing]);\n\n const start = () => {\n if (disabled) return;\n setDraft(value);\n cancelled.current = false;\n setEditing(true);\n onEditingChange?.(true);\n };\n const finish = (commit: boolean, refocus: boolean) => {\n restoreFocus.current = refocus;\n if (commit && draft !== value) {\n if (valueProp === undefined) setInternal(draft);\n onValueChange?.(draft);\n }\n setEditing(false);\n onEditingChange?.(false);\n onDraftChange?.(commit ? draft : value);\n };\n\n const textClasses = cn('text-ui-input-value text-surface-foreground', textClassName);\n const question = variant === 'question';\n // Longer text and question text fill the box and drop the pencil; a short label hugs its text.\n const fill = multiline || question;\n\n return (\n <div ref={ref} className={cn(fill ? 'flex w-full min-w-0' : 'inline-flex min-w-0 max-w-full', className)} {...props}>\n {editing ? (\n React.createElement(multiline ? 'textarea' : 'input', {\n ref: fieldRef,\n value: draft,\n maxLength,\n 'aria-label': ariaLabel,\n ...(multiline ? { rows: 1 } : { type: 'text' }),\n className: cn(\n 'w-full px-3 py-1 outline-none',\n multiline && 'field-sizing-content resize-none',\n question\n ? 'rounded-none border-0 border-b-2 border-accent-foreground bg-transparent'\n : cn('rounded-md focus-visible:border-input-accent', fieldSurfaceClasses('default')),\n textClasses,\n ),\n onChange: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n setDraft(event.target.value);\n onDraftChange?.(event.target.value);\n },\n onKeyDown: (event: React.KeyboardEvent) => {\n if (event.key === 'Escape') {\n cancelled.current = true;\n finish(false, true);\n } else if (\n event.key === 'Enter' &&\n (!multiline || event.metaKey || event.ctrlKey || (question && !event.shiftKey))\n ) {\n event.preventDefault();\n finish(true, true);\n }\n },\n onBlur: () => {\n if (!cancelled.current) finish(true, false);\n },\n })\n ) : (\n <button\n ref={readRef}\n type=\"button\"\n disabled={disabled}\n aria-label={`${ariaLabel}: ${value || placeholder}. Edit`}\n onClick={start}\n className={cn(\n 'group inline-flex min-w-0 max-w-full items-center gap-2 px-3 text-left outline-none',\n fill && 'w-full',\n question\n ? // Hover and focus show a 1px bottom border in the input colour; only a selected question gets the 2px accent\n // one. The extra 1px of bottom padding keeps the height identical so the text never jumps.\n selected\n ? 'rounded-none border-b-2 border-accent-foreground py-1'\n : 'rounded-none border-b border-transparent pb-1.25 pt-1 enabled:hover:border-input enabled:focus-visible:border-input'\n : 'rounded-md border border-transparent py-1 enabled:focus-visible:border-input-accent',\n 'enabled:hover:bg-secondary disabled:cursor-not-allowed disabled:opacity-50',\n textClasses,\n )}\n >\n <span className={cn('min-w-0', multiline ? 'whitespace-pre-wrap' : 'truncate', fill && 'flex-1', !value && 'text-muted-foreground')}>\n {value || placeholder}\n </span>\n {!fill && (\n <PencilSimple\n size={16}\n aria-hidden\n className=\"shrink-0 text-secondary-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100\"\n />\n )}\n </button>\n )}\n </div>\n );\n },\n);\nInlineEdit.displayName = 'InlineEdit';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Field, fieldSurfaceClasses, type FieldStatus } from './Field';\n\nexport interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n /** Border/message state. `error` also sets `aria-invalid`. */\n status?: FieldStatus;\n /** Convenience: renders a Field (label + helper/status message) around the input. */\n label?: React.ReactNode;\n description?: React.ReactNode;\n message?: React.ReactNode;\n}\n\n// Figma: Text Input (19) — 40px tall, 12px inline padding, 8px radius, 16px value.\nconst inputClasses = (status: FieldStatus | undefined, className?: string) =>\n cn(\n 'flex h-10 w-full rounded-md px-3 py-2 text-ui-input-value placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n fieldSurfaceClasses(status),\n className,\n );\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, status = 'default', label, description, message, id, ...props }, ref) => {\n if (label == null && description == null && message == null) {\n return (\n <input\n ref={ref}\n id={id}\n aria-invalid={status === 'error' ? true : undefined}\n className={inputClasses(status, className)}\n {...props}\n />\n );\n }\n return (\n <Field label={label} description={description} message={message} status={status} id={id}>\n {(control) => <input ref={ref} className={inputClasses(status, className)} {...control} {...props} />}\n </Field>\n );\n },\n);\nInput.displayName = 'Input';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Field, type FieldStatus } from './Field';\n\nexport interface InputWithActionProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n /** Label of the trailing action button. */\n actionLabel: string;\n onAction?: React.MouseEventHandler<HTMLButtonElement>;\n /** Chips (e.g. `EditableTag`s) shown inside the field before the input. */\n tags?: React.ReactNode;\n status?: Exclude<FieldStatus, 'success'>;\n label?: React.ReactNode;\n /** Support text shown under the field. */\n description?: React.ReactNode;\n /** Error message shown when `status` is `error`. */\n message?: React.ReactNode;\n}\n\n// Figma: Input with Action (19) — field with a trailing subtle small button (e.g. \"Invite\").\nexport const InputWithAction = React.forwardRef<HTMLInputElement, InputWithActionProps>(\n (\n { className, actionLabel, onAction, tags, status = 'default', label, description, message, id, disabled, placeholder, ...props },\n ref,\n ) => (\n <Field label={label} description={description} message={message} status={status} id={id}>\n {(control) => (\n <div\n className={cn(\n 'flex min-h-10 w-full items-center gap-2 rounded-md border bg-surface py-2 pr-1 pl-3 transition-colors',\n 'focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring',\n status === 'error' ? 'border-destructive' : 'border-input hover:border-input-accent focus-within:border-input',\n tags ? 'pl-1' : null,\n disabled && 'opacity-50',\n className,\n )}\n >\n {tags && <div className=\"flex shrink-0 items-center gap-1\">{tags}</div>}\n <input\n ref={ref}\n disabled={disabled}\n placeholder={tags ? undefined : placeholder}\n className=\"min-w-0 flex-1 truncate bg-transparent text-body-small text-surface-foreground outline-none placeholder:text-muted-foreground\"\n {...control}\n {...props}\n />\n <Button type=\"button\" variant=\"subtle\" size=\"sm\" disabled={disabled} onClick={onAction}>\n {actionLabel}\n </Button>\n </div>\n )}\n </Field>\n ),\n);\nInputWithAction.displayName = 'InputWithAction';\n","import * as React from 'react';\nimport { Minus, Plus } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Field, type FieldStatus } from './Field';\n\nexport interface NumberInputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'type' | 'size'> {\n value?: number;\n defaultValue?: number;\n onValueChange?: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n /** Unit shown after the value (e.g. \"minutes\"). */\n unit?: string;\n status?: FieldStatus;\n label?: React.ReactNode;\n description?: React.ReactNode;\n message?: React.ReactNode;\n}\n\n// Figma: Numerical input (23) — 200px stepper: − / value + unit / +, 40px tall, 4px inner padding.\nexport const NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n className,\n value,\n defaultValue = 0,\n onValueChange,\n min = Number.NEGATIVE_INFINITY,\n max = Number.POSITIVE_INFINITY,\n step = 1,\n unit,\n status = 'default',\n label,\n description,\n message,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const [internal, setInternal] = React.useState(defaultValue);\n const current = value ?? internal;\n const clamp = (next: number) => Math.min(max, Math.max(min, next));\n const commit = (next: number) => {\n const clamped = clamp(next);\n setInternal(clamped);\n onValueChange?.(clamped);\n };\n\n return (\n <Field label={label} description={description} message={message} status={status} id={id} className=\"w-50\">\n {(control) => (\n <div\n className={cn(\n 'flex h-10 w-full items-center justify-between rounded-md border bg-surface p-1 transition-colors',\n 'has-[input:focus-visible]:outline-2 has-[input:focus-visible]:outline-offset-2 has-[input:focus-visible]:outline-ring',\n status === 'error' ? 'border-destructive' : status === 'success' ? 'border-success-foreground' : 'border-border',\n disabled && 'opacity-50',\n className,\n )}\n >\n <Button\n type=\"button\"\n variant=\"subtle\"\n size=\"icon-sm\"\n aria-label=\"Decrease\"\n disabled={disabled || current <= min}\n onClick={() => commit(current - step)}\n >\n <Minus size={16} aria-hidden />\n </Button>\n <div className=\"flex items-center justify-center gap-1 text-center\">\n <input\n ref={ref}\n role=\"spinbutton\"\n inputMode=\"numeric\"\n aria-valuenow={current}\n aria-valuemin={Number.isFinite(min) ? min : undefined}\n aria-valuemax={Number.isFinite(max) ? max : undefined}\n disabled={disabled}\n value={String(current)}\n size={Math.max(1, String(current).length)}\n onChange={(event) => {\n const parsed = Number(event.target.value.replace(/[^\\d.-]/g, ''));\n if (!Number.isNaN(parsed)) commit(parsed);\n }}\n onKeyDown={(event) => {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n commit(current + step);\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n commit(current - step);\n }\n }}\n className=\"min-w-0 bg-transparent text-center text-ui-label text-surface-foreground outline-none\"\n {...control}\n {...props}\n />\n {unit && <span className=\"text-body-small text-secondary-muted-foreground\">{unit}</span>}\n </div>\n <Button\n type=\"button\"\n variant=\"subtle\"\n size=\"icon-sm\"\n aria-label=\"Increase\"\n disabled={disabled || current >= max}\n onClick={() => commit(current + step)}\n >\n <Plus size={16} aria-hidden />\n </Button>\n </div>\n )}\n </Field>\n );\n },\n);\nNumberInput.displayName = 'NumberInput';\n","import * as React from 'react';\nimport { MagnifyingGlass, X } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface SearchBarProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /** Called when the clear (×) button is pressed, after the field has been emptied. */\n onClear?: () => void;\n /** Label for the clear button. */\n clearLabel?: string;\n}\n\n// Figma: Search Bar (18) — 40px, 1px muted border; focused/filled gets a 2px accent border.\nexport const SearchBar = React.forwardRef<HTMLInputElement, SearchBarProps>(\n ({ className, value, defaultValue, onChange, onClear, clearLabel = 'Clear search', disabled, ...props }, ref) => {\n const innerRef = React.useRef<HTMLInputElement>(null);\n React.useImperativeHandle(ref, () => innerRef.current as HTMLInputElement);\n const [uncontrolled, setUncontrolled] = React.useState(String(defaultValue ?? ''));\n const current = value !== undefined ? String(value) : uncontrolled;\n\n const clear = () => {\n const input = innerRef.current;\n if (input) {\n // Drive the native setter so React's onChange fires for controlled consumers too.\n const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set;\n setter?.call(input, '');\n input.dispatchEvent(new Event('input', { bubbles: true }));\n input.focus();\n }\n onClear?.();\n };\n\n return (\n <div\n className={cn(\n 'flex h-10 w-full items-center gap-2 rounded-md border bg-surface px-3 py-2 transition-colors',\n 'border-input focus-within:border-input-accent focus-within:ring-1 focus-within:ring-input-accent',\n current !== '' && 'border-input-accent ring-1 ring-input-accent',\n disabled && 'opacity-50',\n className,\n )}\n >\n <MagnifyingGlass size={16} aria-hidden className=\"shrink-0 text-surface-foreground\" />\n <input\n ref={innerRef}\n type=\"text\"\n role=\"searchbox\"\n value={value}\n defaultValue={defaultValue}\n disabled={disabled}\n onChange={(event) => {\n setUncontrolled(event.target.value);\n onChange?.(event);\n }}\n className=\"min-w-0 flex-1 bg-transparent text-ui-input-value text-surface-foreground outline-none placeholder:text-muted-foreground\"\n {...props}\n />\n {current !== '' && !disabled && (\n <button\n type=\"button\"\n aria-label={clearLabel}\n onClick={clear}\n className=\"inline-flex size-4 shrink-0 items-center justify-center rounded-xs text-surface-foreground\"\n >\n <X size={16} aria-hidden />\n </button>\n )}\n </div>\n );\n },\n);\nSearchBar.displayName = 'SearchBar';\n","import * as React from 'react';\nimport { CaretDown } from '@phosphor-icons/react';\nimport { Select as SelectPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport const Select = SelectPrimitive.Root;\nexport const SelectValue = SelectPrimitive.Value;\nexport const SelectGroup = SelectPrimitive.Group;\n\nconst CheckIcon = () => (\n <svg width=\"10\" height=\"8\" viewBox=\"0 0 10 8\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M1 4L3.5 6.5L9 1\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\nexport interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {\n /** Leading icon (Figma: \"With label = No\" shows a gear). */\n icon?: React.ReactNode;\n}\n\n// Figma: Select / Dropdown (22) — 40px, 8px radius; the open (\"select\") state takes the accent border.\nexport const SelectTrigger = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(\n ({ className, children, icon, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex h-10 w-full items-center gap-2 rounded-md border border-input bg-surface px-3 py-2 text-left text-ui-input-value text-surface-foreground transition-colors',\n 'hover:border-input-accent data-[state=open]:border-input-accent',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'data-[placeholder]:text-muted-foreground',\n className,\n )}\n {...props}\n >\n {icon && <span className=\"flex shrink-0 text-surface-foreground\">{icon}</span>}\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <SelectPrimitive.Icon className=\"shrink-0 text-surface-foreground\">\n <CaretDown size={16} aria-hidden />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\nSelectTrigger.displayName = 'SelectTrigger';\n\nexport type SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>;\n\nexport const SelectContent = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Content>, SelectContentProps>(\n ({ className, children, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n // Tailwind has no --z-* theme namespace (it's a fixed static scale,\n // not theme-driven) and Radix's trigger-width variable is layout\n // data, not a design value — both are the rare case DESIGN_TOKENS.md\n // allows raw var() consumption via inline style rather than a\n // Tailwind class, arbitrary-value bracket syntax included.\n style={{\n zIndex: 'var(--sys-z-20)',\n width: position === 'popper' ? 'var(--radix-select-trigger-width)' : undefined,\n }}\n className={cn(\n 'overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md',\n className,\n )}\n {...props}\n >\n <SelectPrimitive.Viewport className=\"p-1\">{children}</SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\nSelectContent.displayName = 'SelectContent';\n\nexport type SelectItemProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>;\n\nexport const SelectItem = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Item>, SelectItemProps>(\n ({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-2 pr-4 pl-8 text-sm text-popover-foreground select-none',\n 'outline-none data-[highlighted]:bg-accent-soft data-[highlighted]:text-accent-soft-foreground',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-4 w-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n ),\n);\nSelectItem.displayName = 'SelectItem';\n","import * as React from 'react';\nimport { Slider as SliderPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport interface SliderProps extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {\n /** Text shown above the track on the left (e.g. \"Label\"). The max value is shown on the right. */\n label?: React.ReactNode;\n /** Show the min and max values above the track instead of a label. */\n showRange?: boolean;\n /**\n * Show the current value in a bubble above the thumb. `true` shows it while\n * the thumb is hovered, focused or dragged; `'always'` keeps it visible.\n */\n showValue?: boolean | 'always';\n}\n\n// Figma: Slider (26) — 4px `muted` track, `input-accent` fill, 16px accent thumb, `primary` value bubble.\nexport const Slider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.Root>, SliderProps>(\n (\n {\n className,\n value,\n defaultValue,\n onValueChange,\n min = 0,\n max = 100,\n label,\n showRange,\n showValue,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n },\n ref,\n ) => {\n const [internal, setInternal] = React.useState<number[]>(defaultValue ?? [min]);\n const thumbValues = value ?? internal;\n const hasHeader = label != null || showRange;\n\n return (\n <div className={cn('flex w-full flex-col gap-2', className)}>\n {hasHeader && (\n <div className=\"flex items-center justify-between text-secondary-muted-foreground\">\n {label != null ? (\n <span className=\"text-ui-label text-surface-foreground\">{label}</span>\n ) : (\n <span className=\"text-ui-caption\">{min}</span>\n )}\n <span className=\"text-body-small\">{max}</span>\n </div>\n )}\n <SliderPrimitive.Root\n ref={ref}\n value={value}\n defaultValue={defaultValue}\n min={min}\n max={max}\n onValueChange={(next) => {\n setInternal(next);\n onValueChange?.(next);\n }}\n className=\"relative flex h-4 w-full touch-none items-center select-none\"\n {...props}\n >\n <SliderPrimitive.Track className=\"relative h-1 w-full grow overflow-hidden rounded-xxs bg-muted\">\n <SliderPrimitive.Range className=\"absolute h-full bg-input-accent\" />\n </SliderPrimitive.Track>\n {thumbValues.map((thumbValue, index) => (\n // The accessible name belongs on each individual thumb (the actual\n // role=\"slider\" element) — Root is just a group container. With\n // more than one thumb this applies the same label to each; give a\n // range slider distinct per-thumb labels via aria-labelledby instead.\n <SliderPrimitive.Thumb\n key={index}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n className=\"group relative block size-4 rounded-full border-2 border-surface bg-input-accent shadow-sm transition-colors disabled:pointer-events-none disabled:opacity-50\"\n >\n {showValue && (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'pointer-events-none absolute bottom-full left-1/2 mb-2 flex min-w-4 -translate-x-1/2 items-center justify-center rounded-xs bg-primary p-0.5 text-ui-caption text-label',\n showValue !== 'always' && 'invisible group-hover:visible group-focus-visible:visible group-active:visible',\n )}\n >\n {thumbValue}\n </span>\n )}\n </SliderPrimitive.Thumb>\n ))}\n </SliderPrimitive.Root>\n </div>\n );\n },\n);\nSlider.displayName = 'Slider';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Field, fieldSurfaceClasses, type FieldStatus } from './Field';\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n status?: FieldStatus;\n /** Convenience: renders a Field (label + helper/status message) around the textarea. */\n label?: React.ReactNode;\n description?: React.ReactNode;\n message?: React.ReactNode;\n}\n\n// Figma: Textarea (20) — min 100px tall, 12/10px padding, 8px radius, 16/28 value.\nconst textareaClasses = (status: FieldStatus | undefined, className?: string) =>\n cn(\n 'flex field-sizing-content min-h-25 w-full rounded-md px-3 py-2.5 text-body-base placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n fieldSurfaceClasses(status),\n className,\n );\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, status = 'default', label, description, message, id, ...props }, ref) => {\n if (label == null && description == null && message == null) {\n return (\n <textarea\n ref={ref}\n id={id}\n aria-invalid={status === 'error' ? true : undefined}\n className={textareaClasses(status, className)}\n {...props}\n />\n );\n }\n return (\n <Field label={label} description={description} message={message} status={status} id={id}>\n {(control) => <textarea ref={ref} className={textareaClasses(status, className)} {...control} {...props} />}\n </Field>\n );\n },\n);\nTextarea.displayName = 'Textarea';\n","import * as React from 'react';\nimport { X } from '@phosphor-icons/react';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport const Dialog = DialogPrimitive.Root;\nexport const DialogTrigger = DialogPrimitive.Trigger;\nexport const DialogClose = DialogPrimitive.Close;\n\nexport interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {\n /** Label for the corner close button. */\n closeLabel?: string;\n /** Hide the corner close button (e.g. when the footer is the only way out). */\n hideClose?: boolean;\n}\n\n// Figma: Dialog / Modal (48) — 600px card on a 30% `primary` scrim; 12px radius, `shadow-lg`.\nexport const DialogContent = React.forwardRef<React.ElementRef<typeof DialogPrimitive.Content>, DialogContentProps>(\n ({ className, children, closeLabel = 'Close', hideClose, ...props }, ref) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n style={{ zIndex: 'var(--sys-z-30)' }}\n className=\"fixed inset-0 bg-primary/30\"\n />\n <DialogPrimitive.Content\n ref={ref}\n style={{ zIndex: 'var(--sys-z-30)' }}\n className={cn(\n 'fixed top-1/2 left-1/2 flex w-150 max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-lg border border-border bg-surface shadow-lg',\n className,\n )}\n {...props}\n >\n {children}\n {!hideClose && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label={closeLabel} className=\"absolute top-4 right-6\">\n <X size={16} aria-hidden />\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n ),\n);\nDialogContent.displayName = 'DialogContent';\n\nexport const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-1.5 border-b border-border px-6 py-4 pr-16', className)} {...props} />\n);\n\nexport const DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg leading-6 font-semibold text-surface-foreground', className)}\n {...props}\n />\n));\nDialogTitle.displayName = 'DialogTitle';\n\nexport const DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-body-small text-secondary-muted-foreground', className)}\n {...props}\n />\n));\nDialogDescription.displayName = 'DialogDescription';\n\nexport const DialogBody = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-4 p-6', className)} {...props} />\n);\n\nexport const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex items-center justify-end gap-3 border-t border-border px-6 py-4', className)} {...props} />\n);\n","import * as React from 'react';\nimport { CheckCircle, Info, Warning, WarningCircle, X } from '@phosphor-icons/react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Toast as ToastPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport type ToastVariant = 'info' | 'success' | 'warning' | 'destructive';\n\nconst toastVariants = cva('border', {\n variants: {\n variant: {\n info: 'border-info-border bg-surface',\n success: 'border-success-soft-border bg-success-soft',\n warning: 'border-warning-soft-border bg-warning-soft',\n destructive: 'border-destructive-soft-border bg-destructive-soft',\n },\n },\n defaultVariants: { variant: 'info' },\n});\n\nconst iconColour: Record<ToastVariant, string> = {\n info: 'text-surface-foreground',\n success: 'text-success-soft-foreground',\n warning: 'text-warning-soft-foreground',\n destructive: 'text-destructive-soft-foreground',\n};\n\nconst titleColour: Record<ToastVariant, string> = {\n info: 'text-surface-foreground',\n success: 'text-success-soft-foreground',\n warning: 'text-warning-soft-foreground',\n destructive: 'text-destructive-soft-foreground',\n};\n\nfunction VariantIcon({ variant, size }: { variant: ToastVariant; size: number }) {\n const props = { size, 'aria-hidden': true, className: cn('shrink-0', iconColour[variant]) } as const;\n if (variant === 'success') return <CheckCircle {...props} />;\n if (variant === 'warning') return <Warning {...props} />;\n if (variant === 'destructive') return <WarningCircle {...props} />;\n return <Info {...props} />;\n}\n\nexport const ToastProvider = ToastPrimitive.Provider;\n\nexport const ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitive.Viewport\n ref={ref}\n style={{ zIndex: 'var(--sys-z-50)' }}\n className={cn('fixed right-4 bottom-4 flex w-89 max-w-full flex-col gap-3 outline-none', className)}\n {...props}\n />\n));\nToastViewport.displayName = 'ToastViewport';\n\nexport interface ToastProps\n extends Omit<React.ComponentPropsWithoutRef<typeof ToastPrimitive.Root>, 'title'>,\n VariantProps<typeof toastVariants> {\n /** Bold first line. */\n title?: React.ReactNode;\n description?: React.ReactNode;\n /** Optional action button (e.g. Undo). Wrap it in `ToastAction`. */\n action?: React.ReactNode;\n closeLabel?: string;\n}\n\n// Figma: Toast / Sonner (52) › Toast — 356px card with a 20px status icon, title, description and close.\nexport const Toast = React.forwardRef<React.ElementRef<typeof ToastPrimitive.Root>, ToastProps>(\n ({ className, variant = 'info', title, description, action, closeLabel = 'Close', children, ...props }, ref) => {\n const v = variant ?? 'info';\n return (\n <ToastPrimitive.Root\n ref={ref}\n // Errors interrupt; everything else is polite.\n type={v === 'destructive' ? 'foreground' : 'background'}\n className={cn('flex items-start gap-3 rounded-lg p-4 shadow-lg', toastVariants({ variant: v }), className)}\n {...props}\n >\n <VariantIcon variant={v} size={20} />\n <div className=\"flex min-w-0 flex-1 flex-col gap-1 text-body-small\">\n {title != null && (\n <ToastPrimitive.Title className={cn('font-semibold', titleColour[v])}>{title}</ToastPrimitive.Title>\n )}\n {description != null && (\n <ToastPrimitive.Description className=\"text-secondary-muted-foreground\">{description}</ToastPrimitive.Description>\n )}\n {children}\n {action}\n </div>\n <ToastPrimitive.Close\n aria-label={closeLabel}\n className=\"inline-flex size-4 shrink-0 items-center justify-center rounded-xs text-surface-foreground\"\n >\n <X size={16} aria-hidden />\n </ToastPrimitive.Close>\n </ToastPrimitive.Root>\n );\n },\n);\nToast.displayName = 'Toast';\n\nexport const ToastAction = ToastPrimitive.Action;\n\nexport interface ToastInlineProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof toastVariants> {\n /** Show a close button and call this when it is pressed. */\n onClose?: () => void;\n closeLabel?: string;\n}\n\n// Figma: Toast Inline — a single-line banner (46px) for in-page messages.\nexport const ToastInline = React.forwardRef<HTMLDivElement, ToastInlineProps>(\n ({ className, variant = 'info', onClose, closeLabel = 'Close', children, ...props }, ref) => {\n const v = variant ?? 'info';\n return (\n <div\n ref={ref}\n role={v === 'destructive' ? 'alert' : 'status'}\n className={cn('flex items-center gap-2 rounded-sm px-2 py-1.5', toastVariants({ variant: v }), className)}\n {...props}\n >\n <VariantIcon variant={v} size={16} />\n <p className=\"min-w-0 flex-1 text-body-small text-secondary-muted-foreground\">{children}</p>\n {onClose && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" aria-label={closeLabel} onClick={onClose}>\n <X size={16} aria-hidden />\n </Button>\n )}\n </div>\n );\n },\n);\nToastInline.displayName = 'ToastInline';\n","import * as React from 'react';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\nexport const Tooltip = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\nexport interface TooltipContentProps extends Omit<React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, 'title'> {\n /** Bold first line. With `description` this is the Descriptive tooltip. */\n title?: React.ReactNode;\n description?: React.ReactNode;\n /** Underlined action line under the description — the Rich tooltip. Usually a link or button. */\n action?: React.ReactNode;\n /** Show the pointer arrow toward the trigger. */\n arrow?: boolean;\n}\n\n// Figma: Tooltip (51) — `primary-soft-foreground` plum card, 6px radius. Simple = one line of label text;\n// Descriptive = title + description; Rich = adds an action link.\nexport const TooltipContent = React.forwardRef<React.ElementRef<typeof TooltipPrimitive.Content>, TooltipContentProps>(\n ({ className, sideOffset = 4, title, description, action, arrow = true, children, ...props }, ref) => {\n const detailed = title != null || description != null;\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n style={{ zIndex: 'var(--sys-z-40)' }}\n className={cn(\n 'rounded-sm bg-primary-soft-foreground text-label shadow-md',\n detailed ? 'flex max-w-60 min-w-50 flex-col gap-1 px-3 py-2.5' : 'px-2.5 py-1.5 text-ui-caption',\n action != null && 'max-w-65 min-w-55',\n className,\n )}\n {...props}\n >\n {detailed ? (\n <>\n {title != null && <p className=\"text-xs leading-4 font-semibold text-label\">{title}</p>}\n {description != null && <p className=\"text-xs leading-4.5 text-plum-200\">{description}</p>}\n {action != null && (\n <div className=\"mt-1 text-ui-caption text-plum-300 underline *:underline\">{action}</div>\n )}\n </>\n ) : (\n children\n )}\n {arrow && <TooltipPrimitive.Arrow width={12} height={8} className=\"fill-primary-soft-foreground\" />}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n },\n);\nTooltipContent.displayName = 'TooltipContent';\n","import * as React from 'react';\nimport { FileText, X } from '@phosphor-icons/react';\nimport { Progress as ProgressPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Tag } from '../Tags & Badges/Tag';\n\nexport interface FileUploadZoneProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'title' | 'type'> {\n title?: React.ReactNode;\n /** Supported formats line. */\n hint?: React.ReactNode;\n icon?: React.ReactNode;\n /** Called with the chosen or dropped files. */\n onFiles?: (files: File[]) => void;\n}\n\n// Figma: Question types › PDF, PPTX, or DOCX › Upload_Zone (568:6389) — a 143px dashed drop target with an icon, title and hint; hover fills with the page background.\nexport const FileUploadZone = React.forwardRef<HTMLInputElement, FileUploadZoneProps>(\n ({ className, title = 'Upload document', hint, icon, onFiles, ...props }, ref) => {\n const [over, setOver] = React.useState(false);\n return (\n <label\n className={cn(\n 'flex min-h-35.75 w-full cursor-pointer flex-col items-center justify-center gap-2 rounded-md border-2 border-dashed border-border px-4 text-center transition-colors',\n 'hover:bg-background has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-ring',\n over && 'border-input-accent bg-accent-soft',\n className,\n )}\n onDragOver={(event) => {\n event.preventDefault();\n setOver(true);\n }}\n onDragLeave={() => setOver(false)}\n onDrop={(event) => {\n event.preventDefault();\n setOver(false);\n onFiles?.(Array.from(event.dataTransfer.files));\n }}\n >\n <span className=\"flex size-10 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground\">\n {icon ?? <FileText size={24} aria-hidden />}\n </span>\n <span className=\"flex flex-col gap-1\">\n <span className=\"text-body-small text-surface-foreground\">{title}</span>\n {hint && <span className=\"text-ui-caption text-secondary-muted-foreground\">{hint}</span>}\n </span>\n <input\n ref={ref}\n type=\"file\"\n className=\"sr-only\"\n onChange={(event) => onFiles?.(Array.from(event.target.files ?? []))}\n {...props}\n />\n </label>\n );\n },\n);\nFileUploadZone.displayName = 'FileUploadZone';\n\nexport interface FileUploadItemProps extends React.HTMLAttributes<HTMLDivElement> {\n name: string;\n /** File size text, e.g. \"443KB\". */\n size?: string;\n status?: 'uploading' | 'complete' | 'error';\n /** 0–100, shown while uploading. */\n progress?: number;\n /** Remaining time text while uploading, e.g. \"2 seconds left\". */\n timeLeft?: string;\n icon?: React.ReactNode;\n onRemove?: () => void;\n removeLabel?: string;\n}\n\n// Figma: File upload (339:2168) — a row with the file, its status and, while uploading, a thin progress bar.\nexport const FileUploadItem = React.forwardRef<HTMLDivElement, FileUploadItemProps>(\n ({ className, name, size, status = 'uploading', progress = 0, timeLeft, icon, onRemove, removeLabel, ...props }, ref) => {\n const uploading = status === 'uploading';\n return (\n <div\n ref={ref}\n className={cn('flex w-full flex-col justify-center gap-2 overflow-hidden rounded-sm border border-border p-2', className)}\n {...props}\n >\n <div className=\"flex items-center gap-2\">\n <span className=\"flex size-10 shrink-0 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground\">\n {icon ?? <FileText size={24} aria-hidden />}\n </span>\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <div className=\"flex items-center justify-between gap-2\">\n <p className=\"min-w-0 truncate text-ui-label text-surface-foreground\">{name}</p>\n {onRemove && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" aria-label={removeLabel ?? `Remove ${name}`} onClick={onRemove}>\n <X size={16} aria-hidden />\n </Button>\n )}\n </div>\n <div className=\"flex items-center justify-between text-ui-caption text-secondary-muted-foreground\">\n <span className=\"flex items-center gap-2\">\n {size}\n {status === 'complete' && <Tag variant=\"success\">Complete</Tag>}\n {status === 'error' && <Tag variant=\"destructive\">Error</Tag>}\n {uploading && timeLeft && (\n <>\n <span aria-hidden=\"true\" className=\"size-0.5 rounded-full bg-secondary-muted-foreground\" />\n {timeLeft}\n </>\n )}\n </span>\n {uploading && <span className=\"text-body-xxs font-normal\">{Math.round(progress)}%</span>}\n </div>\n </div>\n </div>\n {uploading && (\n <ProgressPrimitive.Root\n value={progress}\n aria-label={`Uploading ${name}`}\n className=\"h-0.75 w-full overflow-hidden rounded-sm bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5\"\n >\n <ProgressPrimitive.Indicator className=\"h-full bg-accent transition-[width]\" style={{ width: `${progress}%` }} />\n </ProgressPrimitive.Root>\n )}\n </div>\n );\n },\n);\nFileUploadItem.displayName = 'FileUploadItem';\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\n// Figma: System Tag + Status Tag (41). Border + 6px radius, 12px/16px medium label.\nconst tagVariants = cva(\n 'inline-flex items-center gap-1.5 whitespace-nowrap rounded-sm border px-2.5 py-1 text-ui-caption',\n {\n variants: {\n variant: {\n neutral: 'border-accent-soft-border bg-accent-soft text-accent-soft-foreground',\n default: 'border-border bg-surface text-surface-foreground',\n success: 'border-success-soft-border bg-success-soft text-success-soft-foreground',\n warning: 'border-warning-soft-border bg-warning-soft text-warning-soft-foreground',\n destructive: 'border-destructive-soft-border bg-destructive-soft text-destructive-soft-foreground',\n },\n },\n defaultVariants: { variant: 'neutral' },\n },\n);\n\nexport interface TagProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof tagVariants> {}\n\n/** Read-only label for system states (Live Interview, Self-paced, AI Interview). */\nexport const Tag = React.forwardRef<HTMLSpanElement, TagProps>(({ className, variant, ...props }, ref) => (\n <span ref={ref} className={cn(tagVariants({ variant }), className)} {...props} />\n));\nTag.displayName = 'Tag';\n\nconst statusDotVariants = cva('size-1.5 shrink-0 rounded-full', {\n variants: {\n status: {\n active: 'bg-success-800',\n inactive: 'bg-accent',\n pending: 'bg-warning',\n error: 'bg-destructive',\n },\n },\n defaultVariants: { status: 'active' },\n});\n\nexport interface StatusTagProps\n extends React.HTMLAttributes<HTMLSpanElement>,\n Required<Pick<VariantProps<typeof statusDotVariants>, 'status'>> {}\n\n/** White tag with a coloured status dot (Active / Inactive / Pending / Error). */\nexport const StatusTag = React.forwardRef<HTMLSpanElement, StatusTagProps>(\n ({ className, status, children, ...props }, ref) => (\n <span ref={ref} className={cn(tagVariants({ variant: 'default' }), className)} {...props}>\n <span className={statusDotVariants({ status })} aria-hidden=\"true\" />\n {children}\n </span>\n ),\n);\nStatusTag.displayName = 'StatusTag';\n","import * as React from 'react';\nimport { CornersOut, DotsThree, Image as ImageIcon, Pause, Play, SpeakerSimpleHigh, SpeakerSimpleX, Trash } from '@phosphor-icons/react';\nimport { Slider as SliderPrimitive, ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport interface MediaInfoProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n name: string;\n /** Secondary line parts, e.g. [\"443KB\", \"1/5\"], joined with a dot. */\n details?: string[];\n onRemove?: () => void;\n removeLabel?: string;\n /** Larger name / details (the image preview uses these). */\n large?: boolean;\n}\n\n// Figma: File upload › video-info-section / image preview — file name + details with a trash button.\nexport function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...props }: MediaInfoProps) {\n return (\n <div className={cn('flex items-center justify-between border-t border-border bg-surface px-6 py-4', className)} {...props}>\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n <p className={cn('truncate text-surface-foreground', large ? 'text-body-section' : 'text-ui-label')}>{name}</p>\n {details && (\n <p className={cn('flex items-center gap-2 text-secondary-muted-foreground', large ? 'text-body-small' : 'text-ui-caption')}>\n {details.map((part, index) => (\n <React.Fragment key={part}>\n {index > 0 && <span aria-hidden=\"true\" className=\"size-0.5 rounded-full bg-secondary-muted-foreground\" />}\n {part}\n </React.Fragment>\n ))}\n </p>\n )}\n </div>\n {onRemove && (\n <Button type=\"button\" variant=\"destructive\" size=\"icon\" aria-label={removeLabel ?? `Remove ${name}`} onClick={onRemove}>\n <Trash size={16} aria-hidden />\n </Button>\n )}\n </div>\n );\n}\n\nexport interface ImagePreviewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The image (an `<img>` filling the area). Leave empty for the placeholder fill. */\n children?: React.ReactNode;\n name: string;\n details?: string[];\n onRemove?: () => void;\n}\n\n// Figma: File upload › Image preview — a 12px-radius card: preview area over a name / size / count bar.\nexport const ImagePreview = React.forwardRef<HTMLDivElement, ImagePreviewProps>(\n ({ className, children, name, details, onRemove, ...props }, ref) => (\n <div ref={ref} className={cn('flex w-full flex-col overflow-hidden rounded-lg border border-border', className)} {...props}>\n <div className=\"flex h-84 w-full items-center justify-center bg-accent-soft [&>img]:size-full [&>img]:object-contain\">{children}</div>\n <MediaInfo name={name} details={details} onRemove={onRemove} large />\n </div>\n ),\n);\nImagePreview.displayName = 'ImagePreview';\n\nexport interface ImageThumbnailsProps\n extends Omit<React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>, 'type' | 'value' | 'defaultValue' | 'onValueChange'> {\n /** Slots shown, e.g. 5. Slots past `images.length` render as empty dashed placeholders. */\n max: number;\n images: { id: string; src?: string; alt: string }[];\n value?: string;\n onValueChange?: (id: string) => void;\n}\n\n// Figma: File upload › Image thumbnail — selected (accent-soft + accent border), default, and dashed empty slots.\nexport const ImageThumbnails = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Root>, ImageThumbnailsProps>(\n ({ className, max, images, value, onValueChange, ...props }, ref) => (\n <ToggleGroupPrimitive.Root\n ref={ref}\n type=\"single\"\n value={value ?? ''}\n onValueChange={(next) => next && onValueChange?.(next)}\n className={cn('flex w-full gap-2', className)}\n {...props}\n >\n {Array.from({ length: max }, (_, index) => {\n const image = images[index];\n if (!image) {\n return (\n <span\n key={`empty-${index}`}\n aria-hidden=\"true\"\n className=\"flex h-20 min-w-0 flex-1 items-center justify-center rounded-sm border border-dashed border-border text-accent-foreground\"\n >\n <ImageIcon size={24} />\n </span>\n );\n }\n return (\n <ToggleGroupPrimitive.Item\n key={image.id}\n value={image.id}\n aria-label={image.alt}\n className={cn(\n 'flex h-20 min-w-0 flex-1 items-center justify-center overflow-hidden rounded-sm border border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 p-2 text-surface-foreground transition-colors',\n 'hover:bg-accent-soft hover:bg-none',\n 'data-[state=on]:border-accent-foreground data-[state=on]:bg-accent-soft data-[state=on]:bg-none data-[state=on]:text-accent-foreground',\n )}\n >\n {image.src ? <img src={image.src} alt=\"\" className=\"size-full object-cover\" /> : <ImageIcon size={24} aria-hidden />}\n </ToggleGroupPrimitive.Item>\n );\n })}\n </ToggleGroupPrimitive.Root>\n ),\n);\nImageThumbnails.displayName = 'ImageThumbnails';\n\nconst formatTime = (seconds: number) => {\n const total = Math.max(0, Math.floor(Number.isFinite(seconds) ? seconds : 0));\n return `${Math.floor(total / 60)}:${String(total % 60).padStart(2, '0')}`;\n};\n\nexport interface VideoPlayerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Video source. Without one, the area shows the placeholder fill. */\n src?: string;\n name?: string;\n details?: string[];\n onRemove?: () => void;\n /** Called by the \"more\" (…) button. */\n onMore?: () => void;\n /** Initial time values for static previews (seconds). */\n initialTime?: number;\n initialDuration?: number;\n}\n\n// Figma: File upload › Video player — preview area with a dark control bar (play, seek, time, volume, full screen), then file info.\nexport const VideoPlayer = React.forwardRef<HTMLDivElement, VideoPlayerProps>(\n ({ className, src, name, details, onRemove, onMore, initialTime = 0, initialDuration = 0, ...props }, ref) => {\n const video = React.useRef<HTMLVideoElement>(null);\n const [playing, setPlaying] = React.useState(false);\n const [time, setTime] = React.useState(initialTime);\n const [duration, setDuration] = React.useState(initialDuration);\n const [volume, setVolume] = React.useState(1);\n const muted = volume === 0;\n\n const toggle = () => {\n const el = video.current;\n if (!el) return setPlaying((p) => !p);\n if (el.paused) void el.play();\n else el.pause();\n };\n\n return (\n <div ref={ref} className={cn('flex w-full flex-col overflow-hidden rounded-lg border border-border bg-surface', className)} {...props}>\n <div className=\"relative flex h-60.5 w-full items-end bg-accent-soft\">\n {src && (\n <video\n ref={video}\n src={src}\n className=\"absolute inset-0 size-full object-contain\"\n onPlay={() => setPlaying(true)}\n onPause={() => setPlaying(false)}\n onTimeUpdate={(event) => setTime(event.currentTarget.currentTime)}\n onLoadedMetadata={(event) => setDuration(event.currentTarget.duration)}\n onVolumeChange={(event) => setVolume(event.currentTarget.muted ? 0 : event.currentTarget.volume)}\n />\n )}\n <div className=\"relative flex w-full flex-col gap-2 bg-surface-foreground bg-linear-to-r from-primary/30 to-primary/30 px-4 pt-3 pb-4 text-surface\">\n <SliderPrimitive.Root\n min={0}\n max={duration || 1}\n step={0.1}\n value={[Math.min(time, duration || 1)]}\n onValueChange={([next]) => {\n if (next === undefined) return;\n setTime(next);\n if (video.current) video.current.currentTime = next;\n }}\n className=\"relative flex h-4 w-full touch-none items-center select-none\"\n >\n <SliderPrimitive.Track className=\"relative h-1 w-full grow overflow-hidden rounded-xxs bg-surface/20\">\n <SliderPrimitive.Range className=\"absolute h-full bg-accent-foreground\" />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb aria-label=\"Seek\" className=\"block size-3 rounded-full border-2 border-surface bg-surface shadow-sm\" />\n </SliderPrimitive.Root>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <button\n type=\"button\"\n aria-label={playing ? 'Pause' : 'Play'}\n onClick={toggle}\n className=\"inline-flex size-10 items-center justify-center rounded-full bg-surface/12 text-surface transition-colors hover:bg-surface/20\"\n >\n {playing ? <Pause size={16} weight=\"fill\" aria-hidden /> : <Play size={16} weight=\"fill\" aria-hidden />}\n </button>\n <span className=\"text-ui-label whitespace-nowrap text-surface/80\">\n {formatTime(time)} / {formatTime(duration)}\n </span>\n </div>\n <div className=\"flex items-center gap-2\">\n <VolumeControl\n volume={volume}\n onVolumeChange={(next) => {\n setVolume(next);\n if (video.current) {\n video.current.volume = next;\n video.current.muted = next === 0;\n }\n }}\n />\n <button\n type=\"button\"\n aria-label=\"Full screen\"\n onClick={() => void video.current?.requestFullscreen?.()}\n className=\"inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12\"\n >\n <CornersOut size={16} aria-hidden />\n </button>\n <button\n type=\"button\"\n aria-label=\"More\"\n onClick={onMore}\n className=\"inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12\"\n >\n <DotsThree size={16} aria-hidden />\n </button>\n </div>\n </div>\n </div>\n </div>\n {name && <MediaInfo name={name} details={details} onRemove={onRemove} />}\n <span className=\"sr-only\" aria-live=\"polite\">\n {muted ? 'Muted' : ''}\n </span>\n </div>\n );\n },\n);\nVideoPlayer.displayName = 'VideoPlayer';\n\nexport interface VolumeControlProps {\n /** 0–1. */\n volume: number;\n onVolumeChange: (volume: number) => void;\n className?: string;\n}\n\n// Figma: Volume control — a speaker button that reveals a slider on hover or focus.\nexport function VolumeControl({ volume, onVolumeChange, className }: VolumeControlProps) {\n const last = React.useRef(volume || 1);\n if (volume > 0) last.current = volume;\n return (\n <div className={cn('group/volume flex items-center', className)}>\n <div className=\"w-0 overflow-hidden opacity-0 transition-all group-focus-within/volume:w-16 group-focus-within/volume:opacity-100 group-hover/volume:w-16 group-hover/volume:opacity-100\">\n <SliderPrimitive.Root\n min={0}\n max={1}\n step={0.05}\n value={[volume]}\n onValueChange={([next]) => next !== undefined && onVolumeChange(next)}\n className=\"relative flex h-4 w-14 touch-none items-center select-none\"\n >\n <SliderPrimitive.Track className=\"relative h-1 w-full grow overflow-hidden rounded-xxs bg-surface/20\">\n <SliderPrimitive.Range className=\"absolute h-full bg-surface\" />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb aria-label=\"Volume\" className=\"block size-3 rounded-full bg-surface shadow-sm\" />\n </SliderPrimitive.Root>\n </div>\n <button\n type=\"button\"\n aria-label={volume === 0 ? 'Unmute' : 'Mute'}\n onClick={() => onVolumeChange(volume === 0 ? last.current : 0)}\n className=\"inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12\"\n >\n {volume === 0 ? <SpeakerSimpleX size={16} aria-hidden /> : <SpeakerSimpleHigh size={16} aria-hidden />}\n </button>\n </div>\n );\n}\n","import * as React from 'react';\n\nimport { Textarea, type TextareaProps } from '../Forms & Data Entry/Textarea';\n\nexport interface OpenEndAnswerProps extends Omit<TextareaProps, 'label' | 'description' | 'message' | 'maxLength'> {\n /** Character limit shown in the counter. */\n maxLength?: number;\n}\n\n// Figma: Question input › Open end — a multi-line field with a live \"0/1000 characters\" counter.\nexport const OpenEndAnswer = React.forwardRef<HTMLTextAreaElement, OpenEndAnswerProps>(\n ({ value, defaultValue, onChange, maxLength = 1000, placeholder = 'Write your answer', ...props }, ref) => {\n const [internal, setInternal] = React.useState(String(defaultValue ?? ''));\n const text = value !== undefined ? String(value) : internal;\n return (\n <Textarea\n ref={ref}\n value={text}\n maxLength={maxLength}\n placeholder={placeholder}\n description={`${text.length}/${maxLength} characters`}\n onChange={(event) => {\n setInternal(event.target.value);\n onChange?.(event);\n }}\n {...props}\n />\n );\n },\n);\nOpenEndAnswer.displayName = 'OpenEndAnswer';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\n// Figma: Question types (282:1491) — every question type sits on a 480px white card, 24px padding, 16px gap.\nexport const QuestionCard = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex w-120 max-w-200 flex-col gap-4 rounded-lg bg-surface p-6', className)}\n {...props}\n />\n ),\n);\nQuestionCard.displayName = 'QuestionCard';\n","import * as React from \"react\";\nimport {\n Clipboard,\n Copy,\n Eye,\n Plus,\n Sparkle,\n Trash,\n} from \"@phosphor-icons/react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../Buttons & Actions/Button\";\nimport { QuestionHeader } from \"./QuestionHeader\";\n\nexport interface QuestionEditorCardProps extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"title\" | \"onChange\"\n> {\n /** Question number shown in the drag-handle tag. */\n number: number;\n title: string;\n onTitleChange?: (title: string) => void;\n /** The question is being edited: accent border, counter and footer are shown. */\n active?: boolean;\n maxLength?: number;\n /** Footer label, e.g. \"4/20 choices\". Shown while `active`. */\n countLabel?: React.ReactNode;\n /** Header actions. Defaults to copy, delete and preview buttons wired to the `on*` callbacks. */\n actions?: React.ReactNode;\n onDuplicate?: () => void;\n onDelete?: () => void;\n onPreview?: () => void;\n /** Sparkle button beside the card, revealed on hover, focus or while `active`. Omit to hide it. */\n onAskAi?: () => void;\n /** Footer: adds an answer choice. Omit (with `onPaste`) to hide the footer buttons. */\n onAdd?: () => void;\n /** Footer: opens paste-many-choices. */\n onPaste?: () => void;\n /** Optional strip under the card body, e.g. an \"Inferred\" assumption note. */\n note?: React.ReactNode;\n /** Makes the \"Question N\" tag a drag handle for reordering. See `QuestionHeader`'s `dragHandleProps`. */\n dragHandleProps?: React.ComponentPropsWithRef<'span'>;\n}\n\n// Figma: Question editor (351:5944) — the authoring card for every question type. Idle is a flat bordered card, hover\n// lifts it and reveals the header actions, active takes the accent border and adds the counter and footer.\nexport const QuestionEditorCard = React.forwardRef<\n HTMLDivElement,\n QuestionEditorCardProps\n>(\n (\n {\n className,\n number,\n title,\n onTitleChange,\n active,\n maxLength,\n countLabel,\n actions,\n onDuplicate,\n onDelete,\n onPreview,\n onAskAi,\n onAdd,\n onPaste,\n note,\n dragHandleProps,\n children,\n ...props\n },\n ref,\n ) => {\n const footer = active && (countLabel != null || onAdd || onPaste);\n return (\n <div\n ref={ref}\n className={cn(\"group/editor flex w-full items-start gap-2\", className)}\n {...props}\n >\n <div\n className={cn(\n \"flex w-full max-w-200 flex-col overflow-hidden rounded-xl border bg-surface transition-shadow group-hover/editor:shadow-lg group-focus-within/editor:shadow-lg\",\n active ? \"border-accent\" : \"border-border\",\n )}\n >\n <div className={cn(\"flex flex-col p-6\", footer ? \"gap-5\" : \"gap-4\")}>\n <div className=\"flex flex-col gap-4\">\n <QuestionHeader\n editor\n number={number}\n title={title}\n onTitleChange={onTitleChange}\n active={active}\n showCounter={!!active}\n dragHandleProps={dragHandleProps}\n maxLength={maxLength}\n actions={\n actions ?? (\n <>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Duplicate question\"\n onClick={onDuplicate}\n >\n <Copy size={16} aria-hidden />\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n size=\"icon-sm\"\n aria-label=\"Delete question\"\n onClick={onDelete}\n >\n <Trash size={16} aria-hidden />\n </Button>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Preview question\"\n onClick={onPreview}\n >\n <Eye size={16} aria-hidden />\n </Button>\n </>\n )\n }\n />\n {children}\n </div>\n {footer && (\n <div className=\"flex items-center justify-between\">\n <p className=\"text-ui-caption text-secondary-muted-foreground\">\n {countLabel}\n </p>\n <div className=\"flex items-center gap-2\">\n {onAdd && (\n <Button type=\"button\" variant=\"outline\" onClick={onAdd}>\n <Plus size={16} aria-hidden />\n Add choice\n </Button>\n )}\n {onPaste && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Paste choices\"\n onClick={onPaste}\n >\n <Clipboard size={16} aria-hidden />\n </Button>\n )}\n </div>\n </div>\n )}\n </div>\n {note && (\n <div className=\"border-t border-border px-2 py-2 text-body-small text-surface-foreground\">\n {note}\n </div>\n )}\n </div>\n {onAskAi && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Ask AI\"\n onClick={onAskAi}\n className=\"shrink-0 opacity-0 transition-opacity group-hover/editor:opacity-100 group-focus-within/editor:opacity-100 focus-visible:opacity-100\"\n >\n <Sparkle size={16} aria-hidden />\n </Button>\n )}\n </div>\n );\n },\n);\nQuestionEditorCard.displayName = \"QuestionEditorCard\";\n","import * as React from 'react';\nimport { DotsSixVertical } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { InlineEdit } from '../Forms & Data Entry/InlineEdit';\nimport { ToastInline } from '../Overlays & Feedback/Toast';\n\nexport interface QuestionHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {\n /** Question number, shown as \"QUESTION 01\". */\n number: number;\n title: React.ReactNode;\n /** Adds the red asterisk after the title. */\n required?: boolean;\n /** Shows an error banner above the header. `true` shows \"This question is mandatory.\"; pass a node for a custom message. */\n error?: boolean | React.ReactNode;\n onDismissError?: () => void;\n /** Editor mode: an editable title with a character counter and hover actions. */\n editor?: boolean;\n /** Editor mode: called as the title is typed. `title` must then be a string. */\n onTitleChange?: (title: string) => void;\n /** Editor mode: action buttons (copy, delete, preview, AI) revealed on hover or focus. */\n actions?: React.ReactNode;\n /** Editor mode: title length limit. */\n maxLength?: number;\n /** Editor mode: the question is being edited — the number tag turns accent. */\n active?: boolean;\n /** Editor mode: show the \"n/2000 characters\" counter. Defaults to `true`. */\n showCounter?: boolean;\n /**\n * Editor mode: turns the \"Question N\" tag into a drag handle. Spread onto the tag, so it takes anything a drag-and-drop\n * library hands out (`ref`, `role`, `tabIndex`, pointer and keyboard listeners, aria attributes). The tag then shows a\n * grab cursor, is focusable and reveals the grip icon on keyboard focus; it is labelled \"Reorder question N\" unless you\n * pass your own `aria-label`. Omit it for the plain tag.\n */\n dragHandleProps?: React.ComponentPropsWithRef<'span'>;\n}\n\nconst eyebrow = 'text-ui-caption uppercase text-secondary-muted-foreground';\n\n// Figma: Question card components (357:4761) › Question_Header — eyebrow + display title; error and editor variants.\nexport const QuestionHeader = React.forwardRef<HTMLDivElement, QuestionHeaderProps>(\n (\n { className, number, title, required, error, onDismissError, editor, onTitleChange, actions, maxLength = 2000, active, showCounter = true, dragHandleProps, ...props },\n ref,\n ) => {\n // Editor mode: live title length while typing; null once editing ends so the saved title is the source of truth.\n const [draft, setDraft] = React.useState<string | null>(null);\n const label = String(number).padStart(2, '0');\n const showError = error !== undefined && error !== false;\n\n if (editor) {\n const text = typeof title === 'string' ? title : '';\n const count = (draft ?? text).length;\n return (\n <div ref={ref} className={cn('group/header flex w-full flex-col gap-2', className)} {...props}>\n <div className=\"flex items-center justify-between\">\n <span\n aria-label={dragHandleProps ? `Reorder question ${number}` : undefined}\n {...dragHandleProps}\n className={cn(\n 'group/handle inline-flex h-6 items-center gap-1 rounded-sm px-2.5 text-ui-caption hover:pl-1',\n // Inside a QuestionEditorCard the tag takes its hover look whenever the card is hovered.\n 'group-hover/editor:pl-1',\n active\n ? 'bg-accent-soft text-accent-soft-foreground'\n : 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground',\n dragHandleProps && 'cursor-grab touch-none select-none focus-visible:pl-1',\n dragHandleProps?.className,\n )}\n >\n <DotsSixVertical\n size={16}\n aria-hidden\n className=\"hidden shrink-0 group-hover/editor:block group-hover/handle:block group-focus-visible/handle:block\"\n />\n Question {number}\n </span>\n {actions && (\n <div className={cn(\n 'flex items-center gap-2 opacity-0 transition-opacity group-focus-within/header:opacity-100 group-hover/header:opacity-100',\n // Inside a QuestionEditorCard, hovering or focusing anywhere on the card reveals them too.\n 'group-focus-within/editor:opacity-100 group-hover/editor:opacity-100',\n )}>\n {actions}\n </div>\n )}\n </div>\n {/* The negative margin cancels InlineEdit's own padding so the text stays flush with the tag above. */}\n <InlineEdit\n variant=\"question\"\n multiline\n selected={active}\n className=\"-mx-3 w-auto\"\n aria-label=\"Question title\"\n placeholder=\"Click to write the question text\"\n value={text}\n maxLength={maxLength}\n onValueChange={onTitleChange}\n onDraftChange={setDraft}\n onEditingChange={(editing) => {\n if (!editing) setDraft(null);\n }}\n textClassName=\"text-heading-h4\"\n />\n {showCounter && (\n <p className=\"text-ui-caption text-secondary-muted-foreground\">\n {count}/{maxLength} characters\n </p>\n )}\n </div>\n );\n }\n\n return (\n <div ref={ref} className={cn('flex w-full flex-col gap-2', className)} {...props}>\n {showError && (\n <ToastInline variant=\"destructive\" onClose={onDismissError} className=\"min-h-10\">\n <span className=\"text-ui-label text-destructive\">{error === true ? 'This question is mandatory.' : error}</span>\n </ToastInline>\n )}\n <p className={eyebrow}>Question {label}</p>\n <h3 className=\"text-heading-h4 text-surface-foreground\">\n {title}\n {required && (\n <span aria-hidden=\"true\" className=\"text-destructive\">\n *\n </span>\n )}\n {required && <span className=\"sr-only\"> (required)</span>}\n </h3>\n </div>\n );\n },\n);\nQuestionHeader.displayName = 'QuestionHeader';\n","import * as React from 'react';\nimport { DotsSixVertical, Warning } from '@phosphor-icons/react';\nimport { Slot } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { QuestionTypeIcon, type QuestionType } from './QuestionTypeIcon';\n\nexport interface QuestionNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** The question currently open in the editor. */\n selected?: boolean;\n /** Question type, shown as the leading 16px duotone icon. */\n questionType?: QuestionType;\n /** The question has validation problems — the type icon becomes a warning icon. */\n error?: boolean;\n /** Render the child element instead of a `<button>` (e.g. a router link). */\n asChild?: boolean;\n}\n\n// Figma: Question navigation (357:4645) — one row per question. Question-type icon (muted; accent when selected), warning on error (destructive border when selected, soft red fill on hover), drag handle on hover. Label is 14px.\nexport const QuestionNavItem = React.forwardRef<HTMLButtonElement, QuestionNavItemProps>(\n ({ className, questionType = 'select-one', selected, error, asChild, children, ...props }, ref) => {\n const Comp = asChild ? Slot.Root : 'button';\n return (\n <Comp\n ref={ref}\n type={asChild ? undefined : 'button'}\n aria-current={selected ? 'true' : undefined}\n className={cn(\n 'group/nav flex h-9.5 w-full max-w-106.5 items-center gap-2 rounded-sm border bg-surface p-2 text-left text-body-small text-surface-foreground transition-colors focus-visible:outline-none',\n error\n ? ['hover:bg-destructive-soft focus-visible:border-destructive', selected ? 'border-destructive' : 'border-border']\n : [\n // Hover only changes the fill; the border stays as it is (default grey, or accent when selected).\n 'hover:bg-accent-soft focus-visible:border-input-accent',\n selected ? 'border-input-accent' : 'border-border',\n ],\n className,\n )}\n {...props}\n >\n <span aria-hidden=\"true\" className=\"relative flex size-4 shrink-0 items-center justify-center\">\n <DotsSixVertical size={16} className=\"hidden group-hover/nav:block\" />\n <span className=\"group-hover/nav:hidden\">\n {error ? (\n <Warning size={16} className=\"text-destructive\" />\n ) : (\n <QuestionTypeIcon\n type={questionType}\n size={16}\n className={selected ? 'text-accent-foreground' : 'text-muted-foreground'}\n />\n )}\n </span>\n </span>\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {error && <span className=\"sr-only\">, has errors</span>}\n </Comp>\n );\n },\n);\nQuestionNavItem.displayName = 'QuestionNavItem';\n","import * as React from 'react';\nimport { ChatsCircle, CheckSquare, FileArrowUp, ListNumbers, RadioButton, StarHalf, type IconProps } from '@phosphor-icons/react';\n\nexport type QuestionType = 'select-one' | 'select-multiple' | 'ranking' | 'upload' | 'rating' | 'open-end';\n\nconst icons: Record<QuestionType, React.ComponentType<IconProps>> = {\n 'select-one': RadioButton,\n 'select-multiple': CheckSquare,\n ranking: ListNumbers,\n upload: FileArrowUp,\n rating: StarHalf,\n 'open-end': ChatsCircle,\n};\n\nexport interface QuestionTypeIconProps extends Omit<IconProps, 'weight'> {\n type: QuestionType;\n}\n\n// Figma: Question types › Question type icons — duotone glyphs in the accent colour (22.5px).\nexport function QuestionTypeIcon({ type, size = 22.5, className, ...props }: QuestionTypeIconProps) {\n const Icon = icons[type];\n return <Icon size={size} weight=\"duotone\" aria-hidden className={className ?? 'text-accent-foreground'} {...props} />;\n}\n","import * as React from 'react';\nimport { Check, DotsSixVertical, Plus, Trash } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Checkbox } from '../Forms & Data Entry/Checkbox';\nimport { RadioGroupItem } from '../Forms & Data Entry/RadioGroup';\n\nconst optionClasses =\n 'flex w-full max-w-150 cursor-pointer items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-body-base text-surface-foreground transition-colors ' +\n // Hover changes the fill and shadow only; the border changes only when the option is selected.\n 'hover:bg-accent-soft hover:shadow-md ' +\n 'has-[[data-state=checked]]:border-accent-foreground ' +\n 'has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50';\n\ninterface OptionBase {\n label: React.ReactNode;\n className?: string;\n disabled?: boolean;\n}\n\nexport interface QuestionRadioOptionProps extends OptionBase {\n kind?: 'radio';\n /** Value in the surrounding `RadioGroup`. */\n value: string;\n}\n\nexport interface QuestionCheckboxOptionProps extends OptionBase {\n kind: 'checkbox';\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n}\n\nexport type QuestionOptionProps = QuestionRadioOptionProps | QuestionCheckboxOptionProps;\n\n// Figma: Question input (282:1490) › Radio / Checkbox — a full-width answer card; hover changes the fill only, and only a selected option gets the accent border.\nexport function QuestionOption(props: QuestionOptionProps) {\n const id = React.useId();\n return (\n <label htmlFor={id} className={cn(optionClasses, props.className)}>\n {props.kind === 'checkbox' ? (\n <Checkbox\n id={id}\n checked={props.checked}\n defaultChecked={props.defaultChecked}\n onCheckedChange={(next) => props.onCheckedChange?.(next === true)}\n disabled={props.disabled}\n />\n ) : (\n <RadioGroupItem id={id} value={props.value} disabled={props.disabled} />\n )}\n <span className=\"min-w-0 flex-1\">{props.label}</span>\n </label>\n );\n}\n\nexport interface QuestionOtherOptionProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onSubmit'> {\n /** Called with the typed text when the confirm button (or Enter) is pressed. */\n onSubmit?: (value: string) => void;\n confirmLabel?: string;\n}\n\n// Figma: Question input › Other=Yes — a free-text answer with a small confirm button.\nexport const QuestionOtherOption = React.forwardRef<HTMLInputElement, QuestionOtherOptionProps>(\n ({ className, onSubmit, confirmLabel = 'Confirm answer', placeholder = 'Type your answer', ...props }, ref) => {\n const inner = React.useRef<HTMLInputElement>(null);\n React.useImperativeHandle(ref, () => inner.current as HTMLInputElement);\n const submit = () => onSubmit?.(inner.current?.value ?? '');\n return (\n <div\n className={cn(\n 'inline-flex items-center gap-2 rounded-md border border-border bg-surface py-2 pr-2 pl-4 focus-within:border-input-accent',\n className,\n )}\n >\n <input\n ref={inner}\n type=\"text\"\n placeholder={placeholder}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n submit();\n }\n }}\n className=\"min-w-0 bg-transparent text-body-base text-surface-foreground outline-none placeholder:text-muted-foreground\"\n {...props}\n />\n <Button type=\"button\" variant=\"subtle\" size=\"icon-sm\" aria-label={confirmLabel} onClick={submit}>\n <Check size={16} aria-hidden />\n </Button>\n </div>\n );\n },\n);\nQuestionOtherOption.displayName = 'QuestionOtherOption';\n\nexport interface QuestionOptionEditorProps {\n label: string;\n onLabelChange?: (label: string) => void;\n /** Called by the trash button. */\n onRemove?: () => void;\n /** Called by the add (+) button. */\n onAdd?: () => void;\n className?: string;\n /**\n * Answer type. When set the row is quiet at rest: its normal border, the radio or checkbox indicator in front of the\n * label, and the remove/add buttons hidden but still taking their space, so the row is the same width in every state.\n * On hover or keyboard focus it becomes the editor: the shadow lifts, the drag handle replaces the indicator and the\n * buttons appear. The border colour does not change. Omit it for an always-on editor row.\n */\n kind?: 'radio' | 'checkbox' | 'rank';\n /**\n * `kind=\"rank\"` only: the position shown in the round number tag, as in `RankList`. For a ranking question the row keeps\n * its drag handle and number at rest and, like the other kinds, becomes the editor on hover or keyboard focus.\n */\n rank?: number;\n}\n\n// Figma: Question input › Editor=Yes — an option being authored: drag handle, editable label, remove and add buttons.\nexport function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind, rank }: QuestionOptionEditorProps) {\n const reveal = kind !== undefined;\n return (\n <div className={cn('group/option flex w-full items-center gap-2', className)}>\n <div\n className={cn(\n 'flex h-11.5 min-w-0 flex-1 items-center gap-2 rounded-md border bg-surface px-4 py-2 focus-within:border-input-accent',\n reveal\n ? // The border is always visible and does not change on hover; only the shadow lifts the row. The field being edited keeps the accent.\n 'border-border group-hover/option:shadow-md group-focus-within/option:shadow-md'\n : 'border-border hover:border-input hover:shadow-md',\n )}\n >\n {kind === 'rank' ? (\n <>\n <DotsSixVertical size={20} aria-hidden className=\"shrink-0 text-surface-foreground\" />\n <span\n aria-hidden=\"true\"\n className=\"flex size-6 shrink-0 items-center justify-center rounded-full border border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-ui-caption text-surface-foreground\"\n >\n {rank}\n </span>\n </>\n ) : reveal ? (\n <span aria-hidden=\"true\" className=\"relative flex size-5 shrink-0 items-center justify-center\">\n <span\n className={cn(\n 'inline-flex size-4 border-2 border-input bg-surface group-hover/option:hidden group-focus-within/option:hidden',\n kind === 'radio' ? 'rounded-full' : 'rounded-xxs',\n )}\n />\n <DotsSixVertical\n size={20}\n className=\"hidden shrink-0 text-surface-foreground group-hover/option:block group-focus-within/option:block\"\n />\n </span>\n ) : (\n <DotsSixVertical size={20} aria-hidden className=\"shrink-0 text-surface-foreground\" />\n )}\n <input\n aria-label=\"Option label\"\n value={label}\n onChange={(event) => onLabelChange?.(event.target.value)}\n className=\"min-w-0 flex-1 bg-transparent text-body-base text-surface-foreground outline-none\"\n />\n </div>\n <div\n className={cn(\n 'flex items-center gap-2',\n reveal && 'opacity-0 transition-opacity group-hover/option:opacity-100 group-focus-within/option:opacity-100',\n )}\n >\n <Button type=\"button\" variant=\"destructive\" size=\"icon-sm\" aria-label=\"Remove option\" onClick={onRemove}>\n <Trash size={16} aria-hidden />\n </Button>\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" aria-label=\"Add option\" onClick={onAdd}>\n <Plus size={16} aria-hidden />\n </Button>\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { DotsSixVertical } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface RankItemData {\n id: string;\n label: React.ReactNode;\n}\n\nexport interface RankListProps extends Omit<React.HTMLAttributes<HTMLOListElement>, 'onChange'> {\n items: RankItemData[];\n /** Called with the new order after a drag or a keyboard move. */\n onItemsChange: (items: RankItemData[]) => void;\n}\n\nfunction move<T>(list: T[], from: number, to: number): T[] {\n if (from === to || to < 0 || to >= list.length) return list;\n const next = list.slice();\n const [item] = next.splice(from, 1);\n next.splice(to, 0, item as T);\n return next;\n}\n\n// Figma: Question input › Rank_choice — draggable rows with a numbered badge; hover turns the row and badge accent.\nexport const RankList = React.forwardRef<HTMLOListElement, RankListProps>(\n ({ className, items, onItemsChange, ...props }, ref) => {\n const [dragIndex, setDragIndex] = React.useState<number | null>(null);\n const [announcement, setAnnouncement] = React.useState('');\n const handles = React.useRef(new Map<string, HTMLButtonElement>());\n const refocus = React.useRef<string | null>(null);\n\n React.useEffect(() => {\n if (refocus.current) {\n handles.current.get(refocus.current)?.focus();\n refocus.current = null;\n }\n });\n\n const reorder = (from: number, to: number, id: string) => {\n const next = move(items, from, to);\n if (next === items) return;\n refocus.current = id;\n setAnnouncement(`Moved to position ${to + 1} of ${items.length}`);\n onItemsChange(next);\n };\n\n return (\n <>\n <ol ref={ref} className={cn('flex w-full max-w-150 flex-col gap-4', className)} {...props}>\n {items.map((item, index) => (\n <li\n key={item.id}\n draggable\n onDragStart={() => setDragIndex(index)}\n onDragOver={(event) => event.preventDefault()}\n onDrop={() => {\n if (dragIndex !== null) reorder(dragIndex, index, item.id);\n setDragIndex(null);\n }}\n onDragEnd={() => setDragIndex(null)}\n className={cn(\n 'group/rank flex items-center gap-3 overflow-hidden rounded-sm border border-border bg-surface px-4 py-2.5 text-body-base text-surface-foreground transition-colors',\n 'hover:border-accent-foreground hover:shadow-md',\n dragIndex === index && 'opacity-50',\n )}\n >\n <button\n type=\"button\"\n ref={(el) => {\n if (el) handles.current.set(item.id, el);\n else handles.current.delete(item.id);\n }}\n aria-label={`Reorder, position ${index + 1} of ${items.length}. Use the up and down arrow keys to move.`}\n onKeyDown={(event) => {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n reorder(index, index - 1, item.id);\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n reorder(index, index + 1, item.id);\n }\n }}\n className=\"inline-flex shrink-0 cursor-grab rounded-xs text-surface-foreground\"\n >\n <DotsSixVertical size={16} aria-hidden />\n </button>\n <span\n aria-hidden=\"true\"\n className=\"flex size-6 shrink-0 items-center justify-center rounded-full border border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-ui-caption text-surface-foreground group-hover/rank:border-accent-foreground group-hover/rank:bg-accent-soft group-hover/rank:bg-none group-hover/rank:text-accent-soft-foreground\"\n >\n {index + 1}\n </span>\n <span className=\"min-w-0 flex-1\">{item.label}</span>\n </li>\n ))}\n </ol>\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {announcement}\n </span>\n </>\n );\n },\n);\nRankList.displayName = 'RankList';\n","import * as React from 'react';\nimport { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport interface RatingScaleProps\n extends Omit<React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>, 'type' | 'value' | 'defaultValue' | 'onValueChange'> {\n /** Number of points on the scale. */\n max?: number;\n /** Selected rating (1-based), or `undefined` for none. */\n value?: number;\n defaultValue?: number;\n onValueChange?: (value: number | undefined) => void;\n /** Caption under the first point (e.g. \"Not likely\"). */\n lowLabel?: React.ReactNode;\n /** Caption under the last point (e.g. \"Very likely\"). */\n highLabel?: React.ReactNode;\n}\n\n// Figma: Question input (282:1490) › Rating scale item — equal-width 48px buttons; selected has a 2px accent border.\nexport const RatingScale = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Root>, RatingScaleProps>(\n ({ className, max = 5, value, defaultValue, onValueChange, lowLabel, highLabel, ...props }, ref) => {\n const [internal, setInternal] = React.useState<number | undefined>(defaultValue);\n const current = value !== undefined ? value : internal;\n return (\n <div className={cn('flex w-full max-w-150 flex-col gap-2', className)}>\n <ToggleGroupPrimitive.Root\n ref={ref}\n type=\"single\"\n value={current ? String(current) : ''}\n onValueChange={(next) => {\n const parsed = next ? Number(next) : undefined;\n setInternal(parsed);\n onValueChange?.(parsed);\n }}\n className=\"flex gap-2\"\n {...props}\n >\n {Array.from({ length: max }, (_, i) => i + 1).map((n) => (\n <ToggleGroupPrimitive.Item\n key={n}\n value={String(n)}\n aria-label={`${n}`}\n className={cn(\n 'flex h-12 min-w-0 flex-1 items-center justify-center rounded-sm border-2 border-border bg-surface text-ui-label-large text-surface-foreground transition-colors',\n 'hover:bg-accent-soft',\n 'data-[state=on]:border-accent-foreground data-[state=on]:text-accent-foreground',\n )}\n >\n {n}\n </ToggleGroupPrimitive.Item>\n ))}\n </ToggleGroupPrimitive.Root>\n {(lowLabel != null || highLabel != null) && (\n <div className=\"flex justify-between text-ui-caption text-secondary-muted-foreground\" aria-hidden=\"true\">\n <span>{lowLabel}</span>\n <span>{highLabel}</span>\n </div>\n )}\n </div>\n );\n },\n);\nRatingScale.displayName = 'RatingScale';\n","import * as React from 'react';\nimport { Image as ImageIcon, ImageBroken, Trash } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { InlineEdit } from '../Forms & Data Entry/InlineEdit';\n\nexport interface StimulusCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** Image shown in the 80px thumbnail. Without one the thumbnail shows `icon` on a neutral fill. */\n thumbnail?: string;\n /** Alt text for `thumbnail`. Leave empty when the caption already describes the image. */\n thumbnailAlt?: string;\n /** Placeholder shown in the thumbnail when there is no `thumbnail` (e.g. a video camera for a video). Defaults to an image icon. */\n icon?: React.ReactNode;\n /**\n * `error` swaps the thumbnail for a broken-image icon on the destructive soft fill, for a stimulus that could not be\n * loaded. It is also applied automatically when `thumbnail` fails to load.\n */\n status?: 'default' | 'error';\n /** Small line above the caption saying who speaks it. */\n label?: React.ReactNode;\n /** What the AI moderator says when it shows the stimulus, e.g. \"Look at this image\". */\n caption?: string;\n /** Editor mode: makes the caption editable (click to edit, Enter or blur saves) and is called with the new text. */\n onCaptionChange?: (caption: string) => void;\n /** Editor mode: placeholder for an empty caption. */\n captionPlaceholder?: string;\n /** Shows the trash button. */\n onRemove?: () => void;\n /** Accessible name of the trash button. Defaults to \"Remove stimulus\". */\n removeLabel?: string;\n}\n\n// Figma: Stimulus card (605:3462) — a stimulus (image or video) with what the AI moderator says about it, and a remove button.\nexport const StimulusCard = React.forwardRef<HTMLDivElement, StimulusCardProps>(\n (\n {\n className,\n thumbnail,\n thumbnailAlt = '',\n icon,\n status = 'default',\n label = 'AI Moderator',\n caption,\n onCaptionChange,\n captionPlaceholder = 'Click to write what the AI moderator says',\n onRemove,\n removeLabel = 'Remove stimulus',\n ...props\n },\n ref,\n ) => {\n // Remember which source failed, so a new `thumbnail` gets a fresh chance to load.\n const [failedSrc, setFailedSrc] = React.useState<string | undefined>();\n const error = status === 'error' || (thumbnail !== undefined && failedSrc === thumbnail);\n const showImage = thumbnail !== undefined && !error;\n return (\n <div\n ref={ref}\n data-status={error ? 'error' : 'default'}\n className={cn('flex w-full items-center gap-4 rounded-md border border-border p-0.5 pr-4', className)}\n {...props}\n >\n <div className=\"flex min-w-0 flex-1 items-center gap-4\">\n <span\n className={cn(\n 'flex size-20 shrink-0 items-center justify-center overflow-hidden rounded-sm border',\n error\n ? 'border-destructive-soft-border bg-destructive-soft bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-destructive'\n : 'border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground',\n showImage && 'bg-none',\n )}\n >\n {showImage ? (\n <img src={thumbnail} alt={thumbnailAlt} className=\"size-full object-cover\" onError={() => setFailedSrc(thumbnail)} />\n ) : error ? (\n <ImageBroken size={24} aria-hidden />\n ) : (\n (icon ?? <ImageIcon size={24} aria-hidden />)\n )}\n </span>\n <div className=\"flex min-w-0 flex-1 flex-col gap-2 text-surface-foreground\">\n <p className=\"w-full text-ui-label\">{label}</p>\n {onCaptionChange ? (\n <InlineEdit\n variant=\"question\"\n multiline\n // The editor pads its text (top 4px, bottom 5px plus a 1px border); pull that back so the card is as tall as its content.\n className=\"-mx-3 -mt-1 -mb-1.5 w-auto\"\n aria-label=\"Stimulus caption\"\n value={caption ?? ''}\n placeholder={captionPlaceholder}\n onValueChange={onCaptionChange}\n textClassName=\"text-body-base\"\n />\n ) : (\n <p className=\"w-full text-body-base [word-break:break-word]\">{caption}</p>\n )}\n </div>\n </div>\n {onRemove && (\n <Button type=\"button\" variant=\"destructive\" size=\"icon-sm\" aria-label={removeLabel} onClick={onRemove}>\n <Trash size={16} aria-hidden />\n </Button>\n )}\n </div>\n );\n },\n);\nStimulusCard.displayName = 'StimulusCard';\n","import * as React from 'react';\nimport { Progress as ProgressPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport interface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {\n /** Heading shown above the track, left-aligned (e.g. \"Project Progress\"). */\n label?: React.ReactNode;\n /** Right-aligned value above the track. Pass `true` to render `value%`. */\n valueLabel?: React.ReactNode | true;\n /** Left caption below the track (e.g. \"16 of 25 tasks completed\"). */\n detailsStart?: React.ReactNode;\n /** Right caption below the track (e.g. \"Est. 3 days remaining\"). */\n detailsEnd?: React.ReactNode;\n}\n\n// Figma: Progress Bar (36). Track is `secondary`, indicator is `accent`, both full-radius, 8px tall.\nexport const Progress = React.forwardRef<React.ElementRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n ({ className, value = 0, label, valueLabel, detailsStart, detailsEnd, ...props }, ref) => {\n const hasHeader = label != null || valueLabel != null;\n const hasDetails = detailsStart != null || detailsEnd != null;\n const clamped = Math.min(100, Math.max(0, value ?? 0));\n return (\n <div className={cn('flex w-full flex-col gap-2', className)}>\n {hasHeader && (\n <div className=\"flex items-center justify-between text-ui-label text-surface-foreground\">\n <span>{label}</span>\n <span>{valueLabel === true ? `${Math.round(clamped)}%` : valueLabel}</span>\n </div>\n )}\n <ProgressPrimitive.Root\n ref={ref}\n value={clamped}\n className=\"relative h-2 w-full overflow-hidden rounded-full bg-secondary\"\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full rounded-full bg-accent transition-[width]\"\n style={{ width: `${clamped}%` }}\n />\n </ProgressPrimitive.Root>\n {hasDetails && (\n <div className=\"flex items-start justify-between text-ui-label leading-5 text-secondary-muted-foreground\">\n <span>{detailsStart}</span>\n <span>{detailsEnd}</span>\n </div>\n )}\n </div>\n );\n },\n);\nProgress.displayName = 'Progress';\n","import * as React from 'react';\nimport { CaretDown, CaretUp } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {\n /** Alternate row backgrounds (Figma: Stripe = Yes). */\n striped?: boolean;\n /** Class names for the bordered, rounded scroll container around the `<table>`. */\n containerClassName?: string;\n}\n\n// Figma: Tables (27) — 12px-radius bordered container; rows are separated by 1px `border` lines.\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n ({ className, containerClassName, striped, ...props }, ref) => (\n <div className={cn('relative w-full overflow-auto rounded-lg border border-border bg-surface', containerClassName)}>\n <table\n ref={ref}\n data-striped={striped ? '' : undefined}\n className={cn('group/table w-full border-collapse text-body-small text-surface-foreground', className)}\n {...props}\n />\n </div>\n ),\n);\nTable.displayName = 'Table';\n\nexport const TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => <thead ref={ref} className={className} {...props} />,\n);\nTableHeader.displayName = 'TableHeader';\n\nexport const TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => <tbody ref={ref} className={className} {...props} />,\n);\nTableBody.displayName = 'TableBody';\n\nexport interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {\n /** Highlights the row and marks it with the accent edge (Figma: State = Selected). */\n selected?: boolean;\n}\n\n// Figma: Table Row (29) — Default / Hover (`accent-soft`) / Selected (accent left edge on the first cell).\nexport const TableRow = React.forwardRef<HTMLTableRowElement, TableRowProps>(\n ({ className, selected, ...props }, ref) => (\n <tr\n ref={ref}\n data-state={selected ? 'selected' : undefined}\n aria-selected={selected || undefined}\n className={cn(\n 'group/row border-b border-border transition-colors last:border-b-0',\n 'group-data-[striped]/table:even:bg-background hover:bg-accent-soft group-data-[striped]/table:even:hover:bg-accent-soft',\n className,\n )}\n {...props}\n />\n ),\n);\nTableRow.displayName = 'TableRow';\n\ntype Align = 'left' | 'right';\n\nexport interface TableHeadProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'align'> {\n align?: Align;\n /** Render the label as a sort button. Provide `sort` and `onSort`. */\n sortable?: boolean;\n sort?: 'none' | 'asc' | 'desc';\n onSort?: () => void;\n /** Narrow centred column for a select-all checkbox. */\n checkbox?: boolean;\n}\n\nconst ariaSort = { none: 'none', asc: 'ascending', desc: 'descending' } as const;\n\n// Figma: Table Header Row (28) › Table Header Cell — 40px, `ui/label` text; sortable cells show a caret.\nexport const TableHead = React.forwardRef<HTMLTableCellElement, TableHeadProps>(\n ({ className, align = 'left', sortable, sort = 'none', onSort, checkbox, children, ...props }, ref) => {\n const caret =\n sort === 'asc' ? <CaretUp size={16} aria-hidden className=\"shrink-0\" /> : <CaretDown size={16} aria-hidden className=\"shrink-0\" />;\n return (\n <th\n ref={ref}\n scope=\"col\"\n aria-sort={sortable ? ariaSort[sort] : undefined}\n className={cn(\n 'h-10 border-b border-border text-ui-label whitespace-nowrap',\n checkbox ? 'w-13 px-0 text-center' : 'px-4 py-3',\n align === 'right' ? 'text-right' : 'text-left',\n className,\n )}\n {...props}\n >\n {sortable ? (\n <button\n type=\"button\"\n onClick={onSort}\n className={cn('inline-flex items-center gap-1 rounded-xs', align === 'right' && 'flex-row-reverse')}\n >\n {children}\n {caret}\n </button>\n ) : checkbox ? (\n <div className=\"flex items-center justify-center\">{children}</div>\n ) : (\n children\n )}\n </th>\n );\n },\n);\nTableHead.displayName = 'TableHead';\n\nexport interface TableCellProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'align'> {\n align?: Align;\n /** Secondary text colour (Figma: Type = Muted). */\n muted?: boolean;\n /** Narrow centred cell for a checkbox or radio. */\n checkbox?: boolean;\n /** Right-aligned cell for row actions; lays its children out in a row with 4px gaps. */\n actions?: boolean;\n}\n\n// Figma: Table Row (29) › Table Cell — 40px tall, 16px inline padding, 14/20 value.\nexport const TableCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(\n ({ className, align = 'left', muted, checkbox, actions, children, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n 'h-10 text-body-small',\n 'group-data-[state=selected]/row:first:border-l-2 group-data-[state=selected]/row:first:border-l-input-accent',\n checkbox ? 'w-13 px-0 text-center' : actions ? 'px-4 py-1.5 text-right' : 'px-4 py-3',\n align === 'right' && 'text-right',\n muted ? 'text-secondary-muted-foreground' : 'text-surface-foreground',\n className,\n )}\n {...props}\n >\n {checkbox ? <div className=\"flex items-center justify-center\">{children}</div> : actions ? <div className=\"flex items-start justify-end gap-1\">{children}</div> : children}\n </td>\n ),\n);\nTableCell.displayName = 'TableCell';\n\nexport interface TableCellTwoLinesProps extends React.HTMLAttributes<HTMLDivElement> {\n primary: React.ReactNode;\n secondary?: React.ReactNode;\n /** Leading avatar / image (Figma: Two Lines Avatar). */\n avatar?: React.ReactNode;\n}\n\n/** Primary + support text stack for a `TableCell` (Figma: Type = Two Lines / Option). Set the row/cell height to `h-14`. */\nexport function TableCellTwoLines({ primary, secondary, avatar, className, ...props }: TableCellTwoLinesProps) {\n return (\n <div className={cn('flex items-center gap-2', className)} {...props}>\n {avatar}\n <div className=\"flex flex-col gap-0.5 whitespace-nowrap\">\n <span className=\"text-ui-label text-surface-foreground\">{primary}</span>\n {secondary && <span className=\"text-ui-caption text-secondary-muted-foreground\">{secondary}</span>}\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\nconst statCardVariants = cva('flex min-w-0 flex-col gap-2 rounded-md border p-3', {\n variants: {\n variant: {\n default: 'border-border bg-transparent',\n warning: 'border-warning-soft-border bg-warning-soft',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nexport interface StatCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, VariantProps<typeof statCardVariants> {\n label: React.ReactNode;\n value: React.ReactNode;\n /** Leading icon beside the value (24px). */\n icon?: React.ReactNode;\n}\n\n// Figma: Activity control (361:5214) › stat-card — a small bordered label/value tile; `warning` tints it yellow.\nexport const StatCard = React.forwardRef<HTMLDivElement, StatCardProps>(\n ({ className, variant, label, value, icon, ...props }, ref) => (\n <div ref={ref} className={cn(statCardVariants({ variant }), className)} {...props}>\n <p className=\"truncate text-ui-caption text-secondary-muted-foreground\">{label}</p>\n <p className=\"flex items-center gap-2 text-body-base text-surface-foreground\">\n {icon && (\n <span aria-hidden=\"true\" className=\"inline-flex size-6 shrink-0 items-center justify-center\">\n {icon}\n </span>\n )}\n {value}\n </p>\n </div>\n ),\n);\nStatCard.displayName = 'StatCard';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { StatCard, type StatCardProps } from '../Data Display/StatCard';\nimport { EditableTag } from '../Tags & Badges/EditableTag';\n\nexport interface ActivityStat extends Pick<StatCardProps, 'label' | 'value' | 'icon' | 'variant'> {\n id: string;\n}\n\nexport interface ActivitySection {\n id: string;\n heading: React.ReactNode;\n /** Section text. May contain block elements (e.g. an `InlineEdit`), so it is rendered in a `div`. */\n body: React.ReactNode;\n /** Removable tags shown under the body. */\n tags?: string[];\n}\n\nexport interface ActivityStructureProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n title?: React.ReactNode;\n /** Stat tiles, laid out in a two-column grid. */\n stats: ActivityStat[];\n /** Text sections (e.g. Research Goal, Target Audience), optionally with tags. */\n sections?: ActivitySection[];\n /** Called with `(sectionId, tag)` when a tag's remove button is pressed. Omit for read-only tags. */\n onRemoveTag?: (sectionId: string, tag: string) => void;\n /** Called with the section id by the dashed \"Add tag\" chip. Omit to hide it. */\n onAddTag?: (sectionId: string) => void;\n addTagLabel?: string;\n /**\n * Content shown under the stats and sections. With `stats={[]}` and `children` the card is a single-purpose widget\n * (e.g. \"Research Goal\") with the same card, title style and colour as the full summary.\n */\n children?: React.ReactNode;\n}\n\n// Figma: Activity control (361:5214) › Activity structure — summary card with stat tiles and text sections with tags; also usable as a single-purpose widget via children.\nexport const ActivityStructure = React.forwardRef<HTMLElement, ActivityStructureProps>(\n ({ className, title = 'Activity Structure', stats, sections, onRemoveTag, onAddTag, addTagLabel = 'Add tag', children, ...props }, ref) => (\n <section\n ref={ref}\n className={cn('flex w-full max-w-96.5 flex-col gap-4 rounded-xl bg-surface p-4', className)}\n {...props}\n >\n <h3 className=\"text-heading-h3 text-primary\">{title}</h3>\n {stats.length > 0 && (\n <div className=\"grid grid-cols-2 gap-3\">\n {stats.map(({ id, ...stat }) => (\n <StatCard key={id} {...stat} />\n ))}\n </div>\n )}\n {sections?.map(({ id, heading, body, tags }) => (\n <div key={id} className=\"flex flex-col gap-2\">\n <h4 className=\"text-heading-h4 text-surface-foreground\">{heading}</h4>\n <div className=\"text-body-base text-surface-foreground\">{body}</div>\n {(tags?.length || onAddTag) && (\n <div className=\"flex flex-wrap items-center gap-2\">\n {tags?.map((tag) => (\n <EditableTag key={tag} type=\"editable\" onRemove={onRemoveTag && (() => onRemoveTag(id, tag))}>\n {tag}\n </EditableTag>\n ))}\n {onAddTag && (\n <EditableTag type=\"add\" onClick={() => onAddTag(id)}>\n {addTagLabel}\n </EditableTag>\n )}\n </div>\n )}\n </div>\n ))}\n {children}\n </section>\n ),\n);\nActivityStructure.displayName = 'ActivityStructure';\n","import * as React from 'react';\nimport { Crown, Plus, X } from '@phosphor-icons/react';\nimport { cva } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\n// Figma: Editable tags (41). Compact 26px chip used for removable / addable values.\nconst editableTagVariants = cva(\n 'inline-flex h-6.5 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors',\n {\n variants: {\n type: {\n default: 'gap-1 bg-accent-muted pl-2.5 pr-1.5 text-primary',\n editable:\n 'gap-1 bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 pl-2.5 pr-1.5 text-surface-foreground hover:bg-accent-soft hover:bg-none hover:text-accent-soft-foreground',\n add: 'gap-1 border border-dashed border-border pl-2.5 pr-1.5 text-surface-foreground hover:bg-accent-soft hover:text-accent-soft-foreground',\n multiple:\n 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2.5 text-surface-foreground hover:bg-accent-soft hover:bg-none hover:text-accent-soft-foreground',\n },\n },\n defaultVariants: { type: 'default' },\n },\n);\n\nexport interface EditableTagProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onClick'> {\n /** `default` is the highlighted (primary) value, `editable` is removable, `add` adds a value, `multiple` is the \"+N more\" overflow chip. */\n type?: 'default' | 'editable' | 'add' | 'multiple';\n /** Leading icon. `default` shows a crown unless you pass `null`. */\n icon?: React.ReactNode;\n /** Renders a remove button on `editable`/`default` tags. */\n onRemove?: () => void;\n /** Click handler for `add` and `multiple` (rendered as a button when set). */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n children: React.ReactNode;\n}\n\nexport const EditableTag = React.forwardRef<HTMLElement, EditableTagProps>(\n ({ className, type = 'default', icon, onRemove, onClick, children, ...props }, ref) => {\n const classes = cn(editableTagVariants({ type }), className);\n const leading =\n type === 'add' ? (\n <Plus size={12} aria-hidden />\n ) : icon !== undefined ? (\n icon\n ) : type === 'default' ? (\n <Crown size={12} weight=\"fill\" aria-hidden />\n ) : null;\n\n if (type === 'add' || (type === 'multiple' && onClick)) {\n return (\n <button ref={ref as React.Ref<HTMLButtonElement>} type=\"button\" className={classes} onClick={onClick} {...props}>\n {leading}\n {children}\n </button>\n );\n }\n\n return (\n <span ref={ref as React.Ref<HTMLSpanElement>} className={classes} {...props}>\n {leading}\n {children}\n {onRemove && (\n <button\n type=\"button\"\n aria-label={typeof children === 'string' ? `Remove ${children}` : 'Remove'}\n onClick={onRemove}\n className=\"inline-flex size-3 items-center justify-center rounded-xs\"\n >\n <X size={12} aria-hidden />\n </button>\n )}\n </span>\n );\n },\n);\nEditableTag.displayName = 'EditableTag';\n","import * as React from 'react';\nimport { DotsSixVertical, RadioButton } from '@phosphor-icons/react';\nimport { cva } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\n// Figma: Role Tag (41), now the system Badge. 24px chip; `interactable` reveals a drag handle on hover.\nconst roleTagVariants = cva(\n 'group inline-flex h-6 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors',\n {\n variants: {\n type: {\n primary: 'bg-primary-soft px-2.5 text-primary-soft-foreground',\n secondary:\n 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2.5 text-secondary-muted-foreground',\n question: 'gap-1 bg-primary-soft pl-1 pr-2.5 text-plum-500',\n interactable: 'gap-1 pl-2.5 pr-2.5 hover:pl-1',\n id: 'gap-1 bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2.5 tabular-nums text-surface-foreground',\n count:\n 'min-w-6 justify-center rounded-full bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2 tabular-nums text-surface-foreground',\n },\n selected: { true: '', false: '' },\n },\n compoundVariants: [\n {\n type: 'interactable',\n selected: false,\n className:\n 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground',\n },\n { type: 'interactable', selected: true, className: 'bg-accent-soft text-accent-foreground' },\n ],\n defaultVariants: { type: 'primary', selected: false },\n },\n);\n\nexport interface BadgeProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onClick'> {\n /**\n * `id` prefixes the content with a muted \"ID\" label (children is the identifier); `count` is a round pill for a number.\n */\n type?: 'primary' | 'secondary' | 'question' | 'interactable' | 'id' | 'count';\n /** Pressed state for `interactable` tags. */\n selected?: boolean;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n children: React.ReactNode;\n}\n\nexport const Badge = React.forwardRef<HTMLElement, BadgeProps>(\n ({ className, type = 'primary', selected = false, onClick, children, ...props }, ref) => {\n const classes = cn(roleTagVariants({ type, selected: type === 'interactable' ? selected : false }), className);\n\n if (type === 'interactable') {\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n aria-pressed={selected}\n className={classes}\n onClick={onClick}\n {...props}\n >\n <DotsSixVertical size={16} aria-hidden className=\"hidden shrink-0 group-hover:block\" />\n {children}\n </button>\n );\n }\n\n return (\n <span ref={ref as React.Ref<HTMLSpanElement>} className={classes} {...props}>\n {type === 'question' && <RadioButton size={16} weight=\"fill\" aria-hidden />}\n {type === 'id' && <span className=\"text-secondary-muted-foreground\">ID</span>}\n {children}\n </span>\n );\n },\n);\nBadge.displayName = 'Badge';\n","import * as React from 'react';\nimport { ArrowLeft, ArrowRight, DotsThree } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport type PaginationItemValue = number | 'ellipsis';\n\n/** 1-based page list with ellipses, e.g. `[1, 2, 'ellipsis', 5]`. Keeps first, last and the current page ± `siblings`. */\nexport function getPaginationItems(page: number, pageCount: number, siblings = 1): PaginationItemValue[] {\n const keep = new Set<number>([1, pageCount]);\n for (let p = page - siblings; p <= page + siblings; p++) if (p >= 1 && p <= pageCount) keep.add(p);\n // Show a neighbouring page instead of an ellipsis that would hide just one.\n const sorted = [...keep].sort((a, b) => a - b);\n const items: PaginationItemValue[] = [];\n sorted.forEach((p, index) => {\n const previous = sorted[index - 1];\n if (previous !== undefined && p - previous === 2) items.push(previous + 1);\n else if (previous !== undefined && p - previous > 2) items.push('ellipsis');\n items.push(p);\n });\n return items;\n}\n\nexport interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {\n /** Current page, 1-based. */\n page: number;\n pageCount: number;\n onPageChange: (page: number) => void;\n /** `full` lists page numbers; `compact` shows `1/5` between the arrows. */\n variant?: 'full' | 'compact';\n /** How many pages to show either side of the current one (full variant). */\n siblings?: number;\n}\n\n// Figma: Pagination (71) — 32px items; the current page is `subtle`, the rest are outlined.\nexport const Pagination = React.forwardRef<HTMLElement, PaginationProps>(\n ({ className, page, pageCount, onPageChange, variant = 'full', siblings = 1, ...props }, ref) => {\n const go = (next: number) => onPageChange(Math.min(pageCount, Math.max(1, next)));\n const previous = (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label=\"Previous page\"\n disabled={page <= 1}\n onClick={() => go(page - 1)}\n >\n <ArrowLeft size={16} aria-hidden />\n </Button>\n );\n const next = (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label=\"Next page\"\n disabled={page >= pageCount}\n onClick={() => go(page + 1)}\n >\n <ArrowRight size={16} aria-hidden />\n </Button>\n );\n\n return (\n <nav\n ref={ref}\n aria-label=\"Pagination\"\n className={cn('flex items-center', variant === 'compact' ? 'w-35 justify-between' : 'gap-2', className)}\n {...props}\n >\n {previous}\n {variant === 'compact' ? (\n <span className=\"text-body-small text-surface-foreground\" aria-live=\"polite\">\n {page}/{pageCount}\n </span>\n ) : (\n <ul className=\"flex items-center gap-2\">\n {getPaginationItems(page, pageCount, siblings).map((item, index) => (\n <li key={item === 'ellipsis' ? `ellipsis-${index}` : item}>\n {item === 'ellipsis' ? (\n <span className=\"inline-flex size-8 items-center justify-center rounded-sm border border-border bg-surface text-surface-foreground\">\n <DotsThree size={16} aria-hidden />\n <span className=\"sr-only\">More pages</span>\n </span>\n ) : (\n <Button\n type=\"button\"\n variant={item === page ? 'subtle' : 'outline'}\n size=\"sm\"\n aria-label={`Page ${item}`}\n aria-current={item === page ? 'page' : undefined}\n onClick={() => go(item)}\n >\n {item}\n </Button>\n )}\n </li>\n ))}\n </ul>\n )}\n {next}\n </nav>\n );\n },\n);\nPagination.displayName = 'Pagination';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AG,qBAAqB,YAAY,YAAY,yBAAyB,SAAS,SAAS;AAAA,QACrG,GAAG;AAAA,QAEH;AAAA;AAAA,UACA,YAAY,YACX,+CAAC,UAAK,WAAU,2CAA0C,aAAU,UACjE;AAAA;AAAA,YAAK;AAAA,YAAE;AAAA,aACV,IAEA,8CAAC,QAAG,WAAU,2BACX,6BAAmB,MAAM,WAAW,QAAQ,EAAE,IAAI,CAAC,MAAM,UACxD,8CAAC,QACE,mBAAS,aACR,+CAAC,UAAK,WAAU,qHACd;AAAA,0DAAC,4BAAU,MAAM,IAAI,eAAW,MAAC;AAAA,YACjC,8CAAC,UAAK,WAAU,WAAU,wBAAU;AAAA,aACtC,IAEA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,SAAS,SAAS,OAAO,WAAW;AAAA,cACpC,MAAK;AAAA,cACL,cAAY,QAAQ,IAAI;AAAA,cACxB,gBAAc,SAAS,OAAO,SAAS;AAAA,cACvC,SAAS,MAAM,GAAG,IAAI;AAAA,cAErB;AAAA;AAAA,UACH,KAhBK,SAAS,aAAa,YAAY,KAAK,KAAK,IAkBrD,CACD,GACH;AAAA,UAED;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,WAAW,cAAc;","names":["React","import_radix_ui","import_jsx_runtime","SwitchPrimitive","React","import_radix_ui","import_jsx_runtime","TogglePrimitive","React","import_jsx_runtime","React","import_jsx_runtime","React","import_class_variance_authority","import_radix_ui","import_jsx_runtime","TogglePrimitive","React","React","import_react","import_radix_ui","React","import_radix_ui","import_jsx_runtime","LabelPrimitive","import_jsx_runtime","CheckboxPrimitive","React","import_radix_ui","import_jsx_runtime","RadioGroupPrimitive","import_jsx_runtime","title","description","className","React","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_react","React","import_react","import_radix_ui","import_jsx_runtime","DropdownMenuPrimitive","import_jsx_runtime","React","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_jsx_runtime","import_react","import_jsx_runtime","React","import_react","import_radix_ui","React","import_react","import_jsx_runtime","React","import_radix_ui","React","import_radix_ui","React","import_radix_ui","import_class_variance_authority","import_jsx_runtime","TabsPrimitive","import_jsx_runtime","TabsPrimitive","import_jsx_runtime","ToggleGroupPrimitive","import_jsx_runtime","PopoverPrimitive","React","import_radix_ui","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_react","import_radix_ui","import_jsx_runtime","SelectPrimitive","React","import_radix_ui","import_jsx_runtime","SliderPrimitive","React","import_jsx_runtime","React","import_react","import_radix_ui","import_jsx_runtime","DialogPrimitive","React","import_react","import_class_variance_authority","import_radix_ui","import_jsx_runtime","ToastPrimitive","React","import_radix_ui","import_jsx_runtime","TooltipPrimitive","React","import_react","import_radix_ui","React","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","ProgressPrimitive","React","import_react","import_radix_ui","import_jsx_runtime","ToggleGroupPrimitive","ImageIcon","toggle","SliderPrimitive","React","import_jsx_runtime","React","import_jsx_runtime","React","import_react","React","import_react","import_jsx_runtime","import_jsx_runtime","React","import_react","import_radix_ui","React","import_react","import_jsx_runtime","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_radix_ui","import_jsx_runtime","ToggleGroupPrimitive","React","import_react","import_jsx_runtime","ImageIcon","React","import_radix_ui","import_jsx_runtime","ProgressPrimitive","React","import_react","import_jsx_runtime","React","import_class_variance_authority","import_jsx_runtime","React","React","import_react","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","React","import_react","import_class_variance_authority","import_jsx_runtime","React","import_react","import_jsx_runtime","next"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/components/Buttons & Actions/Button.tsx","../src/lib/utils.ts","../src/components/Buttons & Actions/Switch.tsx","../src/components/Buttons & Actions/Toggle.tsx","../src/components/Conversation & AI Chat/AIMiniAvatar.tsx","../src/components/Conversation & AI Chat/aiGlyphPaths.ts","../src/components/Conversation & AI Chat/AIResponseContainer.tsx","../src/components/Conversation & AI Chat/AskAiToggle.tsx","../src/components/Conversation & AI Chat/ChatChoices.tsx","../src/components/Forms & Data Entry/Checkbox.tsx","../src/components/Forms & Data Entry/Label.tsx","../src/components/Forms & Data Entry/RadioGroup.tsx","../src/components/Conversation & AI Chat/ChatInput.tsx","../src/components/Conversation & AI Chat/FileAttachment.tsx","../src/components/Conversation & AI Chat/ProjectSelector.tsx","../src/components/Overlays & Feedback/DropdownMenu.tsx","../src/components/Conversation & AI Chat/Timestamp.tsx","../src/components/Conversation & AI Chat/TopicCard.tsx","../src/components/Conversation & AI Chat/UserMessageBubble.tsx","../src/components/Forms & Data Entry/Calendar.tsx","../src/components/Forms & Data Entry/DateTimePicker.tsx","../src/components/Forms & Data Entry/Field.tsx","../src/components/Forms & Data Entry/formatDateTime.ts","../src/components/Forms & Data Entry/TimePicker.tsx","../src/components/Navigation/TabItem.tsx","../src/components/Navigation/TabNavigation.tsx","../src/components/Forms & Data Entry/Form.tsx","../src/components/Forms & Data Entry/InlineEdit.tsx","../src/components/Forms & Data Entry/Input.tsx","../src/components/Forms & Data Entry/InputWithAction.tsx","../src/components/Forms & Data Entry/NumberInput.tsx","../src/components/Forms & Data Entry/SearchBar.tsx","../src/components/Forms & Data Entry/Select.tsx","../src/components/Forms & Data Entry/Slider.tsx","../src/components/Forms & Data Entry/Textarea.tsx","../src/components/Overlays & Feedback/Dialog.tsx","../src/components/Overlays & Feedback/Toast.tsx","../src/components/Overlays & Feedback/Tooltip.tsx","../src/components/Question Types/FileUpload.tsx","../src/components/Tags & Badges/Tag.tsx","../src/components/Question Types/Media.tsx","../src/components/Question Types/OpenEndAnswer.tsx","../src/components/Question Types/QuestionCard.tsx","../src/components/Question Types/QuestionEditorCard.tsx","../src/components/Question Types/QuestionHeader.tsx","../src/components/Question Types/QuestionNavItem.tsx","../src/components/Question Types/QuestionTypeIcon.tsx","../src/components/Question Types/QuestionOption.tsx","../src/components/Question Types/RankList.tsx","../src/components/Question Types/RatingScale.tsx","../src/components/Question Types/StimulusCard.tsx","../src/components/Data Display/Progress.tsx","../src/components/Data Display/Table.tsx","../src/components/Data Display/StatCard.tsx","../src/components/Research-Specific/ActivityStructure.tsx","../src/components/Tags & Badges/EditableTag.tsx","../src/components/Tags & Badges/Badge.tsx","../src/components/Utility/Pagination.tsx"],"sourcesContent":["// Public component exports.\n//\n// Each implemented component is re-exported here from its folder under\n// src/components/<Section>/<Component>. See ../../../.context/COMPONENT_STATUS.md\n// for the build queue and ../../../.context/COMPONENT_CONTRACTS.md for the\n// export-barrel convention components must follow once they land here.\nexport * from './components/Buttons & Actions';\nexport * from './components/Conversation & AI Chat';\nexport * from './components/Forms & Data Entry';\nexport * from './components/Navigation';\nexport * from './components/Overlays & Feedback';\nexport * from './components/Question Types';\nexport * from './components/Data Display';\nexport * from './components/Research-Specific';\nexport * from './components/Tags & Badges';\nexport * from './components/Utility';\n","import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\nconst subtle =\n 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground hover:bg-accent-soft hover:bg-none hover:text-accent-soft-foreground disabled:bg-muted disabled:bg-none disabled:text-muted-foreground';\n\n// Figma: Buttons (13) + Button Small/Reaction (16). Disabled is a flat 50%\n// opacity for every type; the hover fill is `accent-soft` everywhere except\n// primary (`primary-hover`) and destructive (a 10% black overlay).\nconst buttonVariants = cva(\n 'inline-flex shrink-0 items-center justify-center whitespace-nowrap text-ui-label transition-colors disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'bg-primary text-label hover:bg-primary-hover',\n subtle,\n // Alias of `subtle`, kept so existing consumers don't break.\n secondary: subtle,\n destructive: 'bg-destructive text-label hover:bg-destructive-hover',\n outline:\n 'border border-border bg-surface text-surface-foreground hover:border-input hover:bg-accent-soft hover:text-accent-soft-foreground disabled:bg-transparent disabled:border-input disabled:text-muted-foreground',\n ghost:\n 'text-surface-foreground hover:bg-accent-soft hover:text-accent-soft-foreground disabled:text-muted-foreground',\n link: 'text-surface-foreground underline hover:text-accent-foreground',\n },\n size: {\n md: 'h-10 min-w-10 gap-2.5 rounded-md px-4 py-2',\n sm: 'h-8 min-w-8 gap-1 rounded-sm px-2.5 py-1.5',\n lg: 'h-12 gap-2.5 rounded-md px-6 py-3 text-ui-label-large',\n icon: 'size-10 rounded-md p-0',\n 'icon-sm': 'size-8 rounded-sm p-0',\n },\n },\n compoundVariants: [\n // Primary icon-only is a circle at 40px (and a rounded square at 32px).\n { variant: 'default', size: 'icon', className: 'rounded-full' },\n {\n variant: 'default',\n size: ['icon', 'icon-sm'],\n className: 'disabled:border disabled:border-border disabled:bg-transparent disabled:text-muted-foreground disabled:opacity-100',\n },\n // Destructive icon-only drops the fill and tints the glyph instead.\n {\n variant: 'destructive',\n size: ['icon', 'icon-sm'],\n className: 'bg-transparent text-destructive hover:bg-destructive-soft-hover',\n },\n { variant: 'outline', size: ['icon', 'icon-sm'], className: 'disabled:border-border' },\n // Links have no box of their own.\n { variant: 'link', className: 'rounded-md bg-transparent px-4' },\n ],\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /**\n * Render `props.children` into the child element instead of wrapping it in\n * a `<button>` (Radix `Slot`) — lets consumers compose e.g.\n * `<Button asChild><a href=\"...\">Label</a></Button>` without double-wrapping.\n * The ref then targets whatever element the child renders, not necessarily\n * an `HTMLButtonElement`.\n */\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot.Root : 'button';\n return <Comp ref={ref} className={cn(buttonVariants({ variant, size }), className)} {...props} />;\n },\n);\nButton.displayName = 'Button';\n","import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n// tailwind-merge only knows Tailwind's built-in class names. Without these\n// registrations it reads our composite type styles (`text-ui-label`) as a text\n// *colour* — so a later `text-surface-foreground` silently drops the type\n// style — and `bg-linear-to-r` (Tailwind v4) as a background colour, dropping\n// `bg-secondary`.\nconst twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n 'font-size': [\n {\n text: [\n 'heading-h1',\n 'heading-h2',\n 'heading-h3',\n 'heading-h4',\n 'body-section',\n 'body-base',\n 'body-small',\n 'body-xs',\n 'body-xxs',\n 'ui-label',\n 'ui-label-large',\n 'ui-badge',\n 'ui-caption',\n 'ui-overline',\n 'ui-code',\n 'ui-placeholder',\n 'ui-input-value',\n ],\n },\n ],\n 'bg-image': [{ 'bg-linear': ['to-t', 'to-tr', 'to-r', 'to-br', 'to-b', 'to-bl', 'to-l', 'to-tl'] }],\n },\n },\n});\n\n/**\n * Merge class lists, resolving Tailwind class conflicts so a consumer-supplied\n * `className` always wins over an internal default. See COMPONENT_CONTRACTS.md.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from 'react';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport type SwitchProps = React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>;\n\n// Figma: Toggle / Switch (17) — 44×24 track, 20px white thumb. Off is `muted`, on is the accent.\nexport const Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitive.Root>, SwitchProps>(\n ({ className, ...props }, ref) => (\n <SwitchPrimitive.Root\n ref={ref}\n className={cn(\n 'inline-flex h-6 w-11 shrink-0 items-center rounded-full p-0.5 transition-colors',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Brand override: selected controls use `ring`, not `primary`/`accent`.\n 'data-[state=checked]:bg-ring data-[state=unchecked]:bg-muted',\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n className={cn(\n 'block size-5 rounded-full bg-surface shadow-sm transition-transform',\n 'data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0',\n )}\n />\n </SwitchPrimitive.Root>\n ),\n);\nSwitch.displayName = 'Switch';\n","import * as React from 'react';\nimport { Toggle as TogglePrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport type ToggleProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>;\n\n// Figma: Toggle / Switch (17) › Toggle menu — a 40px square icon button that fills with `secondary` when pressed.\nexport const Toggle = React.forwardRef<React.ElementRef<typeof TogglePrimitive.Root>, ToggleProps>(\n ({ className, ...props }, ref) => (\n <TogglePrimitive.Root\n ref={ref}\n className={cn(\n 'inline-flex size-10 shrink-0 items-center justify-center rounded-md text-surface-foreground transition-colors',\n 'hover:bg-accent-soft hover:text-accent-soft-foreground',\n 'data-[state=on]:bg-secondary data-[state=on]:hover:bg-accent-soft',\n 'disabled:pointer-events-none disabled:opacity-50',\n className,\n )}\n {...props}\n />\n ),\n);\nToggle.displayName = 'Toggle';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { AI_GLYPH_THINKING, AI_GLYPH_WORKING } from './aiGlyphPaths';\n\nexport type AIStatus = 'idle' | 'thinking' | 'executing' | 'working';\n\nconst defaultLabel: Record<Exclude<AIStatus, 'idle'>, string> = {\n thinking: 'Thinking...',\n executing: 'Executing...',\n working: 'Working on it...',\n};\n\nexport interface AIMiniAvatarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** `idle` shows only the mark; the others add a status line next to it. */\n status?: AIStatus;\n /** Override the status text. */\n label?: React.ReactNode;\n /** Elapsed time shown after the label while `working` (e.g. \"45 s\"). */\n elapsed?: React.ReactNode;\n}\n\n// Figma: AI Mini Avatar (57) › AI feedback — the accent squiggle mark with an optional status line.\nexport const AIMiniAvatar = React.forwardRef<HTMLDivElement, AIMiniAvatarProps>(\n ({ className, status = 'idle', label, elapsed, ...props }, ref) => {\n const glyph = status === 'working' ? AI_GLYPH_WORKING : AI_GLYPH_THINKING;\n const busy = status !== 'idle';\n return (\n <div\n ref={ref}\n role=\"status\"\n aria-live=\"polite\"\n className={cn('flex items-center gap-2.5', className)}\n {...props}\n >\n <svg\n aria-hidden=\"true\"\n viewBox={glyph.viewBox}\n fill=\"none\"\n className={cn(\n 'h-5.75 shrink-0 fill-accent',\n status === 'working' ? 'w-5' : 'w-5.25',\n busy && 'motion-safe:animate-pulse',\n )}\n >\n <path d={glyph.d} />\n </svg>\n {busy && (\n <span\n className={cn(\n 'text-ui-caption whitespace-nowrap',\n status === 'executing'\n ? 'bg-linear-to-r from-secondary-muted-foreground to-secondary-muted-foreground/40 bg-clip-text text-transparent'\n : 'text-secondary-muted-foreground',\n )}\n >\n {label ?? defaultLabel[status]}\n </span>\n )}\n {status === 'working' && elapsed != null && (\n <>\n <span aria-hidden=\"true\" className=\"size-0.5 rounded-full bg-secondary-muted-foreground\" />\n <span className=\"text-ui-caption whitespace-nowrap text-secondary-muted-foreground\">{elapsed}</span>\n </>\n )}\n </div>\n );\n },\n);\nAIMiniAvatar.displayName = 'AIMiniAvatar';\n","// Hand-off from Figma (AI feedback › AI assistant): the squiggle mark shown while the assistant works.\n// The path data is the exported vector, unmodified.\nexport const AI_GLYPH_THINKING = {\n viewBox: '0 0 23.5102 10.31',\n d: 'M20.7764 6.13895C20.8091 6.08935 20.9139 6.07477 20.9653 6.02535C21.1265 5.87047 21.227 5.79769 21.3523 5.6889L21.3349 5.70985C21.3757 5.67187 21.4194 5.629 21.4687 5.57648C21.7621 5.26894 22.4786 4.16096 22.8403 4.43013C22.8403 4.43014 22.8403 4.43014 22.8403 4.43015C22.8438 4.43279 22.8474 4.43556 22.8508 4.43847C22.9168 4.49352 22.9251 4.63928 22.993 4.71056C23.061 4.78185 23.5711 5.14655 23.5041 5.29532C23.4036 5.50831 22.9412 5.85678 22.8715 5.95956C22.8242 6.02999 22.8059 6.14803 22.7475 6.24057C22.6464 6.40032 22.5565 6.50906 22.4809 6.62923C22.4785 6.632 22.4718 6.64062 22.4693 6.64331C22.3989 6.74734 22.341 6.85851 22.2892 7.02244C22.1391 7.06575 21.9883 7.10631 21.8375 7.14262C21.7434 7.29292 21.476 7.39415 21.4003 7.4664C21.3382 7.52673 21.3404 7.6092 21.2705 7.66966C21.2189 7.71436 21.1282 7.74838 21.0302 7.79812C21.0228 7.80313 21.0008 7.8182 20.9928 7.8224C20.9494 7.83706 20.9028 7.85865 20.856 7.89199C20.6266 8.05556 20.6529 8.23489 20.4981 8.34362C20.4171 8.3997 20.2989 8.44071 20.1779 8.48367C20.0629 8.52373 19.9434 8.57023 19.8501 8.64564C19.8314 8.67452 19.8127 8.70339 19.7937 8.73228C19.83 8.76183 19.8664 8.79129 19.9028 8.82072C19.8037 8.88716 19.7221 8.82963 19.622 8.8719C19.5039 8.92146 19.4745 9.02208 19.3928 9.05557C19.3259 9.0829 19.2105 9.05922 19.1237 9.09701C18.9965 9.1516 19.0573 9.22895 18.9919 9.2717C18.9722 9.29205 18.4308 9.51795 18.3887 9.52197C18.1304 9.58812 18.0801 9.46546 17.8631 9.48595C17.8361 9.48814 17.8091 9.4903 17.782 9.49237C17.3207 9.52161 16.8743 9.67817 16.3789 9.7352C16.285 9.7455 16.1851 9.74966 16.0822 9.74684C15.9622 9.74345 15.8411 9.73294 15.7225 9.71759C16.0452 9.39607 15.3567 9.12062 15.6025 9.64387C15.3808 9.56394 15.2157 9.69807 14.9941 9.66267C14.8498 9.63874 14.7566 9.5627 14.5364 9.54137C14.3208 9.51495 14.0878 9.5587 13.7616 9.41848C13.6405 9.36165 13.5631 9.27393 13.5919 9.09969C13.4354 9.05602 13.2983 8.98697 13.1658 8.92556C13.0992 8.89457 13.0342 8.86595 12.9619 8.83793C12.8815 8.79834 12.8349 8.81997 12.6347 8.66553C12.5818 8.65788 12.5185 8.66138 12.4458 8.68578C12.3597 8.6238 12.3017 8.26898 12.2414 8.14791C12.1605 8.05685 11.7146 7.13701 11.7091 6.94414C11.7083 6.94093 11.7074 6.93768 11.7065 6.93438C11.6552 6.75979 11.6158 6.47257 11.5821 6.33303C11.5388 6.16728 11.1933 5.9876 11.6352 5.69928C11.6536 5.50058 11.6924 5.35814 11.7614 5.21539C11.7996 5.14267 11.8487 5.06108 11.9231 4.94138C11.9508 4.89665 12.0069 4.91427 12.0188 4.88607C12.0432 4.82851 12.0458 4.71199 12.0891 4.60378C12.1604 4.42562 12.3223 4.38132 12.1443 4.31661C12.1745 4.18591 12.2099 4.05361 12.2533 3.91918C12.3093 3.89617 12.3653 3.87434 12.4217 3.85356C12.4277 3.77084 12.4368 3.68676 12.4498 3.60124C12.6122 3.82914 12.8149 3.31965 12.5882 3.35167C12.6971 3.26408 12.8129 3.18134 12.936 3.10694C13.0432 3.05147 13.1502 2.9942 13.2575 2.93523C13.445 3.18433 13.6433 2.62036 13.4965 2.52782C13.5159 2.50978 13.5359 2.49118 13.5559 2.47273C13.6468 2.43151 13.7186 2.3762 13.8101 2.30215C13.9339 2.20399 14.0605 2.08848 14.2572 2.00205C14.5866 1.86654 14.5863 1.91818 14.7383 2.00328C14.8117 1.96386 14.8906 1.92778 14.9768 1.89808C15.2046 1.61986 15.3871 1.74917 15.5554 1.87821C15.6574 1.92057 15.8644 2.08723 15.9086 2.24717C15.9561 2.38086 15.9647 2.4401 16.0174 2.50589C16.0362 2.5325 16.059 2.56113 16.0862 2.59267C15.9089 2.83438 16.1252 3.33908 16.1251 3.71466C16.1272 3.75694 16.1742 3.7651 16.1787 3.82326C16.1923 3.96864 16.0396 4.27583 16.1879 4.30844C16.1104 4.40775 16.0302 4.50104 15.9487 4.58956C15.9485 4.59211 15.9483 4.59466 15.9481 4.59722C15.9434 4.68512 15.9381 4.77303 15.9326 4.86089C15.9773 4.87807 16.0219 4.89524 16.0666 4.91242C15.8514 5.01394 15.8076 5.2888 15.7201 5.39794C15.7026 5.41968 15.6395 5.39969 15.591 5.46924C15.5342 5.55031 15.482 5.72425 15.4171 5.82229C15.4664 5.89261 15.5154 5.96317 15.5642 6.03418C15.516 6.24242 15.3088 6.23112 15.2434 6.33666C15.2371 6.34685 15.1897 6.45661 15.1414 6.56252C15.1003 6.65319 15.0605 6.74017 15.0575 6.75026C14.9983 6.92736 15.1953 6.94548 14.8653 7.42471C14.8017 7.51174 14.7031 7.55363 14.6374 7.63359C14.5939 7.68676 14.5258 7.79471 14.4522 7.90588C14.359 8.0661 14.2337 8.27035 14.258 8.34435C13.9929 8.37671 13.5599 8.69876 13.4026 8.72273C13.3557 8.73114 13.3039 8.65181 13.1715 8.69189C13.1196 8.70739 13.0387 8.75964 12.9539 8.81245C12.8709 8.86549 12.783 8.9216 12.7186 8.94208C12.5852 8.98412 12.5082 8.92996 12.4483 8.94919C12.3923 8.9672 12.3668 9.04791 12.2925 9.07862C12.0591 9.1738 11.8082 9.16385 11.6213 9.23522C11.3502 9.33814 11.1776 9.60661 10.949 9.76888C10.9348 9.77067 10.9203 9.77115 10.9058 9.77095C10.8529 9.76975 10.7975 9.7598 10.7466 9.77439C9.99772 10.0005 9.00243 10.0857 8.1768 9.85282C8.13481 9.84174 8.09342 9.83033 8.0522 9.8185C7.65595 9.74342 6.84265 9.06031 6.88897 9.55865C6.80575 9.55556 6.53393 9.38444 6.29758 9.12608C6.231 9.02829 5.91504 8.73378 5.8576 8.6732C5.70806 8.5387 5.53716 8.47446 5.42743 8.35204C5.23871 8.13938 5.11803 7.9385 4.98784 7.72031C4.93094 7.62219 4.78289 7.41761 4.64906 7.18544C4.56629 7.04595 4.42492 6.92507 4.39704 6.84099C4.36359 6.73961 4.41467 6.60764 4.3839 6.48312C4.3266 6.25751 4.2228 5.90491 4.15903 5.6261C4.13709 5.5314 4.11932 5.43956 4.10919 5.36422C4.10191 5.30774 4.17499 5.27443 4.18647 5.19139C4.22915 4.86817 4.21424 4.52439 3.96715 4.59214C4.0923 4.18224 4.00781 3.80768 4.06914 3.4305C4.07049 3.42228 4.07191 3.41407 4.0734 3.40587C4.17848 2.77229 4.60265 1.62744 5.42728 1.02539C5.5388 0.936113 5.63885 0.851595 5.72033 0.774897C6.02466 0.499997 5.92843 0.404094 6.57046 0.168732C6.72019 0.118531 6.87745 0.0750992 7.10515 0.029663C7.44001 -0.0409616 8.00784 0.000885725 8.42487 0.305113C8.52342 0.370349 8.66824 0.438081 8.84918 0.507494C9.00601 0.701494 9.15341 0.965493 9.19962 1.24429C9.25461 1.59798 9.20706 1.9295 9.02072 2.15487C9.06272 2.2086 9.10331 2.26358 9.14209 2.32146C9.12853 2.38467 9.11273 2.44783 9.09564 2.50868C9.04342 2.51339 8.99124 2.51735 8.93911 2.52058C8.80099 2.92074 8.72119 3.45798 8.53257 3.73379C8.51917 3.75362 8.50452 3.77482 8.48864 3.79731C8.18299 4.22988 7.45145 5.14772 7.14208 5.47284C6.97081 5.65357 7.04778 5.72472 6.79141 5.71506C6.77155 5.76833 6.75129 5.82205 6.73113 5.87552C6.74881 5.93119 6.76688 5.98626 6.78446 6.04197C6.67655 6.19317 6.53517 6.34587 6.39918 6.49486C6.30179 6.60171 6.20676 6.7071 6.12771 6.80983C5.86753 7.16626 5.41116 7.79089 4.96904 8.10513C4.87549 8.1762 4.78037 8.24183 4.68809 8.2947C4.56491 8.36535 4.36563 8.39839 4.25536 8.48329C4.09377 8.60676 4.15002 8.76609 3.93397 8.92203C3.68203 9.10323 3.21465 9.30524 2.7946 9.44827C2.61334 9.50835 2.4488 9.5679 2.33086 9.62822C2.22328 9.68313 2.19724 9.76099 2.12265 9.80252C1.81329 9.9754 1.54922 10.089 1.27057 10.31C0.871376 10.3138 0.823743 10.1166 0.644008 9.97432C0.509878 9.86688 0.126525 9.63933 0.0856048 9.51058C0.0484623 9.42509 0.051783 9.29751 0 9.20711C0.311082 9.00323 0.527575 9.0048 0.893831 9.00304C1.355 8.7957 1.81246 8.57815 2.27037 8.35384C2.37271 8.30354 2.47492 8.24832 2.57658 8.1893C2.6503 8.2117 2.72528 8.23255 2.80124 8.252C2.8013 8.25211 2.80136 8.25221 2.80143 8.25232C3.03486 8.18581 3.03979 8.00743 3.12463 7.91046C3.36205 7.63959 3.68578 7.33424 4.07988 6.99574C4.53563 6.62516 4.89846 6.21727 5.32159 5.69439C5.74872 5.17021 6.15919 4.65793 6.46139 4.25093C6.64154 4.00919 7.13955 3.16034 7.33028 3.04133C7.34208 3.03408 7.35548 3.03074 7.36955 3.02924C7.41387 3.02544 7.46598 3.03904 7.49046 3.00739C7.70834 2.58993 7.86103 2.13779 7.83041 1.79989C7.8547 1.70941 7.86312 1.62307 7.85378 1.53151C7.87209 1.5287 7.84915 1.45435 7.69179 1.34775C7.77026 1.34362 7.49926 1.35778 7.23888 1.52474C6.97348 1.67631 6.69939 1.87603 6.42229 2.07271C6.36356 2.11454 6.30432 2.15719 6.24453 2.20056C5.85524 2.48354 5.60232 3.08823 5.49387 3.71498C5.39928 4.24892 5.42498 4.76811 5.56179 5.30683C5.73246 5.96207 5.84566 6.51339 6.19333 6.98921C6.31865 7.19227 6.46019 7.37337 6.62146 7.53296C6.79615 7.70852 6.92033 7.78019 7.25856 8.05634C7.33453 8.12545 7.42269 8.18946 7.52192 8.24799C7.75285 8.38685 8.10613 8.47857 8.4572 8.54593C8.61666 8.57713 8.77013 8.59963 8.91167 8.62268C9.08941 8.64956 9.17441 8.79085 9.4164 8.66989C9.42212 8.70681 9.42791 8.74373 9.43379 8.78063C9.65293 8.71479 9.77712 8.60908 10.021 8.54539C10.1203 8.51928 10.2997 8.46967 10.4831 8.41151C10.6699 8.35263 10.8737 8.27862 10.9746 8.24849C11.0761 8.21757 11.0641 8.29673 11.157 8.26042C11.3161 8.19806 11.6214 7.97025 11.8416 7.87728C12.0071 7.80802 12.2892 7.74718 12.4664 7.68389C12.5014 7.67152 12.5303 7.65958 12.5544 7.6466C12.9362 7.44059 13.2264 7.19551 13.4781 6.90736C13.5439 6.83289 13.5972 6.76236 13.6731 6.65907C13.7546 6.55024 13.9356 6.40299 13.9581 6.35458C14.0011 6.26124 13.9376 6.19233 13.9591 6.12514C13.9721 6.08459 13.9882 6.04256 14.0073 5.9983C14.1356 5.69579 14.4023 5.27933 14.5269 4.98849C14.6407 4.72311 14.7511 4.44958 14.8552 4.17601C14.9522 3.92097 15.0207 3.66979 15.0372 3.45937C15.0531 3.24138 15.027 3.11048 14.9379 2.78902C14.9187 2.70766 14.878 2.57482 14.9201 2.69356C14.9293 2.78057 15.2047 3.01121 15.3025 3.00426C15.3103 3.005 15.2823 2.99694 15.209 3.02009C15.1006 3.05115 14.8991 3.17087 14.6896 3.3475C14.4622 3.54526 14.1241 3.87681 13.8343 4.11513C13.7102 4.21459 13.5954 4.34064 13.4984 4.45314C13.4195 4.54661 13.3558 4.46837 13.2997 4.56139C13.2381 4.66643 13.2646 4.75718 13.2429 4.81048C13.1582 5.0115 13.0582 5.33059 12.8983 5.73083C12.8528 5.84656 12.829 6.11681 12.8105 6.25296C12.8013 6.311 12.7318 6.36264 12.7373 6.39885C12.74 6.41716 12.7967 6.44932 12.8133 6.49994C12.8239 6.53247 12.835 6.56327 12.8464 6.59222C13.0113 6.99361 13.2145 7.29577 13.6284 7.75962C13.6287 7.75995 13.629 7.76028 13.6292 7.7606C13.5327 7.66867 13.5735 7.71591 13.5864 7.71996C13.6067 7.73297 13.6364 7.74994 13.6682 7.76708C13.7325 7.8017 13.8061 7.838 13.8819 7.87409C14.0342 7.94645 14.1967 8.01873 14.3624 8.09149C14.4295 8.12341 14.8213 8.16242 15.1241 8.16799C15.4466 8.17777 15.7837 8.17904 16.12 8.1862C16.4042 8.19173 16.7364 8.16186 17.0675 8.14113C17.3555 8.12227 17.5732 8.24796 17.6136 8.24221C17.625 8.2406 17.6357 8.23751 17.6461 8.23323C17.7042 8.20464 17.7441 8.12089 17.8688 8.07355C18.3421 7.89885 19.1022 7.67963 19.5971 7.39003C19.6136 7.38042 19.6303 7.37015 19.6473 7.35931C19.8747 7.2155 20.0413 6.98443 20.2828 6.80153C20.3065 6.7842 20.3357 6.76481 20.3699 6.74391L20.298 6.79064C20.4619 6.66741 20.7621 6.44192 20.7839 6.34931C20.7993 6.28776 20.7412 6.19318 20.7764 6.13895ZM14.3029 9.42491C14.3405 9.34309 14.2314 9.3194 14.1139 9.3164C13.9993 9.31488 13.861 9.3268 13.9789 9.41542C14.0391 9.45982 14.2868 9.46988 14.3029 9.42491ZM9.59175 9.70184C9.60097 9.75063 9.61033 9.7994 9.61981 9.84815C9.67917 9.8212 9.73753 9.79318 9.79481 9.76425C9.75681 9.73961 9.71928 9.71456 9.68227 9.6891C9.65216 9.69362 9.62202 9.69787 9.59175 9.70184Z',\n} as const;\n\nexport const AI_GLYPH_WORKING = {\n viewBox: '0 0 21.6653 7.31887',\n d: 'M21.5195 2.20094C21.5632 2.27281 21.5435 2.40302 21.5694 2.49163C21.6275 2.6923 21.6417 2.82523 21.6527 2.95596C21.6564 2.97027 21.6628 3.01397 21.6653 3.02853C21.6641 3.13693 21.6598 3.24436 21.6586 3.38773C21.6816 3.85362 21.6618 5.13496 21.204 5.07451C21.204 5.0745 21.204 5.0745 21.204 5.0745C21.1996 5.074 21.1952 5.07338 21.1907 5.07263C21.1061 5.05815 21.0241 4.94601 20.929 4.92104C20.8337 4.89639 20.2098 4.84129 20.1872 4.70468C20.162 4.5075 20.3424 4.05165 20.3322 3.94693C20.3275 3.87626 20.2696 3.79112 20.2564 3.70362C20.2253 3.50095 20.228 3.36832 20.1618 3.22753L20.1705 3.27725C20.1408 3.22743 20.1002 3.17862 20.0419 3.13125C20.0967 3.02469 20.1456 2.91373 20.1862 2.79711C20.1085 2.70121 20.1178 2.49436 20.0701 2.43438C20.0329 2.38632 19.9603 2.39539 19.9218 2.35006C19.8787 2.3002 19.8633 2.1732 19.7612 2.09203C19.7034 2.0461 19.6466 2.03107 19.595 2.02843L19.7627 2.11426C19.6671 2.14605 19.6042 2.2088 19.5173 2.20366C19.3811 2.19547 19.1788 2.06914 18.9898 2.10943C18.9652 2.12544 18.9407 2.1416 18.9163 2.1579C18.9287 2.20111 18.9406 2.24436 18.9521 2.28762C18.8618 2.29819 18.8311 2.20964 18.7478 2.20237C18.6497 2.19419 18.5963 2.27357 18.5308 2.27097C18.4776 2.26885 18.4048 2.20215 18.3342 2.20612C18.2309 2.21188 18.2544 2.30623 18.2002 2.32458C18.1776 2.32896 17.7784 2.40078 17.7565 2.40615C17.5856 2.42463 17.557 2.29863 17.4163 2.30438C17.0252 2.32264 16.6544 2.50901 16.341 2.64771C16.2001 2.7096 16.0505 2.75491 15.9061 2.79231C16.0092 2.39243 15.4001 2.37041 15.7957 2.76269C15.7449 2.76246 15.7042 2.7768 15.67 2.79808C15.5564 2.86487 15.4802 2.97434 15.3466 3.01614C15.2272 3.05323 15.1197 3.02273 14.9627 3.09457C14.6814 3.2228 14.4809 3.53873 14.2487 3.24296C13.9703 3.44596 13.6586 3.47244 13.7401 3.80561C13.6873 3.86035 13.4234 3.80763 13.3424 3.84086C13.2469 3.85834 12.8209 4.21338 12.8015 4.30503C12.7577 4.37886 12.704 4.52293 12.7165 4.60386C12.7165 4.60456 12.7165 4.60525 12.7166 4.60594C12.7245 4.73675 13.038 4.86932 12.6198 5.00545C12.6218 5.24087 12.6062 5.31289 12.5709 5.505C12.5653 5.5391 12.5078 5.54892 12.51 5.56912C12.5148 5.61101 12.5679 5.67144 12.5899 5.73138C12.625 5.82708 12.5422 5.92847 12.7068 5.83917C12.7265 5.85366 12.7463 5.86629 12.7663 5.87733C12.8032 5.90096 12.8414 5.92124 12.8766 5.93338C12.8592 5.96968 12.8434 6.00666 12.8291 6.04399C12.8751 6.0348 12.9151 6.01504 12.9349 5.9805C12.8531 6.08998 12.8602 6.12516 12.8542 6.09438C12.8536 6.06287 12.7741 5.97616 12.8523 5.90639C12.814 5.91011 12.7686 5.91968 12.7291 5.93658C12.8704 5.95935 13.0187 5.97102 13.1668 5.97103C13.2458 6.27758 13.5375 5.8631 13.4165 5.7269C13.4322 5.71942 13.4481 5.7116 13.4633 5.70383C13.6382 5.70301 13.7156 5.57219 13.8729 5.49571C14.0312 5.4108 14.0391 5.43683 14.1889 5.47644C14.2098 5.43405 14.2279 5.39151 14.2438 5.3483C14.0282 5.01309 14.4813 5.23839 14.467 4.9003C14.4628 4.86036 14.4497 4.81226 14.424 4.75824C14.6924 4.64645 14.5813 4.22813 14.4827 3.98518C14.4718 3.95634 14.4244 3.95942 14.4063 3.92204C14.3646 3.8314 14.3895 3.57996 14.2385 3.6136C14.269 3.52481 14.297 3.43419 14.3224 3.34163C14.2805 3.27925 14.2374 3.21883 14.1932 3.15937C14.147 3.17171 14.1008 3.18404 14.0545 3.19636C14.1795 3.02404 14.0534 2.83228 14.0536 2.72057C14.0538 2.69796 14.1146 2.67123 14.1077 2.60167C14.1053 2.5772 14.097 2.54816 14.0858 2.51695C14.0606 2.4458 14.0206 2.3664 14.0068 2.30319C13.9256 2.30215 13.845 2.30379 13.7653 2.30835C13.664 2.19886 13.8037 2.06102 13.7674 1.97878C13.7632 1.95836 13.5836 1.76062 13.569 1.76088C13.4625 1.71319 13.3938 1.83751 13.1876 1.69055C13.1768 1.68378 13.1679 1.67414 13.1594 1.66314C13.1251 1.62875 13.0976 1.58516 13.0563 1.56847C12.9543 1.52205 12.6158 1.57037 12.5754 1.68805C12.488 1.51352 12.1471 1.54577 12.0499 1.50822C12.0197 1.49536 12.0125 1.39933 11.915 1.38294C11.8348 1.36858 11.641 1.46343 11.5414 1.4673C11.4886 1.46852 11.4499 1.45238 11.417 1.43601C11.379 1.41974 11.3502 1.40253 11.3222 1.40479C11.2702 1.40908 11.2364 1.48093 11.1663 1.49376C10.9506 1.53213 10.7369 1.4686 10.5668 1.5019C10.3215 1.54967 10.1495 1.7839 9.97459 1.91406C9.92313 1.91395 9.86479 1.88637 9.81474 1.89889C9.18393 2.05373 8.52084 2.24974 8.06049 2.55947C7.97673 2.61393 7.82886 2.68357 7.70707 2.77585C7.47457 2.96164 7.29957 3.141 7.58115 3.23461C7.55145 3.37335 6.85892 3.81217 6.75779 3.91528C6.65223 4.01974 6.62886 4.1568 6.55292 4.24037C6.3287 4.49052 6.12192 4.63806 5.97447 4.97688C5.93734 5.06497 5.97217 5.18888 5.95013 5.22858C5.92305 5.27641 5.81725 5.29086 5.78729 5.35168C5.72348 5.47691 5.72292 5.63535 5.74247 5.70235C5.7392 5.69015 5.73474 5.68324 5.73057 5.6806C5.7259 5.67767 5.6564 5.71443 5.64159 5.73607C5.59977 5.79621 5.66356 5.86599 5.71545 5.8044C5.74124 5.7781 5.76378 5.72791 5.79373 5.65487C5.7797 5.76571 5.84646 5.7256 5.86464 5.68044C5.89311 5.65904 5.9217 5.63652 5.95175 5.6189C6.02236 5.57879 6.10324 5.51868 6.14438 5.46754C6.52517 4.99861 6.93077 4.48918 7.03916 4.16128C7.131 3.87843 7.03817 3.83671 7.2777 3.53191C7.3285 3.46368 7.38339 3.39761 7.43515 3.31198C7.55556 3.123 7.78512 2.91105 7.53243 2.74719C7.53788 2.72612 7.54202 2.70518 7.54516 2.6844C7.57114 2.34511 7.5461 2.13531 7.71559 1.91428C7.66205 1.8939 7.6084 1.87498 7.55468 1.85784C7.54899 1.82465 7.54284 1.79249 7.53625 1.76174C7.58249 1.7438 7.62858 1.72536 7.6745 1.70638C7.66025 1.58943 7.57775 1.48171 7.50533 1.44831C7.42954 1.40963 7.39741 1.46692 7.42084 1.47901C7.42785 1.48323 7.43783 1.48634 7.4422 1.48541C7.17989 1.34605 6.43947 1.33364 6.13402 1.38718C5.94822 1.40777 5.97834 1.51041 5.80067 1.34866C5.76607 1.37821 5.73267 1.40807 5.6993 1.43868C5.69344 1.49226 5.68877 1.54561 5.68469 1.59899C5.60346 1.6368 5.51247 1.67081 5.41947 1.70715C5.25719 1.77218 5.08842 1.83937 4.95565 1.92193C4.5607 2.16343 4.07316 2.6724 3.66471 2.90149C3.56135 2.95829 3.38743 2.97861 3.30147 3.05515C3.17694 3.16659 3.25374 3.3124 3.10481 3.45557C2.97543 3.58045 2.7598 3.72772 2.55869 3.88391C2.36237 4.0352 2.17431 4.20354 2.0791 4.34155C2.02181 4.42439 2.04245 4.49771 2.00764 4.55703C1.86276 4.80728 1.7279 5.00722 1.67572 5.28395C1.40472 5.45513 1.24398 5.34517 1.02204 5.34271C0.85587 5.34339 0.443166 5.39397 0.298309 5.53289C0.195382 5.59242 0.114988 5.33164 0 5.398C0.0672404 4.97998 0.13697 4.91763 0.231708 4.78102C0.32599 4.66409 0.441105 4.57777 0.588846 4.47063C0.890159 3.96002 1.2295 3.4868 1.62503 3.03919C1.6425 3.01952 1.66013 2.99985 1.67793 2.98018C1.75746 2.97633 1.83576 2.97461 1.91436 2.97328C1.91444 2.97336 1.91453 2.97345 1.91462 2.97353C2.12092 2.85218 2.0899 2.68327 2.15819 2.5722C2.597 1.85461 3.67978 1.04205 4.76963 0.519159C5.32989 0.243909 5.91307 0.0975681 6.38788 0.0444249C6.6555 -0.0118234 7.54053 -0.0488161 7.88667 0.153048C7.94618 0.17965 7.98958 0.207339 8.01918 0.232423C8.08533 0.290805 8.06243 0.37677 8.1281 0.424204C8.788 0.858895 8.84837 1.50779 8.95406 1.97915C8.94198 2.20167 8.92957 2.41449 8.93075 2.60529C8.95493 3.51671 8.63286 4.38247 8.20801 5.05868C7.91193 5.53227 7.58085 5.95424 7.27747 6.35851C7.01913 6.69107 6.69575 6.90231 6.33432 7.03688C5.96029 7.1761 5.5056 7.15874 5.13666 6.97761C4.77988 6.8026 4.46111 6.49764 4.34143 6.02344C4.13016 4.94119 4.72195 4.23827 5.12818 3.69949C5.57383 3.15323 6.05227 2.7034 6.49909 2.26167C6.60356 2.1588 6.70991 2.04377 6.81333 1.92552C7.11534 1.5805 7.51671 1.27415 7.87436 1.12238C8.09128 1.03067 8.22986 1.1177 8.46139 0.914443C8.47778 0.948059 8.49413 0.981695 8.51042 1.01535C8.72666 0.884509 8.85128 0.753639 9.11283 0.667108C9.33416 0.590984 9.91261 0.445577 10.1078 0.420265C10.2081 0.405908 10.1856 0.481938 10.2787 0.461915C10.4358 0.427279 10.7555 0.265817 10.9724 0.225515C11.0344 0.213886 11.1095 0.207961 11.1911 0.203672C11.3902 0.189668 11.6101 0.200757 11.7294 0.184671C12.3244 0.0941229 13.0686 0.0795288 13.6887 0.360932C13.7173 0.373361 13.7452 0.386407 13.7732 0.400348C13.9935 0.504733 14.1863 0.761282 14.2374 0.804733C14.3459 0.889986 14.4353 0.85695 14.5099 0.917486C14.8544 1.19506 15.0555 1.7393 15.1651 2.08618C15.1811 2.13408 15.1962 2.17883 15.2114 2.2209C15.5209 3.10883 15.7231 4.06037 15.5398 5.11604C15.4759 5.44103 15.3468 5.76469 15.156 6.04424C14.7344 6.73319 13.702 7.23955 12.966 7.30853C12.4728 7.37179 12.1947 7.12924 12.0524 6.99922C11.8908 6.83031 12.009 6.80775 11.9034 6.68162C11.8329 6.59062 11.7694 6.53954 11.7184 6.49409C11.6899 6.46762 11.6662 6.44349 11.6504 6.41689C11.2557 5.85657 11.3479 4.693 11.5144 4.34149C11.5151 4.33971 11.5158 4.33796 11.5166 4.33623C11.5524 4.24664 11.6398 4.2033 11.6561 4.14998C11.6648 4.12266 11.6353 4.04477 11.6651 3.9555C11.9475 3.16456 12.4817 2.80074 13.0494 2.47332C13.7152 2.10344 14.4121 1.81425 15.0508 1.49401C15.5692 1.23861 16.1097 1.07617 16.6335 0.991567C16.9162 0.946369 17.1285 1.06931 17.1663 1.06219C17.2508 1.04785 17.2925 0.940458 17.4657 0.897656C18.0451 0.752637 18.8417 0.865944 19.4146 0.908582C19.6055 0.920524 19.8557 0.905474 20.0965 0.923509C20.1598 0.938582 20.3128 1.02252 20.3653 1.06104C20.4783 1.12075 20.5849 1.18937 20.6707 1.26172C20.897 1.42686 21.21 2.00184 21.2965 2.08728C21.3583 2.13718 21.4717 2.12365 21.5195 2.20094ZM14.7616 3.09249C14.7223 2.91995 14.4452 3.20284 14.6094 3.23071C14.6457 3.23713 14.7714 3.13732 14.7616 3.09249ZM8.90352 1.8629C8.92394 1.90808 8.94428 1.9533 8.96454 1.99855C8.99986 1.96338 9.03568 1.92859 9.07244 1.894C9.0381 1.87445 9.00388 1.85503 8.96929 1.83592C8.94712 1.84485 8.92519 1.85385 8.90352 1.8629Z',\n} as const;\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface AIResponseContainerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Display-font heading at the top of the reply (e.g. \"Confirm new project.\"). */\n title?: React.ReactNode;\n /** Message actions row — a `Timestamp` with copy / like / dislike / retry buttons. */\n actions?: React.ReactNode;\n /** Status line under the reply — an `AIMiniAvatar`. */\n feedback?: React.ReactNode;\n}\n\n// Figma: AI Response Container (55) › Chat reply — 16px-gapped column with an h4 title, rich content, actions and AI status.\nexport const AIResponseContainer = React.forwardRef<HTMLDivElement, AIResponseContainerProps>(\n ({ className, title, children, actions, feedback, ...props }, ref) => (\n <div ref={ref} className={cn('flex w-full max-w-188 flex-col items-start gap-4', className)} {...props}>\n {title && <h2 className=\"text-heading-h4 text-surface-foreground\">{title}</h2>}\n <div className=\"flex w-full flex-col gap-4 text-body-base text-surface-foreground [&>p]:opacity-90\">{children}</div>\n {actions}\n {feedback}\n </div>\n ),\n);\nAIResponseContainer.displayName = 'AIResponseContainer';\n","import * as React from 'react';\nimport { Sparkle } from '@phosphor-icons/react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Toggle as TogglePrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nconst askAiToggleVariants = cva(\n 'inline-flex shrink-0 items-center justify-center text-surface-foreground transition-colors disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n type: {\n // 40px, filled with the subtle fill until pressed.\n menu: 'size-10 rounded-md bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 data-[state=on]:bg-accent-soft data-[state=on]:bg-none data-[state=on]:text-accent-soft-foreground',\n // 32px, bare until pressed.\n action: 'size-8 rounded-sm hover:bg-accent-soft data-[state=on]:bg-accent-soft data-[state=on]:text-accent-soft-foreground',\n },\n },\n defaultVariants: { type: 'menu' },\n },\n);\n\nexport interface AskAiToggleProps\n extends Omit<React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, 'type'>,\n VariantProps<typeof askAiToggleVariants> {}\n\n// Figma: User Message Bubble (54) › Ask AI toggle — sparkle toggle in a 40px menu or a 32px action size.\nexport const AskAiToggle = React.forwardRef<React.ElementRef<typeof TogglePrimitive.Root>, AskAiToggleProps>(\n ({ className, type, 'aria-label': ariaLabel = 'Ask AI', pressed, defaultPressed, ...props }, ref) => {\n const [internal, setInternal] = React.useState(defaultPressed ?? false);\n const on = pressed ?? internal;\n return (\n <TogglePrimitive.Root\n ref={ref}\n aria-label={ariaLabel}\n pressed={pressed}\n defaultPressed={defaultPressed}\n onPressedChange={(next) => {\n setInternal(next);\n props.onPressedChange?.(next);\n }}\n className={cn(askAiToggleVariants({ type }), className)}\n {...props}\n >\n <Sparkle size={16} weight={on ? 'fill' : 'regular'} aria-hidden />\n </TogglePrimitive.Root>\n );\n },\n);\nAskAiToggle.displayName = 'AskAiToggle';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Checkbox } from '../Forms & Data Entry/Checkbox';\nimport { RadioGroupItem } from '../Forms & Data Entry/RadioGroup';\n\nexport interface ChatChoicesProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The question the assistant is asking. */\n title: React.ReactNode;\n}\n\n// Figma: Chat Input (56) › Choices — a question header over a list of options, shown above the input.\nexport const ChatChoices = React.forwardRef<HTMLDivElement, ChatChoicesProps>(\n ({ className, title, children, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col', className)} {...props}>\n <div className=\"border-b border-border px-6 pt-5 pb-4\">\n <p className=\"text-body-section text-surface-foreground\">{title}</p>\n </div>\n {children}\n </div>\n ),\n);\nChatChoices.displayName = 'ChatChoices';\n\ninterface ChatOptionBaseProps {\n title: React.ReactNode;\n description?: React.ReactNode;\n className?: string;\n}\n\nexport interface ChatOptionActionProps\n extends ChatOptionBaseProps,\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {\n kind?: 'action';\n}\n\nexport interface ChatOptionRadioProps extends ChatOptionBaseProps {\n kind: 'radio';\n /** Value in the surrounding `RadioGroup`. */\n value: string;\n disabled?: boolean;\n}\n\nexport interface ChatOptionCheckboxProps extends ChatOptionBaseProps {\n kind: 'checkbox';\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n disabled?: boolean;\n}\n\nexport type ChatOptionProps = ChatOptionActionProps | ChatOptionRadioProps | ChatOptionCheckboxProps;\n\nconst rowClasses = 'flex w-full flex-col gap-1 border-b border-border px-6 py-4 text-left text-body-small';\n\n// Figma: Chat Input (56) › AI option — a quick reply (action), or a radio / checkbox choice with a description.\nexport function ChatOption(props: ChatOptionProps) {\n const id = React.useId();\n const descriptionId = `${id}-description`;\n\n if (props.kind === 'radio' || props.kind === 'checkbox') {\n const { title, description, className } = props;\n const control =\n props.kind === 'radio' ? (\n <RadioGroupItem id={id} value={props.value} disabled={props.disabled} aria-describedby={description ? descriptionId : undefined} />\n ) : (\n <Checkbox\n id={id}\n checked={props.checked}\n defaultChecked={props.defaultChecked}\n onCheckedChange={(next) => props.onCheckedChange?.(next === true)}\n disabled={props.disabled}\n aria-describedby={description ? descriptionId : undefined}\n />\n );\n return (\n <div className={cn(rowClasses, 'cursor-default', className)}>\n <div className=\"flex items-center gap-2.5 py-1\">\n {control}\n <label htmlFor={id} className=\"text-ui-label text-surface-foreground\">\n {title}\n </label>\n </div>\n {description && (\n <p id={descriptionId} className=\"pl-7.75 text-sm leading-[1.4] text-secondary-muted-foreground\">\n {description}\n </p>\n )}\n </div>\n );\n }\n\n const { title, description, className, kind: _kind, ...buttonProps } = props;\n return (\n <button\n type=\"button\"\n className={cn(rowClasses, 'transition-colors hover:bg-accent-soft', className)}\n {...buttonProps}\n >\n <span className=\"text-ui-label text-surface-foreground\">{title}</span>\n {description && <span className=\"text-body-small text-secondary-muted-foreground\">{description}</span>}\n </button>\n );\n}\n","import * as React from 'react';\nimport { Check, Minus } from '@phosphor-icons/react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Label } from './Label';\n\nexport type CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\n\n// Figma: Checkbox (21) — 1.5px muted border at rest; accent fill when checked or indeterminate.\nexport const Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer inline-flex size-4 shrink-0 items-center justify-center rounded-xxs border-2 border-input bg-surface transition-colors',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Brand override: selected controls use `ring`, not `primary`/`accent`.\n 'data-[state=checked]:border-ring data-[state=checked]:bg-ring data-[state=checked]:text-label',\n 'data-[state=indeterminate]:border-ring data-[state=indeterminate]:bg-ring data-[state=indeterminate]:text-label',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n {props.checked === 'indeterminate' ? <Minus size={12} weight=\"bold\" aria-hidden /> : <Check size={12} weight=\"bold\" aria-hidden />}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = 'Checkbox';\n\nexport interface CheckboxFieldProps extends CheckboxProps {\n label: React.ReactNode;\n /** Secondary line under the label. */\n description?: React.ReactNode;\n}\n\n/** Checkbox with its label (and optional description) laid out per Figma. */\nexport const CheckboxField = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxFieldProps>(\n ({ label, description, id, className, disabled, ...props }, ref) => {\n const generatedId = React.useId();\n const controlId = id ?? generatedId;\n const descriptionId = `${controlId}-description`;\n return (\n <div\n className={cn('flex gap-2', description ? 'items-start pt-0.5' : 'items-center', disabled && 'opacity-50', className)}\n >\n <Checkbox\n ref={ref}\n id={controlId}\n disabled={disabled}\n aria-describedby={description ? descriptionId : undefined}\n className={description ? 'mt-0.5' : undefined}\n {...props}\n />\n <div className=\"flex flex-col gap-0.5\">\n <Label htmlFor={controlId} className={cn(!description && 'font-normal leading-5')}>\n {label}\n </Label>\n {description && (\n <p id={descriptionId} className=\"text-xs text-secondary-muted-foreground\">\n {description}\n </p>\n )}\n </div>\n </div>\n );\n },\n);\nCheckboxField.displayName = 'CheckboxField';\n","import * as React from 'react';\nimport { Label as LabelPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport type LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nexport const Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(\n 'text-ui-label text-surface-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n ),\n);\nLabel.displayName = 'Label';\n","import * as React from 'react';\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Label } from './Label';\n\nexport type RadioGroupProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;\n\nexport const RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root ref={ref} className={cn('flex flex-col gap-2', className)} {...props} />\n ),\n);\nRadioGroup.displayName = 'RadioGroup';\n\nexport type RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;\n\n// Figma: Radio Group (24) — 16px ring in muted (same size as the checkbox), accent when selected with a solid centre dot.\nexport const RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n RadioGroupItemProps\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'peer inline-flex size-4 shrink-0 items-center justify-center rounded-full border-2 border-input bg-surface transition-colors',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Brand override: selected controls use `ring`, not `primary`/`accent`.\n 'data-[state=checked]:border-ring',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"size-2 rounded-full bg-ring\" />\n </RadioGroupPrimitive.Item>\n));\nRadioGroupItem.displayName = 'RadioGroupItem';\n\nexport interface RadioGroupFieldItemProps extends RadioGroupItemProps {\n label: React.ReactNode;\n /** Secondary line under the label. */\n description?: React.ReactNode;\n}\n\n/** A radio with its label (and optional description) laid out per Figma. */\nexport const RadioGroupFieldItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n RadioGroupFieldItemProps\n>(({ label, description, id, className, disabled, ...props }, ref) => {\n const generatedId = React.useId();\n const controlId = id ?? generatedId;\n const descriptionId = `${controlId}-description`;\n return (\n <div\n className={cn('flex gap-2', description ? 'items-start pt-0.5' : 'items-center', disabled && 'opacity-50', className)}\n >\n <RadioGroupItem\n ref={ref}\n id={controlId}\n disabled={disabled}\n aria-describedby={description ? descriptionId : undefined}\n {...props}\n />\n <div className=\"flex flex-col gap-0.5\">\n <Label htmlFor={controlId} className={cn(!description && 'font-normal leading-5')}>\n {label}\n </Label>\n {description && (\n <p id={descriptionId} className=\"text-xs text-secondary-muted-foreground\">\n {description}\n </p>\n )}\n </div>\n </div>\n );\n});\nRadioGroupFieldItem.displayName = 'RadioGroupFieldItem';\n","import * as React from 'react';\nimport { ArrowUp, Plus } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport interface ChatInputProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit' | 'defaultValue' | 'onChange'> {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n /** Called with the text when the send button (or Enter) is pressed. */\n onSubmit?: (value: string) => void;\n placeholder?: string;\n /** Accessible name for the text area. */\n 'aria-label'?: string;\n /** Attached files (`FileAttachment`s) shown above the text. */\n attachments?: React.ReactNode;\n /** A `ChatChoices` block shown above the text area. */\n choices?: React.ReactNode;\n /** Slot before the send button — usually a `ProjectSelector`. */\n trailing?: React.ReactNode;\n /** Called when the add (+) button is pressed. Hides the button when omitted. */\n onAdd?: () => void;\n addLabel?: string;\n sendLabel?: string;\n disabled?: boolean;\n}\n\n// Figma: Chat Input (56) › Chat input — a rounded card: optional choices, attachments + text, then an actions row.\nexport const ChatInput = React.forwardRef<HTMLDivElement, ChatInputProps>(\n (\n {\n className,\n value,\n defaultValue = '',\n onValueChange,\n onSubmit,\n placeholder = 'Add context or ask for changes...',\n 'aria-label': ariaLabel = 'Message',\n attachments,\n choices,\n trailing,\n onAdd,\n addLabel = 'Add',\n sendLabel = 'Send',\n disabled,\n ...props\n },\n ref,\n ) => {\n const [internal, setInternal] = React.useState(defaultValue);\n const text = value ?? internal;\n const filled = text.trim() !== '' || attachments != null;\n\n const submit = () => {\n if (!text.trim() && attachments == null) return;\n onSubmit?.(text);\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n 'flex w-full flex-col overflow-hidden rounded-2xl border border-border bg-surface shadow-xs',\n 'focus-within:border-input-accent',\n className,\n )}\n {...props}\n >\n {choices}\n <div className=\"flex flex-col gap-4 p-4\">\n {attachments && <div className=\"flex flex-wrap gap-4\">{attachments}</div>}\n <textarea\n rows={1}\n aria-label={ariaLabel}\n value={text}\n disabled={disabled}\n placeholder={placeholder}\n onChange={(event) => {\n setInternal(event.target.value);\n onValueChange?.(event.target.value);\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n submit();\n }\n }}\n className=\"field-sizing-content max-h-60 min-h-7 w-full resize-none bg-transparent text-body-base text-surface-foreground outline-none placeholder:text-muted-foreground\"\n />\n </div>\n <div className=\"flex items-center gap-1.5 px-2.5 pt-2 pb-2.5\">\n {onAdd && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon\" aria-label={addLabel} disabled={disabled} onClick={onAdd}>\n <Plus size={16} aria-hidden />\n </Button>\n )}\n <div className=\"flex flex-1 items-center justify-end gap-1.5\">\n {trailing}\n <Button\n type=\"button\"\n variant={filled ? 'default' : 'outline'}\n size=\"icon\"\n aria-label={sendLabel}\n disabled={disabled || !filled}\n onClick={submit}\n className={cn(!filled && 'disabled:opacity-100 disabled:border-border disabled:text-muted-foreground')}\n >\n <ArrowUp size={16} aria-hidden />\n </Button>\n </div>\n </div>\n </div>\n );\n },\n);\nChatInput.displayName = 'ChatInput';\n\nexport interface AskAiInputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onSubmit'> {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n onSubmit?: (value: string) => void;\n sendLabel?: string;\n}\n\n// Figma: Chat Input (56) › Ask AI — the compact one-line pill (\"Ask for changes\").\nexport const AskAiInput = React.forwardRef<HTMLInputElement, AskAiInputProps>(\n (\n { className, value, defaultValue = '', onValueChange, onSubmit, sendLabel = 'Send', placeholder = 'Ask for changes', disabled, ...props },\n ref,\n ) => {\n const [internal, setInternal] = React.useState(defaultValue);\n const text = value ?? internal;\n const filled = text.trim() !== '';\n return (\n <form\n className={cn(\n 'flex min-h-10 w-full items-center gap-2 rounded-full border border-border bg-surface py-1.5 pr-1.5 pl-2 shadow-sm',\n 'focus-within:border-input-accent',\n className,\n )}\n onSubmit={(event) => {\n event.preventDefault();\n if (filled) onSubmit?.(text);\n }}\n >\n <input\n ref={ref}\n value={text}\n disabled={disabled}\n placeholder={placeholder}\n onChange={(event) => {\n setInternal(event.target.value);\n onValueChange?.(event.target.value);\n }}\n className=\"min-w-0 flex-1 bg-transparent text-body-small text-surface-foreground outline-none placeholder:text-muted-foreground\"\n {...props}\n />\n <Button\n type=\"submit\"\n variant={filled ? 'default' : 'outline'}\n size=\"icon\"\n aria-label={sendLabel}\n disabled={disabled || !filled}\n className={cn(!filled && 'disabled:opacity-100 disabled:border-border disabled:text-muted-foreground')}\n >\n <ArrowUp size={16} aria-hidden />\n </Button>\n </form>\n );\n },\n);\nAskAiInput.displayName = 'AskAiInput';\n","import * as React from 'react';\nimport { X } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport interface FileAttachmentProps extends React.HTMLAttributes<HTMLDivElement> {\n name: string;\n /** File type badge text, e.g. \"PDF\". */\n type?: string;\n /** Shows the round remove button on hover or keyboard focus (Figma: Default). Omit for the sent-message card (Figma: Variant 3). */\n onRemove?: () => void;\n removeLabel?: string;\n}\n\n// Figma: User Message Bubble (54) › File attached — 128px card; the composer variant has a remove button.\nexport const FileAttachment = React.forwardRef<HTMLDivElement, FileAttachmentProps>(\n ({ className, name, type, onRemove, removeLabel, ...props }, ref) => (\n <div ref={ref} className={cn('group/file relative w-32 shrink-0', className)} {...props}>\n <div\n className={cn(\n 'flex flex-col gap-1.5 border border-border bg-surface px-2.5 pt-2.5 pb-3',\n onRemove ? 'rounded-xl' : 'rounded-lg',\n )}\n >\n <p className=\"line-clamp-2 min-h-8 break-all text-ui-caption text-surface-foreground\" title={name}>\n {name}\n </p>\n {type && (\n <span className=\"w-fit rounded-xs bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-1.5 py-px text-body-xxs font-semibold tracking-wider text-secondary-muted-foreground uppercase\">\n {type}\n </span>\n )}\n </div>\n {onRemove && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={removeLabel ?? `Remove ${name}`}\n onClick={onRemove}\n className=\"absolute right-0 bottom-0 rounded-full opacity-0 transition-opacity group-hover/file:opacity-100 group-focus-within/file:opacity-100\"\n >\n <X size={16} aria-hidden />\n </Button>\n )}\n </div>\n ),\n);\nFileAttachment.displayName = 'FileAttachment';\n","import * as React from 'react';\nimport { CaretDown, FolderOpen, FolderSimple } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuTrigger,\n} from '../Overlays & Feedback/DropdownMenu';\n\nconst NEW_PROJECT = '__new__';\n\nexport interface ProjectSelectorProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue'> {\n /** Name of the chosen project. Leave empty for \"New Project\". */\n project?: string;\n /**\n * Existing project names. When given, pressing the selector opens a menu with\n * \"New Project\" and these names; the current choice is checked.\n */\n projects?: string[];\n /** Called with the chosen project name, or `undefined` for \"New Project\". */\n onProjectChange?: (project: string | undefined) => void;\n /** Label of the \"new project\" menu item and of the pill when no project is chosen. */\n newProjectLabel?: string;\n /**\n * `selected` means the project is locked for this chat: the pill is read-only\n * (no caret, neutral border). Otherwise it is a trigger with a caret.\n */\n selected?: boolean;\n}\n\n// Figma: Chat Input (56) › Project selector — a pill showing the project folder, \"New Project\" until one is chosen.\nexport const ProjectSelector = React.forwardRef<HTMLButtonElement, ProjectSelectorProps>(\n ({ className, project, projects, onProjectChange, newProjectLabel = 'New Project', selected = false, children, ...props }, ref) => {\n const label = children ?? project ?? newProjectLabel;\n const classes = cn(\n 'inline-flex h-10 items-center gap-2 rounded-full border bg-surface px-3 py-2 text-ui-label whitespace-nowrap text-surface-foreground transition-colors',\n selected\n ? 'border-border'\n : 'border-input hover:border-input hover:bg-accent-soft hover:text-accent-soft-foreground data-[state=open]:bg-accent-soft data-[state=open]:text-accent-soft-foreground',\n className,\n );\n const content = (\n <>\n {project ? (\n <FolderOpen size={16} weight=\"fill\" aria-hidden className=\"shrink-0\" />\n ) : (\n <FolderSimple size={16} aria-hidden className=\"shrink-0\" />\n )}\n <span>{label}</span>\n {!selected && <CaretDown size={16} aria-hidden className=\"shrink-0\" />}\n </>\n );\n if (selected) {\n return (\n <span className={classes} title={typeof label === 'string' ? label : undefined}>\n {content}\n </span>\n );\n }\n const trigger = (\n <button ref={ref} type=\"button\" aria-haspopup=\"menu\" className={classes} {...props}>\n {content}\n </button>\n );\n if (!projects) return trigger;\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>\n <DropdownMenuContent side=\"top\" align=\"end\" className=\"min-w-60\">\n <DropdownMenuRadioGroup\n value={project ?? NEW_PROJECT}\n onValueChange={(next) => onProjectChange?.(next === NEW_PROJECT ? undefined : next)}\n >\n <DropdownMenuRadioItem value={NEW_PROJECT}>{newProjectLabel}</DropdownMenuRadioItem>\n {projects.map((name) => (\n <DropdownMenuRadioItem key={name} value={name}>\n {name}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n },\n);\nProjectSelector.displayName = 'ProjectSelector';\n","import * as React from 'react';\nimport { CaretRight, Check, Trash } from '@phosphor-icons/react';\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\n// Figma: Dropdown Menu (50) — white card, 1px border, 8px radius, 4px padding and 2px between items.\nconst contentClasses =\n 'min-w-80 overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md';\n\nexport type DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;\n\n/**\n * Radix moves DOM focus to the hovered item, so `:focus-visible` can't tell hover\n * from keyboard navigation. Track the last input modality instead: hover only\n * fills the item, and the ring is drawn only after a key press.\n */\nfunction useKeyboardModality<T extends HTMLElement>(\n onKeyDown?: React.KeyboardEventHandler<T>,\n onPointerMove?: React.PointerEventHandler<T>,\n) {\n const [keyboard, setKeyboard] = React.useState(false);\n return {\n 'data-keyboard': keyboard ? '' : undefined,\n onKeyDown: (event: React.KeyboardEvent<T>) => {\n setKeyboard(true);\n onKeyDown?.(event);\n },\n onPointerMove: (event: React.PointerEvent<T>) => {\n setKeyboard(false);\n onPointerMove?.(event);\n },\n };\n}\n\nexport const DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n DropdownMenuContentProps\n>(({ className, sideOffset = 4, onKeyDown, onPointerMove, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n style={{ zIndex: 'var(--sys-z-30)' }}\n className={cn(contentClasses, 'group/menu flex flex-col gap-0.5', className)}\n {...useKeyboardModality(onKeyDown, onPointerMove)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = 'DropdownMenuContent';\n\nconst itemBase =\n 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-body-base text-surface-foreground outline-none select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50';\nconst itemHover =\n 'data-[highlighted]:bg-accent-soft group-data-[keyboard]/menu:data-[highlighted]:outline-solid group-data-[keyboard]/menu:data-[highlighted]:outline-2 group-data-[keyboard]/menu:data-[highlighted]:-outline-offset-2 group-data-[keyboard]/menu:data-[highlighted]:outline-ring';\nconst selectedItem = 'data-[state=checked]:text-ui-label-large data-[state=checked]:text-accent-foreground';\n\nexport interface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n /** Secondary line under the label. */\n description?: React.ReactNode;\n /** `destructive` shows a trash icon and red text (Figma: State = Destructive). */\n variant?: 'default' | 'destructive';\n /** Leading icon. */\n icon?: React.ReactNode;\n}\n\nfunction ItemBody({ children, description }: { children: React.ReactNode; description?: React.ReactNode }) {\n return (\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span>{children}</span>\n {description && <span className=\"text-xs leading-normal text-secondary-muted-foreground\">{description}</span>}\n </span>\n );\n}\n\nexport const DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n DropdownMenuItemProps\n>(({ className, children, description, variant = 'default', icon, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n itemBase,\n variant === 'destructive'\n ? 'text-ui-label-large text-destructive data-[highlighted]:bg-destructive-soft-hover group-data-[keyboard]/menu:data-[highlighted]:outline-solid group-data-[keyboard]/menu:data-[highlighted]:outline-2 group-data-[keyboard]/menu:data-[highlighted]:-outline-offset-2 group-data-[keyboard]/menu:data-[highlighted]:outline-ring'\n : itemHover,\n className,\n )}\n {...props}\n >\n {variant === 'destructive' && !icon ? <Trash size={16} aria-hidden className=\"shrink-0\" /> : icon}\n <ItemBody description={description}>{children}</ItemBody>\n </DropdownMenuPrimitive.Item>\n));\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\nexport interface DropdownMenuSelectableItemProps {\n description?: React.ReactNode;\n}\n\n/** A checkable item: the selected state is accent-coloured with a trailing check (Figma: State = Selected). */\nexport const DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem> & DropdownMenuSelectableItemProps\n>(({ className, children, description, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem ref={ref} className={cn(itemBase, itemHover, selectedItem, className)} {...props}>\n <ItemBody description={description}>{children}</ItemBody>\n <DropdownMenuPrimitive.ItemIndicator>\n <Check size={16} aria-hidden />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';\n\n/** One choice of a `DropdownMenuRadioGroup`, styled like a selected item when active. */\nexport const DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> & DropdownMenuSelectableItemProps\n>(({ className, children, description, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem ref={ref} className={cn(itemBase, itemHover, selectedItem, className)} {...props}>\n <ItemBody description={description}>{children}</ItemBody>\n <DropdownMenuPrimitive.ItemIndicator>\n <Check size={16} aria-hidden />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';\n\n/** Item that opens a submenu, with a trailing caret (Figma: Expand = Yes). */\nexport const DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(itemBase, itemHover, 'data-[state=open]:bg-accent-soft', className)}\n {...props}\n >\n <span className=\"flex-1\">{children}</span>\n <CaretRight size={16} aria-hidden />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';\n\nexport const DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, onKeyDown, onPointerMove, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n style={{ zIndex: 'var(--sys-z-30)' }}\n className={cn(contentClasses, 'group/menu flex flex-col gap-0.5', className)}\n {...useKeyboardModality(onKeyDown, onPointerMove)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent';\n\nexport const DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-ui-caption text-secondary-muted-foreground', className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = 'DropdownMenuLabel';\n\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px bg-border', className)} {...props} />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface TimestampProps extends React.HTMLAttributes<HTMLDivElement> {\n /** The time text, e.g. \"5 minutes ago\". */\n time: React.ReactNode;\n /** Action buttons (ghost icon `Button`s) shown next to the time. */\n children?: React.ReactNode;\n /** `before` puts the time left of the actions (user messages); `after` puts it right of them (AI replies). */\n timePosition?: 'before' | 'after';\n}\n\n// Figma: Timestamp (58) — 12px/16px `secondary-muted` time with 40px icon actions.\nexport const Timestamp = React.forwardRef<HTMLDivElement, TimestampProps>(\n ({ className, time, children, timePosition = 'before', ...props }, ref) => {\n const timeNode = (\n <time className=\"text-ui-caption whitespace-nowrap text-secondary-muted-foreground\">{time}</time>\n );\n return (\n <div\n ref={ref}\n className={cn('flex items-center gap-2', timePosition === 'before' && 'justify-end', className)}\n {...props}\n >\n {timePosition === 'before' && timeNode}\n {children && (\n <div role=\"toolbar\" aria-label=\"Message actions\" className=\"flex items-center\">\n {children}\n </div>\n )}\n {timePosition === 'after' && timeNode}\n </div>\n );\n },\n);\nTimestamp.displayName = 'Timestamp';\n","import * as React from 'react';\nimport { CaretRight, Check } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface TopicCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Leading 24px icon (a Phosphor icon, e.g. `<FolderOpen weight=\"fill\" />`). */\n icon?: React.ReactNode;\n title: React.ReactNode;\n /** Small tag beside the title (e.g. a language `Badge`). */\n badge?: React.ReactNode;\n description: React.ReactNode;\n /** Chips under the description (e.g. topic tags). */\n tags?: React.ReactNode;\n /** Meta line under the description (e.g. \"7 Questions · 30 minutes\"). */\n meta?: React.ReactNode;\n}\n\n// Figma: AI Response Container (55) › Topic — bordered 16px-radius card with a display-font title.\nexport const TopicCard = React.forwardRef<HTMLDivElement, TopicCardProps>(\n ({ className, icon, title, badge, description, tags, meta, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex w-full flex-col gap-4 overflow-hidden rounded-xl border border-border bg-surface p-4', className)}\n {...props}\n >\n <div className=\"flex items-center gap-4\">\n <div className=\"flex items-center gap-4 text-primary\">\n {icon && <span className=\"flex size-6 shrink-0 items-center justify-center [&>svg]:size-6\">{icon}</span>}\n <h3 className=\"text-heading-h3 whitespace-nowrap\">{title}</h3>\n </div>\n {badge}\n </div>\n <p className=\"text-body-base text-surface-foreground\">{description}</p>\n {tags && <div className=\"flex flex-wrap items-center gap-2\">{tags}</div>}\n {meta && <div className=\"flex items-center gap-2 text-ui-caption text-secondary-muted-foreground\">{meta}</div>}\n </div>\n ),\n);\nTopicCard.displayName = 'TopicCard';\n\nexport interface TopicCardMetaItemProps extends React.HTMLAttributes<HTMLSpanElement> {\n icon: React.ReactNode;\n}\n\n/** An icon + text item for `TopicCard`'s `meta` line. */\nexport function TopicCardMetaItem({ icon, children, className, ...props }: TopicCardMetaItemProps) {\n return (\n <span className={cn('flex items-center gap-1', className)} {...props}>\n <span aria-hidden=\"true\" className=\"flex size-4 items-center justify-center [&>svg]:size-4\">\n {icon}\n </span>\n {children}\n </span>\n );\n}\n\n/** A short chip for `TopicCard`'s `tags` row. */\nexport function TopicCardTag({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {\n return (\n <span\n className={cn(\n 'rounded-sm bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2 py-1 text-ui-caption text-surface-foreground',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport interface TopicActivityRowProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {\n /** Status text, e.g. \"New Activity Created\". */\n status: React.ReactNode;\n}\n\n// Figma: Topic › Variant 5 — a divider row linking to the created item.\nexport const TopicActivityRow = React.forwardRef<HTMLButtonElement, TopicActivityRowProps>(\n ({ className, status, children, ...props }, ref) => (\n <button\n ref={ref}\n type=\"button\"\n className={cn(\n 'flex w-full items-center gap-4 border-b border-border bg-surface p-4 text-left text-body-small text-surface-foreground',\n className,\n )}\n {...props}\n >\n <span className=\"flex items-center gap-2 whitespace-nowrap\">\n <Check size={16} aria-hidden className=\"text-accent\" />\n {status}\n </span>\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <CaretRight size={16} aria-hidden />\n </button>\n ),\n);\nTopicActivityRow.displayName = 'TopicActivityRow';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface UserMessageBubbleProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Attached files (`FileAttachment`s) shown above the text. */\n attachments?: React.ReactNode;\n /** Row under the bubble, usually a `Timestamp` with message actions. */\n footer?: React.ReactNode;\n}\n\n// Figma: User Message Bubble (54) › Message — `secondary` fill, 16px radius with a 4px bottom-right corner.\nexport const UserMessageBubble = React.forwardRef<HTMLDivElement, UserMessageBubbleProps>(\n ({ className, children, attachments, footer, ...props }, ref) => (\n <div ref={ref} className={cn('flex w-full max-w-125 flex-col items-end gap-2.5', className)} {...props}>\n <div className=\"flex w-full flex-col gap-4 rounded-tl-xl rounded-tr-xl rounded-br-xs rounded-bl-xl bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 p-4 text-body-base text-surface-foreground\">\n {attachments && <div className=\"flex flex-wrap gap-4\">{attachments}</div>}\n <p className=\"break-words\">{children}</p>\n </div>\n {footer && <div className=\"w-full\">{footer}</div>}\n </div>\n ),\n);\nUserMessageBubble.displayName = 'UserMessageBubble';\n","import { CaretDown, CaretLeft, CaretRight } from '@phosphor-icons/react';\nimport { DayPicker, type DayPickerProps } from 'react-day-picker';\n\nimport { cn } from '../../lib/utils';\n\nexport type CalendarProps = DayPickerProps & {\n /** Days to mark with a dashed outline (e.g. suggested interview slots). */\n recommendedDates?: Date[];\n};\n\nconst subtleFill = 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5';\n\n// Figma: Calendar (25) › Calendar / DayCell-24 — 36px round day cells on a 4px grid, month + year pickers in the header.\nexport function Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'dropdown',\n recommendedDates,\n modifiers,\n modifiersClassNames,\n startMonth,\n endMonth,\n ...props\n}: CalendarProps) {\n const year = new Date().getFullYear();\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n captionLayout={captionLayout}\n startMonth={startMonth ?? new Date(year - 10, 0)}\n endMonth={endMonth ?? new Date(year + 10, 11)}\n className={cn('w-71 text-surface-foreground', className)}\n modifiers={{ ...(recommendedDates ? { recommended: recommendedDates } : {}), ...modifiers }}\n modifiersClassNames={{\n recommended: 'border border-dashed border-border *:text-surface-foreground',\n ...modifiersClassNames,\n }}\n classNames={{\n root: 'relative',\n months: 'flex flex-col',\n month: 'flex flex-col items-center gap-4',\n nav: 'absolute inset-x-0 top-0 flex h-8 items-center justify-between',\n button_previous:\n 'inline-flex size-8 items-center justify-center rounded-sm text-surface-foreground hover:bg-accent-soft hover:text-accent-soft-foreground disabled:opacity-50',\n button_next:\n 'inline-flex size-8 items-center justify-center rounded-sm text-surface-foreground hover:bg-accent-soft hover:text-accent-soft-foreground disabled:opacity-50',\n month_caption: 'flex h-8 items-center justify-center',\n dropdowns: 'flex items-center gap-1',\n dropdown_root:\n 'relative inline-flex items-center rounded-md border border-input bg-surface px-3 py-1.5 text-body-small shadow-xs hover:border-input-accent',\n dropdown: 'absolute inset-0 cursor-pointer opacity-0',\n caption_label: 'flex items-center gap-2 text-body-small text-surface-foreground',\n month_grid: 'w-full border-collapse',\n weekdays: 'flex gap-1',\n weekday: 'flex h-8 w-9 items-center justify-center text-ui-caption text-muted-foreground',\n weeks: 'flex flex-col gap-1',\n week: 'flex gap-1',\n day: 'size-9 rounded-full p-0 text-center',\n day_button:\n 'flex size-full items-center justify-center rounded-full text-ui-caption text-secondary-muted-foreground transition-colors hover:bg-accent-soft hover:text-accent-soft-foreground',\n selected: cn(subtleFill, '*:text-surface-foreground'),\n today: 'font-semibold',\n outside: 'opacity-60 *:text-muted-foreground',\n disabled: 'opacity-60 *:pointer-events-none *:text-muted-foreground',\n hidden: 'invisible',\n ...classNames,\n }}\n components={{\n Chevron: ({ orientation }) =>\n orientation === 'left' ? (\n <CaretLeft size={16} aria-hidden />\n ) : orientation === 'right' ? (\n <CaretRight size={16} aria-hidden />\n ) : (\n <CaretDown size={16} aria-hidden />\n ),\n }}\n {...props}\n />\n );\n}\nCalendar.displayName = 'Calendar';\n","import * as React from 'react';\nimport { CalendarBlank } from '@phosphor-icons/react';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Calendar, type CalendarProps } from './Calendar';\nimport { Field } from './Field';\nimport { formatDateTime } from './formatDateTime';\nimport { TimePicker, type TimePickerProps, type TimeValue } from './TimePicker';\n\nfunction toTimeValue(date: Date | undefined): TimeValue | undefined {\n if (!date) return undefined;\n const hours = date.getHours();\n return { hour: hours % 12 === 0 ? 12 : hours % 12, minute: date.getMinutes(), period: hours >= 12 ? 'PM' : 'AM' };\n}\n\nfunction combine(date: Date, time: TimeValue): Date {\n const next = new Date(date);\n next.setHours((time.hour % 12) + (time.period === 'PM' ? 12 : 0), time.minute, 0, 0);\n return next;\n}\n\nexport interface DateTimePickerProps {\n /** Initial selection. The picker keeps its own draft until Apply, so remount it (e.g. with a `key`) to reset from a new value. */\n value?: Date;\n defaultValue?: Date;\n /** Called with the chosen date (time included when `showTime`) when Apply is pressed. */\n onApply?: (value: Date | undefined) => void;\n onReset?: () => void;\n /** Show the time picker column next to the calendar. */\n showTime?: boolean;\n calendarProps?: Omit<CalendarProps, 'mode' | 'selected' | 'onSelect'>;\n timePickerProps?: Omit<TimePickerProps, 'value' | 'onValueChange'>;\n className?: string;\n}\n\n// Figma: Calendar (25) › Date & time picker — card with the calendar, an optional time column and Reset / Apply.\nexport function DateTimePicker({\n value,\n defaultValue,\n onApply,\n onReset,\n showTime = true,\n calendarProps,\n timePickerProps,\n className,\n}: DateTimePickerProps) {\n const [date, setDate] = React.useState<Date | undefined>(value ?? defaultValue);\n const [time, setTime] = React.useState<TimeValue | undefined>(toTimeValue(value ?? defaultValue));\n\n const apply = () => {\n if (!date) return onApply?.(undefined);\n onApply?.(showTime ? combine(date, time ?? { hour: 12, minute: 0, period: 'AM' }) : date);\n };\n\n return (\n <div\n className={cn(\n 'inline-flex flex-col gap-4 rounded-lg border border-border bg-surface p-4 shadow-md',\n className,\n )}\n >\n <div className=\"flex items-center gap-6\">\n <Calendar mode=\"single\" selected={date} onSelect={setDate} defaultMonth={date} {...calendarProps} />\n {showTime && (\n <>\n <div className=\"h-70 w-px self-center bg-border\" aria-hidden=\"true\" />\n <TimePicker value={time} onValueChange={setTime} {...timePickerProps} />\n </>\n )}\n </div>\n <div className=\"flex items-center justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => {\n setDate(undefined);\n setTime(undefined);\n onReset?.();\n }}\n >\n Reset\n </Button>\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={apply}>\n Apply\n </Button>\n </div>\n </div>\n );\n}\n\nexport interface DatePickerProps extends Omit<DateTimePickerProps, 'onApply' | 'className'> {\n label?: React.ReactNode;\n placeholder?: string;\n onValueChange?: (value: Date | undefined) => void;\n className?: string;\n}\n\n/** Field-style trigger that opens a `DateTimePicker` in a popover. Figma: Calendar (25) › Calendar & time. */\nexport const DatePicker = React.forwardRef<HTMLButtonElement, DatePickerProps>(\n ({ label, placeholder = 'Select date and time', value, defaultValue, onValueChange, showTime = true, className, ...pickerProps }, ref) => {\n const [open, setOpen] = React.useState(false);\n const [internal, setInternal] = React.useState<Date | undefined>(defaultValue);\n const current = value ?? internal;\n\n return (\n <Field label={label} className={cn('w-75', className)}>\n {(control) => (\n <PopoverPrimitive.Root open={open} onOpenChange={setOpen}>\n <PopoverPrimitive.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n {...control}\n className=\"flex h-10 w-full items-center gap-3 rounded-md border border-input bg-surface px-3 py-2.5 text-left shadow-xs transition-colors hover:border-input-accent data-[state=open]:border-input-accent\"\n >\n <CalendarBlank size={24} aria-hidden className=\"shrink-0 text-surface-foreground\" />\n <span className={cn('truncate', current ? 'text-ui-label-large text-surface-foreground' : 'text-body-base text-muted-foreground')}>\n {current ? formatDateTime(current, showTime) : placeholder}\n </span>\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content align=\"start\" sideOffset={8} style={{ zIndex: 'var(--sys-z-20)' }}>\n <DateTimePicker\n {...pickerProps}\n showTime={showTime}\n value={current}\n onApply={(next) => {\n setInternal(next);\n onValueChange?.(next);\n setOpen(false);\n }}\n />\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n )}\n </Field>\n );\n },\n);\nDatePicker.displayName = 'DatePicker';\n","import * as React from 'react';\nimport { CheckCircle, WarningCircle } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Label } from './Label';\n\nexport type FieldStatus = 'default' | 'success' | 'error';\n\n/**\n * Classes for a bordered field surface (Figma: Text Input / Textarea / Select).\n * Hover and the open \"select\" state use `input-accent`; success and error swap\n * the border colour. Focus is handled by the global `:focus-visible` ring.\n */\nexport function fieldSurfaceClasses(status: FieldStatus = 'default') {\n return cn(\n 'border bg-surface text-surface-foreground transition-colors',\n status === 'success' && 'border-success-foreground',\n status === 'error' && 'border-destructive',\n status === 'default' && 'border-input hover:border-input-accent',\n );\n}\n\nexport interface FieldControlProps {\n id: string;\n 'aria-describedby'?: string;\n 'aria-invalid'?: true;\n}\n\nexport interface FieldProps {\n /** Label shown above the control. */\n label?: React.ReactNode;\n /** Neutral helper text shown under the control. Replaced by `message` on success/error. */\n description?: React.ReactNode;\n /** Status message shown with an icon when `status` is `success` or `error`. */\n message?: React.ReactNode;\n status?: FieldStatus;\n /** Id for the control; generated when omitted. */\n id?: string;\n className?: string;\n /** Render the control, spreading the supplied props onto it. */\n children: (control: FieldControlProps) => React.ReactNode;\n}\n\n/**\n * Label + control + helper/status message, wired together with\n * `htmlFor`/`aria-describedby`/`aria-invalid`. Shared by Text Input, Textarea,\n * Select, Numerical input and Input with action.\n */\nexport function Field({ label, description, message, status = 'default', id, className, children }: FieldProps) {\n const generatedId = React.useId();\n const controlId = id ?? generatedId;\n const messageId = `${controlId}-message`;\n const showStatus = status !== 'default' && message != null;\n const text = showStatus ? message : description;\n\n return (\n <div className={cn('flex w-full flex-col gap-1.5', className)}>\n {label != null && <Label htmlFor={controlId}>{label}</Label>}\n {children({\n id: controlId,\n 'aria-describedby': text != null ? messageId : undefined,\n 'aria-invalid': status === 'error' ? true : undefined,\n })}\n {text != null && (\n <p\n id={messageId}\n className={cn(\n 'flex gap-2 text-ui-caption',\n status === 'default' && 'text-secondary-muted-foreground',\n status === 'success' && 'items-center text-success-foreground',\n status === 'error' && 'items-start text-destructive',\n )}\n >\n {showStatus &&\n (status === 'error' ? (\n <WarningCircle size={16} aria-hidden className=\"shrink-0\" />\n ) : (\n <CheckCircle size={16} aria-hidden className=\"shrink-0\" />\n ))}\n {text}\n </p>\n )}\n </div>\n );\n}\n","/** `September 23, 2026 - 11:30 AM` (or just the date when `showTime` is false). */\nexport function formatDateTime(date: Date, showTime = true) {\n const day = date.toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' });\n if (!showTime) return day;\n return `${day} - ${date.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' })}`;\n}\n","import * as React from 'react';\nimport { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { TabItem } from '../Navigation/TabItem';\nimport { TabNavigation, Tabs } from '../Navigation/TabNavigation';\n\nexport interface TimeValue {\n /** 1–12 */\n hour: number;\n /** 0–59 */\n minute: number;\n period: 'AM' | 'PM';\n}\n\nexport interface TimeItemProps extends React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> {\n /** Dashed outline to suggest this slot. */\n recommended?: boolean;\n}\n\n// Figma: Calendar (25) › Time Item — a 12px/16px chip; selected is the subtle fill, hover is accent-soft.\nexport const TimeItem = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Item>, TimeItemProps>(\n ({ className, recommended, ...props }, ref) => (\n <ToggleGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'flex w-full justify-center rounded-sm px-2.5 py-1.5 text-ui-caption text-secondary-muted-foreground transition-colors',\n 'hover:bg-accent-soft hover:text-accent-soft-foreground',\n 'data-[state=on]:bg-secondary data-[state=on]:bg-linear-to-r data-[state=on]:from-overlay-dark-5 data-[state=on]:to-overlay-dark-5 data-[state=on]:text-surface-foreground',\n 'data-[state=on]:hover:bg-accent-soft data-[state=on]:hover:bg-none data-[state=on]:hover:text-accent-soft-foreground',\n 'disabled:pointer-events-none disabled:opacity-60 disabled:text-muted-foreground',\n recommended && 'border border-dashed border-border text-surface-foreground',\n className,\n )}\n {...props}\n />\n ),\n);\nTimeItem.displayName = 'TimeItem';\n\nexport interface TimePickerProps {\n value?: TimeValue;\n onValueChange?: (value: TimeValue) => void;\n /** Minute interval between options. */\n minuteStep?: number;\n isHourDisabled?: (hour: number, period: 'AM' | 'PM') => boolean;\n isMinuteDisabled?: (minute: number, hour: number, period: 'AM' | 'PM') => boolean;\n isHourRecommended?: (hour: number, period: 'AM' | 'PM') => boolean;\n isMinuteRecommended?: (minute: number, hour: number, period: 'AM' | 'PM') => boolean;\n className?: string;\n}\n\nconst pad = (n: number) => String(n).padStart(2, '0');\n\n/** Figma: Calendar (25) › Time Picker Panel — AM/PM switch with hour and minute columns. */\nexport function TimePicker({\n value,\n onValueChange,\n minuteStep = 5,\n isHourDisabled,\n isMinuteDisabled,\n isHourRecommended,\n isMinuteRecommended,\n className,\n}: TimePickerProps) {\n const current: TimeValue = value ?? { hour: 12, minute: 0, period: 'AM' };\n const root = React.useRef<HTMLDivElement>(null);\n // Bring the selected hour / minute into view when the (scrollable) columns mount.\n React.useEffect(() => {\n root.current?.querySelectorAll<HTMLElement>('[data-state=\"on\"]').forEach((item) => {\n const column = item.parentElement;\n if (column) column.scrollTop = Math.max(0, item.offsetTop - column.offsetTop - column.clientHeight / 2 + item.clientHeight / 2);\n });\n }, []);\n const hours = Array.from({ length: 12 }, (_, i) => i + 1);\n const minutes = Array.from({ length: Math.ceil(60 / minuteStep) }, (_, i) => i * minuteStep);\n\n return (\n <div ref={root} className={cn('flex w-45 flex-col gap-4 pt-2', className)}>\n <p className=\"text-ui-label text-surface-foreground\">Select Time</p>\n <Tabs\n value={current.period}\n onValueChange={(period) => onValueChange?.({ ...current, period: period as 'AM' | 'PM' })}\n >\n <TabNavigation variant=\"toggle\" aria-label=\"AM or PM\" className=\"self-start\">\n {(['AM', 'PM'] as const).map((period) => (\n <TabItem key={period} value={period}>\n {period}\n </TabItem>\n ))}\n </TabNavigation>\n </Tabs>\n <div className=\"flex h-47.5 w-full items-start gap-3\">\n <ToggleGroupPrimitive.Root\n type=\"single\"\n aria-label=\"Hour\"\n value={String(current.hour)}\n onValueChange={(next) => next && onValueChange?.({ ...current, hour: Number(next) })}\n className=\"flex h-full min-w-0 flex-1 flex-col gap-1 overflow-y-auto\"\n >\n {hours.map((hour) => (\n <TimeItem\n key={hour}\n value={String(hour)}\n disabled={isHourDisabled?.(hour, current.period)}\n recommended={isHourRecommended?.(hour, current.period)}\n >\n {pad(hour)}\n </TimeItem>\n ))}\n </ToggleGroupPrimitive.Root>\n <div className=\"flex h-full items-center text-ui-label-large text-surface-foreground\" aria-hidden=\"true\">\n :\n </div>\n <ToggleGroupPrimitive.Root\n type=\"single\"\n aria-label=\"Minute\"\n value={String(current.minute)}\n onValueChange={(next) => next && onValueChange?.({ ...current, minute: Number(next) })}\n className=\"flex h-full min-w-0 flex-1 flex-col gap-1 overflow-y-auto\"\n >\n {minutes.map((minute) => (\n <TimeItem\n key={minute}\n value={String(minute)}\n disabled={isMinuteDisabled?.(minute, current.hour, current.period)}\n recommended={isMinuteRecommended?.(minute, current.hour, current.period)}\n >\n {pad(minute)}\n </TimeItem>\n ))}\n </ToggleGroupPrimitive.Root>\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { Tabs as TabsPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { TabNavigationContext } from './TabNavigation';\n\nexport type TabItemProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>;\n\n// Figma: Tab Item (08). The shape and states follow the parent TabNavigation variant.\nconst base =\n 'inline-flex h-7 items-center justify-center gap-1 whitespace-nowrap px-2.5 py-1 text-ui-label transition-colors disabled:pointer-events-none disabled:opacity-50';\nconst filter =\n 'rounded-full text-surface-foreground hover:text-accent data-[state=active]:bg-secondary data-[state=active]:bg-linear-to-r data-[state=active]:from-overlay-dark-5 data-[state=active]:to-overlay-dark-5 data-[state=active]:hover:bg-accent-soft data-[state=active]:hover:bg-none data-[state=active]:hover:text-accent-soft-foreground disabled:text-muted-foreground';\nconst toggle =\n 'rounded-sm text-secondary-muted-foreground hover:text-surface-foreground data-[state=active]:bg-surface data-[state=active]:text-surface-foreground';\n\nexport const TabItem = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Trigger>, TabItemProps>(\n ({ className, ...props }, ref) => {\n const variant = React.useContext(TabNavigationContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(base, variant === 'toggle' ? toggle : filter, className)}\n {...props}\n />\n );\n },\n);\nTabItem.displayName = 'TabItem';\n","import * as React from 'react';\nimport { Tabs as TabsPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\n/** `filter` is the pill-shaped table filter; `toggle` is the icon-only mode switch. */\nexport type TabNavigationVariant = 'filter' | 'toggle';\n\nexport const TabNavigationContext = React.createContext<TabNavigationVariant>('filter');\n\nconst tabNavigationVariants = cva('inline-flex items-start gap-1 p-0.5', {\n variants: {\n variant: {\n filter: 'rounded-full border border-border bg-surface',\n toggle: 'rounded-md bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5',\n },\n },\n defaultVariants: { variant: 'filter' },\n});\n\n/** Radix `Tabs.Root` — owns the selected value; pair with `TabNavigation` + `TabItem` + `TabsContent`. */\nexport const Tabs = TabsPrimitive.Root;\nexport const TabsContent = TabsPrimitive.Content;\n\nexport interface TabNavigationProps\n extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>,\n VariantProps<typeof tabNavigationVariants> {}\n\nexport const TabNavigation = React.forwardRef<React.ElementRef<typeof TabsPrimitive.List>, TabNavigationProps>(\n ({ className, variant = 'filter', ...props }, ref) => (\n <TabNavigationContext.Provider value={variant ?? 'filter'}>\n <TabsPrimitive.List ref={ref} className={cn(tabNavigationVariants({ variant }), className)} {...props} />\n </TabNavigationContext.Provider>\n ),\n);\nTabNavigation.displayName = 'TabNavigation';\n","import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport { cn } from '../../lib/utils';\nimport { Label } from './Label';\n\nexport const Form = FormProvider;\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nexport function FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(props: ControllerProps<TFieldValues, TName>) {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nexport function useFormField() {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext?.name });\n\n if (!fieldContext) {\n throw new Error('useFormField must be used within <FormField>');\n }\n if (!itemContext) {\n throw new Error('useFormField must be used within <FormItem>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n}\n\nexport type FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FormItem = React.forwardRef<HTMLDivElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('flex flex-col gap-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\nFormItem.displayName = 'FormItem';\n\n// Deliberately not `ComponentPropsWithoutRef<typeof Label>` — that type\n// transitively references a private @radix-ui/react-label type that tsup's\n// declaration build can't re-export portably. Label's own prop surface is\n// just native label attributes, so this is equivalent.\nexport type FormLabelProps = React.LabelHTMLAttributes<HTMLLabelElement>;\n\nexport const FormLabel = React.forwardRef<HTMLLabelElement, FormLabelProps>(\n ({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n return (\n <Label\n ref={ref}\n htmlFor={formItemId}\n className={cn(error && 'text-destructive-foreground', className)}\n {...props}\n />\n );\n },\n);\nFormLabel.displayName = 'FormLabel';\n\nexport type FormControlProps = React.ComponentPropsWithoutRef<typeof Slot.Root>;\n\nexport const FormControl = React.forwardRef<React.ElementRef<typeof Slot.Root>, FormControlProps>((props, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n return (\n <Slot.Root\n ref={ref}\n id={formItemId}\n aria-describedby={error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId}\n aria-invalid={!!error}\n {...props}\n />\n );\n});\nFormControl.displayName = 'FormControl';\n\nexport type FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nexport const FormDescription = React.forwardRef<HTMLParagraphElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-sm text-secondary-muted-foreground', className)}\n {...props}\n />\n );\n },\n);\nFormDescription.displayName = 'FormDescription';\n\nexport type FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nexport const FormMessage = React.forwardRef<HTMLParagraphElement, FormMessageProps>(\n ({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn('text-sm text-destructive-foreground', className)} {...props}>\n {body}\n </p>\n );\n },\n);\nFormMessage.displayName = 'FormMessage';\n","import * as React from 'react';\nimport { PencilSimple } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { fieldSurfaceClasses } from './Field';\n\nexport interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {\n /** Controlled value. Pair with `onValueChange`. */\n value?: string;\n defaultValue?: string;\n /** Called when an edit is committed (Enter, blur or the commit key for multiline) with a changed value. */\n onValueChange?: (value: string) => void;\n /** Shown in read mode, muted, while the value is empty. */\n placeholder?: string;\n /** Accessible name for the read button and the field. Required: there is no visible label. */\n 'aria-label': string;\n /** Use a textarea. Enter inserts a line break; Cmd/Ctrl+Enter commits. */\n multiline?: boolean;\n maxLength?: number;\n disabled?: boolean;\n /** Called when editing starts or ends. */\n onEditingChange?: (editing: boolean) => void;\n /** Called on every keystroke while editing (and with the saved value when editing ends), e.g. for a live character counter. */\n onDraftChange?: (value: string) => void;\n /**\n * `default` is a rounded field. A short single-line label shows the pencil and hugs its text; `multiline` (longer\n * text) hides the pencil and fills the width. `question` is for question text: it fills the width with no pencil,\n * has square corners and shows a 1px bottom border on hover and focus (in the input border colour) that becomes a bolder 2px accent border while `selected`. Enter saves; Shift+Enter adds a\n * line break when `multiline`.\n */\n variant?: 'default' | 'question';\n /** `question` variant: keeps the bottom border while the owning question is selected. */\n selected?: boolean;\n /** Classes for the displayed/edited text, e.g. a heading text style. The field itself keeps the same box. */\n textClassName?: string;\n}\n\n// Not in Figma: shadcn has no inline-edit primitive, so this is a plain toggle between a button and a field.\n// Read mode is a button (so it is keyboard- and screen-reader-reachable); editing swaps in an input that commits on\n// Enter/blur and reverts on Escape.\nexport const InlineEdit = React.forwardRef<HTMLDivElement, InlineEditProps>(\n (\n {\n className,\n textClassName,\n value: valueProp,\n defaultValue = '',\n onValueChange,\n placeholder = 'Click to edit',\n multiline,\n maxLength,\n disabled,\n onEditingChange,\n onDraftChange,\n variant = 'default',\n selected,\n 'aria-label': ariaLabel,\n ...props\n },\n ref,\n ) => {\n const [internal, setInternal] = React.useState(defaultValue);\n const value = valueProp ?? internal;\n const [editing, setEditing] = React.useState(false);\n const [draft, setDraft] = React.useState(value);\n const fieldRef = React.useRef<HTMLInputElement & HTMLTextAreaElement>(null);\n const readRef = React.useRef<HTMLButtonElement>(null);\n // Set while an Escape revert is pending so the blur that follows it does not commit.\n const cancelled = React.useRef(false);\n const restoreFocus = React.useRef(false);\n\n React.useEffect(() => {\n if (editing) {\n fieldRef.current?.focus();\n fieldRef.current?.select();\n } else if (restoreFocus.current) {\n restoreFocus.current = false;\n readRef.current?.focus();\n }\n }, [editing]);\n\n const start = () => {\n if (disabled) return;\n setDraft(value);\n cancelled.current = false;\n setEditing(true);\n onEditingChange?.(true);\n };\n const finish = (commit: boolean, refocus: boolean) => {\n restoreFocus.current = refocus;\n if (commit && draft !== value) {\n if (valueProp === undefined) setInternal(draft);\n onValueChange?.(draft);\n }\n setEditing(false);\n onEditingChange?.(false);\n onDraftChange?.(commit ? draft : value);\n };\n\n const textClasses = cn('text-ui-input-value text-surface-foreground', textClassName);\n const question = variant === 'question';\n // Longer text and question text fill the box and drop the pencil; a short label hugs its text.\n const fill = multiline || question;\n\n return (\n <div ref={ref} className={cn(fill ? 'flex w-full min-w-0' : 'inline-flex min-w-0 max-w-full', className)} {...props}>\n {editing ? (\n React.createElement(multiline ? 'textarea' : 'input', {\n ref: fieldRef,\n value: draft,\n maxLength,\n 'aria-label': ariaLabel,\n ...(multiline ? { rows: 1 } : { type: 'text' }),\n className: cn(\n 'w-full px-3 py-1 outline-none',\n multiline && 'field-sizing-content resize-none',\n question\n ? 'rounded-none border-0 border-b-2 border-accent-foreground bg-transparent'\n : cn('rounded-md focus-visible:border-input-accent', fieldSurfaceClasses('default')),\n textClasses,\n ),\n onChange: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n setDraft(event.target.value);\n onDraftChange?.(event.target.value);\n },\n onKeyDown: (event: React.KeyboardEvent) => {\n if (event.key === 'Escape') {\n cancelled.current = true;\n finish(false, true);\n } else if (\n event.key === 'Enter' &&\n (!multiline || event.metaKey || event.ctrlKey || (question && !event.shiftKey))\n ) {\n event.preventDefault();\n finish(true, true);\n }\n },\n onBlur: () => {\n if (!cancelled.current) finish(true, false);\n },\n })\n ) : (\n <button\n ref={readRef}\n type=\"button\"\n disabled={disabled}\n aria-label={`${ariaLabel}: ${value || placeholder}. Edit`}\n onClick={start}\n className={cn(\n 'group inline-flex min-w-0 max-w-full items-center gap-2 px-3 text-left outline-none',\n fill && 'w-full',\n question\n ? // Hover and focus show a 1px bottom border in the input colour; only a selected question gets the 2px accent\n // one. The extra 1px of bottom padding keeps the height identical so the text never jumps.\n selected\n ? 'rounded-none border-b-2 border-accent-foreground py-1'\n : 'rounded-none border-b border-transparent pb-1.25 pt-1 enabled:hover:border-input enabled:focus-visible:border-input'\n : 'rounded-md border border-transparent py-1 enabled:focus-visible:border-input-accent',\n 'enabled:hover:bg-secondary disabled:cursor-not-allowed disabled:opacity-50',\n textClasses,\n )}\n >\n <span className={cn('min-w-0', multiline ? 'whitespace-pre-wrap' : 'truncate', fill && 'flex-1', !value && 'text-muted-foreground')}>\n {value || placeholder}\n </span>\n {!fill && (\n <PencilSimple\n size={16}\n aria-hidden\n className=\"shrink-0 text-secondary-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100\"\n />\n )}\n </button>\n )}\n </div>\n );\n },\n);\nInlineEdit.displayName = 'InlineEdit';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Field, fieldSurfaceClasses, type FieldStatus } from './Field';\n\nexport interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n /** Border/message state. `error` also sets `aria-invalid`. */\n status?: FieldStatus;\n /** Convenience: renders a Field (label + helper/status message) around the input. */\n label?: React.ReactNode;\n description?: React.ReactNode;\n message?: React.ReactNode;\n}\n\n// Figma: Text Input (19) — 40px tall, 12px inline padding, 8px radius, 16px value.\nconst inputClasses = (status: FieldStatus | undefined, className?: string) =>\n cn(\n 'flex h-10 w-full rounded-md px-3 py-2 text-ui-input-value placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n fieldSurfaceClasses(status),\n className,\n );\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, status = 'default', label, description, message, id, ...props }, ref) => {\n if (label == null && description == null && message == null) {\n return (\n <input\n ref={ref}\n id={id}\n aria-invalid={status === 'error' ? true : undefined}\n className={inputClasses(status, className)}\n {...props}\n />\n );\n }\n return (\n <Field label={label} description={description} message={message} status={status} id={id}>\n {(control) => <input ref={ref} className={inputClasses(status, className)} {...control} {...props} />}\n </Field>\n );\n },\n);\nInput.displayName = 'Input';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Field, type FieldStatus } from './Field';\n\nexport interface InputWithActionProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n /** Label of the trailing action button. */\n actionLabel: string;\n onAction?: React.MouseEventHandler<HTMLButtonElement>;\n /** Chips (e.g. `EditableTag`s) shown inside the field before the input. */\n tags?: React.ReactNode;\n status?: Exclude<FieldStatus, 'success'>;\n label?: React.ReactNode;\n /** Support text shown under the field. */\n description?: React.ReactNode;\n /** Error message shown when `status` is `error`. */\n message?: React.ReactNode;\n}\n\n// Figma: Input with Action (19) — field with a trailing subtle small button (e.g. \"Invite\").\nexport const InputWithAction = React.forwardRef<HTMLInputElement, InputWithActionProps>(\n (\n { className, actionLabel, onAction, tags, status = 'default', label, description, message, id, disabled, placeholder, ...props },\n ref,\n ) => (\n <Field label={label} description={description} message={message} status={status} id={id}>\n {(control) => (\n <div\n className={cn(\n 'flex min-h-10 w-full items-center gap-2 rounded-md border bg-surface py-2 pr-1 pl-3 transition-colors',\n 'focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring',\n status === 'error' ? 'border-destructive' : 'border-input hover:border-input-accent focus-within:border-input',\n tags ? 'pl-1' : null,\n disabled && 'opacity-50',\n className,\n )}\n >\n {tags && <div className=\"flex shrink-0 items-center gap-1\">{tags}</div>}\n <input\n ref={ref}\n disabled={disabled}\n placeholder={tags ? undefined : placeholder}\n className=\"min-w-0 flex-1 truncate bg-transparent text-body-small text-surface-foreground outline-none placeholder:text-muted-foreground\"\n {...control}\n {...props}\n />\n <Button type=\"button\" variant=\"subtle\" size=\"sm\" disabled={disabled} onClick={onAction}>\n {actionLabel}\n </Button>\n </div>\n )}\n </Field>\n ),\n);\nInputWithAction.displayName = 'InputWithAction';\n","import * as React from 'react';\nimport { Minus, Plus } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Field, type FieldStatus } from './Field';\n\nexport interface NumberInputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'type' | 'size'> {\n value?: number;\n defaultValue?: number;\n onValueChange?: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n /** Unit shown after the value (e.g. \"minutes\"). */\n unit?: string;\n status?: FieldStatus;\n label?: React.ReactNode;\n description?: React.ReactNode;\n message?: React.ReactNode;\n}\n\n// Figma: Numerical input (23) — 200px stepper: − / value + unit / +, 40px tall, 4px inner padding.\nexport const NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n className,\n value,\n defaultValue = 0,\n onValueChange,\n min = Number.NEGATIVE_INFINITY,\n max = Number.POSITIVE_INFINITY,\n step = 1,\n unit,\n status = 'default',\n label,\n description,\n message,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const [internal, setInternal] = React.useState(defaultValue);\n const current = value ?? internal;\n const clamp = (next: number) => Math.min(max, Math.max(min, next));\n const commit = (next: number) => {\n const clamped = clamp(next);\n setInternal(clamped);\n onValueChange?.(clamped);\n };\n\n return (\n <Field label={label} description={description} message={message} status={status} id={id} className=\"w-50\">\n {(control) => (\n <div\n className={cn(\n 'flex h-10 w-full items-center justify-between rounded-md border bg-surface p-1 transition-colors',\n 'has-[input:focus-visible]:outline-2 has-[input:focus-visible]:outline-offset-2 has-[input:focus-visible]:outline-ring',\n status === 'error' ? 'border-destructive' : status === 'success' ? 'border-success-foreground' : 'border-border',\n disabled && 'opacity-50',\n className,\n )}\n >\n <Button\n type=\"button\"\n variant=\"subtle\"\n size=\"icon-sm\"\n aria-label=\"Decrease\"\n disabled={disabled || current <= min}\n onClick={() => commit(current - step)}\n >\n <Minus size={16} aria-hidden />\n </Button>\n <div className=\"flex items-center justify-center gap-1 text-center\">\n <input\n ref={ref}\n role=\"spinbutton\"\n inputMode=\"numeric\"\n aria-valuenow={current}\n aria-valuemin={Number.isFinite(min) ? min : undefined}\n aria-valuemax={Number.isFinite(max) ? max : undefined}\n disabled={disabled}\n value={String(current)}\n size={Math.max(1, String(current).length)}\n onChange={(event) => {\n const parsed = Number(event.target.value.replace(/[^\\d.-]/g, ''));\n if (!Number.isNaN(parsed)) commit(parsed);\n }}\n onKeyDown={(event) => {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n commit(current + step);\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n commit(current - step);\n }\n }}\n className=\"min-w-0 bg-transparent text-center text-ui-label text-surface-foreground outline-none\"\n {...control}\n {...props}\n />\n {unit && <span className=\"text-body-small text-secondary-muted-foreground\">{unit}</span>}\n </div>\n <Button\n type=\"button\"\n variant=\"subtle\"\n size=\"icon-sm\"\n aria-label=\"Increase\"\n disabled={disabled || current >= max}\n onClick={() => commit(current + step)}\n >\n <Plus size={16} aria-hidden />\n </Button>\n </div>\n )}\n </Field>\n );\n },\n);\nNumberInput.displayName = 'NumberInput';\n","import * as React from 'react';\nimport { MagnifyingGlass, X } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface SearchBarProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /** Called when the clear (×) button is pressed, after the field has been emptied. */\n onClear?: () => void;\n /** Label for the clear button. */\n clearLabel?: string;\n}\n\n// Figma: Search Bar (18) — 40px, 1px muted border; focused/filled gets a 2px accent border.\nexport const SearchBar = React.forwardRef<HTMLInputElement, SearchBarProps>(\n ({ className, value, defaultValue, onChange, onClear, clearLabel = 'Clear search', disabled, ...props }, ref) => {\n const innerRef = React.useRef<HTMLInputElement>(null);\n React.useImperativeHandle(ref, () => innerRef.current as HTMLInputElement);\n const [uncontrolled, setUncontrolled] = React.useState(String(defaultValue ?? ''));\n const current = value !== undefined ? String(value) : uncontrolled;\n\n const clear = () => {\n const input = innerRef.current;\n if (input) {\n // Drive the native setter so React's onChange fires for controlled consumers too.\n const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set;\n setter?.call(input, '');\n input.dispatchEvent(new Event('input', { bubbles: true }));\n input.focus();\n }\n onClear?.();\n };\n\n return (\n <div\n className={cn(\n 'flex h-10 w-full items-center gap-2 rounded-md border bg-surface px-3 py-2 transition-colors',\n 'border-input focus-within:border-input-accent focus-within:ring-1 focus-within:ring-input-accent',\n current !== '' && 'border-input-accent ring-1 ring-input-accent',\n disabled && 'opacity-50',\n className,\n )}\n >\n <MagnifyingGlass size={16} aria-hidden className=\"shrink-0 text-surface-foreground\" />\n <input\n ref={innerRef}\n type=\"text\"\n role=\"searchbox\"\n value={value}\n defaultValue={defaultValue}\n disabled={disabled}\n onChange={(event) => {\n setUncontrolled(event.target.value);\n onChange?.(event);\n }}\n className=\"min-w-0 flex-1 bg-transparent text-ui-input-value text-surface-foreground outline-none placeholder:text-muted-foreground\"\n {...props}\n />\n {current !== '' && !disabled && (\n <button\n type=\"button\"\n aria-label={clearLabel}\n onClick={clear}\n className=\"inline-flex size-4 shrink-0 items-center justify-center rounded-xs text-surface-foreground\"\n >\n <X size={16} aria-hidden />\n </button>\n )}\n </div>\n );\n },\n);\nSearchBar.displayName = 'SearchBar';\n","import * as React from 'react';\nimport { CaretDown } from '@phosphor-icons/react';\nimport { Select as SelectPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport const Select = SelectPrimitive.Root;\nexport const SelectValue = SelectPrimitive.Value;\nexport const SelectGroup = SelectPrimitive.Group;\n\nconst CheckIcon = () => (\n <svg width=\"10\" height=\"8\" viewBox=\"0 0 10 8\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M1 4L3.5 6.5L9 1\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\nexport interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {\n /** Leading icon (Figma: \"With label = No\" shows a gear). */\n icon?: React.ReactNode;\n}\n\n// Figma: Select / Dropdown (22) — 40px, 8px radius; the open (\"select\") state takes the accent border.\nexport const SelectTrigger = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(\n ({ className, children, icon, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex h-10 w-full items-center gap-2 rounded-md border border-input bg-surface px-3 py-2 text-left text-ui-input-value text-surface-foreground transition-colors',\n 'hover:border-input-accent data-[state=open]:border-input-accent',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'data-[placeholder]:text-muted-foreground',\n className,\n )}\n {...props}\n >\n {icon && <span className=\"flex shrink-0 text-surface-foreground\">{icon}</span>}\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <SelectPrimitive.Icon className=\"shrink-0 text-surface-foreground\">\n <CaretDown size={16} aria-hidden />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\nSelectTrigger.displayName = 'SelectTrigger';\n\nexport type SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>;\n\nexport const SelectContent = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Content>, SelectContentProps>(\n ({ className, children, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n // Tailwind has no --z-* theme namespace (it's a fixed static scale,\n // not theme-driven) and Radix's trigger-width variable is layout\n // data, not a design value — both are the rare case DESIGN_TOKENS.md\n // allows raw var() consumption via inline style rather than a\n // Tailwind class, arbitrary-value bracket syntax included.\n style={{\n zIndex: 'var(--sys-z-20)',\n width: position === 'popper' ? 'var(--radix-select-trigger-width)' : undefined,\n }}\n className={cn(\n 'overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md',\n className,\n )}\n {...props}\n >\n <SelectPrimitive.Viewport className=\"p-1\">{children}</SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\nSelectContent.displayName = 'SelectContent';\n\nexport type SelectItemProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>;\n\nexport const SelectItem = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Item>, SelectItemProps>(\n ({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default items-center gap-2 rounded-sm py-2 pr-4 pl-8 text-sm text-popover-foreground select-none',\n 'outline-none data-[highlighted]:bg-accent-soft data-[highlighted]:text-accent-soft-foreground',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-4 w-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n ),\n);\nSelectItem.displayName = 'SelectItem';\n","import * as React from 'react';\nimport { Slider as SliderPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport interface SliderProps extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {\n /** Text shown above the track on the left (e.g. \"Label\"). The max value is shown on the right. */\n label?: React.ReactNode;\n /** Show the min and max values above the track instead of a label. */\n showRange?: boolean;\n /**\n * Show the current value in a bubble above the thumb. `true` shows it while\n * the thumb is hovered, focused or dragged; `'always'` keeps it visible.\n */\n showValue?: boolean | 'always';\n}\n\n// Figma: Slider (26) — 4px `muted` track, `input-accent` fill, 16px accent thumb, `primary` value bubble.\nexport const Slider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.Root>, SliderProps>(\n (\n {\n className,\n value,\n defaultValue,\n onValueChange,\n min = 0,\n max = 100,\n label,\n showRange,\n showValue,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n },\n ref,\n ) => {\n const [internal, setInternal] = React.useState<number[]>(defaultValue ?? [min]);\n const thumbValues = value ?? internal;\n const hasHeader = label != null || showRange;\n\n return (\n <div className={cn('flex w-full flex-col gap-2', className)}>\n {hasHeader && (\n <div className=\"flex items-center justify-between text-secondary-muted-foreground\">\n {label != null ? (\n <span className=\"text-ui-label text-surface-foreground\">{label}</span>\n ) : (\n <span className=\"text-ui-caption\">{min}</span>\n )}\n <span className=\"text-body-small\">{max}</span>\n </div>\n )}\n <SliderPrimitive.Root\n ref={ref}\n value={value}\n defaultValue={defaultValue}\n min={min}\n max={max}\n onValueChange={(next) => {\n setInternal(next);\n onValueChange?.(next);\n }}\n className=\"relative flex h-4 w-full touch-none items-center select-none\"\n {...props}\n >\n <SliderPrimitive.Track className=\"relative h-1 w-full grow overflow-hidden rounded-xxs bg-muted\">\n <SliderPrimitive.Range className=\"absolute h-full bg-input-accent\" />\n </SliderPrimitive.Track>\n {thumbValues.map((thumbValue, index) => (\n // The accessible name belongs on each individual thumb (the actual\n // role=\"slider\" element) — Root is just a group container. With\n // more than one thumb this applies the same label to each; give a\n // range slider distinct per-thumb labels via aria-labelledby instead.\n <SliderPrimitive.Thumb\n key={index}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n className=\"group relative block size-4 rounded-full border-2 border-surface bg-input-accent shadow-sm transition-colors disabled:pointer-events-none disabled:opacity-50\"\n >\n {showValue && (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'pointer-events-none absolute bottom-full left-1/2 mb-2 flex min-w-4 -translate-x-1/2 items-center justify-center rounded-xs bg-primary p-0.5 text-ui-caption text-label',\n showValue !== 'always' && 'invisible group-hover:visible group-focus-visible:visible group-active:visible',\n )}\n >\n {thumbValue}\n </span>\n )}\n </SliderPrimitive.Thumb>\n ))}\n </SliderPrimitive.Root>\n </div>\n );\n },\n);\nSlider.displayName = 'Slider';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Field, fieldSurfaceClasses, type FieldStatus } from './Field';\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n status?: FieldStatus;\n /** Convenience: renders a Field (label + helper/status message) around the textarea. */\n label?: React.ReactNode;\n description?: React.ReactNode;\n message?: React.ReactNode;\n}\n\n// Figma: Textarea (20) — min 100px tall, 12/10px padding, 8px radius, 16/28 value.\nconst textareaClasses = (status: FieldStatus | undefined, className?: string) =>\n cn(\n 'flex field-sizing-content min-h-25 w-full rounded-md px-3 py-2.5 text-body-base placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n fieldSurfaceClasses(status),\n className,\n );\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, status = 'default', label, description, message, id, ...props }, ref) => {\n if (label == null && description == null && message == null) {\n return (\n <textarea\n ref={ref}\n id={id}\n aria-invalid={status === 'error' ? true : undefined}\n className={textareaClasses(status, className)}\n {...props}\n />\n );\n }\n return (\n <Field label={label} description={description} message={message} status={status} id={id}>\n {(control) => <textarea ref={ref} className={textareaClasses(status, className)} {...control} {...props} />}\n </Field>\n );\n },\n);\nTextarea.displayName = 'Textarea';\n","import * as React from 'react';\nimport { X } from '@phosphor-icons/react';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport const Dialog = DialogPrimitive.Root;\nexport const DialogTrigger = DialogPrimitive.Trigger;\nexport const DialogClose = DialogPrimitive.Close;\n\nexport interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {\n /** Label for the corner close button. */\n closeLabel?: string;\n /** Hide the corner close button (e.g. when the footer is the only way out). */\n hideClose?: boolean;\n}\n\n// Figma: Dialog / Modal (48) — 600px card on a 30% `primary` scrim; 12px radius, `shadow-lg`.\nexport const DialogContent = React.forwardRef<React.ElementRef<typeof DialogPrimitive.Content>, DialogContentProps>(\n ({ className, children, closeLabel = 'Close', hideClose, ...props }, ref) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n style={{ zIndex: 'var(--sys-z-30)' }}\n className=\"fixed inset-0 bg-primary/30\"\n />\n <DialogPrimitive.Content\n ref={ref}\n style={{ zIndex: 'var(--sys-z-30)' }}\n className={cn(\n 'fixed top-1/2 left-1/2 flex w-150 max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-lg border border-border bg-surface shadow-lg',\n className,\n )}\n {...props}\n >\n {children}\n {!hideClose && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label={closeLabel} className=\"absolute top-4 right-6\">\n <X size={16} aria-hidden />\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n ),\n);\nDialogContent.displayName = 'DialogContent';\n\nexport const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-1.5 border-b border-border px-6 py-4 pr-16', className)} {...props} />\n);\n\nexport const DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg leading-6 font-semibold text-surface-foreground', className)}\n {...props}\n />\n));\nDialogTitle.displayName = 'DialogTitle';\n\nexport const DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-body-small text-secondary-muted-foreground', className)}\n {...props}\n />\n));\nDialogDescription.displayName = 'DialogDescription';\n\nexport const DialogBody = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-4 p-6', className)} {...props} />\n);\n\nexport const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex items-center justify-end gap-3 border-t border-border px-6 py-4', className)} {...props} />\n);\n","import * as React from 'react';\nimport { CheckCircle, Info, Warning, WarningCircle, X } from '@phosphor-icons/react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Toast as ToastPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport type ToastVariant = 'info' | 'success' | 'warning' | 'destructive';\n\nconst toastVariants = cva('border', {\n variants: {\n variant: {\n info: 'border-info-border bg-surface',\n success: 'border-success-soft-border bg-success-soft',\n warning: 'border-warning-soft-border bg-warning-soft',\n destructive: 'border-destructive-soft-border bg-destructive-soft',\n },\n },\n defaultVariants: { variant: 'info' },\n});\n\nconst iconColour: Record<ToastVariant, string> = {\n info: 'text-surface-foreground',\n success: 'text-success-soft-foreground',\n warning: 'text-warning-soft-foreground',\n destructive: 'text-destructive-soft-foreground',\n};\n\nconst titleColour: Record<ToastVariant, string> = {\n info: 'text-surface-foreground',\n success: 'text-success-soft-foreground',\n warning: 'text-warning-soft-foreground',\n destructive: 'text-destructive-soft-foreground',\n};\n\nfunction VariantIcon({ variant, size }: { variant: ToastVariant; size: number }) {\n const props = { size, 'aria-hidden': true, className: cn('shrink-0', iconColour[variant]) } as const;\n if (variant === 'success') return <CheckCircle {...props} />;\n if (variant === 'warning') return <Warning {...props} />;\n if (variant === 'destructive') return <WarningCircle {...props} />;\n return <Info {...props} />;\n}\n\nexport const ToastProvider = ToastPrimitive.Provider;\n\nexport const ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitive.Viewport\n ref={ref}\n style={{ zIndex: 'var(--sys-z-50)' }}\n className={cn('fixed right-4 bottom-4 flex w-89 max-w-full flex-col gap-3 outline-none', className)}\n {...props}\n />\n));\nToastViewport.displayName = 'ToastViewport';\n\nexport interface ToastProps\n extends Omit<React.ComponentPropsWithoutRef<typeof ToastPrimitive.Root>, 'title'>,\n VariantProps<typeof toastVariants> {\n /** Bold first line. */\n title?: React.ReactNode;\n description?: React.ReactNode;\n /** Optional action button (e.g. Undo). Wrap it in `ToastAction`. */\n action?: React.ReactNode;\n closeLabel?: string;\n}\n\n// Figma: Toast / Sonner (52) › Toast — 356px card with a 20px status icon, title, description and close.\nexport const Toast = React.forwardRef<React.ElementRef<typeof ToastPrimitive.Root>, ToastProps>(\n ({ className, variant = 'info', title, description, action, closeLabel = 'Close', children, ...props }, ref) => {\n const v = variant ?? 'info';\n return (\n <ToastPrimitive.Root\n ref={ref}\n // Errors interrupt; everything else is polite.\n type={v === 'destructive' ? 'foreground' : 'background'}\n className={cn('flex items-start gap-3 rounded-lg p-4 shadow-lg', toastVariants({ variant: v }), className)}\n {...props}\n >\n <VariantIcon variant={v} size={20} />\n <div className=\"flex min-w-0 flex-1 flex-col gap-1 text-body-small\">\n {title != null && (\n <ToastPrimitive.Title className={cn('font-semibold', titleColour[v])}>{title}</ToastPrimitive.Title>\n )}\n {description != null && (\n <ToastPrimitive.Description className=\"text-secondary-muted-foreground\">{description}</ToastPrimitive.Description>\n )}\n {children}\n {action}\n </div>\n <ToastPrimitive.Close\n aria-label={closeLabel}\n className=\"inline-flex size-4 shrink-0 items-center justify-center rounded-xs text-surface-foreground\"\n >\n <X size={16} aria-hidden />\n </ToastPrimitive.Close>\n </ToastPrimitive.Root>\n );\n },\n);\nToast.displayName = 'Toast';\n\nexport const ToastAction = ToastPrimitive.Action;\n\nexport interface ToastInlineProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof toastVariants> {\n /** Show a close button and call this when it is pressed. */\n onClose?: () => void;\n closeLabel?: string;\n}\n\n// Figma: Toast Inline — a single-line banner (46px) for in-page messages.\nexport const ToastInline = React.forwardRef<HTMLDivElement, ToastInlineProps>(\n ({ className, variant = 'info', onClose, closeLabel = 'Close', children, ...props }, ref) => {\n const v = variant ?? 'info';\n return (\n <div\n ref={ref}\n role={v === 'destructive' ? 'alert' : 'status'}\n className={cn('flex items-center gap-2 rounded-sm px-2 py-1.5', toastVariants({ variant: v }), className)}\n {...props}\n >\n <VariantIcon variant={v} size={16} />\n <p className=\"min-w-0 flex-1 text-body-small text-secondary-muted-foreground\">{children}</p>\n {onClose && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" aria-label={closeLabel} onClick={onClose}>\n <X size={16} aria-hidden />\n </Button>\n )}\n </div>\n );\n },\n);\nToastInline.displayName = 'ToastInline';\n","import * as React from 'react';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\nexport const Tooltip = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\nexport interface TooltipContentProps extends Omit<React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, 'title'> {\n /** Bold first line. With `description` this is the Descriptive tooltip. */\n title?: React.ReactNode;\n description?: React.ReactNode;\n /** Underlined action line under the description — the Rich tooltip. Usually a link or button. */\n action?: React.ReactNode;\n /** Show the pointer arrow toward the trigger. */\n arrow?: boolean;\n}\n\n// Figma: Tooltip (51) — `primary-soft-foreground` plum card, 6px radius. Simple = one line of label text;\n// Descriptive = title + description; Rich = adds an action link.\nexport const TooltipContent = React.forwardRef<React.ElementRef<typeof TooltipPrimitive.Content>, TooltipContentProps>(\n ({ className, sideOffset = 4, title, description, action, arrow = true, children, ...props }, ref) => {\n const detailed = title != null || description != null;\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n style={{ zIndex: 'var(--sys-z-40)' }}\n className={cn(\n 'rounded-sm bg-primary-soft-foreground text-label shadow-md',\n detailed ? 'flex max-w-60 min-w-50 flex-col gap-1 px-3 py-2.5' : 'px-2.5 py-1.5 text-ui-caption',\n action != null && 'max-w-65 min-w-55',\n className,\n )}\n {...props}\n >\n {detailed ? (\n <>\n {title != null && <p className=\"text-xs leading-4 font-semibold text-label\">{title}</p>}\n {description != null && <p className=\"text-xs leading-4.5 text-plum-200\">{description}</p>}\n {action != null && (\n <div className=\"mt-1 text-ui-caption text-plum-300 underline *:underline\">{action}</div>\n )}\n </>\n ) : (\n children\n )}\n {arrow && <TooltipPrimitive.Arrow width={12} height={8} className=\"fill-primary-soft-foreground\" />}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n },\n);\nTooltipContent.displayName = 'TooltipContent';\n","import * as React from 'react';\nimport { FileText, X } from '@phosphor-icons/react';\nimport { Progress as ProgressPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Tag } from '../Tags & Badges/Tag';\n\nexport interface FileUploadZoneProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'title' | 'type'> {\n title?: React.ReactNode;\n /** Supported formats line. */\n hint?: React.ReactNode;\n icon?: React.ReactNode;\n /** Called with the chosen or dropped files. */\n onFiles?: (files: File[]) => void;\n}\n\n// Figma: Question types › PDF, PPTX, or DOCX › Upload_Zone (568:6389) — a 143px dashed drop target with an icon, title and hint; hover fills with the page background.\nexport const FileUploadZone = React.forwardRef<HTMLInputElement, FileUploadZoneProps>(\n ({ className, title = 'Upload document', hint, icon, onFiles, ...props }, ref) => {\n const [over, setOver] = React.useState(false);\n return (\n <label\n className={cn(\n 'flex min-h-35.75 w-full cursor-pointer flex-col items-center justify-center gap-2 rounded-md border-2 border-dashed border-border px-4 text-center transition-colors',\n 'hover:bg-background has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-ring',\n over && 'border-input-accent bg-accent-soft',\n className,\n )}\n onDragOver={(event) => {\n event.preventDefault();\n setOver(true);\n }}\n onDragLeave={() => setOver(false)}\n onDrop={(event) => {\n event.preventDefault();\n setOver(false);\n onFiles?.(Array.from(event.dataTransfer.files));\n }}\n >\n <span className=\"flex size-10 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground\">\n {icon ?? <FileText size={24} aria-hidden />}\n </span>\n <span className=\"flex flex-col gap-1\">\n <span className=\"text-body-small text-surface-foreground\">{title}</span>\n {hint && <span className=\"text-ui-caption text-secondary-muted-foreground\">{hint}</span>}\n </span>\n <input\n ref={ref}\n type=\"file\"\n className=\"sr-only\"\n onChange={(event) => onFiles?.(Array.from(event.target.files ?? []))}\n {...props}\n />\n </label>\n );\n },\n);\nFileUploadZone.displayName = 'FileUploadZone';\n\nexport interface FileUploadItemProps extends React.HTMLAttributes<HTMLDivElement> {\n name: string;\n /** File size text, e.g. \"443KB\". */\n size?: string;\n status?: 'uploading' | 'complete' | 'error';\n /** 0–100, shown while uploading. */\n progress?: number;\n /** Remaining time text while uploading, e.g. \"2 seconds left\". */\n timeLeft?: string;\n icon?: React.ReactNode;\n onRemove?: () => void;\n removeLabel?: string;\n}\n\n// Figma: File upload (339:2168) — a row with the file, its status and, while uploading, a thin progress bar.\nexport const FileUploadItem = React.forwardRef<HTMLDivElement, FileUploadItemProps>(\n ({ className, name, size, status = 'uploading', progress = 0, timeLeft, icon, onRemove, removeLabel, ...props }, ref) => {\n const uploading = status === 'uploading';\n return (\n <div\n ref={ref}\n className={cn('flex w-full flex-col justify-center gap-2 overflow-hidden rounded-sm border border-border p-2', className)}\n {...props}\n >\n <div className=\"flex items-center gap-2\">\n <span className=\"flex size-10 shrink-0 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground\">\n {icon ?? <FileText size={24} aria-hidden />}\n </span>\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <div className=\"flex items-center justify-between gap-2\">\n <p className=\"min-w-0 truncate text-ui-label text-surface-foreground\">{name}</p>\n {onRemove && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" aria-label={removeLabel ?? `Remove ${name}`} onClick={onRemove}>\n <X size={16} aria-hidden />\n </Button>\n )}\n </div>\n <div className=\"flex items-center justify-between text-ui-caption text-secondary-muted-foreground\">\n <span className=\"flex items-center gap-2\">\n {size}\n {status === 'complete' && <Tag variant=\"success\">Complete</Tag>}\n {status === 'error' && <Tag variant=\"destructive\">Error</Tag>}\n {uploading && timeLeft && (\n <>\n <span aria-hidden=\"true\" className=\"size-0.5 rounded-full bg-secondary-muted-foreground\" />\n {timeLeft}\n </>\n )}\n </span>\n {uploading && <span className=\"text-body-xxs font-normal\">{Math.round(progress)}%</span>}\n </div>\n </div>\n </div>\n {uploading && (\n <ProgressPrimitive.Root\n value={progress}\n aria-label={`Uploading ${name}`}\n className=\"h-0.75 w-full overflow-hidden rounded-sm bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5\"\n >\n <ProgressPrimitive.Indicator className=\"h-full bg-accent transition-[width]\" style={{ width: `${progress}%` }} />\n </ProgressPrimitive.Root>\n )}\n </div>\n );\n },\n);\nFileUploadItem.displayName = 'FileUploadItem';\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\n// Figma: System Tag + Status Tag (41). Border + 6px radius, 12px/16px medium label.\nconst tagVariants = cva(\n 'inline-flex items-center gap-1.5 whitespace-nowrap rounded-sm border px-2.5 py-1 text-ui-caption',\n {\n variants: {\n variant: {\n neutral: 'border-accent-soft-border bg-accent-soft text-accent-soft-foreground',\n default: 'border-border bg-surface text-surface-foreground',\n success: 'border-success-soft-border bg-success-soft text-success-soft-foreground',\n warning: 'border-warning-soft-border bg-warning-soft text-warning-soft-foreground',\n destructive: 'border-destructive-soft-border bg-destructive-soft text-destructive-soft-foreground',\n },\n },\n defaultVariants: { variant: 'neutral' },\n },\n);\n\nexport interface TagProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof tagVariants> {}\n\n/** Read-only label for system states (Live Interview, Self-paced, AI Interview). */\nexport const Tag = React.forwardRef<HTMLSpanElement, TagProps>(({ className, variant, ...props }, ref) => (\n <span ref={ref} className={cn(tagVariants({ variant }), className)} {...props} />\n));\nTag.displayName = 'Tag';\n\nconst statusDotVariants = cva('size-1.5 shrink-0 rounded-full', {\n variants: {\n status: {\n active: 'bg-success-800',\n inactive: 'bg-accent',\n pending: 'bg-warning',\n error: 'bg-destructive',\n },\n },\n defaultVariants: { status: 'active' },\n});\n\nexport interface StatusTagProps\n extends React.HTMLAttributes<HTMLSpanElement>,\n Required<Pick<VariantProps<typeof statusDotVariants>, 'status'>> {}\n\n/** White tag with a coloured status dot (Active / Inactive / Pending / Error). */\nexport const StatusTag = React.forwardRef<HTMLSpanElement, StatusTagProps>(\n ({ className, status, children, ...props }, ref) => (\n <span ref={ref} className={cn(tagVariants({ variant: 'default' }), className)} {...props}>\n <span className={statusDotVariants({ status })} aria-hidden=\"true\" />\n {children}\n </span>\n ),\n);\nStatusTag.displayName = 'StatusTag';\n","import * as React from 'react';\nimport { CornersOut, DotsThree, Image as ImageIcon, Pause, Play, SpeakerSimpleHigh, SpeakerSimpleX, Trash } from '@phosphor-icons/react';\nimport { Slider as SliderPrimitive, ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport interface MediaInfoProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n name: string;\n /** Secondary line parts, e.g. [\"443KB\", \"1/5\"], joined with a dot. */\n details?: string[];\n onRemove?: () => void;\n removeLabel?: string;\n /** Larger name / details (the image preview uses these). */\n large?: boolean;\n}\n\n// Figma: File upload › video-info-section / image preview — file name + details with a trash button.\nexport function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...props }: MediaInfoProps) {\n return (\n <div className={cn('flex items-center justify-between border-t border-border bg-surface px-6 py-4', className)} {...props}>\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n <p className={cn('truncate text-surface-foreground', large ? 'text-body-section' : 'text-ui-label')}>{name}</p>\n {details && (\n <p className={cn('flex items-center gap-2 text-secondary-muted-foreground', large ? 'text-body-small' : 'text-ui-caption')}>\n {details.map((part, index) => (\n <React.Fragment key={part}>\n {index > 0 && <span aria-hidden=\"true\" className=\"size-0.5 rounded-full bg-secondary-muted-foreground\" />}\n {part}\n </React.Fragment>\n ))}\n </p>\n )}\n </div>\n {onRemove && (\n <Button type=\"button\" variant=\"destructive\" size=\"icon\" aria-label={removeLabel ?? `Remove ${name}`} onClick={onRemove}>\n <Trash size={16} aria-hidden />\n </Button>\n )}\n </div>\n );\n}\n\nexport interface ImagePreviewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The image (an `<img>` filling the area). Leave empty for the placeholder fill. */\n children?: React.ReactNode;\n name: string;\n details?: string[];\n onRemove?: () => void;\n}\n\n// Figma: File upload › Image preview — a 12px-radius card: preview area over a name / size / count bar.\nexport const ImagePreview = React.forwardRef<HTMLDivElement, ImagePreviewProps>(\n ({ className, children, name, details, onRemove, ...props }, ref) => (\n <div ref={ref} className={cn('flex w-full flex-col overflow-hidden rounded-lg border border-border', className)} {...props}>\n <div className=\"flex h-84 w-full items-center justify-center bg-accent-soft [&>img]:size-full [&>img]:object-contain\">{children}</div>\n <MediaInfo name={name} details={details} onRemove={onRemove} large />\n </div>\n ),\n);\nImagePreview.displayName = 'ImagePreview';\n\nexport interface ImageThumbnailsProps\n extends Omit<React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>, 'type' | 'value' | 'defaultValue' | 'onValueChange'> {\n /** Slots shown, e.g. 5. Slots past `images.length` render as empty dashed placeholders. */\n max: number;\n images: { id: string; src?: string; alt: string }[];\n value?: string;\n onValueChange?: (id: string) => void;\n}\n\n// Figma: File upload › Image thumbnail — selected (accent-soft + accent border), default, and dashed empty slots.\nexport const ImageThumbnails = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Root>, ImageThumbnailsProps>(\n ({ className, max, images, value, onValueChange, ...props }, ref) => (\n <ToggleGroupPrimitive.Root\n ref={ref}\n type=\"single\"\n value={value ?? ''}\n onValueChange={(next) => next && onValueChange?.(next)}\n className={cn('flex w-full gap-2', className)}\n {...props}\n >\n {Array.from({ length: max }, (_, index) => {\n const image = images[index];\n if (!image) {\n return (\n <span\n key={`empty-${index}`}\n aria-hidden=\"true\"\n className=\"flex h-20 min-w-0 flex-1 items-center justify-center rounded-sm border border-dashed border-border text-accent-foreground\"\n >\n <ImageIcon size={24} />\n </span>\n );\n }\n return (\n <ToggleGroupPrimitive.Item\n key={image.id}\n value={image.id}\n aria-label={image.alt}\n className={cn(\n 'flex h-20 min-w-0 flex-1 items-center justify-center overflow-hidden rounded-sm border border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 p-2 text-surface-foreground transition-colors',\n 'hover:bg-accent-soft hover:bg-none',\n 'data-[state=on]:border-accent-foreground data-[state=on]:bg-accent-soft data-[state=on]:bg-none data-[state=on]:text-accent-foreground',\n )}\n >\n {image.src ? <img src={image.src} alt=\"\" className=\"size-full object-cover\" /> : <ImageIcon size={24} aria-hidden />}\n </ToggleGroupPrimitive.Item>\n );\n })}\n </ToggleGroupPrimitive.Root>\n ),\n);\nImageThumbnails.displayName = 'ImageThumbnails';\n\nconst formatTime = (seconds: number) => {\n const total = Math.max(0, Math.floor(Number.isFinite(seconds) ? seconds : 0));\n return `${Math.floor(total / 60)}:${String(total % 60).padStart(2, '0')}`;\n};\n\nexport interface VideoPlayerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Video source. Without one, the area shows the placeholder fill. */\n src?: string;\n name?: string;\n details?: string[];\n onRemove?: () => void;\n /** Called by the \"more\" (…) button. */\n onMore?: () => void;\n /** Initial time values for static previews (seconds). */\n initialTime?: number;\n initialDuration?: number;\n}\n\n// Figma: File upload › Video player — preview area with a dark control bar (play, seek, time, volume, full screen), then file info.\nexport const VideoPlayer = React.forwardRef<HTMLDivElement, VideoPlayerProps>(\n ({ className, src, name, details, onRemove, onMore, initialTime = 0, initialDuration = 0, ...props }, ref) => {\n const video = React.useRef<HTMLVideoElement>(null);\n const [playing, setPlaying] = React.useState(false);\n const [time, setTime] = React.useState(initialTime);\n const [duration, setDuration] = React.useState(initialDuration);\n const [volume, setVolume] = React.useState(1);\n const muted = volume === 0;\n\n const toggle = () => {\n const el = video.current;\n if (!el) return setPlaying((p) => !p);\n if (el.paused) void el.play();\n else el.pause();\n };\n\n return (\n <div ref={ref} className={cn('flex w-full flex-col overflow-hidden rounded-lg border border-border bg-surface', className)} {...props}>\n <div className=\"relative flex h-60.5 w-full items-end bg-accent-soft\">\n {src && (\n <video\n ref={video}\n src={src}\n className=\"absolute inset-0 size-full object-contain\"\n onPlay={() => setPlaying(true)}\n onPause={() => setPlaying(false)}\n onTimeUpdate={(event) => setTime(event.currentTarget.currentTime)}\n onLoadedMetadata={(event) => setDuration(event.currentTarget.duration)}\n onVolumeChange={(event) => setVolume(event.currentTarget.muted ? 0 : event.currentTarget.volume)}\n />\n )}\n <div className=\"relative flex w-full flex-col gap-2 bg-surface-foreground bg-linear-to-r from-primary/30 to-primary/30 px-4 pt-3 pb-4 text-surface\">\n <SliderPrimitive.Root\n min={0}\n max={duration || 1}\n step={0.1}\n value={[Math.min(time, duration || 1)]}\n onValueChange={([next]) => {\n if (next === undefined) return;\n setTime(next);\n if (video.current) video.current.currentTime = next;\n }}\n className=\"relative flex h-4 w-full touch-none items-center select-none\"\n >\n <SliderPrimitive.Track className=\"relative h-1 w-full grow overflow-hidden rounded-xxs bg-surface/20\">\n <SliderPrimitive.Range className=\"absolute h-full bg-accent-foreground\" />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb aria-label=\"Seek\" className=\"block size-3 rounded-full border-2 border-surface bg-surface shadow-sm\" />\n </SliderPrimitive.Root>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <button\n type=\"button\"\n aria-label={playing ? 'Pause' : 'Play'}\n onClick={toggle}\n className=\"inline-flex size-10 items-center justify-center rounded-full bg-surface/12 text-surface transition-colors hover:bg-surface/20\"\n >\n {playing ? <Pause size={16} weight=\"fill\" aria-hidden /> : <Play size={16} weight=\"fill\" aria-hidden />}\n </button>\n <span className=\"text-ui-label whitespace-nowrap text-surface/80\">\n {formatTime(time)} / {formatTime(duration)}\n </span>\n </div>\n <div className=\"flex items-center gap-2\">\n <VolumeControl\n volume={volume}\n onVolumeChange={(next) => {\n setVolume(next);\n if (video.current) {\n video.current.volume = next;\n video.current.muted = next === 0;\n }\n }}\n />\n <button\n type=\"button\"\n aria-label=\"Full screen\"\n onClick={() => void video.current?.requestFullscreen?.()}\n className=\"inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12\"\n >\n <CornersOut size={16} aria-hidden />\n </button>\n <button\n type=\"button\"\n aria-label=\"More\"\n onClick={onMore}\n className=\"inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12\"\n >\n <DotsThree size={16} aria-hidden />\n </button>\n </div>\n </div>\n </div>\n </div>\n {name && <MediaInfo name={name} details={details} onRemove={onRemove} />}\n <span className=\"sr-only\" aria-live=\"polite\">\n {muted ? 'Muted' : ''}\n </span>\n </div>\n );\n },\n);\nVideoPlayer.displayName = 'VideoPlayer';\n\nexport interface VolumeControlProps {\n /** 0–1. */\n volume: number;\n onVolumeChange: (volume: number) => void;\n className?: string;\n}\n\n// Figma: Volume control — a speaker button that reveals a slider on hover or focus.\nexport function VolumeControl({ volume, onVolumeChange, className }: VolumeControlProps) {\n const last = React.useRef(volume || 1);\n if (volume > 0) last.current = volume;\n return (\n <div className={cn('group/volume flex items-center', className)}>\n <div className=\"w-0 overflow-hidden opacity-0 transition-all group-focus-within/volume:w-16 group-focus-within/volume:opacity-100 group-hover/volume:w-16 group-hover/volume:opacity-100\">\n <SliderPrimitive.Root\n min={0}\n max={1}\n step={0.05}\n value={[volume]}\n onValueChange={([next]) => next !== undefined && onVolumeChange(next)}\n className=\"relative flex h-4 w-14 touch-none items-center select-none\"\n >\n <SliderPrimitive.Track className=\"relative h-1 w-full grow overflow-hidden rounded-xxs bg-surface/20\">\n <SliderPrimitive.Range className=\"absolute h-full bg-surface\" />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb aria-label=\"Volume\" className=\"block size-3 rounded-full bg-surface shadow-sm\" />\n </SliderPrimitive.Root>\n </div>\n <button\n type=\"button\"\n aria-label={volume === 0 ? 'Unmute' : 'Mute'}\n onClick={() => onVolumeChange(volume === 0 ? last.current : 0)}\n className=\"inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12\"\n >\n {volume === 0 ? <SpeakerSimpleX size={16} aria-hidden /> : <SpeakerSimpleHigh size={16} aria-hidden />}\n </button>\n </div>\n );\n}\n","import * as React from 'react';\n\nimport { Textarea, type TextareaProps } from '../Forms & Data Entry/Textarea';\n\nexport interface OpenEndAnswerProps extends Omit<TextareaProps, 'label' | 'description' | 'message' | 'maxLength'> {\n /** Character limit shown in the counter. */\n maxLength?: number;\n}\n\n// Figma: Question input › Open end — a multi-line field with a live \"0/1000 characters\" counter.\nexport const OpenEndAnswer = React.forwardRef<HTMLTextAreaElement, OpenEndAnswerProps>(\n ({ value, defaultValue, onChange, maxLength = 1000, placeholder = 'Write your answer', ...props }, ref) => {\n const [internal, setInternal] = React.useState(String(defaultValue ?? ''));\n const text = value !== undefined ? String(value) : internal;\n return (\n <Textarea\n ref={ref}\n value={text}\n maxLength={maxLength}\n placeholder={placeholder}\n description={`${text.length}/${maxLength} characters`}\n onChange={(event) => {\n setInternal(event.target.value);\n onChange?.(event);\n }}\n {...props}\n />\n );\n },\n);\nOpenEndAnswer.displayName = 'OpenEndAnswer';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\n\n// Figma: Question types (282:1491) — every question type sits on a 480px white card, 24px padding, 16px gap.\nexport const QuestionCard = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex w-120 max-w-200 flex-col gap-4 rounded-lg bg-surface p-6', className)}\n {...props}\n />\n ),\n);\nQuestionCard.displayName = 'QuestionCard';\n","import * as React from \"react\";\nimport {\n Clipboard,\n Copy,\n Eye,\n Plus,\n Sparkle,\n Trash,\n} from \"@phosphor-icons/react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../Buttons & Actions/Button\";\nimport { QuestionHeader } from \"./QuestionHeader\";\n\nexport interface QuestionEditorCardProps extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"title\" | \"onChange\"\n> {\n /** Question number shown in the drag-handle tag. */\n number: number;\n title: string;\n onTitleChange?: (title: string) => void;\n /** The question is being edited: accent border, counter and footer are shown. */\n active?: boolean;\n maxLength?: number;\n /** Footer label, e.g. \"4/20 choices\". Shown while `active`. */\n countLabel?: React.ReactNode;\n /** Header actions. Defaults to copy, delete and preview buttons wired to the `on*` callbacks. */\n actions?: React.ReactNode;\n onDuplicate?: () => void;\n onDelete?: () => void;\n onPreview?: () => void;\n /** Sparkle button beside the card, revealed on hover, focus or while `active`. Omit to hide it. */\n onAskAi?: () => void;\n /** Footer: adds an answer choice. Omit (with `onPaste`) to hide the footer buttons. */\n onAdd?: () => void;\n /** Footer: opens paste-many-choices. */\n onPaste?: () => void;\n /** Optional strip under the card body, e.g. an \"Inferred\" assumption note. */\n note?: React.ReactNode;\n /** Makes the \"Question N\" tag a drag handle for reordering. See `QuestionHeader`'s `dragHandleProps`. */\n dragHandleProps?: React.ComponentPropsWithRef<'span'>;\n}\n\n// Figma: Question editor (351:5944) — the authoring card for every question type. Idle is a flat bordered card, hover\n// lifts it and reveals the header actions, active takes the accent border and adds the counter and footer.\nexport const QuestionEditorCard = React.forwardRef<\n HTMLDivElement,\n QuestionEditorCardProps\n>(\n (\n {\n className,\n number,\n title,\n onTitleChange,\n active,\n maxLength,\n countLabel,\n actions,\n onDuplicate,\n onDelete,\n onPreview,\n onAskAi,\n onAdd,\n onPaste,\n note,\n dragHandleProps,\n children,\n ...props\n },\n ref,\n ) => {\n const footer = active && (countLabel != null || onAdd || onPaste);\n return (\n <div\n ref={ref}\n className={cn(\"group/editor flex w-full items-start gap-2\", className)}\n {...props}\n >\n <div\n className={cn(\n \"flex w-full max-w-200 flex-col overflow-hidden rounded-xl border bg-surface transition-shadow group-hover/editor:shadow-lg group-focus-within/editor:shadow-lg\",\n active ? \"border-accent\" : \"border-border\",\n )}\n >\n <div className={cn(\"flex flex-col p-6\", footer ? \"gap-5\" : \"gap-4\")}>\n <div className=\"flex flex-col gap-4\">\n <QuestionHeader\n editor\n number={number}\n title={title}\n onTitleChange={onTitleChange}\n active={active}\n showCounter={!!active}\n dragHandleProps={dragHandleProps}\n maxLength={maxLength}\n actions={\n actions ?? (\n <>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Duplicate question\"\n onClick={onDuplicate}\n >\n <Copy size={16} aria-hidden />\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n size=\"icon-sm\"\n aria-label=\"Delete question\"\n onClick={onDelete}\n >\n <Trash size={16} aria-hidden />\n </Button>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Preview question\"\n onClick={onPreview}\n >\n <Eye size={16} aria-hidden />\n </Button>\n </>\n )\n }\n />\n {children}\n </div>\n {footer && (\n <div className=\"flex items-center justify-between\">\n <p className=\"text-ui-caption text-secondary-muted-foreground\">\n {countLabel}\n </p>\n <div className=\"flex items-center gap-2\">\n {onAdd && (\n <Button type=\"button\" variant=\"outline\" onClick={onAdd}>\n <Plus size={16} aria-hidden />\n Add choice\n </Button>\n )}\n {onPaste && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Paste choices\"\n onClick={onPaste}\n >\n <Clipboard size={16} aria-hidden />\n </Button>\n )}\n </div>\n </div>\n )}\n </div>\n {note && (\n <div className=\"border-t border-border px-2 py-2 text-body-small text-surface-foreground\">\n {note}\n </div>\n )}\n </div>\n {onAskAi && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Ask AI\"\n onClick={onAskAi}\n className=\"shrink-0 opacity-0 transition-opacity group-hover/editor:opacity-100 group-focus-within/editor:opacity-100 focus-visible:opacity-100\"\n >\n <Sparkle size={16} aria-hidden />\n </Button>\n )}\n </div>\n );\n },\n);\nQuestionEditorCard.displayName = \"QuestionEditorCard\";\n","import * as React from 'react';\nimport { DotsSixVertical } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { InlineEdit } from '../Forms & Data Entry/InlineEdit';\nimport { ToastInline } from '../Overlays & Feedback/Toast';\n\nexport interface QuestionHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {\n /** Question number, shown as \"QUESTION 01\". */\n number: number;\n title: React.ReactNode;\n /** Adds the red asterisk after the title. */\n required?: boolean;\n /** Shows an error banner above the header. `true` shows \"This question is mandatory.\"; pass a node for a custom message. */\n error?: boolean | React.ReactNode;\n onDismissError?: () => void;\n /** Editor mode: an editable title with a character counter and hover actions. */\n editor?: boolean;\n /** Editor mode: called as the title is typed. `title` must then be a string. */\n onTitleChange?: (title: string) => void;\n /** Editor mode: action buttons (copy, delete, preview, AI) revealed on hover or focus. */\n actions?: React.ReactNode;\n /** Editor mode: title length limit. */\n maxLength?: number;\n /** Editor mode: the question is being edited — the number tag turns accent. */\n active?: boolean;\n /** Editor mode: show the \"n/2000 characters\" counter. Defaults to `true`. */\n showCounter?: boolean;\n /**\n * Editor mode: turns the \"Question N\" tag into a drag handle. Spread onto the tag, so it takes anything a drag-and-drop\n * library hands out (`ref`, `role`, `tabIndex`, pointer and keyboard listeners, aria attributes). The tag then shows a\n * grab cursor, is focusable and reveals the grip icon on keyboard focus; it is labelled \"Reorder question N\" unless you\n * pass your own `aria-label`. Omit it for the plain tag.\n */\n dragHandleProps?: React.ComponentPropsWithRef<'span'>;\n}\n\nconst eyebrow = 'text-ui-caption uppercase text-secondary-muted-foreground';\n\n// Figma: Question card components (357:4761) › Question_Header — eyebrow + display title; error and editor variants.\nexport const QuestionHeader = React.forwardRef<HTMLDivElement, QuestionHeaderProps>(\n (\n { className, number, title, required, error, onDismissError, editor, onTitleChange, actions, maxLength = 2000, active, showCounter = true, dragHandleProps, ...props },\n ref,\n ) => {\n // Editor mode: live title length while typing; null once editing ends so the saved title is the source of truth.\n const [draft, setDraft] = React.useState<string | null>(null);\n const label = String(number).padStart(2, '0');\n const showError = error !== undefined && error !== false;\n\n if (editor) {\n const text = typeof title === 'string' ? title : '';\n const count = (draft ?? text).length;\n return (\n <div ref={ref} className={cn('group/header flex w-full flex-col gap-2', className)} {...props}>\n <div className=\"flex items-center justify-between\">\n <span\n aria-label={dragHandleProps ? `Reorder question ${number}` : undefined}\n {...dragHandleProps}\n className={cn(\n 'group/handle inline-flex h-6 items-center gap-1 rounded-sm px-2.5 text-ui-caption hover:pl-1',\n // Inside a QuestionEditorCard the tag takes its hover look whenever the card is hovered.\n 'group-hover/editor:pl-1',\n active\n ? 'bg-accent-soft text-accent-soft-foreground'\n : 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground',\n dragHandleProps && 'cursor-grab touch-none select-none focus-visible:pl-1',\n dragHandleProps?.className,\n )}\n >\n <DotsSixVertical\n size={16}\n aria-hidden\n className=\"hidden shrink-0 group-hover/editor:block group-hover/handle:block group-focus-visible/handle:block\"\n />\n Question {number}\n </span>\n {actions && (\n <div className={cn(\n 'flex items-center gap-2 opacity-0 transition-opacity group-focus-within/header:opacity-100 group-hover/header:opacity-100',\n // Inside a QuestionEditorCard, hovering or focusing anywhere on the card reveals them too.\n 'group-focus-within/editor:opacity-100 group-hover/editor:opacity-100',\n )}>\n {actions}\n </div>\n )}\n </div>\n {/* The negative margin cancels InlineEdit's own padding so the text stays flush with the tag above. */}\n <InlineEdit\n variant=\"question\"\n multiline\n selected={active}\n className=\"-mx-3 w-auto\"\n aria-label=\"Question title\"\n placeholder=\"Click to write the question text\"\n value={text}\n maxLength={maxLength}\n onValueChange={onTitleChange}\n onDraftChange={setDraft}\n onEditingChange={(editing) => {\n if (!editing) setDraft(null);\n }}\n textClassName=\"text-heading-h4\"\n />\n {showCounter && (\n <p className=\"text-ui-caption text-secondary-muted-foreground\">\n {count}/{maxLength} characters\n </p>\n )}\n </div>\n );\n }\n\n return (\n <div ref={ref} className={cn('flex w-full flex-col gap-2', className)} {...props}>\n {showError && (\n <ToastInline variant=\"destructive\" onClose={onDismissError} className=\"min-h-10\">\n <span className=\"text-ui-label text-destructive\">{error === true ? 'This question is mandatory.' : error}</span>\n </ToastInline>\n )}\n <p className={eyebrow}>Question {label}</p>\n <h3 className=\"text-heading-h4 text-surface-foreground\">\n {title}\n {required && (\n <span aria-hidden=\"true\" className=\"text-destructive\">\n *\n </span>\n )}\n {required && <span className=\"sr-only\"> (required)</span>}\n </h3>\n </div>\n );\n },\n);\nQuestionHeader.displayName = 'QuestionHeader';\n","import * as React from 'react';\nimport { DotsSixVertical, Warning } from '@phosphor-icons/react';\nimport { Slot } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\nimport { QuestionTypeIcon, type QuestionType } from './QuestionTypeIcon';\n\nexport interface QuestionNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** The question currently open in the editor. */\n selected?: boolean;\n /** Question type, shown as the leading 16px duotone icon. */\n questionType?: QuestionType;\n /** The question has validation problems — the type icon becomes a warning icon. */\n error?: boolean;\n /** Render the child element instead of a `<button>` (e.g. a router link). */\n asChild?: boolean;\n}\n\n// Figma: Question navigation (357:4645) — one row per question. Question-type icon (muted; accent when selected), warning on error (destructive border when selected, soft red fill on hover), drag handle on hover. Label is 14px.\nexport const QuestionNavItem = React.forwardRef<HTMLButtonElement, QuestionNavItemProps>(\n ({ className, questionType = 'select-one', selected, error, asChild, children, ...props }, ref) => {\n const Comp = asChild ? Slot.Root : 'button';\n return (\n <Comp\n ref={ref}\n type={asChild ? undefined : 'button'}\n aria-current={selected ? 'true' : undefined}\n className={cn(\n 'group/nav flex h-9.5 w-full max-w-106.5 items-center gap-2 rounded-sm border bg-surface p-2 text-left text-body-small text-surface-foreground transition-colors focus-visible:outline-none',\n error\n ? ['hover:bg-destructive-soft focus-visible:border-destructive', selected ? 'border-destructive' : 'border-border']\n : [\n // Hover only changes the fill; the border stays as it is (default grey, or accent when selected).\n 'hover:bg-accent-soft focus-visible:border-input-accent',\n selected ? 'border-input-accent' : 'border-border',\n ],\n className,\n )}\n {...props}\n >\n <span aria-hidden=\"true\" className=\"relative flex size-4 shrink-0 items-center justify-center\">\n <DotsSixVertical size={16} className=\"hidden group-hover/nav:block\" />\n <span className=\"group-hover/nav:hidden\">\n {error ? (\n <Warning size={16} className=\"text-destructive\" />\n ) : (\n <QuestionTypeIcon\n type={questionType}\n size={16}\n className={selected ? 'text-accent-foreground' : 'text-muted-foreground'}\n />\n )}\n </span>\n </span>\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {error && <span className=\"sr-only\">, has errors</span>}\n </Comp>\n );\n },\n);\nQuestionNavItem.displayName = 'QuestionNavItem';\n","import * as React from 'react';\nimport { ChatsCircle, CheckSquare, FileArrowUp, ListNumbers, RadioButton, StarHalf, type IconProps } from '@phosphor-icons/react';\n\nexport type QuestionType = 'select-one' | 'select-multiple' | 'ranking' | 'upload' | 'rating' | 'open-end';\n\nconst icons: Record<QuestionType, React.ComponentType<IconProps>> = {\n 'select-one': RadioButton,\n 'select-multiple': CheckSquare,\n ranking: ListNumbers,\n upload: FileArrowUp,\n rating: StarHalf,\n 'open-end': ChatsCircle,\n};\n\nexport interface QuestionTypeIconProps extends Omit<IconProps, 'weight'> {\n type: QuestionType;\n}\n\n// Figma: Question types › Question type icons — duotone glyphs in the accent colour (22.5px).\nexport function QuestionTypeIcon({ type, size = 22.5, className, ...props }: QuestionTypeIconProps) {\n const Icon = icons[type];\n return <Icon size={size} weight=\"duotone\" aria-hidden className={className ?? 'text-accent-foreground'} {...props} />;\n}\n","import * as React from 'react';\nimport { Check, DotsSixVertical, Plus, Trash } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { Checkbox } from '../Forms & Data Entry/Checkbox';\nimport { RadioGroupItem } from '../Forms & Data Entry/RadioGroup';\n\nconst optionClasses =\n 'flex w-full max-w-150 cursor-pointer items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-body-base text-surface-foreground transition-colors ' +\n // Hover changes the fill and shadow only; the border changes only when the option is selected.\n 'hover:bg-accent-soft hover:shadow-md ' +\n 'has-[[data-state=checked]]:border-accent-foreground ' +\n 'has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50';\n\ninterface OptionBase {\n label: React.ReactNode;\n className?: string;\n disabled?: boolean;\n}\n\nexport interface QuestionRadioOptionProps extends OptionBase {\n kind?: 'radio';\n /** Value in the surrounding `RadioGroup`. */\n value: string;\n}\n\nexport interface QuestionCheckboxOptionProps extends OptionBase {\n kind: 'checkbox';\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n}\n\nexport type QuestionOptionProps = QuestionRadioOptionProps | QuestionCheckboxOptionProps;\n\n// Figma: Question input (282:1490) › Radio / Checkbox — a full-width answer card; hover changes the fill only, and only a selected option gets the accent border.\nexport function QuestionOption(props: QuestionOptionProps) {\n const id = React.useId();\n return (\n <label htmlFor={id} className={cn(optionClasses, props.className)}>\n {props.kind === 'checkbox' ? (\n <Checkbox\n id={id}\n checked={props.checked}\n defaultChecked={props.defaultChecked}\n onCheckedChange={(next) => props.onCheckedChange?.(next === true)}\n disabled={props.disabled}\n />\n ) : (\n <RadioGroupItem id={id} value={props.value} disabled={props.disabled} />\n )}\n <span className=\"min-w-0 flex-1\">{props.label}</span>\n </label>\n );\n}\n\nexport interface QuestionOtherOptionProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onSubmit'> {\n /** Called with the typed text when the confirm button (or Enter) is pressed. */\n onSubmit?: (value: string) => void;\n confirmLabel?: string;\n}\n\n// Figma: Question input › Other=Yes — a free-text answer with a small confirm button.\nexport const QuestionOtherOption = React.forwardRef<HTMLInputElement, QuestionOtherOptionProps>(\n ({ className, onSubmit, confirmLabel = 'Confirm answer', placeholder = 'Type your answer', ...props }, ref) => {\n const inner = React.useRef<HTMLInputElement>(null);\n React.useImperativeHandle(ref, () => inner.current as HTMLInputElement);\n const submit = () => onSubmit?.(inner.current?.value ?? '');\n return (\n <div\n className={cn(\n 'inline-flex items-center gap-2 rounded-md border border-border bg-surface py-2 pr-2 pl-4 focus-within:border-input-accent',\n className,\n )}\n >\n <input\n ref={inner}\n type=\"text\"\n placeholder={placeholder}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n submit();\n }\n }}\n className=\"min-w-0 bg-transparent text-body-base text-surface-foreground outline-none placeholder:text-muted-foreground\"\n {...props}\n />\n <Button type=\"button\" variant=\"subtle\" size=\"icon-sm\" aria-label={confirmLabel} onClick={submit}>\n <Check size={16} aria-hidden />\n </Button>\n </div>\n );\n },\n);\nQuestionOtherOption.displayName = 'QuestionOtherOption';\n\nexport interface QuestionOptionEditorProps {\n label: string;\n onLabelChange?: (label: string) => void;\n /** Called by the trash button. */\n onRemove?: () => void;\n /** Called by the add (+) button. */\n onAdd?: () => void;\n className?: string;\n /**\n * Answer type. When set the row is quiet at rest: its normal border, the radio or checkbox indicator in front of the\n * label, and the remove/add buttons hidden but still taking their space, so the row is the same width in every state.\n * On hover or keyboard focus it becomes the editor: the shadow lifts, the drag handle replaces the indicator and the\n * buttons appear. The border colour does not change. Omit it for an always-on editor row.\n */\n kind?: 'radio' | 'checkbox' | 'rank';\n /**\n * `kind=\"rank\"` only: the position shown in the round number tag, as in `RankList`. For a ranking question the row keeps\n * its drag handle and number at rest and, like the other kinds, becomes the editor on hover or keyboard focus.\n */\n rank?: number;\n}\n\n// Figma: Question input › Editor=Yes — an option being authored: drag handle, editable label, remove and add buttons.\nexport function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind, rank }: QuestionOptionEditorProps) {\n const reveal = kind !== undefined;\n return (\n <div className={cn('group/option flex w-full items-center gap-2', className)}>\n <div\n className={cn(\n 'flex h-11.5 min-w-0 flex-1 items-center gap-2 rounded-md border bg-surface px-4 py-2 focus-within:border-input-accent',\n reveal\n ? // The border is always visible and does not change on hover; only the shadow lifts the row. The field being edited keeps the accent.\n 'border-border group-hover/option:shadow-md group-focus-within/option:shadow-md'\n : 'border-border hover:border-input hover:shadow-md',\n )}\n >\n {kind === 'rank' ? (\n <>\n <DotsSixVertical size={20} aria-hidden className=\"shrink-0 text-surface-foreground\" />\n <span\n aria-hidden=\"true\"\n className=\"flex size-6 shrink-0 items-center justify-center rounded-full border border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-ui-caption text-surface-foreground\"\n >\n {rank}\n </span>\n </>\n ) : reveal ? (\n <span aria-hidden=\"true\" className=\"relative flex size-5 shrink-0 items-center justify-center\">\n <span\n className={cn(\n 'inline-flex size-4 border-2 border-input bg-surface group-hover/option:hidden group-focus-within/option:hidden',\n kind === 'radio' ? 'rounded-full' : 'rounded-xxs',\n )}\n />\n <DotsSixVertical\n size={20}\n className=\"hidden shrink-0 text-surface-foreground group-hover/option:block group-focus-within/option:block\"\n />\n </span>\n ) : (\n <DotsSixVertical size={20} aria-hidden className=\"shrink-0 text-surface-foreground\" />\n )}\n <input\n aria-label=\"Option label\"\n value={label}\n onChange={(event) => onLabelChange?.(event.target.value)}\n className=\"min-w-0 flex-1 bg-transparent text-body-base text-surface-foreground outline-none\"\n />\n </div>\n <div\n className={cn(\n 'flex items-center gap-2',\n reveal && 'opacity-0 transition-opacity group-hover/option:opacity-100 group-focus-within/option:opacity-100',\n )}\n >\n <Button type=\"button\" variant=\"destructive\" size=\"icon-sm\" aria-label=\"Remove option\" onClick={onRemove}>\n <Trash size={16} aria-hidden />\n </Button>\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" aria-label=\"Add option\" onClick={onAdd}>\n <Plus size={16} aria-hidden />\n </Button>\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { DotsSixVertical } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface RankItemData {\n id: string;\n label: React.ReactNode;\n}\n\nexport interface RankListProps extends Omit<React.HTMLAttributes<HTMLOListElement>, 'onChange'> {\n items: RankItemData[];\n /** Called with the new order after a drag or a keyboard move. */\n onItemsChange: (items: RankItemData[]) => void;\n}\n\nfunction move<T>(list: T[], from: number, to: number): T[] {\n if (from === to || to < 0 || to >= list.length) return list;\n const next = list.slice();\n const [item] = next.splice(from, 1);\n next.splice(to, 0, item as T);\n return next;\n}\n\n// Figma: Question input › Rank_choice — draggable rows with a numbered badge; hover turns the row and badge accent.\nexport const RankList = React.forwardRef<HTMLOListElement, RankListProps>(\n ({ className, items, onItemsChange, ...props }, ref) => {\n const [dragIndex, setDragIndex] = React.useState<number | null>(null);\n const [announcement, setAnnouncement] = React.useState('');\n const handles = React.useRef(new Map<string, HTMLButtonElement>());\n const refocus = React.useRef<string | null>(null);\n\n React.useEffect(() => {\n if (refocus.current) {\n handles.current.get(refocus.current)?.focus();\n refocus.current = null;\n }\n });\n\n const reorder = (from: number, to: number, id: string) => {\n const next = move(items, from, to);\n if (next === items) return;\n refocus.current = id;\n setAnnouncement(`Moved to position ${to + 1} of ${items.length}`);\n onItemsChange(next);\n };\n\n return (\n <>\n <ol ref={ref} className={cn('flex w-full max-w-150 flex-col gap-4', className)} {...props}>\n {items.map((item, index) => (\n <li\n key={item.id}\n draggable\n onDragStart={() => setDragIndex(index)}\n onDragOver={(event) => event.preventDefault()}\n onDrop={() => {\n if (dragIndex !== null) reorder(dragIndex, index, item.id);\n setDragIndex(null);\n }}\n onDragEnd={() => setDragIndex(null)}\n className={cn(\n 'group/rank flex items-center gap-3 overflow-hidden rounded-sm border border-border bg-surface px-4 py-2.5 text-body-base text-surface-foreground transition-colors',\n 'hover:border-accent-foreground hover:shadow-md',\n dragIndex === index && 'opacity-50',\n )}\n >\n <button\n type=\"button\"\n ref={(el) => {\n if (el) handles.current.set(item.id, el);\n else handles.current.delete(item.id);\n }}\n aria-label={`Reorder, position ${index + 1} of ${items.length}. Use the up and down arrow keys to move.`}\n onKeyDown={(event) => {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n reorder(index, index - 1, item.id);\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n reorder(index, index + 1, item.id);\n }\n }}\n className=\"inline-flex shrink-0 cursor-grab rounded-xs text-surface-foreground\"\n >\n <DotsSixVertical size={16} aria-hidden />\n </button>\n <span\n aria-hidden=\"true\"\n className=\"flex size-6 shrink-0 items-center justify-center rounded-full border border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-ui-caption text-surface-foreground group-hover/rank:border-accent-foreground group-hover/rank:bg-accent-soft group-hover/rank:bg-none group-hover/rank:text-accent-soft-foreground\"\n >\n {index + 1}\n </span>\n <span className=\"min-w-0 flex-1\">{item.label}</span>\n </li>\n ))}\n </ol>\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {announcement}\n </span>\n </>\n );\n },\n);\nRankList.displayName = 'RankList';\n","import * as React from 'react';\nimport { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport interface RatingScaleProps\n extends Omit<React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>, 'type' | 'value' | 'defaultValue' | 'onValueChange'> {\n /** Number of points on the scale. */\n max?: number;\n /** Selected rating (1-based), or `undefined` for none. */\n value?: number;\n defaultValue?: number;\n onValueChange?: (value: number | undefined) => void;\n /** Caption under the first point (e.g. \"Not likely\"). */\n lowLabel?: React.ReactNode;\n /** Caption under the last point (e.g. \"Very likely\"). */\n highLabel?: React.ReactNode;\n}\n\n// Figma: Question input (282:1490) › Rating scale item — equal-width 48px buttons; selected has a 2px accent border.\nexport const RatingScale = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Root>, RatingScaleProps>(\n ({ className, max = 5, value, defaultValue, onValueChange, lowLabel, highLabel, ...props }, ref) => {\n const [internal, setInternal] = React.useState<number | undefined>(defaultValue);\n const current = value !== undefined ? value : internal;\n return (\n <div className={cn('flex w-full max-w-150 flex-col gap-2', className)}>\n <ToggleGroupPrimitive.Root\n ref={ref}\n type=\"single\"\n value={current ? String(current) : ''}\n onValueChange={(next) => {\n const parsed = next ? Number(next) : undefined;\n setInternal(parsed);\n onValueChange?.(parsed);\n }}\n className=\"flex gap-2\"\n {...props}\n >\n {Array.from({ length: max }, (_, i) => i + 1).map((n) => (\n <ToggleGroupPrimitive.Item\n key={n}\n value={String(n)}\n aria-label={`${n}`}\n className={cn(\n 'flex h-12 min-w-0 flex-1 items-center justify-center rounded-sm border-2 border-border bg-surface text-ui-label-large text-surface-foreground transition-colors',\n 'hover:bg-accent-soft',\n 'data-[state=on]:border-accent-foreground data-[state=on]:text-accent-foreground',\n )}\n >\n {n}\n </ToggleGroupPrimitive.Item>\n ))}\n </ToggleGroupPrimitive.Root>\n {(lowLabel != null || highLabel != null) && (\n <div className=\"flex justify-between text-ui-caption text-secondary-muted-foreground\" aria-hidden=\"true\">\n <span>{lowLabel}</span>\n <span>{highLabel}</span>\n </div>\n )}\n </div>\n );\n },\n);\nRatingScale.displayName = 'RatingScale';\n","import * as React from 'react';\nimport { Image as ImageIcon, ImageBroken, Trash } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\nimport { InlineEdit } from '../Forms & Data Entry/InlineEdit';\n\nexport interface StimulusCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** Image shown in the 80px thumbnail. Without one the thumbnail shows `icon` on a neutral fill. */\n thumbnail?: string;\n /** Alt text for `thumbnail`. Leave empty when the caption already describes the image. */\n thumbnailAlt?: string;\n /** Placeholder shown in the thumbnail when there is no `thumbnail` (e.g. a video camera for a video). Defaults to an image icon. */\n icon?: React.ReactNode;\n /**\n * `error` swaps the thumbnail for a broken-image icon on the destructive soft fill, for a stimulus that could not be\n * loaded. It is also applied automatically when `thumbnail` fails to load.\n */\n status?: 'default' | 'error';\n /** Small line above the caption saying who speaks it. */\n label?: React.ReactNode;\n /** What the AI moderator says when it shows the stimulus, e.g. \"Look at this image\". */\n caption?: string;\n /** Editor mode: makes the caption editable (click to edit, Enter or blur saves) and is called with the new text. */\n onCaptionChange?: (caption: string) => void;\n /** Editor mode: placeholder for an empty caption. */\n captionPlaceholder?: string;\n /** Editor mode: caption length limit. Also what the counter counts against. */\n maxLength?: number;\n /** Editor mode: shows the \"n/2000 characters\" counter under the caption (it counts live while typing). Defaults to `true`; needs `maxLength`. */\n showCounter?: boolean;\n /** Shows the trash button. */\n onRemove?: () => void;\n /** Accessible name of the trash button. Defaults to \"Remove stimulus\". */\n removeLabel?: string;\n}\n\nconst MIN_THUMBNAIL = 80;\nconst MAX_THUMBNAIL = 240;\n\n// Figma: Stimulus card (605:3462) — a stimulus (image or video) with what the AI moderator says about it, and a remove button.\nexport const StimulusCard = React.forwardRef<HTMLDivElement, StimulusCardProps>(\n (\n {\n className,\n thumbnail,\n thumbnailAlt = '',\n icon,\n status = 'default',\n label = 'AI Moderator',\n caption,\n onCaptionChange,\n captionPlaceholder = 'Click to write what the AI moderator says',\n maxLength,\n showCounter = true,\n onRemove,\n removeLabel = 'Remove stimulus',\n ...props\n },\n ref,\n ) => {\n // Remember which source failed, so a new `thumbnail` gets a fresh chance to load.\n const [failedSrc, setFailedSrc] = React.useState<string | undefined>();\n const error = status === 'error' || (thumbnail !== undefined && failedSrc === thumbnail);\n const showImage = thumbnail !== undefined && !error;\n // Live character count while the caption is being edited (the saved value otherwise).\n const [draft, setDraft] = React.useState<string | null>(null);\n const count = (draft ?? caption ?? '').length;\n\n // The thumbnail is square and as tall as the text column (80-240px), so it grows when the caption wraps. That is circular in\n // plain CSS (its width narrows the text, which changes its height), so measure the text and size the thumbnail from it.\n const textRef = React.useRef<HTMLDivElement>(null);\n const [thumbnailSize, setThumbnailSize] = React.useState(MIN_THUMBNAIL);\n React.useEffect(() => {\n const el = textRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(() => {\n setThumbnailSize(Math.min(MAX_THUMBNAIL, Math.max(MIN_THUMBNAIL, Math.ceil(el.getBoundingClientRect().height))));\n });\n observer.observe(el);\n return () => observer.disconnect();\n }, []);\n return (\n <div\n ref={ref}\n data-status={error ? 'error' : 'default'}\n className={cn('flex min-h-21.5 w-full items-center gap-4 rounded-md border border-border p-0.5 pr-4', className)}\n {...props}\n >\n <div className=\"flex min-w-0 flex-1 items-center gap-4\">\n <span\n style={{ width: thumbnailSize, height: thumbnailSize }}\n className={cn(\n 'relative flex shrink-0 items-center justify-center overflow-hidden rounded-sm border',\n error\n ? 'border-destructive-soft-border bg-destructive-soft bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-destructive'\n : 'border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground',\n showImage && 'bg-none',\n )}\n >\n {showImage ? (\n // Out of flow, so the image's own size never sets the thumbnail's size.\n <img src={thumbnail} alt={thumbnailAlt} className=\"absolute inset-0 size-full object-cover\" onError={() => setFailedSrc(thumbnail)} />\n ) : error ? (\n <ImageBroken size={24} aria-hidden />\n ) : (\n (icon ?? <ImageIcon size={24} aria-hidden />)\n )}\n </span>\n <div ref={textRef} className=\"flex min-w-0 flex-1 flex-col justify-center gap-2 py-2 text-surface-foreground\">\n <p className=\"w-full text-ui-label\">{label}</p>\n {onCaptionChange ? (\n <InlineEdit\n variant=\"question\"\n multiline\n // The editor pads its text (top 4px, bottom 5px plus a 1px border); pull that back so the card is as tall as its content.\n className=\"-mx-3 -mt-1 -mb-1.5 w-auto\"\n aria-label=\"Stimulus caption\"\n value={caption ?? ''}\n placeholder={captionPlaceholder}\n maxLength={maxLength}\n onValueChange={onCaptionChange}\n onDraftChange={setDraft}\n onEditingChange={(editing) => {\n if (!editing) setDraft(null);\n }}\n textClassName=\"text-body-base\"\n />\n ) : (\n <p className=\"w-full text-body-base [word-break:break-word]\">{caption}</p>\n )}\n {onCaptionChange && showCounter && maxLength !== undefined && (\n <p className=\"text-ui-caption text-secondary-muted-foreground\">\n {count}/{maxLength} characters\n </p>\n )}\n </div>\n </div>\n {onRemove && (\n <Button type=\"button\" variant=\"destructive\" size=\"icon-sm\" aria-label={removeLabel} onClick={onRemove}>\n <Trash size={16} aria-hidden />\n </Button>\n )}\n </div>\n );\n },\n);\nStimulusCard.displayName = 'StimulusCard';\n","import * as React from 'react';\nimport { Progress as ProgressPrimitive } from 'radix-ui';\n\nimport { cn } from '../../lib/utils';\n\nexport interface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {\n /** Heading shown above the track, left-aligned (e.g. \"Project Progress\"). */\n label?: React.ReactNode;\n /** Right-aligned value above the track. Pass `true` to render `value%`. */\n valueLabel?: React.ReactNode | true;\n /** Left caption below the track (e.g. \"16 of 25 tasks completed\"). */\n detailsStart?: React.ReactNode;\n /** Right caption below the track (e.g. \"Est. 3 days remaining\"). */\n detailsEnd?: React.ReactNode;\n}\n\n// Figma: Progress Bar (36). Track is `secondary`, indicator is `accent`, both full-radius, 8px tall.\nexport const Progress = React.forwardRef<React.ElementRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n ({ className, value = 0, label, valueLabel, detailsStart, detailsEnd, ...props }, ref) => {\n const hasHeader = label != null || valueLabel != null;\n const hasDetails = detailsStart != null || detailsEnd != null;\n const clamped = Math.min(100, Math.max(0, value ?? 0));\n return (\n <div className={cn('flex w-full flex-col gap-2', className)}>\n {hasHeader && (\n <div className=\"flex items-center justify-between text-ui-label text-surface-foreground\">\n <span>{label}</span>\n <span>{valueLabel === true ? `${Math.round(clamped)}%` : valueLabel}</span>\n </div>\n )}\n <ProgressPrimitive.Root\n ref={ref}\n value={clamped}\n className=\"relative h-2 w-full overflow-hidden rounded-full bg-secondary\"\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full rounded-full bg-accent transition-[width]\"\n style={{ width: `${clamped}%` }}\n />\n </ProgressPrimitive.Root>\n {hasDetails && (\n <div className=\"flex items-start justify-between text-ui-label leading-5 text-secondary-muted-foreground\">\n <span>{detailsStart}</span>\n <span>{detailsEnd}</span>\n </div>\n )}\n </div>\n );\n },\n);\nProgress.displayName = 'Progress';\n","import * as React from 'react';\nimport { CaretDown, CaretUp } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {\n /** Alternate row backgrounds (Figma: Stripe = Yes). */\n striped?: boolean;\n /** Class names for the bordered, rounded scroll container around the `<table>`. */\n containerClassName?: string;\n}\n\n// Figma: Tables (27) — 12px-radius bordered container; rows are separated by 1px `border` lines.\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n ({ className, containerClassName, striped, ...props }, ref) => (\n <div className={cn('relative w-full overflow-auto rounded-lg border border-border bg-surface', containerClassName)}>\n <table\n ref={ref}\n data-striped={striped ? '' : undefined}\n className={cn('group/table w-full border-collapse text-body-small text-surface-foreground', className)}\n {...props}\n />\n </div>\n ),\n);\nTable.displayName = 'Table';\n\nexport const TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => <thead ref={ref} className={className} {...props} />,\n);\nTableHeader.displayName = 'TableHeader';\n\nexport const TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => <tbody ref={ref} className={className} {...props} />,\n);\nTableBody.displayName = 'TableBody';\n\nexport interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {\n /** Highlights the row and marks it with the accent edge (Figma: State = Selected). */\n selected?: boolean;\n}\n\n// Figma: Table Row (29) — Default / Hover (`accent-soft`) / Selected (accent left edge on the first cell).\nexport const TableRow = React.forwardRef<HTMLTableRowElement, TableRowProps>(\n ({ className, selected, ...props }, ref) => (\n <tr\n ref={ref}\n data-state={selected ? 'selected' : undefined}\n aria-selected={selected || undefined}\n className={cn(\n 'group/row border-b border-border transition-colors last:border-b-0',\n 'group-data-[striped]/table:even:bg-background hover:bg-accent-soft group-data-[striped]/table:even:hover:bg-accent-soft',\n className,\n )}\n {...props}\n />\n ),\n);\nTableRow.displayName = 'TableRow';\n\ntype Align = 'left' | 'right';\n\nexport interface TableHeadProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'align'> {\n align?: Align;\n /** Render the label as a sort button. Provide `sort` and `onSort`. */\n sortable?: boolean;\n sort?: 'none' | 'asc' | 'desc';\n onSort?: () => void;\n /** Narrow centred column for a select-all checkbox. */\n checkbox?: boolean;\n}\n\nconst ariaSort = { none: 'none', asc: 'ascending', desc: 'descending' } as const;\n\n// Figma: Table Header Row (28) › Table Header Cell — 40px, `ui/label` text; sortable cells show a caret.\nexport const TableHead = React.forwardRef<HTMLTableCellElement, TableHeadProps>(\n ({ className, align = 'left', sortable, sort = 'none', onSort, checkbox, children, ...props }, ref) => {\n const caret =\n sort === 'asc' ? <CaretUp size={16} aria-hidden className=\"shrink-0\" /> : <CaretDown size={16} aria-hidden className=\"shrink-0\" />;\n return (\n <th\n ref={ref}\n scope=\"col\"\n aria-sort={sortable ? ariaSort[sort] : undefined}\n className={cn(\n 'h-10 border-b border-border text-ui-label whitespace-nowrap',\n checkbox ? 'w-13 px-0 text-center' : 'px-4 py-3',\n align === 'right' ? 'text-right' : 'text-left',\n className,\n )}\n {...props}\n >\n {sortable ? (\n <button\n type=\"button\"\n onClick={onSort}\n className={cn('inline-flex items-center gap-1 rounded-xs', align === 'right' && 'flex-row-reverse')}\n >\n {children}\n {caret}\n </button>\n ) : checkbox ? (\n <div className=\"flex items-center justify-center\">{children}</div>\n ) : (\n children\n )}\n </th>\n );\n },\n);\nTableHead.displayName = 'TableHead';\n\nexport interface TableCellProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'align'> {\n align?: Align;\n /** Secondary text colour (Figma: Type = Muted). */\n muted?: boolean;\n /** Narrow centred cell for a checkbox or radio. */\n checkbox?: boolean;\n /** Right-aligned cell for row actions; lays its children out in a row with 4px gaps. */\n actions?: boolean;\n}\n\n// Figma: Table Row (29) › Table Cell — 40px tall, 16px inline padding, 14/20 value.\nexport const TableCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(\n ({ className, align = 'left', muted, checkbox, actions, children, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n 'h-10 text-body-small',\n 'group-data-[state=selected]/row:first:border-l-2 group-data-[state=selected]/row:first:border-l-input-accent',\n checkbox ? 'w-13 px-0 text-center' : actions ? 'px-4 py-1.5 text-right' : 'px-4 py-3',\n align === 'right' && 'text-right',\n muted ? 'text-secondary-muted-foreground' : 'text-surface-foreground',\n className,\n )}\n {...props}\n >\n {checkbox ? <div className=\"flex items-center justify-center\">{children}</div> : actions ? <div className=\"flex items-start justify-end gap-1\">{children}</div> : children}\n </td>\n ),\n);\nTableCell.displayName = 'TableCell';\n\nexport interface TableCellTwoLinesProps extends React.HTMLAttributes<HTMLDivElement> {\n primary: React.ReactNode;\n secondary?: React.ReactNode;\n /** Leading avatar / image (Figma: Two Lines Avatar). */\n avatar?: React.ReactNode;\n}\n\n/** Primary + support text stack for a `TableCell` (Figma: Type = Two Lines / Option). Set the row/cell height to `h-14`. */\nexport function TableCellTwoLines({ primary, secondary, avatar, className, ...props }: TableCellTwoLinesProps) {\n return (\n <div className={cn('flex items-center gap-2', className)} {...props}>\n {avatar}\n <div className=\"flex flex-col gap-0.5 whitespace-nowrap\">\n <span className=\"text-ui-label text-surface-foreground\">{primary}</span>\n {secondary && <span className=\"text-ui-caption text-secondary-muted-foreground\">{secondary}</span>}\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\nconst statCardVariants = cva('flex min-w-0 flex-col gap-2 rounded-md border p-3', {\n variants: {\n variant: {\n default: 'border-border bg-transparent',\n warning: 'border-warning-soft-border bg-warning-soft',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nexport interface StatCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, VariantProps<typeof statCardVariants> {\n label: React.ReactNode;\n value: React.ReactNode;\n /** Leading icon beside the value (24px). */\n icon?: React.ReactNode;\n}\n\n// Figma: Activity control (361:5214) › stat-card — a small bordered label/value tile; `warning` tints it yellow.\nexport const StatCard = React.forwardRef<HTMLDivElement, StatCardProps>(\n ({ className, variant, label, value, icon, ...props }, ref) => (\n <div ref={ref} className={cn(statCardVariants({ variant }), className)} {...props}>\n <p className=\"truncate text-ui-caption text-secondary-muted-foreground\">{label}</p>\n <p className=\"flex items-center gap-2 text-body-base text-surface-foreground\">\n {icon && (\n <span aria-hidden=\"true\" className=\"inline-flex size-6 shrink-0 items-center justify-center\">\n {icon}\n </span>\n )}\n {value}\n </p>\n </div>\n ),\n);\nStatCard.displayName = 'StatCard';\n","import * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { StatCard, type StatCardProps } from '../Data Display/StatCard';\nimport { EditableTag } from '../Tags & Badges/EditableTag';\n\nexport interface ActivityStat extends Pick<StatCardProps, 'label' | 'value' | 'icon' | 'variant'> {\n id: string;\n}\n\nexport interface ActivitySection {\n id: string;\n heading: React.ReactNode;\n /** Section text. May contain block elements (e.g. an `InlineEdit`), so it is rendered in a `div`. */\n body: React.ReactNode;\n /** Removable tags shown under the body. */\n tags?: string[];\n}\n\nexport interface ActivityStructureProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n title?: React.ReactNode;\n /** Stat tiles, laid out in a two-column grid. */\n stats: ActivityStat[];\n /** Text sections (e.g. Research Goal, Target Audience), optionally with tags. */\n sections?: ActivitySection[];\n /** Called with `(sectionId, tag)` when a tag's remove button is pressed. Omit for read-only tags. */\n onRemoveTag?: (sectionId: string, tag: string) => void;\n /** Called with the section id by the dashed \"Add tag\" chip. Omit to hide it. */\n onAddTag?: (sectionId: string) => void;\n addTagLabel?: string;\n /**\n * Content shown under the stats and sections. With `stats={[]}` and `children` the card is a single-purpose widget\n * (e.g. \"Research Goal\") with the same card, title style and colour as the full summary.\n */\n children?: React.ReactNode;\n}\n\n// Figma: Activity control (361:5214) › Activity structure — summary card with stat tiles and text sections with tags; also usable as a single-purpose widget via children.\nexport const ActivityStructure = React.forwardRef<HTMLElement, ActivityStructureProps>(\n ({ className, title = 'Activity Structure', stats, sections, onRemoveTag, onAddTag, addTagLabel = 'Add tag', children, ...props }, ref) => (\n <section\n ref={ref}\n className={cn('flex w-full max-w-96.5 flex-col gap-4 rounded-xl bg-surface p-4', className)}\n {...props}\n >\n <h3 className=\"text-heading-h3 text-primary\">{title}</h3>\n {stats.length > 0 && (\n <div className=\"grid grid-cols-2 gap-3\">\n {stats.map(({ id, ...stat }) => (\n <StatCard key={id} {...stat} />\n ))}\n </div>\n )}\n {sections?.map(({ id, heading, body, tags }) => (\n <div key={id} className=\"flex flex-col gap-2\">\n <h4 className=\"text-heading-h4 text-surface-foreground\">{heading}</h4>\n <div className=\"text-body-base text-surface-foreground\">{body}</div>\n {(tags?.length || onAddTag) && (\n <div className=\"flex flex-wrap items-center gap-2\">\n {tags?.map((tag) => (\n <EditableTag key={tag} type=\"editable\" onRemove={onRemoveTag && (() => onRemoveTag(id, tag))}>\n {tag}\n </EditableTag>\n ))}\n {onAddTag && (\n <EditableTag type=\"add\" onClick={() => onAddTag(id)}>\n {addTagLabel}\n </EditableTag>\n )}\n </div>\n )}\n </div>\n ))}\n {children}\n </section>\n ),\n);\nActivityStructure.displayName = 'ActivityStructure';\n","import * as React from 'react';\nimport { Crown, Plus, X } from '@phosphor-icons/react';\nimport { cva } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\n// Figma: Editable tags (41). Compact 26px chip used for removable / addable values.\nconst editableTagVariants = cva(\n 'inline-flex h-6.5 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors',\n {\n variants: {\n type: {\n default: 'gap-1 bg-accent-muted pl-2.5 pr-1.5 text-primary',\n editable:\n 'gap-1 bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 pl-2.5 pr-1.5 text-surface-foreground hover:bg-accent-soft hover:bg-none hover:text-accent-soft-foreground',\n add: 'gap-1 border border-dashed border-border pl-2.5 pr-1.5 text-surface-foreground hover:bg-accent-soft hover:text-accent-soft-foreground',\n multiple:\n 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2.5 text-surface-foreground hover:bg-accent-soft hover:bg-none hover:text-accent-soft-foreground',\n },\n },\n defaultVariants: { type: 'default' },\n },\n);\n\nexport interface EditableTagProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onClick'> {\n /** `default` is the highlighted (primary) value, `editable` is removable, `add` adds a value, `multiple` is the \"+N more\" overflow chip. */\n type?: 'default' | 'editable' | 'add' | 'multiple';\n /** Leading icon. `default` shows a crown unless you pass `null`. */\n icon?: React.ReactNode;\n /** Renders a remove button on `editable`/`default` tags. */\n onRemove?: () => void;\n /** Click handler for `add` and `multiple` (rendered as a button when set). */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n children: React.ReactNode;\n}\n\nexport const EditableTag = React.forwardRef<HTMLElement, EditableTagProps>(\n ({ className, type = 'default', icon, onRemove, onClick, children, ...props }, ref) => {\n const classes = cn(editableTagVariants({ type }), className);\n const leading =\n type === 'add' ? (\n <Plus size={12} aria-hidden />\n ) : icon !== undefined ? (\n icon\n ) : type === 'default' ? (\n <Crown size={12} weight=\"fill\" aria-hidden />\n ) : null;\n\n if (type === 'add' || (type === 'multiple' && onClick)) {\n return (\n <button ref={ref as React.Ref<HTMLButtonElement>} type=\"button\" className={classes} onClick={onClick} {...props}>\n {leading}\n {children}\n </button>\n );\n }\n\n return (\n <span ref={ref as React.Ref<HTMLSpanElement>} className={classes} {...props}>\n {leading}\n {children}\n {onRemove && (\n <button\n type=\"button\"\n aria-label={typeof children === 'string' ? `Remove ${children}` : 'Remove'}\n onClick={onRemove}\n className=\"inline-flex size-3 items-center justify-center rounded-xs\"\n >\n <X size={12} aria-hidden />\n </button>\n )}\n </span>\n );\n },\n);\nEditableTag.displayName = 'EditableTag';\n","import * as React from 'react';\nimport { DotsSixVertical, RadioButton } from '@phosphor-icons/react';\nimport { cva } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils';\n\n// Figma: Role Tag (41), now the system Badge. 24px chip; `interactable` reveals a drag handle on hover.\nconst roleTagVariants = cva(\n 'group inline-flex h-6 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors',\n {\n variants: {\n type: {\n primary: 'bg-primary-soft px-2.5 text-primary-soft-foreground',\n secondary:\n 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2.5 text-secondary-muted-foreground',\n question: 'gap-1 bg-primary-soft pl-1 pr-2.5 text-plum-500',\n interactable: 'gap-1 pl-2.5 pr-2.5 hover:pl-1',\n id: 'gap-1 bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2.5 tabular-nums text-surface-foreground',\n count:\n 'min-w-6 justify-center rounded-full bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 px-2 tabular-nums text-surface-foreground',\n },\n selected: { true: '', false: '' },\n },\n compoundVariants: [\n {\n type: 'interactable',\n selected: false,\n className:\n 'bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground',\n },\n { type: 'interactable', selected: true, className: 'bg-accent-soft text-accent-foreground' },\n ],\n defaultVariants: { type: 'primary', selected: false },\n },\n);\n\nexport interface BadgeProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onClick'> {\n /**\n * `id` prefixes the content with a muted \"ID\" label (children is the identifier); `count` is a round pill for a number.\n */\n type?: 'primary' | 'secondary' | 'question' | 'interactable' | 'id' | 'count';\n /** Pressed state for `interactable` tags. */\n selected?: boolean;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n children: React.ReactNode;\n}\n\nexport const Badge = React.forwardRef<HTMLElement, BadgeProps>(\n ({ className, type = 'primary', selected = false, onClick, children, ...props }, ref) => {\n const classes = cn(roleTagVariants({ type, selected: type === 'interactable' ? selected : false }), className);\n\n if (type === 'interactable') {\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n aria-pressed={selected}\n className={classes}\n onClick={onClick}\n {...props}\n >\n <DotsSixVertical size={16} aria-hidden className=\"hidden shrink-0 group-hover:block\" />\n {children}\n </button>\n );\n }\n\n return (\n <span ref={ref as React.Ref<HTMLSpanElement>} className={classes} {...props}>\n {type === 'question' && <RadioButton size={16} weight=\"fill\" aria-hidden />}\n {type === 'id' && <span className=\"text-secondary-muted-foreground\">ID</span>}\n {children}\n </span>\n );\n },\n);\nBadge.displayName = 'Badge';\n","import * as React from 'react';\nimport { ArrowLeft, ArrowRight, DotsThree } from '@phosphor-icons/react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../Buttons & Actions/Button';\n\nexport type PaginationItemValue = number | 'ellipsis';\n\n/** 1-based page list with ellipses, e.g. `[1, 2, 'ellipsis', 5]`. Keeps first, last and the current page ± `siblings`. */\nexport function getPaginationItems(page: number, pageCount: number, siblings = 1): PaginationItemValue[] {\n const keep = new Set<number>([1, pageCount]);\n for (let p = page - siblings; p <= page + siblings; p++) if (p >= 1 && p <= pageCount) keep.add(p);\n // Show a neighbouring page instead of an ellipsis that would hide just one.\n const sorted = [...keep].sort((a, b) => a - b);\n const items: PaginationItemValue[] = [];\n sorted.forEach((p, index) => {\n const previous = sorted[index - 1];\n if (previous !== undefined && p - previous === 2) items.push(previous + 1);\n else if (previous !== undefined && p - previous > 2) items.push('ellipsis');\n items.push(p);\n });\n return items;\n}\n\nexport interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {\n /** Current page, 1-based. */\n page: number;\n pageCount: number;\n onPageChange: (page: number) => void;\n /** `full` lists page numbers; `compact` shows `1/5` between the arrows. */\n variant?: 'full' | 'compact';\n /** How many pages to show either side of the current one (full variant). */\n siblings?: number;\n}\n\n// Figma: Pagination (71) — 32px items; the current page is `subtle`, the rest are outlined.\nexport const Pagination = React.forwardRef<HTMLElement, PaginationProps>(\n ({ className, page, pageCount, onPageChange, variant = 'full', siblings = 1, ...props }, ref) => {\n const go = (next: number) => onPageChange(Math.min(pageCount, Math.max(1, next)));\n const previous = (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label=\"Previous page\"\n disabled={page <= 1}\n onClick={() => go(page - 1)}\n >\n <ArrowLeft size={16} aria-hidden />\n </Button>\n );\n const next = (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label=\"Next page\"\n disabled={page >= pageCount}\n onClick={() => go(page + 1)}\n >\n <ArrowRight size={16} aria-hidden />\n </Button>\n );\n\n return (\n <nav\n ref={ref}\n aria-label=\"Pagination\"\n className={cn('flex items-center', variant === 'compact' ? 'w-35 justify-between' : 'gap-2', className)}\n {...props}\n >\n {previous}\n {variant === 'compact' ? (\n <span className=\"text-body-small text-surface-foreground\" aria-live=\"polite\">\n {page}/{pageCount}\n </span>\n ) : (\n <ul className=\"flex items-center gap-2\">\n {getPaginationItems(page, pageCount, siblings).map((item, index) => (\n <li key={item === 'ellipsis' ? `ellipsis-${index}` : item}>\n {item === 'ellipsis' ? (\n <span className=\"inline-flex size-8 items-center justify-center rounded-sm border border-border bg-surface text-surface-foreground\">\n <DotsThree size={16} aria-hidden />\n <span className=\"sr-only\">More pages</span>\n </span>\n ) : (\n <Button\n type=\"button\"\n variant={item === page ? 'subtle' : 'outline'}\n size=\"sm\"\n aria-label={`Page ${item}`}\n aria-current={item === page ? 'page' : undefined}\n onClick={() => go(item)}\n >\n {item}\n </Button>\n )}\n </li>\n ))}\n </ul>\n )}\n {next}\n </nav>\n );\n },\n);\nPagination.displayName = 'Pagination';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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A,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,cAAW;AAAA,QACX,UAAU,QAAQ;AAAA,QAClB,SAAS,MAAM,GAAG,OAAO,CAAC;AAAA,QAE1B,wDAAC,6BAAW,MAAM,IAAI,eAAW,MAAC;AAAA;AAAA,IACpC;AAGF,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,cAAW;AAAA,QACX,WAAW,GAAG,qBAAqB,YAAY,YAAY,yBAAyB,SAAS,SAAS;AAAA,QACrG,GAAG;AAAA,QAEH;AAAA;AAAA,UACA,YAAY,YACX,+CAAC,UAAK,WAAU,2CAA0C,aAAU,UACjE;AAAA;AAAA,YAAK;AAAA,YAAE;AAAA,aACV,IAEA,8CAAC,QAAG,WAAU,2BACX,6BAAmB,MAAM,WAAW,QAAQ,EAAE,IAAI,CAAC,MAAM,UACxD,8CAAC,QACE,mBAAS,aACR,+CAAC,UAAK,WAAU,qHACd;AAAA,0DAAC,4BAAU,MAAM,IAAI,eAAW,MAAC;AAAA,YACjC,8CAAC,UAAK,WAAU,WAAU,wBAAU;AAAA,aACtC,IAEA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,SAAS,SAAS,OAAO,WAAW;AAAA,cACpC,MAAK;AAAA,cACL,cAAY,QAAQ,IAAI;AAAA,cACxB,gBAAc,SAAS,OAAO,SAAS;AAAA,cACvC,SAAS,MAAM,GAAG,IAAI;AAAA,cAErB;AAAA;AAAA,UACH,KAhBK,SAAS,aAAa,YAAY,KAAK,KAAK,IAkBrD,CACD,GACH;AAAA,UAED;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,WAAW,cAAc;","names":["React","import_radix_ui","import_jsx_runtime","SwitchPrimitive","React","import_radix_ui","import_jsx_runtime","TogglePrimitive","React","import_jsx_runtime","React","import_jsx_runtime","React","import_class_variance_authority","import_radix_ui","import_jsx_runtime","TogglePrimitive","React","React","import_react","import_radix_ui","React","import_radix_ui","import_jsx_runtime","LabelPrimitive","import_jsx_runtime","CheckboxPrimitive","React","import_radix_ui","import_jsx_runtime","RadioGroupPrimitive","import_jsx_runtime","title","description","className","React","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_react","React","import_react","import_radix_ui","import_jsx_runtime","DropdownMenuPrimitive","import_jsx_runtime","React","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_jsx_runtime","import_react","import_jsx_runtime","React","import_react","import_radix_ui","React","import_react","import_jsx_runtime","React","import_radix_ui","React","import_radix_ui","React","import_radix_ui","import_class_variance_authority","import_jsx_runtime","TabsPrimitive","import_jsx_runtime","TabsPrimitive","import_jsx_runtime","ToggleGroupPrimitive","import_jsx_runtime","PopoverPrimitive","React","import_radix_ui","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_react","import_radix_ui","import_jsx_runtime","SelectPrimitive","React","import_radix_ui","import_jsx_runtime","SliderPrimitive","React","import_jsx_runtime","React","import_react","import_radix_ui","import_jsx_runtime","DialogPrimitive","React","import_react","import_class_variance_authority","import_radix_ui","import_jsx_runtime","ToastPrimitive","React","import_radix_ui","import_jsx_runtime","TooltipPrimitive","React","import_react","import_radix_ui","React","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","ProgressPrimitive","React","import_react","import_radix_ui","import_jsx_runtime","ToggleGroupPrimitive","ImageIcon","toggle","SliderPrimitive","React","import_jsx_runtime","React","import_jsx_runtime","React","import_react","React","import_react","import_jsx_runtime","import_jsx_runtime","React","import_react","import_radix_ui","React","import_react","import_jsx_runtime","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_radix_ui","import_jsx_runtime","ToggleGroupPrimitive","React","import_react","import_jsx_runtime","ImageIcon","React","import_radix_ui","import_jsx_runtime","ProgressPrimitive","React","import_react","import_jsx_runtime","React","import_class_variance_authority","import_jsx_runtime","React","React","import_react","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","React","import_react","import_class_variance_authority","import_jsx_runtime","React","import_react","import_jsx_runtime","next"]}