@lucian-seo/lucian-ui 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/lib/{Input-DzJm1Kv4.js → Input-Bv2FRGIe.js} +2 -2
  2. package/dist/lib/{Input-DzJm1Kv4.js.map → Input-Bv2FRGIe.js.map} +1 -1
  3. package/dist/lib/{Pagination-AWL5k5zG.js → Popover-Cq6yhJaK.js} +193 -132
  4. package/dist/lib/Popover-Cq6yhJaK.js.map +1 -0
  5. package/dist/lib/{Switch-DyKAqvde.js → Switch-DmKcoBT0.js} +3 -3
  6. package/dist/lib/Switch-DmKcoBT0.js.map +1 -0
  7. package/dist/lib/{Tag-Z8PjnJFt.js → Tag-CnNuj4nV.js} +2 -2
  8. package/dist/lib/{Tag-Z8PjnJFt.js.map → Tag-CnNuj4nV.js.map} +1 -1
  9. package/dist/lib/{TagInput-CeA0n7ax.js → TagInput-BcSSnJY_.js} +4 -4
  10. package/dist/lib/{TagInput-CeA0n7ax.js.map → TagInput-BcSSnJY_.js.map} +1 -1
  11. package/dist/lib/{ToggleButton-r73bokux.js → ToggleButton-CcST9ch9.js} +3 -3
  12. package/dist/lib/{ToggleButton-r73bokux.js.map → ToggleButton-CcST9ch9.js.map} +1 -1
  13. package/dist/lib/{Toolbar-DDOaxG3B.js → Toolbar-Cq2wF4Yg.js} +67 -127
  14. package/dist/lib/Toolbar-Cq2wF4Yg.js.map +1 -0
  15. package/dist/lib/{Tooltip-BW1-aVDg.js → Tooltip-1flxtzgM.js} +2 -2
  16. package/dist/lib/{Tooltip-BW1-aVDg.js.map → Tooltip-1flxtzgM.js.map} +1 -1
  17. package/dist/lib/{VisuallyHidden-DcE0EFpo.js → VisuallyHidden-Bht2-rdy.js} +16 -14
  18. package/dist/lib/VisuallyHidden-Bht2-rdy.js.map +1 -0
  19. package/dist/lib/{VoiceControlBar-lMPuJMcF.js → VoiceControlBar-iWzq7jiw.js} +1769 -1505
  20. package/dist/lib/VoiceControlBar-iWzq7jiw.js.map +1 -0
  21. package/dist/lib/{Waveform-EahaE6uD.js → Waveform-CtI9GetQ.js} +3 -3
  22. package/dist/lib/Waveform-CtI9GetQ.js.map +1 -0
  23. package/dist/lib/components/common/Badge/Badge.d.ts +1 -9
  24. package/dist/lib/components/common/Glass/Glass.d.ts +1 -3
  25. package/dist/lib/components/common/index.js +5 -5
  26. package/dist/lib/components/composed/index.js +3 -3
  27. package/dist/lib/components/derived/index.js +3 -3
  28. package/dist/lib/components/extended/DataGrid/DataGrid.clipboard.d.ts +2 -0
  29. package/dist/lib/components/extended/DataGrid/DataGrid.d.ts +6 -0
  30. package/dist/lib/components/extended/DataGrid/DataGrid.features.d.ts +2 -0
  31. package/dist/lib/components/extended/index.js +1 -1
  32. package/dist/lib/index.js +12 -12
  33. package/dist/lib/styles.css +1 -1
  34. package/dist/lib/tokens.css +29 -34
  35. package/docs/DATAGRID.md +111 -1
  36. package/package.json +1 -1
  37. package/dist/lib/Pagination-AWL5k5zG.js.map +0 -1
  38. package/dist/lib/Switch-DyKAqvde.js.map +0 -1
  39. package/dist/lib/Toolbar-DDOaxG3B.js.map +0 -1
  40. package/dist/lib/VisuallyHidden-DcE0EFpo.js.map +0 -1
  41. package/dist/lib/VoiceControlBar-lMPuJMcF.js.map +0 -1
  42. package/dist/lib/Waveform-EahaE6uD.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { s as e } from "./VisuallyHidden-DcE0EFpo.js";
1
+ import { s as e } from "./VisuallyHidden-Bht2-rdy.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  import { useCallback as r, useState as i } from "react";
4
4
  import { Check as a, Minus as o } from "lucide-react";
@@ -114,4 +114,4 @@ function d({ children: e, content: r, side: i = "top", delay: a = 300, open: o,
114
114
  //#endregion
115
115
  export { c as i, u as n, l as r, d as t };
116
116
 
117
- //# sourceMappingURL=Tooltip-BW1-aVDg.js.map
117
+ //# sourceMappingURL=Tooltip-1flxtzgM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip-BW1-aVDg.js","names":[],"sources":["../../src/components/common/Checkbox/Checkbox.tsx","../../src/components/common/Select/listbox.ts","../../src/components/common/Skeleton/Skeleton.tsx","../../src/components/common/Tooltip/Tooltip.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport type { ChangeEvent, ReactNode } from \"react\";\nimport { Check, Minus } from \"lucide-react\";\nimport { Icon } from \"../Icon\";\nimport \"./Checkbox.css\";\n\nexport type CheckboxSize = \"sm\" | \"md\";\n\nexport type CheckboxProps = {\n children?: ReactNode;\n checked?: boolean;\n defaultChecked?: boolean;\n /**\n * Some of what this box stands for is checked and some is not.\n *\n * A DOM property, not an attribute — there is no `indeterminate=\"\"` in HTML — so it is set\n * through a ref. Every implementation that forgets this ships a box that looks\n * indeterminate and reports itself as unchecked.\n */\n indeterminate?: boolean;\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n size?: CheckboxSize;\n disabled?: boolean;\n invalid?: boolean;\n name?: string;\n value?: string;\n id?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A real `<input type=\"checkbox\">`, drawn over.\n *\n * The input is present, focusable and in the form; what is hidden is only its appearance.\n * Rebuilding a checkbox out of a `<div role=\"checkbox\">` means rebuilding space-to-toggle,\n * form submission, `:checked`, autofill and the label association, and getting one of them\n * wrong is the usual outcome.\n */\nexport function Checkbox({\n children,\n indeterminate,\n size = \"md\",\n disabled,\n invalid,\n className,\n ...rest\n}: CheckboxProps) {\n const setIndeterminate = useCallback(\n (node: HTMLInputElement | null) => {\n if (node) node.indeterminate = Boolean(indeterminate);\n },\n [indeterminate],\n );\n\n return (\n <label\n className={`checkbox ${className ?? \"\"}`.trim()}\n data-size={size}\n data-disabled={disabled ? \"\" : undefined}\n data-invalid={invalid ? \"\" : undefined}\n >\n <input\n {...rest}\n ref={setIndeterminate}\n type=\"checkbox\"\n className=\"checkbox__input\"\n disabled={disabled}\n aria-invalid={invalid || undefined}\n />\n <span className=\"checkbox__box\" aria-hidden=\"true\">\n <Icon icon={indeterminate ? Minus : Check} size={size === \"sm\" ? \"xs\" : \"sm\"} />\n </span>\n {children ? <span className=\"checkbox__label\">{children}</span> : null}\n </label>\n );\n}\n","import { useState } from \"react\";\n\n/**\n * The list model, made available to any list rather than only to `Select`.\n *\n * Four components walk a list of rows with `aria-activedescendant`: `Select`, `MultiSelect`,\n * `Combobox` and `CommandPalette`. They had four copies of the same contract, and\n * `docs/COMPONENT-AUDIT.md` counted the drift: two wrote the walk as `move()`, one as\n * `step()`, one as a `switch` and the rest as `if` chains. The copies were not merely\n * different. They had stopped agreeing.\n *\n * `CommandPalette` did not skip locked rows at all. An arrow key landed on a disabled\n * command and Enter then refused it, which is a control saying no to the keyboard and yes\n * to the pointer. The other three each carry a comment explaining why that must not happen.\n *\n * `Select` gated `aria-activedescendant` on the SELECTED index while naming the ACTIVE one,\n * so a select whose value matched no option announced nothing as the arrows moved.\n *\n * Both were fixed by there being one model instead of four. That is what this is for: not\n * fewer lines, but one place where the contract can be read and therefore one place where it\n * can be wrong.\n *\n * It lives here, beside `Select`, for the reason `refraction.ts` lives beside `Glass`. A\n * `common/` folder holding only a hook would fail the contract's demo rule, `src/foundation`\n * is not something a component may import, and `Select` is the plainest list of the four.\n *\n * What it does NOT own: whether the list is open, what Enter does, and how a row is drawn.\n * Those are four different things in four components — Enter alone commits a value, toggles\n * one of several, fills a field, or runs a command that cannot be undone — and a hook that\n * took them would be the god-code this audit went looking for.\n */\n\nexport type ListboxOptions<Row> = {\n /** Every row the reader can see, locked ones included. Indices are into this. */\n rows: Row[];\n /** A row the pointer may not choose. The arrows must agree with the pointer about it. */\n locked?: (row: Row) => boolean;\n /** The DOM id of a row, for `aria-activedescendant`. Index-based or value-based, as suits. */\n id: (row: Row, index: number) => string;\n /**\n * Whether the ends join. A palette of verbs wraps: at the bottom the next thing the reader\n * wants is the top, not nothing happening. A `Select` standing in for a native one does\n * not, because the native one does not.\n */\n loop?: boolean;\n};\n\nexport type Listbox<Row> = {\n /** Index into `rows`, or -1 when there is nothing reachable to stand on. */\n active: number;\n activeRow: Row | undefined;\n /** For `aria-activedescendant`. Undefined when nothing is active, never a row that is gone. */\n activeId: string | undefined;\n /** Point at a row by index. Out-of-range and locked rows are refused rather than clamped. */\n setActive: (index: number) => void;\n /** One step in a direction, over reachable rows only. */\n move: (step: number) => void;\n first: () => void;\n last: () => void;\n /**\n * Arrow keys, Home and End. Returns whether it took the event.\n *\n * Enter, Escape, Tab and Backspace are not here. They mean different things in each of the\n * four, and the one that looks shared is the one that is not: Enter commits, toggles, fills\n * and runs.\n */\n took: (event: { key: string; preventDefault: () => void }) => boolean;\n};\n\nexport function useListbox<Row>({ rows, locked, id, loop = true }: ListboxOptions<Row>): Listbox<Row> {\n const [stored, setStored] = useState(0);\n\n const isLocked = (row: Row) => Boolean(locked?.(row));\n const reachable = rows.filter((row) => !isLocked(row));\n\n /*\n * Derived rather than corrected in an effect.\n *\n * Rows come and go or become locked while the reader types. An index from a longer list points\n * past the end of the shorter one. An effect that repaired it would render once with\n * `aria-activedescendant` naming a row that is not in the document, which is the frame a\n * screen reader is reading.\n */\n const active = stored >= 0 && stored < rows.length && !isLocked(rows[stored])\n ? stored : reachable.length > 0 ? rows.indexOf(reachable[0]) : -1;\n const activeRow = active >= 0 ? rows[active] : undefined;\n\n const setActive = (index: number) => {\n if (index < 0 || index >= rows.length) return;\n setStored(index);\n };\n\n const move = (step: number) => {\n if (reachable.length === 0) return;\n const here = activeRow === undefined ? -1 : reachable.indexOf(activeRow);\n /*\n * The active row can be a locked one: the pointer is allowed to land anywhere, and the\n * first row of a fresh list may itself be locked. `indexOf` returns -1 for that, and -1\n * walked forwards lands on the first row and backwards on the second from last, which is\n * neither arrow's meaning. Down starts at the top, up starts at the bottom.\n */\n const from = here >= 0 ? here : step > 0 ? -1 : 0;\n const to = from + step;\n const next = loop\n ? (to + reachable.length) % reachable.length\n : Math.max(0, Math.min(reachable.length - 1, to));\n setStored(rows.indexOf(reachable[next]));\n };\n\n /* Nothing to land on means the active row stays where it is. Clearing it here left\n * `aria-activedescendant` pointing at a row Enter then refused to take. */\n const first = () => reachable.length > 0 && setStored(rows.indexOf(reachable[0]));\n const last = () => reachable.length > 0 && setStored(rows.indexOf(reachable[reachable.length - 1]));\n\n const took = (event: { key: string; preventDefault: () => void }) => {\n switch (event.key) {\n case \"ArrowDown\":\n event.preventDefault();\n move(1);\n return true;\n case \"ArrowUp\":\n event.preventDefault();\n move(-1);\n return true;\n case \"Home\":\n event.preventDefault();\n first();\n return true;\n case \"End\":\n event.preventDefault();\n last();\n return true;\n default:\n return false;\n }\n };\n\n return {\n active,\n activeRow,\n activeId: activeRow === undefined ? undefined : id(activeRow, active),\n setActive,\n move,\n first,\n last,\n took,\n };\n}\n","import \"./Skeleton.css\";\n\nexport type SkeletonShape = \"text\" | \"rect\" | \"circle\";\nexport type SkeletonSize = \"sm\" | \"md\" | \"lg\";\n\nexport type SkeletonProps = {\n shape?: SkeletonShape;\n /** Only for `shape=\"text\"`: how many lines of it. One to six. */\n lines?: 1 | 2 | 3 | 4 | 5 | 6;\n /** For `rect` and `circle`, which have no line height to take their size from. */\n size?: SkeletonSize;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * The shape of what has not arrived.\n *\n * `aria-hidden`, always, and never a live region. A skeleton is a picture of a layout, and\n * announcing \"loading, loading, loading\" once per placeholder is worse than silence — the\n * thing that should speak is the region the content lands in, once, when it lands.\n *\n * Text skeletons end short on the last line, because a paragraph does. A block of equal bars\n * reads as a table.\n */\nexport function Skeleton({ shape = \"text\", lines = 3, size = \"md\", className, ...rest }: SkeletonProps) {\n if (shape !== \"text\") {\n return (\n <span\n {...rest}\n className={`skeleton ${className ?? \"\"}`.trim()}\n data-shape={shape}\n data-size={size}\n aria-hidden=\"true\"\n />\n );\n }\n\n return (\n <span\n {...rest}\n className={`skeleton ${className ?? \"\"}`.trim()}\n data-shape=\"text\"\n data-lines={lines}\n aria-hidden=\"true\"\n >\n {Array.from({ length: lines }, (_, index) => (\n <span key={index} className=\"skeleton__line\" />\n ))}\n </span>\n );\n}\n","import type { ReactElement, ReactNode } from \"react\";\nimport * as RadixTooltip from \"@radix-ui/react-tooltip\";\nimport \"./Tooltip.css\";\n\nexport type TooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport type TooltipProps = {\n /** The control this describes. One element, and it must be able to take focus. */\n children: ReactElement;\n /** What it says. Short — a tooltip that needs a paragraph is not a tooltip. */\n content: ReactNode;\n side?: TooltipSide;\n /** Milliseconds before it opens. The first of a run opens after this; the rest are instant. */\n delay?: number;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n className?: string;\n};\n\n/**\n * A short description of a control, on hover and on focus.\n *\n * Built on Radix rather than from scratch, and the reason is WCAG 1.4.13: content that\n * appears on hover has to be dismissible with Escape, hoverable without vanishing, and\n * persistent until it is dismissed or stops being relevant. On top of that a tooltip has to\n * flip at a viewport edge, portal out of any ancestor with `overflow: hidden`, open on\n * keyboard focus as well as hover, and close on touch instead of sticking. Every one of those\n * is a place a hand-rolled tooltip is wrong, and none of them is visible in a screenshot.\n *\n * What this file owns is the appearance, drawn entirely from tokens.\n *\n * A tooltip is never the only place something is said. It cannot be reached by touch and it\n * cannot be selected, so a control whose name exists only in its tooltip has no name on a\n * phone. Use it to add, never to carry.\n */\nexport function Tooltip({\n children,\n content,\n side = \"top\",\n delay = 300,\n open,\n defaultOpen,\n onOpenChange,\n className,\n}: TooltipProps) {\n return (\n <RadixTooltip.Provider delayDuration={delay} skipDelayDuration={200}>\n <RadixTooltip.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n <RadixTooltip.Trigger asChild>{children}</RadixTooltip.Trigger>\n <RadixTooltip.Portal>\n <RadixTooltip.Content\n className={`tooltip ${className ?? \"\"}`.trim()}\n side={side}\n sideOffset={6}\n collisionPadding={8}\n >\n {content}\n <RadixTooltip.Arrow className=\"tooltip__arrow\" width={10} height={5} />\n </RadixTooltip.Content>\n </RadixTooltip.Portal>\n </RadixTooltip.Root>\n </RadixTooltip.Provider>\n );\n}\n"],"mappings":";;;;;;AAwCA,SAAgB,EAAS,EACvB,aACA,kBACA,UAAO,MACP,aACA,YACA,cACA,GAAG,KACa;CAChB,IAAM,IAAmB,GACtB,MAAkC;EACjC,AAAI,MAAM,EAAK,gBAAgB,EAAQ;CACzC,GACA,CAAC,CAAa,CAChB;CAEA,OACE,kBAAC,SAAD;EACE,WAAW,YAAY,KAAa,KAAK,KAAK;EAC9C,aAAW;EACX,iBAAe,IAAW,KAAK,KAAA;EAC/B,gBAAc,IAAU,KAAK,KAAA;EAJ/B,UAAA;GAME,kBAAC,SAAD;IACE,GAAI;IACJ,KAAK;IACL,MAAK;IACL,WAAU;IACA;IACV,gBAAc,KAAW,KAAA;GAC1B,CAAA;GACD,kBAAC,QAAD;IAAM,WAAU;IAAgB,eAAY;IAC1C,UAAA,kBAAC,GAAD;KAAM,MAAM,IAAgB,IAAQ;KAAO,MAAM,MAAS,OAAO,OAAO;IAAO,CAAA;GAC3E,CAAA;GACL,IAAW,kBAAC,QAAD;IAAM,WAAU;IAAmB;GAAe,CAAA,IAAI;EAC7D;;AAEX;;;ACRA,SAAgB,EAAgB,EAAE,SAAM,WAAQ,OAAI,UAAO,MAA2C;CACpG,IAAM,CAAC,GAAQ,KAAa,EAAS,CAAC,GAEhC,KAAY,MAAa,EAAQ,IAAS,CAAG,GAC7C,IAAY,EAAK,QAAQ,MAAQ,CAAC,EAAS,CAAG,CAAC,GAU/C,IAAS,KAAU,KAAK,IAAS,EAAK,UAAU,CAAC,EAAS,EAAK,EAAO,IACxE,IAAS,EAAU,SAAS,IAAI,EAAK,QAAQ,EAAU,EAAE,IAAI,IAC3D,IAAY,KAAU,IAAI,EAAK,KAAU,KAAA,GAEzC,KAAa,MAAkB;EAC/B,IAA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AAnC,CAAmC,CAC/C;CACG,CAAA,IArBJ,kBAAC,QAAD;EACE,GAAI;EACJ,WAAW,YAAY,KAAa,KAAK,KAAK;EAC9C,cAAY;EACZ,aAAW;EACX,eAAY;CACb,CAAA;AAiBP;;;ACfA,SAAgB,EAAQ,EACtB,aACA,YACA,UAAO,OACP,WAAQ,KACR,SACA,gBACA,iBACA,gBACe;CACf,OACE,kBAAC,EAAa,UAAd;EAAuB,eAAe;EAAO,mBAAmB;EAC9D,UAAA,kBAAC,EAAa,MAAd;GAAyB;GAAmB;GAA2B;GAAvE,UAAA,CACE,kBAAC,EAAa,SAAd;IAAsB,SAAA;IAAS;GAA+B,CAAA,GAC9D,kBAAC,EAAa,QAAd,EAAA,UACE,kBAAC,EAAa,SAAd;IACE,WAAW,WAAW,KAAa,KAAK,KAAK;IACvC;IACN,YAAY;IACZ,kBAAkB;IAJpB,UAAA,CAMG,GACD,kBAAC,EAAa,OAAd;KAAoB,WAAU;KAAiB,OAAO;KAAI,QAAQ;IAAI,CAAA,CAClD;GACH,CAAA,EAAA,CAAA,CACJ;;CACE,CAAA;AAE3B"}
1
+ {"version":3,"file":"Tooltip-1flxtzgM.js","names":[],"sources":["../../src/components/common/Checkbox/Checkbox.tsx","../../src/components/common/Select/listbox.ts","../../src/components/common/Skeleton/Skeleton.tsx","../../src/components/common/Tooltip/Tooltip.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport type { ChangeEvent, ReactNode } from \"react\";\nimport { Check, Minus } from \"lucide-react\";\nimport { Icon } from \"../Icon\";\nimport \"./Checkbox.css\";\n\nexport type CheckboxSize = \"sm\" | \"md\";\n\nexport type CheckboxProps = {\n children?: ReactNode;\n checked?: boolean;\n defaultChecked?: boolean;\n /**\n * Some of what this box stands for is checked and some is not.\n *\n * A DOM property, not an attribute — there is no `indeterminate=\"\"` in HTML — so it is set\n * through a ref. Every implementation that forgets this ships a box that looks\n * indeterminate and reports itself as unchecked.\n */\n indeterminate?: boolean;\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n size?: CheckboxSize;\n disabled?: boolean;\n invalid?: boolean;\n name?: string;\n value?: string;\n id?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A real `<input type=\"checkbox\">`, drawn over.\n *\n * The input is present, focusable and in the form; what is hidden is only its appearance.\n * Rebuilding a checkbox out of a `<div role=\"checkbox\">` means rebuilding space-to-toggle,\n * form submission, `:checked`, autofill and the label association, and getting one of them\n * wrong is the usual outcome.\n */\nexport function Checkbox({\n children,\n indeterminate,\n size = \"md\",\n disabled,\n invalid,\n className,\n ...rest\n}: CheckboxProps) {\n const setIndeterminate = useCallback(\n (node: HTMLInputElement | null) => {\n if (node) node.indeterminate = Boolean(indeterminate);\n },\n [indeterminate],\n );\n\n return (\n <label\n className={`checkbox ${className ?? \"\"}`.trim()}\n data-size={size}\n data-disabled={disabled ? \"\" : undefined}\n data-invalid={invalid ? \"\" : undefined}\n >\n <input\n {...rest}\n ref={setIndeterminate}\n type=\"checkbox\"\n className=\"checkbox__input\"\n disabled={disabled}\n aria-invalid={invalid || undefined}\n />\n <span className=\"checkbox__box\" aria-hidden=\"true\">\n <Icon icon={indeterminate ? Minus : Check} size={size === \"sm\" ? \"xs\" : \"sm\"} />\n </span>\n {children ? <span className=\"checkbox__label\">{children}</span> : null}\n </label>\n );\n}\n","import { useState } from \"react\";\n\n/**\n * The list model, made available to any list rather than only to `Select`.\n *\n * Four components walk a list of rows with `aria-activedescendant`: `Select`, `MultiSelect`,\n * `Combobox` and `CommandPalette`. They had four copies of the same contract, and\n * `docs/COMPONENT-AUDIT.md` counted the drift: two wrote the walk as `move()`, one as\n * `step()`, one as a `switch` and the rest as `if` chains. The copies were not merely\n * different. They had stopped agreeing.\n *\n * `CommandPalette` did not skip locked rows at all. An arrow key landed on a disabled\n * command and Enter then refused it, which is a control saying no to the keyboard and yes\n * to the pointer. The other three each carry a comment explaining why that must not happen.\n *\n * `Select` gated `aria-activedescendant` on the SELECTED index while naming the ACTIVE one,\n * so a select whose value matched no option announced nothing as the arrows moved.\n *\n * Both were fixed by there being one model instead of four. That is what this is for: not\n * fewer lines, but one place where the contract can be read and therefore one place where it\n * can be wrong.\n *\n * It lives here, beside `Select`, for the reason `refraction.ts` lives beside `Glass`. A\n * `common/` folder holding only a hook would fail the contract's demo rule, `src/foundation`\n * is not something a component may import, and `Select` is the plainest list of the four.\n *\n * What it does NOT own: whether the list is open, what Enter does, and how a row is drawn.\n * Those are four different things in four components — Enter alone commits a value, toggles\n * one of several, fills a field, or runs a command that cannot be undone — and a hook that\n * took them would be the god-code this audit went looking for.\n */\n\nexport type ListboxOptions<Row> = {\n /** Every row the reader can see, locked ones included. Indices are into this. */\n rows: Row[];\n /** A row the pointer may not choose. The arrows must agree with the pointer about it. */\n locked?: (row: Row) => boolean;\n /** The DOM id of a row, for `aria-activedescendant`. Index-based or value-based, as suits. */\n id: (row: Row, index: number) => string;\n /**\n * Whether the ends join. A palette of verbs wraps: at the bottom the next thing the reader\n * wants is the top, not nothing happening. A `Select` standing in for a native one does\n * not, because the native one does not.\n */\n loop?: boolean;\n};\n\nexport type Listbox<Row> = {\n /** Index into `rows`, or -1 when there is nothing reachable to stand on. */\n active: number;\n activeRow: Row | undefined;\n /** For `aria-activedescendant`. Undefined when nothing is active, never a row that is gone. */\n activeId: string | undefined;\n /** Point at a row by index. Out-of-range and locked rows are refused rather than clamped. */\n setActive: (index: number) => void;\n /** One step in a direction, over reachable rows only. */\n move: (step: number) => void;\n first: () => void;\n last: () => void;\n /**\n * Arrow keys, Home and End. Returns whether it took the event.\n *\n * Enter, Escape, Tab and Backspace are not here. They mean different things in each of the\n * four, and the one that looks shared is the one that is not: Enter commits, toggles, fills\n * and runs.\n */\n took: (event: { key: string; preventDefault: () => void }) => boolean;\n};\n\nexport function useListbox<Row>({ rows, locked, id, loop = true }: ListboxOptions<Row>): Listbox<Row> {\n const [stored, setStored] = useState(0);\n\n const isLocked = (row: Row) => Boolean(locked?.(row));\n const reachable = rows.filter((row) => !isLocked(row));\n\n /*\n * Derived rather than corrected in an effect.\n *\n * Rows come and go or become locked while the reader types. An index from a longer list points\n * past the end of the shorter one. An effect that repaired it would render once with\n * `aria-activedescendant` naming a row that is not in the document, which is the frame a\n * screen reader is reading.\n */\n const active = stored >= 0 && stored < rows.length && !isLocked(rows[stored])\n ? stored : reachable.length > 0 ? rows.indexOf(reachable[0]) : -1;\n const activeRow = active >= 0 ? rows[active] : undefined;\n\n const setActive = (index: number) => {\n if (index < 0 || index >= rows.length) return;\n setStored(index);\n };\n\n const move = (step: number) => {\n if (reachable.length === 0) return;\n const here = activeRow === undefined ? -1 : reachable.indexOf(activeRow);\n /*\n * The active row can be a locked one: the pointer is allowed to land anywhere, and the\n * first row of a fresh list may itself be locked. `indexOf` returns -1 for that, and -1\n * walked forwards lands on the first row and backwards on the second from last, which is\n * neither arrow's meaning. Down starts at the top, up starts at the bottom.\n */\n const from = here >= 0 ? here : step > 0 ? -1 : 0;\n const to = from + step;\n const next = loop\n ? (to + reachable.length) % reachable.length\n : Math.max(0, Math.min(reachable.length - 1, to));\n setStored(rows.indexOf(reachable[next]));\n };\n\n /* Nothing to land on means the active row stays where it is. Clearing it here left\n * `aria-activedescendant` pointing at a row Enter then refused to take. */\n const first = () => reachable.length > 0 && setStored(rows.indexOf(reachable[0]));\n const last = () => reachable.length > 0 && setStored(rows.indexOf(reachable[reachable.length - 1]));\n\n const took = (event: { key: string; preventDefault: () => void }) => {\n switch (event.key) {\n case \"ArrowDown\":\n event.preventDefault();\n move(1);\n return true;\n case \"ArrowUp\":\n event.preventDefault();\n move(-1);\n return true;\n case \"Home\":\n event.preventDefault();\n first();\n return true;\n case \"End\":\n event.preventDefault();\n last();\n return true;\n default:\n return false;\n }\n };\n\n return {\n active,\n activeRow,\n activeId: activeRow === undefined ? undefined : id(activeRow, active),\n setActive,\n move,\n first,\n last,\n took,\n };\n}\n","import \"./Skeleton.css\";\n\nexport type SkeletonShape = \"text\" | \"rect\" | \"circle\";\nexport type SkeletonSize = \"sm\" | \"md\" | \"lg\";\n\nexport type SkeletonProps = {\n shape?: SkeletonShape;\n /** Only for `shape=\"text\"`: how many lines of it. One to six. */\n lines?: 1 | 2 | 3 | 4 | 5 | 6;\n /** For `rect` and `circle`, which have no line height to take their size from. */\n size?: SkeletonSize;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * The shape of what has not arrived.\n *\n * `aria-hidden`, always, and never a live region. A skeleton is a picture of a layout, and\n * announcing \"loading, loading, loading\" once per placeholder is worse than silence — the\n * thing that should speak is the region the content lands in, once, when it lands.\n *\n * Text skeletons end short on the last line, because a paragraph does. A block of equal bars\n * reads as a table.\n */\nexport function Skeleton({ shape = \"text\", lines = 3, size = \"md\", className, ...rest }: SkeletonProps) {\n if (shape !== \"text\") {\n return (\n <span\n {...rest}\n className={`skeleton ${className ?? \"\"}`.trim()}\n data-shape={shape}\n data-size={size}\n aria-hidden=\"true\"\n />\n );\n }\n\n return (\n <span\n {...rest}\n className={`skeleton ${className ?? \"\"}`.trim()}\n data-shape=\"text\"\n data-lines={lines}\n aria-hidden=\"true\"\n >\n {Array.from({ length: lines }, (_, index) => (\n <span key={index} className=\"skeleton__line\" />\n ))}\n </span>\n );\n}\n","import type { ReactElement, ReactNode } from \"react\";\nimport * as RadixTooltip from \"@radix-ui/react-tooltip\";\nimport \"./Tooltip.css\";\n\nexport type TooltipSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport type TooltipProps = {\n /** The control this describes. One element, and it must be able to take focus. */\n children: ReactElement;\n /** What it says. Short — a tooltip that needs a paragraph is not a tooltip. */\n content: ReactNode;\n side?: TooltipSide;\n /** Milliseconds before it opens. The first of a run opens after this; the rest are instant. */\n delay?: number;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n className?: string;\n};\n\n/**\n * A short description of a control, on hover and on focus.\n *\n * Built on Radix rather than from scratch, and the reason is WCAG 1.4.13: content that\n * appears on hover has to be dismissible with Escape, hoverable without vanishing, and\n * persistent until it is dismissed or stops being relevant. On top of that a tooltip has to\n * flip at a viewport edge, portal out of any ancestor with `overflow: hidden`, open on\n * keyboard focus as well as hover, and close on touch instead of sticking. Every one of those\n * is a place a hand-rolled tooltip is wrong, and none of them is visible in a screenshot.\n *\n * What this file owns is the appearance, drawn entirely from tokens.\n *\n * A tooltip is never the only place something is said. It cannot be reached by touch and it\n * cannot be selected, so a control whose name exists only in its tooltip has no name on a\n * phone. Use it to add, never to carry.\n */\nexport function Tooltip({\n children,\n content,\n side = \"top\",\n delay = 300,\n open,\n defaultOpen,\n onOpenChange,\n className,\n}: TooltipProps) {\n return (\n <RadixTooltip.Provider delayDuration={delay} skipDelayDuration={200}>\n <RadixTooltip.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n <RadixTooltip.Trigger asChild>{children}</RadixTooltip.Trigger>\n <RadixTooltip.Portal>\n <RadixTooltip.Content\n className={`tooltip ${className ?? \"\"}`.trim()}\n side={side}\n sideOffset={6}\n collisionPadding={8}\n >\n {content}\n <RadixTooltip.Arrow className=\"tooltip__arrow\" width={10} height={5} />\n </RadixTooltip.Content>\n </RadixTooltip.Portal>\n </RadixTooltip.Root>\n </RadixTooltip.Provider>\n );\n}\n"],"mappings":";;;;;;AAwCA,SAAgB,EAAS,EACvB,aACA,kBACA,UAAO,MACP,aACA,YACA,cACA,GAAG,KACa;CAChB,IAAM,IAAmB,GACtB,MAAkC;EACjC,AAAI,MAAM,EAAK,gBAAgB,EAAQ;CACzC,GACA,CAAC,CAAa,CAChB;CAEA,OACE,kBAAC,SAAD;EACE,WAAW,YAAY,KAAa,KAAK,KAAK;EAC9C,aAAW;EACX,iBAAe,IAAW,KAAK,KAAA;EAC/B,gBAAc,IAAU,KAAK,KAAA;EAJ/B,UAAA;GAME,kBAAC,SAAD;IACE,GAAI;IACJ,KAAK;IACL,MAAK;IACL,WAAU;IACA;IACV,gBAAc,KAAW,KAAA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AoB,WAAU;KAAiB,OAAO;KAAI,QAAQ;IAAI,CAAA,CAClD;GACH,CAAA,EAAA,CAAA,CACJ;;CACE,CAAA;AAE3B"}
@@ -55,27 +55,29 @@ function g(e, t = 96) {
55
55
  return a(() => {
56
56
  let n = e.current;
57
57
  if (!n || typeof CSS > "u" || !CSS.supports("backdrop-filter", "url(#x)")) return;
58
- let i = 0, a = 0, o = () => {
58
+ let i = 0, a = 0, o = -1, s = () => {
59
59
  let e = getComputedStyle(n);
60
60
  if (e.getPropertyValue("--surface-lens").trim() === "none") {
61
61
  i = 0, a = 0, r("");
62
62
  return;
63
63
  }
64
- let o = n.getBoundingClientRect(), s = d(o.width), c = d(o.height);
65
- if (s === i && c === a) return;
66
- i = s, a = c;
67
- let l = Number.parseFloat(e.borderStartStartRadius) || 0;
68
- r(h(s, c, l, t));
64
+ let s = n.getBoundingClientRect(), c = d(s.width), l = d(s.height), u = Number.parseFloat(e.borderStartStartRadius) || 0;
65
+ (c !== i || l !== a || u !== o) && (i = c, a = l, o = u, r(h(c, l, u, t)));
69
66
  };
70
- o();
71
- let s = new ResizeObserver(o);
72
- s.observe(n);
73
- let c = new MutationObserver(o);
74
- return c.observe(document.documentElement, {
67
+ s();
68
+ let c = new ResizeObserver(s);
69
+ c.observe(n);
70
+ let l = new MutationObserver(s);
71
+ return l.observe(document.documentElement, {
75
72
  attributes: !0,
76
- attributeFilter: ["data-look", "data-theme"]
73
+ subtree: !0,
74
+ attributeFilter: [
75
+ "data-look",
76
+ "data-theme",
77
+ "data-radius"
78
+ ]
77
79
  }), () => {
78
- s.disconnect(), c.disconnect();
80
+ c.disconnect(), l.disconnect();
79
81
  };
80
82
  }, [e, t]), n ? `url(#${n})` : "";
81
83
  }
@@ -191,4 +193,4 @@ function b({ children: e, as: n = "span", focusable: r, className: i }) {
191
193
  //#endregion
192
194
  export { l as a, _ as i, y as n, g as o, v as r, c as s, b as t };
193
195
 
194
- //# sourceMappingURL=VisuallyHidden-DcE0EFpo.js.map
196
+ //# sourceMappingURL=VisuallyHidden-Bht2-rdy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VisuallyHidden-Bht2-rdy.js","names":[],"sources":["../../src/components/common/Icon/Icon.tsx","../../src/components/common/Glass/refraction.ts","../../src/components/common/Spinner/Spinner.tsx","../../src/components/common/Button/Button.tsx","../../src/components/common/IconButton/IconButton.tsx","../../src/components/common/VisuallyHidden/VisuallyHidden.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport \"./Icon.css\";\n\nexport type IconSize = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type IconTone =\n | \"inherit\" | \"default\" | \"muted\" | \"subtle\"\n | \"accent\" | \"success\" | \"warning\" | \"danger\" | \"on-fill\";\n\nexport type IconProps = {\n /**\n * The icon itself, as a component rather than a name.\n *\n * A name would need a registry, and a registry is either every icon in the set — 1,500 of\n * them in the bundle whether or not a page uses six — or a hand-maintained list that is\n * always missing the one someone needs. Passing the component means the bundler drops\n * what nobody imported.\n */\n icon: LucideIcon;\n size?: IconSize;\n tone?: IconTone;\n /**\n * What the icon says, for a reader who cannot see it.\n *\n * Omitted is the honest default: most icons sit beside a label that already says it, and\n * announcing it twice is worse than not announcing it at all. Without a label the icon is\n * `aria-hidden` — declared decorative rather than left ambiguous.\n */\n label?: string;\n className?: string;\n style?: CSSProperties;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * An icon at a size and a tone the system knows.\n *\n * Nothing numeric reaches Lucide. Its components render `width`, `height` and `stroke-width`\n * as presentation attributes, and a CSS property beats a presentation attribute — so the\n * size and the weight of the stroke are set in the stylesheet from tokens, and this file\n * passes none of them. That is what keeps an icon following a density change instead of\n * carrying a number that was right once.\n */\nexport function Icon({\n icon: Glyph,\n size = \"md\",\n tone = \"inherit\",\n label,\n className,\n style,\n ...rest\n}: IconProps) {\n return (\n <Glyph\n {...rest}\n className={`icon ${className ?? \"\"}`.trim()}\n data-size={size}\n data-tone={tone}\n style={style}\n role={label ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n focusable=\"false\"\n />\n );\n}\n","import { useCallback, useEffect, useState, type Ref, type RefObject } from \"react\";\n\n/**\n * The caller's ref and the lens's, on one node.\n *\n * Written against a real failure and a bad one. `Button` took the lens ref by spreading the\n * caller's props first and writing `ref` after, which silently threw away the ref it had just\n * been handed. Radix passes its trigger's ref exactly that way — `asChild` clones the child\n * with one — so every menu and popover opened by a `Button` lost its anchor. Floating UI never\n * positioned, and Radix left the panel parked at its unpositioned `translate(0, -200%)`: the\n * menu rendered off screen, at minus twice its own height, with no error anywhere.\n *\n * `Card` and `Glass` had the same collision the other way round, writing `ref` before the\n * spread, where an incoming ref turned the lens off instead. Neither order is right. A node\n * two things need is a node both of them get.\n */\nexport function useComposedRef<T extends HTMLElement>(\n mine: RefObject<T | null>,\n theirs: Ref<T> | undefined,\n): (node: T | null) => void {\n return useCallback(\n (node: T | null) => {\n mine.current = node;\n if (typeof theirs === \"function\") theirs(node);\n else if (theirs) (theirs as { current: T | null }).current = node;\n },\n [mine, theirs],\n );\n}\n\n/**\n * The lens, made available to any surface rather than only to `Glass`.\n *\n * Refraction needs a displacement map shaped like the pane, and `backdrop-filter` cannot see\n * the pane it is filtering: inside it `SourceGraphic` is the backdrop, so the element's own\n * outline is not available anywhere in the filter graph. The map therefore has to be drawn\n * from outside at the element's real size — which is why this is a hook with a\n * `ResizeObserver` and not three more lines in `tokens.css`.\n *\n * Two things keep that from being expensive on a page with fifty cards:\n *\n * The maps are CACHED by shape. A grid of identical cards draws one map and shares one\n * filter — the id is the shape, so sameness is free rather than something a caller arranges.\n *\n * The size is SNAPPED to a step. A drag-resize crosses a hundred widths and would otherwise\n * redraw a canvas at each of them.\n *\n * Measured rather than assumed, because the shape of this loop invites a guess and the guess\n * is wrong. Chromium, the four pane shapes this library actually draws under the glass look:\n *\n * 704x256 16.0ms 9 kB the largest, and the one frame it costs\n * 704x136 6.7ms 6 kB\n * 344x104 2.7ms 4 kB\n * 56x40 0.2ms 2 kB a button face\n * ----- -----\n * 25.6ms 21 kB a whole page, once, including the PNG encode\n *\n * Drawing the map at half scale and letting `feImage` stretch it (it already carries\n * `preserveAspectRatio=\"none\"`) takes the total to 6.8ms. That is a real saving and it is NOT\n * worth taking: it buys 19ms that are spent once, after mount, on a cache that never redraws\n * the same shape, and it pays in a bend whose fidelity is the entire point of the component.\n * If a pane ever appears that is much larger than 704x256, re-measure before assuming this\n * still holds.\n *\n * The filters live in one node appended to the document rather than inside each pane, because\n * a filter referenced by id has to be findable and a pane that unmounts must not take the\n * filter its neighbours are using with it. They are never removed: a page's set of pane shapes\n * is small and bounded, and a cache that evicts would redraw the shape a reader just scrolled\n * past.\n */\n\nconst STEP = 8;\nconst snap = (value: number) => Math.max(STEP, Math.round(value / STEP) * STEP);\n\nconst made = new Map<string, string>();\nlet host: SVGSVGElement | null = null;\n\nfunction drawMap(width: number, height: number, radius: number, band: number) {\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n const context = canvas.getContext(\"2d\");\n if (!context) return null;\n\n const image = context.createImageData(width, height);\n /* Signed distance to a rounded rectangle: negative inside, zero on the edge. */\n const distance = (x: number, y: number) => {\n const qx = Math.abs(x - width / 2) - (width / 2 - radius);\n const qy = Math.abs(y - height / 2) - (height / 2 - radius);\n return Math.hypot(Math.max(qx, 0), Math.max(qy, 0)) + Math.min(Math.max(qx, qy), 0) - radius;\n };\n\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const here = distance(x + 0.5, y + 0.5);\n /* The normal is the gradient of the distance field, as a central difference. */\n const nx = (distance(x + 1.5, y + 0.5) - distance(x - 0.5, y + 0.5)) / 2;\n const ny = (distance(x + 0.5, y + 1.5) - distance(x + 0.5, y - 0.5)) / 2;\n const length = Math.hypot(nx, ny) || 1;\n /*\n * Zero through the middle, one at the rim, and CUBED rather than squared.\n *\n * This exponent is the volume. A gentle ramp bends a wide part of the pane a little and\n * reads as a warp in the picture; a steep one leaves the middle alone and crushes the\n * bend into a band at the rim, which is what an edge of actual thickness does to what\n * is behind it. The band is wider than the corner radius for the same reason — a slab\n * refracts along its whole thickness, not only where it curves.\n */\n const ramp = here > 0 ? 0 : Math.min(1, Math.max(0, 1 + here / band));\n const weight = ramp * ramp * ramp;\n\n const i = (y * width + x) * 4;\n image.data[i] = 128 + (nx / length) * 127 * weight;\n image.data[i + 1] = 128 + (ny / length) * 127 * weight;\n image.data[i + 2] = 0;\n image.data[i + 3] = 255;\n }\n }\n context.putImageData(image, 0, 0);\n return canvas.toDataURL();\n}\n\nfunction filterFor(width: number, height: number, radius: number, scale: number) {\n const id = `lens-${width}x${height}r${Math.round(radius)}s${scale}`;\n if (made.has(id)) return made.get(id)!;\n\n const href = drawMap(width, height, radius, Math.max(radius * 1.8, STEP * 4));\n if (!href) return \"\";\n\n if (!host) {\n host = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n host.setAttribute(\"aria-hidden\", \"true\");\n host.setAttribute(\"width\", \"0\");\n host.setAttribute(\"height\", \"0\");\n host.style.position = \"absolute\";\n document.body.append(host);\n }\n\n const NS = \"http://www.w3.org/2000/svg\";\n const node = document.createElementNS(NS, \"filter\");\n node.setAttribute(\"id\", id);\n /* The lens reaches past the pane: a bend pulls in backdrop from outside the box, and a\n * filter region clipped to the box would cut the very thing it went to fetch. */\n node.setAttribute(\"x\", \"-30%\");\n node.setAttribute(\"y\", \"-30%\");\n node.setAttribute(\"width\", \"160%\");\n node.setAttribute(\"height\", \"160%\");\n node.setAttribute(\"color-interpolation-filters\", \"sRGB\");\n\n const image = document.createElementNS(NS, \"feImage\");\n image.setAttribute(\"href\", href);\n image.setAttribute(\"width\", String(width));\n image.setAttribute(\"height\", String(height));\n image.setAttribute(\"preserveAspectRatio\", \"none\");\n image.setAttribute(\"result\", \"map\");\n const displace = document.createElementNS(NS, \"feDisplacementMap\");\n displace.setAttribute(\"in\", \"SourceGraphic\");\n displace.setAttribute(\"in2\", \"map\");\n displace.setAttribute(\"scale\", String(scale));\n displace.setAttribute(\"xChannelSelector\", \"R\");\n displace.setAttribute(\"yChannelSelector\", \"G\");\n node.append(image, displace);\n host.append(node);\n\n made.set(id, id);\n return id;\n}\n\n/**\n * Returns the `filter()` value for a pane, or an empty string.\n *\n * Empty rather than `none` on purpose: the caller writes it into a custom property that sits\n * inside a `backdrop-filter` list, and a list containing `none` is invalid CSS — the whole\n * declaration would be dropped and the pane would lose its blur along with its lens.\n */\nexport function useRefraction(pane: RefObject<HTMLElement | null>, scale = 96) {\n const [id, setId] = useState(\"\");\n\n useEffect(() => {\n const element = pane.current;\n if (!element) return;\n if (typeof CSS === \"undefined\" || !CSS.supports(\"backdrop-filter\", \"url(#x)\")) return;\n\n let width = 0;\n let height = 0;\n let previousRadius = -1;\n const read = () => {\n const style = getComputedStyle(element);\n /* Outside the glass look there is nothing to bend, and drawing a map for it would be a\n * canvas per card for a filter nothing can see. */\n if (style.getPropertyValue(\"--surface-lens\").trim() === \"none\") {\n /* The remembered size goes with it. It is the guard below that makes this necessary:\n * leaving it set means the pane comes back at the size it left at, the guard reads\n * that as \"nothing changed\", and the lens never returns. Toggling the look off and on\n * lost the bend until something happened to resize the pane. */\n width = 0;\n height = 0;\n setId(\"\");\n return;\n }\n const box = element.getBoundingClientRect();\n const w = snap(box.width);\n const h = snap(box.height);\n const radius = Number.parseFloat(style.borderStartStartRadius) || 0;\n if (w === width && h === height && radius === previousRadius) return;\n width = w;\n height = h;\n previousRadius = radius;\n setId(filterFor(w, h, radius, scale));\n };\n\n read();\n const observer = new ResizeObserver(read);\n observer.observe(element);\n /* The look is a root attribute, so it changes without the pane resizing. */\n const watcher = new MutationObserver(read);\n watcher.observe(document.documentElement, { attributes: true, subtree: true, attributeFilter: [\"data-look\", \"data-theme\", \"data-radius\"] });\n return () => {\n observer.disconnect();\n watcher.disconnect();\n };\n }, [pane, scale]);\n\n return id ? `url(#${id})` : \"\";\n}\n","import \"./Spinner.css\";\n\nexport type SpinnerSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\nexport type SpinnerTone = \"inherit\" | \"accent\" | \"muted\" | \"on-fill\";\n\nexport type SpinnerProps = {\n size?: SpinnerSize;\n tone?: SpinnerTone;\n /**\n * What is being waited for.\n *\n * Given, the spinner is a live region that says it. Omitted, it is `aria-hidden` — which\n * is right when the text beside it already says \"저장하는 중\" and wrong when nothing does.\n * There is no third option where the spinner is announced as \"spinner\".\n */\n label?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * Something is still happening.\n *\n * It turns on `--duration-loop`. Under reduced motion the stylesheet switches that infinite\n * animation off instead of collapsing its duration, which would make it strobe. The\n * incomplete ring remains visible and the label still states what is happening.\n */\nexport function Spinner({ size = \"md\", tone = \"inherit\", label, className, ...rest }: SpinnerProps) {\n return (\n <span\n {...rest}\n className={`spinner ${className ?? \"\"}`.trim()}\n data-size={size}\n data-tone={tone}\n role={label ? \"status\" : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n >\n <span className=\"spinner__ring\" />\n </span>\n );\n}\n","import { forwardRef, useRef, type CSSProperties, type MouseEvent, type ReactNode, type Ref } from \"react\";\nimport { useComposedRef, useRefraction } from \"../Glass/refraction\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../Icon\";\nimport { Spinner } from \"../Spinner\";\nimport \"./Button.css\";\n\nexport type ButtonVariant = \"solid\" | \"soft\" | \"outline\" | \"ghost\" | \"plain\";\nexport type ButtonTone = \"accent\" | \"neutral\" | \"success\" | \"warning\" | \"danger\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\nexport type ButtonShape = \"rounded\" | \"pill\";\n\nexport type ButtonProps = {\n children: ReactNode;\n variant?: ButtonVariant;\n tone?: ButtonTone;\n size?: ButtonSize;\n shape?: ButtonShape;\n iconStart?: LucideIcon;\n iconEnd?: LucideIcon;\n /**\n * Work is in flight.\n *\n * Not the `disabled` attribute. A disabled button leaves the tab order, so a reader who was\n * standing on it is dropped somewhere else the moment it starts working, and hears nothing\n * about why. `aria-disabled` keeps it where it was and `aria-busy` says what changed; the\n * click is refused in the handler instead.\n */\n loading?: boolean;\n disabled?: boolean;\n fullWidth?: boolean;\n type?: \"button\" | \"submit\" | \"reset\";\n /** Renders an anchor instead. A link that looks like a button is still a link. */\n href?: string;\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n className?: string;\n /** Declared because Radix hands one to an `asChild` trigger, and the lens needs the same\n * node. Both get it; see `useComposedRef`. */\n ref?: Ref<HTMLElement>;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\nexport const Button = forwardRef<HTMLElement, ButtonProps>(function Button({\n children,\n variant = \"solid\",\n tone = \"accent\",\n size = \"md\",\n shape = \"rounded\",\n iconStart,\n iconEnd,\n loading,\n disabled,\n fullWidth,\n type = \"button\",\n href,\n onClick,\n className,\n ...rest\n}: ButtonProps, ref) {\n const inert = Boolean(disabled || loading);\n const iconSize = size === \"lg\" ? \"md\" : \"sm\";\n\n /* Only the outline variant's fill is a surface, but the hook is cheap when there is nothing\n * to bend — outside the glass look it draws no map and returns an empty string — and the\n * two return paths below would otherwise need the ref twice. */\n const face = useRef<HTMLElement>(null);\n const lens = useRefraction(face, 40);\n const hold = useComposedRef(face, ref);\n\n const shared = {\n ...rest,\n ref: hold as never,\n style: lens ? ({ \"--glass-refraction\": lens } as CSSProperties) : undefined,\n className: `button ${className ?? \"\"}`.trim(),\n \"data-variant\": variant,\n \"data-tone\": tone,\n \"data-size\": size,\n \"data-shape\": shape,\n \"data-loading\": loading ? \"\" : undefined,\n \"data-full\": fullWidth ? \"\" : undefined,\n \"aria-disabled\": inert || undefined,\n \"aria-busy\": loading || undefined,\n onClick: (event: MouseEvent<HTMLElement>) => {\n if (inert) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n },\n };\n\n const content = (\n <>\n {iconStart ? <Icon icon={iconStart} size={iconSize} /> : null}\n <span className=\"button__label\">{children}</span>\n {iconEnd ? <Icon icon={iconEnd} size={iconSize} /> : null}\n {/* Laid over the label rather than replacing it, so the button does not change width\n * the moment it starts working and move whatever is beside it. */}\n {loading ? (\n <span className=\"button__busy\">\n <Spinner size={size === \"lg\" ? \"md\" : \"sm\"} />\n </span>\n ) : null}\n </>\n );\n\n if (href !== undefined) {\n return (\n <a {...shared} href={inert ? undefined : href} role={inert ? \"link\" : undefined}>\n {content}\n </a>\n );\n }\n\n return (\n <button {...shared} type={type}>\n {content}\n </button>\n );\n});\n","import { forwardRef, type MouseEvent, type Ref } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../Icon\";\nimport { Spinner } from \"../Spinner\";\nimport type { ButtonShape, ButtonTone, ButtonVariant } from \"../Button\";\nimport \"./IconButton.css\";\n\nexport type IconButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport type IconButtonProps = {\n icon: LucideIcon;\n /**\n * What it does. Required, and there is no version of this component without it.\n *\n * An icon-only control with no name reaches assistive technology as \"button\" and nothing\n * else. Making the label optional would mean shipping a component whose most likely use is\n * broken, so it is not optional.\n */\n label: string;\n variant?: ButtonVariant;\n tone?: ButtonTone;\n size?: IconButtonSize;\n shape?: ButtonShape | \"circle\";\n loading?: boolean;\n disabled?: boolean;\n type?: \"button\" | \"submit\" | \"reset\";\n href?: string;\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n className?: string;\n /** The button or anchor node, including when Radix supplies a trigger ref. */\n ref?: Ref<HTMLButtonElement | HTMLAnchorElement>;\n [key: `data-${string}`]: unknown;\n [key: `aria-${string}`]: unknown;\n};\n\n/**\n * A button that is only its icon, and therefore only its label.\n */\nexport const IconButton = forwardRef<HTMLButtonElement | HTMLAnchorElement, IconButtonProps>(function IconButton({\n icon,\n label,\n variant = \"ghost\",\n tone = \"neutral\",\n size = \"md\",\n shape = \"rounded\",\n loading,\n disabled,\n type = \"button\",\n href,\n onClick,\n className,\n ...rest\n}: IconButtonProps, ref) {\n const inert = Boolean(disabled || loading);\n const glyph = size === \"lg\" ? \"md\" : \"sm\";\n\n const shared = {\n ...rest,\n className: `icon-button ${className ?? \"\"}`.trim(),\n \"data-variant\": variant,\n \"data-tone\": tone,\n \"data-size\": size,\n \"data-shape\": shape,\n \"data-loading\": loading ? \"\" : undefined,\n \"aria-label\": label,\n \"aria-disabled\": inert || undefined,\n \"aria-busy\": loading || undefined,\n onClick: (event: MouseEvent<HTMLElement>) => {\n if (inert) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n },\n };\n\n /* The glyph is decorative: the control is already named, and announcing the icon as well\n * would say the same thing twice. */\n const content = loading ? <Spinner size={glyph} /> : <Icon icon={icon} size={glyph} />;\n\n if (href !== undefined) {\n return <a {...shared} ref={ref as Ref<HTMLAnchorElement>} href={inert ? undefined : href}>{content}</a>;\n }\n return <button {...shared} ref={ref as Ref<HTMLButtonElement>} type={type}>{content}</button>;\n});\n","import type { ElementType, ReactNode } from \"react\";\nimport \"./VisuallyHidden.css\";\n\nexport type VisuallyHiddenProps = {\n children: ReactNode;\n as?: ElementType;\n /**\n * Becomes visible when focused, for a skip link — the one case where hidden text has to\n * be reachable by the reader who needs it most.\n */\n focusable?: boolean;\n className?: string;\n};\n\n/**\n * Present to assistive technology, absent from the screen.\n *\n * Not `display: none` and not `visibility: hidden` — both remove it from the accessibility\n * tree as well, which is the opposite of the point. Not `text-indent: -9999px` either: that\n * leaves a 9999px box that a right-to-left layout scrolls to.\n */\nexport function VisuallyHidden({\n children,\n as: Element = \"span\",\n focusable,\n className,\n}: VisuallyHiddenProps) {\n return (\n <Element\n className={`visually-hidden ${className ?? \"\"}`.trim()}\n data-focusable={focusable ? \"\" : undefined}\n >\n {children}\n </Element>\n );\n}\n"],"mappings":";;;AA2CA,SAAgB,EAAK,EACnB,MAAM,GACN,UAAO,MACP,UAAO,WACP,UACA,cACA,UACA,GAAG,KACS;CACZ,OACE,kBAAC,GAAD;EACE,GAAI;EACJ,WAAW,QAAQ,KAAa,KAAK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