@photon-ai/pho-ui 4.11.0 → 4.12.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/animated-height-zr7BmFY1.js +56 -0
- package/dist/chunks/animated-height-zr7BmFY1.js.map +1 -0
- package/dist/chunks/basic-page-CJ11ekjH.js +2217 -0
- package/dist/chunks/basic-page-CJ11ekjH.js.map +1 -0
- package/dist/chunks/{chat-B0WIgEyM.js → chat-CU3XVm99.js} +2 -2
- package/dist/chunks/{chat-B0WIgEyM.js.map → chat-CU3XVm99.js.map} +1 -1
- package/dist/chunks/{checkbox-CLPmblNA.js → checkbox-CwvoEJhd.js} +2 -2
- package/dist/chunks/{checkbox-CLPmblNA.js.map → checkbox-CwvoEJhd.js.map} +1 -1
- package/dist/chunks/choice-card-_Ocs0iUj.js +17 -0
- package/dist/chunks/choice-card-_Ocs0iUj.js.map +1 -0
- package/dist/chunks/{command-iYvU6Mhf.js → command-D5g49VqR.js} +3 -3
- package/dist/chunks/{command-iYvU6Mhf.js.map → command-D5g49VqR.js.map} +1 -1
- package/dist/chunks/{data-table-B1dmrN6r.js → data-table-Ce_c6T73.js} +3 -3
- package/dist/chunks/{data-table-B1dmrN6r.js.map → data-table-Ce_c6T73.js.map} +1 -1
- package/dist/chunks/{dialog-MPvem7yV.js → dialog-ChS0tdHa.js} +120 -116
- package/dist/chunks/dialog-ChS0tdHa.js.map +1 -0
- package/dist/chunks/{filter-bar-B-oYYBsU.js → filter-bar-CMkvhvgL.js} +2 -2
- package/dist/chunks/{filter-bar-B-oYYBsU.js.map → filter-bar-CMkvhvgL.js.map} +1 -1
- package/dist/chunks/{input-DjvZoF8v.js → input-fFWvPJOf.js} +2 -1
- package/dist/chunks/{input-DjvZoF8v.js.map → input-fFWvPJOf.js.map} +1 -1
- package/dist/components/chat.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/field.js +34 -29
- package/dist/components/field.js.map +1 -1
- package/dist/components/filter-bar.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/radio-group.js +64 -59
- package/dist/components/radio-group.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/sections/basic-page.js +2 -2
- package/dist/src/components/dialog/dialog.d.ts +9 -1
- package/dist/src/components/field/field.d.ts +11 -1
- package/dist/src/components/radio-group/radio-card.d.ts +11 -4
- package/dist/src/sections/basic-page/basic-page.d.ts +145 -15
- package/dist/src/sections/basic-page/index.d.ts +1 -1
- package/dist/src/utils/animated-height.d.ts +16 -7
- package/dist/src/utils/choice-card.d.ts +8 -1
- package/package.json +1 -1
- package/dist/chunks/animated-height-I44sUq0n.js +0 -48
- package/dist/chunks/animated-height-I44sUq0n.js.map +0 -1
- package/dist/chunks/basic-page-B5FsORRi.js +0 -1885
- package/dist/chunks/basic-page-B5FsORRi.js.map +0 -1
- package/dist/chunks/choice-card-BVNP1NB6.js +0 -17
- package/dist/chunks/choice-card-BVNP1NB6.js.map +0 -1
- package/dist/chunks/dialog-MPvem7yV.js.map +0 -1
|
@@ -6,8 +6,8 @@ import { SPRING_ENTRANCE as xe } from "../motion.js";
|
|
|
6
6
|
import { t as Se } from "./createReactComponent-BqCmnqfX.js";
|
|
7
7
|
import { t as ye } from "./IconChevronDown-CZilB71T.js";
|
|
8
8
|
import { t as we } from "./IconChevronUp-CrpWSgIl.js";
|
|
9
|
-
import { t as Ce } from "./animated-height-
|
|
10
|
-
import { r as W } from "./checkbox-
|
|
9
|
+
import { t as Ce } from "./animated-height-zr7BmFY1.js";
|
|
10
|
+
import { r as W } from "./checkbox-CwvoEJhd.js";
|
|
11
11
|
import { t as Ne } from "./skeleton-DwjSl4vC.js";
|
|
12
12
|
import { a as X, i as ve, n as Ae, r as Fe, t as Te } from "./ghost-search-CNVs9k1o.js";
|
|
13
13
|
import { Fragment as _e, createContext as ee, useContext as Y, useEffect as Ee, useLayoutEffect as Z, useMemo as Re, useState as L, useSyncExternalStore as De } from "react";
|
|
@@ -289,4 +289,4 @@ export {
|
|
|
289
289
|
wt as t
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
-
//# sourceMappingURL=data-table-
|
|
292
|
+
//# sourceMappingURL=data-table-Ce_c6T73.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table-B1dmrN6r.js","names":[],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.46.0_react@19.2.8/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs","../../src/components/data-table/data-table.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.46.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M8 9l4 -4l4 4\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M16 15l-4 4l-4 -4\", \"key\": \"svg-1\" }]];\nconst IconSelector = createReactComponent(\"outline\", \"selector\", \"Selector\", __iconNode);\n\nexport { __iconNode, IconSelector as default };\n//# sourceMappingURL=IconSelector.mjs.map\n","import {\n createContext,\n Fragment,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useState,\n useSyncExternalStore,\n type ComponentProps,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport {\n columnFilteringFeature,\n createColumnHelper,\n createFilteredRowModel,\n createSortedRowModel,\n filterFn_includesString,\n FlexRender,\n globalFilteringFeature,\n rowSelectionFeature,\n rowSortingFeature,\n sortFn_alphanumeric,\n sortFn_basic,\n sortFn_datetime,\n sortFn_text,\n tableFeatures,\n useTable,\n type ColumnDef,\n type RowData,\n type SortingState,\n} from \"@tanstack/react-table\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconSelector,\n} from \"@tabler/icons-react\";\nimport { Skeleton } from \"../skeleton\";\nimport {\n DATA_TABLE_BODY,\n DATA_TABLE_HEADER_CELL,\n DATA_TABLE_SURFACE,\n DATA_TABLE_TEXT,\n} from \"./chrome\";\nimport { Checkbox } from \"../checkbox\";\nimport { SPRING_ENTRANCE } from \"../../motion\";\nimport { AnimatedHeight } from \"../../utils/animated-height\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\n\n/**\n * DataTable — a table of records with column semantics: sortable headers,\n * aligned cells, rows that are links into a subpage. TanStack Table (v9)\n * does the thinking — column defs, sorting, row identity — and renders\n * nothing; every pixel here is Pho's.\n *\n * Design notes:\n * - The surface is `BasicPage.Card`'s: hairline border, `base` radius, the\n * page's primary fill, hairline rules between rows. A table is a card of\n * rows that happen to line up in columns, so it sits in a page's `Stack`\n * as any card does.\n * - Header cells are description ink at body size — never small caps, never\n * bold. Hierarchy comes from ink alone; the header is a label row, not a\n * banner.\n * - A sortable header is a button inside the cell: the label and its\n * indicator (`IconSelector` at rest, a chevron once sorted). `aria-sort`\n * sits on the `th`.\n * - Rows that navigate stretch one link across the row (the first cell's\n * link, extended with a pseudo-element), so the whole row is one target\n * for pointer and one stop for keyboard. Hover washes the row; the row\n * whose page is open beside the table (`current`) keeps the wash — the\n * same cue `BasicPage.RowLink` gives under `aria-current`.\n * - Numbers align to the end with tabular figures (`meta.align: \"end\"`).\n * - `search` is one box over every column — plain contains matching, and\n * the body says when nothing matches. In a page, `BasicPage.Search` in\n * the section header adopts the box; alone, the table keeps one in a\n * toolbar row inside its frame. Server-side search keeps its own box\n * outside.\n * - A wide table scrolls sideways inside its own frame; the page never does.\n * `contain: inline-size` keeps the table's intrinsic width out of the\n * page's — a host that sizes to content (a scroll area's fit-content\n * pane, a grid's auto column) would otherwise grow to the widest row.\n * Left with no width of its own, the frame takes its container's\n * (`w-full`); a shrink-to-fit host (a flex row) would collapse it.\n * `layout=\"fixed\"` is the other way out: columns size from the frame,\n * and a long cell truncates instead of stretching the table.\n *\n * Reach for it when a list needs column semantics — sorting, aligned\n * figures, several fields side by side. A list where each row is one\n * label and a chevron stays `BasicPage.RowLink`.\n */\n\n/** Column metadata a `DataTable` understands. */\nexport interface DataTableColumnMeta {\n /** Cell alignment — `end` for figures (right-aligned, tabular). */\n align?: \"start\" | \"end\";\n /**\n * Extra classes on every `th` and `td` in this column. With\n * `layout=\"fixed\"`, size a short column here (`w-24`) and leave the\n * flexible ones unsaid — they share what remains. Prefer this over\n * `nth-child` width hacks on the table's `className`.\n */\n className?: string;\n}\n\n/**\n * The feature set every `DataTable` runs on — sorting with the stock sort\n * functions, the column meta above. Fixed, so column definitions written\n * once fit every table.\n */\nconst features = tableFeatures({\n rowSortingFeature,\n rowSelectionFeature,\n columnFilteringFeature,\n globalFilteringFeature,\n sortedRowModel: createSortedRowModel(),\n filteredRowModel: createFilteredRowModel(),\n filterFns: { includesString: filterFn_includesString },\n sortFns: {\n alphanumeric: sortFn_alphanumeric,\n basic: sortFn_basic,\n datetime: sortFn_datetime,\n text: sortFn_text,\n },\n columnMeta: {} as DataTableColumnMeta,\n});\n\nexport type DataTableFeatures = typeof features;\n\n/** Body row height — the header keeps its own `h-10` on every size. */\nexport const DATA_TABLE_SIZES = {\n sm: {\n classes: \"h-10\",\n description: \"Small — 40px at 13px; the header's height, for dense lists\",\n },\n base: {\n classes: \"h-12\",\n description: \"Base — 48px at 14px; one line of body type\",\n },\n lg: {\n classes: \"h-14\",\n description:\n \"Large — 56px at 16px; two-line cells (a number and a caption)\",\n },\n} satisfies VariantMap;\n\nexport type DataTableSize = keyof typeof DATA_TABLE_SIZES;\n\n/** A column definition for a `DataTable` of `TData` rows. */\nexport type DataTableColumn<\n TData extends RowData,\n TValue = unknown,\n> = ColumnDef<DataTableFeatures, TData, TValue>;\n\n/**\n * The column helper, bound to the table's feature set — `accessor`,\n * `display`, `group`, and `columns` to collect them with their types\n * intact.\n *\n * @example\n * const col = createColumns<Request>();\n * const columns = col.columns([\n * col.accessor(\"actor\", { header: \"Actor\" }),\n * col.accessor(\"amount\", { header: \"Amount\", meta: { align: \"end\" } }),\n * ]);\n */\nexport function createColumns<TData extends RowData>() {\n return createColumnHelper<DataTableFeatures, TData>();\n}\n\n/**\n * The leading checkbox column selection adds. The header checkbox works\n * the visible set: everything the search still shows toggles together,\n * while rows selected earlier and then hidden stay selected.\n */\nconst SELECT_COLUMN = createColumns<RowData>().display({\n id: \"select\",\n enableSorting: false,\n header: ({ table }) => {\n const visible = table.getRowModel().rows;\n const chosen = visible.filter((row) => row.getIsSelected()).length;\n const all = visible.length > 0 && chosen === visible.length;\n return (\n <Checkbox\n size=\"sm\"\n aria-label=\"Select all\"\n checked={all}\n indeterminate={chosen > 0 && !all}\n onCheckedChange={(checked) => {\n table.setRowSelection((old) => {\n const next = { ...old };\n for (const row of visible) {\n if (checked === true) next[row.id] = true;\n else delete next[row.id];\n }\n return next;\n });\n }}\n />\n );\n },\n cell: ({ row }) => (\n <Checkbox\n size=\"sm\"\n aria-label=\"Select row\"\n checked={row.getIsSelected()}\n onCheckedChange={(checked) => row.toggleSelected(checked === true)}\n />\n ),\n});\n\nexport interface DataTableProps<TData extends RowData> extends Omit<\n ComponentProps<\"div\">,\n \"children\"\n> {\n columns: ReadonlyArray<DataTableColumn<TData, any>>;\n data: ReadonlyArray<TData>;\n /**\n * A row's identity — what `current` is matched against, and what keeps a\n * row itself across sorts. Defaults to the row's `id` field, else its\n * index.\n */\n getRowId?: (row: TData) => string;\n /**\n * Rows that navigate: each row is one link into a subpage, through the\n * host's `LinkProvider`. Beside a `BasicPage.Aside`, the subpage opens\n * next to the table. Return nothing for a row with no page yet (one\n * still in flight) and that row stays plain.\n */\n rowHref?: (row: TData) => string | null | undefined;\n /**\n * A click on the row (not on a link, button, or other control). The\n * table still activates `rowHref` unless the handler calls\n * `preventDefault`.\n */\n onRowClick?: (\n row: TData,\n event: MouseEvent<HTMLTableRowElement> | KeyboardEvent<HTMLTableRowElement>,\n ) => void;\n /** The row whose page is open (its id) — it keeps the wash. */\n current?: string | null;\n /**\n * Sorting is on for every accessor column (`enableSorting: false` on a\n * column turns it off there). Uncontrolled by default; `defaultSort`\n * seeds it. Pass `sort` with `onSortChange` to own it — the way to sort\n * on the server.\n */\n defaultSort?: SortingState;\n sort?: SortingState;\n onSortChange?: (sort: SortingState) => void;\n /**\n * A search box on the table — `true`, or the placeholder it should\n * show. One box searches every column (a column opts out with\n * `enableGlobalFilter: false`); matching is a plain case-insensitive\n * contains, on the client. With no matches the body says so. When the\n * list doesn't all come down, keep the box outside and ask the server.\n */\n search?: boolean | string;\n /**\n * Controls in the frame's top band — a `BasicPage.Search` first, then a\n * filter or two. The band is part of the table (one surface, a hairline\n * above the header row), so nothing floats over the page and the\n * spacing above and below is the frame's own. A `Search` here adopts\n * the table's box the way a header one does.\n */\n toolbar?: ReactNode;\n /**\n * Row selection: hand either of these and rows grow a leading checkbox\n * column. The header checkbox works the visible set — everything the\n * search still shows — so select-all after a search means what it says;\n * rows selected earlier and then hidden stay selected. `selected` is\n * the selected ids (ids come from `getRowId`; pair with\n * `onSelectedChange` to own the state); `onSelectedChange` alone\n * listens while the table keeps it. The page renders its own bulk\n * actions from the ids — the table only keeps the score.\n */\n selected?: readonly string[];\n onSelectedChange?: (ids: string[]) => void;\n /**\n * File rows into labeled groups: return a label and the row renders\n * under it, `null` and it stays in the main body. Groups follow the\n * main body, in the order their labels first appear in `data`, each\n * under a quiet label row — and only while they have rows, so a group\n * a search empties simply leaves. Sorting orders rows within their\n * group.\n */\n group?: (row: TData) => string | null;\n /**\n * Glide the frame's height when the rows change — a search narrowing,\n * a filter, bones becoming rows. The height follows the content on the\n * page spring instead of jumping; reserve it for tables whose rows\n * change while mounted (same contract as `BasicPage.Card`'s).\n */\n animateHeight?: boolean;\n /** Bones while the rows are on their way — `true` for five, or a count. */\n loading?: boolean | number;\n /** What the body says when there are no rows. */\n empty?: ReactNode;\n /**\n * How columns take width. `auto` (the default) sizes them from their\n * content — a long cell grows the table and the frame scrolls sideways.\n * `fixed` sizes them from the table's width (`table-layout: fixed`):\n * short columns take a width hint on `meta.className`, the rest share\n * what remains, and cells get `min-w-0` so an inner `truncate` can\n * shrink. `width: 0` (`w-0`) is not a content-size hint here — fixed\n * layout treats it as a real zero — so give a short column a real\n * width (`w-24`) rather than the auto-layout shrink-wrap trick.\n */\n layout?: \"auto\" | \"fixed\";\n /**\n * Body row height and the type that comes with it. `base` (the default)\n * is 48px rows at 14px — one line of body type. `sm` is 40px at 13px,\n * the header's own height, for a dense list scanned more than read.\n * `lg` is 56px at 16px, for a two-line cell (a number and a caption)\n * that would crowd `base`. The header row keeps its 40px on every size\n * and follows the type.\n */\n size?: DataTableSize;\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * A host that sizes itself around tables provides this; each table\n * announces itself while mounted. `BasicPage.Root` runs wide when the\n * page carries one and `width` was left unsaid.\n */\nexport const TableHostContext = createContext<\n ((present: boolean) => void) | null\n>(null);\n\n/** A searchable table's search, published for a header to adopt. */\nexport interface TableSearchApi {\n placeholder: string;\n query: string;\n setQuery: (query: string) => void;\n /** Rows still showing after the current query. */\n matched: number;\n /** Rows in the list, before search. */\n total: number;\n}\n\ninterface TableSearchState {\n api: TableSearchApi | null;\n adopted: boolean;\n}\n\n/**\n * The channel between a searchable table and a `BasicPage.Search` placed\n * in a section header: the table publishes its search (placeholder,\n * query, the setter); a mounted `Search` adopts it, and the table's own\n * box yields. Provided by `BasicPage.Root`; a table outside any page\n * keeps its built-in box. One searchable table per page — a later\n * publisher takes the slot.\n */\nexport interface TableSearchStore {\n get: () => TableSearchState;\n subscribe: (listener: () => void) => () => void;\n publish: (api: TableSearchApi | null) => void;\n adopt: (adopted: boolean) => void;\n}\n\nexport function createTableSearchStore(): TableSearchStore {\n let state: TableSearchState = { api: null, adopted: false };\n const listeners = new Set<() => void>();\n const emit = () => {\n for (const listener of listeners) listener();\n };\n return {\n get: () => state,\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n publish(api) {\n state = { ...state, api };\n emit();\n },\n adopt(adopted) {\n state = { ...state, adopted };\n emit();\n },\n };\n}\n\nexport const TableSearchContext = createContext<TableSearchStore | null>(null);\n\nconst subscribeToNothing = () => () => {};\n\nexport { GhostSearch, type GhostSearchProps } from \"../../utils/ghost-search\";\nimport { GhostSearch } from \"../../utils/ghost-search\";\n\nconst DEFAULT_BONES = 5;\n\nfunction defaultRowId(row: unknown, index: number): string {\n const id = (row as { id?: unknown } | null)?.id;\n return typeof id === \"string\" || typeof id === \"number\"\n ? String(id)\n : String(index);\n}\n\n/** Controls keep their own click; the row only navigates from empty surface. */\nconst ROW_NAV_IGNORE = \"a, button, input, textarea, select, label\";\n\nfunction shouldIgnoreRowNav(target: EventTarget | null): boolean {\n return target instanceof Element && target.closest(ROW_NAV_IGNORE) != null;\n}\n\nfunction activateRowHref(event: MouseEvent<HTMLTableRowElement>, href: string) {\n const newTab =\n event.button === 1 || event.metaKey || event.ctrlKey || event.shiftKey;\n if (event.button === 1) event.preventDefault();\n if (event.button !== 0 && event.button !== 1) return;\n if (newTab) {\n window.open(href, \"_blank\", \"noopener,noreferrer\");\n return;\n }\n event.currentTarget.querySelector<HTMLAnchorElement>(\"a[href]\")?.click();\n}\n\nfunction DataTable<TData extends RowData>({\n columns,\n data,\n getRowId,\n rowHref,\n onRowClick,\n current,\n selected,\n onSelectedChange,\n defaultSort,\n sort,\n onSortChange,\n search,\n toolbar,\n group,\n animateHeight,\n loading,\n empty = \"Nothing here yet.\",\n layout = \"auto\",\n size = \"base\",\n className,\n ...props\n}: DataTableProps<TData>) {\n const fixed = layout === \"fixed\";\n const rowSize = resolveVariant(DATA_TABLE_SIZES, size);\n const rowText = DATA_TABLE_TEXT[size] ?? DATA_TABLE_TEXT.base;\n const Link = useLinkComponent();\n const announce = useContext(TableHostContext);\n const searching = search === true || typeof search === \"string\";\n const [query, setQuery] = useState(\"\");\n const placeholder = typeof search === \"string\" ? search : \"Search\";\n // A `BasicPage.Search` in a section header adopts the box; the table\n // then renders no toolbar of its own.\n const searchStore = useContext(TableSearchContext);\n const adopted = useSyncExternalStore(\n searchStore?.subscribe ?? subscribeToNothing,\n () => searchStore?.get().adopted ?? false,\n () => false,\n );\n useLayoutEffect(() => {\n if (announce == null) return;\n announce(true);\n return () => announce(false);\n }, [announce]);\n const selecting = selected != null || onSelectedChange != null;\n const [ownSelection, setOwnSelection] = useState<Record<string, true>>({});\n const rowSelection: Record<string, true> =\n selected != null\n ? Object.fromEntries(selected.map((id) => [id, true as const]))\n : ownSelection;\n // Sorting mirrors selection: the component always owns a fallback state,\n // so `defaultSort` + `onSortChange` without `sort` still sorts — a custom\n // `onSortingChange` replaces the table's own updater entirely.\n const [ownSort, setOwnSort] = useState<SortingState>(defaultSort ?? []);\n const sorting: SortingState = sort ?? ownSort;\n const table = useTable<DataTableFeatures, TData>({\n features,\n columns: (selecting\n ? [SELECT_COLUMN as DataTableColumn<TData, any>, ...columns]\n : columns) as Array<DataTableColumn<TData, any>>,\n data: data as Array<TData>,\n getRowId: getRowId ? (row) => getRowId(row) : defaultRowId,\n // Keys only when meant: a present-but-undefined slice of `state` reads\n // as \"controlled, with nobody listening\".\n state: {\n sorting,\n ...(searching ? { globalFilter: query } : {}),\n ...(selecting ? { rowSelection } : {}),\n },\n ...(selecting\n ? {\n enableRowSelection: true,\n onRowSelectionChange: (\n updater:\n | Record<string, true>\n | ((old: Record<string, true>) => Record<string, true>),\n ) => {\n const next =\n typeof updater === \"function\" ? updater(rowSelection) : updater;\n if (selected == null) setOwnSelection(next);\n onSelectedChange?.(Object.keys(next));\n },\n }\n : {}),\n ...(searching\n ? {\n onGlobalFilterChange: setQuery,\n globalFilterFn: \"includesString\" as const,\n }\n : {}),\n onSortingChange: (\n updater: SortingState | ((prev: SortingState) => SortingState),\n ) => {\n const next = typeof updater === \"function\" ? updater(sorting) : updater;\n if (sort == null) setOwnSort(next);\n onSortChange?.(next);\n },\n });\n const rows = table.getRowModel().rows;\n const total = data.length;\n const matched = searching ? rows.length : total;\n useLayoutEffect(() => {\n if (!searching || searchStore == null) return;\n searchStore.publish({ placeholder, query, setQuery, matched, total });\n }, [searching, searchStore, placeholder, query, matched, total]);\n useEffect(() => {\n if (searchStore == null) return;\n return () => searchStore.publish(null);\n }, [searchStore]);\n const leafCount = table.getAllLeafColumns().length;\n const bones = useMemo(\n () =>\n loading\n ? Array.from({ length: loading === true ? DEFAULT_BONES : loading })\n : [],\n [loading],\n );\n\n const renderRow = (row: (typeof rows)[number]) => {\n const href = rowHref?.(row.original);\n const isCurrent = current != null && current === row.id;\n const navigable = href != null || onRowClick != null;\n const onActivate = (event: MouseEvent<HTMLTableRowElement>) => {\n if (event.button !== 0 && event.button !== 1) return;\n if (event.defaultPrevented || shouldIgnoreRowNav(event.target)) return;\n onRowClick?.(row.original, event);\n if (event.defaultPrevented || href == null) return;\n activateRowHref(event, href);\n };\n const onRowKeyDown = (event: KeyboardEvent<HTMLTableRowElement>) => {\n if (href != null) return;\n if (event.key !== \"Enter\" && event.key !== \" \") return;\n if (event.defaultPrevented || shouldIgnoreRowNav(event.target)) return;\n event.preventDefault();\n onRowClick?.(row.original, event);\n };\n return (\n <tr\n key={row.id}\n className={cn(\n navigable &&\n \"hover:bg-pho-primary-hover outline-pho-brand cursor-pointer transition-colors has-[a:focus-visible]:outline-2 has-[a:focus-visible]:-outline-offset-2\",\n (isCurrent || row.getIsSelected()) && \"bg-pho-primary-hover\",\n )}\n tabIndex={navigable && href == null ? 0 : undefined}\n onClick={navigable ? onActivate : undefined}\n onAuxClick={navigable ? onActivate : undefined}\n onKeyDown={navigable && href == null ? onRowKeyDown : undefined}\n >\n {row.getAllCells().map((cell, index) => {\n const align = cell.column.columnDef.meta?.align ?? \"start\";\n return (\n <td\n key={cell.id}\n className={cn(\n \"text-pho-primary px-5 align-middle whitespace-nowrap\",\n rowSize,\n fixed && \"min-w-0\",\n align === \"end\" && \"text-right tabular-nums\",\n cell.column.columnDef.meta?.className,\n )}\n >\n {/* The link lives in the first data cell; with selection on,\n cell 0 is the checkbox and must stay outside the anchor. */}\n {index === (selecting ? 1 : 0) && href != null ? (\n // One real link for keyboard and right-click; the row\n // click handler covers the rest of the surface.\n <Link\n href={href}\n aria-current={isCurrent ? \"page\" : undefined}\n className=\"outline-none\"\n >\n <FlexRender cell={cell} />\n </Link>\n ) : (\n <FlexRender cell={cell} />\n )}\n </td>\n );\n })}\n </tr>\n );\n };\n\n // Partition the (sorted, filtered) rows: the main body, then each\n // labeled group in the order labels first appear in `data`.\n let mainRows = rows;\n let groupSections: Array<[string, typeof rows]> = [];\n if (group != null) {\n mainRows = [];\n const byLabel = new Map<string, typeof rows>();\n const order: string[] = [];\n for (const item of data) {\n const label = group(item);\n if (label != null && !byLabel.has(label)) {\n byLabel.set(label, []);\n order.push(label);\n }\n }\n for (const row of rows) {\n const label = group(row.original);\n if (label == null) {\n mainRows.push(row);\n } else {\n if (!byLabel.has(label)) {\n byLabel.set(label, []);\n order.push(label);\n }\n byLabel.get(label)!.push(row);\n }\n }\n groupSections = order\n .map((label) => [label, byLabel.get(label)!] as [string, typeof rows])\n .filter(([, sectionRows]) => sectionRows.length > 0);\n }\n\n const grid = (\n <table\n className={cn(\"w-full border-collapse\", rowText, fixed && \"table-fixed\")}\n aria-busy={loading ? true : undefined}\n >\n <thead>\n {table.getHeaderGroups().map((headerGroup) => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map((header) => {\n const align = header.column.columnDef.meta?.align ?? \"start\";\n const sorted = header.column.getIsSorted();\n const sortable =\n !header.isPlaceholder && header.column.getCanSort();\n return (\n <th\n key={header.id}\n scope=\"col\"\n colSpan={header.colSpan}\n aria-sort={\n sorted === \"asc\"\n ? \"ascending\"\n : sorted === \"desc\"\n ? \"descending\"\n : undefined\n }\n className={cn(\n DATA_TABLE_HEADER_CELL,\n \"px-5\",\n fixed && \"min-w-0\",\n align === \"end\" && \"text-right\",\n header.column.columnDef.meta?.className,\n )}\n >\n {header.isPlaceholder ? null : sortable ? (\n <button\n type=\"button\"\n onClick={header.column.getToggleSortingHandler()}\n className={cn(\n \"group/sort outline-pho-brand hover:text-pho-primary -mx-1 inline-flex items-center gap-1 rounded-sm px-1 transition-colors focus-visible:outline-2\",\n align === \"end\" && \"flex-row-reverse\",\n sorted && \"text-pho-primary\",\n )}\n >\n <FlexRender header={header} />\n <SortIndicator sorted={sorted} />\n </button>\n ) : (\n <FlexRender header={header} />\n )}\n </th>\n );\n })}\n </tr>\n ))}\n </thead>\n <tbody className={DATA_TABLE_BODY}>\n {bones.length > 0 ? (\n bones.map((_, index) => (\n <tr key={index}>\n {table.getAllLeafColumns().map((column) => (\n <td\n key={column.id}\n className={cn(\n \"px-5 align-middle\",\n rowSize,\n fixed && \"min-w-0\",\n column.columnDef.meta?.className,\n )}\n >\n <Skeleton\n className={cn(\n \"h-3.5 w-24\",\n column.columnDef.meta?.align === \"end\" && \"ml-auto\",\n )}\n />\n </td>\n ))}\n </tr>\n ))\n ) : rows.length === 0 ? (\n <tr>\n <td\n colSpan={leafCount}\n className=\"text-pho-description px-5 py-10 text-center\"\n >\n {searching && query !== \"\" && data.length > 0 ? (\n <>Nothing matches “{query}”.</>\n ) : (\n empty\n )}\n </td>\n </tr>\n ) : (\n <>\n {mainRows.map(renderRow)}\n {groupSections.map(([label, sectionRows]) => (\n <Fragment key={label}>\n <tr data-table-group=\"\">\n <td\n colSpan={leafCount}\n // A tinted band, not spacing: the wash marks the group\n // off, the height stays compact.\n className=\"bg-pho-page text-pho-description h-9 px-5 align-middle text-xs font-medium\"\n >\n {label}\n </td>\n </tr>\n {sectionRows.map(renderRow)}\n </Fragment>\n ))}\n </>\n )}\n </tbody>\n </table>\n );\n\n return (\n <div\n className={cn(\n DATA_TABLE_SURFACE,\n \"w-full scroll-mt-12 contain-inline-size\",\n !animateHeight && \"overflow-x-auto\",\n className,\n )}\n {...props}\n data-data-table=\"\"\n >\n {(toolbar != null || (searching && !adopted)) && (\n // The toolbar band — table chrome, like the header row: the ghost\n // search on the cells' text line (`px-5`), filters at the end.\n // Quiet ink, no boxes in the box; the hairline below is the only\n // border it brings.\n <div className=\"border-pho-secondary flex min-h-11 flex-wrap items-center gap-x-4 gap-y-1 border-b px-5 py-2\">\n {searching && !adopted && (\n <GhostSearch\n value={query}\n onChange={setQuery}\n placeholder={placeholder}\n aria-label={placeholder}\n />\n )}\n {toolbar}\n </div>\n )}\n {animateHeight ? (\n // The height glides on the page spring while the rows inside swap;\n // sideways scrolling moves onto the measured layer so the frame\n // clips height only.\n <AnimatedHeight\n transition={SPRING_ENTRANCE}\n className=\"overflow-x-auto\"\n >\n {grid}\n </AnimatedHeight>\n ) : (\n grid\n )}\n </div>\n );\n}\n\n/**\n * The sort cue beside a sortable header: the two-way glyph at rest (shown\n * on hover and focus, so a header reads as plain text until it matters), a\n * chevron pointing the way once the column is sorted.\n */\nfunction SortIndicator({ sorted }: { sorted: false | \"asc\" | \"desc\" }) {\n return (\n <span\n aria-hidden\n className={cn(\n \"inline-flex shrink-0 [&>svg]:size-3.5\",\n !sorted &&\n \"opacity-0 transition-opacity group-hover/sort:opacity-100 group-focus-visible/sort:opacity-100\",\n )}\n >\n {sorted === \"asc\" ? (\n <IconChevronUp />\n ) : sorted === \"desc\" ? (\n <IconChevronDown />\n ) : (\n <IconSelector />\n )}\n </span>\n );\n}\n\nexport { DataTable, DATA_TABLE_SURFACE };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;AASA,IAAM,KAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAiB,KAAO;AAAQ,CAAC,GAAG,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAqB,KAAO;AAAQ,CAAC,CAAC,GACxH,KAAe,GAAqB,WAAW,YAAY,YAAY,EAAU,GCwGjF,KAAW,GAAc;AAAA,EAC7B,mBAAA;AAAA,EACA,qBAAA;AAAA,EACA,wBAAA;AAAA,EACA,wBAAA;AAAA,EACA,gBAAgB,GAAqB;AAAA,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,SAAS,GAAc,EAAE,QAAA,EAAA,GAA8C;AACrE,SACE,gBAAA,EAAC,QAAD;AAAA,IACE,eAAA;AAAA,IACA,WAAW,EACT,yCACA,CAAC,KACC,gGACJ;AAAA,IAEC,UAAA,MAAW,QACV,gBAAA,EAAC,IAAD,CAAgB,CAAA,IACd,MAAW,SACb,gBAAA,EAAC,IAAD,CAAkB,CAAA,IAElB,gBAAA,EAAC,IAAD,CAAe,CAAA;AAAA,EAEb,CAAA;AAEV"}
|
|
1
|
+
{"version":3,"file":"data-table-Ce_c6T73.js","names":[],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.46.0_react@19.2.8/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs","../../src/components/data-table/data-table.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.46.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M8 9l4 -4l4 4\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M16 15l-4 4l-4 -4\", \"key\": \"svg-1\" }]];\nconst IconSelector = createReactComponent(\"outline\", \"selector\", \"Selector\", __iconNode);\n\nexport { __iconNode, IconSelector as default };\n//# sourceMappingURL=IconSelector.mjs.map\n","import {\n createContext,\n Fragment,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useState,\n useSyncExternalStore,\n type ComponentProps,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport {\n columnFilteringFeature,\n createColumnHelper,\n createFilteredRowModel,\n createSortedRowModel,\n filterFn_includesString,\n FlexRender,\n globalFilteringFeature,\n rowSelectionFeature,\n rowSortingFeature,\n sortFn_alphanumeric,\n sortFn_basic,\n sortFn_datetime,\n sortFn_text,\n tableFeatures,\n useTable,\n type ColumnDef,\n type RowData,\n type SortingState,\n} from \"@tanstack/react-table\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconSelector,\n} from \"@tabler/icons-react\";\nimport { Skeleton } from \"../skeleton\";\nimport {\n DATA_TABLE_BODY,\n DATA_TABLE_HEADER_CELL,\n DATA_TABLE_SURFACE,\n DATA_TABLE_TEXT,\n} from \"./chrome\";\nimport { Checkbox } from \"../checkbox\";\nimport { SPRING_ENTRANCE } from \"../../motion\";\nimport { AnimatedHeight } from \"../../utils/animated-height\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\n\n/**\n * DataTable — a table of records with column semantics: sortable headers,\n * aligned cells, rows that are links into a subpage. TanStack Table (v9)\n * does the thinking — column defs, sorting, row identity — and renders\n * nothing; every pixel here is Pho's.\n *\n * Design notes:\n * - The surface is `BasicPage.Card`'s: hairline border, `base` radius, the\n * page's primary fill, hairline rules between rows. A table is a card of\n * rows that happen to line up in columns, so it sits in a page's `Stack`\n * as any card does.\n * - Header cells are description ink at body size — never small caps, never\n * bold. Hierarchy comes from ink alone; the header is a label row, not a\n * banner.\n * - A sortable header is a button inside the cell: the label and its\n * indicator (`IconSelector` at rest, a chevron once sorted). `aria-sort`\n * sits on the `th`.\n * - Rows that navigate stretch one link across the row (the first cell's\n * link, extended with a pseudo-element), so the whole row is one target\n * for pointer and one stop for keyboard. Hover washes the row; the row\n * whose page is open beside the table (`current`) keeps the wash — the\n * same cue `BasicPage.RowLink` gives under `aria-current`.\n * - Numbers align to the end with tabular figures (`meta.align: \"end\"`).\n * - `search` is one box over every column — plain contains matching, and\n * the body says when nothing matches. In a page, `BasicPage.Search` in\n * the section header adopts the box; alone, the table keeps one in a\n * toolbar row inside its frame. Server-side search keeps its own box\n * outside.\n * - A wide table scrolls sideways inside its own frame; the page never does.\n * `contain: inline-size` keeps the table's intrinsic width out of the\n * page's — a host that sizes to content (a scroll area's fit-content\n * pane, a grid's auto column) would otherwise grow to the widest row.\n * Left with no width of its own, the frame takes its container's\n * (`w-full`); a shrink-to-fit host (a flex row) would collapse it.\n * `layout=\"fixed\"` is the other way out: columns size from the frame,\n * and a long cell truncates instead of stretching the table.\n *\n * Reach for it when a list needs column semantics — sorting, aligned\n * figures, several fields side by side. A list where each row is one\n * label and a chevron stays `BasicPage.RowLink`.\n */\n\n/** Column metadata a `DataTable` understands. */\nexport interface DataTableColumnMeta {\n /** Cell alignment — `end` for figures (right-aligned, tabular). */\n align?: \"start\" | \"end\";\n /**\n * Extra classes on every `th` and `td` in this column. With\n * `layout=\"fixed\"`, size a short column here (`w-24`) and leave the\n * flexible ones unsaid — they share what remains. Prefer this over\n * `nth-child` width hacks on the table's `className`.\n */\n className?: string;\n}\n\n/**\n * The feature set every `DataTable` runs on — sorting with the stock sort\n * functions, the column meta above. Fixed, so column definitions written\n * once fit every table.\n */\nconst features = tableFeatures({\n rowSortingFeature,\n rowSelectionFeature,\n columnFilteringFeature,\n globalFilteringFeature,\n sortedRowModel: createSortedRowModel(),\n filteredRowModel: createFilteredRowModel(),\n filterFns: { includesString: filterFn_includesString },\n sortFns: {\n alphanumeric: sortFn_alphanumeric,\n basic: sortFn_basic,\n datetime: sortFn_datetime,\n text: sortFn_text,\n },\n columnMeta: {} as DataTableColumnMeta,\n});\n\nexport type DataTableFeatures = typeof features;\n\n/** Body row height — the header keeps its own `h-10` on every size. */\nexport const DATA_TABLE_SIZES = {\n sm: {\n classes: \"h-10\",\n description: \"Small — 40px at 13px; the header's height, for dense lists\",\n },\n base: {\n classes: \"h-12\",\n description: \"Base — 48px at 14px; one line of body type\",\n },\n lg: {\n classes: \"h-14\",\n description:\n \"Large — 56px at 16px; two-line cells (a number and a caption)\",\n },\n} satisfies VariantMap;\n\nexport type DataTableSize = keyof typeof DATA_TABLE_SIZES;\n\n/** A column definition for a `DataTable` of `TData` rows. */\nexport type DataTableColumn<\n TData extends RowData,\n TValue = unknown,\n> = ColumnDef<DataTableFeatures, TData, TValue>;\n\n/**\n * The column helper, bound to the table's feature set — `accessor`,\n * `display`, `group`, and `columns` to collect them with their types\n * intact.\n *\n * @example\n * const col = createColumns<Request>();\n * const columns = col.columns([\n * col.accessor(\"actor\", { header: \"Actor\" }),\n * col.accessor(\"amount\", { header: \"Amount\", meta: { align: \"end\" } }),\n * ]);\n */\nexport function createColumns<TData extends RowData>() {\n return createColumnHelper<DataTableFeatures, TData>();\n}\n\n/**\n * The leading checkbox column selection adds. The header checkbox works\n * the visible set: everything the search still shows toggles together,\n * while rows selected earlier and then hidden stay selected.\n */\nconst SELECT_COLUMN = createColumns<RowData>().display({\n id: \"select\",\n enableSorting: false,\n header: ({ table }) => {\n const visible = table.getRowModel().rows;\n const chosen = visible.filter((row) => row.getIsSelected()).length;\n const all = visible.length > 0 && chosen === visible.length;\n return (\n <Checkbox\n size=\"sm\"\n aria-label=\"Select all\"\n checked={all}\n indeterminate={chosen > 0 && !all}\n onCheckedChange={(checked) => {\n table.setRowSelection((old) => {\n const next = { ...old };\n for (const row of visible) {\n if (checked === true) next[row.id] = true;\n else delete next[row.id];\n }\n return next;\n });\n }}\n />\n );\n },\n cell: ({ row }) => (\n <Checkbox\n size=\"sm\"\n aria-label=\"Select row\"\n checked={row.getIsSelected()}\n onCheckedChange={(checked) => row.toggleSelected(checked === true)}\n />\n ),\n});\n\nexport interface DataTableProps<TData extends RowData> extends Omit<\n ComponentProps<\"div\">,\n \"children\"\n> {\n columns: ReadonlyArray<DataTableColumn<TData, any>>;\n data: ReadonlyArray<TData>;\n /**\n * A row's identity — what `current` is matched against, and what keeps a\n * row itself across sorts. Defaults to the row's `id` field, else its\n * index.\n */\n getRowId?: (row: TData) => string;\n /**\n * Rows that navigate: each row is one link into a subpage, through the\n * host's `LinkProvider`. Beside a `BasicPage.Aside`, the subpage opens\n * next to the table. Return nothing for a row with no page yet (one\n * still in flight) and that row stays plain.\n */\n rowHref?: (row: TData) => string | null | undefined;\n /**\n * A click on the row (not on a link, button, or other control). The\n * table still activates `rowHref` unless the handler calls\n * `preventDefault`.\n */\n onRowClick?: (\n row: TData,\n event: MouseEvent<HTMLTableRowElement> | KeyboardEvent<HTMLTableRowElement>,\n ) => void;\n /** The row whose page is open (its id) — it keeps the wash. */\n current?: string | null;\n /**\n * Sorting is on for every accessor column (`enableSorting: false` on a\n * column turns it off there). Uncontrolled by default; `defaultSort`\n * seeds it. Pass `sort` with `onSortChange` to own it — the way to sort\n * on the server.\n */\n defaultSort?: SortingState;\n sort?: SortingState;\n onSortChange?: (sort: SortingState) => void;\n /**\n * A search box on the table — `true`, or the placeholder it should\n * show. One box searches every column (a column opts out with\n * `enableGlobalFilter: false`); matching is a plain case-insensitive\n * contains, on the client. With no matches the body says so. When the\n * list doesn't all come down, keep the box outside and ask the server.\n */\n search?: boolean | string;\n /**\n * Controls in the frame's top band — a `BasicPage.Search` first, then a\n * filter or two. The band is part of the table (one surface, a hairline\n * above the header row), so nothing floats over the page and the\n * spacing above and below is the frame's own. A `Search` here adopts\n * the table's box the way a header one does.\n */\n toolbar?: ReactNode;\n /**\n * Row selection: hand either of these and rows grow a leading checkbox\n * column. The header checkbox works the visible set — everything the\n * search still shows — so select-all after a search means what it says;\n * rows selected earlier and then hidden stay selected. `selected` is\n * the selected ids (ids come from `getRowId`; pair with\n * `onSelectedChange` to own the state); `onSelectedChange` alone\n * listens while the table keeps it. The page renders its own bulk\n * actions from the ids — the table only keeps the score.\n */\n selected?: readonly string[];\n onSelectedChange?: (ids: string[]) => void;\n /**\n * File rows into labeled groups: return a label and the row renders\n * under it, `null` and it stays in the main body. Groups follow the\n * main body, in the order their labels first appear in `data`, each\n * under a quiet label row — and only while they have rows, so a group\n * a search empties simply leaves. Sorting orders rows within their\n * group.\n */\n group?: (row: TData) => string | null;\n /**\n * Glide the frame's height when the rows change — a search narrowing,\n * a filter, bones becoming rows. The height follows the content on the\n * page spring instead of jumping; reserve it for tables whose rows\n * change while mounted (same contract as `BasicPage.Card`'s).\n */\n animateHeight?: boolean;\n /** Bones while the rows are on their way — `true` for five, or a count. */\n loading?: boolean | number;\n /** What the body says when there are no rows. */\n empty?: ReactNode;\n /**\n * How columns take width. `auto` (the default) sizes them from their\n * content — a long cell grows the table and the frame scrolls sideways.\n * `fixed` sizes them from the table's width (`table-layout: fixed`):\n * short columns take a width hint on `meta.className`, the rest share\n * what remains, and cells get `min-w-0` so an inner `truncate` can\n * shrink. `width: 0` (`w-0`) is not a content-size hint here — fixed\n * layout treats it as a real zero — so give a short column a real\n * width (`w-24`) rather than the auto-layout shrink-wrap trick.\n */\n layout?: \"auto\" | \"fixed\";\n /**\n * Body row height and the type that comes with it. `base` (the default)\n * is 48px rows at 14px — one line of body type. `sm` is 40px at 13px,\n * the header's own height, for a dense list scanned more than read.\n * `lg` is 56px at 16px, for a two-line cell (a number and a caption)\n * that would crowd `base`. The header row keeps its 40px on every size\n * and follows the type.\n */\n size?: DataTableSize;\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * A host that sizes itself around tables provides this; each table\n * announces itself while mounted. `BasicPage.Root` runs wide when the\n * page carries one and `width` was left unsaid.\n */\nexport const TableHostContext = createContext<\n ((present: boolean) => void) | null\n>(null);\n\n/** A searchable table's search, published for a header to adopt. */\nexport interface TableSearchApi {\n placeholder: string;\n query: string;\n setQuery: (query: string) => void;\n /** Rows still showing after the current query. */\n matched: number;\n /** Rows in the list, before search. */\n total: number;\n}\n\ninterface TableSearchState {\n api: TableSearchApi | null;\n adopted: boolean;\n}\n\n/**\n * The channel between a searchable table and a `BasicPage.Search` placed\n * in a section header: the table publishes its search (placeholder,\n * query, the setter); a mounted `Search` adopts it, and the table's own\n * box yields. Provided by `BasicPage.Root`; a table outside any page\n * keeps its built-in box. One searchable table per page — a later\n * publisher takes the slot.\n */\nexport interface TableSearchStore {\n get: () => TableSearchState;\n subscribe: (listener: () => void) => () => void;\n publish: (api: TableSearchApi | null) => void;\n adopt: (adopted: boolean) => void;\n}\n\nexport function createTableSearchStore(): TableSearchStore {\n let state: TableSearchState = { api: null, adopted: false };\n const listeners = new Set<() => void>();\n const emit = () => {\n for (const listener of listeners) listener();\n };\n return {\n get: () => state,\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n publish(api) {\n state = { ...state, api };\n emit();\n },\n adopt(adopted) {\n state = { ...state, adopted };\n emit();\n },\n };\n}\n\nexport const TableSearchContext = createContext<TableSearchStore | null>(null);\n\nconst subscribeToNothing = () => () => {};\n\nexport { GhostSearch, type GhostSearchProps } from \"../../utils/ghost-search\";\nimport { GhostSearch } from \"../../utils/ghost-search\";\n\nconst DEFAULT_BONES = 5;\n\nfunction defaultRowId(row: unknown, index: number): string {\n const id = (row as { id?: unknown } | null)?.id;\n return typeof id === \"string\" || typeof id === \"number\"\n ? String(id)\n : String(index);\n}\n\n/** Controls keep their own click; the row only navigates from empty surface. */\nconst ROW_NAV_IGNORE = \"a, button, input, textarea, select, label\";\n\nfunction shouldIgnoreRowNav(target: EventTarget | null): boolean {\n return target instanceof Element && target.closest(ROW_NAV_IGNORE) != null;\n}\n\nfunction activateRowHref(event: MouseEvent<HTMLTableRowElement>, href: string) {\n const newTab =\n event.button === 1 || event.metaKey || event.ctrlKey || event.shiftKey;\n if (event.button === 1) event.preventDefault();\n if (event.button !== 0 && event.button !== 1) return;\n if (newTab) {\n window.open(href, \"_blank\", \"noopener,noreferrer\");\n return;\n }\n event.currentTarget.querySelector<HTMLAnchorElement>(\"a[href]\")?.click();\n}\n\nfunction DataTable<TData extends RowData>({\n columns,\n data,\n getRowId,\n rowHref,\n onRowClick,\n current,\n selected,\n onSelectedChange,\n defaultSort,\n sort,\n onSortChange,\n search,\n toolbar,\n group,\n animateHeight,\n loading,\n empty = \"Nothing here yet.\",\n layout = \"auto\",\n size = \"base\",\n className,\n ...props\n}: DataTableProps<TData>) {\n const fixed = layout === \"fixed\";\n const rowSize = resolveVariant(DATA_TABLE_SIZES, size);\n const rowText = DATA_TABLE_TEXT[size] ?? DATA_TABLE_TEXT.base;\n const Link = useLinkComponent();\n const announce = useContext(TableHostContext);\n const searching = search === true || typeof search === \"string\";\n const [query, setQuery] = useState(\"\");\n const placeholder = typeof search === \"string\" ? search : \"Search\";\n // A `BasicPage.Search` in a section header adopts the box; the table\n // then renders no toolbar of its own.\n const searchStore = useContext(TableSearchContext);\n const adopted = useSyncExternalStore(\n searchStore?.subscribe ?? subscribeToNothing,\n () => searchStore?.get().adopted ?? false,\n () => false,\n );\n useLayoutEffect(() => {\n if (announce == null) return;\n announce(true);\n return () => announce(false);\n }, [announce]);\n const selecting = selected != null || onSelectedChange != null;\n const [ownSelection, setOwnSelection] = useState<Record<string, true>>({});\n const rowSelection: Record<string, true> =\n selected != null\n ? Object.fromEntries(selected.map((id) => [id, true as const]))\n : ownSelection;\n // Sorting mirrors selection: the component always owns a fallback state,\n // so `defaultSort` + `onSortChange` without `sort` still sorts — a custom\n // `onSortingChange` replaces the table's own updater entirely.\n const [ownSort, setOwnSort] = useState<SortingState>(defaultSort ?? []);\n const sorting: SortingState = sort ?? ownSort;\n const table = useTable<DataTableFeatures, TData>({\n features,\n columns: (selecting\n ? [SELECT_COLUMN as DataTableColumn<TData, any>, ...columns]\n : columns) as Array<DataTableColumn<TData, any>>,\n data: data as Array<TData>,\n getRowId: getRowId ? (row) => getRowId(row) : defaultRowId,\n // Keys only when meant: a present-but-undefined slice of `state` reads\n // as \"controlled, with nobody listening\".\n state: {\n sorting,\n ...(searching ? { globalFilter: query } : {}),\n ...(selecting ? { rowSelection } : {}),\n },\n ...(selecting\n ? {\n enableRowSelection: true,\n onRowSelectionChange: (\n updater:\n | Record<string, true>\n | ((old: Record<string, true>) => Record<string, true>),\n ) => {\n const next =\n typeof updater === \"function\" ? updater(rowSelection) : updater;\n if (selected == null) setOwnSelection(next);\n onSelectedChange?.(Object.keys(next));\n },\n }\n : {}),\n ...(searching\n ? {\n onGlobalFilterChange: setQuery,\n globalFilterFn: \"includesString\" as const,\n }\n : {}),\n onSortingChange: (\n updater: SortingState | ((prev: SortingState) => SortingState),\n ) => {\n const next = typeof updater === \"function\" ? updater(sorting) : updater;\n if (sort == null) setOwnSort(next);\n onSortChange?.(next);\n },\n });\n const rows = table.getRowModel().rows;\n const total = data.length;\n const matched = searching ? rows.length : total;\n useLayoutEffect(() => {\n if (!searching || searchStore == null) return;\n searchStore.publish({ placeholder, query, setQuery, matched, total });\n }, [searching, searchStore, placeholder, query, matched, total]);\n useEffect(() => {\n if (searchStore == null) return;\n return () => searchStore.publish(null);\n }, [searchStore]);\n const leafCount = table.getAllLeafColumns().length;\n const bones = useMemo(\n () =>\n loading\n ? Array.from({ length: loading === true ? DEFAULT_BONES : loading })\n : [],\n [loading],\n );\n\n const renderRow = (row: (typeof rows)[number]) => {\n const href = rowHref?.(row.original);\n const isCurrent = current != null && current === row.id;\n const navigable = href != null || onRowClick != null;\n const onActivate = (event: MouseEvent<HTMLTableRowElement>) => {\n if (event.button !== 0 && event.button !== 1) return;\n if (event.defaultPrevented || shouldIgnoreRowNav(event.target)) return;\n onRowClick?.(row.original, event);\n if (event.defaultPrevented || href == null) return;\n activateRowHref(event, href);\n };\n const onRowKeyDown = (event: KeyboardEvent<HTMLTableRowElement>) => {\n if (href != null) return;\n if (event.key !== \"Enter\" && event.key !== \" \") return;\n if (event.defaultPrevented || shouldIgnoreRowNav(event.target)) return;\n event.preventDefault();\n onRowClick?.(row.original, event);\n };\n return (\n <tr\n key={row.id}\n className={cn(\n navigable &&\n \"hover:bg-pho-primary-hover outline-pho-brand cursor-pointer transition-colors has-[a:focus-visible]:outline-2 has-[a:focus-visible]:-outline-offset-2\",\n (isCurrent || row.getIsSelected()) && \"bg-pho-primary-hover\",\n )}\n tabIndex={navigable && href == null ? 0 : undefined}\n onClick={navigable ? onActivate : undefined}\n onAuxClick={navigable ? onActivate : undefined}\n onKeyDown={navigable && href == null ? onRowKeyDown : undefined}\n >\n {row.getAllCells().map((cell, index) => {\n const align = cell.column.columnDef.meta?.align ?? \"start\";\n return (\n <td\n key={cell.id}\n className={cn(\n \"text-pho-primary px-5 align-middle whitespace-nowrap\",\n rowSize,\n fixed && \"min-w-0\",\n align === \"end\" && \"text-right tabular-nums\",\n cell.column.columnDef.meta?.className,\n )}\n >\n {/* The link lives in the first data cell; with selection on,\n cell 0 is the checkbox and must stay outside the anchor. */}\n {index === (selecting ? 1 : 0) && href != null ? (\n // One real link for keyboard and right-click; the row\n // click handler covers the rest of the surface.\n <Link\n href={href}\n aria-current={isCurrent ? \"page\" : undefined}\n className=\"outline-none\"\n >\n <FlexRender cell={cell} />\n </Link>\n ) : (\n <FlexRender cell={cell} />\n )}\n </td>\n );\n })}\n </tr>\n );\n };\n\n // Partition the (sorted, filtered) rows: the main body, then each\n // labeled group in the order labels first appear in `data`.\n let mainRows = rows;\n let groupSections: Array<[string, typeof rows]> = [];\n if (group != null) {\n mainRows = [];\n const byLabel = new Map<string, typeof rows>();\n const order: string[] = [];\n for (const item of data) {\n const label = group(item);\n if (label != null && !byLabel.has(label)) {\n byLabel.set(label, []);\n order.push(label);\n }\n }\n for (const row of rows) {\n const label = group(row.original);\n if (label == null) {\n mainRows.push(row);\n } else {\n if (!byLabel.has(label)) {\n byLabel.set(label, []);\n order.push(label);\n }\n byLabel.get(label)!.push(row);\n }\n }\n groupSections = order\n .map((label) => [label, byLabel.get(label)!] as [string, typeof rows])\n .filter(([, sectionRows]) => sectionRows.length > 0);\n }\n\n const grid = (\n <table\n className={cn(\"w-full border-collapse\", rowText, fixed && \"table-fixed\")}\n aria-busy={loading ? true : undefined}\n >\n <thead>\n {table.getHeaderGroups().map((headerGroup) => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map((header) => {\n const align = header.column.columnDef.meta?.align ?? \"start\";\n const sorted = header.column.getIsSorted();\n const sortable =\n !header.isPlaceholder && header.column.getCanSort();\n return (\n <th\n key={header.id}\n scope=\"col\"\n colSpan={header.colSpan}\n aria-sort={\n sorted === \"asc\"\n ? \"ascending\"\n : sorted === \"desc\"\n ? \"descending\"\n : undefined\n }\n className={cn(\n DATA_TABLE_HEADER_CELL,\n \"px-5\",\n fixed && \"min-w-0\",\n align === \"end\" && \"text-right\",\n header.column.columnDef.meta?.className,\n )}\n >\n {header.isPlaceholder ? null : sortable ? (\n <button\n type=\"button\"\n onClick={header.column.getToggleSortingHandler()}\n className={cn(\n \"group/sort outline-pho-brand hover:text-pho-primary -mx-1 inline-flex items-center gap-1 rounded-sm px-1 transition-colors focus-visible:outline-2\",\n align === \"end\" && \"flex-row-reverse\",\n sorted && \"text-pho-primary\",\n )}\n >\n <FlexRender header={header} />\n <SortIndicator sorted={sorted} />\n </button>\n ) : (\n <FlexRender header={header} />\n )}\n </th>\n );\n })}\n </tr>\n ))}\n </thead>\n <tbody className={DATA_TABLE_BODY}>\n {bones.length > 0 ? (\n bones.map((_, index) => (\n <tr key={index}>\n {table.getAllLeafColumns().map((column) => (\n <td\n key={column.id}\n className={cn(\n \"px-5 align-middle\",\n rowSize,\n fixed && \"min-w-0\",\n column.columnDef.meta?.className,\n )}\n >\n <Skeleton\n className={cn(\n \"h-3.5 w-24\",\n column.columnDef.meta?.align === \"end\" && \"ml-auto\",\n )}\n />\n </td>\n ))}\n </tr>\n ))\n ) : rows.length === 0 ? (\n <tr>\n <td\n colSpan={leafCount}\n className=\"text-pho-description px-5 py-10 text-center\"\n >\n {searching && query !== \"\" && data.length > 0 ? (\n <>Nothing matches “{query}”.</>\n ) : (\n empty\n )}\n </td>\n </tr>\n ) : (\n <>\n {mainRows.map(renderRow)}\n {groupSections.map(([label, sectionRows]) => (\n <Fragment key={label}>\n <tr data-table-group=\"\">\n <td\n colSpan={leafCount}\n // A tinted band, not spacing: the wash marks the group\n // off, the height stays compact.\n className=\"bg-pho-page text-pho-description h-9 px-5 align-middle text-xs font-medium\"\n >\n {label}\n </td>\n </tr>\n {sectionRows.map(renderRow)}\n </Fragment>\n ))}\n </>\n )}\n </tbody>\n </table>\n );\n\n return (\n <div\n className={cn(\n DATA_TABLE_SURFACE,\n \"w-full scroll-mt-12 contain-inline-size\",\n !animateHeight && \"overflow-x-auto\",\n className,\n )}\n {...props}\n data-data-table=\"\"\n >\n {(toolbar != null || (searching && !adopted)) && (\n // The toolbar band — table chrome, like the header row: the ghost\n // search on the cells' text line (`px-5`), filters at the end.\n // Quiet ink, no boxes in the box; the hairline below is the only\n // border it brings.\n <div className=\"border-pho-secondary flex min-h-11 flex-wrap items-center gap-x-4 gap-y-1 border-b px-5 py-2\">\n {searching && !adopted && (\n <GhostSearch\n value={query}\n onChange={setQuery}\n placeholder={placeholder}\n aria-label={placeholder}\n />\n )}\n {toolbar}\n </div>\n )}\n {animateHeight ? (\n // The height glides on the page spring while the rows inside swap;\n // sideways scrolling moves onto the measured layer so the frame\n // clips height only.\n <AnimatedHeight\n transition={SPRING_ENTRANCE}\n className=\"overflow-x-auto\"\n >\n {grid}\n </AnimatedHeight>\n ) : (\n grid\n )}\n </div>\n );\n}\n\n/**\n * The sort cue beside a sortable header: the two-way glyph at rest (shown\n * on hover and focus, so a header reads as plain text until it matters), a\n * chevron pointing the way once the column is sorted.\n */\nfunction SortIndicator({ sorted }: { sorted: false | \"asc\" | \"desc\" }) {\n return (\n <span\n aria-hidden\n className={cn(\n \"inline-flex shrink-0 [&>svg]:size-3.5\",\n !sorted &&\n \"opacity-0 transition-opacity group-hover/sort:opacity-100 group-focus-visible/sort:opacity-100\",\n )}\n >\n {sorted === \"asc\" ? (\n <IconChevronUp />\n ) : sorted === \"desc\" ? (\n <IconChevronDown />\n ) : (\n <IconSelector />\n )}\n </span>\n );\n}\n\nexport { DataTable, DATA_TABLE_SURFACE };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;AASA,IAAM,KAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAiB,KAAO;AAAQ,CAAC,GAAG,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAqB,KAAO;AAAQ,CAAC,CAAC,GACxH,KAAe,GAAqB,WAAW,YAAY,YAAY,EAAU,GCwGjF,KAAW,GAAc;AAAA,EAC7B,mBAAA;A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AAY;AAAA,MACZ,WAAU;AAAA,MAET,UAAA;AAAA,IACa,CAAA,IAEhB,CAEC;AAAA;AAET;AAOA,SAAS,GAAc,EAAE,QAAA,EAAA,GAA8C;AACrE,SACE,gBAAA,EAAC,QAAD;AAAA,IACE,eAAA;AAAA,IACA,WAAW,EACT,yCACA,CAAC,KACC,gGACJ;AAAA,IAEC,UAAA,MAAW,QACV,gBAAA,EAAC,IAAD,CAAgB,CAAA,IACd,MAAW,SACb,gBAAA,EAAC,IAAD,CAAkB,CAAA,IAElB,gBAAA,EAAC,IAAD,CAAe,CAAA;AAAA,EAEb,CAAA;AAEV"}
|
|
@@ -1,144 +1,144 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as
|
|
2
|
+
import { t as h } from "./cn-ChIgwEl3.js";
|
|
3
|
+
import { a as I } from "./button-C9VqBBIr.js";
|
|
4
4
|
import { t as P } from "./close-button-GvqWbLl0.js";
|
|
5
|
-
import { t as
|
|
5
|
+
import { t as _ } from "./animated-height-zr7BmFY1.js";
|
|
6
6
|
import { t as p } from "./scroll-area-DSwD9th7.js";
|
|
7
|
-
import { createContext as
|
|
8
|
-
import { jsx as e, jsxs as
|
|
7
|
+
import { createContext as F, useCallback as O, useContext as j, useEffect as T, useMemo as M, useRef as C, useState as R } from "react";
|
|
8
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
9
9
|
import { Dialog as f } from "@base-ui/react/dialog";
|
|
10
|
-
var w =
|
|
11
|
-
function
|
|
12
|
-
return
|
|
10
|
+
var w = F(null);
|
|
11
|
+
function re() {
|
|
12
|
+
return j(w)?.pending ?? !1;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const [r, a] =
|
|
16
|
-
|
|
14
|
+
function $({ onOpenChange: t, actionsRef: n, ...s }) {
|
|
15
|
+
const [r, a] = R(!1), i = C(!1), o = C(null);
|
|
16
|
+
T(() => {
|
|
17
17
|
if (n)
|
|
18
|
-
return n.current =
|
|
18
|
+
return n.current = o.current, () => {
|
|
19
19
|
n.current = null;
|
|
20
20
|
};
|
|
21
21
|
}, [n]);
|
|
22
|
-
const
|
|
23
|
-
if (!u &&
|
|
24
|
-
|
|
22
|
+
const d = O((u, g) => {
|
|
23
|
+
if (!u && i.current) {
|
|
24
|
+
g.cancel();
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
t?.(u,
|
|
28
|
-
}, [t]),
|
|
27
|
+
t?.(u, g);
|
|
28
|
+
}, [t]), c = M(() => ({
|
|
29
29
|
pending: r,
|
|
30
30
|
beginPending: () => {
|
|
31
|
-
|
|
31
|
+
i.current = !0, a(!0);
|
|
32
32
|
},
|
|
33
33
|
endPending: () => {
|
|
34
|
-
|
|
34
|
+
i.current = !1, a(!1);
|
|
35
35
|
},
|
|
36
|
-
close: () =>
|
|
36
|
+
close: () => o.current?.close()
|
|
37
37
|
}), [r]);
|
|
38
38
|
return /* @__PURE__ */ e(w.Provider, {
|
|
39
|
-
value:
|
|
39
|
+
value: c,
|
|
40
40
|
children: /* @__PURE__ */ e(f.Root, {
|
|
41
|
-
actionsRef:
|
|
42
|
-
onOpenChange:
|
|
43
|
-
...
|
|
41
|
+
actionsRef: o,
|
|
42
|
+
onOpenChange: d,
|
|
43
|
+
...s
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
function
|
|
47
|
+
var G = f.Trigger, x = f.Portal, y = f.Close;
|
|
48
|
+
function J(t) {
|
|
49
49
|
return t != null && typeof t.then == "function";
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const a =
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
function K({ onClick: t, loading: n, disabled: s, ...r }) {
|
|
52
|
+
const a = j(w), [i, o] = R(!1), d = C(!0);
|
|
53
|
+
T(() => (d.current = !0, () => {
|
|
54
|
+
d.current = !1;
|
|
55
55
|
}), []);
|
|
56
|
-
function
|
|
57
|
-
if (
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
56
|
+
function c(g) {
|
|
57
|
+
if (i || n) return;
|
|
58
|
+
const m = t?.(g);
|
|
59
|
+
if (!J(m)) {
|
|
60
60
|
a?.close();
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
a?.endPending(),
|
|
65
|
-
}, (
|
|
66
|
-
a?.endPending(),
|
|
63
|
+
o(!0), a?.beginPending(), m.then(() => {
|
|
64
|
+
a?.endPending(), d.current && o(!1), a?.close();
|
|
65
|
+
}, (v) => {
|
|
66
|
+
a?.endPending(), d.current && o(!1), typeof process < "u" && process.env.NODE_ENV !== "production" && console.error("Dialog.Action: async onClick rejected —", v);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
const u =
|
|
70
|
-
return /* @__PURE__ */ e(
|
|
69
|
+
const u = i || n;
|
|
70
|
+
return /* @__PURE__ */ e(I, {
|
|
71
71
|
...r,
|
|
72
|
-
disabled:
|
|
72
|
+
disabled: s || u,
|
|
73
73
|
loading: u,
|
|
74
|
-
onClick:
|
|
74
|
+
onClick: c
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
function z({ className: t, ...n }) {
|
|
78
78
|
return /* @__PURE__ */ e(f.Backdrop, {
|
|
79
|
-
className:
|
|
79
|
+
className: h("bg-pho-overlay fixed inset-0 z-50 transition-opacity duration-200 ease-out", "data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0", t),
|
|
80
80
|
...n
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function A({ className: t, ...n }) {
|
|
84
84
|
return /* @__PURE__ */ e(f.Popup, {
|
|
85
|
-
className:
|
|
85
|
+
className: h("border-pho-secondary bg-pho-primary shadow-pho-xl fixed top-1/2 left-1/2 z-50 w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-lg border outline-none", "flex max-h-[calc(100dvh-2rem)] flex-col sm:max-h-[calc(100dvh-4rem)]", "transition-[opacity,scale] duration-200 ease-out", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-150", t),
|
|
86
86
|
...n
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function N({ className: t, ...n }) {
|
|
90
90
|
return /* @__PURE__ */ e(f.Title, {
|
|
91
|
-
className:
|
|
91
|
+
className: h("text-pho-primary font-display text-display-sm font-medium text-balance", t),
|
|
92
92
|
...n
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function b({ className: t, ...n }) {
|
|
96
96
|
return /* @__PURE__ */ e(f.Description, {
|
|
97
|
-
className:
|
|
97
|
+
className: h("text-pho-description text-display-xs font-normal", t),
|
|
98
98
|
...n
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
function B({ children: t, size: n = "md" }) {
|
|
102
102
|
return /* @__PURE__ */ e("span", {
|
|
103
103
|
"aria-hidden": !0,
|
|
104
|
-
className:
|
|
104
|
+
className: h("text-pho-secondary mb-1", n === "lg" ? "[&>svg]:size-12" : "[&>svg]:size-8"),
|
|
105
105
|
children: t
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
const
|
|
110
|
-
return /* @__PURE__ */
|
|
111
|
-
className:
|
|
112
|
-
...
|
|
108
|
+
function L({ icon: t, title: n, description: s, consequences: r, warning: a, actions: i, caption: o, showClose: d = !0, children: c, className: u, ...g }) {
|
|
109
|
+
const m = i == null && d, v = !!(t || n || s || m), k = r != null && r.length > 0, D = k || a != null || c != null;
|
|
110
|
+
return /* @__PURE__ */ l(x, { children: [/* @__PURE__ */ e(z, {}), /* @__PURE__ */ l(A, {
|
|
111
|
+
className: u,
|
|
112
|
+
...g,
|
|
113
113
|
children: [
|
|
114
|
-
|
|
114
|
+
v && /* @__PURE__ */ l("div", {
|
|
115
115
|
className: "flex shrink-0 flex-col gap-2 px-6 pt-6",
|
|
116
116
|
children: [
|
|
117
117
|
t && /* @__PURE__ */ e(B, { children: t }),
|
|
118
|
-
(n ||
|
|
118
|
+
(n || m) && /* @__PURE__ */ l("div", {
|
|
119
119
|
className: "relative",
|
|
120
|
-
children: [n ? /* @__PURE__ */ e(
|
|
121
|
-
className:
|
|
120
|
+
children: [n ? /* @__PURE__ */ e(N, {
|
|
121
|
+
className: m ? "pr-12" : void 0,
|
|
122
122
|
children: n
|
|
123
123
|
}) : /* @__PURE__ */ e("div", {
|
|
124
124
|
className: "h-[1.625rem]",
|
|
125
125
|
"aria-hidden": "true"
|
|
126
|
-
}),
|
|
126
|
+
}), m && /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(P, { className: "absolute top-1/2 right-0 z-10 -translate-y-1/2" }) })]
|
|
127
127
|
}),
|
|
128
|
-
|
|
128
|
+
s && /* @__PURE__ */ e(b, { children: s })
|
|
129
129
|
]
|
|
130
130
|
}),
|
|
131
|
-
|
|
131
|
+
D && /* @__PURE__ */ l(p.Root, {
|
|
132
132
|
className: "min-h-0 flex-1",
|
|
133
|
-
children: [/* @__PURE__ */ e(p.Viewport, { children: /* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ e(p.Viewport, { children: /* @__PURE__ */ l(p.Content, {
|
|
134
134
|
className: "flex flex-col gap-5 px-6 py-5",
|
|
135
135
|
children: [
|
|
136
|
-
|
|
136
|
+
k && /* @__PURE__ */ e("ul", {
|
|
137
137
|
className: "text-pho-description text-md [&_strong]:text-pho-secondary space-y-1 [&_strong]:font-medium",
|
|
138
|
-
children: r.map((
|
|
138
|
+
children: r.map((V, E) => /* @__PURE__ */ e("li", {
|
|
139
139
|
className: "relative pl-4 before:absolute before:top-2.5 before:left-1 before:size-1 before:rounded-full before:bg-current",
|
|
140
|
-
children:
|
|
141
|
-
},
|
|
140
|
+
children: V
|
|
141
|
+
}, E))
|
|
142
142
|
}),
|
|
143
143
|
a != null && /* @__PURE__ */ e("p", {
|
|
144
144
|
className: "text-pho-error text-display-xs font-medium",
|
|
@@ -148,47 +148,51 @@ function K({ icon: t, title: n, description: l, consequences: r, warning: a, act
|
|
|
148
148
|
]
|
|
149
149
|
}) }), /* @__PURE__ */ e(p.Scrollbar, { children: /* @__PURE__ */ e(p.Thumb, {}) })]
|
|
150
150
|
}),
|
|
151
|
-
o != null && /* @__PURE__ */
|
|
152
|
-
className:
|
|
153
|
-
children: o
|
|
151
|
+
(i != null || o != null) && /* @__PURE__ */ l("div", {
|
|
152
|
+
className: h("flex shrink-0 flex-wrap items-center justify-end gap-x-2 gap-y-3 px-6 pb-5", !D && "pt-5"),
|
|
153
|
+
children: [o != null && /* @__PURE__ */ e("p", {
|
|
154
|
+
"data-dialog-caption": "",
|
|
155
|
+
className: "text-pho-description min-w-48 flex-1 pr-2 text-xs",
|
|
156
|
+
children: o
|
|
157
|
+
}), i]
|
|
154
158
|
})
|
|
155
159
|
]
|
|
156
160
|
})] });
|
|
157
161
|
}
|
|
158
|
-
function
|
|
162
|
+
function H({ className: t, ...n }) {
|
|
159
163
|
return /* @__PURE__ */ e(f.Popup, {
|
|
160
|
-
className:
|
|
164
|
+
className: h("border-pho-secondary bg-pho-primary shadow-pho-xl fixed inset-4 z-50 flex flex-col overflow-hidden rounded-lg border outline-none sm:inset-8", "transition-[opacity,scale] duration-200 ease-out", "data-[starting-style]:scale-[0.98] data-[starting-style]:opacity-0", "data-[ending-style]:scale-[0.98] data-[ending-style]:opacity-0 data-[ending-style]:duration-150", t),
|
|
161
165
|
...n
|
|
162
166
|
});
|
|
163
167
|
}
|
|
164
|
-
function
|
|
165
|
-
const
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
className:
|
|
168
|
-
...
|
|
168
|
+
function Q({ icon: t, title: n, description: s, actions: r, showClose: a = !0, children: i, className: o, ...d }) {
|
|
169
|
+
const c = r == null && a;
|
|
170
|
+
return /* @__PURE__ */ l(x, { children: [/* @__PURE__ */ e(z, {}), /* @__PURE__ */ l(H, {
|
|
171
|
+
className: o,
|
|
172
|
+
...d,
|
|
169
173
|
children: [
|
|
170
|
-
!!(t || n ||
|
|
174
|
+
!!(t || n || s || c) && /* @__PURE__ */ l("div", {
|
|
171
175
|
className: "flex shrink-0 flex-col gap-2 px-6 pt-6",
|
|
172
176
|
children: [
|
|
173
177
|
t && /* @__PURE__ */ e(B, { children: t }),
|
|
174
|
-
(n ||
|
|
178
|
+
(n || c) && /* @__PURE__ */ l("div", {
|
|
175
179
|
className: "relative",
|
|
176
|
-
children: [n ? /* @__PURE__ */ e(
|
|
177
|
-
className:
|
|
180
|
+
children: [n ? /* @__PURE__ */ e(N, {
|
|
181
|
+
className: c ? "pr-12" : void 0,
|
|
178
182
|
children: n
|
|
179
183
|
}) : /* @__PURE__ */ e("div", {
|
|
180
184
|
className: "h-[1.625rem]",
|
|
181
185
|
"aria-hidden": "true"
|
|
182
|
-
}),
|
|
186
|
+
}), c && /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(P, { className: "absolute top-1/2 right-0 z-10 -translate-y-1/2" }) })]
|
|
183
187
|
}),
|
|
184
|
-
|
|
188
|
+
s && /* @__PURE__ */ e(b, { children: s })
|
|
185
189
|
]
|
|
186
190
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ l(p.Root, {
|
|
188
192
|
className: "min-h-0 flex-1",
|
|
189
193
|
children: [/* @__PURE__ */ e(p.Viewport, { children: /* @__PURE__ */ e(p.Content, {
|
|
190
194
|
className: "px-6 py-5",
|
|
191
|
-
children:
|
|
195
|
+
children: i
|
|
192
196
|
}) }), /* @__PURE__ */ e(p.Scrollbar, { children: /* @__PURE__ */ e(p.Thumb, {}) })]
|
|
193
197
|
}),
|
|
194
198
|
r != null && /* @__PURE__ */ e("div", {
|
|
@@ -198,34 +202,34 @@ function L({ icon: t, title: n, description: l, actions: r, showClose: a = !0, c
|
|
|
198
202
|
]
|
|
199
203
|
})] });
|
|
200
204
|
}
|
|
201
|
-
function
|
|
205
|
+
function S({ className: t, ...n }) {
|
|
202
206
|
return /* @__PURE__ */ e(f.Popup, {
|
|
203
|
-
className:
|
|
207
|
+
className: h("bg-pho-page fixed inset-0 z-50 overflow-y-auto outline-none", "transition-opacity duration-200 ease-out", "data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0", t),
|
|
204
208
|
...n
|
|
205
209
|
});
|
|
206
210
|
}
|
|
207
|
-
function
|
|
211
|
+
function U({ icon: t, title: n, description: s, actions: r, showClose: a = !0, frameClassName: i, children: o, className: d, ...c }) {
|
|
208
212
|
const u = r == null && a;
|
|
209
|
-
return /* @__PURE__ */ e(
|
|
210
|
-
className:
|
|
211
|
-
...
|
|
212
|
-
children: [u && /* @__PURE__ */ e(
|
|
213
|
-
className:
|
|
214
|
-
children: /* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ l(S, {
|
|
214
|
+
className: d,
|
|
215
|
+
...c,
|
|
216
|
+
children: [u && /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(P, { className: "fixed top-4 right-4 z-10" }) }), /* @__PURE__ */ e("div", {
|
|
217
|
+
className: h("flex min-h-full items-center justify-center px-6 pt-6 pb-20", i),
|
|
218
|
+
children: /* @__PURE__ */ l("div", {
|
|
215
219
|
className: "w-full max-w-md",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ l(_, {
|
|
217
221
|
className: "flex flex-col gap-5",
|
|
218
|
-
children: [(t || n ||
|
|
222
|
+
children: [(t || n || s) && /* @__PURE__ */ l("div", {
|
|
219
223
|
className: "flex flex-col gap-2",
|
|
220
224
|
children: [
|
|
221
225
|
t && /* @__PURE__ */ e(B, {
|
|
222
226
|
size: "lg",
|
|
223
227
|
children: t
|
|
224
228
|
}),
|
|
225
|
-
n && /* @__PURE__ */ e(
|
|
226
|
-
|
|
229
|
+
n && /* @__PURE__ */ e(N, { children: n }),
|
|
230
|
+
s && /* @__PURE__ */ e(b, { children: s })
|
|
227
231
|
]
|
|
228
|
-
}),
|
|
232
|
+
}), o]
|
|
229
233
|
}), r != null && /* @__PURE__ */ e("div", {
|
|
230
234
|
className: "mt-5 flex items-center justify-end gap-2",
|
|
231
235
|
children: r
|
|
@@ -234,25 +238,25 @@ function Q({ icon: t, title: n, description: l, actions: r, showClose: a = !0, f
|
|
|
234
238
|
})]
|
|
235
239
|
}) });
|
|
236
240
|
}
|
|
237
|
-
var
|
|
238
|
-
Root:
|
|
239
|
-
Trigger:
|
|
240
|
-
Portal:
|
|
241
|
+
var ae = {
|
|
242
|
+
Root: $,
|
|
243
|
+
Trigger: G,
|
|
244
|
+
Portal: x,
|
|
241
245
|
Backdrop: z,
|
|
242
|
-
Popup:
|
|
243
|
-
InsetPopup:
|
|
244
|
-
FullscreenPopup:
|
|
245
|
-
Title:
|
|
246
|
-
Description:
|
|
247
|
-
Close:
|
|
248
|
-
Action:
|
|
249
|
-
Content:
|
|
250
|
-
InsetContent:
|
|
251
|
-
FullscreenContent:
|
|
246
|
+
Popup: A,
|
|
247
|
+
InsetPopup: H,
|
|
248
|
+
FullscreenPopup: S,
|
|
249
|
+
Title: N,
|
|
250
|
+
Description: b,
|
|
251
|
+
Close: y,
|
|
252
|
+
Action: K,
|
|
253
|
+
Content: L,
|
|
254
|
+
InsetContent: Q,
|
|
255
|
+
FullscreenContent: U
|
|
252
256
|
};
|
|
253
257
|
export {
|
|
254
|
-
|
|
255
|
-
|
|
258
|
+
re as n,
|
|
259
|
+
ae as t
|
|
256
260
|
};
|
|
257
261
|
|
|
258
|
-
//# sourceMappingURL=dialog-
|
|
262
|
+
//# sourceMappingURL=dialog-ChS0tdHa.js.map
|