@kanso-labs/react-native-kanso-ui 0.11.23 → 0.11.25
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/calendar/index.js +105 -41
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +7 -0
- package/dist/calendar/styles.js.map +1 -1
- package/dist/components/calendar/index.d.ts +2 -2
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/carousel/index.d.ts +24 -3
- package/dist/components/carousel/index.js +58 -35
- package/dist/components/carousel/index.js.map +1 -1
- package/dist/components/color-picker/index.js +98 -93
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/range-calendar/index.d.ts +2 -2
- package/dist/components/range-calendar/index.js.map +1 -1
- package/dist/components/segmented-button/index.js +108 -88
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/index.js.map +1 -1
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.js +112 -161
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +4 -0
- package/dist/field/styles.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReactElement","ReactNode","Ref","AccessibilityActionEvent","ColorValue","HostInstance","LayoutChangeEvent","ListRenderItemInfo","PressableProps","ScrollViewProps","StyleProp","TextStyle","ViewStyle","GestureType","DisabledBehavior","Key","Node","Selection","SelectionMode","SortDescriptor","ColumnSize","ColumnStaticSize","TableColumnResizeState","TableState","TableStateProps","Children","createContext","isValidElement","use","useMemo","useState","FlatList","I18nManager","Text","NativeText","Pressable","ScrollView","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","GestureHandlerRootView","useSharedValue","useTableColumnResizeState","useTableState","CollectionLoadMoreProps","ResolvedTheme","toggleState","accessibilityActionOf","childElementsOf","LoadingRow","loadMoreOf","noop","pressThen","SelectBox","Status","LAYER_SIZE","ArrowDownwardGlyph","ArrowUpwardGlyph","IconStyleContext","columnSizeFor","sortedFor","useLocaleOf","useMessages","usePressFeedback","useOpenLink","rowContentColor","rowStyles","ADJUSTABLE","SLOP_RANGE","useTheme","composeStyles","themedStyles","useTypeRole","Checkbox","ROW_HEIGHT","ARROW_SIZE","HANDLE","RESIZE_STEP","FLEXIBLE","MIN_WIDTH","styles","create","grid","flexDirection","handle","bottom","position","top","width","handleLast","handles","left","pointerEvents","right","rule","end","ruleLast","selection","alignItems","stylesOf","colors","sizing","spacing","cell","justifyContent","paddingHorizontal","lg","empty","paddingVertical","xxl","emptyText","color","onSurfaceVariant","textAlign","footer","borderTopColor","outlineVariant","borderTopWidth","footerText","header","borderBottomColor","borderBottomWidth","minHeight","rowSm","headerContent","gap","sm","headerText","flexShrink","loading","row","rowRule","ruleLine","backgroundColor","ruleResizing","primary","selected","primaryContainer","BuilderContext","columns","CellNode","colIndex","colSpan","TableBodyProps","children","item","T","items","Iterable","renderEmptyState","TableCellProps","style","testID","textValue","TableColumnProps","allowsSorting","defaultWidth","id","isRowHeader","maxWidth","minWidth","resizable","TableFooterProps","TableHeaderProps","column","TableLoadMoreProps","TableProps","Omit","defaultSelectedKeys","disabledBehavior","disabledKeys","disallowEmptySelection","onResize","widths","Map","onResizeEnd","onRowAction","key","onSelectionChange","keys","onSortChange","descriptor","ref","resizeLabel","selectAllLabel","selectedKeys","selectionMode","selectLabel","sortDescriptor","stickyHeader","TableRowProps","columnKey","href","isDisabled","onAction","value","TableValue","layout","loadMore","native","state","TableViewProps","body","onWidth","TableContext","BodyCell","t0","$","_c","isSelected","onSelect","own","table","useTable","text","t1","size","icon","t2","props","undefined","spanWidthOf","t3","T0","t4","rendered","isTextual","t5","t6","bodyNode","childNodes","renderer","type","element","isLoadMore","hasChildNodes","BodyRow","index","node","theme","openLink","onBlur","onFocus","onHoverIn","onHoverOut","onLongPress","onPress","onPressIn","onPressOut","_children","_id","_isDisabled","t7","t8","t9","t10","t11","t12","_textValue","_value","t13","selectionManager","disabled","checks","canSelectItem","selectable","marked","rowAction","action","acts","isEmpty","select","content","feedback","cells","collection","getChildren","map","rowStyle","accessibilityActions","label","name","onAccessibilityAction","collapse","expand","handlers","ring","layer","cellNode","ColumnHeader","messages","direction","onSurface","cellStyle","getColumnWidth","mode","selectAll","isSelectAll","selectAllOf","arrowColor","sortable","join","sortOf","columnNode","context","Generator","nodes","shouldInvalidate","next","push","defaultsOf","selectionWidth","getDefaultMinWidth","isSelection","getDefaultWidth","EmptyBody","shown","endsOf","ends","FooterRows","rowIndex","rowCells","starts","startsOf","_temp","cell_0","cellIndex","widthAcross","headerNodes","HeaderRow","_temp2","TableLoadMore","parts","toArray","length","every","part","keyOf","String","partOf","find","child","P","renderRow","ResizeHandle","isLast","locale","from","last","resizing","resizingColumn","begin","set","startResize","move","translation","start","get","isRTL","updateResizedColumns","finish","sizes","endResize","drag","Pan","activeOffsetX","failOffsetY","runOnJS","onStart","translationX","onUpdate","translationX_0","onFinalize","held","blocksExternalGesture","pan","withTestId","T1","getColumnMaxWidth","Math","floor","getColumnMinWidth","t14","stepOf","t15","t16","t17","t18","T2","t19","t20","t21","t22","ResizeHandles","lastIndex","rowNode","count","reduce","sum","spanOf","Error","some","toggleSelectAll","sortMessageOf","each","sort","event","actionName","nativeEvent","step","Table","window","measured","setMeasured","TableHeader","TableBody","TableFooter","defaults","tableWidth","_props","getCollectionNode","TableCell","TableColumn","TableEnd","isLoading","Symbol","for","TableRow","contentTo","height","then","roomTo","spans","span","TableView","onContentSizeChange","onLayout","setContent","room","setRoom","Root","rows","total","Native","resizer","scrollOffset","scroller","widthTo","t23","t24","slice","Body","Cell","Column","Footer","Header","LoadMore","Row","_c","NativeText"],"sources":["../../../src/components/table/index.tsx"],"sourcesContent":["import type { ReactElement, ReactNode, Ref } from 'react'\nimport type {\n AccessibilityActionEvent,\n ColorValue,\n HostInstance,\n LayoutChangeEvent,\n ListRenderItemInfo,\n PressableProps,\n ScrollViewProps,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native'\nimport type { GestureType } from 'react-native-gesture-handler'\nimport type {\n DisabledBehavior,\n Key,\n Node,\n Selection,\n SelectionMode,\n SortDescriptor,\n} from 'react-stately'\nimport type {\n ColumnSize,\n ColumnStaticSize,\n TableColumnResizeState,\n TableState,\n TableStateProps,\n} from 'react-stately/useTableState'\n\nimport {\n Children,\n createContext,\n isValidElement,\n use,\n useMemo,\n useState,\n} from 'react'\nimport {\n FlatList,\n I18nManager,\n Text as NativeText,\n Pressable,\n ScrollView,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\nimport {\n Gesture,\n GestureDetector,\n GestureHandlerRootView,\n} from 'react-native-gesture-handler'\nimport { useSharedValue } from 'react-native-reanimated'\nimport {\n useTableColumnResizeState,\n useTableState,\n} from 'react-stately/useTableState'\n\nimport type { CollectionLoadMoreProps } from '../../collection'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { toggleState } from '../../button'\nimport {\n accessibilityActionOf,\n childElementsOf,\n LoadingRow,\n loadMoreOf,\n noop,\n pressThen,\n SelectBox,\n Status,\n} from '../../collection'\nimport { LAYER_SIZE } from '../../control/styles'\nimport { ArrowDownwardGlyph, ArrowUpwardGlyph } from '../../glyphs'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { columnSizeFor, sortedFor } from '../../i18n'\nimport { useLocaleOf, useMessages } from '../../i18n/provider'\nimport { usePressFeedback } from '../../press'\nimport { useOpenLink } from '../../router'\nimport { rowContentColor, rowStyles } from '../../row/styles'\nimport { ADJUSTABLE, SLOP_RANGE } from '../../slider'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\nimport { Checkbox } from '../checkbox'\n\n// kanso-ui's Table: a grid of rows and columns, with sorting, selection,\n// resizing, a footer and a row that loads more. The design system carries no\n// data table page, so web draws it from the archived one at\n// <https://m2.material.io/components/data-tables>, and so does this: a 56dp\n// header row in label large and the muted role, 52dp body rows in body\n// medium, 16dp of padding at each side of a cell, a rule between rows and\n// under the header, and an arrow beside the name of the column being sorted.\n// Its colour roles are the current system's, and a row's state layers and\n// selected container are the ones a list row takes, written from the same\n// tokens, as web's are. The state is React Stately's table state, which web's\n// React Aria builds on, so the columns, rows, selection and sort are kept as\n// web keeps them, and the widths are worked out by React Stately's column\n// layout, `fr` widths and all.\n//\n// Four things differ from web's, each because a screen reader or a touch on\n// a phone works differently from a keyboard in a browser.\n//\n// **A row is one element to a screen reader**, as a List's row is. VoiceOver\n// and TalkBack read a pressable row as one element and reach nothing inside\n// it, and announce neither a grid nor a cell, so a row is a button that reads\n// its cells in turn and reports whether it is selected, and a row's\n// checkbox is drawn for the eye: selecting a row from a screen reader is an\n// accessibility action named by `selectLabel`. `isRowHeader` is kept for a\n// call site written for both libraries, and says nothing on native. A press\n// does what React Aria's touch press does, as on a List's row: it selects a\n// row that has no action, and on one that has, runs the action while nothing\n// is selected and selects once something is, and a long press selects.\n//\n// **A sortable column says how it sorts in its name.** Neither platform reads\n// web's `aria-sort`, so a sortable column's header is a button whose name is\n// its own, then \"sortable column\", then the direction it sorts in while it is\n// the sorted one, which is what React Aria says on Android for the same\n// reason. Once the rows are sorted, the sort is said as React Aria says it.\n//\n// **The header sticks by being drawn outside the rows.** The rows are a\n// `FlatList`, and `stickyHeader` draws the header above it rather than as its\n// first cell, so the rows scroll under nothing and the header needs no ground\n// of its own to hide them. The table scrolls sideways as one when its columns\n// are wider than it is, header and footer with the rows.\n//\n// **A resize handle is a slider to a screen reader.** Web's handle is a\n// slider a keyboard steps with its arrow keys; this one takes a drag along\n// the header, and a screen reader steps it by 10dp, React Aria's step for a\n// key, through its increment and decrement actions. The handles are drawn\n// over the header row, after its columns, so each is above the column it\n// reaches into.\n\n// The archived page's body row, which no token carries.\nconst ROW_HEIGHT = 52\n\n// The arrow beside a sorted column's name, at the 18dp web draws it at.\nconst ARROW_SIZE = 18\n\n// The target a resize handle takes, centred on the column's trailing edge,\n// and the one past the last column, which keeps the half inside it, as web\n// clips it there.\nconst HANDLE = 24\n\n// How far a screen reader's step moves a column's edge, React Aria's step for\n// a key.\nconst RESIZE_STEP = 10\n\n// The width a column takes before anything says otherwise, and the narrowest\n// it is drawn, React Stately's own defaults.\nconst FLEXIBLE = '1fr'\nconst MIN_WIDTH = 75\n\nconst styles = StyleSheet.create({\n // The header, the rows and the footer, as wide as the columns together.\n grid: {\n flexDirection: 'column',\n },\n // A column's handle, a target across the header's height.\n handle: {\n bottom: 0,\n position: 'absolute',\n top: 0,\n width: HANDLE,\n },\n handleLast: {\n width: HANDLE / 2,\n },\n // Over the header's columns, taking no press but its handles'.\n handles: {\n bottom: 0,\n left: 0,\n pointerEvents: 'box-none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n // The divider's own rule, inside the column it ends, as web draws it, so a\n // column's edge is one line whether or not it can be dragged.\n rule: {\n bottom: 0,\n end: HANDLE / 2,\n position: 'absolute',\n top: 0,\n width: 1,\n },\n ruleLast: {\n end: 0,\n },\n // A checkbox's column, centred in the 16dp either side.\n selection: {\n alignItems: 'center',\n },\n})\n\nconst stylesOf = themedStyles(({ colors, sizing, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The page's 16dp at each side, which is also what puts 32dp between\n // two columns.\n cell: {\n justifyContent: 'center',\n paddingHorizontal: spacing.lg,\n },\n // What the body shows in place of rows: muted, padded and centred, as\n // web's box is.\n empty: {\n alignItems: 'center',\n paddingHorizontal: spacing.lg,\n paddingVertical: spacing.xxl,\n },\n emptyText: {\n color: colors.onSurfaceVariant,\n textAlign: 'center',\n },\n // The footer's own rule above it, since its first row drops the rule\n // every first row drops.\n footer: {\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n },\n footerText: {\n color: colors.onSurfaceVariant,\n },\n // The page's 56dp header, and the rule under it.\n header: {\n borderBottomColor: colors.outlineVariant,\n borderBottomWidth: 1,\n flexDirection: 'row',\n minHeight: sizing.rowSm,\n },\n // The name and its arrow, after the name as the page puts it.\n headerContent: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: spacing.sm,\n },\n headerText: {\n color: colors.onSurfaceVariant,\n flexShrink: 1,\n },\n // The ring while more rows are fetched, at a body row's height, so the\n // table does not jump as they replace it.\n loading: {\n minHeight: ROW_HEIGHT,\n },\n // The page's 52dp row.\n row: {\n flexDirection: 'row',\n minHeight: ROW_HEIGHT,\n },\n // The rule above a row, dropped on the first of a group, where the\n // header's own rule or the table's edge already is.\n rowRule: {\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n },\n ruleLine: {\n backgroundColor: colors.outlineVariant,\n },\n // Thickened and in primary while it is dragged, inward, into the column\n // being sized.\n ruleResizing: {\n backgroundColor: colors.primary,\n width: 2,\n },\n selected: {\n backgroundColor: colors.primaryContainer,\n },\n }),\n)\n\n/**\n * What a part's entry is built with: the columns the header has given so\n * far, which a row reads its cells against.\n */\ntype BuilderContext = {\n columns: Node<unknown>[]\n}\n\n/** A cell's entry, and where it sits among the columns it spans. */\ntype CellNode = Node<unknown> & {\n readonly colIndex?: null | number\n readonly colSpan?: null | number\n}\n\ntype TableBodyProps<T extends object = object> = {\n /**\n * The rows, each a `Table.Row`, with a `Table.LoadMore` after them. With\n * `items`, a function from an item to its row, called for each in turn.\n */\n readonly children?: ((item: T) => ReactElement) | ReactNode\n /** The entries `children` draws a row for, when it is a function. */\n readonly items?: Iterable<T>\n /**\n * What the table shows in place of rows when it has none and nothing is\n * loading, in a muted, padded box across its width. A string is set in\n * body medium.\n */\n readonly renderEmptyState?: () => ReactNode\n}\n\ntype TableCellProps = {\n /** What the cell holds. A string is set in body medium. */\n readonly children?: ReactNode\n /**\n * How many columns the cell spans, from where it sits.\n * @default 1\n */\n readonly colSpan?: number\n /**\n * Draws this row's selection checkbox instead of `children`. The row's own\n * text is what names the row.\n */\n readonly selection?: boolean\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n /** The cell's text, read off `children` when they are a plain string. */\n readonly textValue?: string\n}\n\ntype TableColumnProps = {\n /**\n * Makes the header itself the control that sorts by the column, as\n * React Aria's prop does. The arrow appears on the column the table's\n * `sortDescriptor` names.\n * @default false\n */\n readonly allowsSorting?: boolean\n /** The column's name. */\n readonly children?: ReactNode\n /** The width the column starts at, when the table keeps its widths. */\n readonly defaultWidth?: ColumnSize | null\n /**\n * The key the column is sorted and sized by. It shares a namespace with\n * the rows' ids, so give the two sets values that cannot meet.\n */\n readonly id?: Key\n /**\n * Marks the column a screen reader reads a row by on web. Kept for a call\n * site written for both libraries; native reads every cell of a row.\n * @default false\n */\n readonly isRowHeader?: boolean\n /** The widest the column is drawn. */\n readonly maxWidth?: ColumnStaticSize | null\n /**\n * The narrowest the column is drawn.\n * @default 75\n */\n readonly minWidth?: ColumnStaticSize | null\n /**\n * Draws a handle at the column's trailing edge that drags its width. Needs\n * the table's own `resizable` as well.\n * @default false\n */\n readonly resizable?: boolean\n /**\n * Draws the select-all checkbox instead of `children`, for the column the\n * rows put their own checkboxes in.\n * @default false\n */\n readonly selection?: boolean\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n /** The column's name as text, read off `children` when it is a string. */\n readonly textValue?: string\n /** The column's width, for a call site holding the widths itself. */\n readonly width?: ColumnSize | null\n}\n\ntype TableFooterProps = {\n /** The rows under the body, each a `Table.Row` of `Table.Cell`s. */\n readonly children?: ReactNode\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype TableHeaderProps<T extends object = object> = {\n /**\n * The columns, each a `Table.Column`. With `columns`, a function from an\n * entry to its column, called for each in turn.\n */\n readonly children?: ((column: T) => ReactElement) | ReactNode\n /** The entries `children` draws a column for, when it is a function. */\n readonly columns?: Iterable<T>\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype TableLoadMoreProps = CollectionLoadMoreProps\n\ntype TableProps = Omit<\n ScrollViewProps,\n 'children' | 'horizontal' | 'role' | 'stickyHeaderIndices' | 'style'\n> & {\n /**\n * The parts: a `Table.Header`, a `Table.Body` and, under them, a\n * `Table.Footer`.\n */\n readonly children?: ReactNode\n /** The keys selected at first, when the table keeps its own selection. */\n readonly defaultSelectedKeys?: 'all' | Iterable<Key>\n /**\n * Whether `disabledKeys` takes every press off a row, or only its\n * selection, as React Aria's prop says.\n * @default 'all'\n */\n readonly disabledBehavior?: DisabledBehavior\n /** The keys of the rows drawn disabled. */\n readonly disabledKeys?: Iterable<Key>\n /**\n * Keeps the last selected row selected, so a press on it changes nothing.\n * @default false\n */\n readonly disallowEmptySelection?: boolean\n /** Called as a column is dragged, with every column's width. */\n readonly onResize?: (widths: Map<Key, ColumnSize>) => void\n /** Called once a drag ends, with every column's width. */\n readonly onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n /**\n * Called with a row's key when a press runs its action. A row's own\n * `onAction` takes its place for that row.\n */\n readonly onRowAction?: (key: Key) => void\n /** Called with the selected keys whenever a press changes them. */\n readonly onSelectionChange?: (keys: Selection) => void\n /** Called with the column and direction a press on a header asks for. */\n readonly onSortChange?: (descriptor: SortDescriptor) => void\n readonly ref?: Ref<FlatList>\n /**\n * Lets the columns marked `resizable` be dragged.\n * @default false\n */\n readonly resizable?: boolean\n /**\n * What a resize handle is called, for a screen reader, before its column's\n * name. Left out, it is the word for it in the `I18nProvider`'s language,\n * or the device's outside one, \"Resizer\" in English.\n */\n readonly resizeLabel?: string\n /**\n * What the select-all checkbox is called, for a screen reader. Left out,\n * it is the word for it in the `I18nProvider`'s language, or the device's\n * outside one, \"Select All\" in English, or \"Select\" while one row at a\n * time selects.\n */\n readonly selectAllLabel?: string\n /** The selected keys, for a call site holding the selection itself. */\n readonly selectedKeys?: 'all' | Iterable<Key>\n /**\n * Whether rows can be selected: one at a time, several, or none.\n * @default 'none'\n */\n readonly selectionMode?: SelectionMode\n /**\n * What selecting a row is called, for a screen reader: the accessibility\n * action that selects a row. Left out, it is the word for it in the\n * `I18nProvider`'s language, or the device's outside one, \"Select\" in\n * English.\n */\n readonly selectLabel?: string\n /** The column the rows are sorted by, and in which direction. */\n readonly sortDescriptor?: SortDescriptor\n /**\n * Holds the header row in place while the rows scroll under it. Needs the\n * table to have a height to scroll in.\n * @default false\n */\n readonly stickyHeader?: boolean\n readonly style?: StyleProp<ViewStyle>\n}\n\ntype TableRowProps<T extends object = object> = Omit<\n PressableProps,\n 'children' | 'disabled' | 'id' | 'role' | 'style'\n> & {\n /**\n * The row's cells, one `Table.Cell` for each column it spans, or a\n * function from a column's key to its cell.\n */\n readonly children?: ((columnKey: Key) => ReactElement) | ReactNode\n /** Goes to this route when a press runs the row's action. */\n readonly href?: string\n /**\n * The key the row is selected and reported by. Give one to every row, and\n * keep it apart from every column's.\n */\n readonly id?: Key\n /**\n * Draws the row disabled, as a key in the table's `disabledKeys` does.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Called when a press runs the row's action, in place of the table's\n * `onRowAction` for this row.\n */\n readonly onAction?: () => void\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n /** The row's text, for a row whose cells hold elements. */\n readonly textValue?: string\n /** The entry `children` was drawn for, kept on the row's node. */\n readonly value?: T\n}\n\n// What the parts drawn in the table read from it.\ntype TableValue = {\n readonly columns: readonly Node<unknown>[]\n readonly footer: TableFooterProps | undefined\n readonly header: TableHeaderProps\n readonly layout: TableColumnResizeState<unknown>\n readonly loadMore: TableLoadMoreProps | undefined\n /** The table's sideways scroll, which a handle's drag holds still. */\n // oxlint-disable-next-line typescript/no-deprecated -- the type of the builder ResizeHandle keeps; see there\n readonly native: GestureType | undefined\n readonly onResize: TableProps['onResize']\n readonly onResizeEnd: TableProps['onResizeEnd']\n readonly onRowAction: TableProps['onRowAction']\n readonly renderEmptyState: (() => ReactNode) | undefined\n readonly resizable: boolean\n readonly resizeLabel: string\n readonly selectAllLabel: string | undefined\n readonly selectLabel: string\n readonly state: TableState<unknown>\n readonly testID: string | undefined\n}\n\n// What a `Table` hands the view it draws.\ntype TableViewProps = Omit<\n TableProps,\n | 'children'\n | 'defaultSelectedKeys'\n | 'disabledBehavior'\n | 'disabledKeys'\n | 'disallowEmptySelection'\n | 'onSelectionChange'\n | 'onSortChange'\n | 'selectedKeys'\n | 'selectionMode'\n | 'sortDescriptor'\n> & {\n readonly body: TableBodyProps\n readonly footer: TableFooterProps | undefined\n readonly header: TableHeaderProps\n readonly layout: TableColumnResizeState<unknown>\n /** Called with the table's width as it is laid out. */\n readonly onWidth: (width: number) => void\n readonly state: TableState<unknown>\n /** The width the columns fill. */\n readonly width: number\n}\n\nconst TableContext = createContext<null | TableValue>(null)\n\n/**\n * A cell of a body row, its column's width or the columns' it spans: its\n * text in body medium and the row's content colour, or what it was given,\n * with an icon in it drawn in that colour, or the row's checkbox.\n */\nfunction BodyCell({\n cell,\n color,\n isDisabled,\n isSelected,\n onSelect,\n}: {\n readonly cell: CellNode\n readonly color: ColorValue\n readonly isDisabled: boolean\n readonly isSelected: boolean\n readonly onSelect: (() => void) | undefined\n}) {\n const own = stylesOf(useTheme())\n const table = useTable()\n const text = useTypeRole('bodyMedium')\n const icon = useMemo(() => ({ color, size: 24 }), [color])\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its cell was written with, which React Stately types as `any`\n const { selection = false, style, testID }: TableCellProps = cell.props\n const width = spanWidthOf(table, cell)\n\n if (selection) {\n return (\n <View\n style={composeStyles<ViewStyle>(\n own.cell,\n styles.selection,\n { width },\n style,\n )}\n testID={testID}\n >\n <SelectBox\n isDisabled={isDisabled}\n isSelected={isSelected}\n onPress={onSelect}\n />\n </View>\n )\n }\n\n return (\n <View\n style={composeStyles<ViewStyle>(own.cell, { width }, style)}\n testID={testID}\n >\n <IconStyleContext value={icon}>\n {isTextual(cell.rendered) ? (\n <NativeText style={composeStyles<TextStyle>(text, { color })}>\n {cell.rendered}\n </NativeText>\n ) : (\n cell.rendered\n )}\n </IconStyleContext>\n </View>\n )\n}\n\n// The entry the collection holds for a `Table.Body` part: its rows, each\n// built by its own part, with the `Table.LoadMore` among them left to the\n// table, which draws it after them.\nfunction* bodyNode(props: TableBodyProps) {\n const { children, items } = props\n\n yield {\n *childNodes() {\n if (typeof children === 'function') {\n for (const value of items ?? []) {\n yield { renderer: children, type: 'item', value }\n }\n return\n }\n for (const element of childElementsOf(children)) {\n if (!isLoadMore(element)) {\n yield { element, type: 'item' }\n }\n }\n },\n hasChildNodes: true,\n props,\n type: 'body',\n }\n}\n\n/**\n * A row of the body: the state layer, the ripple and the focus ring over its\n * cells, on primary container while selected and faded while disabled. A row\n * with nothing to do on a press, in a table that neither selects nor acts, is\n * a `View` that only presents.\n */\nfunction BodyRow({\n index,\n node,\n}: {\n readonly index: number\n readonly node: Node<unknown>\n}) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const table = useTable()\n const openLink = useOpenLink()\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its row was written with, which React Stately types as `any`\n const {\n children: _children,\n href,\n id: _id,\n isDisabled: _isDisabled,\n onAction,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n ref,\n style,\n textValue: _textValue,\n value: _value,\n ...props\n }: TableRowProps = node.props\n const { selectionManager } = table.state\n const { key } = node\n // The selection manager reads a row's own `isDisabled` off its entry,\n // beside the table's `disabledKeys`, so it answers for both.\n const disabled = selectionManager.isDisabled(key)\n const checks = selectionManager.selectionMode !== 'none'\n const selectable = selectionManager.canSelectItem(key)\n const selected = checks && selectionManager.isSelected(key)\n // A disabled row is drawn on no container, whether or not it is selected.\n const marked = selected && !disabled\n const rowAction = table.onRowAction\n const action =\n onAction ??\n (href === undefined\n ? rowAction === undefined\n ? undefined\n : () => {\n rowAction(key)\n }\n : () => {\n openLink(href)\n })\n // React Aria's rule for a touch press on a row that selects: the action\n // while nothing is selected, the selection after.\n const acts = action !== undefined && (!selectable || selectionManager.isEmpty)\n const select = () => {\n selectionManager.select(key)\n }\n const content = rowContentColor(theme, {\n isDisabled: disabled,\n isSelected: marked,\n })\n const feedback = usePressFeedback({\n color: content,\n disabled,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onPressIn,\n onPressOut,\n })\n // A table's collection always has `getChildren`, which hands a row's cells\n // over with the column each sits in.\n const cells = [...(table.state.collection.getChildren?.(key) ?? [])].map(\n (cell) => (\n <BodyCell\n cell={cell}\n color={content}\n isDisabled={disabled}\n isSelected={selected}\n key={cell.key}\n onSelect={acts && selectable ? select : undefined}\n />\n ),\n )\n const rowStyle = composeStyles<ViewStyle>(\n own.row,\n index > 0 ? own.rowRule : undefined,\n marked ? own.selected : undefined,\n )\n\n if (!checks && action === undefined && onPress === undefined) {\n return (\n <View\n aria-disabled={disabled || undefined}\n ref={ref}\n style={composeStyles<ViewStyle>(rowStyle, style)}\n testID={props.testID}\n >\n {cells}\n </View>\n )\n }\n\n return (\n <Pressable\n role={href === undefined ? 'button' : 'link'}\n {...props}\n {...(checks ? toggleState(selected) : undefined)}\n {...(selectable\n ? {\n accessibilityActions: [\n { label: table.selectLabel, name: 'select' },\n ],\n onAccessibilityAction: accessibilityActionOf({\n collapse: undefined,\n expand: undefined,\n select,\n }),\n }\n : undefined)}\n {...feedback.handlers}\n disabled={disabled}\n onLongPress={\n action !== undefined && selectable\n ? pressThen(onLongPress, select)\n : onLongPress\n }\n onPress={pressThen(onPress, acts ? action : selectable ? select : noop)}\n ref={ref}\n style={composeStyles<ViewStyle>(\n rowStyle,\n feedback.ring,\n feedback.ring === undefined ? undefined : rowStyles.ring,\n style,\n )}\n >\n {feedback.layer}\n {cells}\n </Pressable>\n )\n}\n\n// The entry the collection holds for a `Table.Cell` part.\nfunction* cellNode(props: TableCellProps) {\n yield {\n hasChildNodes: false,\n props,\n rendered: props.children,\n textValue:\n props.textValue ??\n (typeof props.children === 'string' ? props.children : ''),\n type: 'cell',\n }\n}\n\n/**\n * A column's header: its name in label large and the muted role, with the\n * arrow after it while the rows are sorted by it, as a button that sorts\n * where the column allows it, or the select-all checkbox.\n */\nfunction ColumnHeader({ column }: { readonly column: Node<unknown> }) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const table = useTable()\n const messages = useMessages()\n const label = useTypeRole('labelLarge')\n const { selectionManager } = table.state\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its column was written with, which React Stately types as `any`\n const {\n allowsSorting = false,\n selection = false,\n style,\n testID,\n }: TableColumnProps = column.props\n const { sortDescriptor } = table.state\n const direction =\n sortDescriptor?.column === column.key ? sortDescriptor.direction : undefined\n const feedback = usePressFeedback({ color: theme.colors.onSurface })\n const cellStyle = composeStyles<ViewStyle>(own.cell, {\n width: table.layout.getColumnWidth(column.key),\n })\n\n if (selection) {\n const mode = selectionManager.selectionMode\n return (\n <View\n style={composeStyles<ViewStyle>(cellStyle, styles.selection, style)}\n testID={testID}\n >\n <Checkbox\n aria-label={\n table.selectAllLabel ??\n (mode === 'single' ? messages.select : messages.table.selectAll)\n }\n isDisabled={mode !== 'multiple' || table.state.collection.size === 0}\n isIndeterminate={\n !selectionManager.isEmpty && !selectionManager.isSelectAll\n }\n isSelected={selectionManager.isSelectAll}\n onChange={selectAllOf(table.state)}\n />\n </View>\n )\n }\n\n const arrowColor = theme.colors.onSurfaceVariant\n const name = (\n <View style={own.headerContent}>\n {isTextual(column.rendered) ? (\n <NativeText style={composeStyles<TextStyle>(label, own.headerText)}>\n {column.rendered}\n </NativeText>\n ) : (\n column.rendered\n )}\n {direction === undefined ? null : direction === 'ascending' ? (\n <ArrowUpwardGlyph color={arrowColor} size={ARROW_SIZE} />\n ) : (\n <ArrowDownwardGlyph color={arrowColor} size={ARROW_SIZE} />\n )}\n </View>\n )\n\n if (!allowsSorting) {\n return (\n <View style={composeStyles<ViewStyle>(cellStyle, style)} testID={testID}>\n {name}\n </View>\n )\n }\n\n return (\n <Pressable\n aria-label={[\n column.textValue,\n messages.table.sortable,\n ...(direction === undefined ? [] : [messages.table[direction]]),\n ].join(', ')}\n role=\"button\"\n {...feedback.handlers}\n onPress={sortOf(table.state, column.key)}\n style={composeStyles<ViewStyle>(\n cellStyle,\n feedback.ring,\n feedback.ring === undefined ? undefined : rowStyles.ring,\n style,\n )}\n testID={testID}\n >\n {feedback.layer}\n {name}\n </Pressable>\n )\n}\n\n// The entry the collection holds for a `Table.Column` part, which it also\n// adds to the columns a row reads its cells against, again whenever the\n// collection is rebuilt around it, as React Stately's own column does.\nfunction* columnNode(\n props: TableColumnProps,\n context: BuilderContext,\n): Generator<object, void, readonly Node<unknown>[]> {\n const nodes = yield {\n hasChildNodes: false,\n key: props.id,\n props,\n rendered: props.children,\n shouldInvalidate(next: BuilderContext) {\n next.columns.push(...nodes)\n return false\n },\n textValue:\n props.textValue ??\n (typeof props.children === 'string' ? props.children : ''),\n type: 'column',\n }\n\n context.columns.push(...nodes)\n}\n\n/**\n * The widths a column takes before anything says otherwise: React Stately's\n * own, and a checkbox's column as wide as its box and its padding, which it\n * keeps, since it holds one control and should not take a column of data's\n * room.\n */\nfunction defaultsOf(selectionWidth: number) {\n return {\n getDefaultMinWidth: (node: Node<unknown>): ColumnSize =>\n isSelection(node) ? selectionWidth : MIN_WIDTH,\n getDefaultWidth: (node: Node<unknown>): ColumnSize =>\n isSelection(node) ? selectionWidth : FLEXIBLE,\n }\n}\n\n/**\n * What the body shows in place of rows, from its `renderEmptyState`, as the\n * component `ListEmptyComponent` takes.\n */\nfunction EmptyBody() {\n const own = stylesOf(useTheme())\n const text = useTypeRole('bodyMedium')\n const shown = useTable().renderEmptyState?.()\n\n return (\n <View style={own.empty}>\n {isTextual(shown) ? (\n <NativeText style={composeStyles<TextStyle>(text, own.emptyText)}>\n {shown}\n </NativeText>\n ) : (\n shown\n )}\n </View>\n )\n}\n\n/**\n * Where each column ends, from the table's start, which is where its resize\n * handle is centred.\n */\nfunction endsOf(table: TableValue): number[] {\n const ends: number[] = []\n let end = 0\n\n for (const column of table.columns) {\n end += table.layout.getColumnWidth(column.key)\n ends.push(end)\n }\n return ends\n}\n\n/**\n * The rows under the body, in label large and the muted role, under a rule\n * of their own, each cell its column's width or the columns' it spans. They\n * take no press and no selection, as React Aria keeps a footer out of both.\n */\nfunction FooterRows() {\n const own = stylesOf(useTheme())\n const table = useTable()\n const label = useTypeRole('labelLarge')\n const { footer } = table\n\n if (footer === undefined) {\n return null\n }\n\n return (\n <View\n style={composeStyles<ViewStyle>(own.footer, footer.style)}\n testID={footer.testID}\n >\n {childElementsOf(footer.children).map((row, rowIndex) => {\n if (!isValidElement<TableRowProps>(row)) {\n return null\n }\n const rowCells = childElementsOf(\n typeof row.props.children === 'function' ? null : row.props.children,\n )\n const starts = startsOf(\n rowCells.map((cell) =>\n isValidElement<TableCellProps>(cell)\n ? (cell.props.colSpan ?? 1)\n : 0,\n ),\n )\n const cells = rowCells.map((cell, cellIndex) => {\n if (!isValidElement<TableCellProps>(cell)) {\n return null\n }\n const width = widthAcross(\n table,\n starts[cellIndex] ?? 0,\n cell.props.colSpan ?? 1,\n )\n return (\n <View\n key={cell.key ?? cellIndex}\n style={composeStyles<ViewStyle>(\n own.cell,\n { width },\n cell.props.style,\n )}\n testID={cell.props.testID}\n >\n {isTextual(cell.props.children) ? (\n <NativeText\n style={composeStyles<TextStyle>(label, own.footerText)}\n >\n {cell.props.children}\n </NativeText>\n ) : (\n cell.props.children\n )}\n </View>\n )\n })\n return (\n <View\n key={row.key ?? rowIndex}\n style={composeStyles<ViewStyle>(\n own.row,\n rowIndex > 0 ? own.rowRule : undefined,\n row.props.style,\n )}\n testID={row.props.testID}\n >\n {cells}\n </View>\n )\n })}\n </View>\n )\n}\n\n// The entries the collection holds for a `Table.Header` part: its columns,\n// each built by its own part, read afresh each time the collection is.\nfunction* headerNodes(props: TableHeaderProps, context: BuilderContext) {\n const { children, columns } = props\n\n context.columns = []\n if (typeof children === 'function') {\n for (const value of columns ?? []) {\n yield { renderer: children, type: 'column', value }\n }\n return\n }\n for (const element of childElementsOf(children)) {\n yield { element, type: 'column' }\n }\n}\n\n/**\n * The header row: each column's header, its column's width, and the resize\n * handles over them in a table that resizes.\n */\nfunction HeaderRow() {\n const own = stylesOf(useTheme())\n const table = useTable()\n const { header } = table\n\n return (\n <View\n style={composeStyles<ViewStyle>(own.header, header.style)}\n testID={header.testID}\n >\n {table.columns.map((column) => (\n <ColumnHeader column={column} key={column.key} />\n ))}\n {table.resizable ? <ResizeHandles /> : null}\n </View>\n )\n}\n\nfunction isLoadMore(\n element: ReactNode,\n): element is ReactElement<TableLoadMoreProps> {\n return isValidElement(element) && element.type === TableLoadMore\n}\n\n// Whether a column is the one the rows put their checkboxes in.\nfunction isSelection(node: Node<unknown>) {\n // oxlint-disable-next-line typescript/no-unsafe-member-access -- a node carries the props its column was written with, which React Stately types as `any`\n return node.props?.selection === true\n}\n\n/**\n * Whether what a cell holds is text alone, which it sets in its own type\n * role, as React Native draws text only inside a Text.\n */\nfunction isTextual(node: ReactNode) {\n const parts = Children.toArray(node)\n\n return (\n parts.length > 0 &&\n parts.every((part) => typeof part === 'string' || typeof part === 'number')\n )\n}\n\n// A row's key in the `FlatList`.\nfunction keyOf(node: Node<unknown>) {\n return String(node.key)\n}\n\n/**\n * The part `type` of the table's children, or what is left out: the header,\n * the body and the footer are each read off their own part.\n */\nfunction partOf<P>(children: ReactNode, type: unknown) {\n return childElementsOf(children).find(\n (child): child is ReactElement<P> =>\n isValidElement(child) && child.type === type,\n )\n}\n\n// One row of the body, drawn as the part it came from.\nfunction renderRow({ index, item }: ListRenderItemInfo<Node<unknown>>) {\n return <BodyRow index={index} node={item} />\n}\n\n/**\n * A column's resize handle: a target centred on its trailing edge holding\n * the divider's rule, which a drag along the header moves, and a slider to a\n * screen reader, stepped by `RESIZE_STEP`. A drag starting on it holds the\n * table's sideways scroll still.\n */\nfunction ResizeHandle({\n column,\n end,\n isLast,\n}: {\n readonly column: Node<unknown>\n readonly end: number\n readonly isLast: boolean\n}) {\n const own = stylesOf(useTheme())\n const table = useTable()\n const locale = useLocaleOf(undefined)\n const { layout, native, onResize, onResizeEnd } = table\n const { key } = column\n // The width the drag started from, or -1 between drags, and the width it\n // last asked for. Shared values rather than refs: the gesture's callbacks\n // are built while rendering, and the React Compiler lets no ref reach\n // them.\n const from = useSharedValue(-1)\n const last = useSharedValue(0)\n const width = layout.getColumnWidth(key)\n const resizing = layout.resizingColumn === key\n\n function begin() {\n from.set(layout.getColumnWidth(key))\n last.set(layout.getColumnWidth(key))\n layout.startResize(key)\n }\n\n function move(translation: number) {\n const start = from.get()\n if (start < 0) {\n return\n }\n // A drag towards the end widens the column, which is leftwards in a\n // right-to-left layout.\n const next = start + (I18nManager.isRTL ? -translation : translation)\n last.set(next)\n onResize?.(layout.updateResizedColumns(key, next))\n }\n\n function finish() {\n if (from.get() < 0) {\n return\n }\n from.set(-1)\n const sizes = layout.updateResizedColumns(key, last.get())\n layout.endResize()\n onResizeEnd?.(sizes)\n }\n\n // Gesture Handler 3 deprecates these builders for hooks that version 2\n // does not have, and the peer range admits both, so the builders stay\n // while it does.\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see above\n const drag = Gesture.Pan()\n // Taken once it moves along the header, and let go to a scroll once it\n // moves across it first.\n .activeOffsetX(SLOP_RANGE)\n .failOffsetY(SLOP_RANGE)\n .runOnJS(true)\n // The edge follows the finger from where it went down, so the distance\n // it moved before the drag was taken counts too.\n .onStart(({ translationX }) => {\n begin()\n move(translationX)\n })\n .onUpdate(({ translationX }) => {\n move(translationX)\n })\n .onFinalize(() => {\n finish()\n })\n const held = native === undefined ? drag : drag.blocksExternalGesture(native)\n const pan =\n table.testID === undefined\n ? held\n : held.withTestId(`${table.testID}-resize-${String(key)}`)\n\n return (\n <GestureDetector gesture={pan}>\n <View\n accessibilityActions={ADJUSTABLE}\n accessible\n aria-label={`${table.resizeLabel} ${column.textValue}`}\n aria-valuemax={Math.floor(layout.getColumnMaxWidth(key))}\n aria-valuemin={Math.floor(layout.getColumnMinWidth(key))}\n aria-valuenow={Math.floor(width)}\n aria-valuetext={columnSizeFor(Math.floor(width), locale)}\n onAccessibilityAction={stepOf(table, key)}\n role=\"slider\"\n style={composeStyles<ViewStyle>(\n styles.handle,\n isLast ? styles.handleLast : undefined,\n { start: end - HANDLE / 2 },\n )}\n >\n <View\n style={composeStyles<ViewStyle>(\n styles.rule,\n isLast ? styles.ruleLast : undefined,\n own.ruleLine,\n resizing ? own.ruleResizing : undefined,\n )}\n />\n </View>\n </GestureDetector>\n )\n}\n\n// The handles of the columns that resize, over the header's columns.\nfunction ResizeHandles() {\n const table = useTable()\n const ends = endsOf(table)\n const lastIndex = table.columns.length - 1\n\n return (\n <View style={styles.handles}>\n {table.columns.map((column, index) =>\n // oxlint-disable-next-line typescript/no-unsafe-member-access -- a node carries the props its column was written with, which React Stately types as `any`\n column.props?.resizable === true ? (\n <ResizeHandle\n column={column}\n end={ends[index] ?? 0}\n isLast={index === lastIndex}\n key={column.key}\n />\n ) : null,\n )}\n </View>\n )\n}\n\n// The entry the collection holds for a `Table.Row` part: keyed by the row's\n// `id`, carrying the props it is drawn from, and holding its cells, which\n// have to fill every column, as React Stately's own row holds them to.\nfunction* rowNode(props: TableRowProps, context: BuilderContext) {\n const { children } = props\n\n yield {\n 'aria-label': props['aria-label'],\n *childNodes() {\n if (typeof children === 'function') {\n for (const column of context.columns) {\n yield { element: children(column.key), key: column.key, type: 'cell' }\n }\n return\n }\n const cells = childElementsOf(children)\n const count = cells.reduce<number>((sum, cell) => sum + spanOf(cell), 0)\n if (count !== context.columns.length) {\n throw new Error(\n `Cell count must match column count. Found ${count} cells and ${context.columns.length} columns.`,\n )\n }\n for (const element of cells) {\n yield { element, type: 'cell' }\n }\n },\n hasChildNodes: true,\n key: props.id,\n props,\n shouldInvalidate(next: BuilderContext) {\n return (\n next.columns.length !== context.columns.length ||\n next.columns.some(\n (column, index) => column.key !== context.columns[index]?.key,\n )\n )\n },\n textValue: props.textValue,\n type: 'item',\n }\n}\n\n// Selects every row, or none once all of them are, as React Aria's\n// select-all checkbox does whatever it is handed.\nfunction selectAllOf(state: TableState<unknown>) {\n return () => {\n state.selectionManager.toggleSelectAll()\n }\n}\n\n/**\n * What the table says once its rows are sorted, as React Aria says it, and\n * nothing for a table that sorts by nothing.\n */\nfunction sortMessageOf(state: TableState<unknown>, locale: string) {\n const { sortDescriptor } = state\n\n if (sortDescriptor === null) {\n return ''\n }\n const column = state.collection.columns.find(\n (each) => each.key === sortDescriptor.column,\n )\n return sortedFor(\n sortDescriptor.direction,\n column?.textValue ?? String(sortDescriptor.column),\n locale,\n )\n}\n\n// Sorts by a column, the other way round when it already is.\nfunction sortOf(state: TableState<unknown>, key: Key) {\n return () => {\n state.sort(key)\n }\n}\n\n// How many columns a cell spans.\nfunction spanOf(cell: ReactNode) {\n return isValidElement<TableCellProps>(cell) ? (cell.props.colSpan ?? 1) : 1\n}\n\n// The width a body cell is drawn at: the columns' it spans from where it sits.\nfunction spanWidthOf(table: TableValue, cell: CellNode) {\n return widthAcross(table, cell.colIndex ?? cell.index, cell.colSpan ?? 1)\n}\n\n/**\n * Runs the step a screen reader asks a handle for, as a drag that starts and\n * ends at once, so `onResizeEnd` comes once as it does for a key on web.\n */\nfunction stepOf(table: TableValue, key: Key) {\n return (event: AccessibilityActionEvent) => {\n const { actionName } = event.nativeEvent\n if (actionName !== 'increment' && actionName !== 'decrement') {\n return\n }\n const { layout } = table\n const step = actionName === 'increment' ? RESIZE_STEP : -RESIZE_STEP\n layout.startResize(key)\n const sizes = layout.updateResizedColumns(\n key,\n layout.getColumnWidth(key) + step,\n )\n table.onResize?.(sizes)\n layout.endResize()\n table.onResizeEnd?.(sizes)\n }\n}\n\n/**\n * A grid of rows and columns. Sorting and selection are React Stately's, as\n * web's are React Aria's: pass `sortDescriptor` with `onSortChange` and mark\n * the sortable columns `allowsSorting`, and set `selectionMode` to `single`\n * or `multiple` with `selectedKeys` and `onSelectionChange`, or\n * `defaultSelectedKeys`.\n *\n * ```tsx\n * <Table aria-label=\"Label\" selectionMode=\"multiple\">\n * <Table.Header>\n * <Table.Column id=\"colSelect\" selection />\n * <Table.Column id=\"colName\" 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 any content: `Table.Header`,\n * `Table.Column`, `Table.Body`, `Table.Row`, `Table.Cell`, `Table.LoadMore`\n * and `Table.Footer`, which the table draws from their props, so none of them\n * renders anything on its own. A column's `id` and a row's share one\n * namespace, so keep the two sets apart, as `col`-prefixed column ids do.\n * Name the table with `aria-label`.\n *\n * The columns fill the table's width, `1fr` each unless `defaultWidth` or\n * `width` says otherwise, and the table scrolls sideways once they are wider\n * than it is. The rows scroll by themselves, so a table on a page that\n * scrolls takes `scrollEnabled={false}` and is laid out at its full length,\n * and one with `stickyHeader` wants a height to fill. `style` lands on the\n * box the table is drawn in, and `ref`, `aria-label`, `testID` and the\n * scroll props on the `FlatList` that holds the rows.\n *\n * The rows take focus while they run past the table's height, as web's grid\n * is a tab stop, so a keyboard can scroll them whatever they hold, and the\n * sideways scroll does while the columns are wider than the table; a call\n * site's own `focusable` still wins for the rows.\n */\nfunction Table({\n children,\n defaultSelectedKeys,\n disabledBehavior = 'all',\n disabledKeys,\n disallowEmptySelection,\n onSelectionChange,\n onSortChange,\n selectedKeys,\n selectionMode = 'none',\n sortDescriptor,\n ...props\n}: TableProps) {\n const theme = useTheme()\n const window = useWindowDimensions()\n const [measured, setMeasured] = useState<null | number>(null)\n const header = partOf<TableHeaderProps>(children, TableHeader)\n const body = partOf<TableBodyProps>(children, TableBody)\n const footer = partOf<TableFooterProps>(children, TableFooter)\n\n if (header === undefined || body === undefined) {\n throw new Error('A Table holds a Table.Header and a Table.Body.')\n }\n\n const state = useTableState<object>({\n // Each part builds its own entry in the collection; see `rowNode` and\n // the parts beside it. The collection asks each element for its entry.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- see above\n children: [header, body] as TableStateProps<object>['children'],\n defaultSelectedKeys,\n disabledBehavior,\n disabledKeys,\n disallowEmptySelection,\n onSelectionChange,\n onSortChange,\n selectedKeys,\n selectionMode,\n sortDescriptor,\n })\n const selectionWidth = 2 * theme.spacing.lg + LAYER_SIZE\n const defaults = useMemo(() => defaultsOf(selectionWidth), [selectionWidth])\n const width = measured ?? window.width\n const layout = useTableColumnResizeState(\n { ...defaults, tableWidth: width },\n state,\n )\n\n return (\n <TableView\n {...props}\n body={body.props}\n footer={footer?.props}\n header={header.props}\n layout={layout}\n onWidth={setMeasured}\n state={state}\n width={width}\n />\n )\n}\n\n/**\n * The rows. `renderEmptyState` is what the table shows when there are none,\n * and a `Table.LoadMore` after them is the row it shows while fetching\n * more. The table draws it from its props, so it renders nothing on its\n * own.\n */\nfunction TableBody<T extends object = object>(_props: TableBodyProps<T>): null {\n return null\n}\n\nTableBody.getCollectionNode = bodyNode\n\n/**\n * One cell. `selection` draws this row's checkbox in place of whatever else\n * the cell would hold. `style` and `testID` land on the cell.\n */\nfunction TableCell(_props: TableCellProps): null {\n return null\n}\n\nTableCell.getCollectionNode = cellNode\n\n/**\n * One column. `allowsSorting` makes the header itself the control that\n * sorts; the arrow appears on the column the `sortDescriptor` names.\n * `selection` draws the select-all checkbox in place of a name. `style` and\n * `testID` land on the column's header.\n *\n * Its `id` shares a namespace with the rows', so give the two sets values\n * that cannot meet: a column and a row with one id between them leaves the\n * table with no columns at all.\n */\nfunction TableColumn(_props: TableColumnProps): null {\n return null\n}\n\nTableColumn.getCollectionNode = columnNode\n\n// What follows the rows: the ring while more are fetched, then the footer.\nfunction TableEnd() {\n const own = stylesOf(useTheme())\n const { loadMore } = useTable()\n\n return (\n <>\n {loadMore === undefined ? null : (\n <LoadingRow\n {...loadMore}\n style={composeStyles<ViewStyle>(\n loadMore.isLoading === true ? own.loading : undefined,\n loadMore.style,\n )}\n />\n )}\n <FooterRows />\n </>\n )\n}\n\n/**\n * Rows under the body, for totals and the like, ruled off from it. They are\n * not part of the selection and take no press, as React Aria keeps a footer\n * out of both. `style` and `testID` land on the footer.\n */\nfunction TableFooter(_props: TableFooterProps): null {\n return null\n}\n\n/**\n * The header row, holding the columns, and the rule drawn under it. `style`\n * and `testID` land on the row.\n */\nfunction TableHeader<T extends object = object>(\n _props: TableHeaderProps<T>,\n): null {\n return null\n}\n\nTableHeader.getCollectionNode = headerNodes\n\n/**\n * The row shown while more rows are being fetched. `onLoadMore` is called\n * as the reader nears the end of the table, and the ring is drawn only while\n * `isLoading`, in a live region, so a screen reader hears it arrive. It goes\n * inside `Table.Body`, after the rows.\n */\nfunction TableLoadMore(_props: TableLoadMoreProps): null {\n return null\n}\n\n/**\n * One row. Give every row an `id`, which is the key selection is reported\n * by, and keep it apart from every column's. `onAction` runs when a press\n * runs the row's action, and `href` goes to that route. `style`, `ref` and\n * `testID` land on the row.\n */\nfunction TableRow<T extends object = object>(_props: TableRowProps<T>): null {\n return null\n}\n\nTableRow.getCollectionNode = rowNode\n\n// Keeps the rows' height as it changes, and hands it on to the call site.\nfunction contentTo(\n set: (height: number) => void,\n then: ScrollViewProps['onContentSizeChange'],\n) {\n return (width: number, height: number) => {\n set(height)\n then?.(width, height)\n }\n}\n\n// Keeps the height the rows scroll in as it is laid out, and hands the\n// layout on to the call site.\nfunction roomTo(\n set: (height: number) => void,\n then: ScrollViewProps['onLayout'],\n) {\n return (event: LayoutChangeEvent) => {\n set(event.nativeEvent.layout.height)\n then?.(event)\n }\n}\n\n/**\n * The column each footer cell starts at, from the columns the cells before it\n * span, worked out before the cells are drawn rather than counted up while\n * they are, which the React Compiler reads as a change after render.\n */\nfunction startsOf(spans: readonly number[]): number[] {\n const starts: number[] = []\n let start = 0\n\n for (const span of spans) {\n starts.push(start)\n start += span\n }\n return starts\n}\n\n/**\n * What a `Table` draws once it has its state and its columns' widths: the\n * header, the rows and the footer, as wide as the columns together, in a\n * box that scrolls sideways once they are wider than it is.\n */\nfunction TableView({\n body,\n footer,\n header,\n layout,\n onContentSizeChange,\n onLayout,\n onResize,\n onResizeEnd,\n onRowAction,\n onWidth,\n ref,\n resizable = false,\n resizeLabel,\n selectAllLabel,\n selectLabel,\n state,\n stickyHeader = false,\n style,\n width,\n ...props\n}: TableViewProps) {\n const messages = useMessages()\n const locale = useLocaleOf(undefined)\n const [content, setContent] = useState(0)\n const [room, setRoom] = useState(0)\n const { columns } = state.collection\n const total = columns.reduce(\n (sum, column) => sum + layout.getColumnWidth(column.key),\n 0,\n )\n const rows = useMemo(() => [...state.collection], [state.collection])\n const { renderEmptyState } = body\n const loadMore = childElementsOf(\n typeof body.children === 'function' ? null : body.children,\n ).find(isLoadMore)?.props\n const isLoading = loadMore?.isLoading ?? false\n const native = useMemo(\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see ResizeHandle\n () => (resizable ? Gesture.Native() : undefined),\n [resizable],\n )\n const { testID } = props\n const value = useMemo<TableValue>(\n () => ({\n columns,\n footer,\n header,\n layout,\n loadMore,\n native,\n onResize,\n onResizeEnd,\n onRowAction,\n renderEmptyState,\n resizable,\n resizeLabel: resizeLabel ?? messages.table.resizer,\n selectAllLabel,\n selectLabel: selectLabel ?? messages.select,\n state,\n testID,\n }),\n [\n columns,\n footer,\n header,\n layout,\n loadMore,\n messages,\n native,\n onResize,\n onResizeEnd,\n onRowAction,\n renderEmptyState,\n resizable,\n resizeLabel,\n selectAllLabel,\n selectLabel,\n state,\n testID,\n ],\n )\n const Root = resizable ? GestureHandlerRootView : View\n const scroller = (\n <ScrollView\n // A keyboard stop while there is anywhere to scroll, as the rows are,\n // which axe's scrollable-region-focusable asks of it under React\n // Native Web.\n focusable={total > width}\n horizontal\n scrollEnabled={total > width}\n showsHorizontalScrollIndicator={total > width}\n >\n <View style={composeStyles<ViewStyle>(styles.grid, { width: total })}>\n {stickyHeader ? <HeaderRow /> : null}\n <FlatList\n // A keyboard stop while the rows run past the room they have, so\n // the arrow keys scroll them whatever they hold, which axe's\n // scrollable-region-focusable asks of it under React Native Web.\n focusable={content > room}\n {...props}\n data={rows}\n keyExtractor={keyOf}\n ListEmptyComponent={\n isLoading || renderEmptyState === undefined ? undefined : EmptyBody\n }\n ListFooterComponent={TableEnd}\n ListHeaderComponent={stickyHeader ? undefined : HeaderRow}\n onContentSizeChange={contentTo(setContent, onContentSizeChange)}\n onEndReached={\n loadMore === undefined ? undefined : loadMoreOf(loadMore)\n }\n onEndReachedThreshold={loadMore?.scrollOffset ?? 1}\n onLayout={roomTo(setRoom, onLayout)}\n ref={ref}\n renderItem={renderRow}\n />\n </View>\n </ScrollView>\n )\n\n return (\n <TableContext value={value}>\n <Root onLayout={widthTo(onWidth)} style={style}>\n {native === undefined ? (\n scroller\n ) : (\n <GestureDetector gesture={native}>{scroller}</GestureDetector>\n )}\n <Status message={sortMessageOf(state, locale)} />\n </Root>\n </TableContext>\n )\n}\n\n// The table a part is drawn in. Every part is drawn inside the table's own\n// provider, so there always is one.\nfunction useTable(): TableValue {\n const table = use(TableContext)\n\n if (table === null) {\n throw new Error('A Table part is drawn by the Table it is in.')\n }\n return table\n}\n\n// The width `span` columns take from the column at `start`.\nfunction widthAcross(table: TableValue, start: number, span: number) {\n let width = 0\n\n for (const column of table.columns.slice(start, start + span)) {\n width += table.layout.getColumnWidth(column.key)\n }\n return width\n}\n\n// Keeps the table's width as it is laid out, which its columns fill.\nfunction widthTo(set: (width: number) => void) {\n return ({ nativeEvent }: LayoutChangeEvent) => {\n set(nativeEvent.layout.width)\n }\n}\n\nTable.Body = TableBody\nTable.Cell = TableCell\nTable.Column = TableColumn\nTable.Footer = TableFooter\nTable.Header = TableHeader\nTable.LoadMore = TableLoadMore\nTable.Row = TableRow\n\nexport {\n Table,\n TableBody,\n TableCell,\n TableColumn,\n TableFooter,\n TableHeader,\n TableLoadMore,\n TableRow,\n}\nexport type {\n TableBodyProps,\n TableCellProps,\n TableColumnProps,\n TableFooterProps,\n TableHeaderProps,\n TableLoadMoreProps,\n TableProps,\n TableRowProps,\n}\n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ReactNode","Ref","AccessibilityActionEvent","ColorValue","HostInstance","LayoutChangeEvent","ListRenderItemInfo","PressableProps","ScrollViewProps","StyleProp","TextStyle","ViewStyle","GestureType","DisabledBehavior","Key","Node","Selection","SelectionMode","SortDescriptor","ColumnSize","ColumnStaticSize","TableColumnResizeState","TableState","TableStateProps","Children","createContext","isValidElement","use","useMemo","useState","FlatList","I18nManager","Text","NativeText","Pressable","ScrollView","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","GestureHandlerRootView","useSharedValue","useTableColumnResizeState","useTableState","CollectionLoadMoreProps","ResolvedTheme","toggleState","accessibilityActionOf","childElementsOf","LoadingRow","loadMoreOf","noop","pressThen","SelectBox","Status","LAYER_SIZE","ArrowDownwardGlyph","ArrowUpwardGlyph","IconStyleContext","columnSizeFor","sortedFor","useLocaleOf","useMessages","usePressFeedback","useOpenLink","rowContentColor","rowStyles","ADJUSTABLE","SLOP_RANGE","useTheme","composeStyles","themedStyles","useTypeRole","Checkbox","ROW_HEIGHT","ARROW_SIZE","HANDLE","RESIZE_STEP","FLEXIBLE","MIN_WIDTH","styles","create","grid","flexDirection","handle","bottom","position","top","width","handleLast","handles","left","pointerEvents","right","rule","end","ruleLast","selection","alignItems","stylesOf","colors","sizing","spacing","cell","justifyContent","paddingHorizontal","lg","empty","paddingVertical","xxl","emptyText","color","onSurfaceVariant","textAlign","footer","borderTopColor","outlineVariant","borderTopWidth","footerText","header","borderBottomColor","borderBottomWidth","minHeight","rowSm","headerContent","gap","sm","headerText","flexShrink","loading","row","rowRule","ruleLine","backgroundColor","ruleResizing","primary","selected","primaryContainer","BuilderContext","columns","CellNode","colIndex","colSpan","TableBodyProps","children","item","T","items","Iterable","renderEmptyState","TableCellProps","style","testID","textValue","TableColumnProps","allowsSorting","defaultWidth","id","isRowHeader","maxWidth","minWidth","resizable","TableFooterProps","TableHeaderProps","column","TableLoadMoreProps","TableProps","Omit","defaultSelectedKeys","disabledBehavior","disabledKeys","disallowEmptySelection","onResize","widths","Map","onResizeEnd","onRowAction","key","onSelectionChange","keys","onSortChange","descriptor","ref","resizeLabel","selectAllLabel","selectedKeys","selectionMode","selectLabel","sortDescriptor","stickyHeader","TableRowProps","columnKey","href","isDisabled","onAction","value","TableValue","layout","loadMore","native","state","TableViewProps","body","onWidth","TableContext","BodyCell","t0","$","_c","isSelected","onSelect","own","table","useTable","text","t1","size","icon","t2","props","undefined","spanWidthOf","t3","T0","t4","rendered","isTextual","t5","t6","bodyNode","childNodes","renderer","type","element","isLoadMore","hasChildNodes","BodyRow","index","node","theme","openLink","onBlur","onFocus","onHoverIn","onHoverOut","onLongPress","onPress","onPressIn","onPressOut","_children","_id","_isDisabled","t7","t8","t9","t10","t11","t12","_textValue","_value","t13","selectionManager","disabled","checks","canSelectItem","selectable","marked","rowAction","action","acts","isEmpty","select","content","feedback","cells","collection","getChildren","map","rowStyle","accessibilityActions","label","name","onAccessibilityAction","collapse","expand","handlers","ring","layer","cellNode","ColumnHeader","messages","direction","onSurface","cellStyle","getColumnWidth","mode","selectAll","isSelectAll","selectAllOf","arrowColor","sortable","join","sortOf","columnNode","context","Generator","nodes","shouldInvalidate","next","push","defaultsOf","selectionWidth","getDefaultMinWidth","isSelection","getDefaultWidth","EmptyBody","shown","endsOf","ends","FooterRows","rowIndex","rowCells","starts","startsOf","_temp","cell_0","cellIndex","widthAcross","headerNodes","HeaderRow","_temp2","TableLoadMore","parts","toArray","length","every","part","keyOf","String","partOf","find","child","P","renderRow","ResizeHandle","isLast","locale","from","last","resizing","resizingColumn","begin","set","startResize","move","translation","start","get","isRTL","updateResizedColumns","finish","sizes","endResize","drag","Pan","activeOffsetX","failOffsetY","runOnJS","onStart","translationX","onUpdate","translationX_0","onFinalize","held","blocksExternalGesture","pan","withTestId","T1","getColumnMaxWidth","Math","floor","getColumnMinWidth","t14","stepOf","t15","t16","t17","t18","T2","t19","t20","t21","t22","ResizeHandles","lastIndex","rowNode","count","reduce","sum","spanOf","Error","some","toggleSelectAll","sortMessageOf","each","sort","event","actionName","nativeEvent","step","Table","window","measured","setMeasured","TableHeader","TableBody","TableFooter","defaults","tableWidth","_props","getCollectionNode","TableCell","TableColumn","TableEnd","isLoading","Symbol","for","TableRow","contentTo","height","then","roomTo","spans","span","TableView","onContentSizeChange","onLayout","setContent","room","setRoom","Root","rows","total","Native","resizer","scrollOffset","scroller","widthTo","t23","t24","slice","Body","Cell","Column","Footer","Header","LoadMore","Row","_c","NativeText"],"sources":["../../../src/components/table/index.tsx"],"sourcesContent":["import type { ReactElement, ReactNode, Ref } from 'react'\nimport type {\n AccessibilityActionEvent,\n ColorValue,\n HostInstance,\n LayoutChangeEvent,\n ListRenderItemInfo,\n PressableProps,\n ScrollViewProps,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native'\nimport type { GestureType } from 'react-native-gesture-handler'\nimport type {\n DisabledBehavior,\n Key,\n Node,\n Selection,\n SelectionMode,\n SortDescriptor,\n} from 'react-stately'\nimport type {\n ColumnSize,\n ColumnStaticSize,\n TableColumnResizeState,\n TableState,\n TableStateProps,\n} from 'react-stately/useTableState'\n\nimport {\n Children,\n createContext,\n isValidElement,\n use,\n useMemo,\n useState,\n} from 'react'\nimport {\n FlatList,\n I18nManager,\n Text as NativeText,\n Pressable,\n ScrollView,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\nimport {\n Gesture,\n GestureDetector,\n GestureHandlerRootView,\n} from 'react-native-gesture-handler'\nimport { useSharedValue } from 'react-native-reanimated'\nimport {\n useTableColumnResizeState,\n useTableState,\n} from 'react-stately/useTableState'\n\nimport type { CollectionLoadMoreProps } from '../../collection'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { toggleState } from '../../button'\nimport {\n accessibilityActionOf,\n childElementsOf,\n LoadingRow,\n loadMoreOf,\n noop,\n pressThen,\n SelectBox,\n Status,\n} from '../../collection'\nimport { LAYER_SIZE } from '../../control/styles'\nimport { ArrowDownwardGlyph, ArrowUpwardGlyph } from '../../glyphs'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { columnSizeFor, sortedFor } from '../../i18n'\nimport { useLocaleOf, useMessages } from '../../i18n/provider'\nimport { usePressFeedback } from '../../press'\nimport { useOpenLink } from '../../router'\nimport { rowContentColor, rowStyles } from '../../row/styles'\nimport { ADJUSTABLE, SLOP_RANGE } from '../../slider'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\nimport { Checkbox } from '../checkbox'\n\n// kanso-ui's Table: a grid of rows and columns, with sorting, selection,\n// resizing, a footer and a row that loads more. The design system carries no\n// data table page, so web draws it from the archived one at\n// <https://m2.material.io/components/data-tables>, and so does this: a 56dp\n// header row in label large and the muted role, 52dp body rows in body\n// medium, 16dp of padding at each side of a cell, a rule between rows and\n// under the header, and an arrow beside the name of the column being sorted.\n// Its colour roles are the current system's, and a row's state layers and\n// selected container are the ones a list row takes, written from the same\n// tokens, as web's are. The state is React Stately's table state, which web's\n// React Aria builds on, so the columns, rows, selection and sort are kept as\n// web keeps them, and the widths are worked out by React Stately's column\n// layout, `fr` widths and all.\n//\n// Four things differ from web's, each because a screen reader or a touch on\n// a phone works differently from a keyboard in a browser.\n//\n// **A row is one element to a screen reader**, as a List's row is. VoiceOver\n// and TalkBack read a pressable row as one element and reach nothing inside\n// it, and announce neither a grid nor a cell, so a row is a button that reads\n// its cells in turn and reports whether it is selected, and a row's\n// checkbox is drawn for the eye: selecting a row from a screen reader is an\n// accessibility action named by `selectLabel`. `isRowHeader` is kept for a\n// call site written for both libraries, and says nothing on native. A press\n// does what React Aria's touch press does, as on a List's row: it selects a\n// row that has no action, and on one that has, runs the action while nothing\n// is selected and selects once something is, and a long press selects.\n//\n// **A sortable column says how it sorts in its name.** Neither platform reads\n// web's `aria-sort`, so a sortable column's header is a button whose name is\n// its own, then \"sortable column\", then the direction it sorts in while it is\n// the sorted one, which is what React Aria says on Android for the same\n// reason. Once the rows are sorted, the sort is said as React Aria says it.\n//\n// **The header sticks by being drawn outside the rows.** The rows are a\n// `FlatList`, and `stickyHeader` draws the header above it rather than as its\n// first cell, so the rows scroll under nothing and the header needs no ground\n// of its own to hide them. The table scrolls sideways as one when its columns\n// are wider than it is, header and footer with the rows.\n//\n// **A resize handle is a slider to a screen reader.** Web's handle is a\n// slider a keyboard steps with its arrow keys; this one takes a drag along\n// the header, and a screen reader steps it by 10dp, React Aria's step for a\n// key, through its increment and decrement actions. The handles are drawn\n// over the header row, after its columns, so each is above the column it\n// reaches into.\n\n// The archived page's body row, which no token carries.\nconst ROW_HEIGHT = 52\n\n// The arrow beside a sorted column's name, at the 18dp web draws it at.\nconst ARROW_SIZE = 18\n\n// The target a resize handle takes, centred on the column's trailing edge,\n// and the one past the last column, which keeps the half inside it, as web\n// clips it there.\nconst HANDLE = 24\n\n// How far a screen reader's step moves a column's edge, React Aria's step for\n// a key.\nconst RESIZE_STEP = 10\n\n// The width a column takes before anything says otherwise, and the narrowest\n// it is drawn, React Stately's own defaults.\nconst FLEXIBLE = '1fr'\nconst MIN_WIDTH = 75\n\nconst styles = StyleSheet.create({\n // The header, the rows and the footer, as wide as the columns together.\n grid: {\n flexDirection: 'column',\n },\n // A column's handle, a target across the header's height.\n handle: {\n bottom: 0,\n position: 'absolute',\n top: 0,\n width: HANDLE,\n },\n handleLast: {\n width: HANDLE / 2,\n },\n // Over the header's columns, taking no press but its handles'.\n handles: {\n bottom: 0,\n left: 0,\n pointerEvents: 'box-none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n // The divider's own rule, inside the column it ends, as web draws it, so a\n // column's edge is one line whether or not it can be dragged.\n rule: {\n bottom: 0,\n end: HANDLE / 2,\n position: 'absolute',\n top: 0,\n width: 1,\n },\n ruleLast: {\n end: 0,\n },\n // A checkbox's column, centred in the 16dp either side.\n selection: {\n alignItems: 'center',\n },\n})\n\nconst stylesOf = themedStyles(({ colors, sizing, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The page's 16dp at each side, which is also what puts 32dp between\n // two columns. What a cell holds keeps its own width, as it does in a\n // web table's cell, rather than stretching across the column: a Tag\n // there is drawn around its label, not as a bar the column's width.\n cell: {\n alignItems: 'flex-start',\n justifyContent: 'center',\n paddingHorizontal: spacing.lg,\n },\n // What the body shows in place of rows: muted, padded and centred, as\n // web's box is.\n empty: {\n alignItems: 'center',\n paddingHorizontal: spacing.lg,\n paddingVertical: spacing.xxl,\n },\n emptyText: {\n color: colors.onSurfaceVariant,\n textAlign: 'center',\n },\n // The footer's own rule above it, since its first row drops the rule\n // every first row drops.\n footer: {\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n },\n footerText: {\n color: colors.onSurfaceVariant,\n },\n // The page's 56dp header, and the rule under it.\n header: {\n borderBottomColor: colors.outlineVariant,\n borderBottomWidth: 1,\n flexDirection: 'row',\n minHeight: sizing.rowSm,\n },\n // The name and its arrow, after the name as the page puts it.\n headerContent: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: spacing.sm,\n },\n headerText: {\n color: colors.onSurfaceVariant,\n flexShrink: 1,\n },\n // The ring while more rows are fetched, at a body row's height, so the\n // table does not jump as they replace it.\n loading: {\n minHeight: ROW_HEIGHT,\n },\n // The page's 52dp row.\n row: {\n flexDirection: 'row',\n minHeight: ROW_HEIGHT,\n },\n // The rule above a row, dropped on the first of a group, where the\n // header's own rule or the table's edge already is.\n rowRule: {\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n },\n ruleLine: {\n backgroundColor: colors.outlineVariant,\n },\n // Thickened and in primary while it is dragged, inward, into the column\n // being sized.\n ruleResizing: {\n backgroundColor: colors.primary,\n width: 2,\n },\n selected: {\n backgroundColor: colors.primaryContainer,\n },\n }),\n)\n\n/**\n * What a part's entry is built with: the columns the header has given so\n * far, which a row reads its cells against.\n */\ntype BuilderContext = {\n columns: Node<unknown>[]\n}\n\n/** A cell's entry, and where it sits among the columns it spans. */\ntype CellNode = Node<unknown> & {\n readonly colIndex?: null | number\n readonly colSpan?: null | number\n}\n\ntype TableBodyProps<T extends object = object> = {\n /**\n * The rows, each a `Table.Row`, with a `Table.LoadMore` after them. With\n * `items`, a function from an item to its row, called for each in turn.\n */\n readonly children?: ((item: T) => ReactElement) | ReactNode\n /** The entries `children` draws a row for, when it is a function. */\n readonly items?: Iterable<T>\n /**\n * What the table shows in place of rows when it has none and nothing is\n * loading, in a muted, padded box across its width. A string is set in\n * body medium.\n */\n readonly renderEmptyState?: () => ReactNode\n}\n\ntype TableCellProps = {\n /** What the cell holds. A string is set in body medium. */\n readonly children?: ReactNode\n /**\n * How many columns the cell spans, from where it sits.\n * @default 1\n */\n readonly colSpan?: number\n /**\n * Draws this row's selection checkbox instead of `children`. The row's own\n * text is what names the row.\n */\n readonly selection?: boolean\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n /** The cell's text, read off `children` when they are a plain string. */\n readonly textValue?: string\n}\n\ntype TableColumnProps = {\n /**\n * Makes the header itself the control that sorts by the column, as\n * React Aria's prop does. The arrow appears on the column the table's\n * `sortDescriptor` names.\n * @default false\n */\n readonly allowsSorting?: boolean\n /** The column's name. */\n readonly children?: ReactNode\n /** The width the column starts at, when the table keeps its widths. */\n readonly defaultWidth?: ColumnSize | null\n /**\n * The key the column is sorted and sized by. It shares a namespace with\n * the rows' ids, so give the two sets values that cannot meet.\n */\n readonly id?: Key\n /**\n * Marks the column a screen reader reads a row by on web. Kept for a call\n * site written for both libraries; native reads every cell of a row.\n * @default false\n */\n readonly isRowHeader?: boolean\n /** The widest the column is drawn. */\n readonly maxWidth?: ColumnStaticSize | null\n /**\n * The narrowest the column is drawn.\n * @default 75\n */\n readonly minWidth?: ColumnStaticSize | null\n /**\n * Draws a handle at the column's trailing edge that drags its width. Needs\n * the table's own `resizable` as well.\n * @default false\n */\n readonly resizable?: boolean\n /**\n * Draws the select-all checkbox instead of `children`, for the column the\n * rows put their own checkboxes in.\n * @default false\n */\n readonly selection?: boolean\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n /** The column's name as text, read off `children` when it is a string. */\n readonly textValue?: string\n /** The column's width, for a call site holding the widths itself. */\n readonly width?: ColumnSize | null\n}\n\ntype TableFooterProps = {\n /** The rows under the body, each a `Table.Row` of `Table.Cell`s. */\n readonly children?: ReactNode\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype TableHeaderProps<T extends object = object> = {\n /**\n * The columns, each a `Table.Column`. With `columns`, a function from an\n * entry to its column, called for each in turn.\n */\n readonly children?: ((column: T) => ReactElement) | ReactNode\n /** The entries `children` draws a column for, when it is a function. */\n readonly columns?: Iterable<T>\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype TableLoadMoreProps = CollectionLoadMoreProps\n\ntype TableProps = Omit<\n ScrollViewProps,\n 'children' | 'horizontal' | 'role' | 'stickyHeaderIndices' | 'style'\n> & {\n /**\n * The parts: a `Table.Header`, a `Table.Body` and, under them, a\n * `Table.Footer`.\n */\n readonly children?: ReactNode\n /** The keys selected at first, when the table keeps its own selection. */\n readonly defaultSelectedKeys?: 'all' | Iterable<Key>\n /**\n * Whether `disabledKeys` takes every press off a row, or only its\n * selection, as React Aria's prop says.\n * @default 'all'\n */\n readonly disabledBehavior?: DisabledBehavior\n /** The keys of the rows drawn disabled. */\n readonly disabledKeys?: Iterable<Key>\n /**\n * Keeps the last selected row selected, so a press on it changes nothing.\n * @default false\n */\n readonly disallowEmptySelection?: boolean\n /** Called as a column is dragged, with every column's width. */\n readonly onResize?: (widths: Map<Key, ColumnSize>) => void\n /** Called once a drag ends, with every column's width. */\n readonly onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n /**\n * Called with a row's key when a press runs its action. A row's own\n * `onAction` takes its place for that row.\n */\n readonly onRowAction?: (key: Key) => void\n /** Called with the selected keys whenever a press changes them. */\n readonly onSelectionChange?: (keys: Selection) => void\n /** Called with the column and direction a press on a header asks for. */\n readonly onSortChange?: (descriptor: SortDescriptor) => void\n readonly ref?: Ref<FlatList>\n /**\n * Lets the columns marked `resizable` be dragged.\n * @default false\n */\n readonly resizable?: boolean\n /**\n * What a resize handle is called, for a screen reader, before its column's\n * name. Left out, it is the word for it in the `I18nProvider`'s language,\n * or the device's outside one, \"Resizer\" in English.\n */\n readonly resizeLabel?: string\n /**\n * What the select-all checkbox is called, for a screen reader. Left out,\n * it is the word for it in the `I18nProvider`'s language, or the device's\n * outside one, \"Select All\" in English, or \"Select\" while one row at a\n * time selects.\n */\n readonly selectAllLabel?: string\n /** The selected keys, for a call site holding the selection itself. */\n readonly selectedKeys?: 'all' | Iterable<Key>\n /**\n * Whether rows can be selected: one at a time, several, or none.\n * @default 'none'\n */\n readonly selectionMode?: SelectionMode\n /**\n * What selecting a row is called, for a screen reader: the accessibility\n * action that selects a row. Left out, it is the word for it in the\n * `I18nProvider`'s language, or the device's outside one, \"Select\" in\n * English.\n */\n readonly selectLabel?: string\n /** The column the rows are sorted by, and in which direction. */\n readonly sortDescriptor?: SortDescriptor\n /**\n * Holds the header row in place while the rows scroll under it. Needs the\n * table to have a height to scroll in.\n * @default false\n */\n readonly stickyHeader?: boolean\n readonly style?: StyleProp<ViewStyle>\n}\n\ntype TableRowProps<T extends object = object> = Omit<\n PressableProps,\n 'children' | 'disabled' | 'id' | 'role' | 'style'\n> & {\n /**\n * The row's cells, one `Table.Cell` for each column it spans, or a\n * function from a column's key to its cell.\n */\n readonly children?: ((columnKey: Key) => ReactElement) | ReactNode\n /** Goes to this route when a press runs the row's action. */\n readonly href?: string\n /**\n * The key the row is selected and reported by. Give one to every row, and\n * keep it apart from every column's.\n */\n readonly id?: Key\n /**\n * Draws the row disabled, as a key in the table's `disabledKeys` does.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Called when a press runs the row's action, in place of the table's\n * `onRowAction` for this row.\n */\n readonly onAction?: () => void\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n /** The row's text, for a row whose cells hold elements. */\n readonly textValue?: string\n /** The entry `children` was drawn for, kept on the row's node. */\n readonly value?: T\n}\n\n// What the parts drawn in the table read from it.\ntype TableValue = {\n readonly columns: readonly Node<unknown>[]\n readonly footer: TableFooterProps | undefined\n readonly header: TableHeaderProps\n readonly layout: TableColumnResizeState<unknown>\n readonly loadMore: TableLoadMoreProps | undefined\n /** The table's sideways scroll, which a handle's drag holds still. */\n // oxlint-disable-next-line typescript/no-deprecated -- the type of the builder ResizeHandle keeps; see there\n readonly native: GestureType | undefined\n readonly onResize: TableProps['onResize']\n readonly onResizeEnd: TableProps['onResizeEnd']\n readonly onRowAction: TableProps['onRowAction']\n readonly renderEmptyState: (() => ReactNode) | undefined\n readonly resizable: boolean\n readonly resizeLabel: string\n readonly selectAllLabel: string | undefined\n readonly selectLabel: string\n readonly state: TableState<unknown>\n readonly testID: string | undefined\n}\n\n// What a `Table` hands the view it draws.\ntype TableViewProps = Omit<\n TableProps,\n | 'children'\n | 'defaultSelectedKeys'\n | 'disabledBehavior'\n | 'disabledKeys'\n | 'disallowEmptySelection'\n | 'onSelectionChange'\n | 'onSortChange'\n | 'selectedKeys'\n | 'selectionMode'\n | 'sortDescriptor'\n> & {\n readonly body: TableBodyProps\n readonly footer: TableFooterProps | undefined\n readonly header: TableHeaderProps\n readonly layout: TableColumnResizeState<unknown>\n /** Called with the table's width as it is laid out. */\n readonly onWidth: (width: number) => void\n readonly state: TableState<unknown>\n /** The width the columns fill. */\n readonly width: number\n}\n\nconst TableContext = createContext<null | TableValue>(null)\n\n/**\n * A cell of a body row, its column's width or the columns' it spans: its\n * text in body medium and the row's content colour, or what it was given,\n * with an icon in it drawn in that colour, or the row's checkbox.\n */\nfunction BodyCell({\n cell,\n color,\n isDisabled,\n isSelected,\n onSelect,\n}: {\n readonly cell: CellNode\n readonly color: ColorValue\n readonly isDisabled: boolean\n readonly isSelected: boolean\n readonly onSelect: (() => void) | undefined\n}) {\n const own = stylesOf(useTheme())\n const table = useTable()\n const text = useTypeRole('bodyMedium')\n const icon = useMemo(() => ({ color, size: 24 }), [color])\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its cell was written with, which React Stately types as `any`\n const { selection = false, style, testID }: TableCellProps = cell.props\n const width = spanWidthOf(table, cell)\n\n if (selection) {\n return (\n <View\n style={composeStyles<ViewStyle>(\n own.cell,\n styles.selection,\n { width },\n style,\n )}\n testID={testID}\n >\n <SelectBox\n isDisabled={isDisabled}\n isSelected={isSelected}\n onPress={onSelect}\n />\n </View>\n )\n }\n\n return (\n <View\n style={composeStyles<ViewStyle>(own.cell, { width }, style)}\n testID={testID}\n >\n <IconStyleContext value={icon}>\n {isTextual(cell.rendered) ? (\n <NativeText style={composeStyles<TextStyle>(text, { color })}>\n {cell.rendered}\n </NativeText>\n ) : (\n cell.rendered\n )}\n </IconStyleContext>\n </View>\n )\n}\n\n// The entry the collection holds for a `Table.Body` part: its rows, each\n// built by its own part, with the `Table.LoadMore` among them left to the\n// table, which draws it after them.\nfunction* bodyNode(props: TableBodyProps) {\n const { children, items } = props\n\n yield {\n *childNodes() {\n if (typeof children === 'function') {\n for (const value of items ?? []) {\n yield { renderer: children, type: 'item', value }\n }\n return\n }\n for (const element of childElementsOf(children)) {\n if (!isLoadMore(element)) {\n yield { element, type: 'item' }\n }\n }\n },\n hasChildNodes: true,\n props,\n type: 'body',\n }\n}\n\n/**\n * A row of the body: the state layer, the ripple and the focus ring over its\n * cells, on primary container while selected and faded while disabled. A row\n * with nothing to do on a press, in a table that neither selects nor acts, is\n * a `View` that only presents.\n */\nfunction BodyRow({\n index,\n node,\n}: {\n readonly index: number\n readonly node: Node<unknown>\n}) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const table = useTable()\n const openLink = useOpenLink()\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its row was written with, which React Stately types as `any`\n const {\n children: _children,\n href,\n id: _id,\n isDisabled: _isDisabled,\n onAction,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n ref,\n style,\n textValue: _textValue,\n value: _value,\n ...props\n }: TableRowProps = node.props\n const { selectionManager } = table.state\n const { key } = node\n // The selection manager reads a row's own `isDisabled` off its entry,\n // beside the table's `disabledKeys`, so it answers for both.\n const disabled = selectionManager.isDisabled(key)\n const checks = selectionManager.selectionMode !== 'none'\n const selectable = selectionManager.canSelectItem(key)\n const selected = checks && selectionManager.isSelected(key)\n // A disabled row is drawn on no container, whether or not it is selected.\n const marked = selected && !disabled\n const rowAction = table.onRowAction\n const action =\n onAction ??\n (href === undefined\n ? rowAction === undefined\n ? undefined\n : () => {\n rowAction(key)\n }\n : () => {\n openLink(href)\n })\n // React Aria's rule for a touch press on a row that selects: the action\n // while nothing is selected, the selection after.\n const acts = action !== undefined && (!selectable || selectionManager.isEmpty)\n const select = () => {\n selectionManager.select(key)\n }\n const content = rowContentColor(theme, {\n isDisabled: disabled,\n isSelected: marked,\n })\n const feedback = usePressFeedback({\n color: content,\n disabled,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onPressIn,\n onPressOut,\n })\n // A table's collection always has `getChildren`, which hands a row's cells\n // over with the column each sits in.\n const cells = [...(table.state.collection.getChildren?.(key) ?? [])].map(\n (cell) => (\n <BodyCell\n cell={cell}\n color={content}\n isDisabled={disabled}\n isSelected={selected}\n key={cell.key}\n onSelect={acts && selectable ? select : undefined}\n />\n ),\n )\n const rowStyle = composeStyles<ViewStyle>(\n own.row,\n index > 0 ? own.rowRule : undefined,\n marked ? own.selected : undefined,\n )\n\n if (!checks && action === undefined && onPress === undefined) {\n return (\n <View\n aria-disabled={disabled || undefined}\n ref={ref}\n style={composeStyles<ViewStyle>(rowStyle, style)}\n testID={props.testID}\n >\n {cells}\n </View>\n )\n }\n\n return (\n <Pressable\n role={href === undefined ? 'button' : 'link'}\n {...props}\n {...(checks ? toggleState(selected) : undefined)}\n {...(selectable\n ? {\n accessibilityActions: [\n { label: table.selectLabel, name: 'select' },\n ],\n onAccessibilityAction: accessibilityActionOf({\n collapse: undefined,\n expand: undefined,\n select,\n }),\n }\n : undefined)}\n {...feedback.handlers}\n disabled={disabled}\n onLongPress={\n action !== undefined && selectable\n ? pressThen(onLongPress, select)\n : onLongPress\n }\n onPress={pressThen(onPress, acts ? action : selectable ? select : noop)}\n ref={ref}\n style={composeStyles<ViewStyle>(\n rowStyle,\n feedback.ring,\n feedback.ring === undefined ? undefined : rowStyles.ring,\n style,\n )}\n >\n {feedback.layer}\n {cells}\n </Pressable>\n )\n}\n\n// The entry the collection holds for a `Table.Cell` part.\nfunction* cellNode(props: TableCellProps) {\n yield {\n hasChildNodes: false,\n props,\n rendered: props.children,\n textValue:\n props.textValue ??\n (typeof props.children === 'string' ? props.children : ''),\n type: 'cell',\n }\n}\n\n/**\n * A column's header: its name in label large and the muted role, with the\n * arrow after it while the rows are sorted by it, as a button that sorts\n * where the column allows it, or the select-all checkbox.\n */\nfunction ColumnHeader({ column }: { readonly column: Node<unknown> }) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const table = useTable()\n const messages = useMessages()\n const label = useTypeRole('labelLarge')\n const { selectionManager } = table.state\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its column was written with, which React Stately types as `any`\n const {\n allowsSorting = false,\n selection = false,\n style,\n testID,\n }: TableColumnProps = column.props\n const { sortDescriptor } = table.state\n const direction =\n sortDescriptor?.column === column.key ? sortDescriptor.direction : undefined\n const feedback = usePressFeedback({ color: theme.colors.onSurface })\n const cellStyle = composeStyles<ViewStyle>(own.cell, {\n width: table.layout.getColumnWidth(column.key),\n })\n\n if (selection) {\n const mode = selectionManager.selectionMode\n return (\n <View\n style={composeStyles<ViewStyle>(cellStyle, styles.selection, style)}\n testID={testID}\n >\n <Checkbox\n aria-label={\n table.selectAllLabel ??\n (mode === 'single' ? messages.select : messages.table.selectAll)\n }\n isDisabled={mode !== 'multiple' || table.state.collection.size === 0}\n isIndeterminate={\n !selectionManager.isEmpty && !selectionManager.isSelectAll\n }\n isSelected={selectionManager.isSelectAll}\n onChange={selectAllOf(table.state)}\n />\n </View>\n )\n }\n\n const arrowColor = theme.colors.onSurfaceVariant\n const name = (\n <View style={own.headerContent}>\n {isTextual(column.rendered) ? (\n <NativeText style={composeStyles<TextStyle>(label, own.headerText)}>\n {column.rendered}\n </NativeText>\n ) : (\n column.rendered\n )}\n {direction === undefined ? null : direction === 'ascending' ? (\n <ArrowUpwardGlyph color={arrowColor} size={ARROW_SIZE} />\n ) : (\n <ArrowDownwardGlyph color={arrowColor} size={ARROW_SIZE} />\n )}\n </View>\n )\n\n if (!allowsSorting) {\n return (\n <View style={composeStyles<ViewStyle>(cellStyle, style)} testID={testID}>\n {name}\n </View>\n )\n }\n\n return (\n <Pressable\n aria-label={[\n column.textValue,\n messages.table.sortable,\n ...(direction === undefined ? [] : [messages.table[direction]]),\n ].join(', ')}\n role=\"button\"\n {...feedback.handlers}\n onPress={sortOf(table.state, column.key)}\n style={composeStyles<ViewStyle>(\n cellStyle,\n feedback.ring,\n feedback.ring === undefined ? undefined : rowStyles.ring,\n style,\n )}\n testID={testID}\n >\n {feedback.layer}\n {name}\n </Pressable>\n )\n}\n\n// The entry the collection holds for a `Table.Column` part, which it also\n// adds to the columns a row reads its cells against, again whenever the\n// collection is rebuilt around it, as React Stately's own column does.\nfunction* columnNode(\n props: TableColumnProps,\n context: BuilderContext,\n): Generator<object, void, readonly Node<unknown>[]> {\n const nodes = yield {\n hasChildNodes: false,\n key: props.id,\n props,\n rendered: props.children,\n shouldInvalidate(next: BuilderContext) {\n next.columns.push(...nodes)\n return false\n },\n textValue:\n props.textValue ??\n (typeof props.children === 'string' ? props.children : ''),\n type: 'column',\n }\n\n context.columns.push(...nodes)\n}\n\n/**\n * The widths a column takes before anything says otherwise: React Stately's\n * own, and a checkbox's column as wide as its box and its padding, which it\n * keeps, since it holds one control and should not take a column of data's\n * room.\n */\nfunction defaultsOf(selectionWidth: number) {\n return {\n getDefaultMinWidth: (node: Node<unknown>): ColumnSize =>\n isSelection(node) ? selectionWidth : MIN_WIDTH,\n getDefaultWidth: (node: Node<unknown>): ColumnSize =>\n isSelection(node) ? selectionWidth : FLEXIBLE,\n }\n}\n\n/**\n * What the body shows in place of rows, from its `renderEmptyState`, as the\n * component `ListEmptyComponent` takes.\n */\nfunction EmptyBody() {\n const own = stylesOf(useTheme())\n const text = useTypeRole('bodyMedium')\n const shown = useTable().renderEmptyState?.()\n\n return (\n <View style={own.empty}>\n {isTextual(shown) ? (\n <NativeText style={composeStyles<TextStyle>(text, own.emptyText)}>\n {shown}\n </NativeText>\n ) : (\n shown\n )}\n </View>\n )\n}\n\n/**\n * Where each column ends, from the table's start, which is where its resize\n * handle is centred.\n */\nfunction endsOf(table: TableValue): number[] {\n const ends: number[] = []\n let end = 0\n\n for (const column of table.columns) {\n end += table.layout.getColumnWidth(column.key)\n ends.push(end)\n }\n return ends\n}\n\n/**\n * The rows under the body, in label large and the muted role, under a rule\n * of their own, each cell its column's width or the columns' it spans. They\n * take no press and no selection, as React Aria keeps a footer out of both.\n */\nfunction FooterRows() {\n const own = stylesOf(useTheme())\n const table = useTable()\n const label = useTypeRole('labelLarge')\n const { footer } = table\n\n if (footer === undefined) {\n return null\n }\n\n return (\n <View\n style={composeStyles<ViewStyle>(own.footer, footer.style)}\n testID={footer.testID}\n >\n {childElementsOf(footer.children).map((row, rowIndex) => {\n if (!isValidElement<TableRowProps>(row)) {\n return null\n }\n const rowCells = childElementsOf(\n typeof row.props.children === 'function' ? null : row.props.children,\n )\n const starts = startsOf(\n rowCells.map((cell) =>\n isValidElement<TableCellProps>(cell)\n ? (cell.props.colSpan ?? 1)\n : 0,\n ),\n )\n const cells = rowCells.map((cell, cellIndex) => {\n if (!isValidElement<TableCellProps>(cell)) {\n return null\n }\n const width = widthAcross(\n table,\n starts[cellIndex] ?? 0,\n cell.props.colSpan ?? 1,\n )\n return (\n <View\n key={cell.key ?? cellIndex}\n style={composeStyles<ViewStyle>(\n own.cell,\n { width },\n cell.props.style,\n )}\n testID={cell.props.testID}\n >\n {isTextual(cell.props.children) ? (\n <NativeText\n style={composeStyles<TextStyle>(label, own.footerText)}\n >\n {cell.props.children}\n </NativeText>\n ) : (\n cell.props.children\n )}\n </View>\n )\n })\n return (\n <View\n key={row.key ?? rowIndex}\n style={composeStyles<ViewStyle>(\n own.row,\n rowIndex > 0 ? own.rowRule : undefined,\n row.props.style,\n )}\n testID={row.props.testID}\n >\n {cells}\n </View>\n )\n })}\n </View>\n )\n}\n\n// The entries the collection holds for a `Table.Header` part: its columns,\n// each built by its own part, read afresh each time the collection is.\nfunction* headerNodes(props: TableHeaderProps, context: BuilderContext) {\n const { children, columns } = props\n\n context.columns = []\n if (typeof children === 'function') {\n for (const value of columns ?? []) {\n yield { renderer: children, type: 'column', value }\n }\n return\n }\n for (const element of childElementsOf(children)) {\n yield { element, type: 'column' }\n }\n}\n\n/**\n * The header row: each column's header, its column's width, and the resize\n * handles over them in a table that resizes.\n */\nfunction HeaderRow() {\n const own = stylesOf(useTheme())\n const table = useTable()\n const { header } = table\n\n return (\n <View\n style={composeStyles<ViewStyle>(own.header, header.style)}\n testID={header.testID}\n >\n {table.columns.map((column) => (\n <ColumnHeader column={column} key={column.key} />\n ))}\n {table.resizable ? <ResizeHandles /> : null}\n </View>\n )\n}\n\nfunction isLoadMore(\n element: ReactNode,\n): element is ReactElement<TableLoadMoreProps> {\n return isValidElement(element) && element.type === TableLoadMore\n}\n\n// Whether a column is the one the rows put their checkboxes in.\nfunction isSelection(node: Node<unknown>) {\n // oxlint-disable-next-line typescript/no-unsafe-member-access -- a node carries the props its column was written with, which React Stately types as `any`\n return node.props?.selection === true\n}\n\n/**\n * Whether what a cell holds is text alone, which it sets in its own type\n * role, as React Native draws text only inside a Text.\n */\nfunction isTextual(node: ReactNode) {\n const parts = Children.toArray(node)\n\n return (\n parts.length > 0 &&\n parts.every((part) => typeof part === 'string' || typeof part === 'number')\n )\n}\n\n// A row's key in the `FlatList`.\nfunction keyOf(node: Node<unknown>) {\n return String(node.key)\n}\n\n/**\n * The part `type` of the table's children, or what is left out: the header,\n * the body and the footer are each read off their own part.\n */\nfunction partOf<P>(children: ReactNode, type: unknown) {\n return childElementsOf(children).find(\n (child): child is ReactElement<P> =>\n isValidElement(child) && child.type === type,\n )\n}\n\n// One row of the body, drawn as the part it came from.\nfunction renderRow({ index, item }: ListRenderItemInfo<Node<unknown>>) {\n return <BodyRow index={index} node={item} />\n}\n\n/**\n * A column's resize handle: a target centred on its trailing edge holding\n * the divider's rule, which a drag along the header moves, and a slider to a\n * screen reader, stepped by `RESIZE_STEP`. A drag starting on it holds the\n * table's sideways scroll still.\n */\nfunction ResizeHandle({\n column,\n end,\n isLast,\n}: {\n readonly column: Node<unknown>\n readonly end: number\n readonly isLast: boolean\n}) {\n const own = stylesOf(useTheme())\n const table = useTable()\n const locale = useLocaleOf(undefined)\n const { layout, native, onResize, onResizeEnd } = table\n const { key } = column\n // The width the drag started from, or -1 between drags, and the width it\n // last asked for. Shared values rather than refs: the gesture's callbacks\n // are built while rendering, and the React Compiler lets no ref reach\n // them.\n const from = useSharedValue(-1)\n const last = useSharedValue(0)\n const width = layout.getColumnWidth(key)\n const resizing = layout.resizingColumn === key\n\n function begin() {\n from.set(layout.getColumnWidth(key))\n last.set(layout.getColumnWidth(key))\n layout.startResize(key)\n }\n\n function move(translation: number) {\n const start = from.get()\n if (start < 0) {\n return\n }\n // A drag towards the end widens the column, which is leftwards in a\n // right-to-left layout.\n const next = start + (I18nManager.isRTL ? -translation : translation)\n last.set(next)\n onResize?.(layout.updateResizedColumns(key, next))\n }\n\n function finish() {\n if (from.get() < 0) {\n return\n }\n from.set(-1)\n const sizes = layout.updateResizedColumns(key, last.get())\n layout.endResize()\n onResizeEnd?.(sizes)\n }\n\n // Gesture Handler 3 deprecates these builders for hooks that version 2\n // does not have, and the peer range admits both, so the builders stay\n // while it does.\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see above\n const drag = Gesture.Pan()\n // Taken once it moves along the header, and let go to a scroll once it\n // moves across it first.\n .activeOffsetX(SLOP_RANGE)\n .failOffsetY(SLOP_RANGE)\n .runOnJS(true)\n // The edge follows the finger from where it went down, so the distance\n // it moved before the drag was taken counts too.\n .onStart(({ translationX }) => {\n begin()\n move(translationX)\n })\n .onUpdate(({ translationX }) => {\n move(translationX)\n })\n .onFinalize(() => {\n finish()\n })\n const held = native === undefined ? drag : drag.blocksExternalGesture(native)\n const pan =\n table.testID === undefined\n ? held\n : held.withTestId(`${table.testID}-resize-${String(key)}`)\n\n return (\n <GestureDetector gesture={pan}>\n <View\n accessibilityActions={ADJUSTABLE}\n accessible\n aria-label={`${table.resizeLabel} ${column.textValue}`}\n aria-valuemax={Math.floor(layout.getColumnMaxWidth(key))}\n aria-valuemin={Math.floor(layout.getColumnMinWidth(key))}\n aria-valuenow={Math.floor(width)}\n aria-valuetext={columnSizeFor(Math.floor(width), locale)}\n onAccessibilityAction={stepOf(table, key)}\n role=\"slider\"\n style={composeStyles<ViewStyle>(\n styles.handle,\n isLast ? styles.handleLast : undefined,\n { start: end - HANDLE / 2 },\n )}\n >\n <View\n style={composeStyles<ViewStyle>(\n styles.rule,\n isLast ? styles.ruleLast : undefined,\n own.ruleLine,\n resizing ? own.ruleResizing : undefined,\n )}\n />\n </View>\n </GestureDetector>\n )\n}\n\n// The handles of the columns that resize, over the header's columns.\nfunction ResizeHandles() {\n const table = useTable()\n const ends = endsOf(table)\n const lastIndex = table.columns.length - 1\n\n return (\n <View style={styles.handles}>\n {table.columns.map((column, index) =>\n // oxlint-disable-next-line typescript/no-unsafe-member-access -- a node carries the props its column was written with, which React Stately types as `any`\n column.props?.resizable === true ? (\n <ResizeHandle\n column={column}\n end={ends[index] ?? 0}\n isLast={index === lastIndex}\n key={column.key}\n />\n ) : null,\n )}\n </View>\n )\n}\n\n// The entry the collection holds for a `Table.Row` part: keyed by the row's\n// `id`, carrying the props it is drawn from, and holding its cells, which\n// have to fill every column, as React Stately's own row holds them to.\nfunction* rowNode(props: TableRowProps, context: BuilderContext) {\n const { children } = props\n\n yield {\n 'aria-label': props['aria-label'],\n *childNodes() {\n if (typeof children === 'function') {\n for (const column of context.columns) {\n yield { element: children(column.key), key: column.key, type: 'cell' }\n }\n return\n }\n const cells = childElementsOf(children)\n const count = cells.reduce<number>((sum, cell) => sum + spanOf(cell), 0)\n if (count !== context.columns.length) {\n throw new Error(\n `Cell count must match column count. Found ${count} cells and ${context.columns.length} columns.`,\n )\n }\n for (const element of cells) {\n yield { element, type: 'cell' }\n }\n },\n hasChildNodes: true,\n key: props.id,\n props,\n shouldInvalidate(next: BuilderContext) {\n return (\n next.columns.length !== context.columns.length ||\n next.columns.some(\n (column, index) => column.key !== context.columns[index]?.key,\n )\n )\n },\n textValue: props.textValue,\n type: 'item',\n }\n}\n\n// Selects every row, or none once all of them are, as React Aria's\n// select-all checkbox does whatever it is handed.\nfunction selectAllOf(state: TableState<unknown>) {\n return () => {\n state.selectionManager.toggleSelectAll()\n }\n}\n\n/**\n * What the table says once its rows are sorted, as React Aria says it, and\n * nothing for a table that sorts by nothing.\n */\nfunction sortMessageOf(state: TableState<unknown>, locale: string) {\n const { sortDescriptor } = state\n\n if (sortDescriptor === null) {\n return ''\n }\n const column = state.collection.columns.find(\n (each) => each.key === sortDescriptor.column,\n )\n return sortedFor(\n sortDescriptor.direction,\n column?.textValue ?? String(sortDescriptor.column),\n locale,\n )\n}\n\n// Sorts by a column, the other way round when it already is.\nfunction sortOf(state: TableState<unknown>, key: Key) {\n return () => {\n state.sort(key)\n }\n}\n\n// How many columns a cell spans.\nfunction spanOf(cell: ReactNode) {\n return isValidElement<TableCellProps>(cell) ? (cell.props.colSpan ?? 1) : 1\n}\n\n// The width a body cell is drawn at: the columns' it spans from where it sits.\nfunction spanWidthOf(table: TableValue, cell: CellNode) {\n return widthAcross(table, cell.colIndex ?? cell.index, cell.colSpan ?? 1)\n}\n\n/**\n * Runs the step a screen reader asks a handle for, as a drag that starts and\n * ends at once, so `onResizeEnd` comes once as it does for a key on web.\n */\nfunction stepOf(table: TableValue, key: Key) {\n return (event: AccessibilityActionEvent) => {\n const { actionName } = event.nativeEvent\n if (actionName !== 'increment' && actionName !== 'decrement') {\n return\n }\n const { layout } = table\n const step = actionName === 'increment' ? RESIZE_STEP : -RESIZE_STEP\n layout.startResize(key)\n const sizes = layout.updateResizedColumns(\n key,\n layout.getColumnWidth(key) + step,\n )\n table.onResize?.(sizes)\n layout.endResize()\n table.onResizeEnd?.(sizes)\n }\n}\n\n/**\n * A grid of rows and columns. Sorting and selection are React Stately's, as\n * web's are React Aria's: pass `sortDescriptor` with `onSortChange` and mark\n * the sortable columns `allowsSorting`, and set `selectionMode` to `single`\n * or `multiple` with `selectedKeys` and `onSelectionChange`, or\n * `defaultSelectedKeys`.\n *\n * ```tsx\n * <Table aria-label=\"Label\" selectionMode=\"multiple\">\n * <Table.Header>\n * <Table.Column id=\"colSelect\" selection />\n * <Table.Column id=\"colName\" 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 any content: `Table.Header`,\n * `Table.Column`, `Table.Body`, `Table.Row`, `Table.Cell`, `Table.LoadMore`\n * and `Table.Footer`, which the table draws from their props, so none of them\n * renders anything on its own. A column's `id` and a row's share one\n * namespace, so keep the two sets apart, as `col`-prefixed column ids do.\n * Name the table with `aria-label`.\n *\n * The columns fill the table's width, `1fr` each unless `defaultWidth` or\n * `width` says otherwise, and the table scrolls sideways once they are wider\n * than it is. The rows scroll by themselves, so a table on a page that\n * scrolls takes `scrollEnabled={false}` and is laid out at its full length,\n * and one with `stickyHeader` wants a height to fill. `style` lands on the\n * box the table is drawn in, and `ref`, `aria-label`, `testID` and the\n * scroll props on the `FlatList` that holds the rows.\n *\n * The rows take focus while they run past the table's height, as web's grid\n * is a tab stop, so a keyboard can scroll them whatever they hold, and the\n * sideways scroll does while the columns are wider than the table; a call\n * site's own `focusable` still wins for the rows.\n */\nfunction Table({\n children,\n defaultSelectedKeys,\n disabledBehavior = 'all',\n disabledKeys,\n disallowEmptySelection,\n onSelectionChange,\n onSortChange,\n selectedKeys,\n selectionMode = 'none',\n sortDescriptor,\n ...props\n}: TableProps) {\n const theme = useTheme()\n const window = useWindowDimensions()\n const [measured, setMeasured] = useState<null | number>(null)\n const header = partOf<TableHeaderProps>(children, TableHeader)\n const body = partOf<TableBodyProps>(children, TableBody)\n const footer = partOf<TableFooterProps>(children, TableFooter)\n\n if (header === undefined || body === undefined) {\n throw new Error('A Table holds a Table.Header and a Table.Body.')\n }\n\n const state = useTableState<object>({\n // Each part builds its own entry in the collection; see `rowNode` and\n // the parts beside it. The collection asks each element for its entry.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- see above\n children: [header, body] as TableStateProps<object>['children'],\n defaultSelectedKeys,\n disabledBehavior,\n disabledKeys,\n disallowEmptySelection,\n onSelectionChange,\n onSortChange,\n selectedKeys,\n selectionMode,\n sortDescriptor,\n })\n const selectionWidth = 2 * theme.spacing.lg + LAYER_SIZE\n const defaults = useMemo(() => defaultsOf(selectionWidth), [selectionWidth])\n const width = measured ?? window.width\n const layout = useTableColumnResizeState(\n { ...defaults, tableWidth: width },\n state,\n )\n\n return (\n <TableView\n {...props}\n body={body.props}\n footer={footer?.props}\n header={header.props}\n layout={layout}\n onWidth={setMeasured}\n state={state}\n width={width}\n />\n )\n}\n\n/**\n * The rows. `renderEmptyState` is what the table shows when there are none,\n * and a `Table.LoadMore` after them is the row it shows while fetching\n * more. The table draws it from its props, so it renders nothing on its\n * own.\n */\nfunction TableBody<T extends object = object>(_props: TableBodyProps<T>): null {\n return null\n}\n\nTableBody.getCollectionNode = bodyNode\n\n/**\n * One cell. `selection` draws this row's checkbox in place of whatever else\n * the cell would hold. `style` and `testID` land on the cell.\n */\nfunction TableCell(_props: TableCellProps): null {\n return null\n}\n\nTableCell.getCollectionNode = cellNode\n\n/**\n * One column. `allowsSorting` makes the header itself the control that\n * sorts; the arrow appears on the column the `sortDescriptor` names.\n * `selection` draws the select-all checkbox in place of a name. `style` and\n * `testID` land on the column's header.\n *\n * Its `id` shares a namespace with the rows', so give the two sets values\n * that cannot meet: a column and a row with one id between them leaves the\n * table with no columns at all.\n */\nfunction TableColumn(_props: TableColumnProps): null {\n return null\n}\n\nTableColumn.getCollectionNode = columnNode\n\n// What follows the rows: the ring while more are fetched, then the footer.\nfunction TableEnd() {\n const own = stylesOf(useTheme())\n const { loadMore } = useTable()\n\n return (\n <>\n {loadMore === undefined ? null : (\n <LoadingRow\n {...loadMore}\n style={composeStyles<ViewStyle>(\n loadMore.isLoading === true ? own.loading : undefined,\n loadMore.style,\n )}\n />\n )}\n <FooterRows />\n </>\n )\n}\n\n/**\n * Rows under the body, for totals and the like, ruled off from it. They are\n * not part of the selection and take no press, as React Aria keeps a footer\n * out of both. `style` and `testID` land on the footer.\n */\nfunction TableFooter(_props: TableFooterProps): null {\n return null\n}\n\n/**\n * The header row, holding the columns, and the rule drawn under it. `style`\n * and `testID` land on the row.\n */\nfunction TableHeader<T extends object = object>(\n _props: TableHeaderProps<T>,\n): null {\n return null\n}\n\nTableHeader.getCollectionNode = headerNodes\n\n/**\n * The row shown while more rows are being fetched. `onLoadMore` is called\n * as the reader nears the end of the table, and the ring is drawn only while\n * `isLoading`, in a live region, so a screen reader hears it arrive. It goes\n * inside `Table.Body`, after the rows.\n */\nfunction TableLoadMore(_props: TableLoadMoreProps): null {\n return null\n}\n\n/**\n * One row. Give every row an `id`, which is the key selection is reported\n * by, and keep it apart from every column's. `onAction` runs when a press\n * runs the row's action, and `href` goes to that route. `style`, `ref` and\n * `testID` land on the row.\n */\nfunction TableRow<T extends object = object>(_props: TableRowProps<T>): null {\n return null\n}\n\nTableRow.getCollectionNode = rowNode\n\n// Keeps the rows' height as it changes, and hands it on to the call site.\nfunction contentTo(\n set: (height: number) => void,\n then: ScrollViewProps['onContentSizeChange'],\n) {\n return (width: number, height: number) => {\n set(height)\n then?.(width, height)\n }\n}\n\n// Keeps the height the rows scroll in as it is laid out, and hands the\n// layout on to the call site.\nfunction roomTo(\n set: (height: number) => void,\n then: ScrollViewProps['onLayout'],\n) {\n return (event: LayoutChangeEvent) => {\n set(event.nativeEvent.layout.height)\n then?.(event)\n }\n}\n\n/**\n * The column each footer cell starts at, from the columns the cells before it\n * span, worked out before the cells are drawn rather than counted up while\n * they are, which the React Compiler reads as a change after render.\n */\nfunction startsOf(spans: readonly number[]): number[] {\n const starts: number[] = []\n let start = 0\n\n for (const span of spans) {\n starts.push(start)\n start += span\n }\n return starts\n}\n\n/**\n * What a `Table` draws once it has its state and its columns' widths: the\n * header, the rows and the footer, as wide as the columns together, in a\n * box that scrolls sideways once they are wider than it is.\n */\nfunction TableView({\n body,\n footer,\n header,\n layout,\n onContentSizeChange,\n onLayout,\n onResize,\n onResizeEnd,\n onRowAction,\n onWidth,\n ref,\n resizable = false,\n resizeLabel,\n selectAllLabel,\n selectLabel,\n state,\n stickyHeader = false,\n style,\n width,\n ...props\n}: TableViewProps) {\n const messages = useMessages()\n const locale = useLocaleOf(undefined)\n const [content, setContent] = useState(0)\n const [room, setRoom] = useState(0)\n const { columns } = state.collection\n const total = columns.reduce(\n (sum, column) => sum + layout.getColumnWidth(column.key),\n 0,\n )\n const rows = useMemo(() => [...state.collection], [state.collection])\n const { renderEmptyState } = body\n const loadMore = childElementsOf(\n typeof body.children === 'function' ? null : body.children,\n ).find(isLoadMore)?.props\n const isLoading = loadMore?.isLoading ?? false\n const native = useMemo(\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see ResizeHandle\n () => (resizable ? Gesture.Native() : undefined),\n [resizable],\n )\n const { testID } = props\n const value = useMemo<TableValue>(\n () => ({\n columns,\n footer,\n header,\n layout,\n loadMore,\n native,\n onResize,\n onResizeEnd,\n onRowAction,\n renderEmptyState,\n resizable,\n resizeLabel: resizeLabel ?? messages.table.resizer,\n selectAllLabel,\n selectLabel: selectLabel ?? messages.select,\n state,\n testID,\n }),\n [\n columns,\n footer,\n header,\n layout,\n loadMore,\n messages,\n native,\n onResize,\n onResizeEnd,\n onRowAction,\n renderEmptyState,\n resizable,\n resizeLabel,\n selectAllLabel,\n selectLabel,\n state,\n testID,\n ],\n )\n const Root = resizable ? GestureHandlerRootView : View\n const scroller = (\n <ScrollView\n // A keyboard stop while there is anywhere to scroll, as the rows are,\n // which axe's scrollable-region-focusable asks of it under React\n // Native Web.\n focusable={total > width}\n horizontal\n scrollEnabled={total > width}\n showsHorizontalScrollIndicator={total > width}\n >\n <View style={composeStyles<ViewStyle>(styles.grid, { width: total })}>\n {stickyHeader ? <HeaderRow /> : null}\n <FlatList\n // A keyboard stop while the rows run past the room they have, so\n // the arrow keys scroll them whatever they hold, which axe's\n // scrollable-region-focusable asks of it under React Native Web.\n focusable={content > room}\n {...props}\n data={rows}\n keyExtractor={keyOf}\n ListEmptyComponent={\n isLoading || renderEmptyState === undefined ? undefined : EmptyBody\n }\n ListFooterComponent={TableEnd}\n ListHeaderComponent={stickyHeader ? undefined : HeaderRow}\n onContentSizeChange={contentTo(setContent, onContentSizeChange)}\n onEndReached={\n loadMore === undefined ? undefined : loadMoreOf(loadMore)\n }\n onEndReachedThreshold={loadMore?.scrollOffset ?? 1}\n onLayout={roomTo(setRoom, onLayout)}\n ref={ref}\n renderItem={renderRow}\n />\n </View>\n </ScrollView>\n )\n\n return (\n <TableContext value={value}>\n <Root onLayout={widthTo(onWidth)} style={style}>\n {native === undefined ? (\n scroller\n ) : (\n <GestureDetector gesture={native}>{scroller}</GestureDetector>\n )}\n <Status message={sortMessageOf(state, locale)} />\n </Root>\n </TableContext>\n )\n}\n\n// The table a part is drawn in. Every part is drawn inside the table's own\n// provider, so there always is one.\nfunction useTable(): TableValue {\n const table = use(TableContext)\n\n if (table === null) {\n throw new Error('A Table part is drawn by the Table it is in.')\n }\n return table\n}\n\n// The width `span` columns take from the column at `start`.\nfunction widthAcross(table: TableValue, start: number, span: number) {\n let width = 0\n\n for (const column of table.columns.slice(start, start + span)) {\n width += table.layout.getColumnWidth(column.key)\n }\n return width\n}\n\n// Keeps the table's width as it is laid out, which its columns fill.\nfunction widthTo(set: (width: number) => void) {\n return ({ nativeEvent }: LayoutChangeEvent) => {\n set(nativeEvent.layout.width)\n }\n}\n\nTable.Body = TableBody\nTable.Cell = TableCell\nTable.Column = TableColumn\nTable.Footer = TableFooter\nTable.Header = TableHeader\nTable.LoadMore = TableLoadMore\nTable.Row = TableRow\n\nexport {\n Table,\n TableBody,\n TableCell,\n TableColumn,\n TableFooter,\n TableHeader,\n TableLoadMore,\n TableRow,\n}\nexport type {\n TableBodyProps,\n TableCellProps,\n TableColumnProps,\n TableFooterProps,\n TableHeaderProps,\n TableLoadMoreProps,\n TableProps,\n TableRowProps,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuIA,MAAM4E,aAAa;AAGnB,MAAMC,aAAa;AAKnB,MAAMC,SAAS;AAIf,MAAMC,cAAc;AAIpB,MAAMC,WAAW;AACjB,MAAMC,YAAY;AAElB,MAAMC,SAAS7C,WAAW8C,OAAO;CAE/BC,MAAM,EACJC,eAAe,SACjB;CAEAC,QAAQ;EACNC,QAAQ;EACRC,UAAU;EACVC,KAAK;EACLC,OAAOZ;CACT;CACAa,YAAY,EACVD,OAAOZ,SAAS,EAClB;CAEAc,SAAS;EACPL,QAAQ;EACRM,MAAM;EACNC,eAAe;EACfN,UAAU;EACVO,OAAO;EACPN,KAAK;CACP;CAGAO,MAAM;EACJT,QAAQ;EACRU,KAAKnB,SAAS;EACdU,UAAU;EACVC,KAAK;EACLC,OAAO;CACT;CACAQ,UAAU,EACRD,KAAK,EACP;CAEAE,WAAW,EACTC,YAAY,SACd;AACF,CAAC;AAED,MAAMC,WAAW5B,cAAc,EAAE6B,QAAQC,QAAQC,cAC/CnE,WAAW8C,OAAO;CAKhBsB,MAAM;EACJL,YAAY;EACZM,gBAAg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ACT;AAGA,SAASmH,YAAYnH,OAAmBgJ,OAAe6E,MAAc;CACnE,IAAIzV,QAAQ;CAEZ,KAAK,MAAM4E,UAAUgD,MAAMzE,QAAQuT,MAAM9F,OAAOA,QAAQ6E,IAAI,GAC1DzV,SAAS4H,MAAMf,OAAOiG,eAAelI,OAAOa,GAAG;CAEjD,OAAOzF;AACT;AAGA,SAASuW,QAAQ/F,KAA8B;CAC7C,QAAQ,EAAEwD,kBAAqC;EAC7CxD,IAAIwD,YAAYnN,OAAO7G,KAAK;CAC9B;AACF;AAEAkU,MAAMyC,OAAOpC;AACbL,MAAM0C,OAAO/B;AACbX,MAAM2C,SAAS/B;AACfZ,MAAM4C,SAAStC;AACfN,MAAM6C,SAASzC;AACfJ,MAAM8C,WAAW7H;AACjB+E,MAAM+C,MAAM9B"}
|
package/dist/field/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../form/index.js";
|
|
2
2
|
import { HostInstance, StyleProp, TextInput, TextInputProps, ViewProps, ViewStyle } from "react-native";
|
|
3
|
-
import "react-native-reanimated";
|
|
3
|
+
import { DerivedValue } from "react-native-reanimated";
|
|
4
4
|
import { ComponentRef, ReactNode, Ref, RefObject } from "react";
|
|
5
5
|
/**
|
|
6
6
|
* The filled box, or the outlined one: no fill, an outline that thickens and
|