@photon-ai/pho-ui 4.21.0 → 4.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/chunks/{basic-page-B78a6jpw.js → basic-page-DnB4YSRj.js} +15 -15
  2. package/dist/chunks/basic-page-DnB4YSRj.js.map +1 -0
  3. package/dist/chunks/{chat-Dfbkf7g8.js → chat-C5W6L_Jg.js} +51 -51
  4. package/dist/chunks/chat-C5W6L_Jg.js.map +1 -0
  5. package/dist/chunks/{checkbox-DpWLbKVS.js → checkbox-D8smFViR.js} +2 -2
  6. package/dist/chunks/{checkbox-DpWLbKVS.js.map → checkbox-D8smFViR.js.map} +1 -1
  7. package/dist/chunks/chrome-Dyvv0FVf.js +14 -0
  8. package/dist/chunks/{chrome-Ds7WykBJ.js.map → chrome-Dyvv0FVf.js.map} +1 -1
  9. package/dist/chunks/{combobox-OQOi5hlB.js → combobox-C_yfFCFL.js} +2 -2
  10. package/dist/chunks/{combobox-OQOi5hlB.js.map → combobox-C_yfFCFL.js.map} +1 -1
  11. package/dist/chunks/{data-table-CAz_8HQw.js → data-table-C1tLUdw0.js} +4 -4
  12. package/dist/chunks/{data-table-CAz_8HQw.js.map → data-table-C1tLUdw0.js.map} +1 -1
  13. package/dist/chunks/{date-picker-vJQrTol9.js → date-picker-D-sWo3i8.js} +2 -2
  14. package/dist/chunks/{date-picker-vJQrTol9.js.map → date-picker-D-sWo3i8.js.map} +1 -1
  15. package/dist/chunks/{description-list-Duhhralt.js → description-list-DcTvBHzI.js} +6 -6
  16. package/dist/chunks/{description-list-Duhhralt.js.map → description-list-DcTvBHzI.js.map} +1 -1
  17. package/dist/chunks/{dialog-CDL6qY2a.js → dialog-e4_mOYGp.js} +5 -5
  18. package/dist/chunks/dialog-e4_mOYGp.js.map +1 -0
  19. package/dist/chunks/{error-BObcQClz.js → error-BjSn7wLu.js} +3 -3
  20. package/dist/chunks/{error-BObcQClz.js.map → error-BjSn7wLu.js.map} +1 -1
  21. package/dist/chunks/{filter-bar-qqCZf1x4.js → filter-bar-CLLonntH.js} +2 -2
  22. package/dist/chunks/{filter-bar-qqCZf1x4.js.map → filter-bar-CLLonntH.js.map} +1 -1
  23. package/dist/chunks/{log-list-QbSYHZu3.js → log-list-BqaJv2oA.js} +2 -2
  24. package/dist/chunks/{log-list-QbSYHZu3.js.map → log-list-BqaJv2oA.js.map} +1 -1
  25. package/dist/chunks/{menu-CC3fhf83.js → menu-CZSn8JAX.js} +2 -2
  26. package/dist/chunks/{menu-CC3fhf83.js.map → menu-CZSn8JAX.js.map} +1 -1
  27. package/dist/chunks/{popover-B0NBrYV5.js → popover-Dtp9C6Qg.js} +4 -4
  28. package/dist/chunks/{popover-B0NBrYV5.js.map → popover-Dtp9C6Qg.js.map} +1 -1
  29. package/dist/chunks/{select-xhSvDNbw.js → select-Dux2SBVc.js} +2 -2
  30. package/dist/chunks/{select-xhSvDNbw.js.map → select-Dux2SBVc.js.map} +1 -1
  31. package/dist/chunks/{sidebar-DHYyBBUj.js → sidebar-BsBlAVM9.js} +2 -2
  32. package/dist/chunks/sidebar-BsBlAVM9.js.map +1 -0
  33. package/dist/chunks/{stat-VxA1SvS_.js → stat-DUq4roVt.js} +16 -16
  34. package/dist/chunks/{stat-VxA1SvS_.js.map → stat-DUq4roVt.js.map} +1 -1
  35. package/dist/chunks/{status-view-I_Y6eEyX.js → status-view-Buhh1UBJ.js} +2 -2
  36. package/dist/chunks/status-view-Buhh1UBJ.js.map +1 -0
  37. package/dist/chunks/{toast-B1GAdxXP.js → toast-K549iZEX.js} +2 -2
  38. package/dist/chunks/{toast-B1GAdxXP.js.map → toast-K549iZEX.js.map} +1 -1
  39. package/dist/chunks/{trace-D9F0sne7.js → trace-5Rh1ade9.js} +2 -2
  40. package/dist/chunks/{trace-D9F0sne7.js.map → trace-5Rh1ade9.js.map} +1 -1
  41. package/dist/components/accordion.js +1 -1
  42. package/dist/components/accordion.js.map +1 -1
  43. package/dist/components/autocomplete.js +5 -5
  44. package/dist/components/autocomplete.js.map +1 -1
  45. package/dist/components/chat.js +1 -1
  46. package/dist/components/checkbox.js +1 -1
  47. package/dist/components/combobox.js +1 -1
  48. package/dist/components/command.js +1 -1
  49. package/dist/components/context-menu.js +5 -5
  50. package/dist/components/context-menu.js.map +1 -1
  51. package/dist/components/data-table.js +2 -2
  52. package/dist/components/date-picker.js +1 -1
  53. package/dist/components/description-list.js +1 -1
  54. package/dist/components/dialog.js +1 -1
  55. package/dist/components/drawer.js +5 -5
  56. package/dist/components/drawer.js.map +1 -1
  57. package/dist/components/error.js +1 -1
  58. package/dist/components/field.js +26 -24
  59. package/dist/components/field.js.map +1 -1
  60. package/dist/components/fieldset.js +5 -5
  61. package/dist/components/fieldset.js.map +1 -1
  62. package/dist/components/filter-bar.js +1 -1
  63. package/dist/components/log-list.js +1 -1
  64. package/dist/components/menu.js +1 -1
  65. package/dist/components/meter.js +12 -12
  66. package/dist/components/meter.js.map +1 -1
  67. package/dist/components/notification.js +2 -2
  68. package/dist/components/notification.js.map +1 -1
  69. package/dist/components/phone-input.js +1 -1
  70. package/dist/components/popover.js +1 -1
  71. package/dist/components/progress.js +16 -16
  72. package/dist/components/progress.js.map +1 -1
  73. package/dist/components/radio-group.js +1 -1
  74. package/dist/components/radio-group.js.map +1 -1
  75. package/dist/components/scope.js +3 -3
  76. package/dist/components/scope.js.map +1 -1
  77. package/dist/components/select.js +1 -1
  78. package/dist/components/slider.js +16 -16
  79. package/dist/components/slider.js.map +1 -1
  80. package/dist/components/stat.js +1 -1
  81. package/dist/components/status-view.js +1 -1
  82. package/dist/components/toast.js +1 -1
  83. package/dist/components/trace.js +1 -1
  84. package/dist/index.js +13 -13
  85. package/dist/sections/basic-page.js +2 -2
  86. package/dist/sections/sidebar.js +1 -1
  87. package/dist/src/components/data-table/chrome.d.ts +1 -1
  88. package/dist/src/components/drawer/drawer.d.ts +1 -0
  89. package/dist/src/components/field/field.d.ts +10 -2
  90. package/dist/src/components/status-view/status-view.d.ts +4 -3
  91. package/dist/src/sections/sidebar/sidebar.d.ts +7 -2
  92. package/package.json +1 -1
  93. package/src/styles/fonts.css +6 -4
  94. package/src/styles/theme.css +5 -3
  95. package/dist/chunks/basic-page-B78a6jpw.js.map +0 -1
  96. package/dist/chunks/chat-Dfbkf7g8.js.map +0 -1
  97. package/dist/chunks/chrome-Ds7WykBJ.js +0 -14
  98. package/dist/chunks/dialog-CDL6qY2a.js.map +0 -1
  99. package/dist/chunks/sidebar-DHYyBBUj.js.map +0 -1
  100. package/dist/chunks/status-view-I_Y6eEyX.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"scope.js","names":["BaseTooltip","Tooltip","BaseField","cn","revealIn","buttonVariants","IconCheck","IconChevronDown","CloseButton","Checkbox","Skeleton","GhostSearch","Tooltip$1","Select","useEffect","useId","useLayoutEffect","useMemo","useRef","useState","jsx","jsxs","AnimatePresence","motion","useReducedMotion","Field","Tooltip","SCOPE_SURFACE","SCOPE_INSET","SCOPE_SEARCH_ROW","SCOPE_PRESET_TRIGGER","CUSTOM","SCOPE_LIST","SCOPE_GROUP","SCOPE_ROW","SCOPE_BONE_ROW","SCOPE_GROUP_BAND","SCOPE_DESCRIPTION","SCOPE_SUMMARY","WIDE_REM","ROOMY_REM","useCardSize","ref","size","setSize","heights","node","measure","list","bones","rem","width","next","current","observer","groupItems","items","groups","byLabel","item","label","group","normalize","text","tokenize","query","matches","tokens","fields","haystack","token","nameOf","sameSelection","a","b","held","value","takeOver","reveal","from","ink","isClipped","target","Scope","valueProp","defaultValue","onValueChange","all","presets","placeholder","collapsible","openProp","defaultOpen","onOpenChange","loading","disabled","className","props","innerValue","setInnerValue","innerOpen","setInnerOpen","open","setQuery","reduceMotion","cardRef","wide","roomy","baseId","listId","searchRef","summaryRef","focusNext","handle","offered","position","index","groupPosition","retiredSeen","retired","wildcard","selected","everything","isOn","offeredOn","retiredOn","setValue","emit","explicit","toggle","values","on","toggleAll","named","preset","option","its","choosePreset","setOpen","unfold","fold","valueRef","openedWith","dismiss","before","frame","tries","attempt","onSearchKeyDown","event","searching","shownGroups","shownRetired","count","summary","names","rowDisabled","renderRow","retiredRow","rowId","nameId","descriptionId","renderGroup","labelId","members","checked","retiredGroup","allRow","nothing","bone","presetPicker","picker","summaryText","folded","details","payload"],"sources":["../../src/components/scope/scope.tsx"],"sourcesContent":["import {\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type ComponentProps,\n type KeyboardEvent,\n type Ref,\n type RefObject,\n} from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { Tooltip as BaseTooltip } from \"@base-ui/react/tooltip\";\nimport { IconCheck, IconChevronDown } from \"@tabler/icons-react\";\nimport { CloseButton, buttonVariants } from \"../button\";\nimport { Checkbox } from \"../checkbox\";\nimport { Select } from \"../select\";\nimport { Skeleton } from \"../skeleton\";\nimport { Tooltip } from \"../tooltip\";\nimport { revealIn } from \"../../motion\";\nimport { cn } from \"../../utils/cn\";\nimport { GhostSearch } from \"../../utils/ghost-search\";\n\n/**\n * Scope — pick what something covers out of a catalog: the events a webhook\n * destination receives, the permissions an app or key holds. A searchable,\n * grouped checklist with a catch-all row; `collapsible` folds it to a\n * two-line summary for a resource that already exists, opening on click.\n */\n\nexport interface ScopeItem {\n /**\n * What the selection holds — an event type, a permission id. It is also\n * the row's name unless `label` says otherwise.\n */\n value: string;\n /** The row's name, when it shouldn't be the value itself. */\n label?: string;\n /** One line on what it covers. Searched along with the name. */\n description?: string;\n /**\n * The group it files under — the resource, the namespace. Groups keep\n * the order they first appear in; items without one come first.\n */\n group?: string;\n}\n\nexport interface ScopeAll {\n /** The row's name — `All events`. */\n label: string;\n /** What choosing it means — `Every current and future event.` */\n description?: string;\n /**\n * A wildcard the selection holds in place of the items — `*`. With it,\n * the row stands for every item, now and later: choosing it sets the\n * selection to `[value]`, and leaving it spells every item out by name so\n * the reader prunes from there, never from nothing. Without it, the row\n * selects every item listed.\n */\n value?: string;\n}\n\nexport interface ScopePreset {\n /**\n * Its name: in the search row's picker, and on a folded list whose\n * selection is exactly this one — `Read only`.\n */\n label: string;\n /** What it covers, under its name in the picker and on the folded list. */\n description?: string;\n /** The selection it stands for. */\n value: readonly string[];\n}\n\nexport interface ScopeProps extends Omit<\n ComponentProps<\"div\">,\n \"defaultValue\" | \"onChange\" | \"children\"\n> {\n /** The catalog — everything that can be picked, in display order. */\n items: readonly ScopeItem[];\n /** The selected values, controlled. */\n value?: readonly string[];\n /** The selected values at first, uncontrolled. */\n defaultValue?: readonly string[];\n /**\n * Called with the next selection, in catalog order (values no longer in\n * the catalog follow in the order they were held).\n */\n onValueChange?: (value: string[]) => void;\n /** The catch-all row at the top. Leave it out for no such row. */\n all?: ScopeAll;\n /**\n * Named selections to start from, picked at the search row's end. One\n * chosen sets the list to its values; values the catalog doesn't offer\n * stay as they are. A selection that is exactly a preset goes by its\n * name there and on the folded list; any other reads Custom.\n */\n presets?: readonly ScopePreset[];\n /** The search field's placeholder, which also names it. @default \"Search\" */\n placeholder?: string;\n /**\n * Fold to a two-line summary of the selection, opening to the full list\n * on click — for a resource that already exists, where the scope is read\n * far more often than it changes. The page saves the change (its \"Save\n * changes\" below the card) and folds the list through `open`; the ✕ in\n * the search row, or `Escape` on an empty search, drops the edit: the\n * selection goes back to what it was when the list opened, and folds.\n */\n collapsible?: boolean;\n /** Whether the collapsible list is open, controlled. */\n open?: boolean;\n /** Whether the collapsible list starts open. @default false */\n defaultOpen?: boolean;\n /** Called when the collapsible list opens or folds. */\n onOpenChange?: (open: boolean) => void;\n /** The catalog is on its way: bones in place of rows. */\n loading?: boolean;\n /**\n * Read-only: the list can be searched but not changed, and a folded one\n * stays folded. Held open by `open` (a save in flight), nothing in it\n * changes the selection, the ✕ and Escape included.\n */\n disabled?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\n/* ------------------------------- class map ------------------------------- */\n\n/**\n * The card: the BasicPage card's stroke, corner, and fill. `overflow-clip`\n * rounds a hovered edge row into the corners without making the card a\n * scroll container. The rows lay out by the card's width, not the\n * viewport's: it is measured (`data-wide`, `data-roomy`) rather than made a\n * CSS query container, because Chromium drops a query container's\n * children from layout when a `Reveal` mounts beside it in a Base UI form\n * (a BasicPage `Footer` appearing under the card left it 2px tall).\n *\n * Positioned: a face (or the bones) leaving steps out of the flow and fades\n * where it stood, clipped by the card as the one arriving takes its place.\n *\n * Its words stand `--scope-inset` in from its edges, which is the page's\n * choice inset (the one `RadioCard` and `CheckboxCard` pad by): 20px when\n * the card stands on a `BasicPage.Stack`, on the headings' line like any\n * card's rows; 12px inside a sheet, a card, or a dialog, where it is a\n * field among fields and its words line up with theirs.\n */\nconst SCOPE_SURFACE =\n \"group/scope relative w-full min-w-0 overflow-clip rounded-base border border-pho-secondary bg-pho-primary [--scope-inset:var(--choice-card-inset,0.75rem)]\";\n\n/** The side padding every row of the card shares. */\nconst SCOPE_INSET = \"px-[var(--scope-inset)]\";\n\n/**\n * The search, the card's first row: no box of its own. The magnifier stands\n * on the checkbox column and the query on the names' line, the count at the\n * row's end and, on a collapsible list, the ✕ that drops the edit after it,\n * its glyph as far in from the right edge as the magnifier's from the left.\n * 44px with the hairline below, the DataTable toolbar band's height.\n */\nconst SCOPE_SEARCH_ROW =\n \"flex min-h-11 items-center gap-3 border-b border-pho-secondary px-[var(--scope-inset)]\";\n\n/**\n * The preset picker at the search row's end: a `Select` on its inline face,\n * dressed as a ghost pill like the ✕ beside it — no box in the band, as\n * DataTable's toolbar filters. The ✕'s geometry: 8px round the chevron,\n * the pill hanging that far past the words' edge so the chevron mirrors the\n * magnifier's inset, never onto the card's border; the label side 4px\n * wider, a Button's icon-side tuck. It draws its own focus ring, the row\n * having none to lend it.\n */\nconst SCOPE_PRESET_TRIGGER =\n \"text-pho-secondary hover:bg-pho-ghost-hover hover:text-pho-secondary-hover data-[popup-open]:bg-pho-ghost-hover outline-pho-brand shrink-0 gap-1.5 rounded-full py-1.5 pr-2 pl-3 font-medium focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-solid\";\n\n/** The picker's value for a selection no preset names. */\nconst CUSTOM = \"custom\";\n\n/**\n * Two columns once the card is wide enough: the names, as wide as the\n * longest (never past 45%), then the descriptions on one shared edge.\n * Narrower, each row stacks its description under its name.\n *\n * Every row track is as tall as its row (`auto-rows-max`). A row clips for\n * its own reveal, which lets an `auto` track shrink to nothing: while the\n * list's height opens (taking over from the bones) the grid would squeeze\n * every row at once and each would open from its middle. At their own\n * height the rows stand still and the edge uncovers them from the top.\n */\nconst SCOPE_LIST =\n \"grid auto-rows-max grid-cols-1 group-data-[wide]/scope:grid-cols-[fit-content(45%)_minmax(0,1fr)] group-data-[wide]/scope:gap-x-4\";\n\n/** A group: its band and its rows, on the list's columns and track rule. */\nconst SCOPE_GROUP =\n \"col-span-full grid auto-rows-max grid-cols-subgrid border-t border-pho-secondary first:border-t-0\";\n\n/**\n * One row: 36px on the wide layout — a 20px line and 8px either side. Only\n * the stacked layout's row gap is set: the columns' gap is the list's, and\n * a subgrid that set its own would let a long name run into its\n * description.\n */\nconst SCOPE_ROW =\n \"group col-span-full flex min-w-0 cursor-pointer flex-col gap-y-0.5 px-[var(--scope-inset)] py-2 transition-colors select-none hover:bg-pho-primary-hover group-data-[wide]/scope:grid group-data-[wide]/scope:grid-cols-subgrid group-data-[wide]/scope:items-center data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-transparent\";\n\n/** A bone row: a row's layout, nothing to hover or click. */\nconst SCOPE_BONE_ROW =\n \"col-span-full flex min-w-0 flex-col gap-y-0.5 px-[var(--scope-inset)] py-2 group-data-[wide]/scope:grid group-data-[wide]/scope:grid-cols-subgrid group-data-[wide]/scope:items-center\";\n\n/**\n * A group's band — DataTable's section wash, thinner than the rows it\n * heads, with the group's own checkbox on the rows' checkbox column.\n */\nconst SCOPE_GROUP_BAND =\n \"group col-span-full flex h-8 min-w-0 cursor-pointer items-center gap-2 border-b border-pho-secondary bg-pho-page px-[var(--scope-inset)] text-xs font-medium text-pho-secondary select-none data-[disabled]:cursor-not-allowed\";\n\n/**\n * A description: under the name (two lines at most) on the narrow layout,\n * one line in its own column on the wide one — the rest opens on hover.\n */\nconst SCOPE_DESCRIPTION =\n \"line-clamp-2 min-w-0 pl-6 text-xs text-pho-description group-data-[wide]/scope:block group-data-[wide]/scope:truncate group-data-[wide]/scope:pl-0\";\n\n/** The folded summary: two lines, the whole card its hit target. */\nconst SCOPE_SUMMARY =\n \"flex w-full min-w-0 items-center gap-3 px-[var(--scope-inset)] py-2.5 text-left outline-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-2\";\n\n/** Two columns (names, then descriptions) from this card width up. */\nconst WIDE_REM = 34;\n/** The count stands in the search row from this card width up. */\nconst ROOMY_REM = 18;\n\n/**\n * The card's width against the two breakpoints, measured before paint and\n * followed as it changes. Desktop-first until measured, so a server render\n * shows the common layout.\n *\n * Its heights ride along for the next swap: the face standing now (the\n * card's inner height), and the list or the bones, whichever shows. What\n * takes their place opens from there.\n */\nfunction useCardSize(ref: RefObject<HTMLElement | null>) {\n const [size, setSize] = useState({ wide: true, roomy: true });\n const heights = useRef({ face: 0, list: 0, bones: 0 });\n useLayoutEffect(() => {\n const node = ref.current;\n if (node == null) return;\n const measure = () => {\n heights.current.face = node.clientHeight;\n const list = node.querySelector<HTMLElement>(\"[data-scope-list]\");\n if (list != null) heights.current.list = list.offsetHeight;\n const bones = node.querySelector<HTMLElement>(\"[data-scope-bones]\");\n if (bones != null) heights.current.bones = bones.offsetHeight;\n const rem =\n parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;\n const width = node.getBoundingClientRect().width;\n const next = {\n wide: width >= WIDE_REM * rem,\n roomy: width >= ROOMY_REM * rem,\n };\n setSize((current) =>\n current.wide === next.wide && current.roomy === next.roomy\n ? current\n : next,\n );\n };\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(node);\n return () => observer.disconnect();\n }, [ref]);\n return { ...size, heights };\n}\n\n/* -------------------------------- model --------------------------------- */\n\ninterface ScopeGroup {\n label: string | null;\n items: ScopeItem[];\n}\n\n/** Items by group, groups in first-appearance order, ungrouped first. */\nfunction groupItems(items: readonly ScopeItem[]): ScopeGroup[] {\n const groups: ScopeGroup[] = [];\n const byLabel = new Map<string | null, ScopeGroup>();\n for (const item of items) {\n const label = item.group ?? null;\n let group = byLabel.get(label);\n if (!group) {\n group = { label, items: [] };\n byLabel.set(label, group);\n groups.push(group);\n }\n group.items.push(item);\n }\n return [\n ...groups.filter((group) => group.label === null),\n ...groups.filter((group) => group.label !== null),\n ];\n}\n\n/**\n * Lowercase, with the separators ids are written in (`.`, `:`, `-`, `_`,\n * `/`) read as spaces — `call ended` finds `call.ended`.\n */\nfunction normalize(text: string): string {\n return text.toLowerCase().replace(/[.:\\-_/]/g, \" \");\n}\n\nfunction tokenize(query: string): string[] {\n return normalize(query).split(/\\s+/).filter(Boolean);\n}\n\n/** Every word of the query somewhere in the group, name, or description. */\nfunction matches(\n tokens: readonly string[],\n ...fields: (string | null | undefined)[]\n) {\n const haystack = normalize(fields.filter(Boolean).join(\" \"));\n return tokens.every((token) => haystack.includes(token));\n}\n\nfunction nameOf(item: ScopeItem): string {\n return item.label ?? item.value;\n}\n\n/** The same values, whatever their order. */\nfunction sameSelection(a: readonly string[], b: readonly string[]): boolean {\n if (a.length !== b.length) return false;\n const held = new Set(a);\n return b.every((value) => held.has(value));\n}\n\n/**\n * Reveal for a block taking another's place: it opens from the height the\n * other stood at rather than from none, while the other steps out of the\n * flow (`popLayout`) and fades where it stood. The card moves at its bottom\n * edge only, and what it loses rolls up under the top.\n *\n * `ink` is how the arriving block shows. Rows (the open face, the list)\n * come with their ink `down`, so the edge uncovers them from the top, one\n * after another. Faded in over the growth, the whole list would come up\n * at once, and a list that shows everywhere at once reads as opening from\n * the middle. A stand-in (the folded summary, the bones) `fade`s in where\n * it stands, crossing the block that leaves.\n */\nfunction takeOver(\n reveal: ReturnType<typeof revealIn>,\n from: number,\n ink: \"down\" | \"fade\" = \"fade\",\n) {\n return {\n ...reveal,\n initial: {\n ...reveal.initial,\n height: from,\n opacity: ink === \"down\" ? 1 : 0,\n },\n exit: { opacity: 0 },\n };\n}\n\n/** Whether a description shows whole, measured when the pointer asks. */\nfunction isClipped(target: EventTarget | null | undefined): boolean {\n if (!(target instanceof Element)) return false;\n const text = target.closest<HTMLElement>(\"[data-scope-description]\");\n if (text == null) return false;\n return (\n text.scrollWidth > text.clientWidth + 1 ||\n text.scrollHeight > text.clientHeight + 1\n );\n}\n\n/* ------------------------------- component ------------------------------- */\n\n/**\n * A searchable, grouped checklist for choosing what something covers.\n *\n * Every row is one line on a wide card — the name, then its description in\n * a second column that opens whole on hover when it doesn't fit. Groups are\n * thin tinted bands carrying a checkbox for the whole group (mixed when\n * partly chosen). The search matches names, descriptions, and group names,\n * word by word; while it holds a query the catch-all row steps aside and a\n * group's checkbox covers the rows it shows.\n *\n * With `collapsible`, the card rests as a summary — whole groups by name,\n * the rest by item, over a count — and opens in place, the search taking\n * focus, when clicked; its ✕ drops the edit and folds it back, the page's\n * own save below the card commits it. Values the catalog no longer offers keep a row\n * under \"No longer offered\": they can be removed, never added in bulk.\n */\nexport function Scope({\n items,\n value: valueProp,\n defaultValue,\n onValueChange,\n all,\n presets,\n placeholder = \"Search\",\n collapsible = false,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n loading = false,\n disabled = false,\n className,\n ref,\n ...props\n}: ScopeProps) {\n const [innerValue, setInnerValue] = useState<readonly string[]>(\n defaultValue ?? [],\n );\n const value = valueProp ?? innerValue;\n const [innerOpen, setInnerOpen] = useState(defaultOpen);\n const open = collapsible ? (openProp ?? innerOpen) : true;\n const [query, setQuery] = useState(\"\");\n\n const reduceMotion = useReducedMotion();\n const cardRef = useRef<HTMLDivElement | null>(null);\n const { wide, roomy, heights } = useCardSize(cardRef);\n const baseId = useId();\n const listId = `${baseId}-list`;\n const searchRef = useRef<HTMLInputElement | null>(null);\n const summaryRef = useRef<HTMLButtonElement | null>(null);\n // Where focus goes once the next face has mounted — set only by our own\n // controls, so a host flipping `open` doesn't pull focus around.\n const focusNext = useRef<\"search\" | \"summary\" | null>(null);\n const handle = useMemo(() => BaseTooltip.createHandle<string>(), []);\n\n const groups = useMemo(() => groupItems(items), [items]);\n const offered = useMemo(\n () => new Set(items.map((item) => item.value)),\n [items],\n );\n // Ids go by catalog position: values may hold characters an id shouldn't.\n const position = useMemo(\n () => new Map(items.map((item, index) => [item.value, index])),\n [items],\n );\n const groupPosition = useMemo(\n () => new Map(groups.map((group, index) => [group.label, index])),\n [groups],\n );\n\n // Values held that the catalog doesn't offer. Remembered while mounted,\n // so one unticked stays on the list and can be ticked back.\n const retiredSeen = useRef<string[]>([]);\n for (const held of value) {\n if (\n held !== all?.value &&\n !offered.has(held) &&\n !retiredSeen.current.includes(held)\n ) {\n retiredSeen.current.push(held);\n }\n }\n const retired = retiredSeen.current.filter((held) => !offered.has(held));\n\n const wildcard = all?.value;\n const selected = new Set(value);\n const everything = wildcard !== undefined && selected.has(wildcard);\n const isOn = (item: string) =>\n everything ? offered.has(item) : selected.has(item);\n const offeredOn = items.filter((item) => isOn(item.value)).length;\n const retiredOn = retired.filter((held) => selected.has(held)).length;\n\n const setValue = (next: string[]) => {\n if (valueProp === undefined) setInnerValue(next);\n onValueChange?.(next);\n };\n /** Catalog order, then what's no longer offered in the order it was held. */\n const emit = (next: Set<string>) =>\n setValue([\n ...items.filter((item) => next.has(item.value)).map((item) => item.value),\n ...retired.filter((held) => next.has(held)),\n ]);\n /** The selection by name — under the wildcard, every item it stands for. */\n const explicit = () =>\n everything\n ? new Set(items.map((item) => item.value))\n : new Set(value.filter((held) => held !== wildcard));\n const toggle = (values: readonly string[], on: boolean) => {\n const next = explicit();\n for (const item of values) {\n if (on) next.add(item);\n else next.delete(item);\n }\n emit(next);\n };\n const toggleAll = (on: boolean) => {\n if (wildcard === undefined) {\n toggle(\n items.map((item) => item.value),\n on,\n );\n } else if (on) {\n setValue([wildcard]);\n } else {\n emit(new Set(items.map((item) => item.value)));\n }\n };\n\n // Presets name selections among what the catalog offers (and the\n // wildcard): what it no longer offers sits outside every one of them.\n const named = (values: readonly string[]) =>\n values.filter((held) => held === wildcard || offered.has(held));\n const preset =\n loading || items.length === 0\n ? undefined\n : presets?.find((option) => {\n const its = named(option.value);\n return its.length > 0 && sameSelection(its, named(value));\n });\n const choosePreset = (option: ScopePreset) => {\n const its = named(option.value);\n if (wildcard !== undefined && its.includes(wildcard)) {\n setValue([wildcard]);\n } else {\n emit(new Set([...its, ...retired.filter((held) => selected.has(held))]));\n }\n };\n\n const setOpen = (next: boolean) => {\n if (openProp === undefined) setInnerOpen(next);\n onOpenChange?.(next);\n };\n const unfold = () => {\n focusNext.current = \"search\";\n setOpen(true);\n };\n const fold = () => {\n focusNext.current = \"summary\";\n setQuery(\"\");\n setOpen(false);\n };\n\n // The selection as it stood when the list opened, whoever opened it:\n // dismissing the edit puts it back.\n const valueRef = useRef(value);\n valueRef.current = value;\n const openedWith = useRef<readonly string[] | null>(open ? value : null);\n useEffect(() => {\n openedWith.current = open ? valueRef.current : null;\n // Folded by the page (after its save) or by the ✕, the next opening\n // starts from the whole list.\n if (!open) setQuery(\"\");\n }, [open]);\n /** The ✕ (or Escape): the edit is dropped and the list folds. */\n const dismiss = () => {\n const before = openedWith.current;\n if (before != null && !sameSelection(before, valueRef.current)) {\n setValue([...before]);\n }\n fold();\n };\n\n // Focus lands once the face can take it: it fades in, and a field asked\n // to focus on its first frame may still refuse. Try a frame at a time.\n useEffect(() => {\n const target = focusNext.current;\n if (target == null) return;\n focusNext.current = null;\n let frame = 0;\n let tries = 0;\n const attempt = () => {\n const node = target === \"search\" ? searchRef.current : summaryRef.current;\n if (node == null) return;\n // Not scrolled into view: the face opening around it would scroll\n // inside its own clip and jump when it settles.\n node.focus({ preventScroll: true });\n if (document.activeElement !== node && tries++ < 5) {\n frame = requestAnimationFrame(attempt);\n }\n };\n frame = requestAnimationFrame(attempt);\n return () => cancelAnimationFrame(frame);\n }, [open]);\n\n const onSearchKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n // A search, not the form's submit.\n if (event.key === \"Enter\") event.preventDefault();\n if (event.key !== \"Escape\") return;\n if (query !== \"\") {\n // Ours — not an enclosing dialog's or aside's close.\n event.preventDefault();\n setQuery(\"\");\n } else if (collapsible && !disabled) {\n event.preventDefault();\n dismiss();\n }\n };\n\n const tokens = tokenize(query);\n const searching = tokens.length > 0;\n const shownGroups = groups\n .map((group) => ({\n ...group,\n items: searching\n ? group.items.filter((item) =>\n matches(\n tokens,\n group.label,\n item.value,\n item.label,\n item.description,\n ),\n )\n : group.items,\n }))\n .filter((group) => group.items.length > 0);\n const shownRetired = searching\n ? retired.filter((held) => matches(tokens, held))\n : retired;\n\n // The count reads the catalog: under the wildcard every item is in and\n // more will be, so it steps aside for the catch-all's own words.\n const count =\n everything || items.length === 0 ? null : `${offeredOn} of ${items.length}`;\n\n const summary = (() => {\n if (everything && all) {\n return { title: all.label, detail: all.description ?? \"\" };\n }\n if (preset && retiredOn === 0) {\n return { title: preset.label, detail: preset.description ?? count ?? \"\" };\n }\n if (\n all &&\n wildcard === undefined &&\n items.length > 0 &&\n offeredOn === items.length &&\n retiredOn === 0\n ) {\n return { title: all.label, detail: all.description ?? count ?? \"\" };\n }\n // Whole groups by name, the rest item by item. A group of one is just\n // its item: the id says more than the heading over it.\n const names: string[] = [];\n for (const group of groups) {\n const on = group.items.filter((item) => isOn(item.value));\n if (\n group.label !== null &&\n group.items.length > 1 &&\n on.length === group.items.length\n ) {\n names.push(group.label);\n } else {\n names.push(...on.map(nameOf));\n }\n }\n names.push(...retired.filter((held) => selected.has(held)));\n return {\n title: names.length > 0 ? names.join(\", \") : \"None\",\n detail: count ?? \"\",\n };\n })();\n\n const rowDisabled = disabled || loading;\n // Every block that comes and goes (the folded face and the open one,\n // bones and rows, a group or a row a search sets aside) opens and closes\n // on `BasicPage.Reveal`'s motion.\n const reveal = revealIn(reduceMotion);\n\n /**\n * One row. A retired row is a value the catalog no longer offers: its\n * name goes quiet and it has no description to show.\n */\n const renderRow = (item: ScopeItem, retiredRow = false) => {\n const rowId = retiredRow\n ? `${baseId}-r${retired.indexOf(item.value)}`\n : `${baseId}-i${position.get(item.value)}`;\n const nameId = `${rowId}-name`;\n const descriptionId = `${rowId}-description`;\n return (\n <motion.label\n key={item.value}\n {...reveal}\n className={cn(SCOPE_ROW, \"overflow-hidden\")}\n data-scope-row=\"\"\n data-disabled={rowDisabled || undefined}\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <Checkbox\n size=\"sm\"\n checked={isOn(item.value)}\n disabled={rowDisabled}\n aria-labelledby={nameId}\n aria-describedby={item.description ? descriptionId : undefined}\n onCheckedChange={(on: boolean) => toggle([item.value], on)}\n />\n <span\n id={nameId}\n className={cn(\n \"truncate text-base\",\n retiredRow ? \"text-pho-description\" : \"text-pho-secondary\",\n )}\n >\n {nameOf(item)}\n </span>\n </span>\n {item.description ? (\n <Tooltip.Trigger\n handle={handle}\n payload={item.description}\n render={\n <span\n id={descriptionId}\n data-scope-description=\"\"\n className={SCOPE_DESCRIPTION}\n />\n }\n >\n {item.description}\n </Tooltip.Trigger>\n ) : null}\n </motion.label>\n );\n };\n\n const renderGroup = (group: ScopeGroup) => {\n // Ungrouped items stand on the list's own columns.\n if (group.label === null) {\n return group.items.map((item) => renderRow(item));\n }\n const labelId = `${baseId}-g${groupPosition.get(group.label)}`;\n const members = group.items.map((item) => item.value);\n const on = members.filter(isOn).length;\n const checked = on === members.length;\n return (\n <motion.div\n key={`group:${group.label}`}\n {...reveal}\n // A fieldset's min-content width and legend layout don't sit on the\n // list's grid; the role says the same.\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n aria-labelledby={labelId}\n className={cn(SCOPE_GROUP, \"overflow-hidden\")}\n >\n <label\n className={SCOPE_GROUP_BAND}\n data-disabled={rowDisabled || undefined}\n >\n <Checkbox\n size=\"sm\"\n checked={checked}\n indeterminate={on > 0 && !checked}\n disabled={rowDisabled}\n aria-labelledby={labelId}\n onCheckedChange={(next: boolean) => toggle(members, next)}\n />\n <span id={labelId} className=\"truncate\">\n {group.label}\n </span>\n {/* The rows it heads — while searching, the ones that match. */}\n <span className=\"text-pho-description tabular-nums\">\n {members.length}\n </span>\n </label>\n <AnimatePresence initial={false}>\n {group.items.map((item) => renderRow(item))}\n </AnimatePresence>\n </motion.div>\n );\n };\n\n const retiredGroup =\n shownRetired.length > 0 ? (\n <motion.div\n key=\"retired\"\n {...reveal}\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n aria-labelledby={`${baseId}-retired`}\n className={cn(SCOPE_GROUP, \"overflow-hidden\")}\n >\n <div className={cn(SCOPE_GROUP_BAND, \"cursor-default\")}>\n {/* The checkbox column stays: nothing here is added in bulk. */}\n <span aria-hidden className=\"size-4 shrink-0\" />\n <span id={`${baseId}-retired`} className=\"truncate\">\n No longer offered\n </span>\n </div>\n <AnimatePresence initial={false}>\n {shownRetired.map((held) => renderRow({ value: held }, true))}\n </AnimatePresence>\n </motion.div>\n ) : null;\n\n const allRow = all ? (\n <motion.label\n key=\"all\"\n {...reveal}\n className={cn(SCOPE_ROW, \"overflow-hidden\")}\n data-scope-row=\"\"\n data-disabled={\n rowDisabled || (everything && items.length === 0) || undefined\n }\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <Checkbox\n size=\"sm\"\n checked={\n wildcard === undefined\n ? items.length > 0 && offeredOn === items.length\n : everything\n }\n indeterminate={\n wildcard === undefined\n ? offeredOn > 0 && offeredOn < items.length\n : !everything && offeredOn + retiredOn > 0\n }\n // With no catalog to spell out, leaving the wildcard could only\n // mean nothing.\n disabled={rowDisabled || (everything && items.length === 0)}\n aria-labelledby={`${baseId}-all`}\n aria-describedby={\n all.description ? `${baseId}-all-description` : undefined\n }\n onCheckedChange={(on: boolean) => toggleAll(on)}\n />\n <span\n id={`${baseId}-all`}\n className=\"text-pho-primary truncate text-base font-medium\"\n >\n {all.label}\n </span>\n </span>\n {all.description ? (\n <span id={`${baseId}-all-description`} className={SCOPE_DESCRIPTION}>\n {all.description}\n </span>\n ) : null}\n </motion.label>\n ) : null;\n\n const nothing =\n searching && shownGroups.length === 0 && shownRetired.length === 0 ? (\n <motion.p\n key=\"nothing\"\n {...reveal}\n className={cn(\n \"text-pho-description col-span-full overflow-hidden text-center text-base\",\n SCOPE_INSET,\n )}\n >\n <span className=\"block py-6\">Nothing matches “{query}”.</span>\n </motion.p>\n ) : null;\n\n const list = (\n <motion.div\n key=\"list\"\n // Past the bones (fading where they stood), the rows unroll.\n {...takeOver(reveal, heights.current.bones, \"down\")}\n id={listId}\n data-scope-list=\"\"\n className={cn(SCOPE_LIST, \"overflow-hidden\")}\n >\n <AnimatePresence initial={false}>\n {!searching ? allRow : null}\n {shownGroups.map(renderGroup)}\n {retiredGroup}\n {nothing}\n </AnimatePresence>\n </motion.div>\n );\n\n // The bones are the list's own shape — the catch-all row, a group's\n // band, rows with their descriptions — so the rows open into it.\n const bones = (\n <motion.div\n key=\"bones\"\n // Back to bones (the catalog reloading), they open from the list's\n // height while the rows fade where they stood.\n {...takeOver(reveal, heights.current.list)}\n data-scope-bones=\"\"\n aria-hidden\n className={cn(SCOPE_LIST, \"overflow-hidden\")}\n >\n {[\n { band: false, name: \"w-20\", text: \"w-44\" },\n { band: true, name: \"w-12\", text: \"\" },\n { band: false, name: \"w-28\", text: \"w-56\" },\n { band: false, name: \"w-32\", text: \"w-48\" },\n { band: false, name: \"w-24\", text: \"w-60\" },\n ].map((bone, index) =>\n bone.band ? (\n <div\n key={index}\n className={cn(\n \"border-pho-secondary bg-pho-page col-span-full flex h-8 items-center gap-2 border-y\",\n SCOPE_INSET,\n )}\n >\n <Skeleton className=\"size-4 rounded-sm\" />\n <Skeleton className={cn(\"h-3\", bone.name)} />\n </div>\n ) : (\n <div key={index} className={SCOPE_BONE_ROW}>\n <span className=\"flex h-5 min-w-0 items-center gap-2\">\n <Skeleton className=\"size-4 shrink-0 rounded-sm\" />\n <Skeleton className={cn(\"h-3.5 max-w-full\", bone.name)} />\n </span>\n <span className=\"flex h-4.5 items-center pl-6 group-data-[wide]/scope:pl-0\">\n <Skeleton className={cn(\"h-3 max-w-full\", bone.text)} />\n </span>\n </div>\n ),\n )}\n </motion.div>\n );\n\n const presetPicker =\n presets != null && presets.length > 0 ? (\n // A field of its own: inside a host `Field` (the page's Permissions)\n // the select would take that field's label for its name, its\n // description, and its name in the form. Laid out as its trigger.\n <BaseField.Root className=\"contents\">\n <Select.Root\n items={[\n ...presets.map((option, index) => ({\n value: `preset:${index}`,\n label: option.label,\n })),\n { value: CUSTOM, label: \"Custom\" },\n ]}\n value={preset ? `preset:${presets.indexOf(preset)}` : CUSTOM}\n onValueChange={(next) => {\n const option =\n presets[Number(String(next).slice(\"preset:\".length))];\n if (option != null && option !== preset) choosePreset(option);\n }}\n disabled={disabled || loading}\n >\n <Select.Trigger\n variant=\"inline\"\n aria-label=\"Preset\"\n // Last in the row, out by its padding (see the class); before\n // the ✕, a little closer to it.\n className={cn(\n SCOPE_PRESET_TRIGGER,\n collapsible ? \"-mr-1\" : \"-mr-2\",\n )}\n >\n <Select.Value />\n <Select.Icon>\n <IconChevronDown />\n </Select.Icon>\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner align=\"end\">\n <Select.Popup>\n <Select.List>\n {presets.map((option, index) => (\n <Select.Item key={index} value={`preset:${index}`}>\n <Select.ItemIndicator>\n <IconCheck />\n </Select.ItemIndicator>\n <Select.ItemText>{option.label}</Select.ItemText>\n {option.description ? (\n <span className=\"text-pho-description col-start-2 text-xs\">\n {option.description}\n </span>\n ) : null}\n </Select.Item>\n ))}\n {/* Not picked, only shown: what a hand-made selection reads. */}\n <Select.Item value={CUSTOM} disabled>\n <Select.ItemIndicator>\n <IconCheck />\n </Select.ItemIndicator>\n <Select.ItemText>Custom</Select.ItemText>\n </Select.Item>\n </Select.List>\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n </BaseField.Root>\n ) : null;\n\n const picker = (\n <motion.div\n key=\"picker\"\n {...takeOver(reveal, heights.current.face, \"down\")}\n className=\"overflow-hidden\"\n >\n {/* The row the folded summary gives way to: the two cross where they\n stand, while the list under it unrolls with its ink down. */}\n <motion.div\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={reveal.transition}\n className={SCOPE_SEARCH_ROW}\n >\n <GhostSearch\n ref={searchRef}\n value={query}\n onChange={setQuery}\n onClear={() => setQuery(\"\")}\n onKeyDown={onSearchKeyDown}\n placeholder={placeholder}\n aria-label={placeholder}\n aria-controls={loading ? undefined : listId}\n disabled={loading}\n trailing={\n count != null && !loading ? (\n // A card too narrow for both gives the room to the query; the\n // folded summary carries the count there.\n <span className=\"hidden group-data-[roomy]/scope:inline\">\n {count}\n </span>\n ) : undefined\n }\n autoComplete=\"off\"\n spellCheck={false}\n />\n {presetPicker}\n {collapsible ? (\n <CloseButton\n size=\"sm\"\n label=\"Cancel\"\n // Held open while the page saves: dropping the edit now would\n // show the old selection under a save that sends the new one.\n disabled={disabled}\n onClick={dismiss}\n // Out by its own padding: the ✕ stands as far from the right\n // edge as the magnifier from the left. Its ring inside, as a\n // Button's: the blocks around it clip.\n className=\"-mr-2 shrink-0 focus-visible:-outline-offset-2\"\n />\n ) : null}\n </motion.div>\n <AnimatePresence initial={false} mode=\"popLayout\">\n {loading ? bones : list}\n </AnimatePresence>\n </motion.div>\n );\n\n // The bones stand in the two lines' own boxes, so the card keeps its\n // height when the words arrive.\n const summaryText = loading ? (\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"flex h-5 items-center\">\n <Skeleton className=\"h-3.5 w-48 max-w-full\" />\n </span>\n <span className=\"flex h-4.5 items-center\">\n <Skeleton className=\"h-3 w-16\" />\n </span>\n </span>\n ) : (\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"text-pho-primary truncate text-base\">\n {summary.title}\n </span>\n {summary.detail ? (\n <span className=\"text-pho-description truncate text-xs tabular-nums\">\n {summary.detail}\n </span>\n ) : null}\n </span>\n );\n\n const folded = (\n <motion.div\n key=\"folded\"\n {...takeOver(reveal, heights.current.face)}\n className=\"overflow-hidden\"\n >\n {disabled || loading ? (\n <div className={SCOPE_SUMMARY}>{summaryText}</div>\n ) : (\n <button\n ref={summaryRef}\n type=\"button\"\n aria-expanded={false}\n className={cn(\n SCOPE_SUMMARY,\n \"group hover:bg-pho-primary-hover cursor-pointer transition-colors\",\n )}\n onClick={unfold}\n >\n {summaryText}\n <span\n aria-hidden\n className={buttonVariants({\n variant: \"ghost\",\n size: \"sm\",\n className:\n \"group-hover:bg-pho-ghost-hover group-hover:text-pho-secondary-hover pointer-events-none shrink-0\",\n })}\n >\n Edit\n </span>\n </button>\n )}\n </motion.div>\n );\n\n return (\n <div\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n aria-busy={loading || undefined}\n data-scope=\"\"\n data-open={open ? \"\" : undefined}\n data-wide={wide ? \"\" : undefined}\n data-roomy={roomy ? \"\" : undefined}\n className={cn(SCOPE_SURFACE, className)}\n {...props}\n ref={(node: HTMLDivElement | null) => {\n cardRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref != null) ref.current = node;\n }}\n >\n {/* Folding and opening, the faces trade places on Reveal's motion:\n the one arriving opens from the height the other stood at, the\n other fades where it stood. The card moves at its bottom edge, so\n the list unrolls from the top down, row by row, and rolls back up\n under it. */}\n <AnimatePresence initial={false} mode=\"popLayout\">\n {open ? picker : folded}\n </AnimatePresence>\n <Tooltip.Root\n handle={handle}\n onOpenChange={(next, details) => {\n // Only a description the row cuts short opens.\n if (next && !isClipped(details.event?.target)) details.cancel();\n }}\n >\n {({ payload }) => (\n <Tooltip.Portal>\n <Tooltip.Positioner side=\"top\" align=\"start\">\n <Tooltip.Popup className=\"max-w-80 font-normal\">\n {payload}\n </Tooltip.Popup>\n </Tooltip.Positioner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","buttonVariants","IconCheck","IconChevronDown","CloseButton","Checkbox","Skeleton","GhostSearch","Tooltip$1","Select","useEffect","useId","useLayoutEffect","useMemo","useRef","useState","jsx","jsxs","AnimatePresence","motion","useReducedMotion","Field","Tooltip","SCOPE_SURFACE","SCOPE_INSET","SCOPE_SEARCH_ROW","SCOPE_PRESET_TRIGGER","CUSTOM","SCOPE_LIST","SCOPE_GROUP","SCOPE_ROW","SCOPE_BONE_ROW","SCOPE_GROUP_BAND","SCOPE_DESCRIPTION","SCOPE_SUMMARY","WIDE_REM","ROOMY_REM","useCardSize","ref","size","setSize","heights","node","measure","list","bones","rem","width","next","current","observer","groupItems","items","groups","byLabel","item","label","group","normalize","text","tokenize","query","matches","tokens","fields","haystack","token","nameOf","sameSelection","a","b","held","value","takeOver","reveal","from","ink","isClipped","target","Scope","valueProp","defaultValue","onValueChange","all","presets","placeholder","collapsible","openProp","defaultOpen","onOpenChange","loading","disabled","className","props","innerValue","setInnerValue","innerOpen","setInnerOpen","open","setQuery","reduceMotion","cardRef","wide","roomy","baseId","listId","searchRef","summaryRef","focusNext","handle","offered","position","index","groupPosition","retiredSeen","retired","wildcard","selected","everything","isOn","offeredOn","retiredOn","setValue","emit","explicit","toggle","values","on","toggleAll","named","preset","option","its","choosePreset","setOpen","unfold","fold","valueRef","openedWith","dismiss","before","frame","tries","attempt","onSearchKeyDown","event","searching","shownGroups","shownRetired","count","summary","names","rowDisabled","renderRow","retiredRow","rowId","nameId","descriptionId","renderGroup","labelId","members","checked","retiredGroup","allRow","nothing","bone","presetPicker","picker","summaryText","folded","details","payload"],"sources":["../../src/components/scope/scope.tsx"],"sourcesContent":["import {\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type ComponentProps,\n type KeyboardEvent,\n type Ref,\n type RefObject,\n} from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { Tooltip as BaseTooltip } from \"@base-ui/react/tooltip\";\nimport { IconCheck, IconChevronDown } from \"@tabler/icons-react\";\nimport { CloseButton, buttonVariants } from \"../button\";\nimport { Checkbox } from \"../checkbox\";\nimport { Select } from \"../select\";\nimport { Skeleton } from \"../skeleton\";\nimport { Tooltip } from \"../tooltip\";\nimport { revealIn } from \"../../motion\";\nimport { cn } from \"../../utils/cn\";\nimport { GhostSearch } from \"../../utils/ghost-search\";\n\n/**\n * Scope — pick what something covers out of a catalog: the events a webhook\n * destination receives, the permissions an app or key holds. A searchable,\n * grouped checklist with a catch-all row; `collapsible` folds it to a\n * two-line summary for a resource that already exists, opening on click.\n */\n\nexport interface ScopeItem {\n /**\n * What the selection holds — an event type, a permission id. It is also\n * the row's name unless `label` says otherwise.\n */\n value: string;\n /** The row's name, when it shouldn't be the value itself. */\n label?: string;\n /** One line on what it covers. Searched along with the name. */\n description?: string;\n /**\n * The group it files under — the resource, the namespace. Groups keep\n * the order they first appear in; items without one come first.\n */\n group?: string;\n}\n\nexport interface ScopeAll {\n /** The row's name — `All events`. */\n label: string;\n /** What choosing it means — `Every current and future event.` */\n description?: string;\n /**\n * A wildcard the selection holds in place of the items — `*`. With it,\n * the row stands for every item, now and later: choosing it sets the\n * selection to `[value]`, and leaving it spells every item out by name so\n * the reader prunes from there, never from nothing. Without it, the row\n * selects every item listed.\n */\n value?: string;\n}\n\nexport interface ScopePreset {\n /**\n * Its name: in the search row's picker, and on a folded list whose\n * selection is exactly this one — `Read only`.\n */\n label: string;\n /** What it covers, under its name in the picker and on the folded list. */\n description?: string;\n /** The selection it stands for. */\n value: readonly string[];\n}\n\nexport interface ScopeProps extends Omit<\n ComponentProps<\"div\">,\n \"defaultValue\" | \"onChange\" | \"children\"\n> {\n /** The catalog — everything that can be picked, in display order. */\n items: readonly ScopeItem[];\n /** The selected values, controlled. */\n value?: readonly string[];\n /** The selected values at first, uncontrolled. */\n defaultValue?: readonly string[];\n /**\n * Called with the next selection, in catalog order (values no longer in\n * the catalog follow in the order they were held).\n */\n onValueChange?: (value: string[]) => void;\n /** The catch-all row at the top. Leave it out for no such row. */\n all?: ScopeAll;\n /**\n * Named selections to start from, picked at the search row's end. One\n * chosen sets the list to its values; values the catalog doesn't offer\n * stay as they are. A selection that is exactly a preset goes by its\n * name there and on the folded list; any other reads Custom.\n */\n presets?: readonly ScopePreset[];\n /** The search field's placeholder, which also names it. @default \"Search\" */\n placeholder?: string;\n /**\n * Fold to a two-line summary of the selection, opening to the full list\n * on click — for a resource that already exists, where the scope is read\n * far more often than it changes. The page saves the change (its \"Save\n * changes\" below the card) and folds the list through `open`; the ✕ in\n * the search row, or `Escape` on an empty search, drops the edit: the\n * selection goes back to what it was when the list opened, and folds.\n */\n collapsible?: boolean;\n /** Whether the collapsible list is open, controlled. */\n open?: boolean;\n /** Whether the collapsible list starts open. @default false */\n defaultOpen?: boolean;\n /** Called when the collapsible list opens or folds. */\n onOpenChange?: (open: boolean) => void;\n /** The catalog is on its way: bones in place of rows. */\n loading?: boolean;\n /**\n * Read-only: the list can be searched but not changed, and a folded one\n * stays folded. Held open by `open` (a save in flight), nothing in it\n * changes the selection, the ✕ and Escape included.\n */\n disabled?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\n/* ------------------------------- class map ------------------------------- */\n\n/**\n * The card: the BasicPage card's stroke, corner, and fill. `overflow-clip`\n * rounds a hovered edge row into the corners without making the card a\n * scroll container. The rows lay out by the card's width, not the\n * viewport's: it is measured (`data-wide`, `data-roomy`) rather than made a\n * CSS query container, because Chromium drops a query container's\n * children from layout when a `Reveal` mounts beside it in a Base UI form\n * (a BasicPage `Footer` appearing under the card left it 2px tall).\n *\n * Positioned: a face (or the bones) leaving steps out of the flow and fades\n * where it stood, clipped by the card as the one arriving takes its place.\n *\n * Its words stand `--scope-inset` in from its edges, which is the page's\n * choice inset (the one `RadioCard` and `CheckboxCard` pad by): 20px when\n * the card stands on a `BasicPage.Stack`, on the headings' line like any\n * card's rows; 12px inside a sheet, a card, or a dialog, where it is a\n * field among fields and its words line up with theirs.\n */\nconst SCOPE_SURFACE =\n \"group/scope relative w-full min-w-0 overflow-clip rounded-base border border-pho-secondary bg-pho-primary [--scope-inset:var(--choice-card-inset,0.75rem)]\";\n\n/** The side padding every row of the card shares. */\nconst SCOPE_INSET = \"px-[var(--scope-inset)]\";\n\n/**\n * The search, the card's first row: no box of its own. The magnifier stands\n * on the checkbox column and the query on the names' line, the count at the\n * row's end and, on a collapsible list, the ✕ that drops the edit after it,\n * its glyph as far in from the right edge as the magnifier's from the left.\n * 44px with the hairline below, the DataTable toolbar band's height.\n */\nconst SCOPE_SEARCH_ROW =\n \"flex min-h-11 items-center gap-3 border-b border-pho-secondary px-[var(--scope-inset)]\";\n\n/**\n * The preset picker at the search row's end: a `Select` on its inline face,\n * dressed as a ghost pill like the ✕ beside it — no box in the band, as\n * DataTable's toolbar filters. The ✕'s geometry: 8px round the chevron,\n * the pill hanging that far past the words' edge so the chevron mirrors the\n * magnifier's inset, never onto the card's border; the label side 4px\n * wider, a Button's icon-side tuck. It draws its own focus ring, the row\n * having none to lend it.\n */\nconst SCOPE_PRESET_TRIGGER =\n \"text-pho-secondary hover:bg-pho-ghost-hover hover:text-pho-secondary-hover data-[popup-open]:bg-pho-ghost-hover outline-pho-brand shrink-0 gap-1.5 rounded-full py-1.5 pr-2 pl-3 font-medium focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-solid\";\n\n/** The picker's value for a selection no preset names. */\nconst CUSTOM = \"custom\";\n\n/**\n * Two columns once the card is wide enough: the names, as wide as the\n * longest (never past 45%), then the descriptions on one shared edge.\n * Narrower, each row stacks its description under its name.\n *\n * Every row track is as tall as its row (`auto-rows-max`). A row clips for\n * its own reveal, which lets an `auto` track shrink to nothing: while the\n * list's height opens (taking over from the bones) the grid would squeeze\n * every row at once and each would open from its middle. At their own\n * height the rows stand still and the edge uncovers them from the top.\n */\nconst SCOPE_LIST =\n \"grid auto-rows-max grid-cols-1 group-data-[wide]/scope:grid-cols-[fit-content(45%)_minmax(0,1fr)] group-data-[wide]/scope:gap-x-4\";\n\n/** A group: its band and its rows, on the list's columns and track rule. */\nconst SCOPE_GROUP =\n \"col-span-full grid auto-rows-max grid-cols-subgrid border-t border-pho-secondary first:border-t-0\";\n\n/**\n * One row: 36px on the wide layout — a 20px line and 8px either side.\n * Stacked, the description sits flush under the name, so the row sets no\n * gap of its own: the columns' gap is the list's, and a subgrid that set\n * its own would let a long name run into its description.\n */\nconst SCOPE_ROW =\n \"group col-span-full flex min-w-0 cursor-pointer flex-col px-[var(--scope-inset)] py-2 transition-colors select-none hover:bg-pho-primary-hover group-data-[wide]/scope:grid group-data-[wide]/scope:grid-cols-subgrid group-data-[wide]/scope:items-center data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-transparent\";\n\n/** A bone row: a row's layout, nothing to hover or click. */\nconst SCOPE_BONE_ROW =\n \"col-span-full flex min-w-0 flex-col px-[var(--scope-inset)] py-2 group-data-[wide]/scope:grid group-data-[wide]/scope:grid-cols-subgrid group-data-[wide]/scope:items-center\";\n\n/**\n * A group's band — DataTable's section wash, thinner than the rows it\n * heads, with the group's own checkbox on the rows' checkbox column.\n */\nconst SCOPE_GROUP_BAND =\n \"group col-span-full flex h-8 min-w-0 cursor-pointer items-center gap-2 border-b border-pho-secondary bg-pho-page px-[var(--scope-inset)] text-xs font-medium text-pho-secondary select-none data-[disabled]:cursor-not-allowed\";\n\n/**\n * A description: under the name (two lines at most) on the narrow layout,\n * one line in its own column on the wide one — the rest opens on hover.\n */\nconst SCOPE_DESCRIPTION =\n \"line-clamp-2 min-w-0 pl-6 text-xs text-pho-description group-data-[wide]/scope:block group-data-[wide]/scope:truncate group-data-[wide]/scope:pl-0\";\n\n/** The folded summary: two lines, the whole card its hit target. */\nconst SCOPE_SUMMARY =\n \"flex w-full min-w-0 items-center gap-3 px-[var(--scope-inset)] py-2.5 text-left outline-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-2\";\n\n/** Two columns (names, then descriptions) from this card width up. */\nconst WIDE_REM = 34;\n/** The count stands in the search row from this card width up. */\nconst ROOMY_REM = 18;\n\n/**\n * The card's width against the two breakpoints, measured before paint and\n * followed as it changes. Desktop-first until measured, so a server render\n * shows the common layout.\n *\n * Its heights ride along for the next swap: the face standing now (the\n * card's inner height), and the list or the bones, whichever shows. What\n * takes their place opens from there.\n */\nfunction useCardSize(ref: RefObject<HTMLElement | null>) {\n const [size, setSize] = useState({ wide: true, roomy: true });\n const heights = useRef({ face: 0, list: 0, bones: 0 });\n useLayoutEffect(() => {\n const node = ref.current;\n if (node == null) return;\n const measure = () => {\n heights.current.face = node.clientHeight;\n const list = node.querySelector<HTMLElement>(\"[data-scope-list]\");\n if (list != null) heights.current.list = list.offsetHeight;\n const bones = node.querySelector<HTMLElement>(\"[data-scope-bones]\");\n if (bones != null) heights.current.bones = bones.offsetHeight;\n const rem =\n parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;\n const width = node.getBoundingClientRect().width;\n const next = {\n wide: width >= WIDE_REM * rem,\n roomy: width >= ROOMY_REM * rem,\n };\n setSize((current) =>\n current.wide === next.wide && current.roomy === next.roomy\n ? current\n : next,\n );\n };\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(node);\n return () => observer.disconnect();\n }, [ref]);\n return { ...size, heights };\n}\n\n/* -------------------------------- model --------------------------------- */\n\ninterface ScopeGroup {\n label: string | null;\n items: ScopeItem[];\n}\n\n/** Items by group, groups in first-appearance order, ungrouped first. */\nfunction groupItems(items: readonly ScopeItem[]): ScopeGroup[] {\n const groups: ScopeGroup[] = [];\n const byLabel = new Map<string | null, ScopeGroup>();\n for (const item of items) {\n const label = item.group ?? null;\n let group = byLabel.get(label);\n if (!group) {\n group = { label, items: [] };\n byLabel.set(label, group);\n groups.push(group);\n }\n group.items.push(item);\n }\n return [\n ...groups.filter((group) => group.label === null),\n ...groups.filter((group) => group.label !== null),\n ];\n}\n\n/**\n * Lowercase, with the separators ids are written in (`.`, `:`, `-`, `_`,\n * `/`) read as spaces — `call ended` finds `call.ended`.\n */\nfunction normalize(text: string): string {\n return text.toLowerCase().replace(/[.:\\-_/]/g, \" \");\n}\n\nfunction tokenize(query: string): string[] {\n return normalize(query).split(/\\s+/).filter(Boolean);\n}\n\n/** Every word of the query somewhere in the group, name, or description. */\nfunction matches(\n tokens: readonly string[],\n ...fields: (string | null | undefined)[]\n) {\n const haystack = normalize(fields.filter(Boolean).join(\" \"));\n return tokens.every((token) => haystack.includes(token));\n}\n\nfunction nameOf(item: ScopeItem): string {\n return item.label ?? item.value;\n}\n\n/** The same values, whatever their order. */\nfunction sameSelection(a: readonly string[], b: readonly string[]): boolean {\n if (a.length !== b.length) return false;\n const held = new Set(a);\n return b.every((value) => held.has(value));\n}\n\n/**\n * Reveal for a block taking another's place: it opens from the height the\n * other stood at rather than from none, while the other steps out of the\n * flow (`popLayout`) and fades where it stood. The card moves at its bottom\n * edge only, and what it loses rolls up under the top.\n *\n * `ink` is how the arriving block shows. Rows (the open face, the list)\n * come with their ink `down`, so the edge uncovers them from the top, one\n * after another. Faded in over the growth, the whole list would come up\n * at once, and a list that shows everywhere at once reads as opening from\n * the middle. A stand-in (the folded summary, the bones) `fade`s in where\n * it stands, crossing the block that leaves.\n */\nfunction takeOver(\n reveal: ReturnType<typeof revealIn>,\n from: number,\n ink: \"down\" | \"fade\" = \"fade\",\n) {\n return {\n ...reveal,\n initial: {\n ...reveal.initial,\n height: from,\n opacity: ink === \"down\" ? 1 : 0,\n },\n exit: { opacity: 0 },\n };\n}\n\n/** Whether a description shows whole, measured when the pointer asks. */\nfunction isClipped(target: EventTarget | null | undefined): boolean {\n if (!(target instanceof Element)) return false;\n const text = target.closest<HTMLElement>(\"[data-scope-description]\");\n if (text == null) return false;\n return (\n text.scrollWidth > text.clientWidth + 1 ||\n text.scrollHeight > text.clientHeight + 1\n );\n}\n\n/* ------------------------------- component ------------------------------- */\n\n/**\n * A searchable, grouped checklist for choosing what something covers.\n *\n * Every row is one line on a wide card — the name, then its description in\n * a second column that opens whole on hover when it doesn't fit. Groups are\n * thin tinted bands carrying a checkbox for the whole group (mixed when\n * partly chosen). The search matches names, descriptions, and group names,\n * word by word; while it holds a query the catch-all row steps aside and a\n * group's checkbox covers the rows it shows.\n *\n * With `collapsible`, the card rests as a summary — whole groups by name,\n * the rest by item, over a count — and opens in place, the search taking\n * focus, when clicked; its ✕ drops the edit and folds it back, the page's\n * own save below the card commits it. Values the catalog no longer offers keep a row\n * under \"No longer offered\": they can be removed, never added in bulk.\n */\nexport function Scope({\n items,\n value: valueProp,\n defaultValue,\n onValueChange,\n all,\n presets,\n placeholder = \"Search\",\n collapsible = false,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n loading = false,\n disabled = false,\n className,\n ref,\n ...props\n}: ScopeProps) {\n const [innerValue, setInnerValue] = useState<readonly string[]>(\n defaultValue ?? [],\n );\n const value = valueProp ?? innerValue;\n const [innerOpen, setInnerOpen] = useState(defaultOpen);\n const open = collapsible ? (openProp ?? innerOpen) : true;\n const [query, setQuery] = useState(\"\");\n\n const reduceMotion = useReducedMotion();\n const cardRef = useRef<HTMLDivElement | null>(null);\n const { wide, roomy, heights } = useCardSize(cardRef);\n const baseId = useId();\n const listId = `${baseId}-list`;\n const searchRef = useRef<HTMLInputElement | null>(null);\n const summaryRef = useRef<HTMLButtonElement | null>(null);\n // Where focus goes once the next face has mounted — set only by our own\n // controls, so a host flipping `open` doesn't pull focus around.\n const focusNext = useRef<\"search\" | \"summary\" | null>(null);\n const handle = useMemo(() => BaseTooltip.createHandle<string>(), []);\n\n const groups = useMemo(() => groupItems(items), [items]);\n const offered = useMemo(\n () => new Set(items.map((item) => item.value)),\n [items],\n );\n // Ids go by catalog position: values may hold characters an id shouldn't.\n const position = useMemo(\n () => new Map(items.map((item, index) => [item.value, index])),\n [items],\n );\n const groupPosition = useMemo(\n () => new Map(groups.map((group, index) => [group.label, index])),\n [groups],\n );\n\n // Values held that the catalog doesn't offer. Remembered while mounted,\n // so one unticked stays on the list and can be ticked back.\n const retiredSeen = useRef<string[]>([]);\n for (const held of value) {\n if (\n held !== all?.value &&\n !offered.has(held) &&\n !retiredSeen.current.includes(held)\n ) {\n retiredSeen.current.push(held);\n }\n }\n const retired = retiredSeen.current.filter((held) => !offered.has(held));\n\n const wildcard = all?.value;\n const selected = new Set(value);\n const everything = wildcard !== undefined && selected.has(wildcard);\n const isOn = (item: string) =>\n everything ? offered.has(item) : selected.has(item);\n const offeredOn = items.filter((item) => isOn(item.value)).length;\n const retiredOn = retired.filter((held) => selected.has(held)).length;\n\n const setValue = (next: string[]) => {\n if (valueProp === undefined) setInnerValue(next);\n onValueChange?.(next);\n };\n /** Catalog order, then what's no longer offered in the order it was held. */\n const emit = (next: Set<string>) =>\n setValue([\n ...items.filter((item) => next.has(item.value)).map((item) => item.value),\n ...retired.filter((held) => next.has(held)),\n ]);\n /** The selection by name — under the wildcard, every item it stands for. */\n const explicit = () =>\n everything\n ? new Set(items.map((item) => item.value))\n : new Set(value.filter((held) => held !== wildcard));\n const toggle = (values: readonly string[], on: boolean) => {\n const next = explicit();\n for (const item of values) {\n if (on) next.add(item);\n else next.delete(item);\n }\n emit(next);\n };\n const toggleAll = (on: boolean) => {\n if (wildcard === undefined) {\n toggle(\n items.map((item) => item.value),\n on,\n );\n } else if (on) {\n setValue([wildcard]);\n } else {\n emit(new Set(items.map((item) => item.value)));\n }\n };\n\n // Presets name selections among what the catalog offers (and the\n // wildcard): what it no longer offers sits outside every one of them.\n const named = (values: readonly string[]) =>\n values.filter((held) => held === wildcard || offered.has(held));\n const preset =\n loading || items.length === 0\n ? undefined\n : presets?.find((option) => {\n const its = named(option.value);\n return its.length > 0 && sameSelection(its, named(value));\n });\n const choosePreset = (option: ScopePreset) => {\n const its = named(option.value);\n if (wildcard !== undefined && its.includes(wildcard)) {\n setValue([wildcard]);\n } else {\n emit(new Set([...its, ...retired.filter((held) => selected.has(held))]));\n }\n };\n\n const setOpen = (next: boolean) => {\n if (openProp === undefined) setInnerOpen(next);\n onOpenChange?.(next);\n };\n const unfold = () => {\n focusNext.current = \"search\";\n setOpen(true);\n };\n const fold = () => {\n focusNext.current = \"summary\";\n setQuery(\"\");\n setOpen(false);\n };\n\n // The selection as it stood when the list opened, whoever opened it:\n // dismissing the edit puts it back.\n const valueRef = useRef(value);\n valueRef.current = value;\n const openedWith = useRef<readonly string[] | null>(open ? value : null);\n useEffect(() => {\n openedWith.current = open ? valueRef.current : null;\n // Folded by the page (after its save) or by the ✕, the next opening\n // starts from the whole list.\n if (!open) setQuery(\"\");\n }, [open]);\n /** The ✕ (or Escape): the edit is dropped and the list folds. */\n const dismiss = () => {\n const before = openedWith.current;\n if (before != null && !sameSelection(before, valueRef.current)) {\n setValue([...before]);\n }\n fold();\n };\n\n // Focus lands once the face can take it: it fades in, and a field asked\n // to focus on its first frame may still refuse. Try a frame at a time.\n useEffect(() => {\n const target = focusNext.current;\n if (target == null) return;\n focusNext.current = null;\n let frame = 0;\n let tries = 0;\n const attempt = () => {\n const node = target === \"search\" ? searchRef.current : summaryRef.current;\n if (node == null) return;\n // Not scrolled into view: the face opening around it would scroll\n // inside its own clip and jump when it settles.\n node.focus({ preventScroll: true });\n if (document.activeElement !== node && tries++ < 5) {\n frame = requestAnimationFrame(attempt);\n }\n };\n frame = requestAnimationFrame(attempt);\n return () => cancelAnimationFrame(frame);\n }, [open]);\n\n const onSearchKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n // A search, not the form's submit.\n if (event.key === \"Enter\") event.preventDefault();\n if (event.key !== \"Escape\") return;\n if (query !== \"\") {\n // Ours — not an enclosing dialog's or aside's close.\n event.preventDefault();\n setQuery(\"\");\n } else if (collapsible && !disabled) {\n event.preventDefault();\n dismiss();\n }\n };\n\n const tokens = tokenize(query);\n const searching = tokens.length > 0;\n const shownGroups = groups\n .map((group) => ({\n ...group,\n items: searching\n ? group.items.filter((item) =>\n matches(\n tokens,\n group.label,\n item.value,\n item.label,\n item.description,\n ),\n )\n : group.items,\n }))\n .filter((group) => group.items.length > 0);\n const shownRetired = searching\n ? retired.filter((held) => matches(tokens, held))\n : retired;\n\n // The count reads the catalog: under the wildcard every item is in and\n // more will be, so it steps aside for the catch-all's own words.\n const count =\n everything || items.length === 0 ? null : `${offeredOn} of ${items.length}`;\n\n const summary = (() => {\n if (everything && all) {\n return { title: all.label, detail: all.description ?? \"\" };\n }\n if (preset && retiredOn === 0) {\n return { title: preset.label, detail: preset.description ?? count ?? \"\" };\n }\n if (\n all &&\n wildcard === undefined &&\n items.length > 0 &&\n offeredOn === items.length &&\n retiredOn === 0\n ) {\n return { title: all.label, detail: all.description ?? count ?? \"\" };\n }\n // Whole groups by name, the rest item by item. A group of one is just\n // its item: the id says more than the heading over it.\n const names: string[] = [];\n for (const group of groups) {\n const on = group.items.filter((item) => isOn(item.value));\n if (\n group.label !== null &&\n group.items.length > 1 &&\n on.length === group.items.length\n ) {\n names.push(group.label);\n } else {\n names.push(...on.map(nameOf));\n }\n }\n names.push(...retired.filter((held) => selected.has(held)));\n return {\n title: names.length > 0 ? names.join(\", \") : \"None\",\n detail: count ?? \"\",\n };\n })();\n\n const rowDisabled = disabled || loading;\n // Every block that comes and goes (the folded face and the open one,\n // bones and rows, a group or a row a search sets aside) opens and closes\n // on `BasicPage.Reveal`'s motion.\n const reveal = revealIn(reduceMotion);\n\n /**\n * One row. A retired row is a value the catalog no longer offers: its\n * name goes quiet and it has no description to show.\n */\n const renderRow = (item: ScopeItem, retiredRow = false) => {\n const rowId = retiredRow\n ? `${baseId}-r${retired.indexOf(item.value)}`\n : `${baseId}-i${position.get(item.value)}`;\n const nameId = `${rowId}-name`;\n const descriptionId = `${rowId}-description`;\n return (\n <motion.label\n key={item.value}\n {...reveal}\n className={cn(SCOPE_ROW, \"overflow-hidden\")}\n data-scope-row=\"\"\n data-disabled={rowDisabled || undefined}\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <Checkbox\n size=\"sm\"\n checked={isOn(item.value)}\n disabled={rowDisabled}\n aria-labelledby={nameId}\n aria-describedby={item.description ? descriptionId : undefined}\n onCheckedChange={(on: boolean) => toggle([item.value], on)}\n />\n <span\n id={nameId}\n className={cn(\n \"truncate text-base\",\n retiredRow ? \"text-pho-description\" : \"text-pho-secondary\",\n )}\n >\n {nameOf(item)}\n </span>\n </span>\n {item.description ? (\n <Tooltip.Trigger\n handle={handle}\n payload={item.description}\n render={\n <span\n id={descriptionId}\n data-scope-description=\"\"\n className={SCOPE_DESCRIPTION}\n />\n }\n >\n {item.description}\n </Tooltip.Trigger>\n ) : null}\n </motion.label>\n );\n };\n\n const renderGroup = (group: ScopeGroup) => {\n // Ungrouped items stand on the list's own columns.\n if (group.label === null) {\n return group.items.map((item) => renderRow(item));\n }\n const labelId = `${baseId}-g${groupPosition.get(group.label)}`;\n const members = group.items.map((item) => item.value);\n const on = members.filter(isOn).length;\n const checked = on === members.length;\n return (\n <motion.div\n key={`group:${group.label}`}\n {...reveal}\n // A fieldset's min-content width and legend layout don't sit on the\n // list's grid; the role says the same.\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n aria-labelledby={labelId}\n className={cn(SCOPE_GROUP, \"overflow-hidden\")}\n >\n <label\n className={SCOPE_GROUP_BAND}\n data-disabled={rowDisabled || undefined}\n >\n <Checkbox\n size=\"sm\"\n checked={checked}\n indeterminate={on > 0 && !checked}\n disabled={rowDisabled}\n aria-labelledby={labelId}\n onCheckedChange={(next: boolean) => toggle(members, next)}\n />\n <span id={labelId} className=\"truncate\">\n {group.label}\n </span>\n {/* The rows it heads — while searching, the ones that match. */}\n <span className=\"text-pho-description tabular-nums\">\n {members.length}\n </span>\n </label>\n <AnimatePresence initial={false}>\n {group.items.map((item) => renderRow(item))}\n </AnimatePresence>\n </motion.div>\n );\n };\n\n const retiredGroup =\n shownRetired.length > 0 ? (\n <motion.div\n key=\"retired\"\n {...reveal}\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n aria-labelledby={`${baseId}-retired`}\n className={cn(SCOPE_GROUP, \"overflow-hidden\")}\n >\n <div className={cn(SCOPE_GROUP_BAND, \"cursor-default\")}>\n {/* The checkbox column stays: nothing here is added in bulk. */}\n <span aria-hidden className=\"size-4 shrink-0\" />\n <span id={`${baseId}-retired`} className=\"truncate\">\n No longer offered\n </span>\n </div>\n <AnimatePresence initial={false}>\n {shownRetired.map((held) => renderRow({ value: held }, true))}\n </AnimatePresence>\n </motion.div>\n ) : null;\n\n const allRow = all ? (\n <motion.label\n key=\"all\"\n {...reveal}\n className={cn(SCOPE_ROW, \"overflow-hidden\")}\n data-scope-row=\"\"\n data-disabled={\n rowDisabled || (everything && items.length === 0) || undefined\n }\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <Checkbox\n size=\"sm\"\n checked={\n wildcard === undefined\n ? items.length > 0 && offeredOn === items.length\n : everything\n }\n indeterminate={\n wildcard === undefined\n ? offeredOn > 0 && offeredOn < items.length\n : !everything && offeredOn + retiredOn > 0\n }\n // With no catalog to spell out, leaving the wildcard could only\n // mean nothing.\n disabled={rowDisabled || (everything && items.length === 0)}\n aria-labelledby={`${baseId}-all`}\n aria-describedby={\n all.description ? `${baseId}-all-description` : undefined\n }\n onCheckedChange={(on: boolean) => toggleAll(on)}\n />\n <span\n id={`${baseId}-all`}\n className=\"text-pho-primary truncate text-base font-medium\"\n >\n {all.label}\n </span>\n </span>\n {all.description ? (\n <span id={`${baseId}-all-description`} className={SCOPE_DESCRIPTION}>\n {all.description}\n </span>\n ) : null}\n </motion.label>\n ) : null;\n\n const nothing =\n searching && shownGroups.length === 0 && shownRetired.length === 0 ? (\n <motion.p\n key=\"nothing\"\n {...reveal}\n className={cn(\n \"text-pho-description col-span-full overflow-hidden text-center text-base\",\n SCOPE_INSET,\n )}\n >\n <span className=\"block py-6\">Nothing matches “{query}”.</span>\n </motion.p>\n ) : null;\n\n const list = (\n <motion.div\n key=\"list\"\n // Past the bones (fading where they stood), the rows unroll.\n {...takeOver(reveal, heights.current.bones, \"down\")}\n id={listId}\n data-scope-list=\"\"\n className={cn(SCOPE_LIST, \"overflow-hidden\")}\n >\n <AnimatePresence initial={false}>\n {!searching ? allRow : null}\n {shownGroups.map(renderGroup)}\n {retiredGroup}\n {nothing}\n </AnimatePresence>\n </motion.div>\n );\n\n // The bones are the list's own shape — the catch-all row, a group's\n // band, rows with their descriptions — so the rows open into it.\n const bones = (\n <motion.div\n key=\"bones\"\n // Back to bones (the catalog reloading), they open from the list's\n // height while the rows fade where they stood.\n {...takeOver(reveal, heights.current.list)}\n data-scope-bones=\"\"\n aria-hidden\n className={cn(SCOPE_LIST, \"overflow-hidden\")}\n >\n {[\n { band: false, name: \"w-20\", text: \"w-44\" },\n { band: true, name: \"w-12\", text: \"\" },\n { band: false, name: \"w-28\", text: \"w-56\" },\n { band: false, name: \"w-32\", text: \"w-48\" },\n { band: false, name: \"w-24\", text: \"w-60\" },\n ].map((bone, index) =>\n bone.band ? (\n <div\n key={index}\n className={cn(\n \"border-pho-secondary bg-pho-page col-span-full flex h-8 items-center gap-2 border-y\",\n SCOPE_INSET,\n )}\n >\n <Skeleton className=\"size-4 rounded-sm\" />\n <Skeleton className={cn(\"h-3\", bone.name)} />\n </div>\n ) : (\n <div key={index} className={SCOPE_BONE_ROW}>\n <span className=\"flex h-5 min-w-0 items-center gap-2\">\n <Skeleton className=\"size-4 shrink-0 rounded-sm\" />\n <Skeleton className={cn(\"h-3.5 max-w-full\", bone.name)} />\n </span>\n <span className=\"flex h-4.5 items-center pl-6 group-data-[wide]/scope:pl-0\">\n <Skeleton className={cn(\"h-3 max-w-full\", bone.text)} />\n </span>\n </div>\n ),\n )}\n </motion.div>\n );\n\n const presetPicker =\n presets != null && presets.length > 0 ? (\n // A field of its own: inside a host `Field` (the page's Permissions)\n // the select would take that field's label for its name, its\n // description, and its name in the form. Laid out as its trigger.\n <BaseField.Root className=\"contents\">\n <Select.Root\n items={[\n ...presets.map((option, index) => ({\n value: `preset:${index}`,\n label: option.label,\n })),\n { value: CUSTOM, label: \"Custom\" },\n ]}\n value={preset ? `preset:${presets.indexOf(preset)}` : CUSTOM}\n onValueChange={(next) => {\n const option =\n presets[Number(String(next).slice(\"preset:\".length))];\n if (option != null && option !== preset) choosePreset(option);\n }}\n disabled={disabled || loading}\n >\n <Select.Trigger\n variant=\"inline\"\n aria-label=\"Preset\"\n // Last in the row, out by its padding (see the class); before\n // the ✕, a little closer to it.\n className={cn(\n SCOPE_PRESET_TRIGGER,\n collapsible ? \"-mr-1\" : \"-mr-2\",\n )}\n >\n <Select.Value />\n <Select.Icon>\n <IconChevronDown />\n </Select.Icon>\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner align=\"end\">\n <Select.Popup>\n <Select.List>\n {presets.map((option, index) => (\n <Select.Item key={index} value={`preset:${index}`}>\n <Select.ItemIndicator>\n <IconCheck />\n </Select.ItemIndicator>\n <Select.ItemText>{option.label}</Select.ItemText>\n {option.description ? (\n <span className=\"text-pho-description col-start-2 text-xs\">\n {option.description}\n </span>\n ) : null}\n </Select.Item>\n ))}\n {/* Not picked, only shown: what a hand-made selection reads. */}\n <Select.Item value={CUSTOM} disabled>\n <Select.ItemIndicator>\n <IconCheck />\n </Select.ItemIndicator>\n <Select.ItemText>Custom</Select.ItemText>\n </Select.Item>\n </Select.List>\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n </BaseField.Root>\n ) : null;\n\n const picker = (\n <motion.div\n key=\"picker\"\n {...takeOver(reveal, heights.current.face, \"down\")}\n className=\"overflow-hidden\"\n >\n {/* The row the folded summary gives way to: the two cross where they\n stand, while the list under it unrolls with its ink down. */}\n <motion.div\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={reveal.transition}\n className={SCOPE_SEARCH_ROW}\n >\n <GhostSearch\n ref={searchRef}\n value={query}\n onChange={setQuery}\n onClear={() => setQuery(\"\")}\n onKeyDown={onSearchKeyDown}\n placeholder={placeholder}\n aria-label={placeholder}\n aria-controls={loading ? undefined : listId}\n disabled={loading}\n trailing={\n count != null && !loading ? (\n // A card too narrow for both gives the room to the query; the\n // folded summary carries the count there.\n <span className=\"hidden group-data-[roomy]/scope:inline\">\n {count}\n </span>\n ) : undefined\n }\n autoComplete=\"off\"\n spellCheck={false}\n />\n {presetPicker}\n {collapsible ? (\n <CloseButton\n size=\"sm\"\n label=\"Cancel\"\n // Held open while the page saves: dropping the edit now would\n // show the old selection under a save that sends the new one.\n disabled={disabled}\n onClick={dismiss}\n // Out by its own padding: the ✕ stands as far from the right\n // edge as the magnifier from the left. Its ring inside, as a\n // Button's: the blocks around it clip.\n className=\"-mr-2 shrink-0 focus-visible:-outline-offset-2\"\n />\n ) : null}\n </motion.div>\n <AnimatePresence initial={false} mode=\"popLayout\">\n {loading ? bones : list}\n </AnimatePresence>\n </motion.div>\n );\n\n // The bones stand in the two lines' own boxes, so the card keeps its\n // height when the words arrive.\n const summaryText = loading ? (\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"flex h-5 items-center\">\n <Skeleton className=\"h-3.5 w-48 max-w-full\" />\n </span>\n <span className=\"flex h-4.5 items-center\">\n <Skeleton className=\"h-3 w-16\" />\n </span>\n </span>\n ) : (\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"text-pho-primary truncate text-base\">\n {summary.title}\n </span>\n {summary.detail ? (\n <span className=\"text-pho-description truncate text-xs tabular-nums\">\n {summary.detail}\n </span>\n ) : null}\n </span>\n );\n\n const folded = (\n <motion.div\n key=\"folded\"\n {...takeOver(reveal, heights.current.face)}\n className=\"overflow-hidden\"\n >\n {disabled || loading ? (\n <div className={SCOPE_SUMMARY}>{summaryText}</div>\n ) : (\n <button\n ref={summaryRef}\n type=\"button\"\n aria-expanded={false}\n className={cn(\n SCOPE_SUMMARY,\n \"group hover:bg-pho-primary-hover cursor-pointer transition-colors\",\n )}\n onClick={unfold}\n >\n {summaryText}\n <span\n aria-hidden\n className={buttonVariants({\n variant: \"ghost\",\n size: \"sm\",\n className:\n \"group-hover:bg-pho-ghost-hover group-hover:text-pho-secondary-hover pointer-events-none shrink-0\",\n })}\n >\n Edit\n </span>\n </button>\n )}\n </motion.div>\n );\n\n return (\n <div\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n aria-busy={loading || undefined}\n data-scope=\"\"\n data-open={open ? \"\" : undefined}\n data-wide={wide ? \"\" : undefined}\n data-roomy={roomy ? \"\" : undefined}\n className={cn(SCOPE_SURFACE, className)}\n {...props}\n ref={(node: HTMLDivElement | null) => {\n cardRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref != null) ref.current = node;\n }}\n >\n {/* Folding and opening, the faces trade places on Reveal's motion:\n the one arriving opens from the height the other stood at, the\n other fades where it stood. The card moves at its bottom edge, so\n the list unrolls from the top down, row by row, and rolls back up\n under it. */}\n <AnimatePresence initial={false} mode=\"popLayout\">\n {open ? picker : folded}\n </AnimatePresence>\n <Tooltip.Root\n handle={handle}\n onOpenChange={(next, details) => {\n // Only a description the row cuts short opens.\n if (next && !isClipped(details.event?.target)) details.cancel();\n }}\n >\n {({ payload }) => (\n <Tooltip.Portal>\n <Tooltip.Positioner side=\"top\" align=\"start\">\n <Tooltip.Popup className=\"max-w-80 font-normal\">\n {payload}\n </Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n )}\n </Tooltip.Root>\n </div>\n );\n}\n\nScope.displayName = \"Scope\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAoJA,IAAM2B,KACJ,8JAGIC,KAAc,2BASdC,KACJ,0FAWIC,KACJ,oRAGIC,KAAS,UAaTC,KACJ,qIAGIC,KACJ,qGAQIC,KACJ,sUAGIC,KACJ,gLAMIC,KACJ,kOAMIC,KACJ,sJAGIC,KACJ,6JAGIC,KAAW,IAEXC,KAAY;AAWlB,SAASC,GAAYC,GAAoC;AACvD,QAAM,CAACC,GAAMC,CAAA,IAAWzB,EAAS;AAAA,IAAE,MAAM;AAAA,IAAM,OAAO;AAAA,EAAK,CAAC,GACtD0B,IAAU3B,EAAO;AA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BJ,KAAO,SAAMA,EAAI,UAAUI;AAAA,IACtC;AAAA,IAdF,UAAA,CAqBE,gBAAA1B,EAACE,GAAD;AAAA,MAAiB,SAAS;AAAA,MAAO,MAAK;AAAA,MACnC,UAAAgF,IAAOqE,KAASE;AAAA,IACF,CAAA,GACjB,gBAAAzJ,EAACnB,EAAQ,MAAT;AAAA,MACU,QAAAgH;AAAA,MACR,cAAA,CAAe7D,GAAM0H,MAAY;AAE/B,QAAI1H,KAAQ,CAAC6B,GAAU6F,EAAQ,OAAO,MAAM,KAAGA,EAAQ,OAAO;AAAA,MAChE;AAAA,MAEE,UAAA,CAAA,EAAE,SAAAC,EAAA,MACF,gBAAA3J,EAACnB,EAAQ,QAAT,EAAA,UACE,gBAAAmB,EAACnB,EAAQ,YAAT;AAAA,QAAoB,MAAK;AAAA,QAAM,OAAM;AAAA,QACnC,UAAA,gBAAAmB,EAACnB,EAAQ,OAAT;AAAA,UAAe,WAAU;AAAA,UACtB,UAAA8K;AAAA,QACY,CAAA;AAAA,MACG,CAAA,EACN,CAAA;AAAA,IAEN,CAAA,CACX;AAAA,E;AAET;AAEA5F,GAAM,cAAc"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t } from "../chunks/select-xhSvDNbw.js";
2
+ import { t } from "../chunks/select-Dux2SBVc.js";
3
3
  export {
4
4
  t as Select
5
5
  };
@@ -1,47 +1,47 @@
1
1
  "use client";
2
- import { t as o } from "../chunks/cn-CPbhpG1q.js";
2
+ import { t as n } from "../chunks/cn-CPbhpG1q.js";
3
3
  import "react";
4
- import { jsx as n } from "react/jsx-runtime";
4
+ import { jsx as o } from "react/jsx-runtime";
5
5
  import { Slider as r } from "@base-ui/react/slider";
6
6
  function l({ className: e, ...t }) {
7
- return /* @__PURE__ */ n(r.Root, {
8
- className: o("flex w-full flex-col gap-3", e),
7
+ return /* @__PURE__ */ o(r.Root, {
8
+ className: n("flex w-full flex-col gap-3", e),
9
9
  ...t
10
10
  });
11
11
  }
12
12
  function a({ className: e, ...t }) {
13
- return /* @__PURE__ */ n(r.Label, {
14
- className: o("text-pho-secondary text-base font-medium", e),
13
+ return /* @__PURE__ */ o(r.Label, {
14
+ className: n("text-pho-secondary font-heading text-base font-medium", e),
15
15
  ...t
16
16
  });
17
17
  }
18
18
  function i({ className: e, ...t }) {
19
- return /* @__PURE__ */ n(r.Value, {
20
- className: o("text-pho-secondary text-base tabular-nums", e),
19
+ return /* @__PURE__ */ o(r.Value, {
20
+ className: n("text-pho-secondary text-base tabular-nums", e),
21
21
  ...t
22
22
  });
23
23
  }
24
24
  function u({ className: e, ...t }) {
25
- return /* @__PURE__ */ n(r.Control, {
26
- className: o("relative flex w-full touch-none items-center py-2 select-none", e),
25
+ return /* @__PURE__ */ o(r.Control, {
26
+ className: n("relative flex w-full touch-none items-center py-2 select-none", e),
27
27
  ...t
28
28
  });
29
29
  }
30
30
  function s({ className: e, ...t }) {
31
- return /* @__PURE__ */ n(r.Track, {
32
- className: o("bg-pho-secondary relative h-1.5 w-full rounded-full", e),
31
+ return /* @__PURE__ */ o(r.Track, {
32
+ className: n("bg-pho-secondary relative h-1.5 w-full rounded-full", e),
33
33
  ...t
34
34
  });
35
35
  }
36
36
  function c({ className: e, ...t }) {
37
- return /* @__PURE__ */ n(r.Indicator, {
38
- className: o("bg-pho-brand-solid rounded-full", e),
37
+ return /* @__PURE__ */ o(r.Indicator, {
38
+ className: n("bg-pho-brand-solid rounded-full", e),
39
39
  ...t
40
40
  });
41
41
  }
42
42
  function f({ className: e, ...t }) {
43
- return /* @__PURE__ */ n(r.Thumb, {
44
- className: o("outline-pho-brand size-4 rounded-full bg-white ring-1 ring-black/15 transition focus-visible:outline-2 focus-visible:outline-offset-2 data-[disabled]:opacity-50", e),
43
+ return /* @__PURE__ */ o(r.Thumb, {
44
+ className: n("outline-pho-brand size-4 rounded-full bg-white ring-1 ring-black/15 transition focus-visible:outline-2 focus-visible:outline-offset-2 data-[disabled]:opacity-50", e),
45
45
  ...t
46
46
  });
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","names":["BaseSlider","cn","jsx","Slider$1","Root","className","props","Label","Value","Control","Track","Indicator","Thumb","Slider"],"sources":["../../src/components/slider/slider.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Slider as BaseSlider } from \"@base-ui/react/slider\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseSlider.Root>) {\n return (\n <BaseSlider.Root\n className={cn(\"flex w-full flex-col gap-3\", className)}\n {...props}\n />\n );\n}\n\nfunction Label({ className, ...props }: StyledProps<typeof BaseSlider.Label>) {\n return (\n <BaseSlider.Label\n className={cn(\"text-pho-secondary text-base font-medium\", className)}\n {...props}\n />\n );\n}\n\nfunction Value({ className, ...props }: StyledProps<typeof BaseSlider.Value>) {\n return (\n <BaseSlider.Value\n className={cn(\"text-pho-secondary text-base tabular-nums\", className)}\n {...props}\n />\n );\n}\n\nfunction Control({\n className,\n ...props\n}: StyledProps<typeof BaseSlider.Control>) {\n return (\n <BaseSlider.Control\n className={cn(\n \"relative flex w-full touch-none items-center py-2 select-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Track({ className, ...props }: StyledProps<typeof BaseSlider.Track>) {\n return (\n <BaseSlider.Track\n className={cn(\n \"bg-pho-secondary relative h-1.5 w-full rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Indicator({\n className,\n ...props\n}: StyledProps<typeof BaseSlider.Indicator>) {\n return (\n <BaseSlider.Indicator\n className={cn(\"bg-pho-brand-solid rounded-full\", className)}\n {...props}\n />\n );\n}\n\nfunction Thumb({ className, ...props }: StyledProps<typeof BaseSlider.Thumb>) {\n return (\n <BaseSlider.Thumb\n // Flat white circle in both modes. The edge is a FIXED black/15\n // hairline: the thumb is always white, and in dark mode it rides a\n // white filled range (brand-solid), where any light-dark ring would\n // resolve white-on-white and vanish.\n className={cn(\n \"outline-pho-brand size-4 rounded-full bg-white ring-1 ring-black/15 transition focus-visible:outline-2 focus-visible:outline-offset-2 data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Slider built on Base UI `Slider` for picking a number (or range) along a\n * track. Compose a header with `Slider.Label` + `Slider.Value`, then\n * `Slider.Control` → `Track` → `Indicator` + `Thumb`. Set `value` /\n * `defaultValue`, `min`, `max`, `step` on `Slider.Root`. For a precise typed\n * number, prefer `NumberField`.\n */\nexport const Slider = {\n Root,\n Label,\n Value,\n Control,\n Track,\n Indicator,\n Thumb,\n};\n"],"mappings":";;;;;AAYA,SAASI,EAAK,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAA8C;AAC1E,SACE,gBAAAJ,EAACF,EAAW,MAAZ;AAAA,IACE,WAAWC,EAAG,8BAA8BI,CAAS;AAAA,IACrD,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASC,EAAM,EAAE,WAAAF,GAAW,GAAGC,EAAA,GAA+C;AAC5E,SACE,gBAAAJ,EAACF,EAAW,OAAZ;AAAA,IACE,WAAWC,EAAG,4CAA4CI,CAAS;AAAA,IACnE,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASE,EAAM,EAAE,WAAAH,GAAW,GAAGC,EAAA,GAA+C;AAC5E,SACE,gBAAAJ,EAACF,EAAW,OAAZ;AAAA,IACE,WAAWC,EAAG,6CAA6CI,CAAS;AAAA,IACpE,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASG,EAAQ,EACf,WAAAJ,GACA,GAAGC,EAAA,GACsC;AACzC,SACE,gBAAAJ,EAACF,EAAW,SAAZ;AAAA,IACE,WAAWC,EACT,iEACAI,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASI,EAAM,EAAE,WAAAL,GAAW,GAAGC,EAAA,GAA+C;AAC5E,SACE,gBAAAJ,EAACF,EAAW,OAAZ;AAAA,IACE,WAAWC,EACT,uDACAI,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASK,EAAU,EACjB,WAAAN,GACA,GAAGC,EAAA,GACwC;AAC3C,SACE,gBAAAJ,EAACF,EAAW,WAAZ;AAAA,IACE,WAAWC,EAAG,mCAAmCI,CAAS;AAAA,IAC1D,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASM,EAAM,EAAE,WAAAP,GAAW,GAAGC,EAAA,GAA+C;AAC5E,SACE,gBAAAJ,EAACF,EAAW,OAAZ;AAAA,IAKE,WAAWC,EACT,oKACAI,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AASA,IAAaO,IAAS;AAAA,EACpB,MAAAT;AAAA,EACA,OAAAG;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AACF"}
1
+ {"version":3,"file":"slider.js","names":["BaseSlider","cn","jsx","Slider$1","Root","className","props","Label","Value","Control","Track","Indicator","Thumb","Slider"],"sources":["../../src/components/slider/slider.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Slider as BaseSlider } from \"@base-ui/react/slider\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseSlider.Root>) {\n return (\n <BaseSlider.Root\n className={cn(\"flex w-full flex-col gap-3\", className)}\n {...props}\n />\n );\n}\n\nfunction Label({ className, ...props }: StyledProps<typeof BaseSlider.Label>) {\n return (\n <BaseSlider.Label\n className={cn(\n \"text-pho-secondary font-heading text-base font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Value({ className, ...props }: StyledProps<typeof BaseSlider.Value>) {\n return (\n <BaseSlider.Value\n className={cn(\"text-pho-secondary text-base tabular-nums\", className)}\n {...props}\n />\n );\n}\n\nfunction Control({\n className,\n ...props\n}: StyledProps<typeof BaseSlider.Control>) {\n return (\n <BaseSlider.Control\n className={cn(\n \"relative flex w-full touch-none items-center py-2 select-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Track({ className, ...props }: StyledProps<typeof BaseSlider.Track>) {\n return (\n <BaseSlider.Track\n className={cn(\n \"bg-pho-secondary relative h-1.5 w-full rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Indicator({\n className,\n ...props\n}: StyledProps<typeof BaseSlider.Indicator>) {\n return (\n <BaseSlider.Indicator\n className={cn(\"bg-pho-brand-solid rounded-full\", className)}\n {...props}\n />\n );\n}\n\nfunction Thumb({ className, ...props }: StyledProps<typeof BaseSlider.Thumb>) {\n return (\n <BaseSlider.Thumb\n // Flat white circle in both modes. The edge is a FIXED black/15\n // hairline: the thumb is always white, and in dark mode it rides a\n // white filled range (brand-solid), where any light-dark ring would\n // resolve white-on-white and vanish.\n className={cn(\n \"outline-pho-brand size-4 rounded-full bg-white ring-1 ring-black/15 transition focus-visible:outline-2 focus-visible:outline-offset-2 data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Slider built on Base UI `Slider` for picking a number (or range) along a\n * track. Compose a header with `Slider.Label` + `Slider.Value`, then\n * `Slider.Control` → `Track` → `Indicator` + `Thumb`. Set `value` /\n * `defaultValue`, `min`, `max`, `step` on `Slider.Root`. For a precise typed\n * number, prefer `NumberField`.\n */\nexport const Slider = {\n Root,\n Label,\n Value,\n Control,\n Track,\n Indicator,\n Thumb,\n};\n"],"mappings":";;;;;AAYA,SAASI,EAAK,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAA8C;AAC1E,SACE,gBAAAJ,EAACF,EAAW,MAAZ;AAAA,IACE,WAAWC,EAAG,8BAA8BI,CAAS;AAAA,IACrD,GAAI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}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { n as a, t as o } from "../chunks/stat-VxA1SvS_.js";
2
+ import { n as a, t as o } from "../chunks/stat-DUq4roVt.js";
3
3
  export {
4
4
  o as Stat,
5
5
  a as StatGroup
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { i as s, n as t, r as T, t as a } from "../chunks/status-view-I_Y6eEyX.js";
2
+ import { i as s, n as t, r as T, t as a } from "../chunks/status-view-Buhh1UBJ.js";
3
3
  export {
4
4
  a as STATUS_VIEW,
5
5
  t as STATUS_VIEW_COPY,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { n as o, t as s } from "../chunks/toast-B1GAdxXP.js";
2
+ import { n as o, t as s } from "../chunks/toast-K549iZEX.js";
3
3
  export {
4
4
  s as Toast,
5
5
  o as Toasty
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { A as s, B as e, C as i, D as n, E as l, F as r, I as t, L as o, M as p, N as c, O as T, P as u, R as I, S, T as m, V as d, _ as v, a as b, b as V, c as w, d as f, f as D, g as L, h as _, i as k, j as x, k as g, l as A, m as E, n as F, o as N, p as y, r as z, s as B, t as O, u as P, v as R, w as W, x as C, y as G, z as K } from "../chunks/trace-D9F0sne7.js";
2
+ import { A as s, B as e, C as i, D as n, E as l, F as r, I as t, L as o, M as p, N as c, O as T, P as u, R as I, S, T as m, V as d, _ as v, a as b, b as V, c as w, d as f, f as D, g as L, h as _, i as k, j as x, k as g, l as A, m as E, n as F, o as N, p as y, r as z, s as B, t as O, u as P, v as R, w as W, x as C, y as G, z as K } from "../chunks/trace-5Rh1ade9.js";
3
3
  export {
4
4
  i as FULL_VIEW,
5
5
  y as GEN_AI_KINDS,
package/dist/index.js CHANGED
@@ -8,30 +8,30 @@ import { n as V, r as h, t as G } from "./chunks/use-press-pulse-IbNstUT0.js";
8
8
  import { n as M, t as b } from "./chunks/use-copy-D6JwKUll.js";
9
9
  import "./utils.js";
10
10
  import { a as k, c as w, d as W, i as y, l as H, n as K, o as x, r as z, s as X, t as Y, u as Z } from "./chunks/button-CLfWdqm-.js";
11
- import { a as J, c as Q, i as q, l as $, n as aa, o as sa, r as ta, s as ra, t as oa, u as ea } from "./chunks/error-BObcQClz.js";
12
- import { t as Sa } from "./chunks/chat-Dfbkf7g8.js";
13
- import { A as _a, B as na, C as ma, D as Aa, E as Ia, F as Ta, I as pa, L as Ra, M as la, N as Ca, O as ua, P as Ba, R as fa, S as Na, T as La, V as Pa, _ as ca, a as Da, b as Oa, c as da, d as ga, f as Va, g as ha, h as Ga, i as Ua, j as Ma, k as ba, l as Fa, m as va, n as ka, o as wa, p as Wa, r as ya, s as Ha, t as Ka, u as xa, v as za, w as Xa, x as Ya, y as Za, z as ja } from "./chunks/trace-D9F0sne7.js";
11
+ import { a as J, c as Q, i as q, l as $, n as aa, o as sa, r as ta, s as ra, t as oa, u as ea } from "./chunks/error-BjSn7wLu.js";
12
+ import { t as Sa } from "./chunks/chat-C5W6L_Jg.js";
13
+ import { A as _a, B as na, C as ma, D as Aa, E as Ia, F as Ta, I as pa, L as Ra, M as la, N as Ca, O as ua, P as Ba, R as fa, S as Na, T as La, V as Pa, _ as ca, a as Da, b as Oa, c as da, d as ga, f as Va, g as ha, h as Ga, i as Ua, j as Ma, k as ba, l as Fa, m as va, n as ka, o as wa, p as Wa, r as ya, s as Ha, t as Ka, u as xa, v as za, w as Xa, x as Ya, y as Za, z as ja } from "./chunks/trace-5Rh1ade9.js";
14
14
  import { a as Qa, c as qa, d as $a, i as as, l as ss, n as ts, o as rs, r as os, s as es, t as is, u as Ss } from "./chunks/code-block-B7MibV6r.js";
15
- import { n as _s, t as ns } from "./chunks/date-picker-vJQrTol9.js";
15
+ import { n as _s, t as ns } from "./chunks/date-picker-D-sWo3i8.js";
16
16
  import { n as As, t as Is } from "./chunks/copy-button-BLvirhXk.js";
17
- import { a as ps, c as Rs, d as ls, i as Cs, l as us, n as Bs, o as fs, r as Ns, s as Ls, t as Ps, u as cs } from "./chunks/sidebar-DHYyBBUj.js";
17
+ import { a as ps, c as Rs, d as ls, i as Cs, l as us, n as Bs, o as fs, r as Ns, s as Ls, t as Ps, u as cs } from "./chunks/sidebar-BsBlAVM9.js";
18
18
  import { t as Os } from "./chunks/input-DWnb33UF.js";
19
- import { i as gs, n as Vs, r as hs, t as Gs } from "./chunks/filter-bar-qqCZf1x4.js";
20
- import { i as Ms } from "./chunks/data-table-CAz_8HQw.js";
21
- import { n as Fs, t as vs } from "./chunks/stat-VxA1SvS_.js";
19
+ import { i as gs, n as Vs, r as hs, t as Gs } from "./chunks/filter-bar-CLLonntH.js";
20
+ import { i as Ms } from "./chunks/data-table-C1tLUdw0.js";
21
+ import { n as Fs, t as vs } from "./chunks/stat-DUq4roVt.js";
22
22
  import { t as ws } from "./chunks/calendar-DDWITGo4.js";
23
23
  import { t as ys } from "./chunks/close-button-Ck4rY1Fp.js";
24
24
  import { t as Ks } from "./chunks/input-group-C3upo2OU.js";
25
25
  import { n as zs, t as Xs } from "./chunks/card-Bg2V2B0x.js";
26
- import { n as Zs, t as js } from "./chunks/dialog-CDL6qY2a.js";
27
- import { i as Qs, n as qs, r as $s, t as at } from "./chunks/status-view-I_Y6eEyX.js";
28
- import { t as tt } from "./chunks/description-list-Duhhralt.js";
29
- import { a as ot, c as et, d as it, f as St, i as Et, l as _t, m as nt, n as mt, o as At, p as It, r as Tt, s as pt, t as Rt, u as lt } from "./chunks/basic-page-B78a6jpw.js";
26
+ import { n as Zs, t as js } from "./chunks/dialog-e4_mOYGp.js";
27
+ import { i as Qs, n as qs, r as $s, t as at } from "./chunks/status-view-Buhh1UBJ.js";
28
+ import { t as tt } from "./chunks/description-list-DcTvBHzI.js";
29
+ import { a as ot, c as et, d as it, f as St, i as Et, l as _t, m as nt, n as mt, o as At, p as It, r as Tt, s as pt, t as Rt, u as lt } from "./chunks/basic-page-DnB4YSRj.js";
30
30
  import { a as ut, i as Bt, n as ft, o as Nt, r as Lt, s as Pt, t as ct } from "./chunks/chart-Btnw7KXV.js";
31
31
  import "./components/chart.js";
32
32
  import { t as dt } from "./chunks/bar-chart-ZNuOoH7c.js";
33
33
  import { t as Vt } from "./chunks/line-chart-pOwE2_Oz.js";
34
- import { i as Gt, n as Ut, r as Mt, t as bt } from "./chunks/log-list-QbSYHZu3.js";
34
+ import { i as Gt, n as Ut, r as Mt, t as bt } from "./chunks/log-list-BqaJv2oA.js";
35
35
  import { n as vt, t as kt } from "./chunks/bubble-D88Edlgj.js";
36
36
  import { n as Wt, r as yt, t as Ht } from "./chunks/message-DRAWQlW-.js";
37
37
  export {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { i as s } from "../chunks/data-table-CAz_8HQw.js";
3
- import { a as E, c as a, d as C, f as S, i as I, l as e, m as o, n as B, o as P, p as N, r, s as t, t as D, u as R } from "../chunks/basic-page-B78a6jpw.js";
2
+ import { i as s } from "../chunks/data-table-C1tLUdw0.js";
3
+ import { a as E, c as a, d as C, f as S, i as I, l as e, m as o, n as B, o as P, p as N, r, s as t, t as D, u as R } from "../chunks/basic-page-DnB4YSRj.js";
4
4
  export {
5
5
  D as AUTO_SAVE_DELAY_MS,
6
6
  B as BASIC_PAGE_CALLOUT,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { a as I, c as _, d as S, i as R, l as A, n as B, o as T, r as a, s, t as D, u as N } from "../chunks/sidebar-DHYyBBUj.js";
2
+ import { a as I, c as _, d as S, i as R, l as A, n as B, o as T, r as a, s, t as D, u as N } from "../chunks/sidebar-BsBlAVM9.js";
3
3
  export {
4
4
  D as SIDEBAR_HEADER_INSET,
5
5
  B as SIDEBAR_ITEM,
@@ -14,7 +14,7 @@
14
14
  /** Same chrome as `BasicPage.Card`, minus its dividers — rows draw their own. */
15
15
  export declare const DATA_TABLE_SURFACE = "rounded-base border border-pho-secondary bg-pho-primary";
16
16
  /** A header cell: ink, height, weight. Pad it where it sits. */
17
- export declare const DATA_TABLE_HEADER_CELL = "text-pho-description h-10 text-left align-middle font-normal whitespace-nowrap";
17
+ export declare const DATA_TABLE_HEADER_CELL = "text-pho-description font-heading h-10 text-left align-middle font-normal whitespace-nowrap";
18
18
  /** The body: the line under the header, and one between every two rows. */
19
19
  export declare const DATA_TABLE_BODY = "divide-pho-secondary border-pho-secondary divide-y border-t";
20
20
  export type DataTableSize = "sm" | "base" | "lg";
@@ -9,6 +9,7 @@ declare function Viewport({ className, ...props }: StyledProps<typeof BaseDrawer
9
9
  declare function Popup({ className, ...props }: StyledProps<typeof BaseDrawer.Popup>): import('react').JSX.Element;
10
10
  declare function Content({ className, ...props }: StyledProps<typeof BaseDrawer.Content>): import('react').JSX.Element;
11
11
  declare function Title({ className, ...props }: StyledProps<typeof BaseDrawer.Title>): import('react').JSX.Element;
12
+ /** Supporting copy flush under the title: no gap between the two. */
12
13
  declare function Description({ className, ...props }: StyledProps<typeof BaseDrawer.Description>): import('react').JSX.Element;
13
14
  /**
14
15
  * Drawer built on Base UI `Drawer` — a panel that slides in from the edge
@@ -4,6 +4,13 @@ import { Field as BaseField } from '@base-ui/react/field';
4
4
  type StyledProps<T extends ElementType> = Omit<ComponentProps<T>, "className"> & {
5
5
  className?: string;
6
6
  };
7
+ /**
8
+ * The field's column: label, control and description 6px apart. A
9
+ * description right under the label (above the control) is the label's
10
+ * own and sits flush under it: `-mt-1.5` takes back the column's gap for
11
+ * that pair. A title of the host's own standing in for `Label` (a `div`
12
+ * over a group of controls) joins the pair with `data-field-label`.
13
+ */
7
14
  declare function Root({ className, ...props }: StyledProps<typeof BaseField.Root>): import('react').JSX.Element;
8
15
  /**
9
16
  * The field's label. `required` marks it the way `Input required` marks
@@ -20,8 +27,9 @@ declare function Control({ className, ...props }: StyledProps<typeof BaseField.C
20
27
  /**
21
28
  * Several controls under one label: the lines of an address, first and
22
29
  * last name, the parts of a date. Stacks them at the gap the system uses
23
- * between the parts of one thing (12px), so the field's own 6px stays for
24
- * label and description. Put an `Inline` inside for a side-by-side row.
30
+ * between the parts of one thing (12px), so the field's own 6px stays
31
+ * between the label, the controls and the description. Put an `Inline`
32
+ * inside for a side-by-side row.
25
33
  */
26
34
  declare function Controls({ className, ...props }: ComponentProps<"div">): import('react').JSX.Element;
27
35
  declare function Description({ className, ...props }: StyledProps<typeof BaseField.Description>): import('react').JSX.Element;
@@ -5,12 +5,13 @@ import { ComponentProps, ReactNode } from 'react';
5
5
  * `max-w-lg` only caps long prose at Dialog width before it wraps.
6
6
  */
7
7
  export declare const STATUS_VIEW = "mx-auto flex w-fit max-w-lg min-w-0 flex-col items-start justify-center text-left";
8
- /** Title + description group — flex column; gap comes from the size axis. */
8
+ /** Title + description group — flex column, the description flush under the title. */
9
9
  export declare const STATUS_VIEW_COPY = "flex flex-col";
10
10
  /**
11
11
  * Size axis — retunes every slot. Title + description share Dialog's
12
- * `font-display` ladder: `base` matches Dialog (`gap-1`); `sm` steps one rung
13
- * down (`gap-0`) for cards and panels.
12
+ * `font-display` ladder: `base` matches Dialog; `sm` steps one rung down
13
+ * for cards and panels. At both sizes the description sits flush under the
14
+ * title (`gap-0`), as a Dialog's does.
14
15
  */
15
16
  export declare const STATUS_VIEW_SIZES: {
16
17
  sm: {
@@ -16,8 +16,13 @@ import { Button } from '../../components/button';
16
16
  * `Root` takes `inset` (`base` | `sm`, default `base`) for the rail's outer
17
17
  * padding and header spacing — prefer that over host-app class overrides.
18
18
  */
19
- /** The rail itself — sticky, full-height, hairline right edge (no inset). */
20
- export declare const SIDEBAR_ROOT = "border-pho-secondary bg-pho-page sticky top-0 flex h-dvh w-64 shrink-0 flex-col border-r";
19
+ /**
20
+ * The rail itself — sticky, full-height, hairline right edge (no inset). The
21
+ * whole rail speaks in the heading face (`font-heading`, PolySans): nav rows,
22
+ * group labels, search, switcher, and account row; the page beside it keeps
23
+ * the text face.
24
+ */
25
+ export declare const SIDEBAR_ROOT = "border-pho-secondary bg-pho-page font-heading sticky top-0 flex h-dvh w-64 shrink-0 flex-col border-r";
21
26
  /** Outer inset on `Root` — `base` is the docs/default rail; `sm` is tighter. */
22
27
  export declare const SIDEBAR_ROOT_INSET: {
23
28
  readonly base: "px-4 pt-5 pb-4";