@lucian-seo/lucian-ui 0.2.1 → 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-Bx016mmz.js → VoiceControlBar-iWzq7jiw.js} +1754 -1494
  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 +106 -0
  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-Bx016mmz.js.map +0 -1
  42. package/dist/lib/Waveform-EahaE6uD.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TagInput-CeA0n7ax.js","names":[],"sources":["../../src/components/derived/ButtonGroup/ButtonGroup.tsx","../../src/components/derived/ChoiceCard/ChoiceCard.tsx","../../src/components/derived/NumberFlow/NumberFlow.tsx","../../src/components/derived/PasswordInput/PasswordInput.tsx","../../src/components/derived/SearchInput/SearchInput.tsx","../../src/components/derived/SegmentedControl/SegmentedControl.tsx","../../src/components/derived/SplitButton/SplitButton.tsx","../../src/components/derived/StatusDot/StatusDot.tsx","../../src/components/derived/TagInput/TagInput.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport \"./ButtonGroup.css\";\n\nexport type ButtonGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport type ButtonGroupProps = {\n children: ReactNode;\n /**\n * What the group is for. \"보기 방식\", \"저장 옵션\".\n *\n * A `role=\"group\"` with no name is a container a reader is told they have entered and not\n * told the purpose of. Naming it is the only thing the role buys.\n */\n label: string;\n orientation?: ButtonGroupOrientation;\n /**\n * Joined into one shape, or spaced apart.\n *\n * Joined says the actions are alternatives to one another. Spaced says they merely happen\n * to be next to each other — which is what a row of unrelated buttons is, and drawing that\n * as one shape tells the reader something untrue.\n */\n attached?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * Buttons that belong together.\n *\n * Every button keeps its own tab stop. A roving tabindex — one stop for the whole group,\n * arrow keys inside — is for a toolbar, where the group is a destination; these are separate\n * actions that happen to be adjacent, and taking away their tab stops would hide all but one\n * of them from a keyboard.\n */\nexport function ButtonGroup({\n children,\n label,\n orientation = \"horizontal\",\n attached = true,\n className,\n ...rest\n}: ButtonGroupProps) {\n return (\n <div\n {...rest}\n className={`button-group ${className ?? \"\"}`.trim()}\n role=\"group\"\n aria-label={label}\n data-orientation={orientation}\n data-attached={attached ? \"\" : undefined}\n >\n {children}\n </div>\n );\n}\n","import { useCallback } from \"react\";\nimport type { ChangeEvent, ReactNode } from \"react\";\nimport { Check } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./ChoiceCard.css\";\n\nexport type ChoiceCardType = \"radio\" | \"checkbox\";\nexport type ChoiceCardSize = \"sm\" | \"md\";\nexport type ChoiceCardIndicator = \"start\" | \"end\" | \"none\";\n\nexport type ChoiceCardProps = {\n /**\n * One of several, or any of several.\n *\n * The two are not interchangeable and the shape says which: a circle means the reader may\n * pick one, a square means they may pick more. Drawing a radio square is a small decision\n * about a border-radius that changes what the control means.\n */\n type?: ChoiceCardType;\n /** Required for a radio — the browser builds the group from it. */\n name?: string;\n value?: string;\n checked?: boolean;\n defaultChecked?: boolean;\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n title: ReactNode;\n description?: ReactNode;\n icon?: LucideIcon;\n /** The end of the row — a price, a badge, a count. */\n aside?: ReactNode;\n /** Where the mark sits, or that the card shows its state by its border alone. */\n indicator?: ChoiceCardIndicator;\n size?: ChoiceCardSize;\n disabled?: boolean;\n invalid?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A choice with room to explain itself.\n *\n * The whole card is the label, so the whole card is the target — which is the only reason to\n * draw a choice as a card rather than as a line of text with a dot beside it. A card whose\n * hit area is the 20px circle in its corner is a card that looks generous and is not.\n */\nexport function ChoiceCard({\n type = \"radio\",\n title,\n description,\n icon,\n aside,\n indicator = \"start\",\n size = \"md\",\n disabled,\n invalid,\n className,\n ...rest\n}: ChoiceCardProps) {\n /* `indeterminate` is deliberately absent. A card carries a title and a description, and a\n * third state that means \"some of what this stands for\" has nothing to say about one. */\n const setNothing = useCallback((node: HTMLInputElement | null) => {\n if (node) node.indeterminate = false;\n }, []);\n\n const mark = (\n <span className=\"choice-card__mark\" aria-hidden=\"true\">\n {type === \"checkbox\" ? <Icon icon={Check} size={size === \"sm\" ? \"xs\" : \"sm\"} /> : null}\n </span>\n );\n\n return (\n <label\n className={`choice-card ${className ?? \"\"}`.trim()}\n data-type={type}\n data-size={size}\n data-indicator={indicator}\n data-disabled={disabled ? \"\" : undefined}\n data-invalid={invalid ? \"\" : undefined}\n >\n <input\n {...rest}\n ref={setNothing}\n type={type}\n className=\"choice-card__input\"\n disabled={disabled}\n aria-invalid={invalid || undefined}\n />\n {indicator === \"start\" ? mark : null}\n {icon ? (\n <span className=\"choice-card__icon\" aria-hidden=\"true\">\n <Icon icon={icon} size={size === \"sm\" ? \"sm\" : \"md\"} />\n </span>\n ) : null}\n <span className=\"choice-card__body\">\n <span className=\"choice-card__title\">{title}</span>\n {description ? <span className=\"choice-card__description\">{description}</span> : null}\n </span>\n {aside ? <span className=\"choice-card__aside\">{aside}</span> : null}\n {indicator === \"end\" ? mark : null}\n </label>\n );\n}\n","import { useState } from \"react\";\nimport \"./NumberFlow.css\";\n\nexport type NumberFlowSize = \"sm\" | \"md\" | \"lg\";\n\nexport type NumberFlowProps = {\n /** The number that is true now. Change it and the digits that changed roll. */\n value: number;\n /**\n * How the number is written. Locale, currency, unit, rounding — all of it the host's.\n *\n * Defaults to the digits and nothing else. A component that reached for\n * `toLocaleString()` on its own would be a component that picked a locale for an adopter\n * who had already picked one, and the disagreement would show up on one screen out of\n * forty. `PriceDisplay` draws the same line.\n */\n format?: (value: number) => string;\n /**\n * How big the number is, and it is the subject of its box at every step.\n *\n * The three steps land on `--text-md`, `--text-xl` and `--text-3xl` — two apart on the\n * type scale each time, because a number one step above the words around it reads as a\n * misprint rather than as a hierarchy. `docs/DESIGN.md` §5 measured why this matters:\n * eight sizes exist and three of them carry 89% of the library.\n */\n size?: NumberFlowSize;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nconst DEFAULT_FORMAT = (value: number) => String(value);\n\n/**\n * A number that changed, and which way it went.\n *\n * **Only the digits that changed move.** 99 → 100 rolls three places; 100 → 101 rolls one.\n * A component that re-ran every digit on every change would be saying \"all of this is new\"\n * about a number where one thing happened, and the reader's eye would have nowhere to land.\n * The digits are matched from the right, so a number growing a place pushes the new digit in\n * at the front rather than shifting the meaning of every column.\n *\n * **The direction is the fact, and the motion is only what makes it noticeable.** Under\n * `prefers-reduced-motion` the roll collapses and the number simply is what it is — which is\n * the correct answer rather than a degraded one. A reader who saw 3 and now sees 5 knows\n * which way it went; what the roll buys is catching the eye of a reader who was not looking,\n * and catching the eye is exactly what that preference is asking you not to do.\n *\n * **The value is text.** The digit on screen is a real text node and the outgoing copy is\n * `aria-hidden` and out of flow, so a screen reader and a selection both get the number and\n * not a column of two. Nothing announces: a counter with a live region on it is a counter\n * that reads the whole dashboard out loud every few seconds.\n */\nexport function NumberFlow({\n value,\n format = DEFAULT_FORMAT,\n size = \"md\",\n className,\n ...rest\n}: NumberFlowProps) {\n const text = format(value);\n\n /*\n * Derived while rendering: an effect runs after paint, so the roll would start from a\n * frame in which the new digits were already sitting in their slots.\n *\n * `was` is the whole previous string rather than a per-slot flag, because which slots\n * changed is a function of both strings and their lengths — and it is cleared when the\n * roll ends, which is also what turns every slot back into a plain digit.\n */\n const [shown, setShown] = useState<{\n text: string;\n value: number;\n was?: string;\n direction: \"up\" | \"down\";\n turn: number;\n }>({ text, value, direction: \"up\", turn: 0 });\n\n if (shown.text !== text) {\n setShown((last) => ({\n text,\n value,\n was: last.text,\n /* Equal values that format differently roll the way the last change did. */\n direction: value === last.value ? last.direction : value > last.value ? \"up\" : \"down\",\n turn: last.turn + 1,\n }));\n }\n\n /*\n * Right-aligned correspondence. `100` against `99` puts the two nines under the two\n * trailing digits and leaves the leading `1` with no partner — which is a digit arriving,\n * not a digit changing, and it rolls in from the same side either way.\n */\n const offset = shown.was === undefined ? 0 : shown.text.length - shown.was.length;\n const before = (index: number) =>\n shown.was === undefined ? shown.text[index] : shown.was[index - offset];\n\n return (\n <data\n {...rest}\n className={`number-flow ${className ?? \"\"}`.trim()}\n value={String(value)}\n data-size={size}\n data-direction={shown.direction}\n >\n {Array.from(shown.text, (character, index) => {\n const was = before(index);\n const changed = was !== character;\n return (\n <span\n /*\n * Keyed by the pair, so a slot re-mounts — and its animation runs again — only\n * when that column is actually showing something else. A key carrying the turn\n * number would restart every column on every change.\n */\n key={`${index}:${was ?? \"\"}>${character}`}\n className=\"number-flow__slot\"\n data-part=\"slot\"\n data-changed={changed ? \"\" : undefined}\n /*\n * On the slot rather than on the outgoing digit, because a column can change\n * without having had anything in it — the leading `1` of `100` after `99`. The\n * event bubbles from whichever of the two ends first; they share a duration, and\n * clearing an already-cleared exchange is a no-op.\n */\n onAnimationEnd={\n changed ? () => setShown((last) => ({ ...last, was: undefined })) : undefined\n }\n >\n {changed && was !== undefined ? (\n <span\n className=\"number-flow__digit\"\n data-part=\"was\"\n aria-hidden=\"true\"\n >\n {was}\n </span>\n ) : null}\n <span className=\"number-flow__digit\" data-part=\"is\">\n {character}\n </span>\n </span>\n );\n })}\n </data>\n );\n}\n","import { useState } from \"react\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport { Input, type InputSize } from \"../../common/Input\";\nimport { IconButton } from \"../../common/IconButton\";\nimport \"./PasswordInput.css\";\n\nexport type PasswordInputPurpose = \"current\" | \"new\";\n\ntype PasswordInputBase = {\n /** Names the field for assistive technology when nothing else does. */\n label?: string;\n id?: string;\n name?: string;\n placeholder?: string;\n size?: InputSize;\n /**\n * Signing in, or choosing one.\n *\n * This is the whole of `autocomplete`, and getting it wrong is what makes a password\n * manager fill the sign-in password into a \"new password\" field, or fail to offer to save\n * a new one. `autocomplete=\"off\"` is the version that does both.\n */\n purpose?: PasswordInputPurpose;\n invalid?: boolean;\n disabled?: boolean;\n required?: boolean;\n revealLabel?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * Controlled or uncontrolled, and never half of one.\n *\n * `value` without `onValueChange` is a field that renders what it was given and refuses every\n * keystroke — and because `onChange` is always attached, React does not warn about it. The\n * two arrive together or neither does.\n */\nexport type PasswordInputProps = PasswordInputBase &\n (\n | { value: string; onValueChange: (value: string) => void; defaultValue?: never }\n | { value?: never; defaultValue?: string; onValueChange?: (value: string) => void }\n );\n\n/**\n * A password, and a way to check what you typed.\n *\n * The toggle's name does not change with its state — the rule `ToggleButton` sets. \"비밀번호\n * 표시\" that becomes \"비밀번호 숨기기\" while `aria-pressed` also flips reads as two halves\n * contradicting each other. The name says what the control is for; the attribute says\n * whether it is on. The icon changes, because the icon is for the reader who can see it and\n * is announced to nobody.\n */\nexport function PasswordInput({\n value,\n defaultValue,\n onValueChange,\n label,\n size = \"md\",\n purpose = \"current\",\n disabled,\n revealLabel,\n className,\n ...rest\n}: PasswordInputProps) {\n const [shown, setShown] = useState(false);\n\n return (\n <Input\n {...rest}\n className={`password-input ${className ?? \"\"}`.trim()}\n type={shown ? \"text\" : \"password\"}\n value={value}\n defaultValue={defaultValue}\n onChange={(event) => onValueChange?.(event.target.value)}\n /*\n * Only when there is one.\n *\n * `{...rest}` is spread first, so writing `aria-label={label}` unconditionally set the\n * attribute to `undefined` for a caller who passed their own `aria-label` and no\n * `label` — React drops it, and the field is left with no name at all.\n */\n {...(label === undefined ? {} : { \"aria-label\": label })}\n size={size}\n disabled={disabled}\n autoComplete={purpose === \"new\" ? \"new-password\" : \"current-password\"}\n slotEnd={\n <IconButton\n icon={shown ? EyeOff : Eye}\n label={revealLabel ?? \"비밀번호 표시\"}\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n shape=\"circle\"\n disabled={disabled}\n onClick={() => setShown((current) => !current)}\n aria-pressed={shown}\n data-part=\"reveal\"\n />\n }\n />\n );\n}\n","import { useRef } from \"react\";\nimport type { KeyboardEvent } from \"react\";\nimport { Search, X } from \"lucide-react\";\nimport { Input, type InputSize } from \"../../common/Input\";\nimport { IconButton } from \"../../common/IconButton\";\nimport { Spinner } from \"../../common/Spinner\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./SearchInput.css\";\n\nexport type SearchInputProps = {\n value: string;\n onValueChange: (value: string) => void;\n /** Enter, and the clear button's aftermath. Not fired on every keystroke. */\n onSearch?: (value: string) => void;\n /**\n * What is being searched. \"주문 검색\", \"사람 찾기\".\n *\n * A search field labelled only by its placeholder is a field whose name disappears the\n * moment someone types in it — and placeholders are not names to begin with.\n */\n label: string;\n placeholder?: string;\n size?: InputSize;\n /** A result is on its way. Replaces the clear button rather than crowding beside it. */\n loading?: boolean;\n disabled?: boolean;\n clearLabel?: string;\n name?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A field for finding things.\n *\n * `type=\"search\"`, for the autofill history and the input purpose — but its native clear\n * button is hidden and a real one drawn in its place, because the browser's is not in the\n * tab order and has no name. A control a keyboard cannot reach is a control half the\n * readers of this field do not have.\n */\nexport function SearchInput({\n value,\n onValueChange,\n onSearch,\n label,\n placeholder,\n size = \"md\",\n loading,\n disabled,\n clearLabel,\n name,\n className,\n ...rest\n}: SearchInputProps) {\n const field = useRef<HTMLInputElement>(null);\n\n const clear = () => {\n onValueChange(\"\");\n onSearch?.(\"\");\n /* Focus goes back to the field, not nowhere. A button that removes itself takes the\n * reader's place in the document with it unless somebody says where to put it. */\n field.current?.focus();\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n /* IME confirmation belongs to text composition, including engines using keyCode 229. */\n if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n if (event.key === \"Enter\") {\n event.preventDefault();\n onSearch?.(value);\n }\n if (event.key === \"Escape\" && value) {\n /*\n * Consumed, not just prevented.\n *\n * A dialog listens for Escape on the way up, so one press would clear the field *and*\n * close the dialog around it. The press that empties a field is spent on that field.\n */\n event.preventDefault();\n event.stopPropagation();\n clear();\n }\n };\n\n return (\n <>\n <Input\n {...rest}\n ref={field}\n className={`search-input ${className ?? \"\"}`.trim()}\n type=\"search\"\n name={name}\n value={value}\n onChange={(event) => onValueChange(event.target.value)}\n onKeyDown={onKeyDown}\n aria-label={label}\n placeholder={placeholder}\n size={size}\n disabled={disabled}\n iconStart={Search}\n autoComplete=\"off\"\n slotEnd={\n loading ? (\n /* Unlabelled: the live region below says it, and it was there before the wait\n * started. A `role=\"status\"` that arrives with its own message is a region the\n * screen reader was not watching yet. */\n <Spinner size={size === \"lg\" ? \"md\" : \"sm\"} tone=\"muted\" />\n ) : value ? (\n <IconButton\n icon={X}\n label={clearLabel ?? `${label} 지우기`}\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n shape=\"circle\"\n /* The field is locked; the button that empties it cannot stay live. */\n disabled={disabled}\n onClick={clear}\n data-part=\"clear\"\n />\n ) : undefined\n }\n />\n <VisuallyHidden>\n <span role=\"status\" aria-live=\"polite\" data-part=\"wait\">{loading ? \"찾는 중\" : \"\"}</span>\n </VisuallyHidden>\n </>\n );\n}\n","import type { ReactNode } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./SegmentedControl.css\";\n\nexport type SegmentedControlSize = \"sm\" | \"md\";\nexport type SegmentedControlMotion = \"slide\" | \"none\";\n\nexport type SegmentedControlOption = {\n value: string;\n label: ReactNode;\n icon?: LucideIcon;\n disabled?: boolean;\n};\n\nexport type SegmentedControlProps = {\n /**\n * The name the browser builds the radio group from. Required.\n *\n * Radios with no shared name are not a group: they behave like a row of checkboxes and\n * each announces itself as \"1 of 1\".\n */\n name: string;\n options: SegmentedControlOption[];\n value: string;\n onChange: (value: string) => void;\n /** What the whole control chooses between. \"보기 방식\", \"기간\". */\n label: string;\n size?: SegmentedControlSize;\n /** The thumb slides between segments, or the segments simply fill. */\n motion?: SegmentedControlMotion;\n fullWidth?: boolean;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A few alternatives, all visible, one chosen.\n *\n * Real radios underneath, clipped the way Checkbox and Radio clip theirs. That is what makes\n * arrow keys move between segments and Tab skip past the whole control — the behaviour a\n * reader expects from a group of alternatives, and the behaviour that is hardest to rebuild\n * out of buttons.\n *\n * More than about six alternatives and this stops being the right control: the segments turn\n * into slivers and a `Select` is what the reader wanted.\n */\nexport function SegmentedControl({\n name,\n options,\n value,\n onChange,\n label,\n size = \"md\",\n motion = \"slide\",\n fullWidth,\n disabled,\n className,\n ...rest\n}: SegmentedControlProps) {\n const index = options.findIndex((option) => option.value === value);\n\n return (\n <div\n {...rest}\n className={`segmented-control ${className ?? \"\"}`.trim()}\n role=\"radiogroup\"\n aria-label={label}\n data-size={size}\n data-motion={motion}\n data-count={options.length}\n data-full={fullWidth ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n >\n {/* Drawn first so it sits behind the labels: it is the ground the chosen segment\n * stands on, not a lid over it. */}\n <span className=\"segmented-control__thumb\" data-hidden={index < 0 ? \"\" : undefined} aria-hidden=\"true\" />\n {options.map((option) => (\n <label className=\"segmented-control__option\" key={option.value}>\n <input\n type=\"radio\"\n className=\"segmented-control__input\"\n name={name}\n value={option.value}\n checked={option.value === value}\n disabled={disabled || option.disabled}\n onChange={() => onChange(option.value)}\n />\n <span className=\"segmented-control__face\">\n {option.icon ? <Icon icon={option.icon} size={size === \"sm\" ? \"xs\" : \"sm\"} /> : null}\n <span className=\"segmented-control__text\">{option.label}</span>\n </span>\n </label>\n ))}\n </div>\n );\n}\n","import type { MouseEvent } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Button, type ButtonShape, type ButtonSize, type ButtonTone, type ButtonVariant } from \"../../common/Button\";\nimport { IconButton } from \"../../common/IconButton\";\nimport { ButtonGroup } from \"../ButtonGroup\";\nimport \"./SplitButton.css\";\n\nexport type SplitButtonProps = {\n /** The action itself, said in words. Pressing the left half does this and nothing else. */\n children: string;\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n /** Opens whatever holds the alternatives. This component does not own that list. */\n onMenuToggle: () => void;\n menuOpen?: boolean;\n /**\n * What the right half is called.\n *\n * Defaulted from the action, because \"더 보기\" on its own is a button a reader meets with\n * no idea what it will show them. Three split buttons on a page would give three of them.\n */\n menuLabel?: string;\n /** The id of the list this opens, once something is rendering one. */\n menuId?: string;\n variant?: ButtonVariant;\n tone?: ButtonTone;\n size?: ButtonSize;\n shape?: ButtonShape;\n icon?: LucideIcon;\n loading?: boolean;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * One action, and a way to reach the others.\n *\n * Two buttons, not one button with two halves: the left half does the thing, the right half\n * opens a list, and they are separately reachable, separately named and separately\n * announced. A single control that does one thing when clicked on the left and another when\n * clicked on the right is not reachable by keyboard at all.\n *\n * The list itself is not here. `Menu` belongs to the next layer, and a component that\n * shipped half a menu to avoid waiting for it would be a component nobody could replace.\n */\nexport function SplitButton({\n children,\n onClick,\n onMenuToggle,\n menuOpen,\n menuLabel,\n menuId,\n variant = \"solid\",\n tone = \"accent\",\n size = \"md\",\n shape = \"rounded\",\n icon,\n loading,\n disabled,\n className,\n ...rest\n}: SplitButtonProps) {\n return (\n <ButtonGroup\n {...rest}\n label={`${children} 및 다른 선택지`}\n className={`split-button ${className ?? \"\"}`.trim()}\n data-size={size}\n >\n <Button\n variant={variant}\n tone={tone}\n size={size}\n shape={shape}\n iconStart={icon}\n loading={loading}\n disabled={disabled}\n onClick={onClick}\n >\n {children}\n </Button>\n <IconButton\n icon={ChevronDown}\n label={menuLabel ?? `${children} 옵션 열기`}\n variant={variant}\n tone={tone}\n size={size}\n shape={shape}\n disabled={disabled}\n onClick={onMenuToggle}\n aria-haspopup=\"menu\"\n aria-expanded={menuOpen ?? false}\n aria-controls={menuId}\n data-part=\"menu\"\n />\n </ButtonGroup>\n );\n}\n","import { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./StatusDot.css\";\n\nexport type StatusDotTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\nexport type StatusDotSize = \"sm\" | \"md\";\n\nexport type StatusDotProps = {\n /**\n * What the dot means, in words. Required, and it is the whole reason this component\n * exists rather than a `<span>` with a background colour.\n *\n * A coloured circle is a state to a reader who can separate green from amber and nothing\n * at all to one who cannot — about one man in twelve for the first, and everyone using a\n * screen reader for the second. The words may be hidden from the screen; they may not be\n * absent.\n */\n label: string;\n tone?: StatusDotTone;\n size?: StatusDotSize;\n /** Leave the words to assistive technology alone. The dot still says them. */\n labelHidden?: boolean;\n /**\n * A slow pulse, for a state that is still happening rather than settled.\n *\n * Stops entirely under `prefers-reduced-motion` — see the note in the stylesheet.\n */\n pulse?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * The smallest thing a badge can be: a state, as a dot and a word.\n */\nexport function StatusDot({\n label,\n tone = \"neutral\",\n size = \"md\",\n labelHidden,\n pulse,\n className,\n ...rest\n}: StatusDotProps) {\n return (\n <span\n {...rest}\n className={`status-dot ${className ?? \"\"}`.trim()}\n data-tone={tone}\n data-size={size}\n data-pulse={pulse ? \"\" : undefined}\n >\n <span className=\"status-dot__mark\" aria-hidden=\"true\" />\n {labelHidden ? (\n <VisuallyHidden>{label}</VisuallyHidden>\n ) : (\n <span className=\"status-dot__label\">{label}</span>\n )}\n </span>\n );\n}\n","import { useId, useRef, useState } from \"react\";\nimport type { FocusEvent, KeyboardEvent, PointerEvent } from \"react\";\nimport { Tag } from \"../Tag\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./TagInput.css\";\n\nexport type TagInputSize = \"sm\" | \"md\";\n\nexport type TagInputProps = {\n value: string[];\n onValueChange: (value: string[]) => void;\n /** What is being listed. \"받는 사람\", \"기술 태그\", \"초대할 사람\". */\n label: string;\n placeholder?: string;\n /** How many, at most. The field stops accepting rather than silently dropping. */\n max?: number;\n size?: TagInputSize;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A list of short values, typed one at a time.\n *\n * This one builds its own box rather than borrowing `Input`'s, and that is the difference\n * between it and the other three fields in this layer. `Input` is a single row that centres\n * its contents; this grows downwards as the list fills, and forcing that shape onto a\n * component whose whole construction assumes one line would break it for everything else\n * that uses it.\n *\n * What is typed is not yet a value. Enter and comma make it one; Backspace in an empty field\n * takes the last one back — the two gestures every reader already tries.\n */\nexport function TagInput({\n value,\n onValueChange,\n label,\n placeholder,\n max,\n size = \"md\",\n disabled,\n className,\n ...rest\n}: TagInputProps) {\n const [draft, setDraft] = useState(\"\");\n /* What just happened, for a reader who cannot see it happen. Without this, pressing Enter\n * does nothing that reaches assistive technology at all. */\n const [announcement, setAnnouncement] = useState(\"\");\n const field = useRef<HTMLInputElement>(null);\n const root = useRef<HTMLDivElement>(null);\n const hintId = useId();\n\n const full = max !== undefined && value.length >= max;\n\n const add = (raw: string) => {\n const entry = raw.trim();\n if (!entry) return;\n if (full) {\n setAnnouncement(`${max}개까지만 넣을 수 있습니다`);\n return;\n }\n if (value.includes(entry)) {\n setAnnouncement(`${entry}은(는) 이미 있습니다`);\n setDraft(\"\");\n return;\n }\n onValueChange([...value, entry]);\n setAnnouncement(`${entry} 추가됨`);\n setDraft(\"\");\n };\n\n const remove = (entry: string) => {\n onValueChange(value.filter((item) => item !== entry));\n setAnnouncement(`${entry} 제거됨`);\n /* The tag that held the focus has just stopped existing. Somewhere has to be named, or\n * the reader is returned to the top of the document. */\n field.current?.focus();\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n /*\n * An IME is mid-word, and its Enter belongs to the composition.\n *\n * Korean is composed syllable by syllable, and the Enter that commits `한` is the same\n * keystroke that would commit the tag. Reading it as a tag turns every half-typed word\n * into a value the reader did not ask for. `Composer` guards the same way.\n */\n if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n if (event.key === \"Enter\" || event.key === \",\") {\n event.preventDefault();\n add(draft);\n return;\n }\n if (event.key === \"Backspace\" && draft === \"\" && value.length > 0) {\n event.preventDefault();\n remove(value[value.length - 1]);\n }\n };\n\n /*\n * Leaving for a remove button inside this field is not leaving the field.\n *\n * Without this the blur commits the draft, and the click that follows filters the list it\n * captured *before* that commit — so the tag the reader just made disappears again.\n */\n const onBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (root.current?.contains(event.relatedTarget)) return;\n add(draft);\n };\n\n /* The box says `cursor: text`, so pressing its empty part has to reach the field. */\n const onPointerDown = (event: PointerEvent<HTMLDivElement>) => {\n if (disabled || event.target !== event.currentTarget) return;\n event.preventDefault();\n field.current?.focus();\n };\n\n return (\n <div\n {...rest}\n ref={root}\n onPointerDown={onPointerDown}\n className={`tag-input ${className ?? \"\"}`.trim()}\n data-size={size}\n data-disabled={disabled ? \"\" : undefined}\n role=\"group\"\n aria-label={label}\n >\n <ul className=\"tag-input__list\">\n {value.map((entry) => (\n <li key={entry}>\n <Tag\n size=\"sm\"\n shape=\"pill\"\n disabled={disabled}\n onRemove={() => remove(entry)}\n removeLabel={`${entry} 제거`}\n >\n {entry}\n </Tag>\n </li>\n ))}\n </ul>\n <input\n ref={field}\n className=\"tag-input__control\"\n type=\"text\"\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={onKeyDown}\n /* Committed on the way out too. A value left in the box when the reader tabs away is\n * a value they believe they entered. */\n onBlur={onBlur}\n placeholder={value.length === 0 ? placeholder : undefined}\n aria-label={label}\n aria-describedby={hintId}\n disabled={disabled}\n autoComplete=\"off\"\n data-part=\"entry\"\n />\n <VisuallyHidden>\n <span id={hintId}>\n 엔터나 쉼표로 추가합니다. 빈 칸에서 백스페이스를 누르면 마지막 것이 지워집니다.\n {max !== undefined ? ` ${max}개까지 넣을 수 있습니다.` : \"\"}\n </span>\n </VisuallyHidden>\n <VisuallyHidden>\n <span role=\"status\" aria-live=\"polite\" data-part=\"announcer\">{announcement}</span>\n </VisuallyHidden>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAmCA,SAAgB,EAAY,EAC1B,aACA,UACA,iBAAc,cACd,cAAW,IACX,cACA,GAAG,KACgB;CACnB,OACE,kBAAC,OAAD;EACE,GAAI;EACJ,WAAW,gBAAgB,KAAa,KAAK,KAAK;EAClD,MAAK;EACL,cAAY;EACZ,oBAAkB;EAClB,iBAAe,IAAW,KAAK,KAAA;EAE9B;CACE,CAAA;AAET;;;ACPA,SAAgB,EAAW,EACzB,UAAO,SACP,UACA,gBACA,SACA,UACA,eAAY,SACZ,UAAO,MACP,aACA,YACA,cACA,GAAG,KACe;CAGlB,IAAM,IAAa,GAAa,MAAkC;EAChE,AAAI,MAAM,EAAK,gBAAgB;CACjC,GAAG,CAAC,CAAC,GAEC,IACJ,kBAAC,QAAD;EAAM,WAAU;EAAoB,eAAY;EAC7C,UAAA,MAAS,aAAa,kBAAC,GAAD;GAAM,MAAM;GAAO,MAAM,MAAS,OAAO,OAAO;EAAO,CAA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A,CAAkB,iDAEf,MAAQ,KAAA,IAAsC,KAA1B,IAAI,EAAI,eACzB;GACQ,CAAA,EAAA,CAAA;GAChB,kBAAC,GAAD,EAAA,UACE,kBAAC,QAAD;IAAM,MAAK;IAAS,aAAU;IAAS,aAAU;IAAa,UAAA;GAAmB,CAAA,EACnE,CAAA;EACb;;AAET"}
1
+ {"version":3,"file":"TagInput-BcSSnJY_.js","names":[],"sources":["../../src/components/derived/ButtonGroup/ButtonGroup.tsx","../../src/components/derived/ChoiceCard/ChoiceCard.tsx","../../src/components/derived/NumberFlow/NumberFlow.tsx","../../src/components/derived/PasswordInput/PasswordInput.tsx","../../src/components/derived/SearchInput/SearchInput.tsx","../../src/components/derived/SegmentedControl/SegmentedControl.tsx","../../src/components/derived/SplitButton/SplitButton.tsx","../../src/components/derived/StatusDot/StatusDot.tsx","../../src/components/derived/TagInput/TagInput.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport \"./ButtonGroup.css\";\n\nexport type ButtonGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport type ButtonGroupProps = {\n children: ReactNode;\n /**\n * What the group is for. \"보기 방식\", \"저장 옵션\".\n *\n * A `role=\"group\"` with no name is a container a reader is told they have entered and not\n * told the purpose of. Naming it is the only thing the role buys.\n */\n label: string;\n orientation?: ButtonGroupOrientation;\n /**\n * Joined into one shape, or spaced apart.\n *\n * Joined says the actions are alternatives to one another. Spaced says they merely happen\n * to be next to each other — which is what a row of unrelated buttons is, and drawing that\n * as one shape tells the reader something untrue.\n */\n attached?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * Buttons that belong together.\n *\n * Every button keeps its own tab stop. A roving tabindex — one stop for the whole group,\n * arrow keys inside — is for a toolbar, where the group is a destination; these are separate\n * actions that happen to be adjacent, and taking away their tab stops would hide all but one\n * of them from a keyboard.\n */\nexport function ButtonGroup({\n children,\n label,\n orientation = \"horizontal\",\n attached = true,\n className,\n ...rest\n}: ButtonGroupProps) {\n return (\n <div\n {...rest}\n className={`button-group ${className ?? \"\"}`.trim()}\n role=\"group\"\n aria-label={label}\n data-orientation={orientation}\n data-attached={attached ? \"\" : undefined}\n >\n {children}\n </div>\n );\n}\n","import { useCallback } from \"react\";\nimport type { ChangeEvent, ReactNode } from \"react\";\nimport { Check } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./ChoiceCard.css\";\n\nexport type ChoiceCardType = \"radio\" | \"checkbox\";\nexport type ChoiceCardSize = \"sm\" | \"md\";\nexport type ChoiceCardIndicator = \"start\" | \"end\" | \"none\";\n\nexport type ChoiceCardProps = {\n /**\n * One of several, or any of several.\n *\n * The two are not interchangeable and the shape says which: a circle means the reader may\n * pick one, a square means they may pick more. Drawing a radio square is a small decision\n * about a border-radius that changes what the control means.\n */\n type?: ChoiceCardType;\n /** Required for a radio — the browser builds the group from it. */\n name?: string;\n value?: string;\n checked?: boolean;\n defaultChecked?: boolean;\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n title: ReactNode;\n description?: ReactNode;\n icon?: LucideIcon;\n /** The end of the row — a price, a badge, a count. */\n aside?: ReactNode;\n /** Where the mark sits, or that the card shows its state by its border alone. */\n indicator?: ChoiceCardIndicator;\n size?: ChoiceCardSize;\n disabled?: boolean;\n invalid?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A choice with room to explain itself.\n *\n * The whole card is the label, so the whole card is the target — which is the only reason to\n * draw a choice as a card rather than as a line of text with a dot beside it. A card whose\n * hit area is the 20px circle in its corner is a card that looks generous and is not.\n */\nexport function ChoiceCard({\n type = \"radio\",\n title,\n description,\n icon,\n aside,\n indicator = \"start\",\n size = \"md\",\n disabled,\n invalid,\n className,\n ...rest\n}: ChoiceCardProps) {\n /* `indeterminate` is deliberately absent. A card carries a title and a description, and a\n * third state that means \"some of what this stands for\" has nothing to say about one. */\n const setNothing = useCallback((node: HTMLInputElement | null) => {\n if (node) node.indeterminate = false;\n }, []);\n\n const mark = (\n <span className=\"choice-card__mark\" aria-hidden=\"true\">\n {type === \"checkbox\" ? <Icon icon={Check} size={size === \"sm\" ? \"xs\" : \"sm\"} /> : null}\n </span>\n );\n\n return (\n <label\n className={`choice-card ${className ?? \"\"}`.trim()}\n data-type={type}\n data-size={size}\n data-indicator={indicator}\n data-disabled={disabled ? \"\" : undefined}\n data-invalid={invalid ? \"\" : undefined}\n >\n <input\n {...rest}\n ref={setNothing}\n type={type}\n className=\"choice-card__input\"\n disabled={disabled}\n aria-invalid={invalid || undefined}\n />\n {indicator === \"start\" ? mark : null}\n {icon ? (\n <span className=\"choice-card__icon\" aria-hidden=\"true\">\n <Icon icon={icon} size={size === \"sm\" ? \"sm\" : \"md\"} />\n </span>\n ) : null}\n <span className=\"choice-card__body\">\n <span className=\"choice-card__title\">{title}</span>\n {description ? <span className=\"choice-card__description\">{description}</span> : null}\n </span>\n {aside ? <span className=\"choice-card__aside\">{aside}</span> : null}\n {indicator === \"end\" ? mark : null}\n </label>\n );\n}\n","import { useState } from \"react\";\nimport \"./NumberFlow.css\";\n\nexport type NumberFlowSize = \"sm\" | \"md\" | \"lg\";\n\nexport type NumberFlowProps = {\n /** The number that is true now. Change it and the digits that changed roll. */\n value: number;\n /**\n * How the number is written. Locale, currency, unit, rounding — all of it the host's.\n *\n * Defaults to the digits and nothing else. A component that reached for\n * `toLocaleString()` on its own would be a component that picked a locale for an adopter\n * who had already picked one, and the disagreement would show up on one screen out of\n * forty. `PriceDisplay` draws the same line.\n */\n format?: (value: number) => string;\n /**\n * How big the number is, and it is the subject of its box at every step.\n *\n * The three steps land on `--text-md`, `--text-xl` and `--text-3xl` — two apart on the\n * type scale each time, because a number one step above the words around it reads as a\n * misprint rather than as a hierarchy. `docs/DESIGN.md` §5 measured why this matters:\n * eight sizes exist and three of them carry 89% of the library.\n */\n size?: NumberFlowSize;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nconst DEFAULT_FORMAT = (value: number) => String(value);\n\n/**\n * A number that changed, and which way it went.\n *\n * **Only the digits that changed move.** 99 → 100 rolls three places; 100 → 101 rolls one.\n * A component that re-ran every digit on every change would be saying \"all of this is new\"\n * about a number where one thing happened, and the reader's eye would have nowhere to land.\n * The digits are matched from the right, so a number growing a place pushes the new digit in\n * at the front rather than shifting the meaning of every column.\n *\n * **The direction is the fact, and the motion is only what makes it noticeable.** Under\n * `prefers-reduced-motion` the roll collapses and the number simply is what it is — which is\n * the correct answer rather than a degraded one. A reader who saw 3 and now sees 5 knows\n * which way it went; what the roll buys is catching the eye of a reader who was not looking,\n * and catching the eye is exactly what that preference is asking you not to do.\n *\n * **The value is text.** The digit on screen is a real text node and the outgoing copy is\n * `aria-hidden` and out of flow, so a screen reader and a selection both get the number and\n * not a column of two. Nothing announces: a counter with a live region on it is a counter\n * that reads the whole dashboard out loud every few seconds.\n */\nexport function NumberFlow({\n value,\n format = DEFAULT_FORMAT,\n size = \"md\",\n className,\n ...rest\n}: NumberFlowProps) {\n const text = format(value);\n\n /*\n * Derived while rendering: an effect runs after paint, so the roll would start from a\n * frame in which the new digits were already sitting in their slots.\n *\n * `was` is the whole previous string rather than a per-slot flag, because which slots\n * changed is a function of both strings and their lengths — and it is cleared when the\n * roll ends, which is also what turns every slot back into a plain digit.\n */\n const [shown, setShown] = useState<{\n text: string;\n value: number;\n was?: string;\n direction: \"up\" | \"down\";\n turn: number;\n }>({ text, value, direction: \"up\", turn: 0 });\n\n if (shown.text !== text) {\n setShown((last) => ({\n text,\n value,\n was: last.text,\n /* Equal values that format differently roll the way the last change did. */\n direction: value === last.value ? last.direction : value > last.value ? \"up\" : \"down\",\n turn: last.turn + 1,\n }));\n }\n\n /*\n * Right-aligned correspondence. `100` against `99` puts the two nines under the two\n * trailing digits and leaves the leading `1` with no partner — which is a digit arriving,\n * not a digit changing, and it rolls in from the same side either way.\n */\n const offset = shown.was === undefined ? 0 : shown.text.length - shown.was.length;\n const before = (index: number) =>\n shown.was === undefined ? shown.text[index] : shown.was[index - offset];\n\n return (\n <data\n {...rest}\n className={`number-flow ${className ?? \"\"}`.trim()}\n value={String(value)}\n data-size={size}\n data-direction={shown.direction}\n >\n {Array.from(shown.text, (character, index) => {\n const was = before(index);\n const changed = was !== character;\n return (\n <span\n /*\n * Keyed by the pair, so a slot re-mounts — and its animation runs again — only\n * when that column is actually showing something else. A key carrying the turn\n * number would restart every column on every change.\n */\n key={`${index}:${was ?? \"\"}>${character}`}\n className=\"number-flow__slot\"\n data-part=\"slot\"\n data-changed={changed ? \"\" : undefined}\n /*\n * On the slot rather than on the outgoing digit, because a column can change\n * without having had anything in it — the leading `1` of `100` after `99`. The\n * event bubbles from whichever of the two ends first; they share a duration, and\n * clearing an already-cleared exchange is a no-op.\n */\n onAnimationEnd={\n changed ? () => setShown((last) => ({ ...last, was: undefined })) : undefined\n }\n >\n {changed && was !== undefined ? (\n <span\n className=\"number-flow__digit\"\n data-part=\"was\"\n aria-hidden=\"true\"\n >\n {was}\n </span>\n ) : null}\n <span className=\"number-flow__digit\" data-part=\"is\">\n {character}\n </span>\n </span>\n );\n })}\n </data>\n );\n}\n","import { useState } from \"react\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport { Input, type InputSize } from \"../../common/Input\";\nimport { IconButton } from \"../../common/IconButton\";\nimport \"./PasswordInput.css\";\n\nexport type PasswordInputPurpose = \"current\" | \"new\";\n\ntype PasswordInputBase = {\n /** Names the field for assistive technology when nothing else does. */\n label?: string;\n id?: string;\n name?: string;\n placeholder?: string;\n size?: InputSize;\n /**\n * Signing in, or choosing one.\n *\n * This is the whole of `autocomplete`, and getting it wrong is what makes a password\n * manager fill the sign-in password into a \"new password\" field, or fail to offer to save\n * a new one. `autocomplete=\"off\"` is the version that does both.\n */\n purpose?: PasswordInputPurpose;\n invalid?: boolean;\n disabled?: boolean;\n required?: boolean;\n revealLabel?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * Controlled or uncontrolled, and never half of one.\n *\n * `value` without `onValueChange` is a field that renders what it was given and refuses every\n * keystroke — and because `onChange` is always attached, React does not warn about it. The\n * two arrive together or neither does.\n */\nexport type PasswordInputProps = PasswordInputBase &\n (\n | { value: string; onValueChange: (value: string) => void; defaultValue?: never }\n | { value?: never; defaultValue?: string; onValueChange?: (value: string) => void }\n );\n\n/**\n * A password, and a way to check what you typed.\n *\n * The toggle's name does not change with its state — the rule `ToggleButton` sets. \"비밀번호\n * 표시\" that becomes \"비밀번호 숨기기\" while `aria-pressed` also flips reads as two halves\n * contradicting each other. The name says what the control is for; the attribute says\n * whether it is on. The icon changes, because the icon is for the reader who can see it and\n * is announced to nobody.\n */\nexport function PasswordInput({\n value,\n defaultValue,\n onValueChange,\n label,\n size = \"md\",\n purpose = \"current\",\n disabled,\n revealLabel,\n className,\n ...rest\n}: PasswordInputProps) {\n const [shown, setShown] = useState(false);\n\n return (\n <Input\n {...rest}\n className={`password-input ${className ?? \"\"}`.trim()}\n type={shown ? \"text\" : \"password\"}\n value={value}\n defaultValue={defaultValue}\n onChange={(event) => onValueChange?.(event.target.value)}\n /*\n * Only when there is one.\n *\n * `{...rest}` is spread first, so writing `aria-label={label}` unconditionally set the\n * attribute to `undefined` for a caller who passed their own `aria-label` and no\n * `label` — React drops it, and the field is left with no name at all.\n */\n {...(label === undefined ? {} : { \"aria-label\": label })}\n size={size}\n disabled={disabled}\n autoComplete={purpose === \"new\" ? \"new-password\" : \"current-password\"}\n slotEnd={\n <IconButton\n icon={shown ? EyeOff : Eye}\n label={revealLabel ?? \"비밀번호 표시\"}\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n shape=\"circle\"\n disabled={disabled}\n onClick={() => setShown((current) => !current)}\n aria-pressed={shown}\n data-part=\"reveal\"\n />\n }\n />\n );\n}\n","import { useRef } from \"react\";\nimport type { KeyboardEvent } from \"react\";\nimport { Search, X } from \"lucide-react\";\nimport { Input, type InputSize } from \"../../common/Input\";\nimport { IconButton } from \"../../common/IconButton\";\nimport { Spinner } from \"../../common/Spinner\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./SearchInput.css\";\n\nexport type SearchInputProps = {\n value: string;\n onValueChange: (value: string) => void;\n /** Enter, and the clear button's aftermath. Not fired on every keystroke. */\n onSearch?: (value: string) => void;\n /**\n * What is being searched. \"주문 검색\", \"사람 찾기\".\n *\n * A search field labelled only by its placeholder is a field whose name disappears the\n * moment someone types in it — and placeholders are not names to begin with.\n */\n label: string;\n placeholder?: string;\n size?: InputSize;\n /** A result is on its way. Replaces the clear button rather than crowding beside it. */\n loading?: boolean;\n disabled?: boolean;\n clearLabel?: string;\n name?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A field for finding things.\n *\n * `type=\"search\"`, for the autofill history and the input purpose — but its native clear\n * button is hidden and a real one drawn in its place, because the browser's is not in the\n * tab order and has no name. A control a keyboard cannot reach is a control half the\n * readers of this field do not have.\n */\nexport function SearchInput({\n value,\n onValueChange,\n onSearch,\n label,\n placeholder,\n size = \"md\",\n loading,\n disabled,\n clearLabel,\n name,\n className,\n ...rest\n}: SearchInputProps) {\n const field = useRef<HTMLInputElement>(null);\n\n const clear = () => {\n onValueChange(\"\");\n onSearch?.(\"\");\n /* Focus goes back to the field, not nowhere. A button that removes itself takes the\n * reader's place in the document with it unless somebody says where to put it. */\n field.current?.focus();\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n /* IME confirmation belongs to text composition, including engines using keyCode 229. */\n if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n if (event.key === \"Enter\") {\n event.preventDefault();\n onSearch?.(value);\n }\n if (event.key === \"Escape\" && value) {\n /*\n * Consumed, not just prevented.\n *\n * A dialog listens for Escape on the way up, so one press would clear the field *and*\n * close the dialog around it. The press that empties a field is spent on that field.\n */\n event.preventDefault();\n event.stopPropagation();\n clear();\n }\n };\n\n return (\n <>\n <Input\n {...rest}\n ref={field}\n className={`search-input ${className ?? \"\"}`.trim()}\n type=\"search\"\n name={name}\n value={value}\n onChange={(event) => onValueChange(event.target.value)}\n onKeyDown={onKeyDown}\n aria-label={label}\n placeholder={placeholder}\n size={size}\n disabled={disabled}\n iconStart={Search}\n autoComplete=\"off\"\n slotEnd={\n loading ? (\n /* Unlabelled: the live region below says it, and it was there before the wait\n * started. A `role=\"status\"` that arrives with its own message is a region the\n * screen reader was not watching yet. */\n <Spinner size={size === \"lg\" ? \"md\" : \"sm\"} tone=\"muted\" />\n ) : value ? (\n <IconButton\n icon={X}\n label={clearLabel ?? `${label} 지우기`}\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n shape=\"circle\"\n /* The field is locked; the button that empties it cannot stay live. */\n disabled={disabled}\n onClick={clear}\n data-part=\"clear\"\n />\n ) : undefined\n }\n />\n <VisuallyHidden>\n <span role=\"status\" aria-live=\"polite\" data-part=\"wait\">{loading ? \"찾는 중\" : \"\"}</span>\n </VisuallyHidden>\n </>\n );\n}\n","import type { ReactNode } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./SegmentedControl.css\";\n\nexport type SegmentedControlSize = \"sm\" | \"md\";\nexport type SegmentedControlMotion = \"slide\" | \"none\";\n\nexport type SegmentedControlOption = {\n value: string;\n label: ReactNode;\n icon?: LucideIcon;\n disabled?: boolean;\n};\n\nexport type SegmentedControlProps = {\n /**\n * The name the browser builds the radio group from. Required.\n *\n * Radios with no shared name are not a group: they behave like a row of checkboxes and\n * each announces itself as \"1 of 1\".\n */\n name: string;\n options: SegmentedControlOption[];\n value: string;\n onChange: (value: string) => void;\n /** What the whole control chooses between. \"보기 방식\", \"기간\". */\n label: string;\n size?: SegmentedControlSize;\n /** The thumb slides between segments, or the segments simply fill. */\n motion?: SegmentedControlMotion;\n fullWidth?: boolean;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A few alternatives, all visible, one chosen.\n *\n * Real radios underneath, clipped the way Checkbox and Radio clip theirs. That is what makes\n * arrow keys move between segments and Tab skip past the whole control — the behaviour a\n * reader expects from a group of alternatives, and the behaviour that is hardest to rebuild\n * out of buttons.\n *\n * More than about six alternatives and this stops being the right control: the segments turn\n * into slivers and a `Select` is what the reader wanted.\n */\nexport function SegmentedControl({\n name,\n options,\n value,\n onChange,\n label,\n size = \"md\",\n motion = \"slide\",\n fullWidth,\n disabled,\n className,\n ...rest\n}: SegmentedControlProps) {\n const index = options.findIndex((option) => option.value === value);\n\n return (\n <div\n {...rest}\n className={`segmented-control ${className ?? \"\"}`.trim()}\n role=\"radiogroup\"\n aria-label={label}\n data-size={size}\n data-motion={motion}\n data-count={options.length}\n data-full={fullWidth ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n >\n {/* Drawn first so it sits behind the labels: it is the ground the chosen segment\n * stands on, not a lid over it. */}\n <span className=\"segmented-control__thumb\" data-hidden={index < 0 ? \"\" : undefined} aria-hidden=\"true\" />\n {options.map((option) => (\n <label className=\"segmented-control__option\" key={option.value}>\n <input\n type=\"radio\"\n className=\"segmented-control__input\"\n name={name}\n value={option.value}\n checked={option.value === value}\n disabled={disabled || option.disabled}\n onChange={() => onChange(option.value)}\n />\n <span className=\"segmented-control__face\">\n {option.icon ? <Icon icon={option.icon} size={size === \"sm\" ? \"xs\" : \"sm\"} /> : null}\n <span className=\"segmented-control__text\">{option.label}</span>\n </span>\n </label>\n ))}\n </div>\n );\n}\n","import type { MouseEvent } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Button, type ButtonShape, type ButtonSize, type ButtonTone, type ButtonVariant } from \"../../common/Button\";\nimport { IconButton } from \"../../common/IconButton\";\nimport { ButtonGroup } from \"../ButtonGroup\";\nimport \"./SplitButton.css\";\n\nexport type SplitButtonProps = {\n /** The action itself, said in words. Pressing the left half does this and nothing else. */\n children: string;\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n /** Opens whatever holds the alternatives. This component does not own that list. */\n onMenuToggle: () => void;\n menuOpen?: boolean;\n /**\n * What the right half is called.\n *\n * Defaulted from the action, because \"더 보기\" on its own is a button a reader meets with\n * no idea what it will show them. Three split buttons on a page would give three of them.\n */\n menuLabel?: string;\n /** The id of the list this opens, once something is rendering one. */\n menuId?: string;\n variant?: ButtonVariant;\n tone?: ButtonTone;\n size?: ButtonSize;\n shape?: ButtonShape;\n icon?: LucideIcon;\n loading?: boolean;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * One action, and a way to reach the others.\n *\n * Two buttons, not one button with two halves: the left half does the thing, the right half\n * opens a list, and they are separately reachable, separately named and separately\n * announced. A single control that does one thing when clicked on the left and another when\n * clicked on the right is not reachable by keyboard at all.\n *\n * The list itself is not here. `Menu` belongs to the next layer, and a component that\n * shipped half a menu to avoid waiting for it would be a component nobody could replace.\n */\nexport function SplitButton({\n children,\n onClick,\n onMenuToggle,\n menuOpen,\n menuLabel,\n menuId,\n variant = \"solid\",\n tone = \"accent\",\n size = \"md\",\n shape = \"rounded\",\n icon,\n loading,\n disabled,\n className,\n ...rest\n}: SplitButtonProps) {\n return (\n <ButtonGroup\n {...rest}\n label={`${children} 및 다른 선택지`}\n className={`split-button ${className ?? \"\"}`.trim()}\n data-size={size}\n >\n <Button\n variant={variant}\n tone={tone}\n size={size}\n shape={shape}\n iconStart={icon}\n loading={loading}\n disabled={disabled}\n onClick={onClick}\n >\n {children}\n </Button>\n <IconButton\n icon={ChevronDown}\n label={menuLabel ?? `${children} 옵션 열기`}\n variant={variant}\n tone={tone}\n size={size}\n shape={shape}\n disabled={disabled}\n onClick={onMenuToggle}\n aria-haspopup=\"menu\"\n aria-expanded={menuOpen ?? false}\n aria-controls={menuId}\n data-part=\"menu\"\n />\n </ButtonGroup>\n );\n}\n","import { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./StatusDot.css\";\n\nexport type StatusDotTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\nexport type StatusDotSize = \"sm\" | \"md\";\n\nexport type StatusDotProps = {\n /**\n * What the dot means, in words. Required, and it is the whole reason this component\n * exists rather than a `<span>` with a background colour.\n *\n * A coloured circle is a state to a reader who can separate green from amber and nothing\n * at all to one who cannot — about one man in twelve for the first, and everyone using a\n * screen reader for the second. The words may be hidden from the screen; they may not be\n * absent.\n */\n label: string;\n tone?: StatusDotTone;\n size?: StatusDotSize;\n /** Leave the words to assistive technology alone. The dot still says them. */\n labelHidden?: boolean;\n /**\n * A slow pulse, for a state that is still happening rather than settled.\n *\n * Stops entirely under `prefers-reduced-motion` — see the note in the stylesheet.\n */\n pulse?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * The smallest thing a badge can be: a state, as a dot and a word.\n */\nexport function StatusDot({\n label,\n tone = \"neutral\",\n size = \"md\",\n labelHidden,\n pulse,\n className,\n ...rest\n}: StatusDotProps) {\n return (\n <span\n {...rest}\n className={`status-dot ${className ?? \"\"}`.trim()}\n data-tone={tone}\n data-size={size}\n data-pulse={pulse ? \"\" : undefined}\n >\n <span className=\"status-dot__mark\" aria-hidden=\"true\" />\n {labelHidden ? (\n <VisuallyHidden>{label}</VisuallyHidden>\n ) : (\n <span className=\"status-dot__label\">{label}</span>\n )}\n </span>\n );\n}\n","import { useId, useRef, useState } from \"react\";\nimport type { FocusEvent, KeyboardEvent, PointerEvent } from \"react\";\nimport { Tag } from \"../Tag\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./TagInput.css\";\n\nexport type TagInputSize = \"sm\" | \"md\";\n\nexport type TagInputProps = {\n value: string[];\n onValueChange: (value: string[]) => void;\n /** What is being listed. \"받는 사람\", \"기술 태그\", \"초대할 사람\". */\n label: string;\n placeholder?: string;\n /** How many, at most. The field stops accepting rather than silently dropping. */\n max?: number;\n size?: TagInputSize;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A list of short values, typed one at a time.\n *\n * This one builds its own box rather than borrowing `Input`'s, and that is the difference\n * between it and the other three fields in this layer. `Input` is a single row that centres\n * its contents; this grows downwards as the list fills, and forcing that shape onto a\n * component whose whole construction assumes one line would break it for everything else\n * that uses it.\n *\n * What is typed is not yet a value. Enter and comma make it one; Backspace in an empty field\n * takes the last one back — the two gestures every reader already tries.\n */\nexport function TagInput({\n value,\n onValueChange,\n label,\n placeholder,\n max,\n size = \"md\",\n disabled,\n className,\n ...rest\n}: TagInputProps) {\n const [draft, setDraft] = useState(\"\");\n /* What just happened, for a reader who cannot see it happen. Without this, pressing Enter\n * does nothing that reaches assistive technology at all. */\n const [announcement, setAnnouncement] = useState(\"\");\n const field = useRef<HTMLInputElement>(null);\n const root = useRef<HTMLDivElement>(null);\n const hintId = useId();\n\n const full = max !== undefined && value.length >= max;\n\n const add = (raw: string) => {\n const entry = raw.trim();\n if (!entry) return;\n if (full) {\n setAnnouncement(`${max}개까지만 넣을 수 있습니다`);\n return;\n }\n if (value.includes(entry)) {\n setAnnouncement(`${entry}은(는) 이미 있습니다`);\n setDraft(\"\");\n return;\n }\n onValueChange([...value, entry]);\n setAnnouncement(`${entry} 추가됨`);\n setDraft(\"\");\n };\n\n const remove = (entry: string) => {\n onValueChange(value.filter((item) => item !== entry));\n setAnnouncement(`${entry} 제거됨`);\n /* The tag that held the focus has just stopped existing. Somewhere has to be named, or\n * the reader is returned to the top of the document. */\n field.current?.focus();\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n /*\n * An IME is mid-word, and its Enter belongs to the composition.\n *\n * Korean is composed syllable by syllable, and the Enter that commits `한` is the same\n * keystroke that would commit the tag. Reading it as a tag turns every half-typed word\n * into a value the reader did not ask for. `Composer` guards the same way.\n */\n if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n if (event.key === \"Enter\" || event.key === \",\") {\n event.preventDefault();\n add(draft);\n return;\n }\n if (event.key === \"Backspace\" && draft === \"\" && value.length > 0) {\n event.preventDefault();\n remove(value[value.length - 1]);\n }\n };\n\n /*\n * Leaving for a remove button inside this field is not leaving the field.\n *\n * Without this the blur commits the draft, and the click that follows filters the list it\n * captured *before* that commit — so the tag the reader just made disappears again.\n */\n const onBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (root.current?.contains(event.relatedTarget)) return;\n add(draft);\n };\n\n /* The box says `cursor: text`, so pressing its empty part has to reach the field. */\n const onPointerDown = (event: PointerEvent<HTMLDivElement>) => {\n if (disabled || event.target !== event.currentTarget) return;\n event.preventDefault();\n field.current?.focus();\n };\n\n return (\n <div\n {...rest}\n ref={root}\n onPointerDown={onPointerDown}\n className={`tag-input ${className ?? \"\"}`.trim()}\n data-size={size}\n data-disabled={disabled ? \"\" : undefined}\n role=\"group\"\n aria-label={label}\n >\n <ul className=\"tag-input__list\">\n {value.map((entry) => (\n <li key={entry}>\n <Tag\n size=\"sm\"\n shape=\"pill\"\n disabled={disabled}\n onRemove={() => remove(entry)}\n removeLabel={`${entry} 제거`}\n >\n {entry}\n </Tag>\n </li>\n ))}\n </ul>\n <input\n ref={field}\n className=\"tag-input__control\"\n type=\"text\"\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={onKeyDown}\n /* Committed on the way out too. A value left in the box when the reader tabs away is\n * a value they believe they entered. */\n onBlur={onBlur}\n placeholder={value.length === 0 ? placeholder : undefined}\n aria-label={label}\n aria-describedby={hintId}\n disabled={disabled}\n autoComplete=\"off\"\n data-part=\"entry\"\n />\n <VisuallyHidden>\n <span id={hintId}>\n 엔터나 쉼표로 추가합니다. 빈 칸에서 백스페이스를 누르면 마지막 것이 지워집니다.\n {max !== undefined ? ` ${max}개까지 넣을 수 있습니다.` : \"\"}\n </span>\n </VisuallyHidden>\n <VisuallyHidden>\n <span role=\"status\" aria-live=\"polite\" data-part=\"announcer\">{announcement}</span>\n </VisuallyHidden>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAmCA,SAAgB,EA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W,KAAK,KAAA;EAC/B,MAAK;EACL,cAAY;EARd,UAAA;GAUE,kBAAC,MAAD;IAAI,WAAU;IACX,UAAA,EAAM,KAAK,MACV,kBAAC,MAAD,EAAA,UACE,kBAAC,GAAD;KACE,MAAK;KACL,OAAM;KACI;KACV,gBAAgB,EAAO,CAAK;KAC5B,aAAa,GAAG,EAAM;KAErB,UAAA;IACE,CAAA,EACH,GAVK,CAUL,CACL;GACC,CAAA;GACJ,kBAAC,SAAD;IACE,KAAK;IACL,WAAU;IACV,MAAK;IACL,OAAO;IACP,WAAW,MAAU,EAAS,EAAM,OAAO,KAAK;IACrC;IAGH;IACR,aAAa,EAAM,WAAW,IAAI,IAAc,KAAA;IAChD,cAAY;IACZ,oBAAkB;IACR;IACV,cAAa;IACb,aAAU;GACX,CAAA;GACD,kBAAC,GAAD,EAAA,UACE,kBAAC,QAAD;IAAM,IAAI;IAAV,UAAA,CAAkB,iDAEf,MAAQ,KAAA,IAAsC,KAA1B,IAAI,EAAI,eACzB;GACQ,CAAA,EAAA,CAAA;GAChB,kBAAC,GAAD,EAAA,UACE,kBAAC,QAAD;IAAM,MAAK;IAAS,aAAU;IAAS,aAAU;IAAa,UAAA;GAAmB,CAAA,EACnE,CAAA;EACb;;AAET"}
@@ -1,5 +1,5 @@
1
- import { n as e, s as t, t as n } from "./VisuallyHidden-DcE0EFpo.js";
2
- import { n as r, t as i } from "./Input-DzJm1Kv4.js";
1
+ import { n as e, s as t, t as n } from "./VisuallyHidden-Bht2-rdy.js";
2
+ import { n as r, t as i } from "./Input-Bv2FRGIe.js";
3
3
  import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
4
4
  import { useEffect as c, useState as l } from "react";
5
5
  import { Minus as u, Plus as d } from "lucide-react";
@@ -238,4 +238,4 @@ function v({ children: e, pressed: n, onPressedChange: r, variant: i = "outline"
238
238
  //#endregion
239
239
  export { p as a, m as i, _ as n, f as o, g as r, v as t };
240
240
 
241
- //# sourceMappingURL=ToggleButton-r73bokux.js.map
241
+ //# sourceMappingURL=ToggleButton-CcST9ch9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButton-r73bokux.js","names":[],"sources":["../../src/components/derived/AvatarGroup/AvatarGroup.tsx","../../src/components/derived/InputGroup/InputGroup.tsx","../../src/components/derived/MorphIcon/MorphIcon.tsx","../../src/components/derived/NumberInput/NumberInput.tsx","../../src/components/derived/TextCycle/TextCycle.tsx","../../src/components/derived/ToggleButton/ToggleButton.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport { Avatar, type AvatarShape, type AvatarSize, type AvatarStatus } from \"../../common/Avatar\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./AvatarGroup.css\";\n\nexport type AvatarGroupPerson = {\n /**\n * Who this is, if the caller has an id for them.\n *\n * Used for React's key and nothing else. Two people with the same name is not an edge case\n * in a document with a dozen readers in it, and keyed by name they shared one list item:\n * React warned about the duplicate key and then reconciled the wrong face when one of them\n * left. Optional, because a group of four names typed into a page has no ids to give.\n */\n id?: string;\n name: string;\n src?: string;\n /**\n * Online, away, busy, offline.\n *\n * Asked for by `PresenceBar`, which is a group of faces whose whole subject is what state\n * each of them is in. The dot is decorative — `said` is what carries it to a reader.\n */\n status?: AvatarStatus;\n /**\n * What to add to this person's name. \"(나)\", \"— 자리 비움\".\n *\n * The status dot is a colour, and a colour is nothing to a reader who cannot see it.\n */\n said?: string;\n};\n\nexport type AvatarGroupProps = {\n people: AvatarGroupPerson[];\n /**\n * What this group of people is. \"담당자\", \"참여자\", \"공유 대상\".\n *\n * Required: a bare row of faces reaches assistive technology as an unnamed list of names,\n * and a reader who lands on it hears four people without hearing what they have to do\n * with anything.\n */\n label: string;\n /** How many faces before the rest become a count. */\n max?: number;\n size?: AvatarSize;\n shape?: AvatarShape;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * Several people, overlapping, and then a number.\n *\n * A list, because that is what it is — and because a list tells a reader how many there are\n * before they have walked through all of them.\n */\nexport function AvatarGroup({\n people,\n label,\n max = 4,\n size = \"md\",\n shape = \"circle\",\n className,\n ...rest\n}: AvatarGroupProps) {\n const shown = people.slice(0, max);\n const hidden = people.slice(max);\n\n return (\n <ul\n {...rest}\n className={`avatar-group ${className ?? \"\"}`.trim()}\n data-size={size}\n aria-label={label}\n >\n {shown.map((person, index) => (\n <li\n key={person.id ?? `${index}-${person.name}`}\n className=\"avatar-group__item\"\n /*\n * Where this face sits in the stack. Counted down from the front so the first person\n * is on top, and written as a custom property because the enumeration it replaces\n * stopped at eight — a ninth face went under everyone in front of it.\n */\n style={{ \"--avatar-group-depth\": shown.length - index } as CSSProperties}\n >\n {/* The avatar is decorative and the name is text in the list item, so exactly one\n * element owns the name and a reader hears it once. */}\n <Avatar\n name={person.name}\n src={person.src}\n size={size}\n shape={shape}\n status={person.status}\n decorative\n />\n <VisuallyHidden>\n {person.name}\n {person.said ? ` ${person.said}` : \"\"}\n </VisuallyHidden>\n </li>\n ))}\n {hidden.length > 0 ? (\n /* The count goes on top of all of it: under the face beside it, the `+` is covered. */\n <li className=\"avatar-group__item\" style={{ \"--avatar-group-depth\": shown.length + 1 } as CSSProperties}>\n <span className=\"avatar-group__more\" data-shape={shape} aria-hidden=\"true\">\n +{hidden.length}\n </span>\n {/* The names, not just the number. A count tells a reader that something was\n * withheld; it does not tell them what. */}\n <VisuallyHidden>{`외 ${hidden.length}명: ${hidden.map((person) => person.name).join(\", \")}`}</VisuallyHidden>\n </li>\n ) : null}\n </ul>\n );\n}\n","import type { ReactNode } from \"react\";\nimport \"./InputGroup.css\";\n\nexport type InputGroupProps = {\n /** A field and whatever acts on it — a button, a select, a second field. */\n children: ReactNode;\n /**\n * What the pieces add up to. \"쿠폰 코드 적용\", \"도메인 확인\".\n *\n * Without it a reader meets a field and a button that look related on screen and are two\n * unrelated things in the accessibility tree.\n */\n label: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A field joined to what acts on it.\n *\n * Drawn as one shape because they are one thing: a coupon code and its Apply, a domain and\n * its Check. Where `ButtonGroup` joins alternatives, this joins a value to its action —\n * which is why it is a `group` with a name rather than a row with a gap.\n */\nexport function InputGroup({ children, label, className, ...rest }: InputGroupProps) {\n return (\n <div {...rest} className={`input-group ${className ?? \"\"}`.trim()} role=\"group\" aria-label={label}>\n {children}\n </div>\n );\n}\n","import { useState } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./MorphIcon.css\";\n\nexport type MorphIconSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\n/**\n * What arriving means, which is what decides how the new glyph lands.\n *\n * `archive/ui-assets/morph-state-icon` measured this and it is the part of that component\n * worth carrying over whole: a result that has arrived settles, and a failure does not. A\n * check mark that bounces in reads as a small celebration; a cross that bounces in reads as\n * a component that did not understand what it was saying.\n */\nexport type MorphIconTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n\nexport type MorphIconProps = {\n /**\n * The glyph that is true **now**. Change it and the exchange plays.\n *\n * Omitted is a real value rather than an error: an empty slot of the right size, which is\n * what a file row needs before its result exists. The box is already there, so the name\n * beside it does not move when the tick arrives.\n */\n icon?: LucideIcon;\n /**\n * The state in words, and the accessible name of the whole thing.\n *\n * `\"복사\"` → `\"복사함\"`, not `\"복사\"` twice. The glyph is the part a reader may not be able\n * to see and it is the only part that changed, so a label that does not change with it is\n * a component announcing the old state for as long as it is on screen.\n *\n * Omitted, everything here is `aria-hidden` — right when a label beside it already says\n * the state, wrong when nothing does. The same rule `Icon` draws.\n */\n label?: string;\n tone?: MorphIconTone;\n size?: MorphIconSize;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * One slot, and the glyph in it became something else.\n *\n * **It does not interpolate paths, and that is a decision rather than a shortcut.** The\n * previous line of work shipped a real morphing engine — arcs to cubics, subpath padding,\n * segment resampling, winding correspondence — and its own README records why it had to:\n * two glyphs from a real icon set share no command count, no vocabulary, no start point and\n * no winding direction. Four hundred lines go into making a clipboard *comparable* to a\n * check mark, and the frame halfway between them is neither of those things. Every exchange\n * this library actually has is a trade of unrelated shapes — `Eye`/`EyeOff`, `Mic`/`MicOff`,\n * `Check`/`Minus`, `ShieldAlert`/`ShieldCheck`, `CheckCircle2`/`XCircle`, `ChevronsUpDown`/\n * `ArrowUp` — and not one of them is the same shape at another angle. So the trade is what\n * gets drawn, and the rule this stage runs on holds: an effect carries a fact or it does not\n * exist.\n *\n * **The box never changes size.** A row of icons with one of them mid-transition is a row\n * that would otherwise push its neighbours, and the reason to draw the change at all is that\n * the thing did *not* move.\n *\n * **It does not go inside a `Button` or an `IconButton`.** Those take `icon` as a\n * `LucideIcon` and draw it themselves; a node handed to `Button` lands in `button__label`,\n * which is the text slot — ellipsis, no gap, hard against the word. Every exchange site this\n * library actually has is a status mark beside a control rather than the control's own glyph\n * — `Dropzone`'s file rows, `RunStatusCard`'s mark, `ApprovalGate` — so that is the shape\n * this is built for. Making a toggle's own glyph exchange would be an axis on those two\n * components rather than a slot on them, and that is a separate decision about forty call\n * sites.\n *\n * **The state is in the accessible name, not in the motion.** `label` changes with the glyph,\n * so a reader who cannot see either still gets the new state — and a still screenshot says\n * which state this is in, because the state is a shape and a word rather than a transition\n * somebody had to be watching.\n */\nexport function MorphIcon({\n icon,\n label,\n tone = \"neutral\",\n size = \"sm\",\n className,\n ...rest\n}: MorphIconProps) {\n /*\n * The previous glyph, kept during render rather than in an effect.\n *\n * An effect runs after the browser has painted, so an exchange started from one would\n * begin at a frame where the arrival had already happened — a flash rather than a\n * transition. Adjusting state while rendering is the documented answer to \"a prop changed\n * and something has to be derived from what it was\".\n */\n const [shown, setShown] = useState<{ icon?: LucideIcon; was?: LucideIcon; turn: number }>({\n icon,\n turn: 0,\n });\n if (shown.icon !== icon) {\n setShown((last) => ({ icon, was: last.icon, turn: last.turn + 1 }));\n }\n\n return (\n <span\n {...rest}\n className={`morph-icon ${className ?? \"\"}`.trim()}\n data-tone={tone}\n data-size={size}\n >\n {/*\n * The outgoing glyph, removed when its animation ends rather than left behind.\n *\n * `animationend` is why the reduced-motion answer here is *no rule at all*: the token\n * layer collapses the duration to 0.01ms rather than to zero, so the event still\n * fires and the old glyph still leaves. A stylesheet writing `animation: none` here\n * would pin the old glyph on screen forever, for exactly the readers who asked for\n * less movement.\n */}\n {shown.was ? (\n <span\n key={`was-${shown.turn}`}\n className=\"morph-icon__glyph\"\n data-part=\"was\"\n aria-hidden=\"true\"\n onAnimationEnd={() => setShown((last) => ({ ...last, was: undefined }))}\n >\n <Icon icon={shown.was} size={size} />\n </span>\n ) : null}\n\n {shown.icon ? (\n <span\n key={`is-${shown.turn}`}\n className=\"morph-icon__glyph\"\n data-part=\"is\"\n /*\n * The arrival plays on an exchange and not on a first paint. A page whose forty\n * icons all pop in on load is a page announcing nothing — the fact this component\n * carries is that a glyph *changed*, and on the first frame none of them has.\n */\n data-exchanged={shown.turn > 0 ? \"\" : undefined}\n >\n <Icon icon={shown.icon} size={size} label={label} />\n </span>\n ) : label ? (\n /* An empty slot still has a state to say. */\n <VisuallyHidden>{label}</VisuallyHidden>\n ) : null}\n </span>\n );\n}\n","import { useEffect, useState } from \"react\";\nimport type { KeyboardEvent } from \"react\";\nimport { Minus, Plus } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Input, type InputSize } from \"../../common/Input\";\nimport { IconButton } from \"../../common/IconButton\";\nimport type { ButtonTone } from \"../../common/Button\";\nimport \"./NumberInput.css\";\n\nexport type NumberInputProps = {\n value: number;\n onValueChange: (value: number) => void;\n /**\n * What is being counted. \"수량\", \"인원\", \"반복 횟수\".\n *\n * Names the field and both buttons. Two quantity steppers on a page whose buttons are both\n * called \"늘리기\" are two pairs of buttons a reader cannot tell apart — the same problem\n * `Tag` has with its remove control, and the same answer.\n */\n label: string;\n min?: number;\n max?: number;\n step?: number;\n /** Shown after the value and said aloud with it. \"개\", \"명\", \"분\". */\n unit?: string;\n size?: InputSize;\n /**\n * What the decrement control becomes once the value is at its floor.\n *\n * Asked for by `QuantityStepper`: in a basket, one below one is not zero — it is removing\n * the line, and every shop draws that as the minus turning into a bin. Without this the\n * button is simply disabled at 1 and the reader has to find some other control to take the\n * item out with.\n */\n atFloor?: { icon: LucideIcon; label: string; onPress: () => void; tone?: ButtonTone };\n disabled?: boolean;\n name?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nconst clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));\n\n/**\n * A number, and two ways to change it by one.\n *\n * Not `<input type=\"number\">`, and that is a decision rather than an oversight. A number\n * input changes its value when a reader scrolls the page with the pointer over it — a\n * quantity silently becoming 7 while someone scrolls past — and the usual repair is to blur\n * the field on wheel, which takes the reader out of it instead. It also reports an empty\n * string for anything it cannot parse, so \"12e\" and \"\" are the same value to the component.\n *\n * So: a text field that carries `role=\"spinbutton\"` and says its own bounds, with the arrow\n * keys, Home, End and the page keys implemented here. Everything a number input was going to\n * give is declared rather than inherited, and nothing it was going to take comes with it.\n */\nexport function NumberInput({\n value,\n onValueChange,\n label,\n min = Number.NEGATIVE_INFINITY,\n max = Number.POSITIVE_INFINITY,\n step = 1,\n unit,\n size = \"md\",\n atFloor,\n disabled,\n name,\n className,\n ...rest\n}: NumberInputProps) {\n /*\n * The typed text and the number are not the same thing. \"-\" and \"1.\" are both on the way\n * to a number and neither is one, and a field that refused them would be a field nobody\n * could type a negative or a decimal into.\n */\n /*\n * The value the component actually stands behind.\n *\n * Clamping only on the reader's own edits leaves the first render unguarded: `value={5}`\n * beside `max={3}` reports `aria-valuenow=\"5\"` under `aria-valuemax=\"3\"`, which is a\n * spinbutton contradicting itself, and the plus is disabled at a number the field says is\n * below the ceiling. Everything below reads this, and the effect tells the owner once.\n */\n const settled = clamp(value, min, max);\n\n const [draft, setDraft] = useState(String(settled));\n /*\n * Whether the text in the box is being typed right now.\n *\n * The value coming back from above is clamped, and while someone is typing \"99\" into a\n * field that stops at 10 the two disagree on purpose. Writing the clamped number back into\n * the box mid-keystroke rewrites what they are typing and throws the caret to the end.\n */\n const [editing, setEditing] = useState(false);\n useEffect(() => {\n if (editing) return;\n setDraft(String(settled));\n }, [settled, editing]);\n\n /*\n * Said once, upward. The field cannot hold a number of its own — it is controlled — so the\n * only way out of the contradiction is to tell the owner what the bounds it gave imply. A\n * caller that ignores it leaves `value` where it was, and the effect does not run again.\n */\n useEffect(() => {\n if (settled !== value) onValueChange(settled);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- an unstable handler must not re-fire this\n }, [settled, value]);\n\n const commit = (next: number) => {\n const bounded = clamp(next, min, max);\n setEditing(false);\n setDraft(String(bounded));\n onValueChange(bounded);\n };\n\n /*\n * Stepping keeps the decimals it started with.\n *\n * `0.2 + 0.1` is `0.30000000000000004`, and a quantity field that prints seventeen digits\n * after one press of the up arrow is a field nobody trusts again.\n */\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 nudge = (by: number) => {\n const from = Number.isFinite(settled) ? settled : 0;\n const precision = Math.max(places(from), places(by));\n const next = from + by;\n /* toFixed accepts at most 100 places; preserve smaller numbers without rounding to zero. */\n commit(precision > 100 ? next : Number(next.toFixed(precision)));\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n /* An IME is mid-syllable, and its keys belong to the composition. */\n if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n const keys: Record<string, (() => void) | undefined> = {\n ArrowUp: () => nudge(step),\n ArrowDown: () => nudge(-step),\n PageUp: () => nudge(step * 10),\n PageDown: () => nudge(-step * 10),\n /*\n * Only bound when there is a bound.\n *\n * Claiming the key and then doing nothing with it leaves Home and End dead in a field\n * with no `min` or `max` — they no longer take the caret to either end of the text\n * either, which is what they do in every other text field on the page.\n */\n Home: Number.isFinite(min) ? () => commit(min) : undefined,\n End: Number.isFinite(max) ? () => commit(max) : undefined,\n };\n const handler = keys[event.key];\n if (!handler) return;\n event.preventDefault();\n handler();\n };\n\n /*\n * The floor swap follows the settled value, not the half-typed one.\n *\n * Otherwise the first `0` typed into a cart row turns the minus into a bin before the\n * reader has finished the number.\n */\n const atMin = !editing && settled <= min;\n const atMax = settled >= max;\n\n return (\n <Input\n {...rest}\n className={`number-input ${className ?? \"\"}`.trim()}\n type=\"text\"\n inputMode={Number.isInteger(step) && Number.isInteger(settled) ? \"numeric\" : \"decimal\"}\n role=\"spinbutton\"\n name={name}\n value={editing ? draft : String(settled)}\n onChange={(event) => {\n const cleaned = event.target.value.replace(/[^\\d.-]/g, \"\");\n setEditing(true);\n setDraft(cleaned);\n const parsed = Number(cleaned);\n /*\n * What goes up is inside the range, even while the box shows something outside it.\n *\n * Sending the raw number would put a quantity past the stock count into whatever is\n * listening — and `aria-valuenow` would contradict the `aria-valuemax` beside it.\n */\n if (cleaned !== \"\" && Number.isFinite(parsed)) onValueChange(clamp(parsed, min, max));\n }}\n onKeyDown={onKeyDown}\n onBlur={() => {\n setEditing(false);\n commit(Number.isFinite(Number(draft)) && draft !== \"\" ? Number(draft) : settled);\n }}\n aria-label={label}\n aria-valuenow={settled}\n aria-valuemin={Number.isFinite(min) ? min : undefined}\n aria-valuemax={Number.isFinite(max) ? max : undefined}\n aria-valuetext={unit ? `${settled}${unit}` : undefined}\n size={size}\n disabled={disabled}\n autoComplete=\"off\"\n slotStart={\n atMin && atFloor ? (\n <IconButton\n icon={atFloor.icon}\n label={atFloor.label}\n size=\"sm\"\n variant=\"ghost\"\n tone={atFloor.tone ?? \"neutral\"}\n shape=\"circle\"\n disabled={disabled}\n onClick={atFloor.onPress}\n data-part=\"floor\"\n />\n ) : (\n <IconButton\n icon={Minus}\n label={`${label} 줄이기`}\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n shape=\"circle\"\n disabled={disabled || atMin}\n onClick={() => nudge(-step)}\n data-part=\"down\"\n />\n )\n }\n slotEnd={\n <>\n {/* Beside the value rather than inside it. Folding the unit into the field's own\n * value would mean the reader typing through it and the caret landing after it on\n * every keystroke; `aria-valuetext` carries it for anyone listening. */}\n {unit ? <span className=\"number-input__unit\">{unit}</span> : null}\n <IconButton\n icon={Plus}\n label={`${label} 늘리기`}\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n shape=\"circle\"\n disabled={disabled || atMax}\n onClick={() => nudge(step)}\n data-part=\"up\"\n />\n </>\n }\n />\n );\n}\n","import { useState } from \"react\";\nimport \"./TextCycle.css\";\n\nexport type TextCycleProps = {\n /**\n * The line that is true **now**. Change it and the exchange plays.\n *\n * A string rather than a node, and that is the accessibility answer as much as a typing\n * decision: what is on screen has to be the only thing a screen reader can reach, and a\n * subtree is a place for a second focusable thing to hide behind an `aria-hidden` that is\n * about to be applied to it.\n */\n value: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * One line, and it says something else now.\n *\n * **It owns no timer, and that is the whole design.** The obvious version of this component\n * holds a pool of phrases and rotates them on an interval — and a phrase that changes\n * because a timer fired says nothing about the work. It is a component drawing progress it\n * has not been told about, which is the same thing `Waveform` refuses to do with amplitude\n * and for the same reason. The host says what is true now; this draws the change. A host\n * that really is cycling through steps it is really performing passes them one at a time,\n * and gets exactly the same picture — the difference is only whether the movement was\n * earned.\n *\n * **Nothing announces.** No live region, no `aria-live`, no `role=\"status\"`. A status line\n * that changes every few seconds and announces each change is a screen reader reading a\n * progress bar out loud, and the reader cannot get past it to the thing they came for. The\n * current line is ordinary text and the outgoing copy is `aria-hidden`, so assistive\n * technology sees one sentence — the true one — at every moment. A host that genuinely needs\n * a change announced wraps this in its own live region and chooses the politeness, which is\n * a decision only it can make.\n *\n * **It sets no type.** No size, no weight, no colour, no family. This is a mechanism for\n * exchanging one line for another and it inherits whatever the line was already wearing —\n * a component that also decided how status lines look would have to be fought everywhere it\n * was used.\n */\nexport function TextCycle({ value, className, ...rest }: TextCycleProps) {\n /*\n * Derived while rendering rather than in an effect: an effect runs after paint, so the new\n * line would already be sitting in place when the exchange started.\n */\n const [shown, setShown] = useState<{ value: string; was?: string; turn: number }>({\n value,\n turn: 0,\n });\n if (shown.value !== value) {\n setShown((last) => ({ value, was: last.value, turn: last.turn + 1 }));\n }\n\n return (\n <span {...rest} className={`text-cycle ${className ?? \"\"}`.trim()}>\n {/*\n * The outgoing line, out of flow so it cannot change the height of the box, and\n * removed when its animation ends. The token layer collapses these durations rather\n * than zeroing them, so `animationend` still fires under `prefers-reduced-motion` and\n * the exchange becomes an instant swap — see the stylesheet.\n */}\n {shown.was !== undefined ? (\n <span\n key={`was-${shown.turn}`}\n className=\"text-cycle__line\"\n data-part=\"was\"\n aria-hidden=\"true\"\n onAnimationEnd={() => setShown((last) => ({ ...last, was: undefined }))}\n >\n {shown.was}\n </span>\n ) : null}\n\n <span\n key={`is-${shown.turn}`}\n className=\"text-cycle__line\"\n data-part=\"is\"\n /* No entrance on the first paint: nothing has changed yet, so there is nothing to say. */\n data-exchanged={shown.turn > 0 ? \"\" : undefined}\n >\n {shown.value}\n </span>\n </span>\n );\n}\n","import type { ReactNode } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./ToggleButton.css\";\n\nexport type ToggleButtonVariant = \"outline\" | \"ghost\" | \"soft\";\nexport type ToggleButtonTone = \"accent\" | \"neutral\" | \"success\" | \"warning\" | \"danger\";\nexport type ToggleButtonSize = \"sm\" | \"md\" | \"lg\";\nexport type ToggleButtonShape = \"rounded\" | \"pill\";\n\nexport type ToggleButtonProps = {\n /**\n * What it controls — and it does not change when the state does.\n *\n * A button labelled \"음소거\" that becomes \"음소거 해제\" while `aria-pressed` also flips\n * says the opposite thing twice, and a reader hears \"음소거 해제, 눌림\" and has to work out\n * which half to believe. The label names the thing; `aria-pressed` says whether it is on.\n */\n children: ReactNode;\n pressed: boolean;\n onPressedChange: (pressed: boolean) => void;\n variant?: ToggleButtonVariant;\n tone?: ToggleButtonTone;\n size?: ToggleButtonSize;\n shape?: ToggleButtonShape;\n icon?: LucideIcon;\n /**\n * `aria-disabled`, not `disabled` — the rule Button set and every button in this library\n * follows. A disabled button leaves the tab order, so a reader standing on one that is\n * switched off underneath them is dropped elsewhere with no idea why. Form controls are\n * the other way round: `Checkbox`, `Radio` and `SegmentedControl` take the real attribute,\n * because that is what keeps their value out of the submitted form.\n */\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A button that stays down.\n *\n * `aria-pressed` rather than a checkbox, because this takes effect the moment it is pressed.\n * A checkbox announces \"checked\" and waits for a submit; a toggle button announces \"pressed\"\n * and has already done it.\n */\nexport function ToggleButton({\n children,\n pressed,\n onPressedChange,\n variant = \"outline\",\n tone = \"accent\",\n size = \"md\",\n shape = \"rounded\",\n icon,\n disabled,\n className,\n ...rest\n}: ToggleButtonProps) {\n return (\n <button\n {...rest}\n type=\"button\"\n className={`toggle-button ${className ?? \"\"}`.trim()}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-shape={shape}\n /*\n * Coerced, because `undefined` removes the attribute entirely.\n *\n * Every visual rule in this component's stylesheet hangs off `[aria-pressed=\"true\"]`\n * or `[aria-pressed=\"false\"]`. A missing attribute misses both, so a caller who slips\n * past the type gets a button with no pressed state, no hover and no press veil —\n * announced as an ordinary button rather than a toggle.\n */\n aria-pressed={Boolean(pressed)}\n aria-disabled={disabled || undefined}\n onClick={() => {\n if (disabled) return;\n onPressedChange(!pressed);\n }}\n >\n {icon ? <Icon icon={icon} size={size === \"lg\" ? \"md\" : \"sm\"} /> : null}\n <span className=\"toggle-button__label\">{children}</span>\n </button>\n );\n}\n"],"mappings":";;;;;;AAwDA,SAAgB,EAAY,EAC1B,WACA,UACA,SAAM,GACN,UAAO,MACP,WAAQ,UACR,cACA,GAAG,KACgB;CACnB,IAAM,IAAQ,EAAO,MAAM,GAAG,CAAG,GAC3B,IAAS,EAAO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IAAM,CAAC,GAAO,KAAY,EAAwD;EAChF;EACA,MAAM;CACR,CAAC;CAKD,OAJI,EAAM,UAAU,KAClB,GAAU,OAAU;EAAE;EAAO,KAAK,EAAK;EAAO,MAAM,EAAK,OAAO;CAAE,EAAE,GAIpE,kBAAC,QAAD;EAAM,GAAI;EAAM,WAAW,cAAc,KAAa,KAAK,KAAK;EAAhE,UAAA,CAOG,EAAM,QAAQ,KAAA,IAUX,OATF,kBAAC,QAAD;GAEE,WAAU;GACV,aAAU;GACV,eAAY;GACZ,sBAAsB,GAAU,OAAU;IAAE,GAAG;IAAM,KAAK,KAAA;GAAU,EAAE;GAErE,UAAA,EAAM;EACH,GAPC,OAAO,EAAM,MAOd,GAGR,kBAAC,QAAD;GAEE,WAAU;GACV,aAAU;GAEV,kBAAgB,EAAM,OAAO,IAAI,KAAK,KAAA;GAErC,UAAA,EAAM;EACH,GAPC,MAAM,EAAM,MAOb,CACF;;AAEV;;;ACxCA,SAAgB,EAAa,EAC3B,aACA,YACA,oBACA,aAAU,WACV,UAAO,UACP,UAAO,MACP,WAAQ,WACR,SACA,aACA,cACA,GAAG,KACiB;CACpB,OACE,kBAAC,UAAD;EACE,GAAI;EACJ,MAAK;EACL,WAAW,iBAAiB,KAAa,KAAK,KAAK;EACnD,gBAAc;EACd,aAAW;EACX,aAAW;EACX,cAAY;EASZ,gBAAc,EAAQ;EACtB,iBAAe,KAAY,KAAA;EAC3B,eAAe;GACT,KACJ,EAAgB,CAAC,CAAO;EAC1B;EArBF,UAAA,CAuBG,IAAO,kBAAC,GAAD;GAAY;GAAM,MAAM,MAAS,OAAO,OAAO;EAAO,CAAA,IAAI,MAClE,kBAAC,QAAD;GAAM,WAAU;GAAwB;EAAe,CAAA,CACjD;;AAEZ"}
1
+ {"version":3,"file":"ToggleButton-CcST9ch9.js","names":[],"sources":["../../src/components/derived/AvatarGroup/AvatarGroup.tsx","../../src/components/derived/InputGroup/InputGroup.tsx","../../src/components/derived/MorphIcon/MorphIcon.tsx","../../src/components/derived/NumberInput/NumberInput.tsx","../../src/components/derived/TextCycle/TextCycle.tsx","../../src/components/derived/ToggleButton/ToggleButton.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport { Avatar, type AvatarShape, type AvatarSize, type AvatarStatus } from \"../../common/Avatar\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./AvatarGroup.css\";\n\nexport type AvatarGroupPerson = {\n /**\n * Who this is, if the caller has an id for them.\n *\n * Used for React's key and nothing else. Two people with the same name is not an edge case\n * in a document with a dozen readers in it, and keyed by name they shared one list item:\n * React warned about the duplicate key and then reconciled the wrong face when one of them\n * left. Optional, because a group of four names typed into a page has no ids to give.\n */\n id?: string;\n name: string;\n src?: string;\n /**\n * Online, away, busy, offline.\n *\n * Asked for by `PresenceBar`, which is a group of faces whose whole subject is what state\n * each of them is in. The dot is decorative — `said` is what carries it to a reader.\n */\n status?: AvatarStatus;\n /**\n * What to add to this person's name. \"(나)\", \"— 자리 비움\".\n *\n * The status dot is a colour, and a colour is nothing to a reader who cannot see it.\n */\n said?: string;\n};\n\nexport type AvatarGroupProps = {\n people: AvatarGroupPerson[];\n /**\n * What this group of people is. \"담당자\", \"참여자\", \"공유 대상\".\n *\n * Required: a bare row of faces reaches assistive technology as an unnamed list of names,\n * and a reader who lands on it hears four people without hearing what they have to do\n * with anything.\n */\n label: string;\n /** How many faces before the rest become a count. */\n max?: number;\n size?: AvatarSize;\n shape?: AvatarShape;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * Several people, overlapping, and then a number.\n *\n * A list, because that is what it is — and because a list tells a reader how many there are\n * before they have walked through all of them.\n */\nexport function AvatarGroup({\n people,\n label,\n max = 4,\n size = \"md\",\n shape = \"circle\",\n className,\n ...rest\n}: AvatarGroupProps) {\n const shown = people.slice(0, max);\n const hidden = people.slice(max);\n\n return (\n <ul\n {...rest}\n className={`avatar-group ${className ?? \"\"}`.trim()}\n data-size={size}\n aria-label={label}\n >\n {shown.map((person, index) => (\n <li\n key={person.id ?? `${index}-${person.name}`}\n className=\"avatar-group__item\"\n /*\n * Where this face sits in the stack. Counted down from the front so the first person\n * is on top, and written as a custom property because the enumeration it replaces\n * stopped at eight — a ninth face went under everyone in front of it.\n */\n style={{ \"--avatar-group-depth\": shown.length - index } as CSSProperties}\n >\n {/* The avatar is decorative and the name is text in the list item, so exactly one\n * element owns the name and a reader hears it once. */}\n <Avatar\n name={person.name}\n src={person.src}\n size={size}\n shape={shape}\n status={person.status}\n decorative\n />\n <VisuallyHidden>\n {person.name}\n {person.said ? ` ${person.said}` : \"\"}\n </VisuallyHidden>\n </li>\n ))}\n {hidden.length > 0 ? (\n /* The count goes on top of all of it: under the face beside it, the `+` is covered. */\n <li className=\"avatar-group__item\" style={{ \"--avatar-group-depth\": shown.length + 1 } as CSSProperties}>\n <span className=\"avatar-group__more\" data-shape={shape} aria-hidden=\"true\">\n +{hidden.length}\n </span>\n {/* The names, not just the number. A count tells a reader that something was\n * withheld; it does not tell them what. */}\n <VisuallyHidden>{`외 ${hidden.length}명: ${hidden.map((person) => person.name).join(\", \")}`}</VisuallyHidden>\n </li>\n ) : null}\n </ul>\n );\n}\n","import type { ReactNode } from \"react\";\nimport \"./InputGroup.css\";\n\nexport type InputGroupProps = {\n /** A field and whatever acts on it — a button, a select, a second field. */\n children: ReactNode;\n /**\n * What the pieces add up to. \"쿠폰 코드 적용\", \"도메인 확인\".\n *\n * Without it a reader meets a field and a button that look related on screen and are two\n * unrelated things in the accessibility tree.\n */\n label: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A field joined to what acts on it.\n *\n * Drawn as one shape because they are one thing: a coupon code and its Apply, a domain and\n * its Check. Where `ButtonGroup` joins alternatives, this joins a value to its action —\n * which is why it is a `group` with a name rather than a row with a gap.\n */\nexport function InputGroup({ children, label, className, ...rest }: InputGroupProps) {\n return (\n <div {...rest} className={`input-group ${className ?? \"\"}`.trim()} role=\"group\" aria-label={label}>\n {children}\n </div>\n );\n}\n","import { useState } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./MorphIcon.css\";\n\nexport type MorphIconSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\n/**\n * What arriving means, which is what decides how the new glyph lands.\n *\n * `archive/ui-assets/morph-state-icon` measured this and it is the part of that component\n * worth carrying over whole: a result that has arrived settles, and a failure does not. A\n * check mark that bounces in reads as a small celebration; a cross that bounces in reads as\n * a component that did not understand what it was saying.\n */\nexport type MorphIconTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n\nexport type MorphIconProps = {\n /**\n * The glyph that is true **now**. Change it and the exchange plays.\n *\n * Omitted is a real value rather than an error: an empty slot of the right size, which is\n * what a file row needs before its result exists. The box is already there, so the name\n * beside it does not move when the tick arrives.\n */\n icon?: LucideIcon;\n /**\n * The state in words, and the accessible name of the whole thing.\n *\n * `\"복사\"` → `\"복사함\"`, not `\"복사\"` twice. The glyph is the part a reader may not be able\n * to see and it is the only part that changed, so a label that does not change with it is\n * a component announcing the old state for as long as it is on screen.\n *\n * Omitted, everything here is `aria-hidden` — right when a label beside it already says\n * the state, wrong when nothing does. The same rule `Icon` draws.\n */\n label?: string;\n tone?: MorphIconTone;\n size?: MorphIconSize;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * One slot, and the glyph in it became something else.\n *\n * **It does not interpolate paths, and that is a decision rather than a shortcut.** The\n * previous line of work shipped a real morphing engine — arcs to cubics, subpath padding,\n * segment resampling, winding correspondence — and its own README records why it had to:\n * two glyphs from a real icon set share no command count, no vocabulary, no start point and\n * no winding direction. Four hundred lines go into making a clipboard *comparable* to a\n * check mark, and the frame halfway between them is neither of those things. Every exchange\n * this library actually has is a trade of unrelated shapes — `Eye`/`EyeOff`, `Mic`/`MicOff`,\n * `Check`/`Minus`, `ShieldAlert`/`ShieldCheck`, `CheckCircle2`/`XCircle`, `ChevronsUpDown`/\n * `ArrowUp` — and not one of them is the same shape at another angle. So the trade is what\n * gets drawn, and the rule this stage runs on holds: an effect carries a fact or it does not\n * exist.\n *\n * **The box never changes size.** A row of icons with one of them mid-transition is a row\n * that would otherwise push its neighbours, and the reason to draw the change at all is that\n * the thing did *not* move.\n *\n * **It does not go inside a `Button` or an `IconButton`.** Those take `icon` as a\n * `LucideIcon` and draw it themselves; a node handed to `Button` lands in `button__label`,\n * which is the text slot — ellipsis, no gap, hard against the word. Every exchange site this\n * library actually has is a status mark beside a control rather than the control's own glyph\n * — `Dropzone`'s file rows, `RunStatusCard`'s mark, `ApprovalGate` — so that is the shape\n * this is built for. Making a toggle's own glyph exchange would be an axis on those two\n * components rather than a slot on them, and that is a separate decision about forty call\n * sites.\n *\n * **The state is in the accessible name, not in the motion.** `label` changes with the glyph,\n * so a reader who cannot see either still gets the new state — and a still screenshot says\n * which state this is in, because the state is a shape and a word rather than a transition\n * somebody had to be watching.\n */\nexport function MorphIcon({\n icon,\n label,\n tone = \"neutral\",\n size = \"sm\",\n className,\n ...rest\n}: MorphIconProps) {\n /*\n * The previous glyph, kept during render rather than in an effect.\n *\n * An effect runs after the browser has painted, so an exchange started from one would\n * begin at a frame where the arrival had already happened — a flash rather than a\n * transition. Adjusting state while rendering is the documented answer to \"a prop changed\n * and something has to be derived from what it was\".\n */\n const [shown, setShown] = useState<{ icon?: LucideIcon; was?: LucideIcon; turn: number }>({\n icon,\n turn: 0,\n });\n if (shown.icon !== icon) {\n setShown((last) => ({ icon, was: last.icon, turn: last.turn + 1 }));\n }\n\n return (\n <span\n {...rest}\n className={`morph-icon ${className ?? \"\"}`.trim()}\n data-tone={tone}\n data-size={size}\n >\n {/*\n * The outgoing glyph, removed when its animation ends rather than left behind.\n *\n * `animationend` is why the reduced-motion answer here is *no rule at all*: the token\n * layer collapses the duration to 0.01ms rather than to zero, so the event still\n * fires and the old glyph still leaves. A stylesheet writing `animation: none` here\n * would pin the old glyph on screen forever, for exactly the readers who asked for\n * less movement.\n */}\n {shown.was ? (\n <span\n key={`was-${shown.turn}`}\n className=\"morph-icon__glyph\"\n data-part=\"was\"\n aria-hidden=\"true\"\n onAnimationEnd={() => setShown((last) => ({ ...last, was: undefined }))}\n >\n <Icon icon={shown.was} size={size} />\n </span>\n ) : null}\n\n {shown.icon ? (\n <span\n key={`is-${shown.turn}`}\n className=\"morph-icon__glyph\"\n data-part=\"is\"\n /*\n * The arrival plays on an exchange and not on a first paint. A page whose forty\n * icons all pop in on load is a page announcing nothing — the fact this component\n * carries is that a glyph *changed*, and on the first frame none of them has.\n */\n data-exchanged={shown.turn > 0 ? \"\" : undefined}\n >\n <Icon icon={shown.icon} size={size} label={label} />\n </span>\n ) : label ? (\n /* An empty slot still has a state to say. */\n <VisuallyHidden>{label}</VisuallyHidden>\n ) : null}\n </span>\n );\n}\n","import { useEffect, useState } from \"react\";\nimport type { KeyboardEvent } from \"react\";\nimport { Minus, Plus } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Input, type InputSize } from \"../../common/Input\";\nimport { IconButton } from \"../../common/IconButton\";\nimport type { ButtonTone } from \"../../common/Button\";\nimport \"./NumberInput.css\";\n\nexport type NumberInputProps = {\n value: number;\n onValueChange: (value: number) => void;\n /**\n * What is being counted. \"수량\", \"인원\", \"반복 횟수\".\n *\n * Names the field and both buttons. Two quantity steppers on a page whose buttons are both\n * called \"늘리기\" are two pairs of buttons a reader cannot tell apart — the same problem\n * `Tag` has with its remove control, and the same answer.\n */\n label: string;\n min?: number;\n max?: number;\n step?: number;\n /** Shown after the value and said aloud with it. \"개\", \"명\", \"분\". */\n unit?: string;\n size?: InputSize;\n /**\n * What the decrement control becomes once the value is at its floor.\n *\n * Asked for by `QuantityStepper`: in a basket, one below one is not zero — it is removing\n * the line, and every shop draws that as the minus turning into a bin. Without this the\n * button is simply disabled at 1 and the reader has to find some other control to take the\n * item out with.\n */\n atFloor?: { icon: LucideIcon; label: string; onPress: () => void; tone?: ButtonTone };\n disabled?: boolean;\n name?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nconst clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));\n\n/**\n * A number, and two ways to change it by one.\n *\n * Not `<input type=\"number\">`, and that is a decision rather than an oversight. A number\n * input changes its value when a reader scrolls the page with the pointer over it — a\n * quantity silently becoming 7 while someone scrolls past — and the usual repair is to blur\n * the field on wheel, which takes the reader out of it instead. It also reports an empty\n * string for anything it cannot parse, so \"12e\" and \"\" are the same value to the component.\n *\n * So: a text field that carries `role=\"spinbutton\"` and says its own bounds, with the arrow\n * keys, Home, End and the page keys implemented here. Everything a number input was going to\n * give is declared rather than inherited, and nothing it was going to take comes with it.\n */\nexport function NumberInput({\n value,\n onValueChange,\n label,\n min = Number.NEGATIVE_INFINITY,\n max = Number.POSITIVE_INFINITY,\n step = 1,\n unit,\n size = \"md\",\n atFloor,\n disabled,\n name,\n className,\n ...rest\n}: NumberInputProps) {\n /*\n * The typed text and the number are not the same thing. \"-\" and \"1.\" are both on the way\n * to a number and neither is one, and a field that refused them would be a field nobody\n * could type a negative or a decimal into.\n */\n /*\n * The value the component actually stands behind.\n *\n * Clamping only on the reader's own edits leaves the first render unguarded: `value={5}`\n * beside `max={3}` reports `aria-valuenow=\"5\"` under `aria-valuemax=\"3\"`, which is a\n * spinbutton contradicting itself, and the plus is disabled at a number the field says is\n * below the ceiling. Everything below reads this, and the effect tells the owner once.\n */\n const settled = clamp(value, min, max);\n\n const [draft, setDraft] = useState(String(settled));\n /*\n * Whether the text in the box is being typed right now.\n *\n * The value coming back from above is clamped, and while someone is typing \"99\" into a\n * field that stops at 10 the two disagree on purpose. Writing the clamped number back into\n * the box mid-keystroke rewrites what they are typing and throws the caret to the end.\n */\n const [editing, setEditing] = useState(false);\n useEffect(() => {\n if (editing) return;\n setDraft(String(settled));\n }, [settled, editing]);\n\n /*\n * Said once, upward. The field cannot hold a number of its own — it is controlled — so the\n * only way out of the contradiction is to tell the owner what the bounds it gave imply. A\n * caller that ignores it leaves `value` where it was, and the effect does not run again.\n */\n useEffect(() => {\n if (settled !== value) onValueChange(settled);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- an unstable handler must not re-fire this\n }, [settled, value]);\n\n const commit = (next: number) => {\n const bounded = clamp(next, min, max);\n setEditing(false);\n setDraft(String(bounded));\n onValueChange(bounded);\n };\n\n /*\n * Stepping keeps the decimals it started with.\n *\n * `0.2 + 0.1` is `0.30000000000000004`, and a quantity field that prints seventeen digits\n * after one press of the up arrow is a field nobody trusts again.\n */\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 nudge = (by: number) => {\n const from = Number.isFinite(settled) ? settled : 0;\n const precision = Math.max(places(from), places(by));\n const next = from + by;\n /* toFixed accepts at most 100 places; preserve smaller numbers without rounding to zero. */\n commit(precision > 100 ? next : Number(next.toFixed(precision)));\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n /* An IME is mid-syllable, and its keys belong to the composition. */\n if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n const keys: Record<string, (() => void) | undefined> = {\n ArrowUp: () => nudge(step),\n ArrowDown: () => nudge(-step),\n PageUp: () => nudge(step * 10),\n PageDown: () => nudge(-step * 10),\n /*\n * Only bound when there is a bound.\n *\n * Claiming the key and then doing nothing with it leaves Home and End dead in a field\n * with no `min` or `max` — they no longer take the caret to either end of the text\n * either, which is what they do in every other text field on the page.\n */\n Home: Number.isFinite(min) ? () => commit(min) : undefined,\n End: Number.isFinite(max) ? () => commit(max) : undefined,\n };\n const handler = keys[event.key];\n if (!handler) return;\n event.preventDefault();\n handler();\n };\n\n /*\n * The floor swap follows the settled value, not the half-typed one.\n *\n * Otherwise the first `0` typed into a cart row turns the minus into a bin before the\n * reader has finished the number.\n */\n const atMin = !editing && settled <= min;\n const atMax = settled >= max;\n\n return (\n <Input\n {...rest}\n className={`number-input ${className ?? \"\"}`.trim()}\n type=\"text\"\n inputMode={Number.isInteger(step) && Number.isInteger(settled) ? \"numeric\" : \"decimal\"}\n role=\"spinbutton\"\n name={name}\n value={editing ? draft : String(settled)}\n onChange={(event) => {\n const cleaned = event.target.value.replace(/[^\\d.-]/g, \"\");\n setEditing(true);\n setDraft(cleaned);\n const parsed = Number(cleaned);\n /*\n * What goes up is inside the range, even while the box shows something outside it.\n *\n * Sending the raw number would put a quantity past the stock count into whatever is\n * listening — and `aria-valuenow` would contradict the `aria-valuemax` beside it.\n */\n if (cleaned !== \"\" && Number.isFinite(parsed)) onValueChange(clamp(parsed, min, max));\n }}\n onKeyDown={onKeyDown}\n onBlur={() => {\n setEditing(false);\n commit(Number.isFinite(Number(draft)) && draft !== \"\" ? Number(draft) : settled);\n }}\n aria-label={label}\n aria-valuenow={settled}\n aria-valuemin={Number.isFinite(min) ? min : undefined}\n aria-valuemax={Number.isFinite(max) ? max : undefined}\n aria-valuetext={unit ? `${settled}${unit}` : undefined}\n size={size}\n disabled={disabled}\n autoComplete=\"off\"\n slotStart={\n atMin && atFloor ? (\n <IconButton\n icon={atFloor.icon}\n label={atFloor.label}\n size=\"sm\"\n variant=\"ghost\"\n tone={atFloor.tone ?? \"neutral\"}\n shape=\"circle\"\n disabled={disabled}\n onClick={atFloor.onPress}\n data-part=\"floor\"\n />\n ) : (\n <IconButton\n icon={Minus}\n label={`${label} 줄이기`}\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n shape=\"circle\"\n disabled={disabled || atMin}\n onClick={() => nudge(-step)}\n data-part=\"down\"\n />\n )\n }\n slotEnd={\n <>\n {/* Beside the value rather than inside it. Folding the unit into the field's own\n * value would mean the reader typing through it and the caret landing after it on\n * every keystroke; `aria-valuetext` carries it for anyone listening. */}\n {unit ? <span className=\"number-input__unit\">{unit}</span> : null}\n <IconButton\n icon={Plus}\n label={`${label} 늘리기`}\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n shape=\"circle\"\n disabled={disabled || atMax}\n onClick={() => nudge(step)}\n data-part=\"up\"\n />\n </>\n }\n />\n );\n}\n","import { useState } from \"react\";\nimport \"./TextCycle.css\";\n\nexport type TextCycleProps = {\n /**\n * The line that is true **now**. Change it and the exchange plays.\n *\n * A string rather than a node, and that is the accessibility answer as much as a typing\n * decision: what is on screen has to be the only thing a screen reader can reach, and a\n * subtree is a place for a second focusable thing to hide behind an `aria-hidden` that is\n * about to be applied to it.\n */\n value: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * One line, and it says something else now.\n *\n * **It owns no timer, and that is the whole design.** The obvious version of this component\n * holds a pool of phrases and rotates them on an interval — and a phrase that changes\n * because a timer fired says nothing about the work. It is a component drawing progress it\n * has not been told about, which is the same thing `Waveform` refuses to do with amplitude\n * and for the same reason. The host says what is true now; this draws the change. A host\n * that really is cycling through steps it is really performing passes them one at a time,\n * and gets exactly the same picture — the difference is only whether the movement was\n * earned.\n *\n * **Nothing announces.** No live region, no `aria-live`, no `role=\"status\"`. A status line\n * that changes every few seconds and announces each change is a screen reader reading a\n * progress bar out loud, and the reader cannot get past it to the thing they came for. The\n * current line is ordinary text and the outgoing copy is `aria-hidden`, so assistive\n * technology sees one sentence — the true one — at every moment. A host that genuinely needs\n * a change announced wraps this in its own live region and chooses the politeness, which is\n * a decision only it can make.\n *\n * **It sets no type.** No size, no weight, no colour, no family. This is a mechanism for\n * exchanging one line for another and it inherits whatever the line was already wearing —\n * a component that also decided how status lines look would have to be fought everywhere it\n * was used.\n */\nexport function TextCycle({ value, className, ...rest }: TextCycleProps) {\n /*\n * Derived while rendering rather than in an effect: an effect runs after paint, so the new\n * line would already be sitting in place when the exchange started.\n */\n const [shown, setShown] = useState<{ value: string; was?: string; turn: number }>({\n value,\n turn: 0,\n });\n if (shown.value !== value) {\n setShown((last) => ({ value, was: last.value, turn: last.turn + 1 }));\n }\n\n return (\n <span {...rest} className={`text-cycle ${className ?? \"\"}`.trim()}>\n {/*\n * The outgoing line, out of flow so it cannot change the height of the box, and\n * removed when its animation ends. The token layer collapses these durations rather\n * than zeroing them, so `animationend` still fires under `prefers-reduced-motion` and\n * the exchange becomes an instant swap — see the stylesheet.\n */}\n {shown.was !== undefined ? (\n <span\n key={`was-${shown.turn}`}\n className=\"text-cycle__line\"\n data-part=\"was\"\n aria-hidden=\"true\"\n onAnimationEnd={() => setShown((last) => ({ ...last, was: undefined }))}\n >\n {shown.was}\n </span>\n ) : null}\n\n <span\n key={`is-${shown.turn}`}\n className=\"text-cycle__line\"\n data-part=\"is\"\n /* No entrance on the first paint: nothing has changed yet, so there is nothing to say. */\n data-exchanged={shown.turn > 0 ? \"\" : undefined}\n >\n {shown.value}\n </span>\n </span>\n );\n}\n","import type { ReactNode } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./ToggleButton.css\";\n\nexport type ToggleButtonVariant = \"outline\" | \"ghost\" | \"soft\";\nexport type ToggleButtonTone = \"accent\" | \"neutral\" | \"success\" | \"warning\" | \"danger\";\nexport type ToggleButtonSize = \"sm\" | \"md\" | \"lg\";\nexport type ToggleButtonShape = \"rounded\" | \"pill\";\n\nexport type ToggleButtonProps = {\n /**\n * What it controls — and it does not change when the state does.\n *\n * A button labelled \"음소거\" that becomes \"음소거 해제\" while `aria-pressed` also flips\n * says the opposite thing twice, and a reader hears \"음소거 해제, 눌림\" and has to work out\n * which half to believe. The label names the thing; `aria-pressed` says whether it is on.\n */\n children: ReactNode;\n pressed: boolean;\n onPressedChange: (pressed: boolean) => void;\n variant?: ToggleButtonVariant;\n tone?: ToggleButtonTone;\n size?: ToggleButtonSize;\n shape?: ToggleButtonShape;\n icon?: LucideIcon;\n /**\n * `aria-disabled`, not `disabled` — the rule Button set and every button in this library\n * follows. A disabled button leaves the tab order, so a reader standing on one that is\n * switched off underneath them is dropped elsewhere with no idea why. Form controls are\n * the other way round: `Checkbox`, `Radio` and `SegmentedControl` take the real attribute,\n * because that is what keeps their value out of the submitted form.\n */\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A button that stays down.\n *\n * `aria-pressed` rather than a checkbox, because this takes effect the moment it is pressed.\n * A checkbox announces \"checked\" and waits for a submit; a toggle button announces \"pressed\"\n * and has already done it.\n */\nexport function ToggleButton({\n children,\n pressed,\n onPressedChange,\n variant = \"outline\",\n tone = \"accent\",\n size = \"md\",\n shape = \"rounded\",\n icon,\n disabled,\n className,\n ...rest\n}: ToggleButtonProps) {\n return (\n <button\n {...rest}\n type=\"button\"\n className={`toggle-button ${className ?? \"\"}`.trim()}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-shape={shape}\n /*\n * Coerced, because `undefined` removes the attribute entirely.\n *\n * Every visual rule in this component's stylesheet hangs off `[aria-pressed=\"true\"]`\n * or `[aria-pressed=\"false\"]`. A missing attribute misses both, so a caller who slips\n * past the type gets a button with no pressed state, no hover and no press veil —\n * announced as an ordinary button rather than a toggle.\n */\n aria-pressed={Boolean(pressed)}\n aria-disabled={disabled || undefined}\n onClick={() => {\n if (disabled) return;\n onPressedChange(!pressed);\n }}\n >\n {icon ? <Icon icon={icon} size={size === \"lg\" ? \"md\" : \"sm\"} /> : null}\n <span className=\"toggle-button__label\">{children}</span>\n </button>\n );\n}\n"],"mappings":";;;;;;AAwDA,SAAgB,EAAY,EAC1B,WACA,UACA,SAAM,GACN,UAAO,MACP,WAAQ,UACR,cACA,GAAG,KACgB;CACnB,IAAM,IAAQ,EAAO,MAAM,GAAG,CAAG,GAC3B,IAAS,EAAO,MAAM,CAAG;CAE/B,OACE,kBAAC,MAAD;EACE,GAAI;EACJ,WAAW,gBAAgB,KAAa,KAAK,KAAK;EAClD,aAAW;EACX,cAAY;EAJd,UAAA,CAMG,EAAM,KAAK,GAAQ,MAClB,kBAAC,MAAD;GAEE,WAAU;GAMV,OAAO,EAAE,wBAAwB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