@lucian-seo/lucian-ui 0.2.0 → 0.2.2

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.
Files changed (42) hide show
  1. package/dist/lib/{Input-DzJm1Kv4.js → Input-Bv2FRGIe.js} +2 -2
  2. package/dist/lib/{Input-DzJm1Kv4.js.map → Input-Bv2FRGIe.js.map} +1 -1
  3. package/dist/lib/{Pagination-AWL5k5zG.js → Popover-Cq6yhJaK.js} +193 -132
  4. package/dist/lib/Popover-Cq6yhJaK.js.map +1 -0
  5. package/dist/lib/{Switch-DyKAqvde.js → Switch-DmKcoBT0.js} +3 -3
  6. package/dist/lib/Switch-DmKcoBT0.js.map +1 -0
  7. package/dist/lib/{Tag-Z8PjnJFt.js → Tag-CnNuj4nV.js} +2 -2
  8. package/dist/lib/{Tag-Z8PjnJFt.js.map → Tag-CnNuj4nV.js.map} +1 -1
  9. package/dist/lib/{TagInput-CeA0n7ax.js → TagInput-BcSSnJY_.js} +4 -4
  10. package/dist/lib/{TagInput-CeA0n7ax.js.map → TagInput-BcSSnJY_.js.map} +1 -1
  11. package/dist/lib/{ToggleButton-r73bokux.js → ToggleButton-CcST9ch9.js} +3 -3
  12. package/dist/lib/{ToggleButton-r73bokux.js.map → ToggleButton-CcST9ch9.js.map} +1 -1
  13. package/dist/lib/{Toolbar-DDOaxG3B.js → Toolbar-Cq2wF4Yg.js} +67 -127
  14. package/dist/lib/Toolbar-Cq2wF4Yg.js.map +1 -0
  15. package/dist/lib/{Tooltip-BW1-aVDg.js → Tooltip-1flxtzgM.js} +2 -2
  16. package/dist/lib/{Tooltip-BW1-aVDg.js.map → Tooltip-1flxtzgM.js.map} +1 -1
  17. package/dist/lib/{VisuallyHidden-DcE0EFpo.js → VisuallyHidden-Bht2-rdy.js} +16 -14
  18. package/dist/lib/VisuallyHidden-Bht2-rdy.js.map +1 -0
  19. package/dist/lib/{VoiceControlBar-lMPuJMcF.js → VoiceControlBar-iWzq7jiw.js} +1769 -1505
  20. package/dist/lib/VoiceControlBar-iWzq7jiw.js.map +1 -0
  21. package/dist/lib/{Waveform-EahaE6uD.js → Waveform-CtI9GetQ.js} +3 -3
  22. package/dist/lib/Waveform-CtI9GetQ.js.map +1 -0
  23. package/dist/lib/components/common/Badge/Badge.d.ts +1 -9
  24. package/dist/lib/components/common/Glass/Glass.d.ts +1 -3
  25. package/dist/lib/components/common/index.js +5 -5
  26. package/dist/lib/components/composed/index.js +3 -3
  27. package/dist/lib/components/derived/index.js +3 -3
  28. package/dist/lib/components/extended/DataGrid/DataGrid.clipboard.d.ts +2 -0
  29. package/dist/lib/components/extended/DataGrid/DataGrid.d.ts +6 -0
  30. package/dist/lib/components/extended/DataGrid/DataGrid.features.d.ts +2 -0
  31. package/dist/lib/components/extended/index.js +1 -1
  32. package/dist/lib/index.js +12 -12
  33. package/dist/lib/styles.css +1 -1
  34. package/dist/lib/tokens.css +29 -34
  35. package/docs/DATAGRID.md +111 -1
  36. package/package.json +1 -1
  37. package/dist/lib/Pagination-AWL5k5zG.js.map +0 -1
  38. package/dist/lib/Switch-DyKAqvde.js.map +0 -1
  39. package/dist/lib/Toolbar-DDOaxG3B.js.map +0 -1
  40. package/dist/lib/VisuallyHidden-DcE0EFpo.js.map +0 -1
  41. package/dist/lib/VoiceControlBar-lMPuJMcF.js.map +0 -1
  42. package/dist/lib/Waveform-EahaE6uD.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Popover-Cq6yhJaK.js","names":[],"sources":["../../src/foundation/focus.ts","../../src/components/composed/Disclosure/Disclosure.tsx","../../src/components/composed/Field/Field.tsx","../../src/components/composed/Menu/scope.tsx","../../src/components/composed/Menu/Menu.tsx","../../src/components/composed/Pagination/Pagination.tsx","../../src/components/composed/Popover/Popover.tsx"],"sourcesContent":["/*\n * 스스로를 지우는 컨트롤이 초점을 데려가지 않게 합니다.\n *\n * 닫기 버튼은 자기가 닫는 것 안에 있습니다. 눌러서 그것이 사라지면 눌린 버튼도 함께\n * 사라지고 초점은 `<body>`로 떨어집니다 — 다음 Tab이 문서 처음부터 다시 시작한다는\n * 뜻이고, 키보드로 읽던 사람은 있던 자리를 통째로 잃습니다.\n *\n * `FilterBar`와 `BulkActionBar`는 자기가 살아남으므로 사라진 뒤에 효과를 돌려 해결했지만,\n * `Callout`이나 `QuantityStepper`처럼 자기가 통째로 사라지는 것은 그 방법을 쓸 수 없습니다.\n * 그래서 아직 붙어 있는 동안 갈 곳을 찾아 두고, 한 프레임 뒤에 **정말 사라졌는지** 보고\n * 옮깁니다.\n *\n * 「정말 사라졌는지」가 핵심입니다. 호출부가 콜백을 무시해 아직 화면에 있으면 초점은\n * 눌린 버튼에 그대로 있고, 그때 초점을 옮기는 것은 무례한 짓입니다. `<body>`에 있을\n * 때만 옮깁니다 — `FilterBar`가 같은 이유로 같은 검사를 합니다.\n */\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\nfunction focusables(): HTMLElement[] {\n return [...document.querySelectorAll<HTMLElement>(FOCUSABLE)].filter(\n (node) => !node.closest('[aria-hidden=\"true\"]') && node.offsetParent !== null,\n );\n}\n\n/**\n * `leaving`이 사라진 뒤 초점이 갈 자리를 지금 정해 두고, 옮기는 일을 돌려줍니다.\n *\n * 문서 순서에서 그 요소 **뒤**의 첫 초점 가능한 것, 없으면 **앞**의 마지막 것입니다.\n * 뒤를 먼저 보는 이유는 목록에서 한 줄을 지우면 읽던 자리가 다음 줄로 이어지기\n * 때문이고, 마지막 줄을 지웠을 때만 앞으로 돌아갑니다.\n *\n * 돌려받은 것을 `onDismiss`·`onRemove`를 부른 **뒤에** 호출합니다.\n */\nexport function handOffFocus(leaving: HTMLElement | null): () => void {\n if (!leaving) return () => {};\n\n const all = focusables();\n const inside = (node: HTMLElement) => leaving.contains(node);\n const after = all.find((node) => !inside(node) && leaving.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING);\n const before = [...all].reverse().find((node) => !inside(node) && leaving.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_PRECEDING);\n const target = after ?? before ?? null;\n\n return () => {\n if (!target) return;\n /* 한 프레임 뒤. 그 사이에 호출부가 지웠는지 아닌지가 정해집니다. */\n requestAnimationFrame(() => {\n const now = document.activeElement;\n if (now && now !== document.body) return;\n if (!target.isConnected) return;\n target.focus();\n });\n };\n}\n","import type { ReactNode } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./Disclosure.css\";\n\nexport type DisclosureProps = {\n summary: ReactNode;\n children: ReactNode;\n /** Open to begin with. Uncontrolled — the element keeps its own state. */\n defaultOpen?: boolean;\n /** Controlled, for an accordion that allows only one open at a time. */\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n icon?: LucideIcon;\n /** The end of the summary row — a count, a badge, a status. Never a control. */\n aside?: ReactNode;\n /** No border and no ground, for a run of them inside something that already has both. */\n plain?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A heading that opens.\n *\n * A real `<details>` and `<summary>`, which is the whole point. The element gives the\n * expanded state to assistive technology without an `aria-expanded` to keep in sync, works\n * with the keyboard on its own, and — the part that is hard to rebuild — lets the browser's\n * find-in-page open it to show a match that is inside it. A `<div>` with a click handler\n * hides that text from Ctrl+F entirely.\n */\nexport function Disclosure({\n summary,\n children,\n defaultOpen,\n open,\n onOpenChange,\n icon,\n aside,\n plain,\n className,\n ...rest\n}: DisclosureProps) {\n /*\n * Controlled means the element does not toggle itself.\n *\n * `<details>` is not an input: React cannot hold its `open` attribute, so the browser flips\n * it on click and React puts it back on the next render. Left to `onToggle`, that reset\n * fires a *second* toggle — and in a one-open-at-a-time accordion the section being closed\n * reports \"closed\" and clears the state for the one that was just opened, so everything\n * ends up shut. Intercepting the click is what makes `open` mean what it says.\n */\n const controlled = open !== undefined;\n\n return (\n <details\n {...rest}\n className={`disclosure ${className ?? \"\"}`.trim()}\n data-plain={plain ? \"\" : undefined}\n open={open ?? defaultOpen}\n /*\n * Controlled or not, what the element ends up doing is reported.\n *\n * The click is intercepted below, but that is not the only way this opens: find-in-page\n * opens a closed `<details>` to show the match, and nothing tells React. State stayed\n * closed while the DOM stayed open, and the next click — computing `!open` from the\n * stale state — asked for the state it already had, so the section could not be closed\n * again. Reporting the element's own `open` back keeps the two in step.\n */\n onToggle={(event) => {\n const now = (event.currentTarget as HTMLDetailsElement).open;\n if (controlled && now === open) return;\n onOpenChange?.(now);\n }}\n >\n <summary\n className=\"disclosure__summary\"\n onClick={\n controlled\n ? (event) => {\n event.preventDefault();\n onOpenChange?.(!open);\n }\n : undefined\n }\n >\n <Icon icon={ChevronDown} size=\"sm\" className=\"disclosure__chevron\" />\n {icon ? <Icon icon={icon} size=\"sm\" className=\"disclosure__icon\" /> : null}\n <span className=\"disclosure__label\">{summary}</span>\n {aside ? <span className=\"disclosure__aside\">{aside}</span> : null}\n </summary>\n <div className=\"disclosure__body\">{children}</div>\n </details>\n );\n}\n\nexport type AccordionProps = {\n children: ReactNode;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A run of disclosures.\n *\n * It does not enforce \"one open at a time\", and that is deliberate: closing a section a\n * reader opened, because they opened another one, is the behaviour people complain about\n * most in an accordion. An adopter who wants it holds the state and passes `open` to each —\n * `Disclosure` takes it — and then it is their decision rather than one this component made\n * for every use of it.\n */\nexport function Accordion({ children, className, ...rest }: AccordionProps) {\n return (\n <div {...rest} className={`accordion ${className ?? \"\"}`.trim()}>\n {children}\n </div>\n );\n}\n","import { useId } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./Field.css\";\n\nexport type FieldSize = \"sm\" | \"md\" | \"lg\";\nexport type FieldLayout = \"stacked\" | \"inline\";\n\n/**\n * What a control needs in order to be part of a field.\n *\n * Handed to `children` rather than pushed onto them. The alternative — cloning the child and\n * writing these in — works until the child is wrapped in anything at all, and then it fails\n * silently: the label points at nothing and nobody notices, because the field still looks\n * right.\n */\nexport type FieldControl = {\n id: string;\n /** The visible label, said a second way — see where this is handed over below. */\n \"aria-labelledby\": string;\n /** The hint, the error, or both, in the order a reader should hear them. */\n \"aria-describedby\": string | undefined;\n \"aria-invalid\": true | undefined;\n required: boolean | undefined;\n invalid: boolean;\n};\n\ntype FieldBase = {\n label: ReactNode;\n children: (field: FieldControl) => ReactNode;\n /** How to fill it in. Said before the reader starts, not after they get it wrong. */\n hint?: ReactNode;\n /** What is wrong with it. Announced when it appears, because it appears after a submit. */\n error?: ReactNode;\n size?: FieldSize;\n layout?: FieldLayout;\n /** The label leaves the screen and stays in the accessibility tree. */\n labelHidden?: boolean;\n id?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * Required or optional, never both.\n *\n * A field wearing an asterisk *and* the word \"선택\" tells the reader two opposite things at\n * once, and nothing stopped it: the two flags are answers to the same question, so the type\n * makes them exclusive.\n *\n * `optional` says \"선택\" instead of marking the required ones — the right choice when most of\n * a form is required, because marking eleven fields and leaving one unmarked makes the\n * exception the thing that is hard to find.\n */\nexport type FieldProps = FieldBase &\n ({ required?: boolean; optional?: never } | { required?: never; optional?: boolean });\n\n/**\n * A control, and everything a reader needs in order to answer it.\n *\n * The wiring is handed to `children` as a function rather than cloned onto them, because a\n * label that points at nothing looks exactly like a label that works.\n */\nexport function Field({\n label,\n children,\n hint,\n error,\n required,\n optional,\n size = \"md\",\n layout = \"stacked\",\n labelHidden,\n id,\n className,\n ...rest\n}: FieldProps) {\n const generated = useId();\n const fieldId = id ?? generated;\n const labelId = `${fieldId}-label`;\n const hintId = `${fieldId}-hint`;\n const errorId = `${fieldId}-error`;\n const invalid = Boolean(error);\n\n /*\n * The error first. `aria-describedby` is read in the order the ids are listed, not in\n * document order, and a reader who has just failed to submit needs the problem before the\n * instructions they already read once.\n */\n const describedBy = [invalid ? errorId : null, hint ? hintId : null].filter(Boolean).join(\" \");\n\n return (\n <div\n {...rest}\n className={`field ${className ?? \"\"}`.trim()}\n data-size={size}\n data-layout={layout}\n data-invalid={invalid ? \"\" : undefined}\n data-label-hidden={labelHidden ? \"\" : undefined}\n >\n <div className=\"field__head\">\n <label className=\"field__label\" id={labelId} htmlFor={fieldId}>\n {labelHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n {/* An asterisk is a punctuation mark to a screen reader, and some skip it entirely.\n * The word is there for them and the mark is there for everyone else; `required`\n * on the control is what actually carries the state. */}\n {required && !labelHidden ? (\n <span className=\"field__required\" aria-hidden=\"true\">*</span>\n ) : null}\n {required ? <VisuallyHidden> (필수)</VisuallyHidden> : null}\n </label>\n {optional && !labelHidden ? <span className=\"field__optional\">선택</span> : null}\n {/* Same trade as `required` above: the visible word has nowhere to sit when the label\n * is hidden, so the spoken one carries it alone. Without this the fact that a field\n * is optional simply disappeared for anyone not looking at the screen. */}\n {optional && labelHidden ? <VisuallyHidden>(선택)</VisuallyHidden> : null}\n </div>\n\n {hint ? (\n <p className=\"field__hint\" id={hintId}>\n {hint}\n </p>\n ) : null}\n\n <div className=\"field__control\">\n {children({\n id: fieldId,\n /*\n * The `<label for>` above already names the control, and this says the same thing a\n * second way. It is here for the controls that carry a name of their own — `Combobox`\n * and `DatePicker` write an `aria-label`, which outranks a `<label>` and would leave\n * the visible words and the spoken ones free to disagree. They stand down when this\n * arrives.\n */\n \"aria-labelledby\": labelId,\n \"aria-describedby\": describedBy || undefined,\n \"aria-invalid\": invalid || undefined,\n required: required || undefined,\n invalid,\n })}\n </div>\n\n {/*\n * Mounted whether or not there is an error, and empty when there is not.\n *\n * A live region that appears at the same moment as its text announces nothing in\n * several screen readers — the region has to be there first for the change to be a\n * change. This is why an error that arrives after a failed submit is heard at all.\n */}\n <p className=\"field__error\" id={errorId} aria-live=\"polite\" data-part=\"error\">\n {error}\n </p>\n </div>\n );\n}\n","import { cloneElement, forwardRef, useLayoutEffect, useState, type ReactElement, type ReactNode, type Ref } from \"react\";\n\nconst ATTRIBUTES = [\"data-theme\", \"data-brand\", \"data-density\", \"data-radius\", \"data-look\"] as const;\ntype Scope = Record<(typeof ATTRIBUTES)[number], string | undefined>;\n\n/** Preserve built-in variation scopes without copying computed paint or moving the portal. */\nexport function useMenuScopes() {\n const [trigger, setTrigger] = useState<HTMLElement | null>(null);\n const [scopes, setScopes] = useState<Scope[]>([]);\n useLayoutEffect(() => {\n if (!trigger) return;\n const ancestors: HTMLElement[] = [];\n // body and html already contain the portal. Keep empty levels so attribute changes do\n // not change the wrapper tree and remount a focused menu.\n for (let node: HTMLElement | null = trigger; node && node !== trigger.ownerDocument.body; node = node.parentElement) {\n ancestors.unshift(node);\n }\n const read = () => setScopes(ancestors.map((node) => ({\n \"data-theme\": node.getAttribute(\"data-theme\") ?? undefined,\n \"data-brand\": node.getAttribute(\"data-brand\") ?? undefined,\n \"data-density\": node.getAttribute(\"data-density\") ?? undefined,\n \"data-radius\": node.getAttribute(\"data-radius\") ?? undefined,\n \"data-look\": node.getAttribute(\"data-look\") ?? undefined,\n })));\n read();\n const observer = new MutationObserver(read);\n for (const node of ancestors) observer.observe(node, { attributes: true, attributeFilter: [...ATTRIBUTES] });\n return () => observer.disconnect();\n }, [trigger]);\n return { scopes, setTrigger };\n}\n\nexport const MenuPortalScope = forwardRef<HTMLDivElement, {\n scopes: Scope[];\n children: ReactElement<{ ref?: Ref<HTMLDivElement> }>;\n}>(function MenuPortalScope({ scopes, children }, ref) {\n return scopes.reduceRight<ReactNode>((content, scope, index) => (\n <div key={index} className=\"menu__scope\"\n data-theme={scope[\"data-theme\"]}\n data-brand={scope[\"data-brand\"]}\n data-density={scope[\"data-density\"]}\n data-radius={scope[\"data-radius\"]}\n data-look={scope[\"data-look\"]}\n >{content}</div>\n // Radix Presence must observe the animated panel, not a display:contents wrapper.\n ), cloneElement(children, { ref }));\n});\n","import type { ReactElement, ReactNode } from \"react\";\nimport * as RadixMenu from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport { MenuPortalScope, useMenuScopes } from \"./scope\";\nimport \"./Menu.css\";\n\nexport type MenuSide = \"top\" | \"right\" | \"bottom\" | \"left\";\nexport type MenuAlign = \"start\" | \"center\" | \"end\";\n\nexport type MenuProps = {\n /** The control that opens it. One element, and it must be able to take focus. */\n children: ReactElement;\n /** `MenuItem`, `MenuGroup`, `MenuSeparator` and friends. */\n items: ReactNode;\n side?: MenuSide;\n align?: MenuAlign;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /**\n * Locks the trigger.\n *\n * `Button` and `IconButton` mark themselves `aria-disabled` and stop their own `onClick`,\n * and Radix opens on `pointerdown` and `keydown` — so a disabled-looking trigger still\n * opened the menu. Passed here, Radix refuses both.\n */\n disabled?: boolean;\n /** The panel's `id`, for a trigger that points at it with `aria-controls`. */\n id?: string;\n className?: string;\n};\n\n/**\n * A list of actions, opened from a control.\n *\n * Radix rather than hand-rolled. A menu is the control with the most keyboard behaviour of\n * anything in this library: type-ahead, arrow keys that stop at either end, Home and End, submenus that\n * open on hover behind a safe triangle and on ArrowRight, ArrowLeft closing one level and\n * Escape closing all of them, focus returned to the trigger, and the whole page made inert\n * while it is up. Rebuilt by hand, one of those is always missing.\n *\n * Not a `<select>`. A menu performs actions; a select chooses a value and submits it with a\n * form. If the thing being pointed at is a value, it is `Select` or `SegmentedControl`.\n *\n * There is no `label` prop, and there was one until it turned out not to work. The menu is\n * named by its trigger — `aria-labelledby` pointing at the button, which takes precedence\n * over any `aria-label` written beside it — and that is the right name anyway: a reader who\n * opened \"보기 설정\" is in the 보기 설정 menu. What it means is that the trigger has to be\n * named well, which for an icon-only one `IconButton` already requires.\n */\nexport function Menu({\n children,\n items,\n side = \"bottom\",\n align = \"start\",\n open,\n onOpenChange,\n disabled,\n id,\n className,\n}: MenuProps) {\n const { scopes, setTrigger } = useMenuScopes();\n return (\n <RadixMenu.Root open={open} onOpenChange={onOpenChange}>\n <RadixMenu.Trigger ref={setTrigger} asChild disabled={disabled}>{children}</RadixMenu.Trigger>\n <RadixMenu.Portal>\n <MenuPortalScope scopes={scopes}>\n {/*\n * The id is spread conditionally rather than written as `id={id}`. Radix sets its own\n * content id first and ours lands after it, so passing `undefined` deleted the id the\n * trigger's `aria-controls` was already pointing at.\n */}\n <RadixMenu.Content\n {...(id ? { id } : null)}\n className={`menu ${className ?? \"\"}`.trim()}\n side={side}\n align={align}\n sideOffset={6}\n collisionPadding={12}\n >\n {items}\n </RadixMenu.Content>\n </MenuPortalScope>\n </RadixMenu.Portal>\n </RadixMenu.Root>\n );\n}\n\nexport type MenuItemProps = {\n children: ReactNode;\n icon?: LucideIcon;\n /** The keystroke that does the same thing. Announced with the item, not instead of it. */\n shortcut?: string;\n /**\n * The item that cannot be undone.\n *\n * Tone is never the only carrier — the label has to say what it deletes — but a destructive\n * item that looks like the five above it is one a reader picks by accident.\n */\n destructive?: boolean;\n disabled?: boolean;\n onSelect?: () => void;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nexport function MenuItem({\n children,\n icon,\n shortcut,\n destructive,\n disabled,\n onSelect,\n className,\n ...rest\n}: MenuItemProps) {\n return (\n <RadixMenu.Item\n {...rest}\n className={`menu__item ${className ?? \"\"}`.trim()}\n data-destructive={destructive ? \"\" : undefined}\n disabled={disabled}\n onSelect={onSelect}\n >\n {icon ? <Icon icon={icon} size=\"sm\" className=\"menu__icon\" /> : null}\n <span className=\"menu__label\">{children}</span>\n {shortcut ? <kbd className=\"menu__shortcut\">{shortcut}</kbd> : null}\n </RadixMenu.Item>\n );\n}\n\nexport type MenuCheckboxItemProps = {\n children: ReactNode;\n checked: boolean;\n onCheckedChange: (checked: boolean) => void;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/** A setting that stays on. Announced as checked, which a plain item is not. */\nexport function MenuCheckboxItem({\n children,\n checked,\n onCheckedChange,\n disabled,\n className,\n ...rest\n}: MenuCheckboxItemProps) {\n return (\n <RadixMenu.CheckboxItem\n {...rest}\n className={`menu__item ${className ?? \"\"}`.trim()}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n >\n <span className=\"menu__mark\" aria-hidden=\"true\">\n <RadixMenu.ItemIndicator>\n <Icon icon={Check} size=\"xs\" />\n </RadixMenu.ItemIndicator>\n </span>\n <span className=\"menu__label\">{children}</span>\n </RadixMenu.CheckboxItem>\n );\n}\n\nexport type MenuRadioGroupProps = {\n children: ReactNode;\n value: string;\n onValueChange: (value: string) => void;\n};\n\nexport function MenuRadioGroup({ children, value, onValueChange }: MenuRadioGroupProps) {\n return (\n <RadixMenu.RadioGroup value={value} onValueChange={onValueChange}>\n {children}\n </RadixMenu.RadioGroup>\n );\n}\n\nexport type MenuRadioItemProps = {\n children: ReactNode;\n value: string;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nexport function MenuRadioItem({ children, value, disabled, className, ...rest }: MenuRadioItemProps) {\n return (\n <RadixMenu.RadioItem\n {...rest}\n className={`menu__item ${className ?? \"\"}`.trim()}\n value={value}\n disabled={disabled}\n >\n <span className=\"menu__mark\" aria-hidden=\"true\">\n <RadixMenu.ItemIndicator>\n <Icon icon={Circle} size=\"xs\" className=\"menu__dot\" />\n </RadixMenu.ItemIndicator>\n </span>\n <span className=\"menu__label\">{children}</span>\n </RadixMenu.RadioItem>\n );\n}\n\nexport type MenuGroupProps = {\n children: ReactNode;\n /** A heading for the group. Announced when the reader enters it. */\n label?: string;\n};\n\nexport function MenuGroup({ children, label }: MenuGroupProps) {\n return (\n <RadixMenu.Group>\n {label ? <RadixMenu.Label className=\"menu__group-label\">{label}</RadixMenu.Label> : null}\n {children}\n </RadixMenu.Group>\n );\n}\n\nexport function MenuSeparator() {\n return <RadixMenu.Separator className=\"menu__separator\" />;\n}\n\nexport type MenuSubProps = {\n children: ReactNode;\n label: ReactNode;\n icon?: LucideIcon;\n disabled?: boolean;\n};\n\n/** A menu inside a menu. Opens on ArrowRight and on hover; ArrowLeft closes this level, Escape closes the lot. */\nexport function MenuSub({ children, label, icon, disabled }: MenuSubProps) {\n const { scopes, setTrigger } = useMenuScopes();\n return (\n <RadixMenu.Sub>\n <RadixMenu.SubTrigger ref={setTrigger} className=\"menu__item\" disabled={disabled}>\n {icon ? <Icon icon={icon} size=\"sm\" className=\"menu__icon\" /> : null}\n <span className=\"menu__label\">{label}</span>\n <Icon icon={ChevronRight} size=\"xs\" className=\"menu__chevron\" />\n </RadixMenu.SubTrigger>\n <RadixMenu.Portal>\n <MenuPortalScope scopes={scopes}>\n <RadixMenu.SubContent className=\"menu\" sideOffset={4} alignOffset={-4} collisionPadding={12}>\n {children}\n </RadixMenu.SubContent>\n </MenuPortalScope>\n </RadixMenu.Portal>\n </RadixMenu.Sub>\n );\n}\n","import { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport { useLayoutEffect, useRef, useState } from \"react\";\nimport \"./Pagination.css\";\n\nexport type PaginationProps = {\n page: number;\n pageCount: number;\n onPageChange: (page: number) => void;\n /** What is being paged. \"주문 목록\", \"검색 결과\". Names the navigation. */\n label: string;\n /** How many page numbers to show either side of the current one. */\n siblings?: number;\n /** \"1–20 / 137\" above the numbers, for a reader who wants to know how far in they are. */\n summary?: { from: number; to: number; total: number };\n size?: \"sm\" | \"md\";\n /** Reduce visible numbers to fit the actual container, keeping both arrows together. */\n responsive?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nconst range = (from: number, to: number): number[] =>\n Array.from({ length: Math.max(0, to - from + 1) }, (_, index) => from + index);\n\nconst countPages = (value: number) => Number.isFinite(value) ? Math.max(0, Math.floor(value)) : 0;\nconst currentPage = (page: number, count: number) => Math.max(1, Math.min(count || 1, Number.isFinite(page) ? Math.floor(page) : 1));\n\n/**\n * The page list, with gaps where the numbers were left out.\n *\n * Always the first and the last, always the current one and its neighbours, and an ellipsis\n * standing in for the rest. Returned as data rather than rendered here so the gaps can be\n * counted in a test.\n *\n * Always the same number of items, too — `siblings * 2 + 5`, or every page when there are\n * fewer than that. The count used to depend on where the reader was standing: four items on\n * page 1, five on page 2, seven in the middle. The list is centred in its row, so every one\n * of those changes moved the whole row sideways, and the button a reader was aiming at was\n * somewhere else by the time they reached it. Near an end the window widens instead — that\n * is where the pages the reader can use are.\n */\nexport function pageItems(page: number, pageCount: number, siblings = 1): (number | \"gap\")[] {\n pageCount = countPages(pageCount);\n page = currentPage(page, pageCount);\n siblings = Number.isFinite(siblings) ? Math.max(0, Math.min(pageCount, Math.floor(siblings))) : 1;\n const slots = siblings * 2 + 5;\n if (pageCount <= slots) return range(1, pageCount);\n\n const first = 1;\n const last = pageCount;\n /* A gap is only worth drawing when it stands for more than the one page it replaces: with\n * page 2 hidden behind an ellipsis the list is longer than the numbers it left out. */\n const gapBefore = page - siblings > first + 1;\n const gapAfter = page + siblings < last - 1;\n\n /* One `first`, one `last`, and one slot for each ellipsis actually drawn; the numbers in\n * between take whatever is left, which is what keeps the total fixed. */\n const window = slots - 2 - (gapBefore ? 1 : 0) - (gapAfter ? 1 : 0);\n\n if (!gapBefore) return [...range(first, first + window), \"gap\", last];\n if (!gapAfter) return [first, \"gap\", ...range(last - window, last)];\n return [first, \"gap\", ...range(page - siblings, page + siblings), \"gap\", last];\n}\n\n/**\n * Which page of how many.\n *\n * A `<nav>` with a name, because a page of results usually has two of these — one above the\n * table and one below — and \"navigation\" twice tells a reader nothing about either.\n *\n * Every page in the list is a button, the current one included, and `aria-current=\"page\"` is\n * what says which. Pressing the current page does nothing — there is nowhere to go — but it\n * stays a button so that pressing it is possible: as a `<span>` it left the tab order the\n * instant it was clicked, which took the focus of the reader who had just clicked it with\n * them. Their next Tab started at the top of the document, four pages from the list they\n * were walking.\n */\nexport function Pagination({\n page,\n pageCount,\n onPageChange,\n label,\n siblings = 1,\n summary,\n size = \"md\",\n responsive = true,\n className,\n ...rest\n}: PaginationProps) {\n const count = countPages(pageCount);\n const now = currentPage(page, count);\n const root = useRef<HTMLElement>(null);\n const list = useRef<HTMLUListElement>(null);\n const [capacity, setCapacity] = useState<number | null>(null);\n useLayoutEffect(() => {\n if (!responsive || !root.current || !list.current) return;\n let widest = 0;\n let stepWidth = 0;\n const measure = () => {\n const node = list.current;\n if (!node || !root.current) return;\n const style = getComputedStyle(node);\n const gap = parseFloat(style.columnGap) || 0;\n const widths = [...node.querySelectorAll<HTMLElement>(\"button, .pagination__gap\")].map(item => item.getBoundingClientRect().width);\n const nextStepWidth = node.querySelector(\".pagination__step\")?.getBoundingClientRect().width ?? 0;\n if (nextStepWidth !== stepWidth) widest = 0;\n stepWidth = nextStepWidth;\n // Collapsing the list must not shrink its estimate and expand it again.\n widest = Math.max(widest, ...widths, 1);\n const width = widest;\n setCapacity(Math.max(3, Math.floor((root.current.clientWidth + gap) / (width + gap))));\n };\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(root.current);\n for (const button of list.current.querySelectorAll(\"button\")) observer.observe(button);\n return () => observer.disconnect();\n }, [responsive, size, now, count, siblings]);\n let items = pageItems(now, count, siblings);\n if (responsive && capacity !== null && items.length + 2 > capacity) {\n items = pageItems(now, count, 0);\n if (items.length + 2 > capacity) items = count ? [now] : [];\n }\n /*\n * Nought pages is nowhere to go in either direction.\n *\n * A search that came back with no results draws no page numbers at all, and \"이전\" stayed\n * lit beside them because it only ever asked whether `page` was above 1 — a live button\n * pointing at a page that does not exist.\n */\n const nowhereBack = now <= 1 || count <= 0;\n const nowhereOn = now >= count || count <= 0;\n\n return (\n <nav\n {...rest}\n ref={root}\n className={`pagination ${className ?? \"\"}`.trim()}\n aria-label={label}\n data-size={size}\n >\n {summary ? (\n <p className=\"pagination__summary\">\n <span className=\"pagination__figures\">\n {summary.from.toLocaleString(\"ko-KR\")}–{summary.to.toLocaleString(\"ko-KR\")}\n </span>\n {\" / \"}\n <span className=\"pagination__figures\">{summary.total.toLocaleString(\"ko-KR\")}</span>\n </p>\n ) : null}\n\n <ul className=\"pagination__list\" ref={list}>\n <li>\n <button\n type=\"button\"\n className=\"pagination__step\"\n onClick={() => {\n if (nowhereBack) return;\n onPageChange(now - 1);\n }}\n /* `aria-disabled` and a refused click, the rule Button set: a control that leaves\n * the tab order takes any reader standing on it with it — and on the first page\n * that is exactly where a reader who just paged back to it is standing. */\n aria-disabled={nowhereBack || undefined}\n data-part=\"previous\"\n >\n <Icon icon={ChevronLeft} size=\"sm\" />\n <VisuallyHidden>이전 페이지</VisuallyHidden>\n </button>\n </li>\n\n {items.map((item, index) =>\n item === \"gap\" ? (\n <li key={`gap-${index}`} className=\"pagination__gap\" aria-hidden=\"true\">\n …\n </li>\n ) : (\n <li key={item}>\n {item === now ? (\n <button\n type=\"button\"\n className=\"pagination__page\"\n /* No `aria-disabled`: the page a reader is on is not a control switched\n * off, and announcing it as unavailable says the opposite of \"you are\n * here\". `aria-current` is the whole message. */\n aria-current=\"page\"\n onClick={() => undefined}\n data-part=\"current\"\n >\n <VisuallyHidden>{`${count}페이지 중 `}</VisuallyHidden>\n {item}\n </button>\n ) : (\n <button\n type=\"button\"\n className=\"pagination__page\"\n onClick={() => onPageChange(item)}\n data-part={`page-${item}`}\n >\n <VisuallyHidden>{`${item}페이지로`}</VisuallyHidden>\n <span aria-hidden=\"true\">{item}</span>\n </button>\n )}\n </li>\n ),\n )}\n\n <li>\n <button\n type=\"button\"\n className=\"pagination__step\"\n onClick={() => {\n if (nowhereOn) return;\n onPageChange(now + 1);\n }}\n aria-disabled={nowhereOn || undefined}\n data-part=\"next\"\n >\n <Icon icon={ChevronRight} size=\"sm\" />\n <VisuallyHidden>다음 페이지</VisuallyHidden>\n </button>\n </li>\n </ul>\n </nav>\n );\n}\n","import { useId } from \"react\";\nimport type { ReactElement, ReactNode } from \"react\";\nimport * as RadixPopover from \"@radix-ui/react-popover\";\nimport { X } from \"lucide-react\";\nimport { IconButton } from \"../../common/IconButton\";\nimport \"./Popover.css\";\n\nexport type PopoverSide = \"top\" | \"right\" | \"bottom\" | \"left\";\nexport type PopoverAlign = \"start\" | \"center\" | \"end\";\nexport type PopoverWidth = \"auto\" | \"sm\" | \"md\" | \"lg\";\n\nexport type PopoverProps = {\n /** The control that opens it. One element, and it must be able to take focus. */\n children: ReactElement;\n content: ReactNode;\n /**\n * What the panel is. Becomes its heading and its accessible name.\n *\n * A popover is a `dialog` to assistive technology, and a dialog with no name is announced\n * as \"dialog\" and nothing else — the reader is told they have arrived somewhere and not\n * told where.\n */\n title: string;\n /** Hide the heading from the screen and leave it as the name. */\n titleHidden?: boolean;\n description?: ReactNode;\n side?: PopoverSide;\n align?: PopoverAlign;\n width?: PopoverWidth;\n arrow?: boolean;\n /** A close button in the corner. Escape always closes it either way. */\n dismissible?: boolean;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n className?: string;\n /* Test hooks and host state, on the panel itself. Every other component here takes\n * these; the layered three were the exception. */\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A panel anchored to a control.\n *\n * Radix rather than hand-rolled, for the same reasons `Tooltip` is: collision-aware\n * positioning, portalling out of any ancestor with `overflow: hidden`, dismissal on Escape\n * and on an outside pointer, focus moved in on open and returned to the trigger on close,\n * and the rest of the page made inert to a screen reader while it is up. Every one of those\n * is a place a hand-rolled popover is wrong, and none of them shows in a screenshot.\n *\n * What this file owns is the appearance and the name.\n *\n * Not a tooltip: a tooltip describes a control in a few words and cannot be interacted with.\n * If the panel holds anything the reader can click or type into, it is this.\n */\nexport function Popover({\n children,\n content,\n title,\n titleHidden,\n description,\n side = \"bottom\",\n align = \"center\",\n width = \"md\",\n arrow = true,\n dismissible,\n open,\n defaultOpen,\n onOpenChange,\n className,\n ...rest\n}: PopoverProps) {\n const base = useId();\n\n return (\n <RadixPopover.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n <RadixPopover.Trigger asChild>{children}</RadixPopover.Trigger>\n <RadixPopover.Portal>\n <RadixPopover.Content\n {...rest}\n className={`popover ${className ?? \"\"}`.trim()}\n side={side}\n align={align}\n sideOffset={8}\n collisionPadding={12}\n data-width={width}\n aria-labelledby={`${base}-title`}\n aria-describedby={description ? `${base}-description` : undefined}\n >\n {/*\n * The head is skipped entirely when there is nothing left in it to lay out: a\n * hidden title is taken out of the flow, so the row stayed behind as an empty\n * grid track plus a gap above the body.\n */}\n <div className=\"popover__head\" data-empty={titleHidden && !dismissible ? \"\" : undefined}>\n <h2\n className=\"popover__title\"\n id={`${base}-title`}\n data-hidden={titleHidden ? \"\" : undefined}\n >\n {title}\n </h2>\n {dismissible ? (\n <RadixPopover.Close asChild>\n <IconButton icon={X} label={`${title} 닫기`} size=\"sm\" variant=\"ghost\" tone=\"neutral\" data-part=\"close\" />\n </RadixPopover.Close>\n ) : null}\n </div>\n {description ? (\n <p className=\"popover__description\" id={`${base}-description`}>\n {description}\n </p>\n ) : null}\n <div className=\"popover__body\">{content}</div>\n {arrow ? <RadixPopover.Arrow className=\"popover__arrow\" width={12} height={6} /> : null}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n </RadixPopover.Root>\n );\n}\n"],"mappings":";;;;;;;AAiBA,IAAM,IACJ;AAEF,SAAS,IAA4B;CACnC,OAAO,CAAC,GAAG,SAAS,iBAA8B,CAAS,CAAC,CAAC,CAAC,QAC3D,MAAS,CAAC,EAAK,QAAQ,wBAAsB,KAAK,EAAK,iBAAiB,IAC3E;AACF;AAWA,SAAgB,EAAa,GAAyC;CACpE,IAAI,CAAC,GAAS,aAAa,CAAC;CAE5B,IAAM,IAAM,EAAW,GACjB,KAAU,MAAsB,EAAQ,SAAS,CAAI,GACrD,IAAQ,EAAI,MAAM,MAAS,CAAC,EAAO,CAAI,KAAK,EAAQ,wBAAwB,CAAI,IAAI,KAAK,2BAA2B,GACpH,IAAS,CAAC,GAAG,CAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,MA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C,IAAc,KAAK,KAAA;KAA9E,UAAA,CACE,kBAAC,MAAD;MACE,WAAU;MACV,IAAI,GAAG,EAAK;MACZ,eAAa,IAAc,KAAK,KAAA;MAE/B,UAAA;KACC,CAAA,GACH,IACC,kBAAC,EAAa,OAAd;MAAoB,SAAA;MAClB,UAAA,kBAAC,GAAD;OAAY,MAAM;OAAG,OAAO,GAAG,EAAM;OAAM,MAAK;OAAK,SAAQ;OAAQ,MAAK;OAAU,aAAU;MAAS,CAAA;KACrF,CAAA,IAClB,IACD;;IACJ,IACC,kBAAC,KAAD;KAAG,WAAU;KAAuB,IAAI,GAAG,EAAK;KAC7C,UAAA;IACA,CAAA,IACD;IACJ,kBAAC,OAAD;KAAK,WAAU;KAAiB,UAAA;IAAa,CAAA;IAC5C,IAAQ,kBAAC,EAAa,OAAd;KAAoB,WAAU;KAAiB,OAAO;KAAI,QAAQ;IAAI,CAAA,IAAI;GAC/D;EACH,CAAA,EAAA,CAAA,CACJ;;AAEvB"}
@@ -1,5 +1,5 @@
1
- import { a as e, n as t, o as n, s as r, t as i } from "./VisuallyHidden-DcE0EFpo.js";
2
- import { r as a } from "./Tooltip-BW1-aVDg.js";
1
+ import { a as e, n as t, o as n, s as r, t as i } from "./VisuallyHidden-Bht2-rdy.js";
2
+ import { r as a } from "./Tooltip-1flxtzgM.js";
3
3
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
4
4
  import { Fragment as l, forwardRef as u, useEffect as d, useId as f, useLayoutEffect as p, useRef as m, useState as h } from "react";
5
5
  import { ArrowUpRight as g, Check as _, ChevronDown as v, Paperclip as y, X as b } from "lucide-react";
@@ -1029,4 +1029,4 @@ function ue({ children: e, size: t = "md", disabled: n, className: r, ...i }) {
1029
1029
  //#endregion
1030
1030
  export { S as A, P as C, A as D, j as E, k as O, L as S, M as T, U as _, ae as a, z as b, ne as c, X as d, Y as f, W as g, G as h, se as i, C as k, te as l, q as m, le as n, ie as o, J as p, ce as r, re as s, ue as t, Z as u, H as v, N as w, R as x, V as y };
1031
1031
 
1032
- //# sourceMappingURL=Switch-DyKAqvde.js.map
1032
+ //# sourceMappingURL=Switch-DmKcoBT0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch-DmKcoBT0.js","names":[],"sources":["../../src/components/common/AspectRatio/AspectRatio.tsx","../../src/components/common/Blockquote/Blockquote.tsx","../../src/components/common/CalibratedPulse/CalibratedPulse.tsx","../../src/components/common/Center/Center.tsx","../../src/components/common/Code/Code.tsx","../../src/components/common/Collapse/Collapse.tsx","../../src/components/common/Container/Container.tsx","../../src/components/common/Divider/Divider.tsx","../../src/components/common/FileInput/FileInput.tsx","../../src/components/common/Flex/Flex.tsx","../../src/components/common/Glass/rim.ts","../../src/components/common/Glass/Glass.tsx","../../src/components/common/Grid/Grid.tsx","../../src/components/common/Grid/GridItem.tsx","../../src/components/common/Group/Group.tsx","../../src/components/common/Mark/Mark.tsx","../../src/components/common/Highlight/Highlight.tsx","../../src/components/common/Indicator/Indicator.tsx","../../src/components/common/Kbd/Kbd.tsx","../../src/components/common/Link/Link.tsx","../../src/components/common/MultiSelect/MultiSelect.tsx","../../src/components/common/PinInput/PinInput.tsx","../../src/components/common/RingProgress/RingProgress.tsx","../../src/components/common/ScrollArea/ScrollArea.tsx","../../src/components/common/SimpleGrid/SimpleGrid.tsx","../../src/components/common/Slider/Slider.tsx","../../src/components/common/Space/Space.tsx","../../src/components/common/Stack/Stack.tsx","../../src/components/common/Switch/Switch.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport \"./AspectRatio.css\";\n\n/**\n * Named, not numeric.\n *\n * A `ratio={16 / 9}` would have to be written into a style attribute, which outranks every\n * selector and is the one place this library will not put a value. Five names cover what a\n * product surface actually uses, and a sixth is a line in a stylesheet rather than a number\n * in a call site.\n */\nexport type AspectRatioName = \"square\" | \"video\" | \"photo\" | \"wide\" | \"portrait\";\n\nexport type AspectRatioProps = {\n /** One child. It is stretched to fill the box. */\n children: ReactNode;\n ratio?: AspectRatioName;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A box whose height comes from its width.\n *\n * `aspect-ratio` in CSS, so the box is the right shape before anything inside it has loaded.\n * That is the point of it: a grid of images that reserves nothing shifts every row down as\n * each file arrives, and the reader loses the thing they were about to click.\n */\nexport function AspectRatio({ children, ratio = \"video\", className, ...rest }: AspectRatioProps) {\n return (\n <div data-ratio={ratio} {...rest} className={`aspect-ratio ${className ?? \"\"}`.trim()}>\n {children}\n </div>\n );\n}\n","import type { ReactNode } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../Icon\";\nimport \"./Blockquote.css\";\n\nexport type BlockquoteProps = {\n children: ReactNode;\n /**\n * The visible attribution — a person, a document, a date. Rendered in a `<figcaption>`\n * *outside* the quotation, which is where the HTML specification puts it: an attribution\n * inside `<blockquote>` is being quoted, and the source did not say its own name.\n */\n cite?: ReactNode;\n /**\n * The URL of the document quoted from, which becomes the `cite` **attribute**. A different\n * thing from the prop above, doing the opposite job: no browser and no screen reader\n * surfaces it, so it is machine-readable provenance and never the attribution a reader\n * sees. Giving only this one produces a quotation with no visible source.\n */\n sourceUrl?: string;\n /** An optional mark before the quotation — a quote glyph, a logo, a status. */\n icon?: LucideIcon;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n id?: string;\n};\n\n/**\n * A quotation, and the source it came from.\n *\n * Which element: `<blockquote>` alone when there is nothing to attribute, `<figure>` around a\n * `<blockquote>` and a `<figcaption>` when there is. That is not a preference — the HTML\n * specification says outright that the attribution must not go inside `<blockquote>`, and\n * names the `figure`/`figcaption` pair as the way to give one. A `<cite>` element dropped in\n * after the closing tag would leave two siblings with nothing tying them together and nothing\n * an assistive technology could use to say that this caption belongs to that quote; `figure`\n * is exactly that tie.\n *\n * The structure therefore follows the content, and the reason it can is that a `figure` with\n * no caption is a grouping that groups one thing.\n */\nexport function Blockquote({\n children,\n cite,\n sourceUrl,\n icon,\n className,\n ...rest\n}: BlockquoteProps) {\n const inner = (\n <>\n {icon ? (\n /*\n * Hidden from the accessibility tree. It names nothing and repeats nothing — a\n * quotation glyph read aloud in the middle of a quotation is noise.\n */\n <span className=\"blockquote__icon\" aria-hidden=\"true\">\n <Icon icon={icon} size=\"md\" />\n </span>\n ) : null}\n <span className=\"blockquote__body\">{children}</span>\n </>\n );\n\n if (cite === undefined) {\n return (\n <blockquote\n data-shape=\"quote\"\n {...rest}\n className={`blockquote ${className ?? \"\"}`.trim()}\n cite={sourceUrl}\n >\n {inner}\n </blockquote>\n );\n }\n\n return (\n <figure data-shape=\"figure\" {...rest} className={`blockquote ${className ?? \"\"}`.trim()}>\n <blockquote className=\"blockquote__quote\" cite={sourceUrl}>\n {inner}\n </blockquote>\n <figcaption className=\"blockquote__cite\">{cite}</figcaption>\n </figure>\n );\n}\n","import { useEffect, useState } from \"react\";\nimport type { CSSProperties } from \"react\";\nimport \"./CalibratedPulse.css\";\n\nexport type CalibratedPulseSize = \"sm\" | \"md\";\n\nexport type CalibratedPulseProps = {\n /** What is being waited for, in the reader's words. \"문서 찾는 중\". */\n label: string;\n /**\n * When things arrived, in milliseconds, oldest first.\n *\n * One clock, whichever one — only the gaps are read, so `Date.now()` and\n * `performance.now()` both work as long as they are not mixed. The events themselves are\n * the host's: this component owns the arithmetic on them and the sentence that comes out,\n * and nothing else.\n */\n events?: number[];\n /**\n * How many more arrivals are expected, if the host knows.\n *\n * A count, and it is reported as a count. See the note about the time it is not multiplied\n * into.\n */\n remaining?: number;\n size?: CalibratedPulseSize;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * How many trailing arrivals the rate is measured over.\n *\n * Long enough that one slow response does not swing it, short enough that the number still\n * describes now rather than the whole run.\n */\nconst WINDOW = 6;\n/** The beat when nothing has been measured, and the slowest it is ever drawn at. */\nconst RESTING = 2400;\n/** The fastest a beat can be drawn and still be seen as a beat rather than a flicker. */\nconst FLOOR = 220;\n/** Periods without an arrival before the rate is treated as no longer describing anything. */\nconst STALL_AFTER = 3;\n\nconst said = (period: number) => `${(period / 1000).toFixed(2)}초에 한 건`;\n\n/**\n * A beat whose speed is the speed things are actually arriving at.\n *\n * **The period comes from observed gaps and from nothing else.** It does not creep towards a\n * target, it does not accelerate because time has passed, and it does not move at all before\n * two arrivals have been seen — one timestamp cannot describe an interval. An indicator that\n * speeds up with nothing behind it is a fake progress bar that happens to be small, and a\n * spinner claiming nothing is better than that. This is the whole reason the component\n * exists: a beat is worth more than a spinner only because its speed means something.\n *\n * **Nothing arriving is a state with a picture of its own.** No events is a grey ring that\n * does not move and a sentence saying so — identical on the first frame and ten minutes\n * later, because that is what is true. The guard measures, waits, and measures again.\n *\n * **A rate that has stopped being fed stops being claimed.** After `STALL_AFTER` periods\n * with no arrival the beat falls back to resting and says it stalled, because holding the\n * last speed is promising a rate that nothing supports any more. The clock for that starts\n * when this component last *saw* an event rather than at the timestamp's own value — the\n * host's clock is unknowable and arrivals are the only thing comparable to now.\n *\n * **The floor is a limit of the eye, not a claim.** Below `FLOOR` the beat stops getting\n * faster and the written number keeps going: `0.01초에 한 건` beside a beat drawn at 220ms.\n * The honest one is the number, and the beat is only as fast as an eye can follow.\n *\n * **`remaining` is reported as a count and never multiplied into a time.** Rate × count is\n * arithmetic on two measured things and it is still a guess — arrival rates for anything\n * doing real I/O are not stationary, and the guess is worst exactly when the wait is long\n * enough for someone to care. `RunStatusCard` refused an estimate for the same reason and\n * this library does not want two answers to that question. The archive component this is\n * derived from printed the time; this is a deliberate disagreement with it.\n *\n * **The live region carries the state, not the number.** The rate changes on every arrival,\n * and a live region on a number that changes every 300ms is a screen reader that cannot be\n * got past. What is announced is what is being waited for and whether it is being measured,\n * stalled, or not yet known — the things that change rarely and that a reader needs. The\n * rate is ordinary text beside it.\n */\nexport function CalibratedPulse({\n label,\n events,\n remaining,\n size = \"md\",\n className,\n ...rest\n}: CalibratedPulseProps) {\n const seen = events?.length ?? 0;\n const last = events?.[seen - 1];\n\n /*\n * The mean gap over the trailing window. Two events is one gap and the smallest thing that\n * can be called a rate; below that there is no number, rather than a number to be careful\n * with.\n */\n const recent = events?.slice(Math.max(0, seen - WINDOW)) ?? [];\n let measured: number | undefined;\n if (recent.length >= 2) {\n const span = recent[recent.length - 1] - recent[0];\n const mean = span / (recent.length - 1);\n /* A host that hands over an unsorted or duplicated list has not given a rate either. */\n if (mean > 0) measured = mean;\n }\n\n const [stalled, setStalled] = useState(false);\n\n /*\n * The stall clock, started from the moment an arrival was *seen*.\n *\n * One timeout. It is cleared and re-armed on every arrival, so an indicator being fed\n * never schedules more than one, and there is no interval anywhere in this component —\n * the beat itself is the browser's, on a CSS animation, which is also what makes it\n * survive a tab that was in the background.\n */\n useEffect(() => {\n setStalled(false);\n if (measured === undefined) return;\n const timer = window.setTimeout(\n () => setStalled(true),\n Math.min(RESTING, Math.max(FLOOR, measured)) * STALL_AFTER,\n );\n return () => window.clearTimeout(timer);\n /*\n * Keyed on the arrivals rather than on the array, so a host that rebuilds `events` on\n * every render does not re-arm the clock sixty times a second — and the clock itself\n * starts here, when an arrival was *seen*, rather than at the timestamp's own value. The\n * host's clock is unknowable; the only thing comparable to now is that something came in.\n */\n }, [seen, last, measured]);\n\n const calibrated = measured !== undefined && !stalled;\n const period = calibrated ? Math.min(RESTING, Math.max(FLOOR, measured!)) : RESTING;\n\n /*\n * The note is what is said *instead of* a rate, so it is absent exactly when there is one.\n * That is also what makes the live region below worth having: it changes when the state\n * changes and at no other time.\n */\n const note = stalled\n ? \"들어오던 것이 멈췄습니다\"\n : measured === undefined\n ? seen === 0\n ? \"아직 들어온 것이 없습니다\"\n : \"속도는 두 건부터 나옵니다\"\n : undefined;\n\n return (\n <div\n {...rest}\n className={`calibrated-pulse ${className ?? \"\"}`.trim()}\n data-size={size}\n data-calibrated={calibrated ? \"\" : undefined}\n data-stalled={stalled ? \"\" : undefined}\n /*\n * The one value here that is not a token, and the only shape a measurement can take: a\n * continuous number the component computed, written to its own custom property, which\n * is declared in its own stylesheet. A period read out of the duration scale would be a\n * decision read out of a scale, and this one came from the data.\n */\n style={{ \"--pulse-period\": `${period}ms` } as CSSProperties}\n >\n <span className=\"calibrated-pulse__mark\" aria-hidden=\"true\" data-part=\"mark\">\n {/* Two, half a period apart, so the rhythm is legible even when it is slow. */}\n <span className=\"calibrated-pulse__wave\" />\n <span className=\"calibrated-pulse__wave\" />\n <span className=\"calibrated-pulse__ring\" data-part=\"ring\" />\n <span className=\"calibrated-pulse__core\" data-part=\"core\" />\n </span>\n\n <div className=\"calibrated-pulse__said\">\n {/*\n * The live region, and it carries the state rather than the number. `note` is\n * present only when there is no rate, so this line changes when the wait changes\n * character — nothing arriving, arriving, stopped — and stays put while arrivals are\n * coming in. A live region on the rate itself would announce every 300ms.\n */}\n <p className=\"calibrated-pulse__label\" role=\"status\" data-part=\"state\">\n {label}\n {note ? <span className=\"calibrated-pulse__note\">{` — ${note}`}</span> : null}\n </p>\n\n {calibrated || remaining !== undefined ? (\n <p className=\"calibrated-pulse__rate\" data-part=\"rate\">\n {/*\n * The written number is the measured mean, not the beat. Below the floor the\n * beat stops getting faster and this keeps going — the honest one is the number.\n */}\n {calibrated ? <span data-part=\"period\">{said(measured!)}</span> : null}\n {calibrated && remaining !== undefined ? <span aria-hidden=\"true\"> · </span> : null}\n {remaining !== undefined ? (\n <span data-part=\"remaining\">{remaining}건 남음</span>\n ) : null}\n </p>\n ) : null}\n </div>\n </div>\n );\n}\n","import type { ElementType, ReactNode } from \"react\";\nimport \"./Center.css\";\n\nexport type CenterProps = {\n children?: ReactNode;\n as?: ElementType;\n /** `inline-grid` instead of `grid`, for a box that sits in a line of text. */\n inline?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * One thing in the middle of its box, on both axes.\n *\n * `place-items: center` rather than the flex pair, because a grid centres a child that has no\n * intrinsic size the same way it centres one that does — and because the two-axis case is the\n * only case this component has. Anything with a direction, a gap or a wrap is `Flex`.\n *\n * It centres within the height it is given and does not invent one. A `Center` in normal flow\n * is as tall as its child, so the vertical half of the job is only visible once something\n * outside has said how tall the box is.\n */\nexport function Center({\n children,\n as: Element = \"div\",\n inline,\n className,\n ...rest\n}: CenterProps) {\n return (\n <Element\n data-inline={inline ? \"\" : undefined}\n {...rest}\n className={`center ${className ?? \"\"}`.trim()}\n >\n {children}\n </Element>\n );\n}\n","import { useEffect, useRef, useState } from \"react\";\nimport type { ElementType, ReactNode } from \"react\";\nimport \"./Code.css\";\n\nexport type CodeProps = {\n children: ReactNode;\n /**\n * A block instead of a fragment. `false` renders `<code>` inside the sentence; `true`\n * renders `<pre><code>`, which is the only pair that preserves the newlines and the runs\n * of spaces a listing is made of.\n */\n block?: boolean;\n /**\n * The outer element. Defaults to `code` inline and `pre` in block mode. Replacing the\n * block root with something that is not a `pre` drops the element's own `white-space`\n * default, and the newlines go with it.\n */\n as?: ElementType;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n id?: string;\n title?: string;\n};\n\n/**\n * A fragment of code, in the monospaced face.\n *\n * `--font-mono` is a token this repository already ships, so the family is read rather than\n * named here; nothing in this component knows a font name.\n *\n * Block mode scrolls sideways rather than wrapping, and that scroller is focusable *while it\n * has something to scroll to*. A region that scrolls and cannot be focused is a region a\n * keyboard cannot scroll — WCAG 2.1.1 — and Chromium does not make one focusable on its own\n * the way Firefox does. A block that fits, though, is a stop that goes nowhere: the comment\n * here used to say \"focusable only when it can scroll\" while the code read `block ? 0 :\n * undefined`, and a listing that fitted in its box took a tab press all the same. `ScrollArea`\n * had already settled the measurement; this follows it.\n */\nexport function Code({\n children,\n block = false,\n as: Element,\n className,\n ...rest\n}: CodeProps) {\n const Root = Element ?? (block ? \"pre\" : \"code\");\n const rootRef = useRef<HTMLElement>(null);\n const [overflowing, setOverflowing] = useState(false);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!block || !root) return;\n\n /*\n * One pixel of slack, for the same reason `ScrollArea` leaves one: sub-pixel layout\n * reports a scroll extent a hundredth wider than the client box on boxes that do not\n * scroll at all.\n */\n const measure = () => setOverflowing(root.scrollWidth - root.clientWidth > 1);\n\n const resize = new ResizeObserver(measure);\n const observeAll = () => {\n resize.disconnect();\n resize.observe(root);\n for (const child of Array.from(root.children)) resize.observe(child);\n measure();\n };\n observeAll();\n\n const mutate = new MutationObserver(observeAll);\n mutate.observe(root, { childList: true, subtree: true, characterData: true });\n\n return () => {\n resize.disconnect();\n mutate.disconnect();\n };\n }, [block]);\n\n return (\n <Root\n ref={rootRef}\n data-block={block ? \"\" : undefined}\n data-overflowing={block && overflowing ? \"\" : undefined}\n /*\n * A stop only while there is something to scroll to. An inline fragment never gets one:\n * every fragment in a paragraph would be one more press between the reader and the next\n * control.\n */\n tabIndex={block && overflowing ? 0 : undefined}\n {...rest}\n className={`code ${className ?? \"\"}`.trim()}\n >\n {block ? <code className=\"code__text\">{children}</code> : children}\n </Root>\n );\n}\n","import type { ReactNode } from \"react\";\nimport \"./Collapse.css\";\n\nexport type CollapseAxis = \"block\" | \"inline\";\n\nexport type CollapseProps = {\n children: ReactNode;\n /** Required. The component has no state of its own and never opens itself. */\n open: boolean;\n axis?: CollapseAxis;\n /** So the control that opens this can point at it with `aria-controls`. */\n id?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A box that measures to nothing and back.\n *\n * The height half of a disclosure, with no summary row and no state. `composed/Disclosure`\n * is a real `<details>`: it owns its trigger, reports expanded state without an\n * `aria-expanded` to keep in sync, and lets find-in-page open it to show a match inside.\n * This is a `<div>` driven by a prop, so it has none of that — the caller draws the trigger,\n * wires `aria-expanded` and `aria-controls`, and closed content is not findable. It exists\n * for the cases `<details>` cannot be: a panel opened by something that is not next to it, a\n * row that reveals itself when a filter matches, a sidebar that measures sideways.\n *\n * Closed content leaves the tab order and the accessibility tree. A collapsed box that is\n * merely zero pixels tall still holds focusable controls, and a reader tabbing past it lands\n * on a button they cannot see.\n */\nexport function Collapse({ children, open, axis = \"block\", id, className, ...rest }: CollapseProps) {\n return (\n <div\n id={id}\n data-axis={axis}\n data-open={open ? \"\" : undefined}\n {...rest}\n className={`collapse ${className ?? \"\"}`.trim()}\n >\n {/*\n * A second box, and it is not decoration. `content-visibility: hidden` is what takes\n * the closed content out of the tab order, and it brings size containment with it — on\n * the root, that would make the open size measure as zero and there would be nothing to\n * travel to. The root sizes; this one disappears.\n */}\n <div className=\"collapse__content\">{children}</div>\n </div>\n );\n}\n","import type { ElementType, ReactNode } from \"react\";\nimport \"./Container.css\";\n\n/**\n * The widths `src/foundation/grid.css` knows about, and no others.\n *\n * `xl` is the base rule there rather than an attribute selector, so `data-width=\"xl\"` matches\n * nothing and is still written out: the attribute is how a reader and a test see which width\n * was asked for, and an unwritten default is a default nobody can check.\n */\nexport type ContainerWidth = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"prose\" | \"full\";\n\nexport type ContainerProps = {\n children?: ReactNode;\n as?: ElementType;\n width?: ContainerWidth;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * The page measure, as a component.\n *\n * Every rule it renders under lives in `src/foundation/grid.css`: the max-width per\n * `data-width`, the auto inline margins, and the gutter that widens at 768px. This file adds\n * an element and an attribute and nothing else, on purpose — a second copy of `max-width:\n * var(--container-lg)` is a second place for that number to change, and the two copies would\n * not change together.\n */\nexport function Container({\n children,\n as: Element = \"div\",\n width = \"xl\",\n className,\n ...rest\n}: ContainerProps) {\n return (\n <Element data-width={width} {...rest} className={`container ${className ?? \"\"}`.trim()}>\n {children}\n </Element>\n );\n}\n","import type { ReactNode } from \"react\";\nimport \"./Divider.css\";\n\nexport type DividerOrientation = \"horizontal\" | \"vertical\";\nexport type DividerTone = \"default\" | \"strong\";\nexport type DividerSpacing = \"none\" | \"sm\" | \"md\" | \"lg\";\n\ntype DividerBase = {\n tone?: DividerTone;\n spacing?: DividerSpacing;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/*\n * A label belongs to a horizontal rule only, and the type says so.\n *\n * A vertical rule is one pixel wide. Given a label it kept that width and painted the text\n * out of the box and over whatever stood beside it: \"왼쪽 | 또는 오른쪽\" came out as\n * \"왼쪽 또 오른쪽 는\", with the rule itself invisible under the letters. Nothing failed and\n * nothing warned. The demo carried a sentence about it, which is a note a reader finds after\n * they have already shipped the overlap.\n *\n * Splitting the props means the combination cannot be written. `orientation=\"vertical\"` with\n * children stops compiling, and the sentence in the demo becomes a rule the compiler holds.\n */\nexport type DividerProps =\n | (DividerBase & {\n orientation?: \"horizontal\";\n /** A label sitting in the rule, which turns it from a separator into a heading of sorts. */\n children?: ReactNode;\n })\n | (DividerBase & {\n orientation: \"vertical\";\n children?: never;\n });\n\n/**\n * A rule between things.\n *\n * `role=\"separator\"` when it is only a rule, and a plain box when it carries a label —\n * because a separator with a name is announced as a separator called \"or\", which is not what\n * the label is for. With text it is a group whose text reads in place.\n */\nexport function Divider(props: DividerProps) {\n const {\n orientation = \"horizontal\",\n tone = \"default\",\n spacing = \"md\",\n children,\n className,\n ...rest\n } = props as DividerBase & { orientation?: DividerOrientation; children?: ReactNode };\n const labelled = children !== undefined && children !== null && children !== false;\n\n return (\n <div\n {...rest}\n className={`divider ${className ?? \"\"}`.trim()}\n data-orientation={orientation}\n data-tone={tone}\n data-spacing={spacing}\n data-labelled={labelled ? \"\" : undefined}\n role={labelled ? undefined : \"separator\"}\n aria-orientation={labelled ? undefined : orientation}\n >\n {labelled ? <span className=\"divider__label\">{children}</span> : null}\n </div>\n );\n}\n","import { useId, useLayoutEffect, useRef, useState } from \"react\";\nimport type { ChangeEvent } from \"react\";\nimport { Paperclip, X } from \"lucide-react\";\nimport { Icon } from \"../Icon\";\nimport { IconButton } from \"../IconButton\";\nimport \"./FileInput.css\";\n\nexport type FileInputSize = \"sm\" | \"md\" | \"lg\";\n\nexport type FileInputProps = {\n /** What has been picked. The component never holds a file this does not name. */\n value: File[];\n onValueChange: (files: File[]) => void;\n /** What is being collected. \"이력서\". Names the field. */\n label: string;\n /** The `accept` attribute's syntax — `.pdf`, `image/*`, `application/pdf`. */\n accept?: string;\n multiple?: boolean;\n /** The largest file this takes, in bytes. */\n maxSize?: number;\n size?: FileInputSize;\n disabled?: boolean;\n invalid?: boolean;\n id?: string;\n /** The field's name in the form. The native input carries it, so the form submits the files. */\n name?: string;\n /** What the field says while nothing is picked. */\n placeholder?: string;\n /* `Field` hands these down. They belong on the input — the thing that takes the focus —\n * and not on the wrapper `div` the rest of the props land on. A hint tied to a `div` is a\n * hint no reader ever hears. */\n \"aria-describedby\"?: string;\n \"aria-labelledby\"?: string;\n required?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * Whether a file matches an `accept` list, by the rules the attribute itself uses.\n *\n * Three forms and no others: `.pdf` against the end of the name, `image/*` against the start\n * of the type, and a full type against the whole of it. The picker already applies these, and\n * this is what lets the component say *why* a file the picker let through — one dragged onto\n * the input, or one whose extension the platform did not filter — was refused.\n */\nfunction permitted(accept: string | undefined, file: File) {\n const patterns = (accept ?? \"\").split(\",\").map((entry) => entry.trim().toLowerCase()).filter(Boolean);\n if (patterns.length === 0) return true;\n const name = file.name.toLowerCase();\n const type = file.type.toLowerCase();\n return patterns.some((pattern) => {\n if (pattern.startsWith(\".\")) return name.endsWith(pattern);\n if (pattern.endsWith(\"/*\")) return type.startsWith(pattern.slice(0, -1));\n return type === pattern;\n });\n}\n\nconst UNITS = [\"B\", \"KB\", \"MB\", \"GB\"];\n\n/** Bytes as a reader says them. \"2.4MB\", not \"2516582\". */\nexport function fileSizeText(bytes: number) {\n let value = bytes;\n let unit = 0;\n while (value >= 1024 && unit < UNITS.length - 1) {\n value /= 1024;\n unit += 1;\n }\n return `${unit === 0 ? value : Number(value.toFixed(1))}${UNITS[unit]}`;\n}\n\n/**\n * One line in a form that holds files.\n *\n * **The native `<input type=\"file\">` is the value.** It is clipped out of sight but stays in\n * the tab order and stays the form's field, so `name` submits, the space bar opens the picker\n * and assistive technology announces the control the platform gave it. The visible row is a\n * `<label>` over it. The common alternative — a `<div>` with a click handler calling\n * `input.click()` — looks identical and is reachable by exactly one input device.\n *\n * **What `value` says, the input holds.** Every change writes a `DataTransfer` list back into\n * the element, so a file removed from the list is also removed from what the form submits.\n * Without that the reader deletes a row and the server still receives the file.\n *\n * **A refused file says why it was refused.** `accept` and `maxSize` are rules, and a rule\n * that silently drops a file leaves the reader pressing the same button again with the same\n * file. The reason is written into a live region, so it is heard and not only seen.\n *\n * Not `Dropzone`. That one is a wide area to drag onto, and it draws upload progress and\n * per-file results. This is a control the height of a text field that sits in a form beside\n * the other fields.\n */\nexport function FileInput({\n value,\n onValueChange,\n label,\n accept,\n multiple,\n maxSize,\n size = \"md\",\n disabled,\n invalid,\n id,\n name,\n placeholder = \"선택된 파일 없음\",\n \"aria-describedby\": describedBy,\n \"aria-labelledby\": labelledBy,\n required,\n className,\n ...rest\n}: FileInputProps) {\n const base = useId();\n const fieldId = id ?? `${base}-input`;\n const field = useRef<HTMLInputElement>(null);\n const [refused, setRefused] = useState<string[]>([]);\n\n /*\n * The element is kept in step with `value` rather than trusted to hold it.\n *\n * Restore every render, including when the host rejects a change and keeps the same array.\n * The picker writes the element and the caller writes `value`, and the two part company the\n * moment a row is removed: the reader sees three files, the form sends four. `DataTransfer`\n * is the only way to build a `FileList` by hand, because `input.files` takes nothing else.\n */\n useLayoutEffect(() => {\n const node = field.current;\n if (!node || typeof DataTransfer === \"undefined\") return;\n const carrier = new DataTransfer();\n for (const file of value) carrier.items.add(file);\n node.files = carrier.files;\n });\n\n const take = (event: ChangeEvent<HTMLInputElement>) => {\n const offered = Array.from(event.target.files ?? []);\n const why: string[] = [];\n const kept = offered.filter((file) => {\n if (!permitted(accept, file)) {\n why.push(`${file.name} — 받지 않는 형식입니다. ${accept}만 받습니다`);\n return false;\n }\n if (maxSize !== undefined && file.size > maxSize) {\n why.push(`${file.name} — ${fileSizeText(maxSize)}를 넘습니다. 이 파일은 ${fileSizeText(file.size)}입니다`);\n return false;\n }\n return true;\n });\n setRefused(why);\n onValueChange(multiple ? kept : kept.slice(0, 1));\n };\n\n /* The focus goes back to the input, not nowhere. Removing the last file unmounts the button\n * the reader is standing on, and a keyboard reader whose focus falls to `<body>` has to walk\n * the page from the top again. */\n const drop = (index: number) => {\n onValueChange(value.filter((_, at) => at !== index));\n setRefused([]);\n field.current?.focus();\n };\n\n const summary =\n value.length === 0 ? placeholder : value.length === 1 ? value[0].name : `${value.length}개 선택됨`;\n\n return (\n <div\n data-size={size}\n data-invalid={invalid ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n data-empty={value.length === 0 ? \"\" : undefined}\n {...rest}\n className={`file-input ${className ?? \"\"}`.trim()}\n >\n {/* The whole row opens the picker, because the whole row is the label of the input\n * inside it. The list below sits outside, so pressing a remove button is not also a\n * press on the label. */}\n <label className=\"file-input__field\" htmlFor={fieldId} data-part=\"field\">\n <input\n ref={field}\n id={fieldId}\n name={name}\n type=\"file\"\n className=\"file-input__native\"\n accept={accept}\n multiple={multiple}\n disabled={disabled}\n required={required}\n aria-invalid={invalid || undefined}\n /* `aria-label` outranks a visible `<label>`, so it stands down when `Field` has\n * already pointed one at this input. */\n aria-label={labelledBy ? undefined : label}\n aria-labelledby={labelledBy}\n aria-describedby={describedBy}\n onChange={take}\n data-part=\"native\"\n />\n <span className=\"file-input__button\" aria-hidden=\"true\" data-part=\"button\">\n <Icon icon={Paperclip} size=\"sm\" />\n 파일 선택\n </span>\n <span className=\"file-input__summary\" aria-hidden=\"true\" data-part=\"summary\">\n {summary}\n </span>\n </label>\n\n {/*\n * Mounted whether or not anything was refused, and empty when nothing was.\n *\n * A live region that appears at the same moment as its text announces nothing in\n * several screen readers — the region has to be there first for the change to be a\n * change. `:empty` is what keeps the blank one from taking a line.\n */}\n <p className=\"file-input__refused\" role=\"alert\" data-part=\"refused\">\n {refused.join(\" · \")}\n </p>\n\n {value.length > 0 ? (\n <ul className=\"file-input__files\" data-part=\"files\">\n {value.map((file, index) => (\n <li className=\"file-input__file\" key={`${file.name}-${index}`} data-part={`file-${index}`}>\n <span className=\"file-input__name\">{file.name}</span>\n <span className=\"file-input__size\">{fileSizeText(file.size)}</span>\n {!disabled ? (\n <IconButton\n icon={X}\n label={`${file.name} 지우기`}\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n onClick={() => drop(index)}\n data-part={`remove-${index}`}\n />\n ) : null}\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n );\n}\n","import type { ElementType, ReactNode } from \"react\";\nimport type { LayoutGap } from \"../Stack\";\nimport \"./Flex.css\";\n\nexport type FlexDirection = \"row\" | \"column\" | \"row-reverse\" | \"column-reverse\";\nexport type FlexAlign = \"start\" | \"center\" | \"end\" | \"baseline\" | \"stretch\";\nexport type FlexJustify = \"start\" | \"center\" | \"end\" | \"between\" | \"around\";\n\nexport type FlexProps = {\n children: ReactNode;\n /** The main axis. The two reversed values change paint order, not DOM order. */\n direction?: FlexDirection;\n /** A step on the spacing scale. Follows the page density, because `--space-*` does. */\n gap?: LayoutGap;\n /** The cross axis. */\n align?: FlexAlign;\n /** The main axis. */\n justify?: FlexJustify;\n wrap?: boolean;\n as?: ElementType;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * The escape hatch: a flex container whose axis is a prop.\n *\n * `Stack` and `Group` are the two arrangements this library has an opinion about, and they\n * carry that opinion in their defaults. `Flex` has none — it is here so that the one layout a\n * quarter that is neither of those does not become a hand-written stylesheet, which is the\n * failure this whole set was built against.\n *\n * The two reversed directions reorder what is painted and not what is read. A keyboard walks\n * the DOM, so a reversed row hands the reader the last control first; use it for a visual\n * mirror of an order the markup already has, never to reorder controls.\n */\nexport function Flex({\n children,\n direction = \"row\",\n gap = 4,\n align = \"stretch\",\n justify = \"start\",\n wrap = false,\n as: Element = \"div\",\n className,\n ...rest\n}: FlexProps) {\n return (\n <Element\n data-direction={direction}\n data-gap={gap}\n data-align={align}\n data-justify={justify}\n data-wrap={wrap ? \"wrap\" : \"nowrap\"}\n {...rest}\n className={`flex ${className ?? \"\"}`.trim()}\n >\n {children}\n </Element>\n );\n}\n","import { useEffect, type RefObject } from \"react\";\n\n/**\n * The specular rim, following the pointer.\n *\n * `FOUNDATION.md` already names a `정반사 림` — the fixed bright edge the glass look paints\n * with `--surface-bevel`. This does not add one. It moves the one that is there, which is what\n * Apple calls a specular highlight and `docs/GLASS.md` calls Edge Light.\n *\n * It is DECORATION, and `DESIGN.md` 2절 is the reason there is a word for that here. It\n * carries no fact. The pane says exactly as much with it as without, and the proof is that it\n * vanishes on a touch screen and nothing is lost. `VISUAL-INTERACTION-PLAN.md` 10절 derives\n * what else may live under that dial; the answer so far is nothing else.\n *\n * Three refusals are built in, and each is a rule rather than a taste:\n *\n * A COARSE POINTER gets nothing. A finger has no hover, and a `pointermove` from one leaves\n * the highlight stuck wherever the last tap was — a light with no light source.\n *\n * REDUCED MOTION gets nothing. This is not an infinite animation, so rule 6 does not fold\n * it; it tracks the reader's own hand one to one. But a reader who asked for less movement\n * did not ask for an exception, and the fixed rim is already the whole of what the pane\n * needs to look like glass.\n *\n * OUTSIDE THE GLASS LOOK nothing is drawn, and that is enforced in `Glass.css` rather\n * than here. The first version read `--surface-lens` at mount and bailed, which is the\n * same trap `useRefraction` fell into: the look is a root attribute a reader flips long\n * after the pane mounted, so an effect that reads it once and never runs again is an\n * effect that is wrong for the rest of the session. The hook reports coordinates; the\n * stylesheet decides whether a coordinate means anything.\n *\n * The coordinates are written with `setProperty` rather than through a `style` prop, and that\n * is the same category the rule allows rather than an exception to it: a custom property\n * decides no paint, so an adopter's stylesheet still wins. What it avoids is forty renders a\n * second. `--sheet-drag` can afford to be React state because a drag is one gesture; a\n * pointer crossing a pane is not.\n */\nexport function usePointerRim(pane: RefObject<HTMLElement | null>, on: boolean) {\n useEffect(() => {\n const element = pane.current;\n if (!element || !on) return;\n if (typeof matchMedia === \"undefined\") return;\n if (!matchMedia(\"(hover: hover) and (pointer: fine)\").matches) return;\n if (matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n\n let x = 0;\n let y = 0;\n let frame = 0;\n\n /* Read in the frame that paints, not in the event. A pointer reports faster than the\n * screen redraws, and the reads in here force layout. */\n const paint = () => {\n frame = 0;\n const box = element.getBoundingClientRect();\n if (box.width === 0 || box.height === 0) return;\n element.style.setProperty(\"--rim-x\", `${(((x - box.left) / box.width) * 100).toFixed(2)}%`);\n element.style.setProperty(\"--rim-y\", `${(((y - box.top) / box.height) * 100).toFixed(2)}%`);\n element.style.setProperty(\"--rim-lit\", \"1\");\n };\n\n const move = (event: PointerEvent) => {\n if (event.pointerType !== \"mouse\") return;\n x = event.clientX;\n y = event.clientY;\n if (!frame) frame = requestAnimationFrame(paint);\n };\n\n /* Not just unlit — the coordinates go back to the middle. Leaving them where the pointer\n * left means the next entry begins with the light already in the wrong corner and slides\n * across, which reads as the pane having been lit the whole time it was not. */\n const leave = () => {\n if (frame) cancelAnimationFrame(frame);\n frame = 0;\n element.style.setProperty(\"--rim-lit\", \"0\");\n element.style.removeProperty(\"--rim-x\");\n element.style.removeProperty(\"--rim-y\");\n };\n\n element.addEventListener(\"pointermove\", move);\n element.addEventListener(\"pointerleave\", leave);\n element.addEventListener(\"pointercancel\", leave);\n return () => {\n if (frame) cancelAnimationFrame(frame);\n element.removeEventListener(\"pointermove\", move);\n element.removeEventListener(\"pointerleave\", leave);\n element.removeEventListener(\"pointercancel\", leave);\n leave();\n };\n }, [pane, on]);\n}\n","import { forwardRef, useRef, type CSSProperties, type ReactNode, type Ref } from \"react\";\nimport { useComposedRef, useRefraction } from \"./refraction\";\nimport { usePointerRim } from \"./rim\";\nimport \"./Glass.css\";\n\nexport type GlassRadius = \"md\" | \"lg\" | \"xl\";\n\nexport type GlassProps = {\n children?: ReactNode;\n /** @deprecated Kept for compatibility; every value now uses the shared component radius. */\n radius?: GlassRadius;\n /**\n * Lights the edge under the pointer.\n *\n * Off by default and it stays that way. This is the library's only decoration — it says\n * nothing the pane does not already say, and `DESIGN.md` 2절 is where that is allowed to\n * be a reason rather than a defect. Turn it on where the surface is the subject: a hero,\n * a marketing panel, a specimen. Not in a table.\n */\n rim?: boolean;\n className?: string;\n ref?: Ref<HTMLDivElement>;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A pane that is glass on purpose.\n *\n * `Card`, `Input` and the outline `Button` become glass when the page does, because they read\n * `--surface` and the look redefines it. This is for the panes that are glass whatever the\n * page is — a floating panel over a picture, a control bar over a scene — and it is also the\n * plainest place to look at what the lens does, next to a pane that does not have one.\n *\n * The bending itself lives in `useRefraction`, which any surface can call. See the note there\n * for why it cannot be a token.\n */\nexport const Glass = forwardRef<HTMLDivElement, GlassProps>(function Glass({ children, radius = \"lg\", rim, className, ...rest }: GlassProps, ref) {\n const pane = useRef<HTMLDivElement>(null);\n const lens = useRefraction(pane);\n const hold = useComposedRef(pane, ref);\n usePointerRim(pane, Boolean(rim));\n\n return (\n <div\n ref={hold}\n data-radius={radius}\n data-rim={rim ? \"\" : undefined}\n {...rest}\n className={[\"glass\", className].filter(Boolean).join(\" \")}\n style={lens ? ({ \"--glass-refraction\": lens } as CSSProperties) : undefined}\n >\n {children}\n </div>\n );\n});\n","import type { ElementType, ReactNode } from \"react\";\nimport \"./Grid.css\";\n\n/**\n * The column counts `src/foundation/grid.css` enumerates. Five and seven are not on the list\n * because nothing in twelve divides by them, and a field that cannot be halved or thirded is\n * a field every span has to be measured against by hand.\n */\nexport type GridColumns = 1 | 2 | 3 | 4 | 6 | 12;\n\nexport type GridProps = {\n children?: ReactNode;\n as?: ElementType;\n columns?: GridColumns;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * The twelve-column field, as a component.\n *\n * Every rule is `src/foundation/grid.css`'s `.grid`: the template, the gutter, the wider\n * gutter from 768px, and the `min-width: 0` that keeps one long unbreakable string from\n * pushing the other cells off the page. Nothing is restated here.\n *\n * There is no `gap` prop. The gutter is the grid's, not the caller's — two grids on one page\n * with different gutters do not read as one field, and that is the whole reason a page has a\n * gutter rather than a spacing decision per grid.\n */\nexport function Grid({\n children,\n as: Element = \"div\",\n columns = 12,\n className,\n ...rest\n}: GridProps) {\n return (\n <Element data-columns={columns} {...rest} className={`grid ${className ?? \"\"}`.trim()}>\n {children}\n </Element>\n );\n}\n","import type { ElementType, ReactNode } from \"react\";\nimport \"./Grid.css\";\n\nexport type GridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport type GridItemProps = {\n children?: ReactNode;\n as?: ElementType;\n /** Columns spanned at every width, unless a wider one takes over below. */\n span?: GridSpan;\n /** From 768px up. */\n spanMd?: GridSpan;\n /** From 1024px up. */\n spanLg?: GridSpan;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A cell in the twelve-column field.\n *\n * Mobile-first, which is the foundation's shape and not a choice made here: `span` applies at\n * every width, `spanMd` takes over from 768px and `spanLg` from 1024px. There is no `sm` step\n * because `span` is already the narrow-width value — and note that the field stays twelve\n * columns all the way down, so a `span` of 4 is a quarter of 360px too. Narrow widths are\n * `span={12}` written out, not something the grid does on its own. There is no start-column\n * prop either, because `grid.css` enumerates spans and not positions.\n *\n * It renders no class of its own. The foundation selects `.grid > [data-span]`, so a cell is\n * a cell by virtue of the attribute and its parent, and anything else the caller puts in\n * `className` survives untouched.\n */\nexport function GridItem({\n children,\n as: Element = \"div\",\n span,\n spanMd,\n spanLg,\n className,\n ...rest\n}: GridItemProps) {\n return (\n <Element\n data-span={span}\n data-span-md={spanMd}\n data-span-lg={spanLg}\n {...rest}\n className={className}\n >\n {children}\n </Element>\n );\n}\n","import type { ElementType, ReactNode } from \"react\";\nimport type { LayoutGap } from \"../Stack\";\nimport \"./Group.css\";\n\nexport type GroupAlign = \"start\" | \"center\" | \"end\" | \"baseline\" | \"stretch\";\nexport type GroupJustify = \"start\" | \"center\" | \"end\" | \"between\" | \"around\";\n\nexport type GroupProps = {\n children: ReactNode;\n /** A step on the spacing scale. Follows the page density, because `--space-*` does. */\n gap?: LayoutGap;\n /** The block axis — how items of unequal height line up against each other. */\n align?: GroupAlign;\n /** The inline axis — how the free space is distributed. */\n justify?: GroupJustify;\n /**\n * Wrapping is on by default, and turning it off is a decision about what happens when the\n * row runs out of room: it overflows.\n */\n wrap?: boolean;\n /** Children share the free space equally, whatever their content width. */\n grow?: boolean;\n as?: ElementType;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A horizontal row with one gap between its children.\n *\n * Wrapping is the default because the alternative fails invisibly. A row that cannot wrap\n * does not report that it ran out of room — it draws past its container, and the first thing\n * anyone hears about it is a page that scrolls sideways on a phone. Wrapping is the outcome\n * that stays legible at every width, so it is what a caller gets without asking.\n *\n * `align` defaults to `center` rather than `stretch`: a row is usually a button beside a\n * label beside a badge, and stretching a badge to the height of a button is never what was\n * meant.\n */\nexport function Group({\n children,\n gap = 3,\n align = \"center\",\n justify = \"start\",\n wrap = true,\n grow,\n as: Element = \"div\",\n className,\n ...rest\n}: GroupProps) {\n return (\n <Element\n data-gap={gap}\n data-align={align}\n data-justify={justify}\n data-wrap={wrap ? \"wrap\" : \"nowrap\"}\n data-grow={grow ? \"\" : undefined}\n {...rest}\n className={`group ${className ?? \"\"}`.trim()}\n >\n {children}\n </Element>\n );\n}\n","import type { ElementType, ReactNode } from \"react\";\nimport \"./Mark.css\";\n\n/**\n * The tones that exist as a *ground*.\n *\n * The token layer publishes each energy four times — the fill, the ink on that fill, the ink\n * on a neutral ground, and `--x-subtle`, a tinted ground. Only the last of those is a\n * background a paragraph's own text colour can still be read on, so those are the four names\n * this component takes. `--accent` and its kind are fills; a fill under body text is a\n * contrast failure in the light theme and an unreadable one in the dark.\n */\nexport type MarkTone = \"accent\" | \"success\" | \"warning\" | \"danger\";\n\nexport type MarkProps = {\n children: ReactNode;\n /** Default `warning` — the amber tint, which is what a reader already reads as a marker. */\n tone?: MarkTone;\n as?: ElementType;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n id?: string;\n title?: string;\n};\n\n/**\n * A run of text marked as relevant.\n *\n * The element is `mark`, and what `mark` is worth to assistive technology is worth writing\n * down: ARIA gives it a `mark` role, Chromium and WebKit expose it, and most screen readers\n * announce nothing for it unless the reader has turned that on. VoiceOver on Safari is the\n * exception. So in practice the tint is the whole message, and a tint is a colour.\n *\n * This component therefore refuses to be the only carrier of meaning by construction: it\n * renders exactly the text it was given, and the caller who needs the highlight to *mean*\n * something says so in words next to it. `Highlight` is the case where it does not have to —\n * a search term is already on the screen in the search field, so the tint is a locator\n * rather than a claim.\n */\nexport function Mark({\n children,\n tone = \"warning\",\n as: Element = \"mark\",\n className,\n ...rest\n}: MarkProps) {\n return (\n <Element data-tone={tone} {...rest} className={`mark ${className ?? \"\"}`.trim()}>\n {children}\n </Element>\n );\n}\n","import { Fragment } from \"react\";\nimport { Mark, type MarkTone } from \"../Mark\";\nimport \"./Highlight.css\";\n\nexport type HighlightProps = {\n /**\n * A string, and only a string. Marking a run inside arbitrary children would mean walking\n * a React tree and rebuilding it, and the rebuild loses element identity, keys and state.\n * The component that needs that is a different component.\n */\n children: string;\n /**\n * What to mark. A string, or several. An empty string, a whitespace-only string and an\n * empty array all mean \"mark nothing\" — not \"mark everything\", which is what a naive\n * regular expression built from `\"\"` does.\n */\n query: string | string[];\n tone?: MarkTone;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n id?: string;\n};\n\nexport type HighlightPart = { text: string; matched: boolean };\n\n/** Every character `RegExp` gives a meaning to, made literal. */\nconst escape = (value: string) => value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\n/**\n * Split `value` into matched and unmatched runs.\n *\n * Exported so a caller can reuse the matching without the markup, and so the rules below can\n * be tested as rules rather than as rendered output:\n *\n * - every term is escaped, so `c++` and `a.b` match themselves and `(` is not a syntax\n * error thrown from render;\n * - matching is case-insensitive, because a search field that finds `Seoul` for `seoul`\n * and then highlights nothing has told the reader the match was somewhere else;\n * - blank terms are dropped before the pattern is built. `new RegExp(\"()\", \"g\")` matches\n * the empty string at every position, and `String.split` on it returns every character\n * as its own chunk with every other one \"matched\";\n * - terms are sorted longest-first, which is what decides overlaps. The alternation `a|b`\n * is ordered, so with `[\"로그\", \"로그인\"]` the shorter term would win at the same start\n * position and `인` would be left outside the mark. Longest-first marks `로그인`.\n *\n * Not handled, and it is a real limit rather than an oversight: Hangul is compared as\n * composed syllables and nothing is normalised. `ㄱ` does not match `가`, a decomposed\n * `NFD` string does not match its composed form, and the half-typed syllable an IME is still\n * composing is not a term this will find. A search box that highlights while the user is\n * mid-composition therefore flickers, and the fix belongs in the field — commit the term on\n * `compositionend`, not on every keystroke.\n */\nexport function highlightParts(value: string, query: string | string[]): HighlightPart[] {\n const terms = (Array.isArray(query) ? query : [query])\n .filter((term) => term.trim().length > 0)\n .sort((a, b) => b.length - a.length)\n .map(escape);\n\n if (terms.length === 0) return [{ text: value, matched: false }];\n\n // The capture group is what makes `split` return the separators as well as the gaps, so\n // the matched runs arrive at the odd indices.\n const pattern = new RegExp(`(${terms.join(\"|\")})`, \"gi\");\n return value\n .split(pattern)\n .map((text, index) => ({ text, matched: index % 2 === 1 }))\n .filter((part) => part.text.length > 0);\n}\n\n/**\n * A string with the searched-for run marked.\n *\n * This is the one place where a tint alone is allowed to carry the message, and the reason\n * is that it is not carrying one: the reader typed the term, the term is still in the field,\n * and the mark says where — not what. `Mark` on its own is the case that needs words.\n *\n * `SearchInput`, `Combobox` and `CommandPalette` do not do this today. They filter, and the\n * row that survives the filter says nothing about which part of it matched; on a long label\n * the reader re-reads the whole row to find out. Composing this into their option rows is\n * the intended use, and the reason `children` is typed as a string is that their labels are.\n */\nexport function Highlight({\n children,\n query,\n tone = \"warning\",\n className,\n ...rest\n}: HighlightProps) {\n const parts = highlightParts(children, query);\n\n return (\n <span {...rest} className={`highlight ${className ?? \"\"}`.trim()}>\n {parts.map((part, index) =>\n part.matched ? (\n <Mark key={index} tone={tone}>\n {part.text}\n </Mark>\n ) : (\n /*\n * A fragment, not a `span`. Wrapping the unmatched runs would put an element\n * boundary either side of every match, and a browser is free to break a line at\n * one — so a marked word could be pushed onto its own line for no visible reason.\n */\n <Fragment key={index}>{part.text}</Fragment>\n ),\n )}\n </span>\n );\n}\n","import type { ReactNode } from \"react\";\nimport { VisuallyHidden } from \"../VisuallyHidden\";\nimport \"./Indicator.css\";\n\nexport type IndicatorPosition = \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\";\nexport type IndicatorTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n/**\n * The shape of what the mark is hung on, which is the only thing that decides where the\n * corner actually is.\n *\n * Two values rather than a number of pixels: a number would have to be recomputed for every\n * avatar size, and it would have to reach the element as an inline style, which no component\n * in this library writes. The circle's anchor is a percentage of the box, so one value fits\n * every size.\n */\nexport type IndicatorTarget = \"square\" | \"circle\";\n\nexport type IndicatorProps = {\n /** What the mark is attached to — an avatar, an icon button, a tab. */\n children: ReactNode;\n /**\n * Required, and it is the whole meaning. The mark on screen is decoration; this is the\n * sentence a screen reader gets, so it says what is being reported and, where the number\n * matters, how many. \"읽지 않은 알림 3개\" — not \"3\".\n */\n label: string;\n count?: number;\n /** Above this the mark reads `99+`. Default 99. */\n max?: number;\n position?: IndicatorPosition;\n /** Rectangles hang the mark on the box corner; a circle needs it pulled in to its edge. */\n target?: IndicatorTarget;\n tone?: IndicatorTone;\n /** A mark with no number, for a state that is on or off. */\n dot?: boolean;\n /** No mark and no label. The children are untouched. */\n hidden?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A mark on the corner of something, and the words that say what it means.\n *\n * The dot carries no meaning at all: it is a coloured shape, `aria-hidden`, and a reader who\n * cannot see it gets nothing from it. `label` is the component's only carrier of meaning,\n * which is why it is required rather than derived from `count` — \"3\" is not information, and\n * a number the component composed into a sentence would be a sentence in one language.\n *\n * There is no live region here, deliberately. This mark sits on a control the reader is\n * about to use, and a count that announces itself interrupts whatever they are reading to\n * say a number changed somewhere on the page. A change worth interrupting for is announced\n * where it happened, by the thing that knows why.\n */\nexport function Indicator({\n children,\n label,\n count,\n max = 99,\n position = \"top-end\",\n target = \"square\",\n tone = \"accent\",\n dot,\n hidden,\n className,\n ...rest\n}: IndicatorProps) {\n /*\n * No number means a dot, and `dot` means a dot whatever the number is. `count` is still\n * free to be 0: the component renders what it was handed, and hiding a zero silently would\n * make \"nothing to report\" and \"the prop never arrived\" the same picture.\n */\n const shape = dot || count === undefined ? \"dot\" : \"count\";\n const display = count === undefined ? null : count > max ? `${max}+` : String(count);\n\n return (\n <span\n data-position={position}\n data-target={target}\n data-tone={tone}\n data-hidden={hidden ? \"\" : undefined}\n {...rest}\n className={`indicator ${className ?? \"\"}`.trim()}\n >\n {children}\n {hidden ? null : (\n <>\n <span className=\"indicator__mark\" data-shape={shape} aria-hidden=\"true\">\n {shape === \"count\" ? display : null}\n </span>\n <VisuallyHidden>{label}</VisuallyHidden>\n </>\n )}\n </span>\n );\n}\n","import type { ElementType, ReactNode } from \"react\";\nimport \"./Kbd.css\";\n\nexport type KbdSize = \"sm\" | \"md\";\n\nexport type KbdProps = {\n /** The key's name, as it is printed on the key: `⌘`, `Shift`, `Esc`, `K`. */\n children: ReactNode;\n size?: KbdSize;\n /**\n * The element rendered. `kbd` is the default because that is what the element means, and\n * a shortcut written with a `span` is a shortcut no user agent can tell from prose.\n */\n as?: ElementType;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n id?: string;\n title?: string;\n};\n\n/**\n * One key, drawn as a key.\n *\n * It renders a single key and nothing else — no separator, no combination. A combination is\n * several of these with the joining character written between them, because the joiner is\n * prose the caller chooses (`+`, a space, nothing at all in the Apple convention) and a\n * component that picked one would be wrong in every house that picked the other.\n *\n * `⌘` and `⌥` are symbols, not words. Most screen readers either say nothing for them or\n * read a character name that is not the key's name, so a shortcut that exists only as\n * symbols is a shortcut some readers never hear. The answer is not inside this component:\n * the caller pairs the symbol with a spelled-out name, either by hiding the symbols from the\n * accessibility tree and exposing words next to them, or by labelling the control that owns\n * the shortcut. See the demo.\n */\nexport function Kbd({\n children,\n size = \"md\",\n as: Element = \"kbd\",\n className,\n ...rest\n}: KbdProps) {\n return (\n <Element\n data-size={size}\n {...rest}\n className={`kbd ${className ?? \"\"}`.trim()}\n >\n {children}\n </Element>\n );\n}\n","import type { ReactNode } from \"react\";\nimport { ArrowUpRight } from \"lucide-react\";\nimport { Icon } from \"../Icon\";\nimport { VisuallyHidden } from \"../VisuallyHidden\";\nimport \"./Link.css\";\n\nexport type LinkTone = \"accent\" | \"inherit\" | \"muted\";\nexport type LinkUnderline = \"always\" | \"hover\" | \"never\";\n\nexport type LinkProps = {\n children: ReactNode;\n href: string;\n tone?: LinkTone;\n underline?: LinkUnderline;\n /**\n * Opens elsewhere.\n *\n * Adds the mark, `rel=\"noreferrer\"`, and — the part that gets forgotten — a note in the\n * accessible name. A reader who cannot see the arrow is otherwise not told that following\n * this link takes them out of the page they were on.\n */\n external?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nexport function Link({\n children,\n href,\n tone = \"accent\",\n underline = \"always\",\n external,\n className,\n ...rest\n}: LinkProps) {\n return (\n <a\n {...rest}\n className={`link ${className ?? \"\"}`.trim()}\n href={href}\n data-tone={tone}\n data-underline={underline}\n data-external={external ? \"\" : undefined}\n target={external ? \"_blank\" : undefined}\n rel={external ? \"noreferrer\" : undefined}\n >\n {children}\n {external ? (\n <>\n <Icon icon={ArrowUpRight} size=\"xs\" className=\"link__mark\" />\n {/* The arrow is the visible half; this is the other one. Reusing the component\n rather than repeating the clip pattern, so there is one place it can be wrong. */}\n <VisuallyHidden>(새 창)</VisuallyHidden>\n </>\n ) : null}\n </a>\n );\n}\n","import { useEffect, useId, useRef, useState } from \"react\";\nimport type { KeyboardEvent } from \"react\";\nimport * as RadixPopover from \"@radix-ui/react-popover\";\nimport { Check, ChevronDown, X } from \"lucide-react\";\nimport { Icon } from \"../Icon\";\nimport { useListbox } from \"../Select/listbox\";\nimport { VisuallyHidden } from \"../VisuallyHidden\";\nimport \"./MultiSelect.css\";\n\nexport type MultiSelectSize = \"sm\" | \"md\" | \"lg\";\n\nexport type MultiSelectOption = {\n value: string;\n label: string;\n /** A second line under the label — a team, a code, a count. */\n description?: string;\n disabled?: boolean;\n};\n\nexport type MultiSelectProps = {\n options: MultiSelectOption[];\n value: string[];\n onValueChange: (value: string[]) => void;\n /** What is being chosen. \"관심 분야\". Names the field. */\n label: string;\n placeholder?: string;\n /** How many may be held at once. Reached, the rest of the list stops being choosable. */\n max?: number;\n /** Whether typing narrows the list. Off, the field is read-only and the arrows walk it. */\n searchable?: boolean;\n size?: MultiSelectSize;\n disabled?: boolean;\n invalid?: boolean;\n id?: string;\n /** The field's name in the form. One hidden input per chosen value, the way a multiple\n * `<select>` submits. */\n name?: string;\n /** What to say when nothing matches. */\n emptyMessage?: string;\n /* `Field` hands these down. They belong on the input — the thing that takes the focus —\n * and not on the wrapper `div` the rest of the props land on. */\n \"aria-describedby\"?: string;\n \"aria-labelledby\"?: string;\n required?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\nconst matches = (option: MultiSelectOption, query: string) =>\n option.label.toLowerCase().includes(query.toLowerCase()) ||\n (option.description ?? \"\").toLowerCase().includes(query.toLowerCase());\n\n/**\n * A field that holds more than one answer.\n *\n * **It is `Combobox` with a list of answers instead of one**, and it keeps that component's\n * rules rather than inventing its own: the focus stays in the input, the list is walked with\n * `aria-activedescendant`, the arrows step over what cannot be chosen, and an Enter arriving\n * mid-composition belongs to the input method and not to this component.\n *\n * **What is held is shown as chips, and Backspace takes the last one off.** The chip's remove\n * button carries the 24×24 floor itself rather than inheriting the chip's height — the same\n * fix `Tag` made, and for the same reason: a floor written on the chip is a floor the thing\n * that is actually pressed does not have.\n *\n * **`max` locks the rest of the list rather than hiding it.** A list that shortens as you\n * choose is a list that moves under the pointer, and the reader cannot tell whether the option\n * they were about to press is gone or was never there.\n */\nexport function MultiSelect({\n options,\n value,\n onValueChange,\n label,\n placeholder,\n max,\n searchable = true,\n size = \"md\",\n disabled,\n invalid,\n id,\n name,\n emptyMessage = \"맞는 것이 없습니다\",\n \"aria-describedby\": describedBy,\n \"aria-labelledby\": labelledBy,\n required,\n className,\n ...rest\n}: MultiSelectProps) {\n const base = useId();\n const fieldId = id ?? `${base}-input`;\n const listId = `${base}-list`;\n\n const field = useRef<HTMLInputElement>(null);\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n // The text is a search query; required validation belongs to the selected values.\n useEffect(() => {\n field.current?.setCustomValidity(required && value.length === 0 ? `${label} 항목을 선택하세요` : \"\");\n }, [required, value.length, label]);\n\n const held = new Set(value);\n const full = max !== undefined && value.length >= max;\n\n const found = options.filter((option) => (open && query ? matches(option, query) : true));\n /* Locked, not only disabled: at `max` everything not already held is out of reach, and the\n * arrows have to agree with the pointer about that. */\n const locked = (option: MultiSelectOption) => Boolean(option.disabled) || (full && !held.has(option.value));\n\n const optionId = (option: MultiSelectOption) => `${base}-option-${option.value}`;\n\n const rows = useListbox({ rows: found, locked, id: optionId });\n const { active, setActive } = rows;\n /* A value with no option behind it still shows. Options arriving later than the value is\n * ordinary — a saved answer rendered before the list loads — and dropping the chip makes the\n * reader think their answer was lost. */\n const chips = value.map(\n (one) => options.find((option) => option.value === one) ?? { value: one, label: one },\n );\n\n const toggle = (option: MultiSelectOption) => {\n if (held.has(option.value)) {\n onValueChange(value.filter((one) => one !== option.value));\n } else {\n if (locked(option)) return;\n onValueChange([...value, option.value]);\n }\n /* The list stays open. Choosing one of several and being closed out means reopening the\n * list for every answer. */\n setQuery(\"\");\n field.current?.focus();\n };\n\n const remove = (one: string) => {\n onValueChange(value.filter((kept) => kept !== one));\n field.current?.focus();\n };\n\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (disabled) return;\n /* The Enter that commits a Korean syllable is the same key event as the Enter that takes\n * a row. Composing means the reader is still spelling a word. */\n if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n\n if (event.key === \"Backspace\" && query === \"\" && value.length > 0) {\n event.preventDefault();\n onValueChange(value.slice(0, -1));\n return;\n }\n\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n if (!open) {\n setActive(0);\n setOpen(true);\n return;\n }\n rows.move(event.key === \"ArrowDown\" ? 1 : -1);\n return;\n }\n\n if (!open) return;\n\n if (event.key === \"Enter\") {\n const option = rows.activeRow;\n if (option) {\n event.preventDefault();\n toggle(option);\n }\n return;\n }\n\n /*\n * Escape is not handled here. The popover already dismisses on it, and a second handler\n * clearing the query first produced two behaviours racing in one keystroke.\n */\n\n if (event.key === \"Home\" || event.key === \"End\") {\n event.preventDefault();\n if (event.key === \"Home\") rows.first();\n else rows.last();\n }\n };\n\n return (\n <RadixPopover.Root open={open && !disabled} onOpenChange={setOpen}>\n <div\n data-size={size}\n data-invalid={invalid ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n data-full={full ? \"\" : undefined}\n {...rest}\n className={`multi-select ${className ?? \"\"}`.trim()}\n >\n {/* One per value, the way a multiple `<select>` submits: repeated names, not a joined\n * string the server has to guess the separator of. */}\n {name ? value.map((one) => <input key={one} type=\"hidden\" name={name} value={one} disabled={disabled} />) : null}\n {/* Read-only search fields are barred from native constraint validation. */}\n {required && !searchable ? <VisuallyHidden><input\n type=\"text\" value={value.length > 0 ? \"selected\" : \"\"} required disabled={disabled}\n onChange={() => undefined} tabIndex={-1} aria-hidden=\"true\"\n onInvalid={(event) => { event.preventDefault(); field.current?.focus(); }}\n /></VisuallyHidden> : null}\n\n <RadixPopover.Anchor asChild>\n <div\n className=\"multi-select__field\"\n /* The empty part of the box belongs to the input. Clicking it and getting nothing\n * is the field saying it is not a field. */\n onMouseDown={(event) => {\n if (event.target !== event.currentTarget || disabled) return;\n event.preventDefault();\n field.current?.focus();\n setOpen(true);\n }}\n data-part=\"field\"\n >\n {chips.map((chip) => (\n <span className=\"multi-select__chip\" key={chip.value} data-part={`chip-${chip.value}`}>\n <span className=\"multi-select__chip-text\">{chip.label}</span>\n {!disabled ? (\n <button\n type=\"button\"\n className=\"multi-select__chip-remove\"\n aria-label={`${chip.label} 제거`}\n /* `onMouseDown` with the default prevented: without it the press blurs the\n * input, which shuts the list, and the click then lands on a button that\n * has moved. */\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => remove(chip.value)}\n data-part={`remove-${chip.value}`}\n >\n <Icon icon={X} size=\"xs\" />\n </button>\n ) : null}\n </span>\n ))}\n\n <input\n ref={field}\n id={fieldId}\n className=\"multi-select__input\"\n type=\"text\"\n role=\"combobox\"\n aria-expanded={open}\n aria-controls={listId}\n aria-autocomplete=\"list\"\n aria-activedescendant={open ? rows.activeId : undefined}\n /* `aria-label` outranks a visible `<label>`, so it stands down when `Field` has\n * already pointed one at this input. */\n aria-label={labelledBy ? undefined : label}\n aria-labelledby={labelledBy}\n aria-describedby={describedBy}\n required={required && value.length === 0}\n aria-required={required || undefined}\n aria-invalid={invalid || undefined}\n autoComplete=\"off\"\n readOnly={!searchable}\n value={query}\n placeholder={value.length === 0 ? placeholder : undefined}\n disabled={disabled}\n onChange={(event) => {\n if (!searchable) return;\n setQuery(event.target.value);\n setActive(0);\n setOpen(true);\n }}\n onKeyDown={onKeyDown}\n onClick={() => setOpen(true)}\n /* Selected, not just cleared. The field holds a filter and never a committed\n * value, and a reader arriving by Tab types over whatever is left of the last\n * one rather than adding to the end of it. */\n onFocus={(event) => {\n setQuery(\"\");\n event.target.select();\n }}\n onBlur={() => setOpen(false)}\n data-part=\"input\"\n />\n\n <button\n type=\"button\"\n className=\"multi-select__toggle\"\n tabIndex={-1}\n aria-label={open ? `${label} 목록 닫기` : `${label} 목록 열기`}\n disabled={disabled}\n /*\n * `onPointerDown`, not `onClick`: by the time a click lands the field's blur and\n * the popover's outside-press have both already shut the list, so toggling then\n * only ever reopened it — the button said \"close\" and opened.\n */\n onPointerDown={(event) => {\n event.preventDefault();\n setOpen((was) => !was);\n field.current?.focus();\n }}\n data-part=\"toggle\"\n >\n <Icon icon={ChevronDown} size=\"sm\" />\n </button>\n </div>\n </RadixPopover.Anchor>\n\n {/*\n * How many are left, and whether there is room for another, said quietly. Filtering a\n * list changes what is on screen and says nothing at all otherwise, and a list that\n * has stopped accepting answers says even less.\n */}\n <VisuallyHidden>\n <span role=\"status\" aria-live=\"polite\" data-part=\"count\">\n {!open\n ? \"\"\n : full\n ? `최대 ${max}개까지 고를 수 있습니다`\n : found.length > 0\n ? `${found.length}개 결과`\n : emptyMessage}\n </span>\n </VisuallyHidden>\n\n <RadixPopover.Portal>\n <RadixPopover.Content\n className=\"multi-select__panel\"\n side=\"bottom\"\n align=\"start\"\n sideOffset={4}\n collisionPadding={12}\n /* The focus stays in the field. A listbox that takes it is a listbox the reader\n * cannot keep typing into. */\n onOpenAutoFocus={(event) => event.preventDefault()}\n onCloseAutoFocus={(event) => event.preventDefault()}\n >\n <ul\n className=\"multi-select__list\"\n id={listId}\n role=\"listbox\"\n aria-label={label}\n aria-multiselectable=\"true\"\n >\n {found.map((option, index) => (\n <li\n key={option.value}\n id={optionId(option)}\n className=\"multi-select__option\"\n role=\"option\"\n aria-selected={held.has(option.value)}\n aria-disabled={locked(option) || undefined}\n data-active={index === active ? \"\" : undefined}\n data-part={`option-${option.value}`}\n /* `onMouseDown` and not `onClick`: a click fires after the field's blur has\n * already shut the list, so the option is gone before the click lands. */\n onMouseDown={(event) => {\n event.preventDefault();\n toggle(option);\n }}\n /* Locked rows do not take the highlight. Letting the pointer park one there\n * left `aria-activedescendant` on a row Enter refuses to take. */\n onMouseEnter={() => { if (!locked(option)) setActive(index); }}\n >\n <span className=\"multi-select__mark\" aria-hidden=\"true\">\n {held.has(option.value) ? <Icon icon={Check} size=\"xs\" /> : null}\n </span>\n <span className=\"multi-select__text\">\n <span className=\"multi-select__label\">{option.label}</span>\n {option.description ? (\n <span className=\"multi-select__description\">{option.description}</span>\n ) : null}\n </span>\n </li>\n ))}\n {found.length === 0 ? (\n <li className=\"multi-select__empty\" role=\"presentation\" data-part=\"empty\">\n {emptyMessage}\n </li>\n ) : null}\n </ul>\n </RadixPopover.Content>\n </RadixPopover.Portal>\n </div>\n </RadixPopover.Root>\n );\n}\n","import { useEffect, useRef } from \"react\";\nimport type { ChangeEvent, ClipboardEvent, KeyboardEvent } from \"react\";\nimport \"./PinInput.css\";\n\nexport type PinInputSize = \"sm\" | \"md\" | \"lg\";\nexport type PinInputType = \"number\" | \"text\";\n\nexport type PinInputProps = {\n /** The whole code, shorter than `length` while it is being filled in. */\n value: string;\n onValueChange: (value: string) => void;\n length?: number;\n /**\n * What the code is. Every box says it, followed by its position.\n *\n * Stands down to `aria-labelledby` when `Field` supplies one — an `aria-label` outranks a\n * visible `<label>`, and the two would then be free to disagree.\n */\n label: string;\n type?: PinInputType;\n /** Hide what was typed. Draws dots and turns autofill off — see the note in the component. */\n mask?: boolean;\n size?: PinInputSize;\n disabled?: boolean;\n invalid?: boolean;\n name?: string;\n autoFocus?: boolean;\n /** Called once, at the moment the last empty box is filled. */\n onComplete?: (value: string) => void;\n id?: string;\n className?: string;\n required?: boolean;\n \"aria-labelledby\"?: string;\n \"aria-describedby\"?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/** Everything the box will accept, in order. Anything else is dropped rather than refused. */\nfunction keep(text: string, type: PinInputType): string {\n return type === \"number\" ? text.replace(/[^0-9]/g, \"\") : text.replace(/\\s/g, \"\");\n}\n\n/**\n * A code, one character to a box.\n *\n * **Six real inputs, wrapped in a group.** The group carries the field's name and its\n * description, so a reader entering the control hears \"인증번호, 6자리 숫자\" once; each box\n * then names itself and its position — \"인증번호 3번째 자리\". The alternative, one input\n * styled to look like six, loses the thing the boxes are for: a reader can no longer tell\n * which character they are on, and a screen reader reads the whole code back on every\n * keystroke.\n *\n * **Pasting is the case this pattern is usually missing.** A code arrives from a message app\n * as one string, and six inputs that each take one character will keep the first digit and\n * drop five. Both doors are covered: `onPaste` reads the clipboard and spreads it, and\n * `onChange` spreads anything longer than one character — which is how the platform's own\n * SMS autofill arrives, as a single fill rather than as a paste event.\n */\nexport function PinInput({\n value,\n onValueChange,\n length = 6,\n label,\n type = \"number\",\n mask,\n size = \"md\",\n disabled,\n invalid,\n name,\n autoFocus,\n onComplete,\n id,\n className,\n required,\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": describedBy,\n ...rest\n}: PinInputProps) {\n const boxes = useRef<(HTMLInputElement | null)[]>([]);\n /*\n * `onComplete` fires on the transition into a full code, not on every render that finds one.\n * Without this a controlled parent that re-renders for any other reason would submit twice.\n */\n const wasComplete = useRef(value.length >= length);\n\n useEffect(() => {\n const complete = value.length >= length;\n if (complete && !wasComplete.current) onComplete?.(value.slice(0, length));\n wasComplete.current = complete;\n }, [value, length, onComplete]);\n\n const focusBox = (index: number) => {\n const box = boxes.current[Math.min(length - 1, Math.max(0, index))];\n box?.focus();\n box?.select();\n };\n\n /** Writes `text` into the boxes from `at`, and leaves the reader on the first empty one. */\n const spread = (at: number, text: string) => {\n const chars = keep(text, type);\n /* Nothing usable in it — same restore as a dropped character above. */\n if (!chars) {\n queueMicrotask(() => boxes.current[at]?.select());\n return;\n }\n const next = value.padEnd(length, \" \").split(\"\");\n let index = at;\n for (const char of chars) {\n if (index >= length) break;\n next[index] = char;\n index += 1;\n }\n onValueChange(next.join(\"\").trimEnd());\n focusBox(index);\n };\n\n const onChange = (index: number) => (event: ChangeEvent<HTMLInputElement>) => {\n const typed = event.target.value;\n /*\n * More than one character means the box was filled rather than typed — the platform's\n * one-time-code autofill, or a paste the browser reported as an input. Either way the\n * whole string belongs to the field, not to this box.\n */\n if (typed.length > 1) return spread(index, typed);\n\n const char = keep(typed, type).slice(-1);\n if (!char) {\n /*\n * The character was dropped, and dropping it is not enough on its own.\n *\n * React puts the box's old value back, because the state never changed — but it does\n * not put the selection back, so the caret ends up *after* the character the box was\n * already holding. With `maxLength={1}` that box then refuses everything: no further\n * keystroke even reaches `onChange`, and the box is deaf until the reader backspaces\n * or clicks it again. One space bar on a phone keyboard was enough to do it.\n *\n * Selecting again after React's restore puts the box back the way `onFocus` leaves it,\n * where the next character replaces what is there.\n */\n queueMicrotask(() => boxes.current[index]?.select());\n return;\n }\n const next = value.padEnd(length, \" \").split(\"\");\n next[index] = char;\n onValueChange(next.join(\"\").trimEnd());\n if (index < length - 1) focusBox(index + 1);\n };\n\n const clear = (index: number) => {\n const next = value.padEnd(length, \" \").split(\"\");\n next[index] = \" \";\n onValueChange(next.join(\"\").trimEnd());\n };\n\n const onKeyDown = (index: number) => (event: KeyboardEvent<HTMLInputElement>) => {\n switch (event.key) {\n case \"Backspace\":\n event.preventDefault();\n /*\n * A box that already holds a character loses it and keeps the reader. An empty one\n * sends them back a box and clears that instead — which is what a reader who has\n * mistyped expects, and what a row of single-character inputs does not do on its own,\n * because there is nothing left in the box for the browser to delete.\n */\n if (value[index] && value[index] !== \" \") return clear(index);\n if (index === 0) return;\n clear(index - 1);\n return focusBox(index - 1);\n case \"Delete\":\n event.preventDefault();\n return clear(index);\n case \"ArrowLeft\":\n event.preventDefault();\n return focusBox(index - 1);\n case \"ArrowRight\":\n event.preventDefault();\n return focusBox(index + 1);\n case \"Home\":\n event.preventDefault();\n return focusBox(0);\n case \"End\":\n event.preventDefault();\n return focusBox(length - 1);\n default:\n return;\n }\n };\n\n const onPaste = (index: number) => (event: ClipboardEvent<HTMLInputElement>) => {\n event.preventDefault();\n spread(index, event.clipboardData.getData(\"text\"));\n };\n\n return (\n <div\n data-size={size}\n data-disabled={disabled ? \"\" : undefined}\n data-invalid={invalid ? \"\" : undefined}\n data-mask={mask ? \"\" : undefined}\n {...rest}\n className={`pin-input ${className ?? \"\"}`.trim()}\n /*\n * The group is what carries the field's name and hint. Each box repeats the name with\n * its own position, so a reader who arrives at the fourth box still knows what they are\n * filling in — but the hint is said once, on entry, rather than six times.\n */\n role=\"group\"\n aria-labelledby={labelledBy}\n aria-label={labelledBy ? undefined : label}\n aria-describedby={describedBy}\n >\n {Array.from({ length }, (_, index) => {\n const char = value[index] && value[index] !== \" \" ? value[index] : \"\";\n return (\n <input\n key={index}\n data-part=\"box\"\n data-index={index}\n ref={(node) => {\n boxes.current[index] = node;\n }}\n className=\"pin-input__box\"\n id={index === 0 ? id : undefined}\n /*\n * `type=\"password\"` when masked, rather than a CSS disc: `-webkit-text-security`\n * is unimplemented in Firefox, and replacing the drawn character would put a dot\n * in the element's value where the digit should be. Autofill goes with it — a\n * masked PIN is not a code a message app is going to deliver.\n */\n type={mask ? \"password\" : \"text\"}\n inputMode={type === \"number\" ? \"numeric\" : \"text\"}\n autoComplete={mask ? \"off\" : \"one-time-code\"}\n autoCorrect=\"off\"\n autoCapitalize=\"off\"\n spellCheck={false}\n maxLength={1}\n value={char}\n disabled={disabled}\n required={required || undefined}\n aria-invalid={invalid || undefined}\n aria-label={`${label} ${index + 1}번째 자리`}\n /* On every box, not only the first: an error arrives after a failed submit, and a\n * reader correcting the fourth digit has to hear it there. */\n aria-describedby={describedBy}\n autoFocus={autoFocus && index === 0}\n onChange={onChange(index)}\n onKeyDown={onKeyDown(index)}\n onPaste={onPaste(index)}\n onFocus={(event) => event.target.select()}\n />\n );\n })}\n\n {/* The form's field. The boxes hold one character each; this holds the code. */}\n {name ? <input type=\"hidden\" name={name} value={value} disabled={disabled} /> : null}\n </div>\n );\n}\n","import type { CSSProperties, ReactNode } from \"react\";\nimport \"./RingProgress.css\";\n\nexport type RingProgressSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\nexport type RingProgressTone = \"accent\" | \"success\" | \"warning\" | \"danger\";\n\nexport type RingProgressProps = {\n /** How far along, 0 to `max`. */\n value: number;\n max?: number;\n size?: RingProgressSize;\n tone?: RingProgressTone;\n /** What is progressing. A ring with no name is a ring nobody can ask about. */\n label: string;\n /**\n * What goes in the middle. A number, a short word, an icon.\n *\n * Optional, and the ring works without it: the value is already announced by the element's\n * role. This is for the reader who is looking at it, and a ring with nothing in the middle\n * is a shape rather than a reading.\n */\n children?: ReactNode;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * How far along something is, drawn as a ring.\n *\n * The same statement as `Progress` and a different shape, so it is a different component\n * rather than a variant. A bar belongs in a row of rows, where its length is comparable to\n * the one above it. A ring belongs where one number is the subject of its own box, and where\n * there is room in the middle to say what the number is.\n *\n * Drawn with `conic-gradient` rather than SVG. An SVG ring needs `stroke-dasharray` computed\n * from the radius, which means the value reaches CSS through a `style` attribute and the\n * component starts owning its own size. A conic gradient takes the value as a percentage in\n * one custom property and the size stays in the stylesheet, where an adopter can reach it.\n *\n * `role=\"progressbar\"` with the three aria values, because a `<div>` painted with a gradient\n * says nothing to a reader who cannot see it.\n */\nexport function RingProgress({\n value,\n max = 100,\n size = \"md\",\n tone = \"accent\",\n label,\n children,\n className,\n ...rest\n}: RingProgressProps) {\n const clamped = Math.min(Math.max(value, 0), max);\n const percent = max === 0 ? 0 : (clamped / max) * 100;\n\n return (\n <div\n {...rest}\n className={`ring-progress ${className ?? \"\"}`.trim()}\n data-size={size}\n data-tone={tone}\n role=\"progressbar\"\n aria-label={label}\n aria-valuenow={clamped}\n aria-valuemin={0}\n aria-valuemax={max}\n >\n {/*\n * The painted ring. Separated from the box so the box can hold the label without the\n * gradient running under the text, and marked `aria-hidden` because the value is on\n * the box already.\n */}\n <span\n className=\"ring-progress__track\"\n aria-hidden=\"true\"\n style={{ \"--ring-progress-value\": `${percent}%` } as CSSProperties}\n />\n {/*\n * `!= null` and not a truthiness test: `0` is a reading and has to survive, and it is\n * the one value a `children && …` would drop. Both `undefined` and `null` are dropped\n * though — the demo empties the middle with `{condition ? … : null}`, which is the\n * ordinary way to write it, and that used to leave an empty span in the ring.\n */}\n {children != null ? <span className=\"ring-progress__label\">{children}</span> : null}\n </div>\n );\n}\n","import { useEffect, useRef, useState } from \"react\";\nimport type { ReactNode } from \"react\";\nimport \"./ScrollArea.css\";\n\nexport type ScrollAreaAxis = \"block\" | \"inline\" | \"both\";\n/** Enumerated, not a length. A number would have to be written into a style attribute. */\nexport type ScrollAreaMaxHeight = \"sm\" | \"md\" | \"lg\" | \"none\";\n\nexport type ScrollAreaProps = {\n children: ReactNode;\n axis?: ScrollAreaAxis;\n /** A step on the space scale, so the cap follows density like every other measure. */\n maxHeight?: ScrollAreaMaxHeight;\n /**\n * What the region holds. Required in practice: a focusable region with no name is\n * announced as an unlabelled group, which tells a reader they have arrived somewhere and\n * not what it is. Without one the box still takes focus but claims no role.\n */\n label?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A box that scrolls, and can be scrolled without a pointer.\n *\n * The whole component is the `tabindex`. A region that scrolls and cannot be focused simply\n * ends at its own edge for anyone driving the page from a keyboard — the arrow keys go to\n * the document behind it and the content past the fold is unreachable. `composed/Table`\n * settled this for its own scroller; this is that pattern with nothing else attached.\n *\n * The other half is that a tab stop which does nothing is worse than none. A box whose\n * content fits does not scroll, so it is removed from the tab order rather than left as a\n * stop the reader has to pass through to reach the next control. That cannot be decided from\n * the props, so it is measured.\n */\nexport function ScrollArea({\n children,\n axis = \"block\",\n maxHeight = \"md\",\n label,\n className,\n ...rest\n}: ScrollAreaProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n const [overflowing, setOverflowing] = useState(false);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n\n /*\n * `scrollHeight`/`scrollWidth` are physical, and this measurement is the one place the\n * component has to be. There is no logical-property reading of scroll extent in any\n * engine; a vertical writing mode would need the two swapped, and that is the known\n * limit of this measurement rather than an oversight.\n *\n * One pixel of slack. Sub-pixel layout reports a scroll extent a hundredth larger than\n * the client box on a great many boxes that do not scroll at all, and every one of them\n * would become a tab stop that goes nowhere.\n */\n const measure = () => {\n const block = root.scrollHeight - root.clientHeight > 1;\n const inline = root.scrollWidth - root.clientWidth > 1;\n setOverflowing(axis === \"block\" ? block : axis === \"inline\" ? inline : block || inline);\n };\n\n /*\n * The box and its contents both. Observing only the box misses content that grows inside\n * a box whose own size never changes — a list that gains rows is exactly that, and it is\n * the common case.\n */\n const resize = new ResizeObserver(measure);\n const observeAll = () => {\n resize.disconnect();\n resize.observe(root);\n for (const child of Array.from(root.children)) resize.observe(child);\n measure();\n };\n observeAll();\n\n // Replacing the children swaps the elements the observer was watching, so it re-attaches.\n const mutate = new MutationObserver(observeAll);\n mutate.observe(root, { childList: true, subtree: true, characterData: true });\n\n return () => {\n resize.disconnect();\n mutate.disconnect();\n };\n }, [axis, maxHeight]);\n\n const named = overflowing && label !== undefined;\n\n return (\n <div\n ref={rootRef}\n data-axis={axis}\n data-max-height={maxHeight}\n data-overflowing={overflowing ? \"\" : undefined}\n {...rest}\n className={`scroll-area ${className ?? \"\"}`.trim()}\n /* A stop only while there is something to scroll to. */\n tabIndex={overflowing ? 0 : undefined}\n role={named ? \"group\" : undefined}\n aria-label={named ? label : undefined}\n >\n {children}\n </div>\n );\n}\n","import type { ElementType, ReactNode } from \"react\";\nimport type { LayoutGap } from \"../Stack\";\nimport \"./SimpleGrid.css\";\n\n/** A fixed number of equal columns. The list is what divides evenly into a readable row. */\nexport type SimpleGridColumns = 1 | 2 | 3 | 4 | 6;\n\n/** The narrowest a cell may get before the row drops one. Enumerated in `SimpleGrid.css`. */\nexport type SimpleGridMin = \"xs\" | \"sm\" | \"md\" | \"lg\";\n\nexport type SimpleGridProps = {\n children?: ReactNode;\n as?: ElementType;\n /** A fixed count. Wins over `min` when both are given. */\n columns?: SimpleGridColumns;\n /** Fit as many columns of at least this width as there is room for. */\n min?: SimpleGridMin;\n gap?: LayoutGap;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * Equal columns of the same kind of thing.\n *\n * Not the twelve-column field: `Grid` is for cells that mean different things and have to\n * line up against a shared measure, and this is for n of one thing. Nothing here can express\n * \"a sidebar of four and a body of eight\", and that is the distinction, not a limitation.\n *\n * Both sizing modes are set as attributes and resolved in CSS. `columns` outranks `min` there\n * rather than here, so the precedence holds even when an adopter's own rule sets one of them.\n */\nexport function SimpleGrid({\n children,\n as: Element = \"div\",\n columns,\n min,\n gap = 4,\n className,\n ...rest\n}: SimpleGridProps) {\n return (\n <Element\n data-columns={columns}\n data-min={min}\n data-gap={gap}\n {...rest}\n className={`simple-grid ${className ?? \"\"}`.trim()}\n >\n {children}\n </Element>\n );\n}\n","import type { ChangeEvent, CSSProperties, ReactNode } from \"react\";\nimport \"./Slider.css\";\n\nexport type SliderSize = \"sm\" | \"md\" | \"lg\";\n\n/** A labelled stop on the rail. The label is optional — a bare tick is still a landmark. */\nexport type SliderMark = { value: number; label?: ReactNode };\n\nexport type SliderProps = {\n value: number;\n onValueChange: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n /**\n * What this slider is asking for.\n *\n * Stands down to `aria-labelledby` when `Field` supplies one, the same trade `Combobox`\n * makes: an `aria-label` outranks a visible `<label>`, and the two would then be free to\n * disagree.\n */\n label: string;\n size?: SliderSize;\n disabled?: boolean;\n invalid?: boolean;\n name?: string;\n marks?: SliderMark[];\n /**\n * The value as a reader should hear and see it.\n *\n * Feeds `aria-valuetext` as well as the readout, because a range input announces the bare\n * number otherwise — \"70\" where the control means \"70%\" or \"7,000원\". The unit is the half\n * that carries the meaning and it is the half a screen reader was never given.\n */\n formatValue?: (value: number) => string;\n id?: string;\n className?: string;\n required?: boolean;\n \"aria-labelledby\"?: string;\n \"aria-describedby\"?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/** Where a value sits on the rail, 0 to 1. Guards the degenerate `min === max`. */\nfunction ratio(value: number, min: number, max: number): number {\n if (max === min) return 0;\n return Math.min(1, Math.max(0, (value - min) / (max - min)));\n}\n\n/** Mirrors native range clamping and step rounding without depending on a browser at render time. */\nfunction rangeValue(value: number, min: number, max: number, step: number): number {\n if (max <= min) return min;\n const bounded = Math.min(max, Math.max(min, value));\n const interval = Number.isFinite(step) && step > 0 ? step : 1;\n const position = (bounded - min) / interval;\n const last = (max - min) / interval;\n if (!Number.isFinite(position) || !Number.isFinite(last)) return bounded;\n /* Binary arithmetic may put an exact decimal midpoint just below the higher step. */\n const tolerance = (of: number) => Number.EPSILON * Math.max(1, Math.abs(of)) * 4;\n const index = Math.min(Math.round(position + tolerance(position)), Math.floor(last + tolerance(last)));\n const snapped = min + index * interval;\n const places = (of: number) => {\n const [coefficient, exponent = \"0\"] = String(of).toLowerCase().split(\"e\");\n return Math.max(0, (coefficient.split(\".\")[1] ?? \"\").length - Number(exponent));\n };\n const precision = Math.max(places(min), places(interval));\n return precision > 100 ? snapped : Number(snapped.toFixed(precision));\n}\n\n/**\n * One value out of a range.\n *\n * A native `<input type=\"range\">`, painted. Arrow keys, Home, End, PageUp and PageDown, the\n * step arithmetic, the touch behaviour and the `slider` role all arrive with the element; a\n * hand-drawn rail has to rebuild every one of them and gets at least one wrong. What is drawn\n * here is the rail, the fill and the thumb — appearance, which is the part a design system\n * actually has an opinion about.\n *\n * The fill is a positioned element rather than a gradient on the input, so it can be sized\n * with logical properties and follow a right-to-left page without a second rule.\n */\nexport function Slider({\n value,\n onValueChange,\n min = 0,\n max = 100,\n step = 1,\n label,\n size = \"md\",\n disabled,\n invalid,\n name,\n marks,\n formatValue,\n id,\n className,\n required,\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": describedBy,\n ...rest\n}: SliderProps) {\n /* Native range inputs clamp their value; the readout and announced value must agree. */\n const settled = rangeValue(value, min, max, step);\n const shown = formatValue ? formatValue(settled) : String(settled);\n const filled = ratio(settled, min, max);\n\n return (\n <span\n data-size={size}\n data-disabled={disabled ? \"\" : undefined}\n data-invalid={invalid ? \"\" : undefined}\n data-marked={marks?.length ? \"\" : undefined}\n className={`slider ${className ?? \"\"}`.trim()}\n >\n <span className=\"slider__rail\">\n <span className=\"slider__ground\" aria-hidden=\"true\" />\n <span\n className=\"slider__fill\"\n aria-hidden=\"true\"\n style={{ \"--slider-fill\": filled } as CSSProperties}\n />\n {marks?.map((mark) => (\n <span\n key={mark.value}\n className=\"slider__tick\"\n aria-hidden=\"true\"\n data-passed={mark.value <= settled ? \"\" : undefined}\n style={{ \"--slider-mark\": ratio(mark.value, min, max) } as CSSProperties}\n />\n ))}\n <input\n /* Before the spread: a caller that names this part has to win, and writing it\n * afterwards silently replaced their name with this one. */\n data-part=\"control\"\n {...rest}\n type=\"range\"\n className=\"slider__input\"\n id={id}\n name={name}\n min={min}\n max={max}\n step={step}\n value={settled}\n disabled={disabled}\n aria-label={labelledBy ? undefined : label}\n aria-labelledby={labelledBy}\n aria-describedby={describedBy}\n /*\n * `aria-required`, not `required`. A range input always has a value, so HTML does\n * not define `required` on it — React would render an attribute no validator reads\n * and no screen reader announces. The ARIA property is the one that survives, and\n * it is on the focusable element, which is where `Field` needs it.\n */\n aria-required={required || undefined}\n aria-invalid={invalid || undefined}\n aria-valuetext={shown}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n onValueChange(Number(event.target.value))\n }\n />\n </span>\n\n {/* The readout is `aria-hidden` because `aria-valuetext` already says it. Mounted\n * anyway, and not only when `formatValue` is given: a slider whose value is nowhere on\n * screen is one a sighted reader has to drag to read. */}\n <span className=\"slider__readout\" aria-hidden=\"true\">\n {shown}\n </span>\n\n {marks?.some((mark) => mark.label !== undefined) ? (\n <span className=\"slider__marks\" aria-hidden=\"true\">\n {marks.map((mark) =>\n mark.label === undefined ? null : (\n <span\n key={mark.value}\n className=\"slider__mark\"\n style={{ \"--slider-mark\": ratio(mark.value, min, max) } as CSSProperties}\n >\n {mark.label}\n </span>\n ),\n )}\n </span>\n ) : null}\n </span>\n );\n}\n","import type { ElementType } from \"react\";\nimport type { LayoutGap } from \"../Stack\";\nimport \"./Space.css\";\n\nexport type SpaceAxis = \"block\" | \"inline\";\n\nexport type SpaceProps = {\n /** A step on the spacing scale. Follows the page density, because `--space-*` does. */\n size?: LayoutGap;\n /** `block` is a height between rows; `inline` is a width between things in a row. */\n axis?: SpaceAxis;\n as?: ElementType;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * An empty box of a named size.\n *\n * It is hidden from assistive technology, and that is not politeness — an element with no\n * content and no role still lands in the accessibility tree on some engines, and a reader\n * arrowing through a page does not need to be told about the gaps between the parts. There is\n * nothing here to announce, so nothing is.\n *\n * It takes no children and no `aria-*`. Both would contradict `aria-hidden`: content inside a\n * hidden box is content nobody can reach, and a label on a hidden box is a name for something\n * that is not in the tree to be named. If a box needs a name, it is not this component.\n *\n * Reach for it last. A run of rows separated by `Space` is a `Stack` with a `gap` that\n * somebody wrote out by hand, and it drifts the moment one row is added or removed.\n */\nexport function Space({ size = 4, axis = \"block\", as: Element = \"div\", className, ...rest }: SpaceProps) {\n return (\n <Element\n data-size={size}\n data-axis={axis}\n {...rest}\n className={`space ${className ?? \"\"}`.trim()}\n aria-hidden=\"true\"\n />\n );\n}\n","import type { ElementType, ReactNode } from \"react\";\nimport \"./Stack.css\";\n\n/**\n * The spacing scale, by step name.\n *\n * The five flex layout primitives share this type rather than each declaring a number: a\n * `gap` that accepts `number` accepts `7`, and `--space-7` does not exist — the rule would\n * resolve to nothing and the box would sit flush with no error anywhere. The names here are\n * exactly the steps `foundation/tokens.css` defines, and the CSS enumerates them one by one\n * so a step that is removed from the scale becomes a compile error rather than a silent zero.\n */\nexport type LayoutGap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24;\n\nexport type StackAlign = \"start\" | \"center\" | \"end\" | \"stretch\";\nexport type StackJustify = \"start\" | \"center\" | \"end\" | \"between\";\n\nexport type StackProps = {\n children: ReactNode;\n /** A step on the spacing scale. Follows the page density, because `--space-*` does. */\n gap?: LayoutGap;\n /** The inline axis — where a child that is narrower than the column sits. */\n align?: StackAlign;\n /** The block axis. Does nothing unless the column has a height to distribute. */\n justify?: StackJustify;\n as?: ElementType;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A vertical column with one gap between its children.\n *\n * It exists so a vertical rhythm is a named step rather than a margin somebody typed. Margins\n * collapse, do not collapse through a flex container, and belong to the child rather than to\n * the arrangement — which is why removing a child from a margin-spaced list changes the\n * spacing of the list. A `gap` belongs to the container, so it does not.\n *\n * Its own attributes are written *before* the spread. A caller who names a part — a test id,\n * a `data-testid`, a `data-part` a parent layout reads — has to win, and writing them\n * afterwards silently replaced the caller's value with this component's. That is the rule\n * `Select` was corrected to.\n */\nexport function Stack({\n children,\n gap = 4,\n align = \"stretch\",\n justify = \"start\",\n as: Element = \"div\",\n className,\n ...rest\n}: StackProps) {\n return (\n <Element\n data-gap={gap}\n data-align={align}\n data-justify={justify}\n {...rest}\n className={`stack ${className ?? \"\"}`.trim()}\n >\n {children}\n </Element>\n );\n}\n","import type { ChangeEvent, ReactNode } from \"react\";\nimport \"./Switch.css\";\n\nexport type SwitchSize = \"sm\" | \"md\";\n\nexport type SwitchProps = {\n children?: ReactNode;\n checked?: boolean;\n defaultChecked?: boolean;\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n size?: SwitchSize;\n disabled?: boolean;\n name?: string;\n value?: string;\n id?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * On or off, and it takes effect now.\n *\n * A checkbox with `role=\"switch\"`, so it is announced as on or off rather than checked or\n * unchecked — which is the distinction that matters, because a switch acts immediately and a\n * checkbox waits for a submit. If the setting needs saving, it is a checkbox.\n *\n * The state is on the input, never only in the drawing: a knob that has slid right says\n * nothing to a reader who cannot see it.\n */\nexport function Switch({\n children,\n size = \"md\",\n disabled,\n className,\n ...rest\n}: SwitchProps) {\n return (\n <label\n className={`switch ${className ?? \"\"}`.trim()}\n data-size={size}\n data-disabled={disabled ? \"\" : undefined}\n >\n <input\n {...rest}\n type=\"checkbox\"\n role=\"switch\"\n className=\"switch__input\"\n disabled={disabled}\n />\n <span className=\"switch__track\" aria-hidden=\"true\">\n <span className=\"switch__knob\" />\n </span>\n {children ? <span className=\"switch__label\">{children}</span> : null}\n </label>\n );\n}\n"],"mappings":";;;;;;;AA4BA,SAAgB,EAAY,EAAE,aAAU,WAAQ,SAAS,cAAW,GAAG,KAA0B;CAC/F,OACE,kBAAC,OAAD;EAAK,cAAY;EAAO,GAAI;EAAM,WAAW,gBAAgB,KAAa,KAAK,KAAK;EACjF;CACE,CAAA;AAET;;;ACQA,SAAgB,EAAW,EACzB,aACA,SACA,cACA,SACA,cACA,GAAG,KACe;CAClB,IAAM,IACJ,kBAAA,GAAA,EAAA,UAAA,CACG,IAKC,kBAAC,QAAD;EAAM,WAAU;EAAmB,eAAY;EAC7C,UAAA,kBAAC,GAAD;GAAY;GAAM,MAAK;EAAM,CAAA;CACzB,CAAA,IACJ,MACJ,kBAAC,QAAD;EAAM,WAAU;EAAoB;CAAe,CAAA,CACnD,EAAA,CAAA;CAgBJ,OAbI,MAAS,KAAA,IAET,kBAAC,cAAD;EACE,cAAW;EACX,GAAI;EACJ,WAAW,cAAc,KAAa,KAAK,KAAK;EAChD,MAAM;EAEL,UAAA;CACS,CAAA,IAKd,kBAAC,UAAD;EAAQ,cAAW;EAAS,GAAI;EAAM,WAAW,cAAc,KAAa,KAAK,KAAK;EAAtF,UAAA,CACE,kBAAC,cAAD;GAAY,WAAU;GAAoB,MAAM;GAC7C,UAAA;EACS,CAAA,GACZ,kBAAC,cAAD;GAAY,WAAU;GAAoB,UAAA;EAAiB,CAAA,CACrD;;AAEZ;;;AClDA,IAAM,IAAS,GAET,IAAU,MAEV,IAAQ,KAER,IAAc,GAEd,KAAQ,MAAmB,IAAI,IAAS,IAAA,CAAM,QAAQ,CAAC,EAAE;AAuC/D,SAAgB,EAAgB,EAC9B,UACA,WACA,cACA,UAAO,MACP,cACA,GAAG,KACoB;CACvB,IAAM,IAAO,GA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,KAAK,KAAK;EAC3C,eAAY;CACb,CAAA;AAEL;;;ACGA,SAAgB,GAAM,EACpB,aACA,SAAM,GACN,WAAQ,WACR,aAAU,SACV,IAAI,IAAU,OACd,cACA,GAAG,KACU;CACb,OACE,kBAAC,GAAD;EACE,YAAU;EACV,cAAY;EACZ,gBAAc;EACd,GAAI;EACJ,WAAW,SAAS,KAAa,KAAK,KAAK;EAE1C;CACM,CAAA;AAEb;;;AClCA,SAAgB,GAAO,EACrB,aACA,UAAO,MACP,aACA,cACA,GAAG,KACW;CACd,OACE,kBAAC,SAAD;EACE,WAAW,UAAU,KAAa,KAAK,KAAK;EAC5C,aAAW;EACX,iBAAe,IAAW,KAAK,KAAA;EAHjC,UAAA;GAKE,kBAAC,SAAD;IACE,GAAI;IACJ,MAAK;IACL,MAAK;IACL,WAAU;IACA;GACX,CAAA;GACD,kBAAC,QAAD;IAAM,WAAU;IAAgB,eAAY;IAC1C,UAAA,kBAAC,QAAD,EAAM,WAAU,eAAgB,CAAA;GAC5B,CAAA;GACL,IAAW,kBAAC,QAAD;IAAM,WAAU;IAAiB;GAAe,CAAA,IAAI;EAC3D;;AAEX"}
@@ -1,4 +1,4 @@
1
- import { s as e } from "./VisuallyHidden-DcE0EFpo.js";
1
+ import { s as e } from "./VisuallyHidden-Bht2-rdy.js";
2
2
  import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
3
  import { X as i } from "lucide-react";
4
4
  //#region src/components/derived/Tag/Tag.tsx
@@ -57,4 +57,4 @@ function a({ children: a, variant: o = "soft", tone: s = "neutral", size: c = "m
57
57
  //#endregion
58
58
  export { a as t };
59
59
 
60
- //# sourceMappingURL=Tag-Z8PjnJFt.js.map
60
+ //# sourceMappingURL=Tag-CnNuj4nV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tag-Z8PjnJFt.js","names":[],"sources":["../../src/components/derived/Tag/Tag.tsx"],"sourcesContent":["import type { MouseEvent, ReactNode } from \"react\";\nimport { X } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./Tag.css\";\n\nexport type TagVariant = \"soft\" | \"outline\" | \"solid\";\nexport type TagTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\nexport type TagSize = \"sm\" | \"md\";\nexport type TagShape = \"rounded\" | \"pill\";\n\nexport type TagProps = {\n children: ReactNode;\n variant?: TagVariant;\n tone?: TagTone;\n size?: TagSize;\n shape?: TagShape;\n icon?: LucideIcon;\n /** Something before the label that is not an icon — an avatar, a colour swatch, a flag. */\n leading?: ReactNode;\n /**\n * Makes the label a button. A filter chip that turns a facet on and off.\n *\n * The tag itself never becomes the button, because a removable tag would then be a button\n * inside a button, which is invalid HTML and which browsers resolve by dropping one of\n * them — usually the one the reader wanted.\n */\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n /** Only meaningful with `onClick`. Reaches assistive technology as `aria-pressed`. */\n selected?: boolean;\n onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;\n /**\n * What the remove button is called.\n *\n * Defaulted from the label when the label is a string, because eight buttons all called\n * \"제거\" are eight buttons a reader cannot tell apart. When the label is not a string\n * there is nothing to derive it from, and this should be given.\n */\n removeLabel?: string;\n /**\n * `aria-disabled` rather than `disabled`, the rule Button set: a button that leaves the\n * tab order takes any reader standing on it with it.\n */\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A badge that can be acted on: picked, or taken off.\n */\nexport function Tag({\n children,\n variant = \"soft\",\n tone = \"neutral\",\n size = \"md\",\n shape = \"rounded\",\n icon,\n leading,\n onClick,\n selected,\n onRemove,\n removeLabel,\n disabled,\n className,\n ...rest\n}: TagProps) {\n const glyph = size === \"sm\" ? \"xs\" : \"sm\";\n const removeName =\n removeLabel ?? (typeof children === \"string\" ? `${children} 제거` : \"제거\");\n\n const body = (\n <>\n {leading ? <span className=\"tag__leading\">{leading}</span> : null}\n {icon ? <Icon icon={icon} size={glyph} /> : null}\n <span className=\"tag__text\">{children}</span>\n </>\n );\n\n return (\n <span\n {...rest}\n className={`tag ${className ?? \"\"}`.trim()}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-shape={shape}\n data-selected={onClick && selected ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n data-removable={onRemove ? \"\" : undefined}\n >\n {onClick ? (\n <button\n type=\"button\"\n className=\"tag__action\"\n onClick={(event) => {\n if (disabled) return;\n onClick(event);\n }}\n aria-pressed={selected ?? false}\n aria-disabled={disabled || undefined}\n >\n {body}\n </button>\n ) : (\n <span className=\"tag__label\">{body}</span>\n )}\n {onRemove ? (\n <button\n type=\"button\"\n className=\"tag__remove\"\n onClick={(event) => {\n if (disabled) return;\n onRemove(event);\n }}\n aria-label={removeName}\n aria-disabled={disabled || undefined}\n >\n <Icon icon={X} size=\"xs\" />\n </button>\n ) : null}\n </span>\n );\n}\n"],"mappings":";;;;AAmDA,SAAgB,EAAI,EAClB,aACA,aAAU,QACV,UAAO,WACP,UAAO,MACP,WAAQ,WACR,SACA,YACA,YACA,aACA,aACA,gBACA,aACA,cACA,GAAG,KACQ;CACX,IAAM,IAAQ,MAAS,OAAO,OAAO,MAC/B,IACJ,MAAgB,OAAO,KAAa,WAAW,GAAG,EAAS,OAAO,OAE9D,IACJ,kBAAA,GAAA,EAAA,UAAA;EACG,IAAU,kBAAC,QAAD;GAAM,WAAU;GAAgB,UAAA;EAAc,CAAA,IAAI;EAC5D,IAAO,kBAAC,GAAD;GAAY;GAAM,MAAM;EAAQ,CAAA,IAAI;EAC5C,kBAAC,QAAD;GAAM,WAAU;GAAa;EAAe,CAAA;CAC5C,EAAA,CAAA;CAGJ,OACE,kBAAC,QAAD;EACE,GAAI;EACJ,WAAW,OAAO,KAAa,KAAK,KAAK;EACzC,gBAAc;EACd,aAAW;EACX,aAAW;EACX,cAAY;EACZ,iBAAe,KAAW,IAAW,KAAK,KAAA;EAC1C,iBAAe,IAAW,KAAK,KAAA;EAC/B,kBAAgB,IAAW,KAAK,KAAA;EATlC,UAAA,CAWG,IACC,kBAAC,UAAD;GACE,MAAK;GACL,WAAU;GACV,UAAU,MAAU;IACd,KACJ,EAAQ,CAAK;GACf;GACA,gBAAc,KAAY;GAC1B,iBAAe,KAAY,KAAA;GAE1B,UAAA;EACK,CAAA,IAER,kBAAC,QAAD;GAAM,WAAU;GAAc,UAAA;EAAW,CAAA,GAE1C,IACC,kBAAC,UAAD;GACE,MAAK;GACL,WAAU;GACV,UAAU,MAAU;IACd,KACJ,EAAS,CAAK;GAChB;GACA,cAAY;GACZ,iBAAe,KAAY,KAAA;GAE3B,UAAA,kBAAC,GAAD;IAAM,MAAM;IAAG,MAAK;GAAM,CAAA;EACpB,CAAA,IACN,IACA;;AAEV"}
1
+ {"version":3,"file":"Tag-CnNuj4nV.js","names":[],"sources":["../../src/components/derived/Tag/Tag.tsx"],"sourcesContent":["import type { MouseEvent, ReactNode } from \"react\";\nimport { X } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./Tag.css\";\n\nexport type TagVariant = \"soft\" | \"outline\" | \"solid\";\nexport type TagTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\nexport type TagSize = \"sm\" | \"md\";\nexport type TagShape = \"rounded\" | \"pill\";\n\nexport type TagProps = {\n children: ReactNode;\n variant?: TagVariant;\n tone?: TagTone;\n size?: TagSize;\n shape?: TagShape;\n icon?: LucideIcon;\n /** Something before the label that is not an icon — an avatar, a colour swatch, a flag. */\n leading?: ReactNode;\n /**\n * Makes the label a button. A filter chip that turns a facet on and off.\n *\n * The tag itself never becomes the button, because a removable tag would then be a button\n * inside a button, which is invalid HTML and which browsers resolve by dropping one of\n * them — usually the one the reader wanted.\n */\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n /** Only meaningful with `onClick`. Reaches assistive technology as `aria-pressed`. */\n selected?: boolean;\n onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;\n /**\n * What the remove button is called.\n *\n * Defaulted from the label when the label is a string, because eight buttons all called\n * \"제거\" are eight buttons a reader cannot tell apart. When the label is not a string\n * there is nothing to derive it from, and this should be given.\n */\n removeLabel?: string;\n /**\n * `aria-disabled` rather than `disabled`, the rule Button set: a button that leaves the\n * tab order takes any reader standing on it with it.\n */\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A badge that can be acted on: picked, or taken off.\n */\nexport function Tag({\n children,\n variant = \"soft\",\n tone = \"neutral\",\n size = \"md\",\n shape = \"rounded\",\n icon,\n leading,\n onClick,\n selected,\n onRemove,\n removeLabel,\n disabled,\n className,\n ...rest\n}: TagProps) {\n const glyph = size === \"sm\" ? \"xs\" : \"sm\";\n const removeName =\n removeLabel ?? (typeof children === \"string\" ? `${children} 제거` : \"제거\");\n\n const body = (\n <>\n {leading ? <span className=\"tag__leading\">{leading}</span> : null}\n {icon ? <Icon icon={icon} size={glyph} /> : null}\n <span className=\"tag__text\">{children}</span>\n </>\n );\n\n return (\n <span\n {...rest}\n className={`tag ${className ?? \"\"}`.trim()}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-shape={shape}\n data-selected={onClick && selected ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n data-removable={onRemove ? \"\" : undefined}\n >\n {onClick ? (\n <button\n type=\"button\"\n className=\"tag__action\"\n onClick={(event) => {\n if (disabled) return;\n onClick(event);\n }}\n aria-pressed={selected ?? false}\n aria-disabled={disabled || undefined}\n >\n {body}\n </button>\n ) : (\n <span className=\"tag__label\">{body}</span>\n )}\n {onRemove ? (\n <button\n type=\"button\"\n className=\"tag__remove\"\n onClick={(event) => {\n if (disabled) return;\n onRemove(event);\n }}\n aria-label={removeName}\n aria-disabled={disabled || undefined}\n >\n <Icon icon={X} size=\"xs\" />\n </button>\n ) : null}\n </span>\n );\n}\n"],"mappings":";;;;AAmDA,SAAgB,EAAI,EAClB,aACA,aAAU,QACV,UAAO,WACP,UAAO,MACP,WAAQ,WACR,SACA,YACA,YACA,aACA,aACA,gBACA,aACA,cACA,GAAG,KACQ;CACX,IAAM,IAAQ,MAAS,OAAO,OAAO,MAC/B,IACJ,MAAgB,OAAO,KAAa,WAAW,GAAG,EAAS,OAAO,OAE9D,IACJ,kBAAA,GAAA,EAAA,UAAA;EACG,IAAU,kBAAC,QAAD;GAAM,WAAU;GAAgB,UAAA;EAAc,CAAA,IAAI;EAC5D,IAAO,kBAAC,GAAD;GAAY;GAAM,MAAM;EAAQ,CAAA,IAAI;EAC5C,kBAAC,QAAD;GAAM,WAAU;GAAa;EAAe,CAAA;CAC5C,EAAA,CAAA;CAGJ,OACE,kBAAC,QAAD;EACE,GAAI;EACJ,WAAW,OAAO,KAAa,KAAK,KAAK;EACzC,gBAAc;EACd,aAAW;EACX,aAAW;EACX,cAAY;EACZ,iBAAe,KAAW,IAAW,KAAK,KAAA;EAC1C,iBAAe,IAAW,KAAK,KAAA;EAC/B,kBAAgB,IAAW,KAAK,KAAA;EATlC,UAAA,CAWG,IACC,kBAAC,UAAD;GACE,MAAK;GACL,WAAU;GACV,UAAU,MAAU;IACd,KACJ,EAAQ,CAAK;GACf;GACA,gBAAc,KAAY;GAC1B,iBAAe,KAAY,KAAA;GAE1B,UAAA;EACK,CAAA,IAER,kBAAC,QAAD;GAAM,WAAU;GAAc,UAAA;EAAW,CAAA,GAE1C,IACC,kBAAC,UAAD;GACE,MAAK;GACL,WAAU;GACV,UAAU,MAAU;IACd,KACJ,EAAS,CAAK;GAChB;GACA,cAAY;GACZ,iBAAe,KAAY,KAAA;GAE3B,UAAA,kBAAC,GAAD;IAAM,MAAM;IAAG,MAAK;GAAM,CAAA;EACpB,CAAA,IACN,IACA;;AAEV"}
@@ -1,6 +1,6 @@
1
- import { i as e, n as t, r as n, s as r, t as i } from "./VisuallyHidden-DcE0EFpo.js";
2
- import { t as a } from "./Input-DzJm1Kv4.js";
3
- import { t as o } from "./Tag-Z8PjnJFt.js";
1
+ import { i as e, n as t, r as n, s as r, t as i } from "./VisuallyHidden-Bht2-rdy.js";
2
+ import { t as a } from "./Input-Bv2FRGIe.js";
3
+ import { t as o } from "./Tag-CnNuj4nV.js";
4
4
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
5
5
  import { useCallback as u, useId as d, useRef as f, useState as p } from "react";
6
6
  import { Check as m, ChevronDown as h, Eye as g, EyeOff as _, Search as v, X as y } from "lucide-react";
@@ -369,4 +369,4 @@ function k({ value: e, onValueChange: t, label: n, placeholder: r, max: a, size:
369
369
  //#endregion
370
370
  export { T as a, x as c, E as i, b as l, O as n, w as o, D as r, C as s, k as t };
371
371
 
372
- //# sourceMappingURL=TagInput-CeA0n7ax.js.map
372
+ //# sourceMappingURL=TagInput-BcSSnJY_.js.map