@photon-ai/pho-ui 4.16.2 → 4.18.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.
- package/dist/chunks/{basic-page-C0C8NDjG.js → basic-page-Bfcda8w5.js} +418 -400
- package/dist/chunks/basic-page-Bfcda8w5.js.map +1 -0
- package/dist/chunks/{code-block-CbcE994O.js → code-block-DekLMMtV.js} +2 -2
- package/dist/chunks/{code-block-CbcE994O.js.map → code-block-DekLMMtV.js.map} +1 -1
- package/dist/chunks/copy-button-BmGshaq9.js +76 -0
- package/dist/chunks/copy-button-BmGshaq9.js.map +1 -0
- package/dist/chunks/{data-table-hzZb7Otx.js → data-table-T4QKnrxQ.js} +30 -30
- package/dist/chunks/data-table-T4QKnrxQ.js.map +1 -0
- package/dist/chunks/description-list-BRRQ0oF6.js +60 -0
- package/dist/chunks/description-list-BRRQ0oF6.js.map +1 -0
- package/dist/chunks/{filter-bar-yEcG2pBm.js → filter-bar-BCiaO1gO.js} +2 -2
- package/dist/chunks/{filter-bar-yEcG2pBm.js.map → filter-bar-BCiaO1gO.js.map} +1 -1
- package/dist/chunks/menu-CoMrYnd1.js +264 -0
- package/dist/chunks/menu-CoMrYnd1.js.map +1 -0
- package/dist/components/code-block.js +1 -1
- package/dist/components/context-menu.js +38 -37
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/description-list.js +1 -1
- package/dist/components/filter-bar.js +1 -1
- package/dist/components/menu.js +5 -4
- package/dist/components/scope.js +88 -84
- package/dist/components/scope.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/sections/basic-page.js +2 -2
- package/dist/src/components/copy-button/copy-button.d.ts +15 -4
- package/dist/src/components/description-list/description-list.d.ts +3 -2
- package/dist/src/components/menu/index.d.ts +1 -1
- package/dist/src/components/menu/menu-pending.d.ts +26 -0
- package/dist/src/sections/basic-page/basic-page.d.ts +13 -3
- package/dist/src/sections/basic-page/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/basic-page-C0C8NDjG.js.map +0 -1
- package/dist/chunks/copy-button-D8XyP0oR.js +0 -56
- package/dist/chunks/copy-button-D8XyP0oR.js.map +0 -1
- package/dist/chunks/data-table-hzZb7Otx.js.map +0 -1
- package/dist/chunks/description-list-8qm83WZB.js +0 -59
- package/dist/chunks/description-list-8qm83WZB.js.map +0 -1
- package/dist/chunks/menu-BQeprfxB.js +0 -208
- package/dist/chunks/menu-BQeprfxB.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","names":[],"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 */\nconst SCOPE_LIST =\n \"grid 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. */\nconst SCOPE_GROUP =\n \"col-span-full grid 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, so the new block unfolds from the top down, and what it loses\n * rolls up under the top.\n */\nfunction takeOver(reveal: ReturnType<typeof revealIn>, from: number) {\n return {\n ...reveal,\n initial: { ...reveal.initial, height: from },\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 {...takeOver(reveal, heights.current.bones)}\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)}\n className=\"overflow-hidden\"\n >\n <div className={SCOPE_SEARCH_ROW}>\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 </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 unfolds from the top down and rolls back up 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,IAAM,KACJ,8JAGI,KAAc,2BASd,KACJ,0FAWI,KACJ,oRAGI,KAAS,UAOT,KACJ,uHAGI,KACJ,uFAQI,KACJ,gVAGI,KACJ,0LAMI,KACJ,kOAMI,KACJ,sJAGI,KACJ,6JAGI,KAAW,IAEX,KAAY;AAWlB,SAAS,GAAY,GAAoC;AACvD,QAAM,CAAC,GAAM,CAAA,IAAW,EAAS;AAAA,IAAE,MAAM;AAAA,IAAM,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;AAAA,MAChE;AAAA,MAEE,UAAA,CAAA,EAAE,SAAA,EAAA,MACF,gBAAA,EAAC,EAAQ,QAAT,EAAA,UACE,gBAAA,EAAC,EAAQ,YAAT;AAAA,QAAoB,MAAK;AAAA,QAAM,OAAM;AAAA,QACnC,UAAA,gBAAA,EAAC,EAAQ,OAAT;AAAA,UAAe,WAAU;AAAA,UACtB,UAAA;AAAA,QACY,CAAA;AAAA,MACG,CAAA,EACN,CAAA;AAAA,IAEN,CAAA,CACX;AAAA;AAET;AAEA,GAAM,cAAc"}
|
|
1
|
+
{"version":3,"file":"scope.js","names":[],"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>\n </Tooltip.Portal>\n )}\n </Tooltip.Root>\n </div>\n );\n}\n\nScope.displayName = \"Scope\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAoJA,IAAM,KACJ,8JAGI,KAAc,2BASd,KACJ,0FAWI,KACJ,oRAGI,KAAS,UAaT,KACJ,qIAGI,KACJ,qGAQI,KACJ,gVAGI,KACJ,0LAMI,KACJ,kOAMI,KACJ,sJAGI,KACJ,6JAGI,KAAW,IAEX,KAAY;AAWlB,SAAS,GAAY,GAAoC;AACvD,QAAM,CAAC,GAAM,CAAA,IAAW,EAAS;AAAA,IAAE,MAAM;AAAA,IAAM,OAAO;AAAA,EAAK,CAAC,GACtD,IAAU,EAAO;AAAA,IAAE,MAAM;AAAA,IAAG,MAAM;AAAA,IAAG,OAAO;AAAA,EAAE,CAAC;AACrD,SAAA,GAAA,MAAsB;AACpB,UAAM,IAAO,EAAI;AACjB,QAAI,KAAQ,KAAM;AAClB,UAAM,IAAA,MAAgB;AACpB,MAAA,EAAQ,QAAQ,OAAO,EAAK;AAC5B,YAAM,IAAO,EAAK,cAA2B,mBAAmB;AAChE,MAAI,KAAQ,SAAM,EAAQ,QAAQ,OAAO,EAAK;AAC9C,YAAM,IAAQ,EAAK,cAA2B,oBAAoB;AAClE,MAAI,KAAS,SAAM,EAAQ,QAAQ,QAAQ,EAAM;AACjD,YAAM,IACJ,WAAW,iBAAiB,SAAS,eAAe,EAAE,QAAQ,KAAK,IAC/D,IAAQ,EAAK,sBAAsB,EAAE,OACrC,IAAO;AAAA,QACX,MAAM,KAAS,KAAW;AAAA,QAC1B,OAAO,KAAS,KAAY;AAAA,MAC9B;AACA,MAAA,EAAA,CAAS,MACP,EAAQ,SAAS,EAAK,Q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ACF,UAAA;AAAA,MAEK,CAAA,CACA;AAAA;EAEA,GA/BN,QA+BM;AAGd,SACE,gBAAA,EAAC,OAAD;AAAA,IAEE,MAAK;AAAA,IACL,aAAW,KAAW;AAAA,IACtB,cAAW;AAAA,IACX,aAAW,IAAO,KAAK;AAAA,IACvB,aAAW,KAAO,KAAK;AAAA,IACvB,cAAY,KAAQ,KAAK;AAAA,IACzB,WAAW,EAAG,IAAe,EAAS;AAAA,IACtC,GAAI;AAAA,IACJ,KAAA,CAAM,MAAgC;AACpC,MAAA,GAAQ,UAAU,GACd,OAAO,KAAQ,aAAY,EAAI,CAAI,IAC9B,KAAO,SAAM,EAAI,UAAU;AAAA,IACtC;AAAA,IAdF,UAAA,CAqBE,gBAAA,EAAC,GAAD;AAAA,MAAiB,SAAS;AAAA,MAAO,MAAK;AAAA,MACnC,UAAA,IAAO,KAAS;AAAA,IACF,CAAA,GACjB,gBAAA,EAAC,EAAQ,MAAT;AAAA,MACU,QAAA;AAAA,MACR,cAAA,CAAe,GAAM,MAAY;AAE/B,QAAI,KAAQ,CAAC,GAAU,EAAQ,OAAO,MAAM,KAAG,EAAQ,OAAO;AAAA,MAChE;AAAA,MAEE,UAAA,CAAA,EAAE,SAAA,EAAA,MACF,gBAAA,EAAC,EAAQ,QAAT,EAAA,UACE,gBAAA,EAAC,EAAQ,YAAT;AAAA,QAAoB,MAAK;AAAA,QAAM,OAAM;AAAA,QACnC,UAAA,gBAAA,EAAC,EAAQ,OAAT;AAAA,UAAe,WAAU;AAAA,UACtB,UAAA;AAAA,QACY,CAAA;AAAA,MACG,CAAA,EACN,CAAA;AAAA,IAEN,CAAA,CACX;AAAA;AAET;AAEA,GAAM,cAAc"}
|
package/dist/index.js
CHANGED
|
@@ -11,13 +11,13 @@ 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,
|
|
|
11
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 } from "./chunks/error-D5SzZ0ev.js";
|
|
12
12
|
import { t as ia } from "./chunks/chat-Bu8UyIbT.js";
|
|
13
13
|
import { A as Ea, B as _a, C as na, D as ma, E as Aa, F as Ia, I as Ta, L as pa, M as Ra, N as la, O as Ca, P as ua, R as Ba, S as fa, T as Na, V as La, _ as Pa, a as ca, b as Da, c as Oa, d as da, f as Va, g as ga, h as ha, i as Ga, j as Ua, k as Ma, l as ba, m as Fa, n as va, o as ka, p as wa, r as Wa, s as ya, t as Ha, u as Ka, v as xa, w as za, x as Xa, y as Ya, z as Za } from "./chunks/trace-DyjsBY-S.js";
|
|
14
|
-
import { a as Ja, c as Qa, d as qa, i as $a, l as as, n as ss, o as ts, r as rs, s as os, t as es, u as is } from "./chunks/code-block-
|
|
14
|
+
import { a as Ja, c as Qa, d as qa, i as $a, l as as, n as ss, o as ts, r as rs, s as os, t as es, u as is } from "./chunks/code-block-DekLMMtV.js";
|
|
15
15
|
import { n as Es, t as _s } from "./chunks/date-picker-CZbcNIe-.js";
|
|
16
|
-
import { n as ms, t as As } from "./chunks/copy-button-
|
|
16
|
+
import { n as ms, t as As } from "./chunks/copy-button-BmGshaq9.js";
|
|
17
17
|
import { a as Ts, c as ps, d as Rs, i as ls, l as Cs, n as us, o as Bs, r as fs, s as Ns, t as Ls, u as Ps } from "./chunks/sidebar-BP39w1iA.js";
|
|
18
18
|
import { t as Ds } from "./chunks/input-fFWvPJOf.js";
|
|
19
|
-
import { i as ds, n as Vs, r as gs, t as hs } from "./chunks/filter-bar-
|
|
20
|
-
import { i as Us } from "./chunks/data-table-
|
|
19
|
+
import { i as ds, n as Vs, r as gs, t as hs } from "./chunks/filter-bar-BCiaO1gO.js";
|
|
20
|
+
import { i as Us } from "./chunks/data-table-T4QKnrxQ.js";
|
|
21
21
|
import { n as bs, t as Fs } from "./chunks/stat-hnNqjWVG.js";
|
|
22
22
|
import { t as ks } from "./chunks/calendar-4OFiCLAv.js";
|
|
23
23
|
import { t as Ws } from "./chunks/close-button-GvqWbLl0.js";
|
|
@@ -25,8 +25,8 @@ import { t as Hs } from "./chunks/input-group-fc9_jD4d.js";
|
|
|
25
25
|
import { n as xs, t as zs } from "./chunks/card-N-tvFsuV.js";
|
|
26
26
|
import { n as Ys, t as Zs } from "./chunks/dialog-12foDiQb.js";
|
|
27
27
|
import { i as Js, n as Qs, r as qs, t as $s } from "./chunks/status-view-C8tabjDu.js";
|
|
28
|
-
import { t as st } from "./chunks/description-list-
|
|
29
|
-
import { a as rt, c as ot, d as et, f as it, i as St, l as Et, m as _t, n as nt, o as mt, p as At, r as It, s as Tt, t as pt, u as Rt } from "./chunks/basic-page-
|
|
28
|
+
import { t as st } from "./chunks/description-list-BRRQ0oF6.js";
|
|
29
|
+
import { a as rt, c as ot, d as et, f as it, i as St, l as Et, m as _t, n as nt, o as mt, p as At, r as It, s as Tt, t as pt, u as Rt } from "./chunks/basic-page-Bfcda8w5.js";
|
|
30
30
|
import { a as Ct, i as ut, n as Bt, o as ft, r as Nt, s as Lt, t as Pt } from "./chunks/chart-PPuzbeXN.js";
|
|
31
31
|
import "./components/chart.js";
|
|
32
32
|
import { t as Ot } from "./chunks/bar-chart-B-c6dujU.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { i as s } from "../chunks/data-table-
|
|
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-
|
|
2
|
+
import { i as s } from "../chunks/data-table-T4QKnrxQ.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-Bfcda8w5.js";
|
|
4
4
|
export {
|
|
5
5
|
D as AUTO_SAVE_DELAY_MS,
|
|
6
6
|
B as BASIC_PAGE_CALLOUT,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, Ref } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Size axis — a square ghost control that sits inside a row or a panel
|
|
4
4
|
* header. `sm` is the default: a 28px target beside 13px mono text.
|
|
@@ -21,6 +21,15 @@ export type CopyButtonSize = keyof typeof COPY_BUTTON_SIZES;
|
|
|
21
21
|
interface CopyButtonBaseProps {
|
|
22
22
|
/** The text that goes to the clipboard. */
|
|
23
23
|
value: string;
|
|
24
|
+
/**
|
|
25
|
+
* The view of the value, before the button: anything (the id as text,
|
|
26
|
+
* a masked key, a number beside its flag). A click on it copies too,
|
|
27
|
+
* the way a `<label>` presses its control; the button stays the one
|
|
28
|
+
* tab stop and the accessible name. The view sets a default type (the
|
|
29
|
+
* mono face, `xs`, primary ink, one truncating line); what you put in
|
|
30
|
+
* sets its own and wins.
|
|
31
|
+
*/
|
|
32
|
+
children?: ReactNode;
|
|
24
33
|
/**
|
|
25
34
|
* What is being copied, for the accessible name — "request id",
|
|
26
35
|
* "API key". Read as `Copy {label}`, then `{label} copied`.
|
|
@@ -33,16 +42,18 @@ interface CopyButtonBaseProps {
|
|
|
33
42
|
onCopied?: (value: string) => void;
|
|
34
43
|
ref?: Ref<HTMLButtonElement>;
|
|
35
44
|
}
|
|
36
|
-
export interface CopyButtonProps extends CopyButtonBaseProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof CopyButtonBaseProps
|
|
45
|
+
export interface CopyButtonProps extends CopyButtonBaseProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof CopyButtonBaseProps> {
|
|
37
46
|
}
|
|
38
47
|
/**
|
|
39
48
|
* Copy Button — the one copy affordance: a quiet icon button that writes
|
|
40
49
|
* `value` to the clipboard, swaps its glyph to a check for a moment, and
|
|
41
50
|
* says "Copied" to assistive tech through a polite live region. Ghost at
|
|
42
51
|
* rest so a mono value stays the loudest thing on its line; the wash and
|
|
43
|
-
* the ink lift on hover.
|
|
52
|
+
* the ink lift on hover. Pass a view of the value as `children` and it
|
|
53
|
+
* renders before the button, a click target too; the glyph then rests in
|
|
54
|
+
* description ink, and the wash lifts over either.
|
|
44
55
|
*/
|
|
45
|
-
export declare function CopyButton({ value, label, size, onCopied, className, onClick, ...props }: CopyButtonProps): import("react").JSX.Element;
|
|
56
|
+
export declare function CopyButton({ value, children, label, size, onCopied, className, onClick, ...props }: CopyButtonProps): import("react").JSX.Element;
|
|
46
57
|
export declare namespace CopyButton {
|
|
47
58
|
var displayName: string;
|
|
48
59
|
}
|
|
@@ -33,8 +33,9 @@ export interface DescriptionListItemProps extends Omit<ComponentProps<"div">, "c
|
|
|
33
33
|
/** The value in the mono face — ids, keys, addresses. */
|
|
34
34
|
mono?: boolean;
|
|
35
35
|
/**
|
|
36
|
-
* A copy control after the value
|
|
37
|
-
* pass the text to copy when the
|
|
36
|
+
* A copy control after the value, and a click on the value copies
|
|
37
|
+
* too. `true` copies a string `value`; pass the text to copy when the
|
|
38
|
+
* value is composed.
|
|
38
39
|
*/
|
|
39
40
|
copy?: boolean | string;
|
|
40
41
|
/** Marks the label `(Optional)` — a fact that may not be there. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Menu, useMenuPending, MENU_POPUP, MENU_ITEM, MENU_ITEM_COLORS, type MenuItemColor, type MenuItemProps, } from './menu';
|
|
1
|
+
export { Menu, useMenuPending, MENU_BLINK_MS, MENU_POPUP, MENU_ITEM, MENU_ITEM_COLORS, type MenuItemColor, type MenuItemProps, } from './menu';
|
|
@@ -23,6 +23,29 @@ type RootWithPendingProps = {
|
|
|
23
23
|
* (outside press, Escape) until the promise settles.
|
|
24
24
|
*/
|
|
25
25
|
export declare function withMenuPendingRoot<P extends RootWithPendingProps>(BaseRoot: ComponentType<P>): ComponentType<P>;
|
|
26
|
+
/** Each half of a row's confirm blink: its wash off, then back on. */
|
|
27
|
+
export declare const MENU_BLINK_MS = 90;
|
|
28
|
+
/**
|
|
29
|
+
* The chosen row blinks before the menu closes, as on macOS: its wash
|
|
30
|
+
* goes off for `MENU_BLINK_MS`, comes back for as long, and then the
|
|
31
|
+
* press goes through — the action runs, the menu closes, a link
|
|
32
|
+
* navigates. It confirms the press landed on the right row, where most
|
|
33
|
+
* web menus close on the same frame. `blinks` is whether this row's
|
|
34
|
+
* press ends the menu (an item that closes on click, a link); a row
|
|
35
|
+
* that leaves the menu open, or a modified click (a link to a new tab),
|
|
36
|
+
* goes through at once. The menu holds through the blink: no dismissal,
|
|
37
|
+
* no second press.
|
|
38
|
+
*
|
|
39
|
+
* `intercept` goes first in the row's click handler and returns true
|
|
40
|
+
* when it took the press. Spread `data-blink` on the row: `MENU_ITEM`
|
|
41
|
+
* drops the wash while it is set.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useMenuItemBlink(blinks: boolean): {
|
|
44
|
+
intercept: (event: ReactMouseEvent<HTMLElement>) => boolean;
|
|
45
|
+
blinkProps: {
|
|
46
|
+
"data-blink": true | undefined;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
26
49
|
export type AsyncMenuItemClick = (event: ReactMouseEvent<HTMLElement>) => void | Promise<unknown>;
|
|
27
50
|
/**
|
|
28
51
|
* Shared click handler for `Menu.Item` / `ContextMenu.Item` promise support.
|
|
@@ -37,6 +60,9 @@ export declare function useAsyncMenuItem({ onClick, closeOnClick, loading, disab
|
|
|
37
60
|
inert: boolean;
|
|
38
61
|
blocked: boolean;
|
|
39
62
|
handleClick: (event: ReactMouseEvent<HTMLElement>) => void;
|
|
63
|
+
blinkProps: {
|
|
64
|
+
"data-blink": true | undefined;
|
|
65
|
+
};
|
|
40
66
|
};
|
|
41
67
|
/** Menu-row spinner — keeps `data-menu-spinner` for the hide-siblings CSS. */
|
|
42
68
|
export declare function MenuItemSpinner(): import("react").JSX.Element;
|
|
@@ -654,10 +654,20 @@ export interface BasicPageRowProps extends Omit<ComponentProps<"div">, "title" |
|
|
|
654
654
|
* controls that sit under the label.
|
|
655
655
|
*/
|
|
656
656
|
declare function Row({ label, description, htmlFor, stacked, className, children, ...props }: BasicPageRowProps): import("react").JSX.Element;
|
|
657
|
-
|
|
658
|
-
|
|
657
|
+
export interface BasicPageValueProps extends ComponentProps<"p"> {
|
|
658
|
+
/** The value in the mono face — ids, numbers, addresses. */
|
|
659
|
+
mono?: boolean;
|
|
660
|
+
/**
|
|
661
|
+
* The value copies itself: a click on it, or on the copy control after
|
|
662
|
+
* it, writes it to the clipboard. `true` copies string `children`; pass
|
|
663
|
+
* the text to copy when the value is composed. The control is named
|
|
664
|
+
* for the row's label, as written ("Copy Resource ID").
|
|
665
|
+
*/
|
|
666
|
+
copy?: boolean | string;
|
|
659
667
|
ref?: Ref<HTMLParagraphElement>;
|
|
660
|
-
}
|
|
668
|
+
}
|
|
669
|
+
/** Read-only value on the right side of a row (email, an id). */
|
|
670
|
+
declare function Value({ className, mono, copy, children, ...props }: BasicPageValueProps): import("react").JSX.Element;
|
|
661
671
|
export interface BasicPageReceiptProps extends ComponentProps<"ul"> {
|
|
662
672
|
/**
|
|
663
673
|
* What the receipt says with nothing on it, in the card's place for the
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { BasicPage, formToasts, AUTO_SAVE_DELAY_MS, useCondense, useAutoSave, type BasicPageCondense, BASIC_PAGE_CARD, CONDENSE_BAR_ENTER, CONDENSE_BAR_TRAVEL, CONDENSE_BAR_RISE_PX, BASIC_PAGE_CALLOUT, BASIC_PAGE_ROW, BASIC_PAGE_ITEM, BASIC_PAGE_ITEM_PANEL, BASIC_PAGE_ITEM_PANEL_DIVIDED, type BasicPageRootProps, type BasicPageColumnsProps, type BasicPageAsideProps, type BasicPageAsideWidth, type BasicPageAsidePresentation, type BasicPageRowProps, type BasicPageRowLinkProps, type BasicPageBackProps, type BasicPageBreadcrumbsProps, type BasicPageCrumbProps, type BasicPageFooterProps, type BasicPageFormProps, type BasicPageFormErrors, type BasicPageItemPanelProps, type BasicPageOnboardProps, type BasicPageStepProps, type BasicPageTitleAccessoryProps, type BasicPageCheckProps, type BasicPageCheckState, type BasicPageTimelineItemProps, type BasicPageReceiptProps, type BasicPageReceiptGroupProps, type BasicPageReceiptLineProps, type BasicPageReceiptTotalProps, } from './basic-page';
|
|
1
|
+
export { BasicPage, formToasts, AUTO_SAVE_DELAY_MS, useCondense, useAutoSave, type BasicPageCondense, BASIC_PAGE_CARD, CONDENSE_BAR_ENTER, CONDENSE_BAR_TRAVEL, CONDENSE_BAR_RISE_PX, BASIC_PAGE_CALLOUT, BASIC_PAGE_ROW, BASIC_PAGE_ITEM, BASIC_PAGE_ITEM_PANEL, BASIC_PAGE_ITEM_PANEL_DIVIDED, type BasicPageRootProps, type BasicPageColumnsProps, type BasicPageAsideProps, type BasicPageAsideWidth, type BasicPageAsidePresentation, type BasicPageRowProps, type BasicPageValueProps, type BasicPageRowLinkProps, type BasicPageBackProps, type BasicPageBreadcrumbsProps, type BasicPageCrumbProps, type BasicPageFooterProps, type BasicPageFormProps, type BasicPageFormErrors, type BasicPageItemPanelProps, type BasicPageOnboardProps, type BasicPageStepProps, type BasicPageTitleAccessoryProps, type BasicPageCheckProps, type BasicPageCheckState, type BasicPageTimelineItemProps, type BasicPageReceiptProps, type BasicPageReceiptGroupProps, type BasicPageReceiptLineProps, type BasicPageReceiptTotalProps, } from './basic-page';
|
|
2
2
|
export { createColumns, type DataTableColumn, type DataTableColumnMeta, type DataTableProps, type SortingState, } from '../../components/data-table';
|
|
3
3
|
export { type DescriptionListRootProps as BasicPageMetaProps, type DescriptionListItemProps as BasicPageMetaItemProps, type DescriptionListLayout as BasicPageMetaLayout, } from '../../components/description-list';
|