@kanso-labs/kanso-ui 0.47.4 → 0.48.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/button/hooks.js +35 -1
- package/dist/button/hooks.js.map +1 -1
- package/dist/button/index.js +78 -65
- package/dist/button/index.js.map +1 -1
- package/dist/calendar/styles.js +5 -5
- package/dist/calendar/styles.js.map +1 -1
- package/dist/chip/styles.js +1 -1
- package/dist/chip/styles.js.map +1 -1
- package/dist/collection/context.js +6 -0
- package/dist/collection/context.js.map +1 -0
- package/dist/collection/styles.js +29 -6
- package/dist/collection/styles.js.map +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/calendar/index.js +7 -0
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/checkbox/index.js +10 -7
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox-group/index.js +2 -1
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/chip-group/index.js +69 -66
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/color-swatch-picker/index.js +1 -0
- package/dist/components/color-swatch-picker/index.js.map +1 -1
- package/dist/components/combo-box/index.js +5 -1
- package/dist/components/combo-box/index.js.map +1 -1
- package/dist/components/drop-zone/styles.js +11 -11
- package/dist/components/drop-zone/styles.js.map +1 -1
- package/dist/components/fab-menu/index.js +3 -3
- package/dist/components/fab-menu/index.js.map +1 -1
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/list/index.js +58 -11
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.js +82 -103
- package/dist/components/list-box/index.js.map +1 -1
- package/dist/components/navigation-rail/index.js +4 -4
- package/dist/components/navigation-rail/index.js.map +1 -1
- package/dist/components/number-field/index.js +3 -3
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/popover/index.js +3 -3
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/radio-group/index.js +12 -11
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/search-field/index.js +4 -4
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/select/index.js +5 -1
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/snackbar/index.js +3 -3
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/split-button/index.js +53 -41
- package/dist/components/split-button/index.js.map +1 -1
- package/dist/components/table/index.js +58 -45
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/tabs/index.js +81 -30
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/time-picker/index.js +5 -5
- package/dist/components/time-picker/index.js.map +1 -1
- package/dist/components/tree/index.js +78 -21
- package/dist/components/tree/index.js.map +1 -1
- package/dist/field/index.js +103 -104
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +1 -1
- package/dist/field/styles.js.map +1 -1
- package/dist/hooks/useScrollEdges.js +73 -0
- package/dist/hooks/useScrollEdges.js.map +1 -0
- package/dist/navigation/styles.js +5 -5
- package/dist/navigation/styles.js.map +1 -1
- package/dist/row/styles.js +7 -7
- package/dist/row/styles.js.map +1 -1
- package/dist/styles/color.js +16 -16
- package/dist/styles/color.js.map +1 -1
- package/dist/styles/focus.js +4 -4
- package/dist/styles/focus.js.map +1 -1
- package/dist/styles/overlay.js +3 -3
- package/dist/styles/overlay.js.map +1 -1
- package/dist/styles/scroll-fade.js +33 -0
- package/dist/styles/scroll-fade.js.map +1 -0
- package/dist/styles.css +61 -20
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useLayoutEffect","useState","Cell","RACCell","Column","Row","Table","TableBody","TableFooter","TableHeader","RACTableLoadMoreItem","collectionStyles","mergeRefs","rowStyles","rowLayers","mergeStatefulStyles","mergeStyles","SelectAllLabelContext","undefined","SelectLabelContext","styles","cell","kB7OPa","kg3NbH","k9WMMc","kXLuUW","$$css","cellDisabled","kSiTet","cellEnd","focus","kjBf7l","kInvED","k3XXqK","kMeerF","header","kZKoxP","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kVQacm","kVAEAm","headerHovered","kWkggS","headerPressed","headerSortable","kkrTdU","row","kLZC3w","kPef9Z","kEafiO","rowDisabled","kAXs8y","rowSelected","selection","kzqmXN","khDVqt","selectionSelected","sticky","kGVxlE","k87sOh","kY2c9j","table","kLvRdT","className","renderEmptyState","style","align","children","resizable","label","onResize","onResizeEnd","resizeLabel","selectAllLabel","selectLabel","stickyHeader","ResizeLabelContext","ResizableContext","StickyHeaderContext","NO_MIN_WIDTHS","Map","ColumnMinWidthsContext","REACT_ARIA_MIN_WIDTH","cellContent","cellStyles","state","props","isDisabled","isSelected","columnContent","sortArrowFor","sortDirection","resizerRule","columnStyles","allowsSorting","isHovered","isPressed","dropAriaLevel","node","removeAttribute","emptyContent","measureColumns","headers","tHead","rows","push","cells","held","map","element","cssText","tableLayout","width","widths","Math","ceil","getBoundingClientRect","css","resizableContainerClassName","isResizing","isFocusVisible","isDragging","dragging","hovered","pressed","isDropTarget","dropTarget","direction","t0","$","t1","t2","setElement","t3","ref","minWidths","useColumnMinWidths","t4","tableClasses","t5","t6","t7","t8","t9","t10","t11","t12","TableCell","T0","TableColumn","resizableTable","get","measured","minWidth","max","0","1","TableLoadMore","TableRow","setWidths","measure","next","current","size","every","changes","MutationObserver","observe","characterData","childList","subtree","document","fonts","addEventListener","disconnect","removeEventListener","Body","Footer","Header","LoadMore","RACColumnResizer","RACTable","RACResizableTableContainer","RACTableBody","RACColumn","RACTableFooter","RACTableHeader","RACRow"],"sources":["../../../src/components/table/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { CellRenderProps, ColumnRenderProps, ColumnResizerRenderProps, CellProps as RACCellProps, ColumnProps as RACColumnProps, RowProps as RACRowProps, TableBodyProps as RACTableBodyProps, TableFooterProps as RACTableFooterProps, TableHeaderProps as RACTableHeaderProps, TableLoadMoreItemProps as RACTableLoadMoreItemProps, TableProps as RACTableProps, ResizableTableContainerProps, RowRenderProps, TableBodyRenderProps, TableRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useContext, useLayoutEffect, useMemo, useState } from 'react';\nimport { Cell as RACCell, Column as RACColumn, ColumnResizer as RACColumnResizer, ResizableTableContainer as RACResizableTableContainer, Row as RACRow, Table as RACTable, TableBody as RACTableBody, TableFooter as RACTableFooter, TableHeader as RACTableHeader, TableLoadMoreItem as RACTableLoadMoreItem } from 'react-aria-components';\nimport { CollectionLoadMore } from '../../collection';\nimport { collectionStyles } from '../../collection/styles';\nimport { ArrowDownwardGlyph, ArrowUpwardGlyph } from '../../glyphs';\nimport { mergeRefs } from '../../render/ref';\nimport { rowStyles as rowLayers } from '../../row/styles';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport Checkbox from '../checkbox';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// A grid of rows and columns, with sorting and selection. The design system\n// carries no data table page — it was dropped after Material Design 2 — so\n// the geometry comes from the archived one at\n// <https://m2.material.io/components/data-tables>, which is the page this\n// component is drawn from: a 56dp header row, 52dp body rows, 16dp of\n// padding on each side of a cell, a medium-weight header to set it apart\n// from the rows, and an arrow beside the name of the column being sorted.\n//\n// Its colour roles are the current system's rather than that page's, since\n// a table sits beside lists, cards and menus that all draw from the tokens\n// here. That means the row's state layers are the ones `src/row` uses — the\n// same hover, pressed and selected treatment a list row takes — so a\n// selected table row and a selected list row on one page cannot disagree.\n//\n// The row is not `src/row`, and that is the one place this departs from the\n// library's other collections. That module's row is a headline with a\n// supporting line and a slot at each end; a table row is a run of cells with\n// no such shape, and forcing one into the other would give every cell the\n// row's 56dp floor and body-large headline. The state layers are shared by\n// being written from the same tokens rather than by sharing the module.\n//\n// Four things are this component's own.\n//\n// **The rule between rows is drawn on the row, not on its cells.** A cell\n// cannot see whether its row is the first one, so a rule per cell either\n// doubles under the header or needs the row's position passed down. The\n// table collapses its borders, which is what lets a `<tr>` carry one.\n//\n// **A selecting table draws its checkbox where the call site puts it.**\n// `selection` on a column and on a cell renders the library's Checkbox in\n// React Aria's selection slot — the column's is select-all, the cell's is\n// that row's. It is a prop rather than an injected column because the header\n// and every row have to agree on how many columns there are, and only the\n// call site can keep that true.\n//\n// **A sortable column is the press target itself.** React Aria puts no\n// button inside the header cell; it makes the cell pressable and sets\n// `aria-sort` on it. So the arrow is content next to the name, and the\n// hover and pressed layers belong to the cell.\n//\n// **A numeric column aligns to the end, and says so twice.** The page sets\n// a column of numbers flush with the end of its cells, header included, so\n// the digits stack by place and the name sits over them. `align=\"end\"` on\n// the column moves its header, and on each cell moves that cell: React Aria\n// hands a cell nothing of its column's, so the two are the call site's to keep\n// together, as `selection` is. On the header the arrow goes before the name\n// rather than after it, as the page draws a sorted numeric column, so the\n// name meets the digits under it rather than standing an arrow's width short\n// of them. Both follow the writing direction.\n//\n// **The header sticks only when asked.** A sticky header needs an opaque\n// background to scroll rows under, and that colour is only right when the\n// table is in something that scrolls. `stickyHeader` is what says so.\n//\n// **Resizing is asked for twice, and both are needed.** React Aria puts the\n// resize state on a container around the table and the handle inside a\n// column, so `resizable` on the table is what brings the container and\n// `resizable` on a column is what draws its handle. The archived page has no\n// resizer to take a treatment from — it predates the feature — so the handle\n// draws the divider's own rule, thickening and taking the primary role while\n// it is dragged, over a target far wider than the rule.\n//\n// **A resizable table stops filling its width.** The container sets\n// `table-layout: fixed` and `width: min-content` on the table as inline\n// styles, which no rule here can outrank; the container fills the width\n// instead and scrolls when the columns together are wider than it.\n//\n// **And no column of it is narrower than its longest word.** A fixed layout\n// sizes columns without reading what is in them, so a column given less than\n// a word took the word apart, \"Waitin\" over \"g\", wherever a parent such as a\n// `Card` lets words break. So the container keeps words whole, and the table\n// measures what each column holds and hands React Aria that as the column's\n// `minWidth` — see `useColumnMinWidths`. Columns that stop fitting then\n// scroll in the container, as a wide table already does, and a handle stops\n// at the word rather than breaking it. A column given a `minWidth` of its own\n// keeps it.\n//\n// One thing about React Aria's collection is worth knowing before writing a\n// call site. **A column's `id` and a row's `id` share one namespace**, and a\n// value used by both silently drops every column — the table then throws\n// \"Cell count must match column count\", naming the cells rather than the\n// duplicate key that caused it. Nothing here can catch it, since both ids\n// are the call site's to choose; the docstrings below say to keep them\n// apart, and the stories and tests use `col`-prefixed column ids so the two\n// sets cannot meet.\n\n// What the selection checkboxes are called. A context rather than a prop on\n// every column and cell, since it is the table's decision and repeating it\n// per row is how the two drift. Undefined unless the table is given one,\n// which leaves the names React Aria gives in the reader's locale.\nconst SelectAllLabelContext = createContext<string | undefined>(undefined);\nconst SelectLabelContext = createContext<string | undefined>(undefined);\nconst styles = {\n cell: {\n kB7OPa: \"x9f619\",\n kg3NbH: \"x790zyz\",\n k9WMMc: \"x1yc453h\",\n kXLuUW: \"xxymvpz\",\n $$css: true\n },\n cellDisabled: {\n kSiTet: \"x1ppv7y9\",\n $$css: true\n },\n cellEnd: {\n k9WMMc: \"xp4054r\",\n $$css: true\n },\n focus: {\n kjBf7l: \"xrgy624 x1v8yhc2\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n header: {\n kZKoxP: \"x1ded5cy\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kVQacm: \"x9h1dke\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n headerHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n headerPressed: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n headerSortable: {\n kWkggS: \"xjbqb8w\",\n kkrTdU: \"x1ypdohk\",\n $$css: true\n },\n row: {\n kZKoxP: \"xdd8jsf\",\n kLZC3w: \"x12smttz\",\n kPef9Z: \"x13fuv20\",\n kEafiO: \"x1g31smg x178xt8z\",\n $$css: true\n },\n rowDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n rowSelected: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selection: {\n kzqmXN: \"x19ddzpn\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n selectionSelected: {\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n sticky: {\n kWkggS: \"x14s9m32\",\n kGVxlE: \"x1ixd52e\",\n k87sOh: \"x13vifvy\",\n kVAEAm: \"x7wzq59\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n table: {\n kLvRdT: \"x1mwwwfo\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kzqmXN: \"xh8yej3\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n }\n};\n\n/**\n * Which end of its cells a column's text sits at: `start` for words, `end`\n * for numbers, so the digits stack by place. Both follow the writing\n * direction.\n */\ntype TableAlign = 'end' | 'start';\ntype TableBodyProps<T extends object = object> = Omit<RACTableBodyProps<T>, 'className' | 'renderEmptyState' | 'style'> & {\n /** A function may compute the class from the body's render state. */\n className?: RACTableBodyProps<T>['className'];\n /**\n * What the table shows in place of rows when it has none: React Aria's own\n * render function, under React Aria's own name, as List, ListBox, Tree and\n * ChipGroup take it. What it returns is drawn in a row of its own spanning\n * every column, inside the muted, padded box the table draws there.\n */\n renderEmptyState?: RACTableBodyProps<T>['renderEmptyState'];\n /** A function may compute the style from the body's render state. */\n style?: RACTableBodyProps<T>['style'];\n};\ntype TableCellProps = {\n /**\n * Which end of the cell its text sits at. Give it the value its column was\n * given — React Aria hands a cell nothing of its column's, so a cell does\n * not follow the header on its own.\n * @default 'start'\n */\n align?: TableAlign;\n /** What the cell holds. */\n children?: ReactNode;\n /** A function may compute the class from the cell's render state. */\n className?: RACCellProps['className'];\n /**\n * Draws this row's selection checkbox instead of `children`. The row's own\n * text is what names the row; the box inside it takes the table's\n * `selectLabel`.\n */\n selection?: boolean;\n /** A function may compute the style from the cell's render state. */\n style?: RACCellProps['style'];\n} & Omit<RACCellProps, 'children' | 'className' | 'style'>;\ntype TableColumnProps = {\n /**\n * Which end of the header cell the name sits at. `end` is for a column of\n * numbers: the name goes against the end padding, over the digits, with\n * the sort arrow before it rather than after. Give the column's cells the\n * same `align`.\n * @default 'start'\n */\n align?: TableAlign;\n /** The column's name. */\n children?: ReactNode;\n /** A function may compute the class from the column's render state. */\n className?: RACColumnProps['className'];\n /**\n * Draws a handle at the column's trailing edge that drags its width. Needs\n * the table's own `resizable` as well — React Aria keeps the resize state\n * on a container around the table, and without it there is nothing for a\n * handle to change. `defaultWidth`, `minWidth` and `maxWidth` are React\n * Aria's and apply only inside that container.\n */\n resizable?: boolean;\n /**\n * Draws the select-all checkbox instead of `children`, for the column the\n * rows put their own checkboxes in.\n */\n selection?: boolean;\n /** A function may compute the style from the column's render state. */\n style?: RACColumnProps['style'];\n} & Omit<RACColumnProps, 'children' | 'className' | 'style'>;\ntype TableFooterProps<T extends object = object> = RACTableFooterProps<T>;\ntype TableHeaderProps<T extends object = object> = RACTableHeaderProps<T>;\ntype TableLoadMoreProps = Omit<RACTableLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\ntype TableProps = {\n /** A function may compute the class from the table's render state. */\n className?: RACTableProps['className'];\n /** Called as a column is dragged, with every column's width. */\n onResize?: ResizableTableContainerProps['onResize'];\n /** Called once a drag ends, with every column's width. */\n onResizeEnd?: ResizableTableContainerProps['onResizeEnd'];\n /**\n * Lets columns marked `resizable` be dragged, by putting the table in the\n * container React Aria keeps the resize state on. A resizable table sizes\n * to its columns rather than to its parent, and that container is what\n * fills the width and scrolls instead.\n */\n resizable?: boolean;\n /**\n * What the resize handle is called, for a screen reader. React Aria\n * composes it with the column's own name. Left out, React Aria names it in\n * the reader's locale — \"Resizer\" in English.\n */\n resizeLabel?: string;\n /**\n * What the select-all checkbox is called, for a screen reader. Left out,\n * React Aria names it in the reader's locale — \"Select All\" in English.\n */\n selectAllLabel?: string;\n /**\n * What each row's selection checkbox is called, for a screen reader. The\n * row's own text is what names the row; this names the box inside it.\n * Left out, React Aria names it in the reader's locale — \"Select\" in\n * English.\n */\n selectLabel?: string;\n /**\n * Holds the header row in place while the rows scroll under it. Needs the\n * table inside something that scrolls; on a table that does not, it draws\n * the same as without it.\n */\n stickyHeader?: boolean;\n /** A function may compute the style from the table's render state. */\n style?: RACTableProps['style'];\n} & Omit<RACTableProps, 'className' | 'style'>;\ntype TableRowProps<T extends object = object> = Omit<RACRowProps<T>, 'className' | 'style'> & {\n /** A function may compute the class from the row's render state. */\n className?: RACRowProps<T>['className'];\n /** A function may compute the style from the row's render state. */\n style?: RACRowProps<T>['style'];\n};\n\n// What the resize handles are called, for the same reason the selection\n// labels travel this way: it is the table's decision, and repeating it per\n// column is how the two drift. Undefined by default, as they are.\nconst ResizeLabelContext = createContext<string | undefined>(undefined);\n\n// Whether the table brought the container. React Aria's resizer throws\n// outright without one — \"Wrap your <Table> in a <ResizableTableContainer>\",\n// naming a component a consumer of this library never writes — so a column\n// asking to resize inside a table that does not would take the whole page\n// down. It draws no handle instead.\nconst ResizableContext = createContext(false);\n\n// Whether the header sticks, so a column reaches it without every call site\n// repeating the table's own decision on each one.\nconst StickyHeaderContext = createContext(false);\n\n// The narrowest each column of a resizable table can be with its words whole,\n// by the column's header cell. Empty for a table that does not resize, whose\n// columns size to what they hold anyway.\nconst NO_MIN_WIDTHS: ReadonlyMap<Element, number> = new Map();\nconst ColumnMinWidthsContext = createContext(NO_MIN_WIDTHS);\n\n// React Aria's own minimum for a column, which a measured one below it would\n// otherwise lower.\nconst REACT_ARIA_MIN_WIDTH = 75;\n\n// What a body cell draws, and the classes it draws with. Written as calls\n// rather than inline at the props, which is what react-perf's\n// no-new-function-as-prop and jsx-no-jsx-as-prop are after; the React\n// Compiler memoises the results on their inputs.\n// The return type is written out rather than inferred, here and in the two\n// below: `ReactNode` is a union that includes a promise, and a function\n// inferred as returning one has to be `async`.\nfunction cellContent(children: ReactNode, selection: boolean, label: string | undefined): ReactNode {\n if (!selection) {\n return children;\n }\n return <Checkbox aria-label={label} slot=\"selection\" />;\n}\n\n// A cell's classes, faded on a disabled row unless it holds the checkbox,\n// which draws its own disabled state, and handed back to forced colours on a\n// selected row when it does.\nfunction cellStyles(align: TableAlign, selection: boolean) {\n return (state: CellRenderProps) => stylex.props(styles.cell, align === 'end' && styles.cellEnd, styles.focus, selection ? styles.selection : state.isDisabled && styles.cellDisabled, selection && state.isSelected && styles.selectionSelected);\n}\nfunction columnContent(children: ReactNode, align: TableAlign, selection: boolean, label: string | undefined, resizable: boolean, resizeLabel: string | undefined): RACColumnProps['children'] {\n if (selection) {\n return <Checkbox aria-label={label} slot=\"selection\" />;\n }\n // The handle is a sibling of the name rather than part of it: React Aria\n // renders it as its own element, positioned against the cell's trailing\n // edge, which the name's own box does not reach.\n return (state: ColumnRenderProps): ReactNode => <>\n <span {...{\n 0: {\n className: \"x6s0dn4 x78zum5 x126z3so\"\n },\n 1: {\n className: \"x6s0dn4 x78zum5 x126z3so x15zctf7 x1nhvcw1\"\n }\n }[!!(align === 'end') << 0]}>\n {children}\n {sortArrowFor(state.sortDirection)}\n </span>\n {resizable ? <RACColumnResizer aria-label={resizeLabel} className=\"x5yr21d x9f619 xicojor xvy4d1p x13vifvy x18zu7yx x10l6tqk x5ve5x3 x1vjfegm\">\n {resizerRule}\n </RACColumnResizer> : null}\n </>;\n}\nfunction columnStyles(align: TableAlign, selection: boolean, sticky: boolean) {\n return (state: ColumnRenderProps) => stylex.props(styles.cell, align === 'end' && styles.cellEnd, styles.header, styles.focus, sticky && styles.sticky, selection && styles.selection, state.allowsSorting && styles.headerSortable, state.allowsSorting && state.isHovered && styles.headerHovered, state.allowsSorting && state.isPressed && styles.headerPressed);\n}\n\n// React Aria puts `aria-level` on the load-more row, and `aria-level` is only\n// valid on a row inside a `treegrid` — a grid's rows have no level. axe flags\n// it as `aria-conditional-attr`, and this library's stories run axe as an\n// error, so a table with a load-more row would fail on an attribute nothing\n// here asks for.\n//\n// It cannot be turned off through props: React Aria writes it after spreading\n// what the call site passed, so `aria-level={undefined}` is overwritten. The\n// attribute is taken off the element instead. React writes an attribute only\n// when its prop changes between renders, and this one is always 1, so the\n// removal holds rather than being undone by the next render. `load more` in\n// index.test.tsx pins that it is gone, which is what would notice if React\n// Aria stopped setting it or started varying it.\nfunction dropAriaLevel(node: HTMLTableRowElement | null) {\n node?.removeAttribute('aria-level');\n}\n\n// What the body draws in place of rows: whatever the call site's function\n// returns, inside the box that pads and centres it. A call rather than a\n// function written at the prop, for the same reason the others are.\n//\n// The box is the one thing this adds to React Aria's prop, and the one way\n// the table differs from its siblings, which pass theirs straight through and\n// draw nothing around it. A table's empty state goes in a spanning cell that\n// is not this component's and carries no padding, so without the box the\n// content would sit against the table's edge with no room around it.\nfunction emptyContent(renderEmptyState: (state: TableBodyRenderProps) => ReactNode) {\n // The return type is written out rather than inferred: `ReactNode` is a\n // union that includes a promise, and a function inferred as returning one\n // has to be `async`.\n return (state: TableBodyRenderProps): ReactNode => <span className=\"x9f619 x1w5n3ug x1lliihq xpo2rfv x193rfdd x1hews6w xn43zvd xv61bfh x1lrxzt4 x790zyz x2b8uid\">{renderEmptyState(state)}</span>;\n}\n\n/**\n * Each header cell's width with the table laid out to its content. A fixed\n * layout never reads a cell's content, so the table is laid out the other\n * way for the length of the measurement: automatically, at no width, and\n * with the widths React Aria put on the header cells lifted, which leaves\n * every column at the width of the longest word it holds, its padding\n * included. The styles are put back before returning, so nothing is painted\n * in between.\n */\nfunction measureColumns(table: HTMLTableElement): Map<Element, number> {\n const headers: HTMLTableCellElement[] = [];\n for (const row of table.tHead?.rows ?? []) {\n headers.push(...row.cells);\n }\n const held = [table, ...headers].map(element => [element, element.style.cssText] as const);\n table.style.tableLayout = 'auto';\n table.style.width = '0px';\n for (const header of headers) {\n header.style.width = '';\n }\n const widths = new Map(headers.map(header => [header, Math.ceil(header.getBoundingClientRect().width)]));\n for (const [element, css] of held) {\n element.style.cssText = css;\n }\n return widths;\n}\n\n// The container's class. React Aria takes a plain string here rather than a\n// function of render state, since the container reports none — so this is a\n// call rather than the function form the other parts pass.\nfunction resizableContainerClassName() {\n return {\n className: \"x9f619 xh8yej3 x1h4wwuj xw2csxc\"\n }.className ?? '';\n}\n\n// The rule a handle draws, from React Aria's own render state — it reports\n// the drag and the keyboard focus separately, and the two get one treatment.\nfunction resizerRule(state: ColumnResizerRenderProps): ReactNode {\n return <span {...{\n 0: {\n className: \"x1l12bh x5yr21d x1x0u81l xf1j0q2 xmzn1mo x9f619 x1g12otp x1i1rx1s x13vifvy x9q68il x47corl x10l6tqk\"\n },\n 1: {\n className: \"x5yr21d xf1j0q2 x9f619 x1g12otp x13vifvy x9q68il x47corl x10l6tqk xnety89 x1ksdfms x12inkfj xfo62xy\"\n }\n }[!!(state.isResizing || state.isFocusVisible) << 0]} />;\n}\nfunction rowStyles(state: RowRenderProps) {\n return stylex.props(styles.row,\n // The same ring a cell and a column header draw, and for the same\n // reason: React Aria moves focus to the row itself, so the row is where\n // it has to show. Unconditional, as it is on those two — `focus` carries\n // its own `:focus-visible`, and the browser's default ring is what shows\n // through without it: a colour and an offset the rest of the table does\n // not use, and one no forced-colours mode is obliged to keep.\n styles.focus,\n // The lists page's dragged row and the drop target a row draws, from\n // `src/row` as every other collection's row takes them — the dragged one\n // before the selected container, so a selected row keeps it while it\n // moves.\n state.isDragging && rowLayers.dragging, state.isSelected && styles.rowSelected,\n // The state layers come from the render state, which is what makes a\n // row that only runs an action — `onRowAction`, a row's `onAction` or\n // `href` — take them as a selectable one does: React Aria reports a row\n // hovered or pressed only when a press does something to it, whether\n // that is selecting it, running its action or dragging it.\n state.isHovered && rowLayers.hovered, state.isPressed && rowLayers.pressed, state.isDropTarget && rowLayers.dropTarget, state.isDisabled && styles.rowDisabled);\n}\n\n// The arrow beside a sorted column's name. Nothing is drawn on a column that\n// is sortable but not currently sorted: the page puts the arrow next to the\n// column being sorted, and an arrow on every sortable column would say every\n// one of them was.\nfunction sortArrowFor(direction: 'ascending' | 'descending' | undefined) {\n if (direction === undefined) {\n return null;\n }\n return direction === 'ascending' ? <ArrowUpwardGlyph className=\"xmix8c7 x2lah0s x1xp8n7a\" /> : <ArrowDownwardGlyph className=\"xmix8c7 x2lah0s x1xp8n7a\" />;\n}\n\n/**\n * A grid of rows and columns. Sorting and selection are React Aria's: pass\n * `sortDescriptor` with `onSortChange` and mark the sortable columns\n * `allowsSorting`, and set `selectionMode` to `single` or `multiple` with\n * `selectedKeys` and `onSelectionChange`, or `defaultSelectedKeys`.\n *\n * ```tsx\n * <Table aria-label=\"Label\" selectionMode=\"multiple\">\n * <Table.Header>\n * <Table.Column selection />\n * <Table.Column id=\"name\" isRowHeader>Label</Table.Column>\n * </Table.Header>\n * <Table.Body>\n * <Table.Row id=\"first\">\n * <Table.Cell selection />\n * <Table.Cell>First item</Table.Cell>\n * </Table.Row>\n * </Table.Body>\n * </Table>\n * ```\n *\n * Composed from parts, since a cell takes arbitrary content: `Table.Header`,\n * `Table.Column`, `Table.Body`, `Table.Row`, `Table.Cell` and\n * `Table.Footer`. Name the table with `aria-label` or `aria-labelledby`, and\n * mark one column `isRowHeader` so a screen reader has something to read a\n * row by.\n *\n * The call site's `className` and `style` land on the table, which is the\n * element a layout positions.\n */\nfunction Table({\n onResize,\n onResizeEnd,\n resizable = false,\n resizeLabel,\n selectAllLabel,\n selectLabel,\n stickyHeader = false,\n ...props\n}: RefAttributes<HTMLTableElement> & TableProps) {\n // Held as state rather than in a ref object, since the columns are\n // measured from an effect that has to run again when it changes, and only\n // for a table that resizes, so no other table renders twice for it. The\n // call site's ref lands on the same element, read off `props` for the\n // reason NavigationBar gives.\n const [element, setElement] = useState<HTMLTableElement | null>(null);\n const ref = useMemo(() => resizable ? mergeRefs<HTMLTableElement>(setElement, props.ref ?? undefined) : props.ref, [props.ref, resizable]);\n const minWidths = useColumnMinWidths(resizable ? element : null);\n const table = <RACTable {...props} {...mergeStatefulStyles(tableClasses, props)} ref={ref} />;\n return <SelectAllLabelContext value={selectAllLabel}>\n <SelectLabelContext value={selectLabel}>\n <ResizeLabelContext value={resizeLabel}>\n <ResizableContext value={resizable}>\n <StickyHeaderContext value={stickyHeader}>\n <ColumnMinWidthsContext value={minWidths}>\n {resizable ? <RACResizableTableContainer className={resizableContainerClassName()} onResize={onResize} onResizeEnd={onResizeEnd}>\n {table}\n </RACResizableTableContainer> : table}\n </ColumnMinWidthsContext>\n </StickyHeaderContext>\n </ResizableContext>\n </ResizeLabelContext>\n </SelectLabelContext>\n </SelectAllLabelContext>;\n}\n\n/**\n * The rows. `renderEmptyState` is what it shows when there are none — a table\n * with no rows and nothing to say in their place is a blank area with a\n * header over it.\n *\n * It carries no styles of its own, since every rule a body needs is drawn by\n * the rows inside it, so a `className` here lands on the `<tbody>` through\n * React Aria rather than through a merge.\n */\nfunction TableBody<T extends object = object>({\n renderEmptyState,\n ...props\n}: RefAttributes<HTMLTableSectionElement> & TableBodyProps<T>) {\n return <RACTableBody<T> {...props} renderEmptyState={renderEmptyState === undefined ? undefined : emptyContent(renderEmptyState)} />;\n}\n\n/**\n * One cell. `selection` draws this row's checkbox in place of whatever else\n * the cell would hold. On a disabled row the cell fades as a whole, so what\n * it holds fades with its text.\n */\nfunction TableCell({\n align = 'start',\n children,\n selection = false,\n ...props\n}: RefAttributes<HTMLTableCellElement> & TableCellProps) {\n const label = useContext(SelectLabelContext);\n return <RACCell {...props} {...mergeStatefulStyles(cellStyles(align, selection), props)}>\n {cellContent(children, selection, label)}\n </RACCell>;\n}\n\n// The table's own classes, with the drop target the other collections'\n// boxes draw while a drop would land on the table as a whole.\nfunction tableClasses(state: TableRenderProps) {\n return stylex.props(styles.table, state.isDropTarget && collectionStyles.dropTarget);\n}\n\n/**\n * One column. `allowsSorting` is React Aria's and makes the header cell\n * itself the control that sorts; the arrow appears on the column the\n * `sortDescriptor` names. `isRowHeader` marks the column a screen reader\n * reads a row by.\n *\n * Its `id` shares a namespace with the rows', so give the two sets values\n * that cannot collide — a column and a row with one id between them leaves\n * the table with no columns at all.\n */\nfunction TableColumn({\n align = 'start',\n children,\n resizable = false,\n selection = false,\n ...props\n}: RefAttributes<HTMLTableCellElement> & TableColumnProps) {\n const label = useContext(SelectAllLabelContext);\n const resizeLabel = useContext(ResizeLabelContext);\n const resizableTable = useContext(ResizableContext);\n const sticky = useContext(StickyHeaderContext);\n // The header cell, which is what the table's measurements are keyed by,\n // held only in a table that measures them.\n const [element, setElement] = useState<HTMLTableCellElement | null>(null);\n const ref = useMemo(() => resizableTable ? mergeRefs<HTMLTableCellElement>(setElement, props.ref ?? undefined) : props.ref, [props.ref, resizableTable]);\n const minWidths = useContext(ColumnMinWidthsContext);\n const measured = element === null ? undefined : minWidths.get(element);\n return <RACColumn {...props} {...mergeStatefulStyles(columnStyles(align, selection, sticky), props)} minWidth={props.minWidth ?? (measured === undefined ? undefined : Math.max(measured, REACT_ARIA_MIN_WIDTH))} ref={ref}>\n {columnContent(children, align, selection, label, resizable && resizableTable, resizeLabel)}\n </RACColumn>;\n}\n\n/**\n * A row under the body, for totals and the like. It is not part of the\n * selection or the keyboard navigation — React Aria keeps it out of both.\n */\nfunction TableFooter<T extends object = object>(props: RefAttributes<HTMLTableSectionElement> & TableFooterProps<T>) {\n return <RACTableFooter<T> {...props} {...mergeStyles({\n className: \"x12smttz x13fuv20 x178xt8z x1w5n3ug xkknnkr x14zspaw x1v9cpvo x155f00i x1lz68p4\"\n }, props)} />;\n}\n\n/**\n * The header row, holding the columns, and the rule drawn under it — which\n * moves to the cells when the header sticks, since a row group's border does\n * not travel with cells `position: sticky` has lifted out of it.\n */\nfunction TableHeader<T extends object = object>(props: RefAttributes<HTMLTableSectionElement> & TableHeaderProps<T>) {\n const sticky = useContext(StickyHeaderContext);\n return <RACTableHeader<T> {...props} {...mergeStatefulStyles({\n 0: {\n className: \"x1j6faob x1q0q8m5 xso031l\"\n },\n 1: {}\n }[!!sticky << 0], props)} />;\n}\n\n/**\n * The row the table shows while it is fetching more. React Aria calls\n * `onLoadMore` when this comes into view, and draws it only while\n * `isLoading`. It goes inside `Table.Body`, after the rows.\n */\nfunction TableLoadMore({\n label,\n ref,\n ...props\n}: RefAttributes<HTMLTableRowElement> & TableLoadMoreProps) {\n return <RACTableLoadMoreItem {...props} {...mergeStyles({\n className: \"xdd8jsf\"\n }, props)} ref={mergeRefs(dropAriaLevel, ref ?? undefined)}>\n <span className=\"x6s0dn4 x9f619 x78zum5 xl56j7k\">\n <CollectionLoadMore diameter=\"24px\" label={label} />\n </span>\n </RACTableLoadMoreItem>;\n}\n\n/**\n * One row. Give every row an `id` — that is the key selection is reported\n * by, and it has to differ from every column's. `onAction` runs when the\n * row is pressed.\n */\nfunction TableRow<T extends object = object>(props: RefAttributes<HTMLTableRowElement> & TableRowProps<T>) {\n return <RACRow<T> {...props} {...mergeStatefulStyles(rowStyles, props)} />;\n}\n\n/**\n * The narrowest each column of a resizable table can be with none of its\n * words broken, by the column's header cell, for the columns to take as\n * their minimum — see the header.\n *\n * Measured again when a row, a cell or its text changes, and when a font\n * finishes loading, which is when a word's width changes; never when the\n * table is resized, since what a column holds does not change with it.\n */\nfunction useColumnMinWidths(table: HTMLTableElement | null) {\n const [widths, setWidths] = useState(NO_MIN_WIDTHS);\n useLayoutEffect(() => {\n if (table === null) {\n return undefined;\n }\n const measure = () => {\n const next = measureColumns(table);\n setWidths(current => current.size === next.size && [...next].every(([header, width]) => current.get(header) === width) ? current : next);\n };\n measure();\n const changes = new MutationObserver(measure);\n changes.observe(table, {\n characterData: true,\n childList: true,\n subtree: true\n });\n document.fonts.addEventListener('loadingdone', measure);\n return () => {\n changes.disconnect();\n document.fonts.removeEventListener('loadingdone', measure);\n };\n }, [table]);\n return widths;\n}\nTable.Body = TableBody;\nTable.Cell = TableCell;\nTable.Column = TableColumn;\nTable.Footer = TableFooter;\nTable.Header = TableHeader;\nTable.LoadMore = TableLoadMore;\nTable.Row = TableRow;\nexport type { TableAlign, TableBodyProps, TableCellProps, TableColumnProps, TableFooterProps, TableHeaderProps, TableLoadMoreProps, TableProps, TableRowProps };\nexport { TableBody, TableCell, TableColumn, TableFooter, TableHeader, TableLoadMore, TableRow };\nexport default Table;"],"mappings":";;;;;;;;;;;;;;AAiHA,MAAMqB,wBAAwBnB,cAAkCoB,KAAAA,CAAS;AACzE,MAAMC,qBAAqBrB,cAAkCoB,KAAAA,CAAS;AACtE,MAAME,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,cAAc;EACZC,QAAQ;EACRF,OAAO;CACT;CACAG,SAAS;EACPL,QAAQ;EACRE,OAAO;CACT;CACAI,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,OAAO;CACT;CACAS,QAAQ;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAA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AAO;CAAC,OACJjB;AAAM;AAEf/G,MAAM8K,OAAO7K;AACbD,MAAMJ,OAAOqJ;AACbjJ,MAAMF,SAASqJ;AACfnJ,MAAM+K,SAAS7K;AACfF,MAAMgL,SAAS7K;AACfH,MAAMiL,WAAWtB;AACjB3J,MAAMD,MAAM6J"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useLayoutEffect","useState","Cell","RACCell","Column","Row","Table","TableBody","TableFooter","TableHeader","RACTableLoadMoreItem","collectionStyles","useScrollEdges","mergeRefs","rowStyles","rowLayers","mergeStatefulStyles","mergeStyles","scrollFadeOf","SelectAllLabelContext","undefined","SelectLabelContext","styles","cell","kB7OPa","kg3NbH","k9WMMc","kXLuUW","$$css","cellDisabled","kSiTet","cellEnd","focus","kjBf7l","kInvED","k3XXqK","kMeerF","header","kZKoxP","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kVQacm","kVAEAm","headerHovered","kWkggS","headerPressed","headerSortable","kkrTdU","resizableContainer","kzqmXN","kHjlTd","kXHlph","row","kLZC3w","kPef9Z","kEafiO","rowDisabled","kAXs8y","rowSelected","selection","khDVqt","selectionSelected","sticky","kGVxlE","k87sOh","kY2c9j","table","kLvRdT","className","renderEmptyState","style","align","children","resizable","label","onResize","onResizeEnd","resizeLabel","selectAllLabel","selectLabel","stickyHeader","ResizeLabelContext","ResizableContext","StickyHeaderContext","NO_MIN_WIDTHS","Map","ColumnMinWidthsContext","REACT_ARIA_MIN_WIDTH","cellContent","cellStyles","state","props","isDisabled","isSelected","columnContent","sortArrowFor","sortDirection","resizerRule","columnStyles","allowsSorting","isHovered","isPressed","dropAriaLevel","node","removeAttribute","emptyContent","measureColumns","headers","tHead","rows","push","cells","held","map","element","cssText","tableLayout","width","widths","Math","ceil","getBoundingClientRect","css","resizableContainerClassName","edges","isResizing","isFocusVisible","isDragging","dragging","hovered","pressed","isDropTarget","dropTarget","direction","t0","$","t1","t2","setElement","t3","ref","minWidths","useColumnMinWidths","container","setContainer","t4","tableClasses","t5","t6","t7","t8","t9","t10","t11","t12","TableCell","T0","focusVisible","TableColumn","resizableTable","get","measured","minWidth","max","0","1","TableLoadMore","TableRow","setWidths","measure","next","current","size","every","changes","MutationObserver","observe","characterData","childList","subtree","document","fonts","addEventListener","disconnect","removeEventListener","Body","Footer","Header","LoadMore","RACColumnResizer","RACTable","RACResizableTableContainer","RACTableBody","RACColumn","RACTableFooter","RACTableHeader","RACRow"],"sources":["../../../src/components/table/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { CellRenderProps, ColumnRenderProps, ColumnResizerRenderProps, CellProps as RACCellProps, ColumnProps as RACColumnProps, RowProps as RACRowProps, TableBodyProps as RACTableBodyProps, TableFooterProps as RACTableFooterProps, TableHeaderProps as RACTableHeaderProps, TableLoadMoreItemProps as RACTableLoadMoreItemProps, TableProps as RACTableProps, ResizableTableContainerProps, RowRenderProps, TableBodyRenderProps, TableRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useContext, useLayoutEffect, useMemo, useState } from 'react';\nimport { Cell as RACCell, Column as RACColumn, ColumnResizer as RACColumnResizer, ResizableTableContainer as RACResizableTableContainer, Row as RACRow, Table as RACTable, TableBody as RACTableBody, TableFooter as RACTableFooter, TableHeader as RACTableHeader, TableLoadMoreItem as RACTableLoadMoreItem } from 'react-aria-components';\nimport type { ScrollEdges } from '../../hooks/useScrollEdges';\nimport { CollectionLoadMore } from '../../collection';\nimport { collectionStyles } from '../../collection/styles';\nimport { ArrowDownwardGlyph, ArrowUpwardGlyph } from '../../glyphs';\nimport { useScrollEdges } from '../../hooks/useScrollEdges';\nimport { mergeRefs } from '../../render/ref';\nimport { rowStyles as rowLayers } from '../../row/styles';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport { scrollFadeOf } from '../../styles/scroll-fade';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport Checkbox from '../checkbox';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// A grid of rows and columns, with sorting and selection. The design system\n// carries no data table page — it was dropped after Material Design 2 — so\n// the geometry comes from the archived one at\n// <https://m2.material.io/components/data-tables>, which is the page this\n// component is drawn from: a 56dp header row, 52dp body rows, 16dp of\n// padding on each side of a cell, a medium-weight header to set it apart\n// from the rows, and an arrow beside the name of the column being sorted.\n//\n// Its colour roles are the current system's rather than that page's, since\n// a table sits beside lists, cards and menus that all draw from the tokens\n// here. That means the row's state layers are the ones `src/row` uses — the\n// same hover, pressed and selected treatment a list row takes — so a\n// selected table row and a selected list row on one page cannot disagree.\n//\n// The row is not `src/row`, and that is the one place this departs from the\n// library's other collections. That module's row is a headline with a\n// supporting line and a slot at each end; a table row is a run of cells with\n// no such shape, and forcing one into the other would give every cell the\n// row's 56dp floor and body-large headline. The state layers are shared by\n// being written from the same tokens rather than by sharing the module.\n//\n// Four things are this component's own.\n//\n// **The rule between rows is drawn on the row, not on its cells.** A cell\n// cannot see whether its row is the first one, so a rule per cell either\n// doubles under the header or needs the row's position passed down. The\n// table collapses its borders, which is what lets a `<tr>` carry one.\n//\n// **A selecting table draws its checkbox where the call site puts it.**\n// `selection` on a column and on a cell renders the library's Checkbox in\n// React Aria's selection slot — the column's is select-all, the cell's is\n// that row's. It is a prop rather than an injected column because the header\n// and every row have to agree on how many columns there are, and only the\n// call site can keep that true.\n//\n// **A sortable column is the press target itself.** React Aria puts no\n// button inside the header cell; it makes the cell pressable and sets\n// `aria-sort` on it. So the arrow is content next to the name, and the\n// hover and pressed layers belong to the cell.\n//\n// **A numeric column aligns to the end, and says so twice.** The page sets\n// a column of numbers flush with the end of its cells, header included, so\n// the digits stack by place and the name sits over them. `align=\"end\"` on\n// the column moves its header, and on each cell moves that cell: React Aria\n// hands a cell nothing of its column's, so the two are the call site's to keep\n// together, as `selection` is. On the header the arrow goes before the name\n// rather than after it, as the page draws a sorted numeric column, so the\n// name meets the digits under it rather than standing an arrow's width short\n// of them. Both follow the writing direction.\n//\n// **The header sticks only when asked.** A sticky header needs an opaque\n// background to scroll rows under, and that colour is only right when the\n// table is in something that scrolls. `stickyHeader` is what says so.\n//\n// **Resizing is asked for twice, and both are needed.** React Aria puts the\n// resize state on a container around the table and the handle inside a\n// column, so `resizable` on the table is what brings the container and\n// `resizable` on a column is what draws its handle. The archived page has no\n// resizer to take a treatment from — it predates the feature — so the handle\n// draws the divider's own rule, thickening and taking the primary role while\n// it is dragged, over a target far wider than the rule.\n//\n// **A resizable table stops filling its width.** The container sets\n// `table-layout: fixed` and `width: min-content` on the table as inline\n// styles, which no rule here can outrank; the container fills the width\n// instead and scrolls when the columns together are wider than it.\n//\n// **And no column of it is narrower than its longest word.** A fixed layout\n// sizes columns without reading what is in them, so a column given less than\n// a word took the word apart, \"Waitin\" over \"g\", wherever a parent such as a\n// `Card` lets words break. So the container keeps words whole, and the table\n// measures what each column holds and hands React Aria that as the column's\n// `minWidth` — see `useColumnMinWidths`. Columns that stop fitting then\n// scroll in the container, as a wide table already does, and a handle stops\n// at the word rather than breaking it. A column given a `minWidth` of its own\n// keeps it.\n//\n// One thing about React Aria's collection is worth knowing before writing a\n// call site. **A column's `id` and a row's `id` share one namespace**, and a\n// value used by both silently drops every column — the table then throws\n// \"Cell count must match column count\", naming the cells rather than the\n// duplicate key that caused it. Nothing here can catch it, since both ids\n// are the call site's to choose; the docstrings below say to keep them\n// apart, and the stories and tests use `col`-prefixed column ids so the two\n// sets cannot meet.\n\n// What the selection checkboxes are called. A context rather than a prop on\n// every column and cell, since it is the table's decision and repeating it\n// per row is how the two drift. Undefined unless the table is given one,\n// which leaves the names React Aria gives in the reader's locale.\nconst SelectAllLabelContext = createContext<string | undefined>(undefined);\nconst SelectLabelContext = createContext<string | undefined>(undefined);\nconst styles = {\n cell: {\n kB7OPa: \"x9f619\",\n kg3NbH: \"x790zyz\",\n k9WMMc: \"x1yc453h\",\n kXLuUW: \"xxymvpz\",\n $$css: true\n },\n cellDisabled: {\n kSiTet: \"x1ppv7y9\",\n $$css: true\n },\n cellEnd: {\n k9WMMc: \"xp4054r\",\n $$css: true\n },\n focus: {\n kjBf7l: \"xat36cu x1v8yhc2\",\n kInvED: \"x1v57pqu\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1s780dp\",\n $$css: true\n },\n header: {\n kZKoxP: \"x1ded5cy\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kVQacm: \"x9h1dke\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n headerHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n headerPressed: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n headerSortable: {\n kWkggS: \"xjbqb8w\",\n kkrTdU: \"x1ypdohk\",\n $$css: true\n },\n resizableContainer: {\n kB7OPa: \"x9f619\",\n kzqmXN: \"xh8yej3\",\n kHjlTd: \"x1h4wwuj\",\n kXHlph: \"xw2csxc\",\n $$css: true\n },\n row: {\n kZKoxP: \"xdd8jsf\",\n kLZC3w: \"x12smttz\",\n kPef9Z: \"x13fuv20\",\n kEafiO: \"x1g31smg x178xt8z\",\n $$css: true\n },\n rowDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n rowSelected: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selection: {\n kzqmXN: \"x19ddzpn\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n selectionSelected: {\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n sticky: {\n kWkggS: \"x14s9m32\",\n kGVxlE: \"x1ixd52e\",\n k87sOh: \"x13vifvy\",\n kVAEAm: \"x7wzq59\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n table: {\n kLvRdT: \"x1mwwwfo\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kzqmXN: \"xh8yej3\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n }\n};\n\n/**\n * Which end of its cells a column's text sits at: `start` for words, `end`\n * for numbers, so the digits stack by place. Both follow the writing\n * direction.\n */\ntype TableAlign = 'end' | 'start';\ntype TableBodyProps<T extends object = object> = Omit<RACTableBodyProps<T>, 'className' | 'renderEmptyState' | 'style'> & {\n /** A function may compute the class from the body's render state. */\n className?: RACTableBodyProps<T>['className'];\n /**\n * What the table shows in place of rows when it has none: React Aria's own\n * render function, under React Aria's own name, as List, ListBox, Tree and\n * ChipGroup take it. What it returns is drawn in a row of its own spanning\n * every column, inside the muted, padded box the table draws there.\n */\n renderEmptyState?: RACTableBodyProps<T>['renderEmptyState'];\n /** A function may compute the style from the body's render state. */\n style?: RACTableBodyProps<T>['style'];\n};\ntype TableCellProps = {\n /**\n * Which end of the cell its text sits at. Give it the value its column was\n * given — React Aria hands a cell nothing of its column's, so a cell does\n * not follow the header on its own.\n * @default 'start'\n */\n align?: TableAlign;\n /** What the cell holds. */\n children?: ReactNode;\n /** A function may compute the class from the cell's render state. */\n className?: RACCellProps['className'];\n /**\n * Draws this row's selection checkbox instead of `children`. The row's own\n * text is what names the row; the box inside it takes the table's\n * `selectLabel`.\n */\n selection?: boolean;\n /** A function may compute the style from the cell's render state. */\n style?: RACCellProps['style'];\n} & Omit<RACCellProps, 'children' | 'className' | 'style'>;\ntype TableColumnProps = {\n /**\n * Which end of the header cell the name sits at. `end` is for a column of\n * numbers: the name goes against the end padding, over the digits, with\n * the sort arrow before it rather than after. Give the column's cells the\n * same `align`.\n * @default 'start'\n */\n align?: TableAlign;\n /** The column's name. */\n children?: ReactNode;\n /** A function may compute the class from the column's render state. */\n className?: RACColumnProps['className'];\n /**\n * Draws a handle at the column's trailing edge that drags its width. Needs\n * the table's own `resizable` as well — React Aria keeps the resize state\n * on a container around the table, and without it there is nothing for a\n * handle to change. `defaultWidth`, `minWidth` and `maxWidth` are React\n * Aria's and apply only inside that container.\n */\n resizable?: boolean;\n /**\n * Draws the select-all checkbox instead of `children`, for the column the\n * rows put their own checkboxes in.\n */\n selection?: boolean;\n /** A function may compute the style from the column's render state. */\n style?: RACColumnProps['style'];\n} & Omit<RACColumnProps, 'children' | 'className' | 'style'>;\ntype TableFooterProps<T extends object = object> = RACTableFooterProps<T>;\ntype TableHeaderProps<T extends object = object> = RACTableHeaderProps<T>;\ntype TableLoadMoreProps = Omit<RACTableLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\ntype TableProps = {\n /** A function may compute the class from the table's render state. */\n className?: RACTableProps['className'];\n /** Called as a column is dragged, with every column's width. */\n onResize?: ResizableTableContainerProps['onResize'];\n /** Called once a drag ends, with every column's width. */\n onResizeEnd?: ResizableTableContainerProps['onResizeEnd'];\n /**\n * Lets columns marked `resizable` be dragged, by putting the table in the\n * container React Aria keeps the resize state on. A resizable table sizes\n * to its columns rather than to its parent, and that container is what\n * fills the width and scrolls instead.\n */\n resizable?: boolean;\n /**\n * What the resize handle is called, for a screen reader. React Aria\n * composes it with the column's own name. Left out, React Aria names it in\n * the reader's locale — \"Resizer\" in English.\n */\n resizeLabel?: string;\n /**\n * What the select-all checkbox is called, for a screen reader. Left out,\n * React Aria names it in the reader's locale — \"Select All\" in English.\n */\n selectAllLabel?: string;\n /**\n * What each row's selection checkbox is called, for a screen reader. The\n * row's own text is what names the row; this names the box inside it.\n * Left out, React Aria names it in the reader's locale — \"Select\" in\n * English.\n */\n selectLabel?: string;\n /**\n * Holds the header row in place while the rows scroll under it. Needs the\n * table inside something that scrolls; on a table that does not, it draws\n * the same as without it.\n */\n stickyHeader?: boolean;\n /** A function may compute the style from the table's render state. */\n style?: RACTableProps['style'];\n} & Omit<RACTableProps, 'className' | 'style'>;\ntype TableRowProps<T extends object = object> = Omit<RACRowProps<T>, 'className' | 'style'> & {\n /** A function may compute the class from the row's render state. */\n className?: RACRowProps<T>['className'];\n /** A function may compute the style from the row's render state. */\n style?: RACRowProps<T>['style'];\n};\n\n// What the resize handles are called, for the same reason the selection\n// labels travel this way: it is the table's decision, and repeating it per\n// column is how the two drift. Undefined by default, as they are.\nconst ResizeLabelContext = createContext<string | undefined>(undefined);\n\n// Whether the table brought the container. React Aria's resizer throws\n// outright without one — \"Wrap your <Table> in a <ResizableTableContainer>\",\n// naming a component a consumer of this library never writes — so a column\n// asking to resize inside a table that does not would take the whole page\n// down. It draws no handle instead.\nconst ResizableContext = createContext(false);\n\n// Whether the header sticks, so a column reaches it without every call site\n// repeating the table's own decision on each one.\nconst StickyHeaderContext = createContext(false);\n\n// The narrowest each column of a resizable table can be with its words whole,\n// by the column's header cell. Empty for a table that does not resize, whose\n// columns size to what they hold anyway.\nconst NO_MIN_WIDTHS: ReadonlyMap<Element, number> = new Map();\nconst ColumnMinWidthsContext = createContext(NO_MIN_WIDTHS);\n\n// React Aria's own minimum for a column, which a measured one below it would\n// otherwise lower.\nconst REACT_ARIA_MIN_WIDTH = 75;\n\n// What a body cell draws, and the classes it draws with. Written as calls\n// rather than inline at the props, which is what react-perf's\n// no-new-function-as-prop and jsx-no-jsx-as-prop are after; the React\n// Compiler memoises the results on their inputs.\n// The return type is written out rather than inferred, here and in the two\n// below: `ReactNode` is a union that includes a promise, and a function\n// inferred as returning one has to be `async`.\nfunction cellContent(children: ReactNode, selection: boolean, label: string | undefined): ReactNode {\n if (!selection) {\n return children;\n }\n return <Checkbox aria-label={label} slot=\"selection\" />;\n}\n\n// A cell's classes, faded on a disabled row unless it holds the checkbox,\n// which draws its own disabled state, and handed back to forced colours on a\n// selected row when it does.\nfunction cellStyles(align: TableAlign, selection: boolean) {\n return (state: CellRenderProps) => stylex.props(styles.cell, align === 'end' && styles.cellEnd, styles.focus, selection ? styles.selection : state.isDisabled && styles.cellDisabled, selection && state.isSelected && styles.selectionSelected);\n}\nfunction columnContent(children: ReactNode, align: TableAlign, selection: boolean, label: string | undefined, resizable: boolean, resizeLabel: string | undefined): RACColumnProps['children'] {\n if (selection) {\n return <Checkbox aria-label={label} slot=\"selection\" />;\n }\n // The handle is a sibling of the name rather than part of it: React Aria\n // renders it as its own element, positioned against the cell's trailing\n // edge, which the name's own box does not reach.\n return (state: ColumnRenderProps): ReactNode => <>\n <span {...{\n 0: {\n className: \"x6s0dn4 x78zum5 x126z3so\"\n },\n 1: {\n className: \"x6s0dn4 x78zum5 x126z3so x15zctf7 x1nhvcw1\"\n }\n }[!!(align === 'end') << 0]}>\n {children}\n {sortArrowFor(state.sortDirection)}\n </span>\n {resizable ? <RACColumnResizer aria-label={resizeLabel} className=\"x5yr21d x9f619 xicojor xvy4d1p x13vifvy x18zu7yx x10l6tqk x5ve5x3 x1vjfegm\">\n {resizerRule}\n </RACColumnResizer> : null}\n </>;\n}\nfunction columnStyles(align: TableAlign, selection: boolean, sticky: boolean) {\n return (state: ColumnRenderProps) => stylex.props(styles.cell, align === 'end' && styles.cellEnd, styles.header, styles.focus, sticky && styles.sticky, selection && styles.selection, state.allowsSorting && styles.headerSortable, state.allowsSorting && state.isHovered && styles.headerHovered, state.allowsSorting && state.isPressed && styles.headerPressed);\n}\n\n// React Aria puts `aria-level` on the load-more row, and `aria-level` is only\n// valid on a row inside a `treegrid` — a grid's rows have no level. axe flags\n// it as `aria-conditional-attr`, and this library's stories run axe as an\n// error, so a table with a load-more row would fail on an attribute nothing\n// here asks for.\n//\n// It cannot be turned off through props: React Aria writes it after spreading\n// what the call site passed, so `aria-level={undefined}` is overwritten. The\n// attribute is taken off the element instead. React writes an attribute only\n// when its prop changes between renders, and this one is always 1, so the\n// removal holds rather than being undone by the next render. `load more` in\n// index.test.tsx pins that it is gone, which is what would notice if React\n// Aria stopped setting it or started varying it.\nfunction dropAriaLevel(node: HTMLTableRowElement | null) {\n node?.removeAttribute('aria-level');\n}\n\n// What the body draws in place of rows: whatever the call site's function\n// returns, inside the box that pads and centres it. A call rather than a\n// function written at the prop, for the same reason the others are.\n//\n// The box is the one thing this adds to React Aria's prop, and the one way\n// the table differs from its siblings, which pass theirs straight through and\n// draw nothing around it. A table's empty state goes in a spanning cell that\n// is not this component's and carries no padding, so without the box the\n// content would sit against the table's edge with no room around it.\nfunction emptyContent(renderEmptyState: (state: TableBodyRenderProps) => ReactNode) {\n // The return type is written out rather than inferred: `ReactNode` is a\n // union that includes a promise, and a function inferred as returning one\n // has to be `async`.\n return (state: TableBodyRenderProps): ReactNode => <span className=\"x9f619 x1w5n3ug x1lliihq xpo2rfv x193rfdd x1hews6w xn43zvd xv61bfh x1lrxzt4 x790zyz x2b8uid\">{renderEmptyState(state)}</span>;\n}\n\n/**\n * Each header cell's width with the table laid out to its content. A fixed\n * layout never reads a cell's content, so the table is laid out the other\n * way for the length of the measurement: automatically, at no width, and\n * with the widths React Aria put on the header cells lifted, which leaves\n * every column at the width of the longest word it holds, its padding\n * included. The styles are put back before returning, so nothing is painted\n * in between.\n */\nfunction measureColumns(table: HTMLTableElement): Map<Element, number> {\n const headers: HTMLTableCellElement[] = [];\n for (const row of table.tHead?.rows ?? []) {\n headers.push(...row.cells);\n }\n const held = [table, ...headers].map(element => [element, element.style.cssText] as const);\n table.style.tableLayout = 'auto';\n table.style.width = '0px';\n for (const header of headers) {\n header.style.width = '';\n }\n const widths = new Map(headers.map(header => [header, Math.ceil(header.getBoundingClientRect().width)]));\n for (const [element, css] of held) {\n element.style.cssText = css;\n }\n return widths;\n}\n\n// The container's class. React Aria takes a plain string here rather than a\n// function of render state, since the container reports none — so this is a\n// call rather than the function form the other parts pass. It carries the\n// fade on whichever edge has columns past it, from src/styles/scroll-fade.ts.\nfunction resizableContainerClassName(edges: ScrollEdges) {\n return stylex.props(styles.resizableContainer, scrollFadeOf(edges)).className ?? '';\n}\n\n// The rule a handle draws, from React Aria's own render state — it reports\n// the drag and the keyboard focus separately, and the two get one treatment.\nfunction resizerRule(state: ColumnResizerRenderProps): ReactNode {\n return <span {...{\n 0: {\n className: \"x1l12bh x5yr21d x1x0u81l xf1j0q2 xmzn1mo x9f619 x1g12otp x1i1rx1s x13vifvy x9q68il x47corl x10l6tqk\"\n },\n 1: {\n className: \"x5yr21d xf1j0q2 x9f619 x1g12otp x13vifvy x9q68il x47corl x10l6tqk xnety89 x1ksdfms x12inkfj xfo62xy\"\n }\n }[!!(state.isResizing || state.isFocusVisible) << 0]} />;\n}\nfunction rowStyles(state: RowRenderProps) {\n return stylex.props(styles.row,\n // The same ring a cell and a column header draw, and for the same\n // reason: React Aria moves focus to the row itself, so the row is where\n // it has to show. Unconditional, as it is on those two — `focus` carries\n // its own `:focus-visible`, and the browser's default ring is what shows\n // through without it: a colour and an offset the rest of the table does\n // not use, and one no forced-colours mode is obliged to keep.\n styles.focus,\n // The lists page's dragged row and the drop target a row draws, from\n // `src/row` as every other collection's row takes them — the dragged one\n // before the selected container, so a selected row keeps it while it\n // moves.\n state.isDragging && rowLayers.dragging, state.isSelected && styles.rowSelected,\n // The state layers come from the render state, which is what makes a\n // row that only runs an action — `onRowAction`, a row's `onAction` or\n // `href` — take them as a selectable one does: React Aria reports a row\n // hovered or pressed only when a press does something to it, whether\n // that is selecting it, running its action or dragging it.\n state.isHovered && rowLayers.hovered, state.isPressed && rowLayers.pressed, state.isDropTarget && rowLayers.dropTarget, state.isDisabled && styles.rowDisabled);\n}\n\n// The arrow beside a sorted column's name. Nothing is drawn on a column that\n// is sortable but not currently sorted: the page puts the arrow next to the\n// column being sorted, and an arrow on every sortable column would say every\n// one of them was.\nfunction sortArrowFor(direction: 'ascending' | 'descending' | undefined) {\n if (direction === undefined) {\n return null;\n }\n return direction === 'ascending' ? <ArrowUpwardGlyph className=\"xmix8c7 x2lah0s x1xp8n7a\" /> : <ArrowDownwardGlyph className=\"xmix8c7 x2lah0s x1xp8n7a\" />;\n}\n\n/**\n * A grid of rows and columns. Sorting and selection are React Aria's: pass\n * `sortDescriptor` with `onSortChange` and mark the sortable columns\n * `allowsSorting`, and set `selectionMode` to `single` or `multiple` with\n * `selectedKeys` and `onSelectionChange`, or `defaultSelectedKeys`.\n *\n * ```tsx\n * <Table aria-label=\"Label\" selectionMode=\"multiple\">\n * <Table.Header>\n * <Table.Column selection />\n * <Table.Column id=\"name\" isRowHeader>Label</Table.Column>\n * </Table.Header>\n * <Table.Body>\n * <Table.Row id=\"first\">\n * <Table.Cell selection />\n * <Table.Cell>First item</Table.Cell>\n * </Table.Row>\n * </Table.Body>\n * </Table>\n * ```\n *\n * Composed from parts, since a cell takes arbitrary content: `Table.Header`,\n * `Table.Column`, `Table.Body`, `Table.Row`, `Table.Cell` and\n * `Table.Footer`. Name the table with `aria-label` or `aria-labelledby`, and\n * mark one column `isRowHeader` so a screen reader has something to read a\n * row by.\n *\n * The call site's `className` and `style` land on the table, which is the\n * element a layout positions.\n */\nfunction Table({\n onResize,\n onResizeEnd,\n resizable = false,\n resizeLabel,\n selectAllLabel,\n selectLabel,\n stickyHeader = false,\n ...props\n}: RefAttributes<HTMLTableElement> & TableProps) {\n // Held as state rather than in a ref object, since the columns are\n // measured from an effect that has to run again when it changes, and only\n // for a table that resizes, so no other table renders twice for it. The\n // call site's ref lands on the same element, read off `props` for the\n // reason NavigationBar gives.\n const [element, setElement] = useState<HTMLTableElement | null>(null);\n const ref = useMemo(() => resizable ? mergeRefs<HTMLTableElement>(setElement, props.ref ?? undefined) : props.ref, [props.ref, resizable]);\n const minWidths = useColumnMinWidths(resizable ? element : null);\n // The box a resizable table scrolls in, measured for the edges with\n // columns past them. A table that does not resize has no such box.\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const edges = useScrollEdges(resizable ? container : null);\n const table = <RACTable {...props} {...mergeStatefulStyles(tableClasses, props)} ref={ref} />;\n return <SelectAllLabelContext value={selectAllLabel}>\n <SelectLabelContext value={selectLabel}>\n <ResizeLabelContext value={resizeLabel}>\n <ResizableContext value={resizable}>\n <StickyHeaderContext value={stickyHeader}>\n <ColumnMinWidthsContext value={minWidths}>\n {resizable ? <RACResizableTableContainer className={resizableContainerClassName(edges)} onResize={onResize} onResizeEnd={onResizeEnd} ref={setContainer}>\n {table}\n </RACResizableTableContainer> : table}\n </ColumnMinWidthsContext>\n </StickyHeaderContext>\n </ResizableContext>\n </ResizeLabelContext>\n </SelectLabelContext>\n </SelectAllLabelContext>;\n}\n\n/**\n * The rows. `renderEmptyState` is what it shows when there are none — a table\n * with no rows and nothing to say in their place is a blank area with a\n * header over it.\n *\n * It carries no styles of its own, since every rule a body needs is drawn by\n * the rows inside it, so a `className` here lands on the `<tbody>` through\n * React Aria rather than through a merge.\n */\nfunction TableBody<T extends object = object>({\n renderEmptyState,\n ...props\n}: RefAttributes<HTMLTableSectionElement> & TableBodyProps<T>) {\n return <RACTableBody<T> {...props} renderEmptyState={renderEmptyState === undefined ? undefined : emptyContent(renderEmptyState)} />;\n}\n\n/**\n * One cell. `selection` draws this row's checkbox in place of whatever else\n * the cell would hold. On a disabled row the cell fades as a whole, so what\n * it holds fades with its text.\n */\nfunction TableCell({\n align = 'start',\n children,\n selection = false,\n ...props\n}: RefAttributes<HTMLTableCellElement> & TableCellProps) {\n const label = useContext(SelectLabelContext);\n return <RACCell {...props} {...mergeStatefulStyles(cellStyles(align, selection), props)}>\n {cellContent(children, selection, label)}\n </RACCell>;\n}\n\n// The table's own classes, with the ring and the drop target the other\n// collections' boxes draw: the ring while the table holds keyboard focus\n// itself, which React Aria gives it only while it has no rows, and the drop\n// target while a drop would land on the table as a whole.\nfunction tableClasses(state: TableRenderProps) {\n return stylex.props(styles.table, state.isFocusVisible && collectionStyles.focusVisible, state.isDropTarget && collectionStyles.dropTarget);\n}\n\n/**\n * One column. `allowsSorting` is React Aria's and makes the header cell\n * itself the control that sorts; the arrow appears on the column the\n * `sortDescriptor` names. `isRowHeader` marks the column a screen reader\n * reads a row by.\n *\n * Its `id` shares a namespace with the rows', so give the two sets values\n * that cannot collide — a column and a row with one id between them leaves\n * the table with no columns at all.\n */\nfunction TableColumn({\n align = 'start',\n children,\n resizable = false,\n selection = false,\n ...props\n}: RefAttributes<HTMLTableCellElement> & TableColumnProps) {\n const label = useContext(SelectAllLabelContext);\n const resizeLabel = useContext(ResizeLabelContext);\n const resizableTable = useContext(ResizableContext);\n const sticky = useContext(StickyHeaderContext);\n // The header cell, which is what the table's measurements are keyed by,\n // held only in a table that measures them.\n const [element, setElement] = useState<HTMLTableCellElement | null>(null);\n const ref = useMemo(() => resizableTable ? mergeRefs<HTMLTableCellElement>(setElement, props.ref ?? undefined) : props.ref, [props.ref, resizableTable]);\n const minWidths = useContext(ColumnMinWidthsContext);\n const measured = element === null ? undefined : minWidths.get(element);\n return <RACColumn {...props} {...mergeStatefulStyles(columnStyles(align, selection, sticky), props)} minWidth={props.minWidth ?? (measured === undefined ? undefined : Math.max(measured, REACT_ARIA_MIN_WIDTH))} ref={ref}>\n {columnContent(children, align, selection, label, resizable && resizableTable, resizeLabel)}\n </RACColumn>;\n}\n\n/**\n * A row under the body, for totals and the like. It is not part of the\n * selection or the keyboard navigation — React Aria keeps it out of both.\n */\nfunction TableFooter<T extends object = object>(props: RefAttributes<HTMLTableSectionElement> & TableFooterProps<T>) {\n return <RACTableFooter<T> {...props} {...mergeStyles({\n className: \"x12smttz x13fuv20 x178xt8z x1w5n3ug xkknnkr x14zspaw x1v9cpvo x155f00i x1lz68p4\"\n }, props)} />;\n}\n\n/**\n * The header row, holding the columns, and the rule drawn under it — which\n * moves to the cells when the header sticks, since a row group's border does\n * not travel with cells `position: sticky` has lifted out of it.\n */\nfunction TableHeader<T extends object = object>(props: RefAttributes<HTMLTableSectionElement> & TableHeaderProps<T>) {\n const sticky = useContext(StickyHeaderContext);\n return <RACTableHeader<T> {...props} {...mergeStatefulStyles({\n 0: {\n className: \"x1j6faob x1q0q8m5 xso031l\"\n },\n 1: {}\n }[!!sticky << 0], props)} />;\n}\n\n/**\n * The row the table shows while it is fetching more. React Aria calls\n * `onLoadMore` when this comes into view, and draws it only while\n * `isLoading`. It goes inside `Table.Body`, after the rows.\n */\nfunction TableLoadMore({\n label,\n ref,\n ...props\n}: RefAttributes<HTMLTableRowElement> & TableLoadMoreProps) {\n return <RACTableLoadMoreItem {...props} {...mergeStyles({\n className: \"xdd8jsf\"\n }, props)} ref={mergeRefs(dropAriaLevel, ref ?? undefined)}>\n <span className=\"x6s0dn4 x9f619 x78zum5 xl56j7k\">\n <CollectionLoadMore diameter=\"24px\" label={label} />\n </span>\n </RACTableLoadMoreItem>;\n}\n\n/**\n * One row. Give every row an `id` — that is the key selection is reported\n * by, and it has to differ from every column's. `onAction` runs when the\n * row is pressed.\n */\nfunction TableRow<T extends object = object>(props: RefAttributes<HTMLTableRowElement> & TableRowProps<T>) {\n return <RACRow<T> {...props} {...mergeStatefulStyles(rowStyles, props)} />;\n}\n\n/**\n * The narrowest each column of a resizable table can be with none of its\n * words broken, by the column's header cell, for the columns to take as\n * their minimum — see the header.\n *\n * Measured again when a row, a cell or its text changes, and when a font\n * finishes loading, which is when a word's width changes; never when the\n * table is resized, since what a column holds does not change with it.\n */\nfunction useColumnMinWidths(table: HTMLTableElement | null) {\n const [widths, setWidths] = useState(NO_MIN_WIDTHS);\n useLayoutEffect(() => {\n if (table === null) {\n return undefined;\n }\n const measure = () => {\n const next = measureColumns(table);\n setWidths(current => current.size === next.size && [...next].every(([header, width]) => current.get(header) === width) ? current : next);\n };\n measure();\n const changes = new MutationObserver(measure);\n changes.observe(table, {\n characterData: true,\n childList: true,\n subtree: true\n });\n document.fonts.addEventListener('loadingdone', measure);\n return () => {\n changes.disconnect();\n document.fonts.removeEventListener('loadingdone', measure);\n };\n }, [table]);\n return widths;\n}\nTable.Body = TableBody;\nTable.Cell = TableCell;\nTable.Column = TableColumn;\nTable.Footer = TableFooter;\nTable.Header = TableHeader;\nTable.LoadMore = TableLoadMore;\nTable.Row = TableRow;\nexport type { TableAlign, TableBodyProps, TableCellProps, TableColumnProps, TableFooterProps, TableHeaderProps, TableLoadMoreProps, TableProps, TableRowProps };\nexport { TableBody, TableCell, TableColumn, TableFooter, TableHeader, TableLoadMore, TableRow };\nexport default Table;"],"mappings":";;;;;;;;;;;;;;;;AAoHA,MAAMuB,wBAAwBrB,cAAkCsB,KAAAA,CAAS;AACzE,MAAMC,qBAAqBvB,cAAkCsB,KAAAA,CAAS;AACtE,MAAME,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,cAAc;EACZC,QAAQ;EACRF,OAAO;CACT;CACAG,SAAS;EACPL,QAAQ;EACRE,OAAO;CACT;CACAI,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,OAAO;CACT;CACAS,QAAQ;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRlB,OAAO;CACT;CACAmB,eAAe;EACbC,QAAQ;EACRpB,OAAO;CACT;CACAqB,eAAe;EACbD,QAAQ;EACRpB,OAAO;CACT;CACAsB,gBAAgB;EACdF,QAAQ;EACRG,QAAQ;EACRvB,OAAO;CACT;CACAwB,oBAAoB;EAClB5B,QAAQ;EACR6B,QAAQ;EACRC,QAAQ;EACRC,Q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AC,EAAA,KAAAC;CAAA,OAAA;EAAAF,KAAAC,EAAA;EAAAC,KAAAD,EAAA;CAAA;CApBV3I,gBAAgB0I,IAoBbE,EAAO;CAAC,OACJlB;AAAM;AAEfpH,MAAMuL,OAAOtL;AACbD,MAAMJ,OAAO6J;AACbzJ,MAAMF,SAAS8J;AACf5J,MAAMwL,SAAStL;AACfF,MAAMyL,SAAStL;AACfH,MAAM0L,WAAWtB;AACjBpK,MAAMD,MAAMsK"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
|
|
3
3
|
import { useEnlargedText } from "../../hooks/useEnlargedText.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useScrollEdges } from "../../hooks/useScrollEdges.js";
|
|
5
|
+
import { mergeRefs, refCallback } from "../../render/ref.js";
|
|
5
6
|
import { mergeStatefulStyles, mergeStyles } from "../../styles/merge.js";
|
|
7
|
+
import { scrollFadeOf } from "../../styles/scroll-fade.js";
|
|
8
|
+
import { spacingPx } from "../../tokens/values.js";
|
|
6
9
|
import Badge from "../badge/index.js";
|
|
7
10
|
import { c } from "react/compiler-runtime";
|
|
8
11
|
import { createContext, useContext, useEffect, useState } from "react";
|
|
@@ -104,6 +107,25 @@ const styles = {
|
|
|
104
107
|
kOIVth: "x14qo01y",
|
|
105
108
|
$$css: true
|
|
106
109
|
},
|
|
110
|
+
list: {
|
|
111
|
+
kGVxlE: "xp05xdj",
|
|
112
|
+
kB7OPa: "x9f619",
|
|
113
|
+
k1xSpc: "x78zum5",
|
|
114
|
+
$$css: true
|
|
115
|
+
},
|
|
116
|
+
listScrollable: {
|
|
117
|
+
kOuLrU: "xfk6m8",
|
|
118
|
+
kVQacm: "xysyzu8",
|
|
119
|
+
k5wCbM: "x1rohswg",
|
|
120
|
+
khEr5k: "xkcv6ua xg83hb1",
|
|
121
|
+
$$css: true
|
|
122
|
+
},
|
|
123
|
+
listVertical: {
|
|
124
|
+
kGVxlE: "x1kbcym6 xiwn18o",
|
|
125
|
+
kXwgrk: "xdt5ytf",
|
|
126
|
+
kmuXW: "x2lah0s",
|
|
127
|
+
$$css: true
|
|
128
|
+
},
|
|
107
129
|
tab: {
|
|
108
130
|
k6CgDc: "x12w9bfk",
|
|
109
131
|
kGNEyG: "x6s0dn4",
|
|
@@ -124,10 +146,10 @@ const styles = {
|
|
|
124
146
|
kLWn49: "xyl1r0q",
|
|
125
147
|
kAzted: "x1dry9sr",
|
|
126
148
|
k7Eaqz: "xeuugli",
|
|
127
|
-
kjBf7l: "
|
|
128
|
-
kInvED: "
|
|
149
|
+
kjBf7l: "xat36cu",
|
|
150
|
+
kInvED: "x1v57pqu",
|
|
129
151
|
k3XXqK: "x9v5kkp x1t137rt",
|
|
130
|
-
kMeerF: "
|
|
152
|
+
kMeerF: "x1s780dp",
|
|
131
153
|
k8WAf4: "xt970qd",
|
|
132
154
|
kg3NbH: "x790zyz",
|
|
133
155
|
kVAEAm: "x1n2onr6",
|
|
@@ -260,6 +282,7 @@ function badgeFor(badge, icon) {
|
|
|
260
282
|
children: icon
|
|
261
283
|
});
|
|
262
284
|
}
|
|
285
|
+
const FADE = spacingPx.xxl;
|
|
263
286
|
function revealInBar(element) {
|
|
264
287
|
const tab = element?.closest("[role=\"tab\"]");
|
|
265
288
|
const bar = tab?.closest("[role=\"tablist\"]");
|
|
@@ -268,7 +291,7 @@ function revealInBar(element) {
|
|
|
268
291
|
revealed.add(bar);
|
|
269
292
|
const box = tab.getBoundingClientRect();
|
|
270
293
|
const room = bar.getBoundingClientRect();
|
|
271
|
-
const left = Math.min(0, box.left - room.left) + Math.max(0, box.right - room.right);
|
|
294
|
+
const left = Math.min(0, box.left - FADE - room.left) + Math.max(0, box.right + FADE - room.right);
|
|
272
295
|
const top = Math.min(0, box.top - room.top) + Math.max(0, box.bottom - room.bottom);
|
|
273
296
|
if (left !== 0 || top !== 0) bar.scrollBy({
|
|
274
297
|
behavior: first ? "instant" : "auto",
|
|
@@ -435,33 +458,61 @@ function Tabs(t0) {
|
|
|
435
458
|
} else t10 = $[19];
|
|
436
459
|
return t10;
|
|
437
460
|
}
|
|
438
|
-
function TabsList(props) {
|
|
439
|
-
const $ = c(
|
|
461
|
+
function TabsList(props$1) {
|
|
462
|
+
const $ = c(17);
|
|
463
|
+
let className;
|
|
464
|
+
let rest;
|
|
465
|
+
let style;
|
|
466
|
+
if ($[0] !== props$1) {
|
|
467
|
+
({className, style, ...rest} = props$1);
|
|
468
|
+
$[0] = props$1;
|
|
469
|
+
$[1] = className;
|
|
470
|
+
$[2] = rest;
|
|
471
|
+
$[3] = style;
|
|
472
|
+
} else {
|
|
473
|
+
className = $[1];
|
|
474
|
+
rest = $[2];
|
|
475
|
+
style = $[3];
|
|
476
|
+
}
|
|
440
477
|
const { layout, orientation } = useContext(BarContext);
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
0: { className: "xp05xdj x9f619 x78zum5" },
|
|
445
|
-
2: { className: "xp05xdj x9f619 x78zum5 xfk6m8 xysyzu8 x1rohswg xkcv6ua xg83hb1" },
|
|
446
|
-
1: { className: "x9f619 x78zum5 x1kbcym6 xiwn18o xdt5ytf x2lah0s" },
|
|
447
|
-
3: { className: "x9f619 x78zum5 xfk6m8 xysyzu8 x1rohswg xkcv6ua xg83hb1 x1kbcym6 xiwn18o xdt5ytf x2lah0s" }
|
|
448
|
-
}[!!(layout === "scrollable") << 1 | !!(orientation === "vertical") << 0], props);
|
|
449
|
-
$[0] = layout;
|
|
450
|
-
$[1] = orientation;
|
|
451
|
-
$[2] = props;
|
|
452
|
-
$[3] = t0;
|
|
453
|
-
} else t0 = $[3];
|
|
478
|
+
const scrolls = layout === "scrollable" && orientation !== "vertical";
|
|
479
|
+
const [element, setElement] = useState(null);
|
|
480
|
+
const t0 = rest.ref ?? void 0;
|
|
454
481
|
let t1;
|
|
455
|
-
if ($[4] !==
|
|
456
|
-
t1 =
|
|
457
|
-
|
|
458
|
-
|
|
482
|
+
if ($[4] !== t0) {
|
|
483
|
+
t1 = mergeRefs(setElement, t0);
|
|
484
|
+
$[4] = t0;
|
|
485
|
+
$[5] = t1;
|
|
486
|
+
} else t1 = $[5];
|
|
487
|
+
const ref = t1;
|
|
488
|
+
const edges = useScrollEdges(scrolls ? element : null);
|
|
489
|
+
let t2;
|
|
490
|
+
if ($[6] !== className || $[7] !== edges || $[8] !== layout || $[9] !== orientation || $[10] !== scrolls || $[11] !== style) {
|
|
491
|
+
t2 = mergeStatefulStyles(props(styles.list, layout === "scrollable" && styles.listScrollable, orientation === "vertical" && styles.listVertical, scrolls && scrollFadeOf(edges)), {
|
|
492
|
+
className,
|
|
493
|
+
style
|
|
459
494
|
});
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
|
|
464
|
-
|
|
495
|
+
$[6] = className;
|
|
496
|
+
$[7] = edges;
|
|
497
|
+
$[8] = layout;
|
|
498
|
+
$[9] = orientation;
|
|
499
|
+
$[10] = scrolls;
|
|
500
|
+
$[11] = style;
|
|
501
|
+
$[12] = t2;
|
|
502
|
+
} else t2 = $[12];
|
|
503
|
+
let t3;
|
|
504
|
+
if ($[13] !== ref || $[14] !== rest || $[15] !== t2) {
|
|
505
|
+
t3 = /* @__PURE__ */ jsx(TabList, {
|
|
506
|
+
...rest,
|
|
507
|
+
...t2,
|
|
508
|
+
ref
|
|
509
|
+
});
|
|
510
|
+
$[13] = ref;
|
|
511
|
+
$[14] = rest;
|
|
512
|
+
$[15] = t2;
|
|
513
|
+
$[16] = t3;
|
|
514
|
+
} else t3 = $[16];
|
|
515
|
+
return t3;
|
|
465
516
|
}
|
|
466
517
|
function TabsPanel(props) {
|
|
467
518
|
const $ = c(9);
|
|
@@ -486,7 +537,7 @@ function TabsPanel(props) {
|
|
|
486
537
|
useEffect(t0, t1);
|
|
487
538
|
let t2;
|
|
488
539
|
if ($[4] !== props) {
|
|
489
|
-
t2 = mergeStatefulStyles({ className: "x9f619 x1iyjqo2 xeuugli
|
|
540
|
+
t2 = mergeStatefulStyles({ className: "x9f619 x1iyjqo2 xeuugli xat36cu x1v57pqu x9v5kkp x1t137rt x1s780dp" }, props);
|
|
490
541
|
$[4] = props;
|
|
491
542
|
$[5] = t2;
|
|
492
543
|
} else t2 = $[5];
|