react-aria-components 1.14.0 → 1.15.1
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/Breadcrumbs.main.js +3 -2
- package/dist/Breadcrumbs.main.js.map +1 -1
- package/dist/Breadcrumbs.mjs +4 -3
- package/dist/Breadcrumbs.module.js +4 -3
- package/dist/Breadcrumbs.module.js.map +1 -1
- package/dist/Button.main.js +1 -1
- package/dist/Button.main.js.map +1 -1
- package/dist/Button.mjs +2 -2
- package/dist/Button.module.js +2 -2
- package/dist/Button.module.js.map +1 -1
- package/dist/Calendar.main.js +11 -7
- package/dist/Calendar.main.js.map +1 -1
- package/dist/Calendar.mjs +12 -8
- package/dist/Calendar.module.js +12 -8
- package/dist/Calendar.module.js.map +1 -1
- package/dist/Checkbox.main.js +2 -2
- package/dist/Checkbox.main.js.map +1 -1
- package/dist/Checkbox.mjs +3 -3
- package/dist/Checkbox.module.js +3 -3
- package/dist/Checkbox.module.js.map +1 -1
- package/dist/ColorArea.main.js +1 -1
- package/dist/ColorArea.main.js.map +1 -1
- package/dist/ColorArea.mjs +2 -2
- package/dist/ColorArea.module.js +2 -2
- package/dist/ColorArea.module.js.map +1 -1
- package/dist/ColorField.main.js +7 -3
- package/dist/ColorField.main.js.map +1 -1
- package/dist/ColorField.mjs +8 -4
- package/dist/ColorField.module.js +8 -4
- package/dist/ColorField.module.js.map +1 -1
- package/dist/ColorSlider.main.js +1 -1
- package/dist/ColorSlider.main.js.map +1 -1
- package/dist/ColorSlider.mjs +2 -2
- package/dist/ColorSlider.module.js +2 -2
- package/dist/ColorSlider.module.js.map +1 -1
- package/dist/ColorSwatch.main.js +1 -1
- package/dist/ColorSwatch.main.js.map +1 -1
- package/dist/ColorSwatch.mjs +2 -2
- package/dist/ColorSwatch.module.js +2 -2
- package/dist/ColorSwatch.module.js.map +1 -1
- package/dist/ColorSwatchPicker.main.js +2 -0
- package/dist/ColorSwatchPicker.main.js.map +1 -1
- package/dist/ColorSwatchPicker.mjs +2 -0
- package/dist/ColorSwatchPicker.module.js +2 -0
- package/dist/ColorSwatchPicker.module.js.map +1 -1
- package/dist/ColorThumb.main.js +1 -1
- package/dist/ColorThumb.main.js.map +1 -1
- package/dist/ColorThumb.mjs +2 -2
- package/dist/ColorThumb.module.js +2 -2
- package/dist/ColorThumb.module.js.map +1 -1
- package/dist/ColorWheel.main.js +2 -2
- package/dist/ColorWheel.main.js.map +1 -1
- package/dist/ColorWheel.mjs +3 -3
- package/dist/ColorWheel.module.js +3 -3
- package/dist/ColorWheel.module.js.map +1 -1
- package/dist/ComboBox.main.js +2 -2
- package/dist/ComboBox.main.js.map +1 -1
- package/dist/ComboBox.mjs +3 -3
- package/dist/ComboBox.module.js +3 -3
- package/dist/ComboBox.module.js.map +1 -1
- package/dist/DateField.main.js +3 -3
- package/dist/DateField.main.js.map +1 -1
- package/dist/DateField.mjs +4 -4
- package/dist/DateField.module.js +4 -4
- package/dist/DateField.module.js.map +1 -1
- package/dist/DatePicker.main.js +2 -2
- package/dist/DatePicker.main.js.map +1 -1
- package/dist/DatePicker.mjs +3 -3
- package/dist/DatePicker.module.js +3 -3
- package/dist/DatePicker.module.js.map +1 -1
- package/dist/Dialog.main.js +2 -1
- package/dist/Dialog.main.js.map +1 -1
- package/dist/Dialog.mjs +3 -2
- package/dist/Dialog.module.js +3 -2
- package/dist/Dialog.module.js.map +1 -1
- package/dist/Disclosure.main.js +3 -3
- package/dist/Disclosure.main.js.map +1 -1
- package/dist/Disclosure.mjs +4 -4
- package/dist/Disclosure.module.js +4 -4
- package/dist/Disclosure.module.js.map +1 -1
- package/dist/DropZone.main.js +2 -3
- package/dist/DropZone.main.js.map +1 -1
- package/dist/DropZone.mjs +4 -5
- package/dist/DropZone.module.js +4 -5
- package/dist/DropZone.module.js.map +1 -1
- package/dist/Form.main.js +1 -1
- package/dist/Form.main.js.map +1 -1
- package/dist/Form.mjs +2 -2
- package/dist/Form.module.js +2 -2
- package/dist/Form.module.js.map +1 -1
- package/dist/GridList.main.js +16 -13
- package/dist/GridList.main.js.map +1 -1
- package/dist/GridList.mjs +17 -14
- package/dist/GridList.module.js +17 -14
- package/dist/GridList.module.js.map +1 -1
- package/dist/Group.main.js +1 -1
- package/dist/Group.main.js.map +1 -1
- package/dist/Group.mjs +2 -2
- package/dist/Group.module.js +2 -2
- package/dist/Group.module.js.map +1 -1
- package/dist/Header.main.js +1 -1
- package/dist/Header.main.js.map +1 -1
- package/dist/Header.mjs +2 -2
- package/dist/Header.module.js +2 -2
- package/dist/Header.module.js.map +1 -1
- package/dist/Heading.main.js +2 -2
- package/dist/Heading.main.js.map +1 -1
- package/dist/Heading.mjs +2 -2
- package/dist/Heading.module.js +2 -2
- package/dist/Heading.module.js.map +1 -1
- package/dist/HiddenDateInput.main.js +5 -1
- package/dist/HiddenDateInput.main.js.map +1 -1
- package/dist/HiddenDateInput.mjs +6 -2
- package/dist/HiddenDateInput.module.js +6 -2
- package/dist/HiddenDateInput.module.js.map +1 -1
- package/dist/Input.main.js +1 -1
- package/dist/Input.main.js.map +1 -1
- package/dist/Input.mjs +2 -2
- package/dist/Input.module.js +2 -2
- package/dist/Input.module.js.map +1 -1
- package/dist/Keyboard.main.js +1 -1
- package/dist/Keyboard.main.js.map +1 -1
- package/dist/Keyboard.mjs +2 -2
- package/dist/Keyboard.module.js +2 -2
- package/dist/Keyboard.module.js.map +1 -1
- package/dist/Label.main.js +2 -1
- package/dist/Label.main.js.map +1 -1
- package/dist/Label.mjs +3 -2
- package/dist/Label.module.js +3 -2
- package/dist/Label.module.js.map +1 -1
- package/dist/Link.main.js +3 -2
- package/dist/Link.main.js.map +1 -1
- package/dist/Link.mjs +4 -3
- package/dist/Link.module.js +4 -3
- package/dist/Link.module.js.map +1 -1
- package/dist/ListBox.main.js +13 -14
- package/dist/ListBox.main.js.map +1 -1
- package/dist/ListBox.mjs +14 -15
- package/dist/ListBox.module.js +14 -15
- package/dist/ListBox.module.js.map +1 -1
- package/dist/Menu.main.js +21 -8
- package/dist/Menu.main.js.map +1 -1
- package/dist/Menu.mjs +22 -9
- package/dist/Menu.module.js +22 -9
- package/dist/Menu.module.js.map +1 -1
- package/dist/Meter.main.js +1 -1
- package/dist/Meter.main.js.map +1 -1
- package/dist/Meter.mjs +2 -2
- package/dist/Meter.module.js +2 -2
- package/dist/Meter.module.js.map +1 -1
- package/dist/Modal.main.js +2 -2
- package/dist/Modal.main.js.map +1 -1
- package/dist/Modal.mjs +3 -3
- package/dist/Modal.module.js +3 -3
- package/dist/Modal.module.js.map +1 -1
- package/dist/NumberField.main.js +1 -1
- package/dist/NumberField.main.js.map +1 -1
- package/dist/NumberField.mjs +2 -2
- package/dist/NumberField.module.js +2 -2
- package/dist/NumberField.module.js.map +1 -1
- package/dist/OverlayArrow.main.js +1 -1
- package/dist/OverlayArrow.main.js.map +1 -1
- package/dist/OverlayArrow.mjs +2 -2
- package/dist/OverlayArrow.module.js +2 -2
- package/dist/OverlayArrow.module.js.map +1 -1
- package/dist/Popover.main.js +2 -2
- package/dist/Popover.main.js.map +1 -1
- package/dist/Popover.mjs +4 -4
- package/dist/Popover.module.js +4 -4
- package/dist/Popover.module.js.map +1 -1
- package/dist/ProgressBar.main.js +1 -1
- package/dist/ProgressBar.main.js.map +1 -1
- package/dist/ProgressBar.mjs +2 -2
- package/dist/ProgressBar.module.js +2 -2
- package/dist/ProgressBar.module.js.map +1 -1
- package/dist/RadioGroup.main.js +2 -2
- package/dist/RadioGroup.main.js.map +1 -1
- package/dist/RadioGroup.mjs +3 -3
- package/dist/RadioGroup.module.js +3 -3
- package/dist/RadioGroup.module.js.map +1 -1
- package/dist/SearchField.main.js +1 -1
- package/dist/SearchField.main.js.map +1 -1
- package/dist/SearchField.mjs +2 -2
- package/dist/SearchField.module.js +2 -2
- package/dist/SearchField.module.js.map +1 -1
- package/dist/Select.main.js +2 -2
- package/dist/Select.main.js.map +1 -1
- package/dist/Select.mjs +3 -3
- package/dist/Select.module.js +3 -3
- package/dist/Select.module.js.map +1 -1
- package/dist/Separator.main.js +3 -1
- package/dist/Separator.main.js.map +1 -1
- package/dist/Separator.mjs +4 -2
- package/dist/Separator.module.js +4 -2
- package/dist/Separator.module.js.map +1 -1
- package/dist/SharedElementTransition.main.js +3 -2
- package/dist/SharedElementTransition.main.js.map +1 -1
- package/dist/SharedElementTransition.mjs +4 -3
- package/dist/SharedElementTransition.module.js +4 -3
- package/dist/SharedElementTransition.module.js.map +1 -1
- package/dist/Slider.main.js +6 -5
- package/dist/Slider.main.js.map +1 -1
- package/dist/Slider.mjs +7 -6
- package/dist/Slider.module.js +7 -6
- package/dist/Slider.module.js.map +1 -1
- package/dist/Switch.main.js +1 -1
- package/dist/Switch.main.js.map +1 -1
- package/dist/Switch.mjs +2 -2
- package/dist/Switch.module.js +2 -2
- package/dist/Switch.module.js.map +1 -1
- package/dist/Table.main.js +30 -25
- package/dist/Table.main.js.map +1 -1
- package/dist/Table.mjs +31 -26
- package/dist/Table.module.js +31 -26
- package/dist/Table.module.js.map +1 -1
- package/dist/Tabs.main.js +13 -6
- package/dist/Tabs.main.js.map +1 -1
- package/dist/Tabs.mjs +14 -7
- package/dist/Tabs.module.js +14 -7
- package/dist/Tabs.module.js.map +1 -1
- package/dist/TagGroup.main.js +6 -5
- package/dist/TagGroup.main.js.map +1 -1
- package/dist/TagGroup.mjs +7 -6
- package/dist/TagGroup.module.js +7 -6
- package/dist/TagGroup.module.js.map +1 -1
- package/dist/Text.main.js +2 -1
- package/dist/Text.main.js.map +1 -1
- package/dist/Text.mjs +3 -2
- package/dist/Text.module.js +3 -2
- package/dist/Text.module.js.map +1 -1
- package/dist/TextArea.main.js +1 -1
- package/dist/TextArea.main.js.map +1 -1
- package/dist/TextArea.mjs +2 -2
- package/dist/TextArea.module.js +2 -2
- package/dist/TextArea.module.js.map +1 -1
- package/dist/TextField.main.js +1 -1
- package/dist/TextField.main.js.map +1 -1
- package/dist/TextField.mjs +2 -2
- package/dist/TextField.module.js +2 -2
- package/dist/TextField.module.js.map +1 -1
- package/dist/Toast.main.js +6 -4
- package/dist/Toast.main.js.map +1 -1
- package/dist/Toast.mjs +7 -5
- package/dist/Toast.module.js +7 -5
- package/dist/Toast.module.js.map +1 -1
- package/dist/ToggleButton.main.js +5 -2
- package/dist/ToggleButton.main.js.map +1 -1
- package/dist/ToggleButton.mjs +6 -3
- package/dist/ToggleButton.module.js +6 -3
- package/dist/ToggleButton.module.js.map +1 -1
- package/dist/ToggleButtonGroup.main.js +1 -1
- package/dist/ToggleButtonGroup.main.js.map +1 -1
- package/dist/ToggleButtonGroup.mjs +2 -2
- package/dist/ToggleButtonGroup.module.js +2 -2
- package/dist/ToggleButtonGroup.module.js.map +1 -1
- package/dist/Toolbar.main.js +1 -1
- package/dist/Toolbar.main.js.map +1 -1
- package/dist/Toolbar.mjs +2 -2
- package/dist/Toolbar.module.js +2 -2
- package/dist/Toolbar.module.js.map +1 -1
- package/dist/Tooltip.main.js +1 -1
- package/dist/Tooltip.main.js.map +1 -1
- package/dist/Tooltip.mjs +2 -2
- package/dist/Tooltip.module.js +2 -2
- package/dist/Tooltip.module.js.map +1 -1
- package/dist/Tree.main.js +6 -6
- package/dist/Tree.main.js.map +1 -1
- package/dist/Tree.mjs +7 -7
- package/dist/Tree.module.js +7 -7
- package/dist/Tree.module.js.map +1 -1
- package/dist/types.d.ts +121 -62
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.main.js +41 -3
- package/dist/utils.main.js.map +1 -1
- package/dist/utils.mjs +42 -5
- package/dist/utils.module.js +42 -5
- package/dist/utils.module.js.map +1 -1
- package/package.json +24 -24
- package/src/Breadcrumbs.tsx +9 -6
- package/src/Button.tsx +4 -3
- package/src/Calendar.tsx +26 -20
- package/src/Checkbox.tsx +7 -6
- package/src/ColorArea.tsx +3 -2
- package/src/ColorField.tsx +18 -3
- package/src/ColorSlider.tsx +2 -1
- package/src/ColorSwatch.tsx +2 -1
- package/src/ColorSwatchPicker.tsx +2 -0
- package/src/ColorThumb.tsx +3 -3
- package/src/ColorWheel.tsx +4 -3
- package/src/ComboBox.tsx +3 -2
- package/src/DateField.tsx +5 -4
- package/src/DatePicker.tsx +3 -2
- package/src/Dialog.tsx +5 -4
- package/src/Disclosure.tsx +7 -6
- package/src/DropZone.tsx +5 -5
- package/src/Form.tsx +4 -4
- package/src/GridList.tsx +30 -23
- package/src/Group.tsx +10 -9
- package/src/Header.tsx +7 -5
- package/src/Heading.tsx +4 -4
- package/src/HiddenDateInput.tsx +10 -3
- package/src/Input.tsx +3 -2
- package/src/Keyboard.tsx +4 -2
- package/src/Label.tsx +4 -3
- package/src/Link.tsx +15 -12
- package/src/ListBox.tsx +23 -22
- package/src/Menu.tsx +32 -17
- package/src/Meter.tsx +3 -2
- package/src/Modal.tsx +5 -4
- package/src/NumberField.tsx +2 -1
- package/src/OverlayArrow.tsx +3 -2
- package/src/Popover.tsx +5 -4
- package/src/ProgressBar.tsx +3 -2
- package/src/RadioGroup.tsx +6 -5
- package/src/SearchField.tsx +3 -2
- package/src/Select.tsx +6 -5
- package/src/Separator.tsx +8 -5
- package/src/SharedElementTransition.tsx +4 -3
- package/src/Slider.tsx +9 -7
- package/src/Switch.tsx +11 -10
- package/src/Table.tsx +47 -36
- package/src/Tabs.tsx +23 -18
- package/src/TagGroup.tsx +16 -13
- package/src/Text.tsx +4 -3
- package/src/TextArea.tsx +3 -2
- package/src/TextField.tsx +4 -3
- package/src/Toast.tsx +15 -11
- package/src/ToggleButton.tsx +5 -4
- package/src/ToggleButtonGroup.tsx +3 -2
- package/src/Toolbar.tsx +3 -2
- package/src/Tooltip.tsx +3 -2
- package/src/Tree.tsx +18 -17
- package/src/utils.tsx +96 -10
package/dist/Table.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,8CAA2B,CAAA,GAAA,qBAAa;IAS5C,QAAQ,IAAuB,EAAE;QAC/B,KAAK,CAAC,QAAQ;Q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AAc,CAAC,UAAU,GAAG;IAG9B,qBACE,gFAGE,gCAAC;QAAoB,OAAO;YAAC,QAAQ;QAAC;QAAG,OAAO,CAAA,GAAA,iBAAS,EAAE;qBACzD,gCAAC;QAAqB,OAAO;YAAC,SAAS;YAAG,QAAQ;QAAC;qBACjD,gCAAC;QAAI,eAAY;QAAmB,KAAK;QAAa,OAAO;YAAC,UAAU;YAAY,QAAQ;YAAG,OAAO;QAAC;UAG1G,aAAa,YAAY,QAAQ,kBAChC,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,qBAAa,EAAE,OAAO;YAAC,QAAQ;QAAI,IAAI,SAAS;QAC9D,GAAG,WAAW;QACf,MAAK;QACL,KAAK;qBACL,gCAAC;QAAqB,MAAK;QAAa,GAAG,cAAc;QAAE,OAAO;OAC/D,YAAY,QAAQ;AAMjC","sources":["packages/react-aria-components/src/Table.tsx"],"sourcesContent":["import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents, RefObject} from '@react-types/shared';\nimport {BaseCollection, Collection, CollectionBuilder, CollectionNode, createBranchComponent, createLeafComponent, FilterableNode, LoaderNode, useCachedChildren} from '@react-aria/collections';\nimport {buildHeaderRows, TableColumnResizeState} from '@react-stately/table';\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, FieldInputContext, SelectableCollectionContext, SelectableCollectionContextValue} from './RSPContexts';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n DOMProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, ItemRenderProps} from './Collection';\nimport {ColumnSize, ColumnStaticSize, TableCollection as ITableCollection, TableProps as SharedTableProps} from '@react-types/table';\nimport {DisabledBehavior, DraggableCollectionState, DroppableCollectionState, MultipleSelectionState, Node, SelectionBehavior, SelectionMode, SortDirection, TableState, UNSTABLE_useFilteredTableState, useMultipleSelectionState, useTableColumnResizeState, useTableState} from 'react-stately';\nimport {DragAndDropContext, DropIndicatorContext, DropIndicatorProps, useDndPersistedKeys, useRenderDropIndicator} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableItemResult, DragPreviewRenderer, DropIndicatorAria, DroppableCollectionResult, FocusScope, ListKeyboardDelegate, mergeProps, useFocusRing, useHover, useLocale, useLocalizedStringFormatter, useTable, useTableCell, useTableColumnHeader, useTableColumnResize, useTableHeaderRow, useTableRow, useTableRowGroup, useTableSelectAllCheckbox, useTableSelectionCheckbox, useVisuallyHidden} from 'react-aria';\nimport {filterDOMProps, inertValue, isScrollable, LoadMoreSentinelProps, mergeRefs, useLayoutEffect, useLoadMoreSentinel, useObjectRef, useResizeObserver} from '@react-aria/utils';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {createContext, ForwardedRef, forwardRef, JSX, ReactElement, ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\n\nclass TableCollection<T> extends BaseCollection<T> implements ITableCollection<T> {\n headerRows: GridNode<T>[] = [];\n columns: GridNode<T>[] = [];\n rows: GridNode<T>[] = [];\n rowHeaderColumnKeys: Set<Key> = new Set();\n head = new TableHeaderNode<T>(-1);\n body = new TableBodyNode<T>(-2);\n columnsDirty = true;\n\n addNode(node: CollectionNode<T>) {\n super.addNode(node);\n\n this.columnsDirty ||= node.type === 'column';\n if (node.type === 'tableheader') {\n this.head = node;\n }\n\n if (node.type === 'tablebody') {\n this.body = node;\n }\n }\n\n commit(firstKey: Key, lastKey: Key, isSSR = false) {\n this.updateColumns(isSSR);\n\n this.rows = [];\n for (let row of this.getChildren(this.body.key)) {\n let lastChildKey = (row as CollectionNode<T>).lastChildKey;\n if (lastChildKey != null) {\n let lastCell = this.getItem(lastChildKey) as GridNode<T>;\n let numberOfCellsInRow = (lastCell.colIndex ?? lastCell.index) + (lastCell.colSpan ?? 1);\n if (numberOfCellsInRow !== this.columns.length && !isSSR) {\n throw new Error(`Cell count must match column count. Found ${numberOfCellsInRow} cells and ${this.columns.length} columns.`);\n }\n }\n this.rows.push(row);\n }\n\n super.commit(firstKey, lastKey, isSSR);\n }\n\n private updateColumns(isSSR: boolean) {\n if (!this.columnsDirty) {\n return;\n }\n\n this.rowHeaderColumnKeys = new Set();\n this.columns = [];\n let columnKeyMap = new Map();\n let visit = (node: Node<T>) => {\n switch (node.type) {\n case 'column':\n columnKeyMap.set(node.key, node);\n if (!node.hasChildNodes) {\n node.index = this.columns.length;\n this.columns.push(node);\n\n if (node.props.isRowHeader) {\n this.rowHeaderColumnKeys.add(node.key);\n }\n }\n break;\n }\n for (let child of this.getChildren(node.key)) {\n visit(child);\n }\n };\n\n for (let node of this.getChildren(this.head.key)) {\n visit(node);\n }\n\n this.headerRows = buildHeaderRows(columnKeyMap, this.columns);\n this.columnsDirty = false;\n if (this.rowHeaderColumnKeys.size === 0 && this.columns.length > 0 && !isSSR) {\n throw new Error('A table must have at least one Column with the isRowHeader prop set to true');\n }\n }\n\n get columnCount() {\n return this.columns.length;\n }\n\n *[Symbol.iterator]() {\n // Wait until the collection is initialized.\n if (this.head.key === -1) {\n return;\n }\n yield this.head;\n yield this.body;\n }\n\n getFirstKey() {\n return this.body.firstChildKey;\n }\n\n getLastKey() {\n return this.body.lastChildKey;\n }\n\n getKeyAfter(key: Key) {\n let node = this.getItem(key);\n if (node?.type === 'column') {\n return node.nextKey ?? null;\n }\n\n return super.getKeyAfter(key);\n }\n\n getKeyBefore(key: Key) {\n let node = this.getItem(key);\n if (node?.type === 'column') {\n return node.prevKey ?? null;\n }\n\n let k = super.getKeyBefore(key);\n if (k != null && this.getItem(k)?.type === 'tablebody') {\n return null;\n }\n\n return k;\n }\n\n getChildren(key: Key): Iterable<Node<T>> {\n if (!this.getItem(key)) {\n for (let row of this.headerRows) {\n if (row.key === key) {\n return row.childNodes;\n }\n }\n }\n\n return super.getChildren(key);\n }\n\n clone() {\n let collection = super.clone();\n collection.headerRows = this.headerRows;\n collection.columns = this.columns;\n collection.rowHeaderColumnKeys = this.rowHeaderColumnKeys;\n collection.head = this.head;\n collection.body = this.body;\n return collection;\n }\n\n getTextValue(key: Key): string {\n let row = this.getItem(key);\n if (!row) {\n return '';\n }\n\n // If the row has a textValue, use that.\n if (row.textValue) {\n return row.textValue;\n }\n\n // Otherwise combine the text of each of the row header columns.\n let rowHeaderColumnKeys = this.rowHeaderColumnKeys;\n let text: string[] = [];\n for (let cell of this.getChildren(key)) {\n let column = this.columns[cell.index!];\n if (rowHeaderColumnKeys.has(column.key) && cell.textValue) {\n text.push(cell.textValue);\n }\n\n if (text.length === rowHeaderColumnKeys.size) {\n break;\n }\n }\n\n return text.join(' ');\n }\n}\n\ninterface ResizableTableContainerContextValue {\n tableWidth: number,\n tableRef: RefObject<HTMLTableElement | null>,\n scrollRef: RefObject<HTMLElement | null>,\n // Dependency inject useTableColumnResizeState so it doesn't affect bundle size unless you're using ResizableTableContainer.\n useTableColumnResizeState: typeof useTableColumnResizeState,\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst ResizableTableContainerContext = createContext<ResizableTableContainerContextValue | null>(null);\n\nexport interface ResizableTableContainerProps extends DOMProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-ResizableTableContainer'\n */\n className?: string,\n /**\n * Handler that is called when a user starts a column resize.\n */\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called when a user performs a column resize.\n * Can be used with the width property on columns to put the column widths into\n * a controlled state.\n */\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called after a user performs a column resize.\n * Can be used to store the widths of columns for another future session.\n */\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n}\n\nexport const ResizableTableContainer = forwardRef(function ResizableTableContainer(props: ResizableTableContainerProps, ref: ForwardedRef<HTMLDivElement>) {\n let containerRef = useObjectRef(ref);\n let tableRef = useRef<HTMLTableElement>(null);\n let scrollRef = useRef<HTMLElement | null>(null);\n let [width, setWidth] = useState(0);\n\n useLayoutEffect(() => {\n // Walk up the DOM from the Table to the ResizableTableContainer and stop\n // when we reach the first scrollable element. This is what we'll measure\n // to determine column widths (important due to width of scrollbars).\n // This will usually be the ResizableTableContainer for native tables, and\n // the Table itself for virtualized tables.\n let table = tableRef.current as HTMLElement | null;\n while (table && table !== containerRef.current && !isScrollable(table)) {\n table = table.parentElement;\n }\n scrollRef.current = table;\n }, [containerRef]);\n\n useResizeObserver({\n ref: scrollRef,\n box: 'border-box',\n onResize() {\n setWidth(scrollRef.current?.clientWidth ?? 0);\n }\n });\n\n useLayoutEffect(() => {\n setWidth(scrollRef.current?.clientWidth ?? 0);\n }, []);\n\n let ctx = useMemo(() => ({\n tableRef,\n scrollRef,\n tableWidth: width,\n useTableColumnResizeState,\n onResizeStart: props.onResizeStart,\n onResize: props.onResize,\n onResizeEnd: props.onResizeEnd\n }), [tableRef, width, props.onResizeStart, props.onResize, props.onResizeEnd]);\n\n return (\n <div\n {...filterDOMProps(props, {global: true})}\n ref={containerRef}\n className={props.className || 'react-aria-ResizableTableContainer'}\n style={props.style}\n onScroll={props.onScroll}>\n <ResizableTableContainerContext.Provider value={ctx}>\n {props.children}\n </ResizableTableContainerContext.Provider>\n </div>\n );\n});\n\nexport const TableContext = createContext<ContextValue<TableProps, HTMLTableElement | HTMLDivElement>>(null);\nexport const TableStateContext = createContext<TableState<any> | null>(null);\nexport const TableColumnResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nexport interface TableRenderProps {\n /**\n * Whether the table is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the table is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the table is currently the active drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean,\n /**\n * State of the table.\n */\n state: TableState<unknown>\n}\n\nexport interface TableProps extends Omit<SharedTableProps<any>, 'children'>, StyleRenderProps<TableRenderProps>, SlotProps, AriaLabelingProps, GlobalDOMAttributes<HTMLTableElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Table'\n */\n className?: ClassNameOrFunction<TableRenderProps>,\n /** The elements that make up the table. Includes the TableHeader, TableBody, Columns, and Rows. */\n children?: ReactNode,\n /**\n * How multiple selection should behave in the collection.\n * @default \"toggle\"\n */\n selectionBehavior?: SelectionBehavior,\n /**\n * Whether `disabledKeys` applies to all interactions, or only selection.\n * @default \"all\"\n */\n disabledBehavior?: DisabledBehavior,\n /** Handler that is called when a user performs an action on the row. */\n onRowAction?: (key: Key) => void,\n /** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the Table. */\n dragAndDropHooks?: DragAndDropHooks\n}\n\n/**\n * A table displays data in rows and columns and enables a user to navigate its contents via directional navigation keys,\n * and optionally supports row selection and sorting.\n */\nexport const Table = forwardRef(function Table(props: TableProps, ref: ForwardedRef<HTMLTableElement | HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TableContext);\n\n // Separate selection state so we have access to it from collection components via useTableOptions.\n let selectionState = useMultipleSelectionState(props);\n let {selectionBehavior, selectionMode, disallowEmptySelection} = selectionState;\n let hasDragHooks = !!props.dragAndDropHooks?.useDraggableCollectionState;\n let ctx = useMemo(() => ({\n selectionBehavior: selectionMode === 'none' ? null : selectionBehavior,\n selectionMode,\n disallowEmptySelection,\n allowsDragging: hasDragHooks\n }), [selectionBehavior, selectionMode, disallowEmptySelection, hasDragHooks]);\n\n let content = (\n <TableOptionsContext.Provider value={ctx}>\n <Collection {...props} />\n </TableOptionsContext.Provider>\n );\n\n return (\n <CollectionBuilder content={content} createCollection={() => new TableCollection<any>()}>\n {collection => <TableInner props={props} forwardedRef={ref as any} selectionState={selectionState} collection={collection} />}\n </CollectionBuilder>\n );\n});\n\ninterface TableInnerProps {\n props: TableProps & SelectableCollectionContextValue<unknown>,\n forwardedRef: ForwardedRef<HTMLElement>,\n selectionState: MultipleSelectionState,\n collection: ITableCollection<Node<object>>\n}\n\nlet TableElementType = forwardRef(function TableElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <table {...props} ref={ref} />;\n});\n\nfunction TableInner({props, forwardedRef: ref, selectionState, collection}: TableInnerProps) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {shouldUseVirtualFocus, disallowTypeAhead, filter, ...DOMCollectionProps} = props;\n let tableContainerContext = useContext(ResizableTableContainerContext);\n ref = useObjectRef(useMemo(() => mergeRefs(ref, tableContainerContext?.tableRef), [ref, tableContainerContext?.tableRef]));\n let tableState = useTableState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n UNSAFE_selectionState: selectionState\n });\n\n let filteredState = UNSTABLE_useFilteredTableState(tableState, filter);\n let {isVirtualized, layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate, CollectionRoot} = useContext(CollectionRendererContext);\n let {dragAndDropHooks} = props;\n let {gridProps} = useTable({\n ...DOMCollectionProps,\n layoutDelegate,\n isVirtualized\n }, filteredState, ref);\n let selectionManager = filteredState.selectionManager;\n let hasDragHooks = !!dragAndDropHooks?.useDraggableCollectionState;\n let hasDropHooks = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(hasDragHooks);\n let dropHooksProvided = useRef(hasDropHooks);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== hasDragHooks) {\n console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n if (dropHooksProvided.current !== hasDropHooks) {\n console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n }, [hasDragHooks, hasDropHooks]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (hasDragHooks && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview\n ? <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n : null;\n }\n\n if (hasDropHooks && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let keyboardDelegate = new ListKeyboardDelegate({\n collection: filteredState.collection,\n disabledKeys: selectionManager.disabledKeys,\n disabledBehavior: selectionManager.disabledBehavior,\n ref,\n layoutDelegate\n });\n let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || ctxDropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection.rows, ref);\n droppableCollection = dragAndDropHooks.useDroppableCollection!({\n keyboardDelegate,\n dropTargetDelegate\n }, dropState, ref);\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let renderProps = useRenderProps({\n className: props.className,\n style: props.style,\n defaultClassName: 'react-aria-Table',\n values: {\n isDropTarget: isRootDropTarget,\n isFocused,\n isFocusVisible,\n state: filteredState\n }\n });\n\n let isListDraggable = !!(hasDragHooks && !dragState?.isDisabled);\n\n let style = renderProps.style;\n let layoutState: TableColumnResizeState<unknown> | null = null;\n if (tableContainerContext) {\n layoutState = tableContainerContext.useTableColumnResizeState({\n tableWidth: tableContainerContext.tableWidth\n }, filteredState);\n if (!isVirtualized) {\n style = {\n ...style,\n tableLayout: 'fixed',\n width: 'fit-content'\n };\n }\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <Provider\n values={[\n [TableStateContext, filteredState],\n [TableColumnResizeStateContext, layoutState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: TableDropIndicatorWrapper}],\n [SelectableCollectionContext, null],\n [FieldInputContext, null]\n ]}>\n <FocusScope>\n <TableElementType\n {...mergeProps(DOMProps, renderProps, gridProps, focusProps, droppableCollection?.collectionProps)}\n style={style}\n ref={ref as RefObject<HTMLTableElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-allows-dragging={isListDraggable || undefined}\n data-drop-target={isRootDropTarget || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}>\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={tableContainerContext?.scrollRef ?? ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)} />\n </SharedElementTransition>\n </TableElementType>\n </FocusScope>\n {dragPreview}\n </Provider>\n );\n}\n\nexport interface TableOptionsContextValue {\n /** The type of selection that is allowed in the table. */\n selectionMode: SelectionMode,\n /** The selection behavior for the table. If selectionMode is `\"none\"`, this will be `null`. */\n selectionBehavior: SelectionBehavior | null,\n /** Whether the table allows empty selection. */\n disallowEmptySelection: boolean,\n /** Whether the table allows rows to be dragged. */\n allowsDragging: boolean\n}\n\nconst TableOptionsContext = createContext<TableOptionsContextValue | null>(null);\n\n/**\n * Returns options from the parent `<Table>` component.\n */\nexport function useTableOptions(): TableOptionsContextValue {\n return useContext(TableOptionsContext)!;\n}\n\nexport interface TableHeaderRenderProps {\n /**\n * Whether the table header is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean\n}\n\nexport interface TableHeaderProps<T> extends StyleRenderProps<TableHeaderRenderProps>, HoverEvents, GlobalDOMAttributes<HTMLTableSectionElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-TableHeader'\n */\n className?: ClassNameOrFunction<TableHeaderRenderProps>,\n /** A list of table columns. */\n columns?: Iterable<T>,\n /** A list of `Column(s)` or a function. If the latter, a list of columns must be provided using the `columns` prop. */\n children?: ReactNode | ((item: T) => ReactElement),\n /** Values that should invalidate the column cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\nclass TableHeaderNode<T> extends CollectionNode<T> {\n static readonly type = 'tableheader';\n}\n\nlet THeadElementType = forwardRef(function THeadElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <thead {...props} ref={ref} />;\n});\n\n/**\n * A header within a `<Table>`, containing the table columns.\n */\nexport const TableHeader = /*#__PURE__*/ createBranchComponent(\n TableHeaderNode,\n <T extends object>(props: TableHeaderProps<T>, ref: ForwardedRef<HTMLTableSectionElement | HTMLDivElement>) => {\n let collection = useContext(TableStateContext)!.collection as TableCollection<unknown>;\n let headerRows = useCachedChildren({\n items: collection.headerRows,\n children: useCallback((item: Node<unknown>) => {\n switch (item.type) {\n case 'headerrow':\n return <TableHeaderRow item={item} />;\n default:\n throw new Error('Unsupported node type in TableHeader: ' + item.type);\n }\n }, [])\n });\n\n let {rowGroupProps} = useTableRowGroup();\n let {hoverProps, isHovered} = useHover({\n onHoverStart: props.onHoverStart,\n onHoverChange: props.onHoverChange,\n onHoverEnd: props.onHoverEnd\n });\n\n let renderProps = useRenderProps({\n className: props.className,\n style: props.style,\n defaultClassName: 'react-aria-TableHeader',\n values: {\n isHovered\n }\n });\n\n return (\n <THeadElementType\n {...mergeProps(filterDOMProps(props, {global: true}), rowGroupProps, hoverProps)}\n {...renderProps}\n ref={ref as any}\n data-hovered={isHovered || undefined}>\n {headerRows}\n </THeadElementType>\n );\n },\n props => (\n <Collection dependencies={props.dependencies} items={props.columns}>\n {props.children}\n </Collection>\n )\n);\n\nlet TableHeaderRowElementType = forwardRef(function TableHeaderRowElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <tr {...props} ref={ref} />;\n});\n\nfunction TableHeaderRow({item}: {item: GridNode<any>}) {\n let ref = useRef<HTMLTableRowElement>(null);\n let state = useContext(TableStateContext)!;\n let {isVirtualized, CollectionBranch} = useContext(CollectionRendererContext);\n let {rowProps} = useTableHeaderRow({node: item, isVirtualized}, state, ref);\n let {checkboxProps} = useTableSelectAllCheckbox(state);\n\n return (\n <TableHeaderRowElementType {...rowProps} ref={ref}>\n <Provider\n values={[\n [CheckboxContext, {\n slots: {\n selection: checkboxProps\n }\n }]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </TableHeaderRowElementType>\n );\n}\n\nexport interface ColumnRenderProps {\n /**\n * Whether the column is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the column is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the column is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the column is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the column allows sorting.\n * @selector [data-allows-sorting]\n */\n allowsSorting: boolean,\n /**\n * The current sort direction.\n * @selector [data-sort-direction=\"ascending | descending\"]\n */\n sortDirection: SortDirection | undefined,\n /**\n * Whether the column is currently being resized.\n * @selector [data-resizing]\n */\n isResizing: boolean,\n /**\n * Triggers sorting for this column in the given direction.\n */\n sort(direction: SortDirection): void,\n /**\n * Starts column resizing if the table is contained in a `<ResizableTableContainer>` element.\n */\n startResize(): void\n}\n\nexport interface ColumnProps extends RenderProps<ColumnRenderProps>, GlobalDOMAttributes<HTMLTableHeaderCellElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Column'\n */\n className?: ClassNameOrFunction<ColumnRenderProps>,\n /** The unique id of the column. */\n id?: Key,\n /** Whether the column allows sorting. */\n allowsSorting?: boolean,\n /** Whether a column is a [row header](https://www.w3.org/TR/wai-aria-1.1/#rowheader) and should be announced by assistive technology during row navigation. */\n isRowHeader?: boolean,\n /** A string representation of the column's contents, used for accessibility announcements. */\n textValue?: string,\n /** The width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */\n width?: ColumnSize | null,\n /** The default width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */\n defaultWidth?: ColumnSize | null,\n /** The minimum width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */\n minWidth?: ColumnStaticSize | null,\n /** The maximum width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */\n maxWidth?: ColumnStaticSize | null\n}\n\nclass TableColumnNode extends CollectionNode<unknown> {\n static readonly type = 'column';\n}\n\nlet ColumnElementType = forwardRef(function ColumnElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <th {...props} ref={ref} />;\n});\n\n/**\n * A column within a `<Table>`.\n */\nexport const Column = /*#__PURE__*/ createLeafComponent(TableColumnNode, (props: ColumnProps, forwardedRef: ForwardedRef<HTMLTableCellElement | HTMLDivElement>, column: GridNode<unknown>) => {\n let ref = useObjectRef<HTMLTableCellElement | HTMLDivElement>(forwardedRef);\n let state = useContext(TableStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {columnHeaderProps, isPressed} = useTableColumnHeader(\n {node: column, isVirtualized},\n state,\n ref\n );\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n\n let layoutState = useContext(TableColumnResizeStateContext);\n let isResizing = false;\n if (layoutState) {\n isResizing = layoutState.resizingColumn === column.key;\n } else if (process.env.NODE_ENV !== 'production') {\n for (let prop in ['width', 'defaultWidth', 'minWidth', 'maxWidth']) {\n if (prop in column.props) {\n console.warn(`The ${prop} prop on a <Column> only applies when a <Table> is wrapped in a <ResizableTableContainer>. If you aren't using column resizing, you can set the width of a column with CSS.`);\n }\n }\n }\n\n let {hoverProps, isHovered} = useHover({isDisabled: !props.allowsSorting});\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: column.rendered,\n defaultClassName: 'react-aria-Column',\n values: {\n isHovered,\n isPressed,\n isFocused,\n isFocusVisible,\n allowsSorting: column.props.allowsSorting,\n sortDirection: state.sortDescriptor?.column === column.key\n ? state.sortDescriptor.direction\n : undefined,\n isResizing,\n startResize: () => {\n if (layoutState) {\n layoutState.startResize(column.key);\n state.setKeyboardNavigationDisabled(true);\n } else {\n throw new Error('Wrap your <Table> in a <ResizableTableContainer> to enable column resizing');\n }\n },\n sort: (direction) => {\n state.sort(column.key, direction);\n }\n }\n });\n\n let style = renderProps.style;\n if (layoutState) {\n style = {...style, width: layoutState.getColumnWidth(column.key)};\n }\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <ColumnElementType\n {...mergeProps(DOMProps, columnHeaderProps, focusProps, hoverProps)}\n {...renderProps}\n style={style}\n ref={ref as any}\n data-hovered={isHovered || undefined}\n data-pressed={isPressed || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-resizing={isResizing || undefined}\n data-allows-sorting={column.props.allowsSorting || undefined}\n data-sort-direction={state.sortDescriptor?.column === column.key ? state.sortDescriptor.direction : undefined}>\n <Provider\n values={[\n [ColumnResizerContext, {column, triggerRef: ref}],\n [CollectionRendererContext, DefaultCollectionRenderer]\n ]}>\n {renderProps.children}\n </Provider>\n </ColumnElementType>\n );\n});\n\nexport interface ColumnResizerRenderProps {\n /**\n * Whether the resizer is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the resizer is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the resizer is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the resizer is currently being resized.\n * @selector [data-resizing]\n */\n isResizing: boolean,\n /**\n * The direction that the column is currently resizable.\n * @selector [data-resizable-direction=\"right | left | both\"]\n */\n resizableDirection: 'right' | 'left' | 'both'\n}\n\nexport interface ColumnResizerProps extends HoverEvents, RenderProps<ColumnResizerRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColumnResizer'\n */\n className?: ClassNameOrFunction<ColumnResizerRenderProps>,\n /** A custom accessibility label for the resizer. */\n 'aria-label'?: string\n}\n\ninterface ColumnResizerContextValue {\n column: GridNode<unknown>,\n triggerRef: RefObject<HTMLDivElement | null>\n}\n\nconst ColumnResizerContext = createContext<ColumnResizerContextValue | null>(null);\n\nexport const ColumnResizer = forwardRef(function ColumnResizer(props: ColumnResizerProps, ref: ForwardedRef<HTMLDivElement>) {\n let layoutState = useContext(TableColumnResizeStateContext);\n if (!layoutState) {\n throw new Error('Wrap your <Table> in a <ResizableTableContainer> to enable column resizing');\n }\n let stringFormatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n let {onResizeStart, onResize, onResizeEnd} = useContext(ResizableTableContainerContext)!;\n let {column, triggerRef} = useContext(ColumnResizerContext)!;\n let inputRef = useRef<HTMLInputElement>(null);\n let {resizerProps, inputProps, isResizing} = useTableColumnResize(\n {\n column,\n 'aria-label': props['aria-label'] || stringFormatter.format('tableResizer'),\n onResizeStart,\n onResize,\n onResizeEnd,\n triggerRef\n },\n layoutState,\n inputRef\n );\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let isEResizable = layoutState.getColumnMinWidth(column.key) >= layoutState.getColumnWidth(column.key);\n let isWResizable = layoutState.getColumnMaxWidth(column.key) <= layoutState.getColumnWidth(column.key);\n let {direction} = useLocale();\n let resizableDirection: ColumnResizerRenderProps['resizableDirection'] = 'both';\n if (isEResizable) {\n resizableDirection = direction === 'rtl' ? 'right' : 'left';\n } else if (isWResizable) {\n resizableDirection = direction === 'rtl' ? 'left' : 'right';\n } else {\n resizableDirection = 'both';\n }\n\n let objectRef = useObjectRef(ref);\n let [cursor, setCursor] = useState('');\n useEffect(() => {\n if (!objectRef.current) {\n return;\n }\n let style = window.getComputedStyle(objectRef.current);\n setCursor(style.cursor);\n }, [objectRef, resizableDirection]);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColumnResizer',\n values: {\n isFocused,\n isFocusVisible,\n isResizing,\n isHovered,\n resizableDirection\n }\n });\n\n let [isMouseDown, setMouseDown] = useState(false);\n let onPointerDown = (e: PointerEvent) => {\n if (e.pointerType === 'mouse') {\n setMouseDown(true);\n }\n };\n\n if (!isResizing && isMouseDown) {\n setMouseDown(false);\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <div\n ref={objectRef}\n role=\"presentation\"\n {...mergeProps(DOMProps, renderProps, resizerProps, {onPointerDown}, hoverProps)}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-resizing={isResizing || undefined}\n data-resizable-direction={resizableDirection}>\n {renderProps.children}\n <input\n ref={inputRef}\n {...mergeProps(inputProps, focusProps)} />\n {isResizing && isMouseDown && ReactDOM.createPortal(<div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />, document.body)}\n </div>\n );\n});\n\nexport interface TableBodyRenderProps {\n /**\n * Whether the table body has no rows and should display its empty state.\n * @selector [data-empty]\n */\n isEmpty: boolean,\n /**\n * Whether the Table is currently the active drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean\n}\n\nexport interface TableBodyProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, StyleRenderProps<TableBodyRenderProps>, GlobalDOMAttributes<HTMLTableSectionElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-TableBody'\n */\n className?: ClassNameOrFunction<TableBodyRenderProps>,\n /** Provides content to display when there are no rows in the table. */\n renderEmptyState?: (props: TableBodyRenderProps) => ReactNode\n}\n\nclass TableBodyNode<T> extends FilterableNode<T> {\n static readonly type = 'tablebody';\n}\n\nlet TableBodyElementType = forwardRef(function TableBodyElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <tbody {...props} ref={ref} />;\n});\n\n/**\n * The body of a `<Table>`, containing the table rows.\n */\nexport const TableBody = /*#__PURE__*/ createBranchComponent(TableBodyNode, <T extends object>(props: TableBodyProps<T>, ref: ForwardedRef<HTMLTableSectionElement | HTMLDivElement>) => {\n let state = useContext(TableStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let collection = state.collection;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let isDroppable = !!dragAndDropHooks?.useDroppableCollectionState && !dropState?.isDisabled;\n let isRootDropTarget = isDroppable && !!dropState && (dropState.isDropTarget({type: 'root'}) ?? false);\n\n let isEmpty = collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n isEmpty\n };\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-TableBody',\n values: renderValues\n });\n\n let emptyState;\n let numColumns = collection.columnCount;\n\n if (isEmpty && props.renderEmptyState && state) {\n let rowProps = {};\n let rowHeaderProps = {};\n let style = {};\n if (isVirtualized) {\n rowHeaderProps['aria-colspan'] = numColumns;\n style = {display: 'contents'};\n } else {\n rowHeaderProps['colSpan'] = numColumns;\n }\n\n emptyState = (\n <TableRowElementType role=\"row\" {...rowProps} style={style}>\n <TableCellElementType role=\"rowheader\" {...rowHeaderProps} style={style}>\n {props.renderEmptyState(renderValues)}\n </TableCellElementType>\n </TableRowElementType>\n );\n }\n\n let {rowGroupProps} = useTableRowGroup();\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n // TODO: TableBody doesn't support being the scrollable body of the table yet, to revisit if needed. Would need to\n // call useLoadMore here and walk up the DOM to the nearest scrollable element to set scrollRef\n return (\n <TableBodyElementType\n {...mergeProps(DOMProps, renderProps, rowGroupProps)}\n ref={ref as any}\n data-empty={isEmpty || undefined}>\n {isDroppable && <RootDropIndicator />}\n <CollectionBranch\n collection={collection}\n parent={collection.body}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)} />\n {emptyState}\n </TableBodyElementType>\n );\n});\n\nexport interface RowRenderProps extends ItemRenderProps {\n /** Whether the row's children have keyboard focus. */\n isFocusVisibleWithin: boolean,\n /** The unique id of the row. */\n id?: Key\n}\n\nexport interface RowProps<T> extends StyleRenderProps<RowRenderProps>, LinkDOMProps, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLTableRowElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Row'\n */\n className?: ClassNameOrFunction<RowRenderProps>,\n /** A list of columns used when dynamically rendering cells. */\n columns?: Iterable<T>,\n /** The cells within the row. Supports static items or a function for dynamic rendering. */\n children?: ReactNode | ((item: T) => ReactElement),\n /** The object value that this row represents. When using dynamic collections, this is set automatically. */\n value?: T,\n /** Values that should invalidate the cell cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>,\n /** A string representation of the row's contents, used for features like typeahead. */\n textValue?: string,\n /** Whether the row is disabled. */\n isDisabled?: boolean,\n /**\n * Handler that is called when a user performs an action on the row. The exact user event depends on\n * the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void,\n /** The unique id of the row. */\n id?: Key\n}\n\nclass TableRowNode<T> extends CollectionNode<T> {\n static readonly type = 'item';\n\n filter(collection: BaseCollection<T>, newCollection: BaseCollection<T>, filterFn: (textValue: string, node: Node<T>) => boolean): TableRowNode<T> | null {\n let cells = collection.getChildren(this.key);\n for (let cell of cells) {\n if (filterFn(cell.textValue, cell)) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n }\n\n return null;\n }\n}\n\nlet TableRowElementType = forwardRef(function TableRowElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <tr {...props} ref={ref} />;\n});\n\n/**\n * A row within a `<Table>`.\n */\nexport const Row = /*#__PURE__*/ createBranchComponent(\n TableRowNode,\n <T extends object>(props: RowProps<T>, forwardedRef: ForwardedRef<HTMLTableRowElement | HTMLDivElement>, item: GridNode<T>) => {\n let ref = useObjectRef<HTMLTableRowElement | HTMLDivElement>(forwardedRef);\n let state = useContext(TableStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let {isVirtualized, CollectionBranch} = useContext(CollectionRendererContext);\n let {rowProps, ...states} = useTableRow(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let {\n isFocusVisible: isFocusVisibleWithin,\n focusProps: focusWithinProps\n } = useFocusRing({within: true});\n let {hoverProps, isHovered} = useHover({\n isDisabled: !states.allowsSelection && !states.hasAction,\n onHoverStart: props.onHoverStart,\n onHoverChange: props.onHoverChange,\n onHoverEnd: props.onHoverEnd\n });\n\n let {checkboxProps} = useTableSelectionCheckbox(\n {key: item.key},\n state\n );\n\n let draggableItem: DraggableItemResult | undefined = undefined;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!({key: item.key, hasDragButton: true}, dragState);\n }\n\n let dropIndicator: DropIndicatorAria | undefined = undefined;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!({\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n }, dropState, dropIndicatorRef);\n }\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current && process.env.NODE_ENV !== 'production') {\n console.warn('Draggable items in a Table must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.');\n }\n // eslint-disable-next-line\n }, []);\n\n let isDragging = dragState && dragState.isDragging(item.key);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {children: _, ...restProps} = props;\n let renderProps = useRenderProps({\n ...restProps,\n id: undefined,\n defaultClassName: 'react-aria-Row',\n values: {\n ...states,\n isHovered,\n isFocused,\n isFocusVisible,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n isFocusVisibleWithin,\n id: item.key\n }\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <TableRowElementType role=\"row\" style={{height: 0}}>\n <TableCellElementType role=\"gridcell\" colSpan={state.collection.columnCount} style={{padding: 0}}>\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicator.dropIndicatorProps} ref={dropIndicatorRef} />\n </TableCellElementType>\n </TableRowElementType>\n )}\n <TableRowElementType\n {...mergeProps(DOMProps, renderProps, rowProps, focusProps, hoverProps, draggableItem?.dragProps, focusWithinProps)}\n ref={ref as any}\n data-disabled={states.isDisabled || undefined}\n data-selected={states.isSelected || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-pressed={states.isPressed || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={state.selectionManager.selectionMode === 'none' ? undefined : state.selectionManager.selectionMode}\n data-focus-visible-within={isFocusVisibleWithin || undefined}>\n <Provider\n values={[\n [CheckboxContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }],\n [ButtonContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </TableRowElementType>\n </>\n );\n },\n props => {\n if (props.id == null && typeof props.children === 'function') {\n throw new Error('No id detected for the Row element. The Row element requires a id to be provided to it when the cells are rendered dynamically.');\n }\n\n let dependencies = [props.value].concat(props.dependencies);\n return (\n <Collection dependencies={dependencies} items={props.columns} idScope={props.id}>\n {props.children}\n </Collection>\n );\n }\n);\n\nexport interface CellRenderProps {\n /**\n * Whether the cell is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the cell is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the cell is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the cell is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the parent row is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * The unique id of the cell.\n **/\n id?: Key\n}\n\nexport interface CellProps extends RenderProps<CellRenderProps>, GlobalDOMAttributes<HTMLTableCellElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Cell'\n */\n className?: ClassNameOrFunction<CellRenderProps>,\n /** The unique id of the cell. */\n id?: Key,\n /** A string representation of the cell's contents, used for features like typeahead. */\n textValue?: string,\n /** Indicates how many columns the data cell spans. */\n colSpan?: number\n}\n\nclass TableCellNode extends CollectionNode<unknown> {\n static readonly type = 'cell';\n}\n\nlet TableCellElementType = forwardRef(function TableCellElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <td {...props} ref={ref} />;\n});\n\n/**\n * A cell within a table row.\n */\nexport const Cell = /*#__PURE__*/ createLeafComponent(TableCellNode, (props: CellProps, forwardedRef: ForwardedRef<HTMLTableCellElement | HTMLDivElement>, cell: GridNode<unknown>) => {\n let ref = useObjectRef<HTMLTableCellElement | HTMLDivElement>(forwardedRef);\n let state = useContext(TableStateContext)!;\n let {dragState} = useContext(DragAndDropContext);\n let {isVirtualized} = useContext(CollectionRendererContext);\n\n cell.column = state.collection.columns[cell.index];\n\n let {gridCellProps, isPressed} = useTableCell({\n node: cell,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n }, state, ref);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let {hoverProps, isHovered} = useHover({});\n let isSelected = cell.parentKey != null ? state.selectionManager.isSelected(cell.parentKey) : false;\n\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Cell',\n values: {\n isFocused,\n isFocusVisible,\n isPressed,\n isHovered,\n isSelected,\n id: cell.key\n }\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <TableCellElementType\n {...mergeProps(DOMProps, renderProps, gridCellProps, focusProps, hoverProps)}\n ref={ref as any}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-pressed={isPressed || undefined}\n data-selected={isSelected || undefined}>\n <CollectionRendererContext.Provider value={DefaultCollectionRenderer}>\n {renderProps.children}\n </CollectionRendererContext.Provider>\n </TableCellElementType>\n );\n});\n\nfunction TableDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext)!;\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <TableDropIndicatorForwardRef {...props} dropIndicatorProps={dropIndicatorProps} isDropTarget={isDropTarget} buttonRef={buttonRef} ref={ref} />\n );\n}\n\ninterface TableDropIndicatorProps extends DropIndicatorProps, GlobalDOMAttributes<HTMLTableRowElement> {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>,\n isDropTarget: boolean,\n buttonRef: RefObject<HTMLDivElement | null>\n}\n\nlet TableDropIndicatorRowElementType = forwardRef(function TableDropIndicatorRowElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <tr {...props} ref={ref} />;\n});\nlet TableDropIndicatorTDElementType = forwardRef(function TableDropIndicatorTDElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <td {...props} ref={ref} />;\n});\n\nfunction TableDropIndicator(props: TableDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {\n dropIndicatorProps,\n isDropTarget,\n buttonRef,\n ...otherProps\n } = props;\n\n let state = useContext(TableStateContext)!;\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <TableDropIndicatorRowElementType\n {...filterDOMProps(props as any, {global: true})}\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLTableRowElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <TableDropIndicatorTDElementType\n role=\"gridcell\"\n colSpan={state.collection.columnCount}\n style={{padding: 0}}>\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </TableDropIndicatorTDElementType>\n </TableDropIndicatorRowElementType>\n );\n}\n\nconst TableDropIndicatorForwardRef = forwardRef(TableDropIndicator);\n\nfunction RootDropIndicator() {\n let state = useContext(TableStateContext)!;\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!({\n target: {type: 'root'}\n }, dropState!, ref);\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <TableRowElementType\n role=\"row\"\n aria-hidden={dropIndicatorProps['aria-hidden']}\n style={{height: 0}}>\n <TableCellElementType\n role=\"gridcell\"\n colSpan={state.collection.columnCount}\n style={{padding: 0}}>\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </TableCellElementType>\n </TableRowElementType>\n );\n}\n\nexport interface TableLoadMoreItemProps extends Omit<LoadMoreSentinelProps, 'collection'>, StyleProps, GlobalDOMAttributes<HTMLTableRowElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-TableLoadMoreItem'\n */\n className?: string,\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode,\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean\n}\n\nexport const TableLoadMoreItem = createLeafComponent(LoaderNode, function TableLoadingIndicator(props: TableLoadMoreItemProps, ref: ForwardedRef<HTMLTableRowElement>, item: Node<object>) {\n let state = useContext(TableStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n let numColumns = state.collection.columns.length;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(() => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }), [onLoadMore, scrollOffset, state?.collection]);\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-TableLoadingIndicator',\n values: null\n });\n let rowProps = {};\n let rowHeaderProps = {};\n let style = {};\n\n if (isVirtualized) {\n // For now don't include aria-rowindex on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // row count\n rowHeaderProps['aria-colspan'] = numColumns;\n style = {display: 'contents'};\n } else {\n rowHeaderProps['colSpan'] = numColumns;\n }\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <TableRowElementType style={{height: 0}} inert={inertValue(true)}>\n <TableCellElementType style={{padding: 0, border: 0}}>\n <div data-testid=\"loadMoreSentinel\" ref={sentinelRef} style={{position: 'relative', height: 1, width: 1}} />\n </TableCellElementType>\n </TableRowElementType>\n {isLoading && renderProps.children && (\n <TableRowElementType\n {...mergeProps(filterDOMProps(props, {global: true}), rowProps)}\n {...renderProps}\n role=\"row\"\n ref={ref as ForwardedRef<HTMLTableRowElement>}>\n <TableCellElementType role=\"rowheader\" {...rowHeaderProps} style={style}>\n {renderProps.children}\n </TableCellElementType>\n </TableRowElementType>\n )}\n </>\n );\n});\n"],"names":[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;QACf,MAAK;QACL,KAAK;qBACL,gCAAC;QAAqB,MAAK;QAAa,GAAG,cAAc;QAAE,OAAO;OAC/D,YAAY,QAAQ;AAMjC","sources":["packages/react-aria-components/src/Table.tsx"],"sourcesContent":["import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents, RefObject} from '@react-types/shared';\nimport {BaseCollection, Collection, CollectionBuilder, CollectionNode, createBranchComponent, createLeafComponent, FilterableNode, LoaderNode, useCachedChildren} from '@react-aria/collections';\nimport {buildHeaderRows, TableColumnResizeState} from '@react-stately/table';\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, FieldInputContext, SelectableCollectionContext, SelectableCollectionContextValue} from './RSPContexts';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, ItemRenderProps} from './Collection';\nimport {ColumnSize, ColumnStaticSize, TableCollection as ITableCollection, TableProps as SharedTableProps} from '@react-types/table';\nimport {DisabledBehavior, DraggableCollectionState, DroppableCollectionState, MultipleSelectionState, Node, SelectionBehavior, SelectionMode, SortDirection, TableState, UNSTABLE_useFilteredTableState, useMultipleSelectionState, useTableColumnResizeState, useTableState} from 'react-stately';\nimport {DragAndDropContext, DropIndicatorContext, DropIndicatorProps, useDndPersistedKeys, useRenderDropIndicator} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableItemResult, DragPreviewRenderer, DropIndicatorAria, DroppableCollectionResult, FocusScope, ListKeyboardDelegate, mergeProps, useFocusRing, useHover, useLocale, useLocalizedStringFormatter, useTable, useTableCell, useTableColumnHeader, useTableColumnResize, useTableHeaderRow, useTableRow, useTableRowGroup, useTableSelectAllCheckbox, useTableSelectionCheckbox, useVisuallyHidden} from 'react-aria';\nimport {filterDOMProps, inertValue, isScrollable, LoadMoreSentinelProps, mergeRefs, useLayoutEffect, useLoadMoreSentinel, useObjectRef, useResizeObserver} from '@react-aria/utils';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {createContext, ForwardedRef, forwardRef, JSX, ReactElement, ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\n\nclass TableCollection<T> extends BaseCollection<T> implements ITableCollection<T> {\n headerRows: GridNode<T>[] = [];\n columns: GridNode<T>[] = [];\n rows: GridNode<T>[] = [];\n rowHeaderColumnKeys: Set<Key> = new Set();\n head = new TableHeaderNode<T>(-1);\n body = new TableBodyNode<T>(-2);\n columnsDirty = true;\n\n addNode(node: CollectionNode<T>) {\n super.addNode(node);\n\n this.columnsDirty ||= node.type === 'column';\n if (node.type === 'tableheader') {\n this.head = node;\n }\n\n if (node.type === 'tablebody') {\n this.body = node;\n }\n }\n\n commit(firstKey: Key, lastKey: Key, isSSR = false) {\n this.updateColumns(isSSR);\n\n this.rows = [];\n for (let row of this.getChildren(this.body.key)) {\n let lastChildKey = (row as CollectionNode<T>).lastChildKey;\n if (lastChildKey != null) {\n let lastCell = this.getItem(lastChildKey) as GridNode<T>;\n let numberOfCellsInRow = (lastCell.colIndex ?? lastCell.index) + (lastCell.colSpan ?? 1);\n if (numberOfCellsInRow !== this.columns.length && !isSSR) {\n throw new Error(`Cell count must match column count. Found ${numberOfCellsInRow} cells and ${this.columns.length} columns.`);\n }\n }\n this.rows.push(row);\n }\n\n super.commit(firstKey, lastKey, isSSR);\n }\n\n private updateColumns(isSSR: boolean) {\n if (!this.columnsDirty) {\n return;\n }\n\n this.rowHeaderColumnKeys = new Set();\n this.columns = [];\n let columnKeyMap = new Map();\n let visit = (node: Node<T>) => {\n switch (node.type) {\n case 'column':\n columnKeyMap.set(node.key, node);\n if (!node.hasChildNodes) {\n node.index = this.columns.length;\n this.columns.push(node);\n\n if (node.props.isRowHeader) {\n this.rowHeaderColumnKeys.add(node.key);\n }\n }\n break;\n }\n for (let child of this.getChildren(node.key)) {\n visit(child);\n }\n };\n\n for (let node of this.getChildren(this.head.key)) {\n visit(node);\n }\n\n this.headerRows = buildHeaderRows(columnKeyMap, this.columns);\n this.columnsDirty = false;\n if (this.rowHeaderColumnKeys.size === 0 && this.columns.length > 0 && !isSSR) {\n throw new Error('A table must have at least one Column with the isRowHeader prop set to true');\n }\n }\n\n get columnCount() {\n return this.columns.length;\n }\n\n *[Symbol.iterator]() {\n // Wait until the collection is initialized.\n if (this.head.key === -1) {\n return;\n }\n yield this.head;\n yield this.body;\n }\n\n getFirstKey() {\n return this.body.firstChildKey;\n }\n\n getLastKey() {\n return this.body.lastChildKey;\n }\n\n getKeyAfter(key: Key) {\n let node = this.getItem(key);\n if (node?.type === 'column') {\n return node.nextKey ?? null;\n }\n\n return super.getKeyAfter(key);\n }\n\n getKeyBefore(key: Key) {\n let node = this.getItem(key);\n if (node?.type === 'column') {\n return node.prevKey ?? null;\n }\n\n let k = super.getKeyBefore(key);\n if (k != null && this.getItem(k)?.type === 'tablebody') {\n return null;\n }\n\n return k;\n }\n\n getChildren(key: Key): Iterable<Node<T>> {\n if (!this.getItem(key)) {\n for (let row of this.headerRows) {\n if (row.key === key) {\n return row.childNodes;\n }\n }\n }\n\n return super.getChildren(key);\n }\n\n clone() {\n let collection = super.clone();\n collection.headerRows = this.headerRows;\n collection.columns = this.columns;\n collection.rowHeaderColumnKeys = this.rowHeaderColumnKeys;\n collection.head = this.head;\n collection.body = this.body;\n return collection;\n }\n\n getTextValue(key: Key): string {\n let row = this.getItem(key);\n if (!row) {\n return '';\n }\n\n // If the row has a textValue, use that.\n if (row.textValue) {\n return row.textValue;\n }\n\n // Otherwise combine the text of each of the row header columns.\n let rowHeaderColumnKeys = this.rowHeaderColumnKeys;\n let text: string[] = [];\n for (let cell of this.getChildren(key)) {\n let column = this.columns[cell.index!];\n if (rowHeaderColumnKeys.has(column.key) && cell.textValue) {\n text.push(cell.textValue);\n }\n\n if (text.length === rowHeaderColumnKeys.size) {\n break;\n }\n }\n\n return text.join(' ');\n }\n}\n\ninterface ResizableTableContainerContextValue {\n tableWidth: number,\n tableRef: RefObject<HTMLTableElement | null>,\n scrollRef: RefObject<HTMLElement | null>,\n // Dependency inject useTableColumnResizeState so it doesn't affect bundle size unless you're using ResizableTableContainer.\n useTableColumnResizeState: typeof useTableColumnResizeState,\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst ResizableTableContainerContext = createContext<ResizableTableContainerContextValue | null>(null);\n\nexport interface ResizableTableContainerProps extends DOMProps, DOMRenderProps<'div', undefined>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-ResizableTableContainer'\n */\n className?: string,\n /**\n * Handler that is called when a user starts a column resize.\n */\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called when a user performs a column resize.\n * Can be used with the width property on columns to put the column widths into\n * a controlled state.\n */\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called after a user performs a column resize.\n * Can be used to store the widths of columns for another future session.\n */\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n}\n\nexport const ResizableTableContainer = forwardRef(function ResizableTableContainer(props: ResizableTableContainerProps, ref: ForwardedRef<HTMLDivElement>) {\n let containerRef = useObjectRef(ref);\n let tableRef = useRef<HTMLTableElement>(null);\n let scrollRef = useRef<HTMLElement | null>(null);\n let [width, setWidth] = useState(0);\n\n useLayoutEffect(() => {\n // Walk up the DOM from the Table to the ResizableTableContainer and stop\n // when we reach the first scrollable element. This is what we'll measure\n // to determine column widths (important due to width of scrollbars).\n // This will usually be the ResizableTableContainer for native tables, and\n // the Table itself for virtualized tables.\n let table = tableRef.current as HTMLElement | null;\n while (table && table !== containerRef.current && !isScrollable(table)) {\n table = table.parentElement;\n }\n scrollRef.current = table;\n }, [containerRef]);\n\n useResizeObserver({\n ref: scrollRef,\n box: 'border-box',\n onResize() {\n setWidth(scrollRef.current?.clientWidth ?? 0);\n }\n });\n\n useLayoutEffect(() => {\n setWidth(scrollRef.current?.clientWidth ?? 0);\n }, []);\n\n let ctx = useMemo(() => ({\n tableRef,\n scrollRef,\n tableWidth: width,\n useTableColumnResizeState,\n onResizeStart: props.onResizeStart,\n onResize: props.onResize,\n onResizeEnd: props.onResizeEnd\n }), [tableRef, width, props.onResizeStart, props.onResize, props.onResizeEnd]);\n\n return (\n <dom.div\n render={props.render}\n {...filterDOMProps(props, {global: true})}\n ref={containerRef}\n className={props.className || 'react-aria-ResizableTableContainer'}\n style={props.style}\n onScroll={props.onScroll}>\n <ResizableTableContainerContext.Provider value={ctx}>\n {props.children}\n </ResizableTableContainerContext.Provider>\n </dom.div>\n );\n});\n\nexport const TableContext = createContext<ContextValue<TableProps, HTMLTableElement | HTMLDivElement>>(null);\nexport const TableStateContext = createContext<TableState<any> | null>(null);\nexport const TableColumnResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nexport interface TableRenderProps {\n /**\n * Whether the table is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the table is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the table is currently the active drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean,\n /**\n * State of the table.\n */\n state: TableState<unknown>\n}\n\nexport interface TableProps extends Omit<SharedTableProps<any>, 'children'>, StyleRenderProps<TableRenderProps, 'table' | 'div'>, SlotProps, AriaLabelingProps, GlobalDOMAttributes<HTMLTableElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Table'\n */\n className?: ClassNameOrFunction<TableRenderProps>,\n /** The elements that make up the table. Includes the TableHeader, TableBody, Columns, and Rows. */\n children?: ReactNode,\n /**\n * How multiple selection should behave in the collection.\n * @default \"toggle\"\n */\n selectionBehavior?: SelectionBehavior,\n /**\n * Whether `disabledKeys` applies to all interactions, or only selection.\n * @default \"all\"\n */\n disabledBehavior?: DisabledBehavior,\n /** Handler that is called when a user performs an action on the row. */\n onRowAction?: (key: Key) => void,\n /** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the Table. */\n dragAndDropHooks?: DragAndDropHooks\n}\n\n/**\n * A table displays data in rows and columns and enables a user to navigate its contents via directional navigation keys,\n * and optionally supports row selection and sorting.\n */\nexport const Table = forwardRef(function Table(props: TableProps, ref: ForwardedRef<HTMLTableElement | HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TableContext);\n\n // Separate selection state so we have access to it from collection components via useTableOptions.\n let selectionState = useMultipleSelectionState(props);\n let {selectionBehavior, selectionMode, disallowEmptySelection} = selectionState;\n let hasDragHooks = !!props.dragAndDropHooks?.useDraggableCollectionState;\n let ctx = useMemo(() => ({\n selectionBehavior: selectionMode === 'none' ? null : selectionBehavior,\n selectionMode,\n disallowEmptySelection,\n allowsDragging: hasDragHooks\n }), [selectionBehavior, selectionMode, disallowEmptySelection, hasDragHooks]);\n\n let content = (\n <TableOptionsContext.Provider value={ctx}>\n <Collection {...props} />\n </TableOptionsContext.Provider>\n );\n\n return (\n <CollectionBuilder content={content} createCollection={() => new TableCollection<any>()}>\n {collection => <TableInner props={props} forwardedRef={ref as any} selectionState={selectionState} collection={collection} />}\n </CollectionBuilder>\n );\n});\n\ninterface TableInnerProps {\n props: TableProps & SelectableCollectionContextValue<unknown>,\n forwardedRef: ForwardedRef<HTMLElement>,\n selectionState: MultipleSelectionState,\n collection: ITableCollection<Node<object>>\n}\n\nlet TableElementType = forwardRef(function TableElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <dom.div {...props} ref={ref} />;\n }\n return <dom.table {...props} ref={ref} />;\n});\n\nfunction TableInner({props, forwardedRef: ref, selectionState, collection}: TableInnerProps) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {shouldUseVirtualFocus, disallowTypeAhead, filter, ...DOMCollectionProps} = props;\n let tableContainerContext = useContext(ResizableTableContainerContext);\n ref = useObjectRef(useMemo(() => mergeRefs(ref, tableContainerContext?.tableRef), [ref, tableContainerContext?.tableRef]));\n let tableState = useTableState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n UNSAFE_selectionState: selectionState\n });\n\n let filteredState = UNSTABLE_useFilteredTableState(tableState, filter);\n let {isVirtualized, layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate, CollectionRoot} = useContext(CollectionRendererContext);\n let {dragAndDropHooks} = props;\n let {gridProps} = useTable({\n ...DOMCollectionProps,\n layoutDelegate,\n isVirtualized\n }, filteredState, ref);\n let selectionManager = filteredState.selectionManager;\n let hasDragHooks = !!dragAndDropHooks?.useDraggableCollectionState;\n let hasDropHooks = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(hasDragHooks);\n let dropHooksProvided = useRef(hasDropHooks);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== hasDragHooks) {\n console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n if (dropHooksProvided.current !== hasDropHooks) {\n console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n }, [hasDragHooks, hasDropHooks]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (hasDragHooks && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview\n ? <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n : null;\n }\n\n if (hasDropHooks && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let keyboardDelegate = new ListKeyboardDelegate({\n collection: filteredState.collection,\n disabledKeys: selectionManager.disabledKeys,\n disabledBehavior: selectionManager.disabledBehavior,\n ref,\n layoutDelegate\n });\n let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || ctxDropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection.rows, ref);\n droppableCollection = dragAndDropHooks.useDroppableCollection!({\n keyboardDelegate,\n dropTargetDelegate\n }, dropState, ref);\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-Table',\n values: {\n isDropTarget: isRootDropTarget,\n isFocused,\n isFocusVisible,\n state: filteredState\n }\n });\n\n let isListDraggable = !!(hasDragHooks && !dragState?.isDisabled);\n\n let style = renderProps.style;\n let layoutState: TableColumnResizeState<unknown> | null = null;\n if (tableContainerContext) {\n layoutState = tableContainerContext.useTableColumnResizeState({\n tableWidth: tableContainerContext.tableWidth\n }, filteredState);\n if (!isVirtualized) {\n style = {\n ...style,\n tableLayout: 'fixed',\n width: 'fit-content'\n };\n }\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <Provider\n values={[\n [TableStateContext, filteredState],\n [TableColumnResizeStateContext, layoutState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: TableDropIndicatorWrapper}],\n [SelectableCollectionContext, null],\n [FieldInputContext, null]\n ]}>\n <FocusScope>\n <TableElementType\n {...mergeProps(DOMProps, renderProps, gridProps, focusProps, droppableCollection?.collectionProps)}\n style={style}\n ref={ref as RefObject<HTMLTableElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-allows-dragging={isListDraggable || undefined}\n data-drop-target={isRootDropTarget || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}>\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={tableContainerContext?.scrollRef ?? ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)} />\n </SharedElementTransition>\n </TableElementType>\n </FocusScope>\n {dragPreview}\n </Provider>\n );\n}\n\nexport interface TableOptionsContextValue {\n /** The type of selection that is allowed in the table. */\n selectionMode: SelectionMode,\n /** The selection behavior for the table. If selectionMode is `\"none\"`, this will be `null`. */\n selectionBehavior: SelectionBehavior | null,\n /** Whether the table allows empty selection. */\n disallowEmptySelection: boolean,\n /** Whether the table allows rows to be dragged. */\n allowsDragging: boolean\n}\n\nconst TableOptionsContext = createContext<TableOptionsContextValue | null>(null);\n\n/**\n * Returns options from the parent `<Table>` component.\n */\nexport function useTableOptions(): TableOptionsContextValue {\n return useContext(TableOptionsContext)!;\n}\n\nexport interface TableHeaderRenderProps {\n /**\n * Whether the table header is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean\n}\n\nexport interface TableHeaderProps<T> extends StyleRenderProps<TableHeaderRenderProps, 'thead' | 'div'>, HoverEvents, GlobalDOMAttributes<HTMLTableSectionElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-TableHeader'\n */\n className?: ClassNameOrFunction<TableHeaderRenderProps>,\n /** A list of table columns. */\n columns?: Iterable<T>,\n /** A list of `Column(s)` or a function. If the latter, a list of columns must be provided using the `columns` prop. */\n children?: ReactNode | ((item: T) => ReactElement),\n /** Values that should invalidate the column cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\nclass TableHeaderNode<T> extends CollectionNode<T> {\n static readonly type = 'tableheader';\n}\n\nlet THeadElementType = forwardRef(function THeadElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <dom.div {...props} ref={ref} />;\n }\n return <dom.thead {...props} ref={ref} />;\n});\n\n/**\n * A header within a `<Table>`, containing the table columns.\n */\nexport const TableHeader = /*#__PURE__*/ createBranchComponent(\n TableHeaderNode,\n <T extends object>(props: TableHeaderProps<T>, ref: ForwardedRef<HTMLTableSectionElement | HTMLDivElement>) => {\n let collection = useContext(TableStateContext)!.collection as TableCollection<unknown>;\n let headerRows = useCachedChildren({\n items: collection.headerRows,\n children: useCallback((item: Node<unknown>) => {\n switch (item.type) {\n case 'headerrow':\n return <TableHeaderRow item={item} />;\n default:\n throw new Error('Unsupported node type in TableHeader: ' + item.type);\n }\n }, [])\n });\n\n let {rowGroupProps} = useTableRowGroup();\n let {hoverProps, isHovered} = useHover({\n onHoverStart: props.onHoverStart,\n onHoverChange: props.onHoverChange,\n onHoverEnd: props.onHoverEnd\n });\n\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-TableHeader',\n values: {\n isHovered\n }\n });\n\n return (\n <THeadElementType\n {...mergeProps(filterDOMProps(props, {global: true}), rowGroupProps, hoverProps)}\n {...renderProps}\n ref={ref as any}\n data-hovered={isHovered || undefined}>\n {headerRows}\n </THeadElementType>\n );\n },\n props => (\n <Collection dependencies={props.dependencies} items={props.columns}>\n {props.children}\n </Collection>\n )\n);\n\nlet TableHeaderRowElementType = forwardRef(function TableHeaderRowElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <div {...props} ref={ref} />;\n }\n return <tr {...props} ref={ref} />;\n});\n\nfunction TableHeaderRow({item}: {item: GridNode<any>}) {\n let ref = useRef<HTMLTableRowElement>(null);\n let state = useContext(TableStateContext)!;\n let {isVirtualized, CollectionBranch} = useContext(CollectionRendererContext);\n let {rowProps} = useTableHeaderRow({node: item, isVirtualized}, state, ref);\n let {checkboxProps} = useTableSelectAllCheckbox(state);\n\n return (\n <TableHeaderRowElementType {...rowProps} ref={ref}>\n <Provider\n values={[\n [CheckboxContext, {\n slots: {\n selection: checkboxProps\n }\n }]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </TableHeaderRowElementType>\n );\n}\n\nexport interface ColumnRenderProps {\n /**\n * Whether the column is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the column is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the column is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the column is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the column allows sorting.\n * @selector [data-allows-sorting]\n */\n allowsSorting: boolean,\n /**\n * The current sort direction.\n * @selector [data-sort-direction=\"ascending | descending\"]\n */\n sortDirection: SortDirection | undefined,\n /**\n * Whether the column is currently being resized.\n * @selector [data-resizing]\n */\n isResizing: boolean,\n /**\n * Triggers sorting for this column in the given direction.\n */\n sort(direction: SortDirection): void,\n /**\n * Starts column resizing if the table is contained in a `<ResizableTableContainer>` element.\n */\n startResize(): void\n}\n\nexport interface ColumnProps extends RenderProps<ColumnRenderProps, 'th' | 'div'>, GlobalDOMAttributes<HTMLTableHeaderCellElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Column'\n */\n className?: ClassNameOrFunction<ColumnRenderProps>,\n /** The unique id of the column. */\n id?: Key,\n /** Whether the column allows sorting. */\n allowsSorting?: boolean,\n /** Whether a column is a [row header](https://www.w3.org/TR/wai-aria-1.1/#rowheader) and should be announced by assistive technology during row navigation. */\n isRowHeader?: boolean,\n /** A string representation of the column's contents, used for accessibility announcements. */\n textValue?: string,\n /** The width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */\n width?: ColumnSize | null,\n /** The default width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */\n defaultWidth?: ColumnSize | null,\n /** The minimum width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */\n minWidth?: ColumnStaticSize | null,\n /** The maximum width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */\n maxWidth?: ColumnStaticSize | null\n}\n\nclass TableColumnNode extends CollectionNode<unknown> {\n static readonly type = 'column';\n}\n\nlet ColumnElementType = forwardRef(function ColumnElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <dom.div {...props} ref={ref} />;\n }\n return <dom.th {...props} ref={ref} />;\n});\n\n/**\n * A column within a `<Table>`.\n */\nexport const Column = /*#__PURE__*/ createLeafComponent(TableColumnNode, (props: ColumnProps, forwardedRef: ForwardedRef<HTMLTableCellElement | HTMLDivElement>, column: GridNode<unknown>) => {\n let ref = useObjectRef<HTMLTableCellElement | HTMLDivElement>(forwardedRef);\n let state = useContext(TableStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {columnHeaderProps, isPressed} = useTableColumnHeader(\n {node: column, isVirtualized},\n state,\n ref\n );\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n\n let layoutState = useContext(TableColumnResizeStateContext);\n let isResizing = false;\n if (layoutState) {\n isResizing = layoutState.resizingColumn === column.key;\n } else if (process.env.NODE_ENV !== 'production') {\n for (let prop in ['width', 'defaultWidth', 'minWidth', 'maxWidth']) {\n if (prop in column.props) {\n console.warn(`The ${prop} prop on a <Column> only applies when a <Table> is wrapped in a <ResizableTableContainer>. If you aren't using column resizing, you can set the width of a column with CSS.`);\n }\n }\n }\n\n let {hoverProps, isHovered} = useHover({isDisabled: !props.allowsSorting});\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: column.rendered,\n defaultClassName: 'react-aria-Column',\n values: {\n isHovered,\n isPressed,\n isFocused,\n isFocusVisible,\n allowsSorting: column.props.allowsSorting,\n sortDirection: state.sortDescriptor?.column === column.key\n ? state.sortDescriptor.direction\n : undefined,\n isResizing,\n startResize: () => {\n if (layoutState) {\n layoutState.startResize(column.key);\n state.setKeyboardNavigationDisabled(true);\n } else {\n throw new Error('Wrap your <Table> in a <ResizableTableContainer> to enable column resizing');\n }\n },\n sort: (direction) => {\n state.sort(column.key, direction);\n }\n }\n });\n\n let style = renderProps.style;\n if (layoutState) {\n style = {...style, width: layoutState.getColumnWidth(column.key)};\n }\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <ColumnElementType\n {...mergeProps(DOMProps, columnHeaderProps, focusProps, hoverProps)}\n {...renderProps}\n style={style}\n ref={ref as any}\n data-hovered={isHovered || undefined}\n data-pressed={isPressed || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-resizing={isResizing || undefined}\n data-allows-sorting={column.props.allowsSorting || undefined}\n data-sort-direction={state.sortDescriptor?.column === column.key ? state.sortDescriptor.direction : undefined}>\n <Provider\n values={[\n [ColumnResizerContext, {column, triggerRef: ref}],\n [CollectionRendererContext, DefaultCollectionRenderer]\n ]}>\n {renderProps.children}\n </Provider>\n </ColumnElementType>\n );\n});\n\nexport interface ColumnResizerRenderProps {\n /**\n * Whether the resizer is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the resizer is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the resizer is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the resizer is currently being resized.\n * @selector [data-resizing]\n */\n isResizing: boolean,\n /**\n * The direction that the column is currently resizable.\n * @selector [data-resizable-direction=\"right | left | both\"]\n */\n resizableDirection: 'right' | 'left' | 'both'\n}\n\nexport interface ColumnResizerProps extends HoverEvents, RenderProps<ColumnResizerRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColumnResizer'\n */\n className?: ClassNameOrFunction<ColumnResizerRenderProps>,\n /** A custom accessibility label for the resizer. */\n 'aria-label'?: string\n}\n\ninterface ColumnResizerContextValue {\n column: GridNode<unknown>,\n triggerRef: RefObject<HTMLDivElement | null>\n}\n\nconst ColumnResizerContext = createContext<ColumnResizerContextValue | null>(null);\n\nexport const ColumnResizer = forwardRef(function ColumnResizer(props: ColumnResizerProps, ref: ForwardedRef<HTMLDivElement>) {\n let layoutState = useContext(TableColumnResizeStateContext);\n if (!layoutState) {\n throw new Error('Wrap your <Table> in a <ResizableTableContainer> to enable column resizing');\n }\n let stringFormatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n let {onResizeStart, onResize, onResizeEnd} = useContext(ResizableTableContainerContext)!;\n let {column, triggerRef} = useContext(ColumnResizerContext)!;\n let inputRef = useRef<HTMLInputElement>(null);\n let {resizerProps, inputProps, isResizing} = useTableColumnResize(\n {\n column,\n 'aria-label': props['aria-label'] || stringFormatter.format('tableResizer'),\n onResizeStart,\n onResize,\n onResizeEnd,\n triggerRef\n },\n layoutState,\n inputRef\n );\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let isEResizable = layoutState.getColumnMinWidth(column.key) >= layoutState.getColumnWidth(column.key);\n let isWResizable = layoutState.getColumnMaxWidth(column.key) <= layoutState.getColumnWidth(column.key);\n let {direction} = useLocale();\n let resizableDirection: ColumnResizerRenderProps['resizableDirection'] = 'both';\n if (isEResizable) {\n resizableDirection = direction === 'rtl' ? 'right' : 'left';\n } else if (isWResizable) {\n resizableDirection = direction === 'rtl' ? 'left' : 'right';\n } else {\n resizableDirection = 'both';\n }\n\n let objectRef = useObjectRef(ref);\n let [cursor, setCursor] = useState('');\n useEffect(() => {\n if (!objectRef.current) {\n return;\n }\n let style = window.getComputedStyle(objectRef.current);\n setCursor(style.cursor);\n }, [objectRef, resizableDirection]);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColumnResizer',\n values: {\n isFocused,\n isFocusVisible,\n isResizing,\n isHovered,\n resizableDirection\n }\n });\n\n let [isMouseDown, setMouseDown] = useState(false);\n let onPointerDown = (e: PointerEvent) => {\n if (e.pointerType === 'mouse') {\n setMouseDown(true);\n }\n };\n\n if (!isResizing && isMouseDown) {\n setMouseDown(false);\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n ref={objectRef}\n role=\"presentation\"\n {...mergeProps(DOMProps, renderProps, resizerProps, {onPointerDown}, hoverProps)}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-resizing={isResizing || undefined}\n data-resizable-direction={resizableDirection}>\n {renderProps.children}\n <input\n ref={inputRef}\n {...mergeProps(inputProps, focusProps)} />\n {isResizing && isMouseDown && ReactDOM.createPortal(<div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />, document.body)}\n </dom.div>\n );\n});\n\nexport interface TableBodyRenderProps {\n /**\n * Whether the table body has no rows and should display its empty state.\n * @selector [data-empty]\n */\n isEmpty: boolean,\n /**\n * Whether the Table is currently the active drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean\n}\n\nexport interface TableBodyProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, StyleRenderProps<TableBodyRenderProps, 'tbody' | 'div'>, GlobalDOMAttributes<HTMLTableSectionElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-TableBody'\n */\n className?: ClassNameOrFunction<TableBodyRenderProps>,\n /** Provides content to display when there are no rows in the table. */\n renderEmptyState?: (props: TableBodyRenderProps) => ReactNode\n}\n\nclass TableBodyNode<T> extends FilterableNode<T> {\n static readonly type = 'tablebody';\n}\n\nlet TableBodyElementType = forwardRef(function TableBodyElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <dom.div {...props} ref={ref} />;\n }\n return <dom.tbody {...props} ref={ref} />;\n});\n\n/**\n * The body of a `<Table>`, containing the table rows.\n */\nexport const TableBody = /*#__PURE__*/ createBranchComponent(TableBodyNode, <T extends object>(props: TableBodyProps<T>, ref: ForwardedRef<HTMLTableSectionElement | HTMLDivElement>) => {\n let state = useContext(TableStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let collection = state.collection;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let isDroppable = !!dragAndDropHooks?.useDroppableCollectionState && !dropState?.isDisabled;\n let isRootDropTarget = isDroppable && !!dropState && (dropState.isDropTarget({type: 'root'}) ?? false);\n\n let isEmpty = collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n isEmpty\n };\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-TableBody',\n values: renderValues\n });\n\n let emptyState;\n let numColumns = collection.columnCount;\n\n if (isEmpty && props.renderEmptyState && state) {\n let rowProps = {};\n let rowHeaderProps = {};\n let style = {};\n if (isVirtualized) {\n rowHeaderProps['aria-colspan'] = numColumns;\n style = {display: 'contents'};\n } else {\n rowHeaderProps['colSpan'] = numColumns;\n }\n\n emptyState = (\n <TableRowElementType role=\"row\" {...rowProps} style={style}>\n <TableCellElementType role=\"rowheader\" {...rowHeaderProps} style={style}>\n {props.renderEmptyState(renderValues)}\n </TableCellElementType>\n </TableRowElementType>\n );\n }\n\n let {rowGroupProps} = useTableRowGroup();\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n // TODO: TableBody doesn't support being the scrollable body of the table yet, to revisit if needed. Would need to\n // call useLoadMore here and walk up the DOM to the nearest scrollable element to set scrollRef\n return (\n <TableBodyElementType\n {...mergeProps(DOMProps, renderProps, rowGroupProps)}\n ref={ref as any}\n data-empty={isEmpty || undefined}>\n {isDroppable && <RootDropIndicator />}\n <CollectionBranch\n collection={collection}\n parent={collection.body}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)} />\n {emptyState}\n </TableBodyElementType>\n );\n});\n\nexport interface RowRenderProps extends ItemRenderProps {\n /** Whether the row's children have keyboard focus. */\n isFocusVisibleWithin: boolean,\n /** The unique id of the row. */\n id?: Key\n}\n\nexport interface RowProps<T> extends StyleRenderProps<RowRenderProps, 'tr' | 'div'>, LinkDOMProps, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLTableRowElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Row'\n */\n className?: ClassNameOrFunction<RowRenderProps>,\n /** A list of columns used when dynamically rendering cells. */\n columns?: Iterable<T>,\n /** The cells within the row. Supports static items or a function for dynamic rendering. */\n children?: ReactNode | ((item: T) => ReactElement),\n /** The object value that this row represents. When using dynamic collections, this is set automatically. */\n value?: T,\n /** Values that should invalidate the cell cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>,\n /** A string representation of the row's contents, used for features like typeahead. */\n textValue?: string,\n /** Whether the row is disabled. */\n isDisabled?: boolean,\n /**\n * Handler that is called when a user performs an action on the row. The exact user event depends on\n * the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void,\n /** The unique id of the row. */\n id?: Key\n}\n\nclass TableRowNode<T> extends CollectionNode<T> {\n static readonly type = 'item';\n\n filter(collection: BaseCollection<T>, newCollection: BaseCollection<T>, filterFn: (textValue: string, node: Node<T>) => boolean): TableRowNode<T> | null {\n let cells = collection.getChildren(this.key);\n for (let cell of cells) {\n if (filterFn(cell.textValue, cell)) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n }\n\n return null;\n }\n}\n\nlet TableRowElementType = forwardRef(function TableRowElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <dom.div {...props} ref={ref} />;\n }\n return <dom.tr {...props} ref={ref} />;\n});\n\n/**\n * A row within a `<Table>`.\n */\nexport const Row = /*#__PURE__*/ createBranchComponent(\n TableRowNode,\n <T extends object>(props: RowProps<T>, forwardedRef: ForwardedRef<HTMLTableRowElement | HTMLDivElement>, item: GridNode<T>) => {\n let ref = useObjectRef<HTMLTableRowElement | HTMLDivElement>(forwardedRef);\n let state = useContext(TableStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let {isVirtualized, CollectionBranch} = useContext(CollectionRendererContext);\n let {rowProps, ...states} = useTableRow(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let {\n isFocusVisible: isFocusVisibleWithin,\n focusProps: focusWithinProps\n } = useFocusRing({within: true});\n let {hoverProps, isHovered} = useHover({\n isDisabled: !states.allowsSelection && !states.hasAction,\n onHoverStart: props.onHoverStart,\n onHoverChange: props.onHoverChange,\n onHoverEnd: props.onHoverEnd\n });\n\n let {checkboxProps} = useTableSelectionCheckbox(\n {key: item.key},\n state\n );\n\n let draggableItem: DraggableItemResult | undefined = undefined;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!({key: item.key, hasDragButton: true}, dragState);\n }\n\n let dropIndicator: DropIndicatorAria | undefined = undefined;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!({\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n }, dropState, dropIndicatorRef);\n }\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current && process.env.NODE_ENV !== 'production') {\n console.warn('Draggable items in a Table must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.');\n }\n // eslint-disable-next-line\n }, []);\n\n let isDragging = dragState && dragState.isDragging(item.key);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {children: _, ...restProps} = props;\n let renderProps = useRenderProps({\n ...restProps,\n id: undefined,\n defaultClassName: 'react-aria-Row',\n values: {\n ...states,\n isHovered,\n isFocused,\n isFocusVisible,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n isFocusVisibleWithin,\n id: item.key\n }\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <TableRowElementType role=\"row\" style={{height: 0}}>\n <TableCellElementType role=\"gridcell\" colSpan={state.collection.columnCount} style={{padding: 0}}>\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicator.dropIndicatorProps} ref={dropIndicatorRef} />\n </TableCellElementType>\n </TableRowElementType>\n )}\n <TableRowElementType\n {...mergeProps(DOMProps, renderProps, rowProps, focusProps, hoverProps, draggableItem?.dragProps, focusWithinProps)}\n ref={ref as any}\n data-disabled={states.isDisabled || undefined}\n data-selected={states.isSelected || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-pressed={states.isPressed || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={state.selectionManager.selectionMode === 'none' ? undefined : state.selectionManager.selectionMode}\n data-focus-visible-within={isFocusVisibleWithin || undefined}>\n <Provider\n values={[\n [CheckboxContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }],\n [ButtonContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </TableRowElementType>\n </>\n );\n },\n props => {\n if (props.id == null && typeof props.children === 'function') {\n throw new Error('No id detected for the Row element. The Row element requires a id to be provided to it when the cells are rendered dynamically.');\n }\n\n let dependencies = [props.value].concat(props.dependencies);\n return (\n <Collection dependencies={dependencies} items={props.columns} idScope={props.id}>\n {props.children}\n </Collection>\n );\n }\n);\n\nexport interface CellRenderProps {\n /**\n * Whether the cell is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the cell is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the cell is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the cell is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the parent row is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * The unique id of the cell.\n **/\n id?: Key,\n /**\n * The index of the column that this cell belongs to. Respects col spanning.\n */\n columnIndex?: number | null\n}\n\nexport interface CellProps extends RenderProps<CellRenderProps, 'td' | 'div'>, GlobalDOMAttributes<HTMLTableCellElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Cell'\n */\n className?: ClassNameOrFunction<CellRenderProps>,\n /** The unique id of the cell. */\n id?: Key,\n /** A string representation of the cell's contents, used for features like typeahead. */\n textValue?: string,\n /** Indicates how many columns the data cell spans. */\n colSpan?: number\n}\n\nclass TableCellNode extends CollectionNode<unknown> {\n static readonly type = 'cell';\n}\n\nlet TableCellElementType = forwardRef(function TableCellElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <dom.div {...props} ref={ref} />;\n }\n return <dom.td {...props} ref={ref} />;\n});\n\n/**\n * A cell within a table row.\n */\nexport const Cell = /*#__PURE__*/ createLeafComponent(TableCellNode, (props: CellProps, forwardedRef: ForwardedRef<HTMLTableCellElement | HTMLDivElement>, cell: GridNode<unknown>) => {\n let ref = useObjectRef<HTMLTableCellElement | HTMLDivElement>(forwardedRef);\n let state = useContext(TableStateContext)!;\n let {dragState} = useContext(DragAndDropContext);\n let {isVirtualized} = useContext(CollectionRendererContext);\n\n cell.column = state.collection.columns[cell.index];\n\n let {gridCellProps, isPressed} = useTableCell({\n node: cell,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n }, state, ref);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let {hoverProps, isHovered} = useHover({});\n let isSelected = cell.parentKey != null ? state.selectionManager.isSelected(cell.parentKey) : false;\n // colIndex is null, when there is so span, falling back to using the index\n let columnIndex = cell.colIndex || cell.index;\n\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Cell',\n values: {\n isFocused,\n isFocusVisible,\n isPressed,\n isHovered,\n isSelected,\n id: cell.key,\n columnIndex\n }\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <TableCellElementType\n {...mergeProps(DOMProps, renderProps, gridCellProps, focusProps, hoverProps)}\n ref={ref as any}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-pressed={isPressed || undefined}\n data-selected={isSelected || undefined}\n data-column-index={columnIndex}>\n <CollectionRendererContext.Provider value={DefaultCollectionRenderer}>\n {renderProps.children}\n </CollectionRendererContext.Provider>\n </TableCellElementType>\n );\n});\n\nfunction TableDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext)!;\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <TableDropIndicatorForwardRef {...props} dropIndicatorProps={dropIndicatorProps} isDropTarget={isDropTarget} buttonRef={buttonRef} ref={ref} />\n );\n}\n\ninterface TableDropIndicatorProps extends DropIndicatorProps, GlobalDOMAttributes<HTMLTableRowElement> {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>,\n isDropTarget: boolean,\n buttonRef: RefObject<HTMLDivElement | null>\n}\n\nlet TableDropIndicatorRowElementType = forwardRef(function TableDropIndicatorRowElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <dom.div {...props} ref={ref} />;\n }\n return <dom.tr {...props} ref={ref} />;\n});\nlet TableDropIndicatorTDElementType = forwardRef(function TableDropIndicatorTDElementType(props: any, ref: ForwardedRef<Element>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n if (isVirtualized) {\n return <dom.div {...props} ref={ref} />;\n }\n return <dom.td {...props} ref={ref} />;\n});\n\nfunction TableDropIndicator(props: TableDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {\n dropIndicatorProps,\n isDropTarget,\n buttonRef,\n ...otherProps\n } = props;\n\n let state = useContext(TableStateContext)!;\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <TableDropIndicatorRowElementType\n {...filterDOMProps(props as any, {global: true})}\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLTableRowElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <TableDropIndicatorTDElementType\n role=\"gridcell\"\n colSpan={state.collection.columnCount}\n style={{padding: 0}}>\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </TableDropIndicatorTDElementType>\n </TableDropIndicatorRowElementType>\n );\n}\n\nconst TableDropIndicatorForwardRef = forwardRef(TableDropIndicator);\n\nfunction RootDropIndicator() {\n let state = useContext(TableStateContext)!;\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!({\n target: {type: 'root'}\n }, dropState!, ref);\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <TableRowElementType\n role=\"row\"\n aria-hidden={dropIndicatorProps['aria-hidden']}\n style={{height: 0}}>\n <TableCellElementType\n role=\"gridcell\"\n colSpan={state.collection.columnCount}\n style={{padding: 0}}>\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </TableCellElementType>\n </TableRowElementType>\n );\n}\n\nexport interface TableLoadMoreItemProps extends Omit<LoadMoreSentinelProps, 'collection'>, StyleProps, DOMRenderProps<'tr' | 'div', undefined>, GlobalDOMAttributes<HTMLTableRowElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-TableLoadMoreItem'\n */\n className?: string,\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode,\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean\n}\n\nexport const TableLoadMoreItem = createLeafComponent(LoaderNode, function TableLoadingIndicator(props: TableLoadMoreItemProps, ref: ForwardedRef<HTMLTableRowElement>, item: Node<object>) {\n let state = useContext(TableStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n let numColumns = state.collection.columns.length;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(() => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }), [onLoadMore, scrollOffset, state?.collection]);\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-TableLoadingIndicator',\n values: undefined\n });\n let rowProps = {};\n let rowHeaderProps = {};\n let style = {};\n\n if (isVirtualized) {\n // For now don't include aria-rowindex on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // row count\n rowHeaderProps['aria-colspan'] = numColumns;\n style = {display: 'contents'};\n } else {\n rowHeaderProps['colSpan'] = numColumns;\n }\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <TableRowElementType style={{height: 0}} inert={inertValue(true)}>\n <TableCellElementType style={{padding: 0, border: 0}}>\n <div data-testid=\"loadMoreSentinel\" ref={sentinelRef} style={{position: 'relative', height: 1, width: 1}} />\n </TableCellElementType>\n </TableRowElementType>\n {isLoading && renderProps.children && (\n <TableRowElementType\n {...mergeProps(filterDOMProps(props, {global: true}), rowProps)}\n {...renderProps}\n role=\"row\"\n ref={ref as ForwardedRef<HTMLTableRowElement>}>\n <TableCellElementType role=\"rowheader\" {...rowHeaderProps} style={style}>\n {renderProps.children}\n </TableCellElementType>\n </TableRowElementType>\n )}\n </>\n );\n});\n"],"names":[],"version":3,"file":"Table.module.js.map"}
|
package/dist/Tabs.main.js
CHANGED
|
@@ -90,7 +90,7 @@ function $f982e6cd1aac14a3$var$TabsInner({ props: props, tabsRef: ref, collectio
|
|
|
90
90
|
let DOMProps = (0, $ke4kY$reactariautils.filterDOMProps)(props, {
|
|
91
91
|
global: true
|
|
92
92
|
});
|
|
93
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($ke4kY$react))).createElement(
|
|
93
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($ke4kY$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
|
|
94
94
|
...(0, $ke4kY$reactaria.mergeProps)(DOMProps, renderProps, focusProps),
|
|
95
95
|
ref: ref,
|
|
96
96
|
slot: props.slot || undefined,
|
|
@@ -141,7 +141,7 @@ function $f982e6cd1aac14a3$var$TabListInner({ props: props, forwardedRef: ref })
|
|
|
141
141
|
global: true
|
|
142
142
|
});
|
|
143
143
|
delete DOMProps.id;
|
|
144
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($ke4kY$react))).createElement(
|
|
144
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($ke4kY$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
|
|
145
145
|
...(0, $ke4kY$reactaria.mergeProps)(DOMProps, renderProps, tabListProps),
|
|
146
146
|
ref: objectRef,
|
|
147
147
|
"data-orientation": orientation || undefined
|
|
@@ -181,7 +181,7 @@ const $f982e6cd1aac14a3$export$3e41faf802a29e71 = /*#__PURE__*/ (0, $ke4kY$react
|
|
|
181
181
|
isHovered: isHovered
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
|
-
let ElementType = item.props.href ?
|
|
184
|
+
let ElementType = item.props.href ? (0, $c5ccf687772c0422$exports.dom).a : (0, $c5ccf687772c0422$exports.dom).div;
|
|
185
185
|
let DOMProps = (0, $ke4kY$reactariautils.filterDOMProps)(props, {
|
|
186
186
|
global: true
|
|
187
187
|
});
|
|
@@ -243,9 +243,16 @@ const $f982e6cd1aac14a3$export$5dae8d435677f210 = /*#__PURE__*/ (0, $ke4kY$react
|
|
|
243
243
|
// eslint-disable-next-line rulesdir/pure-render
|
|
244
244
|
if (state.selectedKey != null && state.selectedKey !== selectedKeyRef.current && ref.current && hasTransition.current) // eslint-disable-next-line rulesdir/pure-render
|
|
245
245
|
prevSize.current = ref.current.getBoundingClientRect();
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
let DOMProps = (0, $ke4kY$reactariautils.filterDOMProps)(props, {
|
|
247
|
+
labelable: true,
|
|
248
|
+
global: true
|
|
249
|
+
});
|
|
250
|
+
delete DOMProps.id;
|
|
251
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($ke4kY$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
|
|
252
|
+
render: props.render,
|
|
253
|
+
...DOMProps,
|
|
248
254
|
ref: ref,
|
|
255
|
+
style: props.style,
|
|
249
256
|
className: props.className || 'react-aria-TabPanels'
|
|
250
257
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($ke4kY$react))).createElement((0, $ke4kY$reactariacollections.Collection), props));
|
|
251
258
|
});
|
|
@@ -293,7 +300,7 @@ function $f982e6cd1aac14a3$var$TabPanelInner(props) {
|
|
|
293
300
|
});
|
|
294
301
|
delete DOMProps.id;
|
|
295
302
|
let domProps = isSelected ? (0, $ke4kY$reactaria.mergeProps)(DOMProps, tabPanelProps, focusProps, renderProps) : (0, $ke4kY$reactaria.mergeProps)(DOMProps, renderProps);
|
|
296
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($ke4kY$react))).createElement(
|
|
303
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($ke4kY$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
|
|
297
304
|
...domProps,
|
|
298
305
|
ref: ref,
|
|
299
306
|
"data-focused": isFocused || undefined,
|
package/dist/Tabs.main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA6IM,MAAM,0DAAc,CAAA,G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,aAAa;QACb,OAAO,CAAA,GAAA,gCAAS,EAAE,CAAC,cAAc,MAAM,KAAK;QAC5C,cAAY,CAAC,aAAa,SAAS;QACnC,iBAAe,cAAc;QAC7B,gBAAc,aAAa;qBAC3B,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAa;aAAK;YACnB;gBAAC;gBAAqB;aAAK;SAC5B;qBACD,0DAAC,CAAA,GAAA,mDAAwB,EAAE,QAAQ;QAAC,OAAO,CAAA,GAAA,mDAAwB;OAChE,YAAY,QAAQ;AAK/B","sources":["packages/react-aria-components/src/Tabs.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents, RefObject} from '@react-types/shared';\nimport {AriaTabListProps, AriaTabPanelProps, mergeProps, Orientation, useFocusRing, useHover, useTab, useTabList, useTabPanel} from 'react-aria';\nimport {ClassNameOrFunction, ContextValue, Provider, RenderProps, SlotProps, StyleProps, StyleRenderProps, useContextProps, useRenderProps, useSlottedContext} from './utils';\nimport {Collection, CollectionBuilder, CollectionNode, createHideableComponent, createLeafComponent} from '@react-aria/collections';\nimport {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, usePersistedKeys} from './Collection';\nimport {filterDOMProps, inertValue, useEnterAnimation, useExitAnimation, useLayoutEffect, useObjectRef} from '@react-aria/utils';\nimport {Collection as ICollection, Node, TabListState, useTabListState} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, JSX, useContext, useMemo, useRef, useState} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\n\nexport interface TabsProps extends Omit<AriaTabListProps<any>, 'items' | 'children'>, RenderProps<TabsRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Tabs'\n */\n className?: ClassNameOrFunction<TabsRenderProps>\n}\n\nexport interface TabsRenderProps {\n /**\n * The orientation of the tabs.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation\n}\n\nexport interface TabListProps<T> extends StyleRenderProps<TabListRenderProps>, AriaLabelingProps, Omit<CollectionProps<T>, 'disabledKeys'>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-TabList'\n */\n className?: ClassNameOrFunction<TabListRenderProps>\n}\n\nexport interface TabListRenderProps {\n /**\n * The orientation of the tab list.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * State of the tab list.\n */\n state: TabListState<unknown>\n}\n\nexport interface TabProps extends RenderProps<TabRenderProps>, AriaLabelingProps, LinkDOMProps, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Tab'\n */\n className?: ClassNameOrFunction<TabRenderProps>,\n /** The unique id of the tab. */\n id?: Key,\n /** Whether the tab is disabled. */\n isDisabled?: boolean\n}\n\nexport interface TabRenderProps {\n /**\n * Whether the tab is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the tab is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the tab is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the tab is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the tab is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the tab is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface TabPanelProps extends AriaTabPanelProps, RenderProps<TabPanelRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-TabPanel'\n */\n className?: ClassNameOrFunction<TabPanelRenderProps>,\n /**\n * Whether to mount the tab panel in the DOM even when it is not currently selected.\n * Inactive tab panels are inert and cannot be interacted with. They must be styled appropriately so this is clear to the user visually.\n * @default false\n */\n shouldForceMount?: boolean\n}\n\nexport interface TabPanelRenderProps {\n /**\n * Whether the tab panel is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the tab panel is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the tab panel is currently non-interactive. This occurs when the\n * `shouldForceMount` prop is true, and the corresponding tab is not selected.\n * @selector [data-inert]\n */\n isInert: boolean,\n /**\n * Whether the tab panel is currently entering. Use this to apply animations.\n * @selector [data-entering]\n */\n isEntering: boolean,\n /**\n * Whether the tab panel is currently exiting. Use this to apply animations.\n * @selector [data-exiting]\n */\n isExiting: boolean,\n /**\n * State of the tab list.\n */\n state: TabListState<unknown>\n}\n\nexport const TabsContext = createContext<ContextValue<TabsProps, HTMLDivElement>>(null);\nexport const TabListStateContext = createContext<TabListState<object> | null>(null);\n\n/**\n * Tabs organize content into multiple sections and allow users to navigate between them.\n */\nexport const Tabs = /*#__PURE__*/ (forwardRef as forwardRefType)(function Tabs(props: TabsProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TabsContext);\n let {children, orientation = 'horizontal'} = props;\n children = useMemo(() => (\n typeof children === 'function'\n ? children({orientation, defaultChildren: null})\n : children\n ), [children, orientation]);\n\n return (\n <CollectionBuilder content={children}>\n {collection => <TabsInner props={props} collection={collection} tabsRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface TabsInnerProps {\n props: TabsProps,\n collection: ICollection<Node<any>>,\n tabsRef: RefObject<HTMLDivElement | null>\n}\n\nfunction TabsInner({props, tabsRef: ref, collection}: TabsInnerProps) {\n let {orientation = 'horizontal'} = props;\n let state = useTabListState({\n ...props,\n collection,\n children: undefined\n });\n let {focusProps, isFocused, isFocusVisible} = useFocusRing({within: true});\n let values = useMemo(() => ({\n orientation,\n isFocusWithin: isFocused,\n isFocusVisible\n }), [orientation, isFocused, isFocusVisible]);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Tabs',\n values\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <div\n {...mergeProps(DOMProps, renderProps, focusProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-focused={isFocused || undefined}\n data-orientation={orientation}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={state.isDisabled || undefined}>\n <Provider\n values={[\n [TabsContext, props],\n [TabListStateContext, state]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n}\n\n/**\n * A TabList is used within Tabs to group tabs that a user can switch between.\n * The ids of the items within the <TabList> must match up with a corresponding item inside the <TabPanels>.\n */\nexport const TabList = /*#__PURE__*/ (forwardRef as forwardRefType)(function TabList<T extends object>(props: TabListProps<T>, ref: ForwardedRef<HTMLDivElement>): JSX.Element {\n let state = useContext(TabListStateContext);\n return state\n ? <TabListInner props={props} forwardedRef={ref} />\n : <Collection {...props} />;\n});\n\ninterface TabListInnerProps<T> {\n props: TabListProps<T>,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction TabListInner<T extends object>({props, forwardedRef: ref}: TabListInnerProps<T>) {\n let state = useContext(TabListStateContext)!;\n let {CollectionRoot} = useContext(CollectionRendererContext);\n let {orientation = 'horizontal', keyboardActivation = 'automatic'} = useSlottedContext(TabsContext)!;\n let objectRef = useObjectRef(ref);\n\n let {tabListProps} = useTabList({\n ...props,\n orientation,\n keyboardActivation\n }, state, objectRef);\n\n let renderProps = useRenderProps({\n ...props,\n children: null,\n defaultClassName: 'react-aria-TabList',\n values: {\n orientation,\n state\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <div\n {...mergeProps(DOMProps, renderProps, tabListProps)}\n ref={objectRef}\n data-orientation={orientation || undefined}>\n <SharedElementTransition>\n <CollectionRoot collection={state.collection} persistedKeys={usePersistedKeys(state.selectionManager.focusedKey)} />\n </SharedElementTransition>\n </div>\n );\n}\n\nclass TabItemNode extends CollectionNode<unknown> {\n static readonly type = 'item';\n}\n\n/**\n * A Tab provides a title for an individual item within a TabList.\n */\nexport const Tab = /*#__PURE__*/ createLeafComponent(TabItemNode, (props: TabProps, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<unknown>) => {\n let state = useContext(TabListStateContext)!;\n let ref = useObjectRef<any>(forwardedRef);\n let {tabProps, isSelected, isDisabled, isPressed} = useTab({key: item.key, ...props}, state, ref);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({\n isDisabled,\n onHoverStart: props.onHoverStart,\n onHoverEnd: props.onHoverEnd,\n onHoverChange: props.onHoverChange\n });\n\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-Tab',\n values: {\n isSelected,\n isDisabled,\n isFocused,\n isFocusVisible,\n isPressed,\n isHovered\n }\n });\n\n let ElementType: React.ElementType = item.props.href ? 'a' : 'div';\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <ElementType\n {...mergeProps(DOMProps, renderProps, tabProps, focusProps, hoverProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-disabled={isDisabled || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}>\n <SelectionIndicatorContext.Provider value={{isSelected}}>\n {renderProps.children}\n </SelectionIndicatorContext.Provider>\n </ElementType>\n );\n});\n\nexport interface TabPanelsProps<T> extends CollectionProps<T>, StyleProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-TabPanels'\n */\n className?: string\n}\n\n/**\n * Groups multiple `<TabPanel>` elements, and provides CSS variables for animated transitions.\n */\nexport const TabPanels = /*#__PURE__*/ createHideableComponent(function TabPanels<T extends object>(props: TabPanelsProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>) {\n let state = useContext(TabListStateContext)!;\n let ref = useObjectRef(forwardedRef);\n\n let selectedKeyRef = useRef(state.selectedKey);\n let prevSize = useRef<DOMRect | null>(null);\n let hasTransition = useRef<boolean | null>(null);\n useLayoutEffect(() => {\n let el = ref.current;\n if (!el) {\n return;\n }\n\n if (hasTransition.current == null) {\n hasTransition.current = /width|height|all/.test(window.getComputedStyle(el).transition);\n }\n \n if (hasTransition.current && selectedKeyRef.current != null && selectedKeyRef.current !== state.selectedKey) {\n // Measure auto size.\n el.style.setProperty('--tab-panel-width', 'auto');\n el.style.setProperty('--tab-panel-height', 'auto');\n let {width, height} = el.getBoundingClientRect();\n\n if (prevSize.current && (prevSize.current.width !== width || prevSize.current.height !== height)) {\n // Revert to previous size.\n el.style.setProperty('--tab-panel-width', prevSize.current.width + 'px');\n el.style.setProperty('--tab-panel-height', prevSize.current.height + 'px');\n \n // Force style re-calculation to trigger animations.\n window.getComputedStyle(el).height;\n\n // Animate to current pixel size.\n el.style.setProperty('--tab-panel-width', width + 'px');\n el.style.setProperty('--tab-panel-height', height + 'px');\n\n // When animations complete, revert back to auto size.\n Promise.all(el.getAnimations().map(a => a.finished))\n .then(() => {\n el.style.setProperty('--tab-panel-width', 'auto');\n el.style.setProperty('--tab-panel-height', 'auto');\n })\n .catch(() => {});\n }\n }\n \n selectedKeyRef.current = state.selectedKey;\n }, [ref, state.selectedKey]);\n\n // Store previous size before DOM updates occur.\n // This breaks the rules of hooks because there is no effect that runs _before_ DOM updates.\n // eslint-disable-next-line rulesdir/pure-render\n if (state.selectedKey != null && state.selectedKey !== selectedKeyRef.current && ref.current && hasTransition.current) {\n // eslint-disable-next-line rulesdir/pure-render\n prevSize.current = ref.current.getBoundingClientRect();\n }\n\n return (\n <div \n {...props}\n ref={ref}\n className={props.className || 'react-aria-TabPanels'}>\n <Collection {...props} />\n </div>\n );\n});\n\n/**\n * A TabPanel provides the content for a tab.\n */\nexport const TabPanel = /*#__PURE__*/ createHideableComponent(function TabPanel(props: TabPanelProps, forwardedRef: ForwardedRef<HTMLDivElement>) {\n const state = useContext(TabListStateContext)!;\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n\n // Track if the tab panel was initially selected on mount (after extra render to populate the collection).\n // In this case, we don't want to trigger animations.\n let isSelected = state.selectedKey === props.id;\n let [isInitiallySelected, setInitiallySelected] = useState<boolean | null>(state.selectedKey != null ? isSelected : null);\n if (isInitiallySelected == null && state.selectedKey != null) {\n setInitiallySelected(isSelected);\n } else if (!isSelected && isInitiallySelected) {\n setInitiallySelected(false);\n }\n\n let isExiting = useExitAnimation(ref, isSelected);\n if (!isSelected && !props.shouldForceMount && !isExiting) {\n return null;\n }\n\n return (\n <TabPanelInner\n {...props}\n tabPanelRef={ref}\n isInitiallySelected={isInitiallySelected || false}\n isExiting={isExiting} />\n );\n});\n\nfunction TabPanelInner(props: TabPanelProps & {tabPanelRef: RefObject<HTMLDivElement | null>, isInitiallySelected: boolean, isExiting: boolean}) {\n let state = useContext(TabListStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {id, tabPanelRef: ref, isInitiallySelected, isExiting, ...otherProps} = props;\n let {tabPanelProps} = useTabPanel(props, state, ref);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n\n let isSelected = state.selectedKey === props.id;\n let isEntering = useEnterAnimation(ref) && !isInitiallySelected;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-TabPanel',\n values: {\n isFocused,\n isFocusVisible,\n // @ts-ignore - compatibility with React < 19\n isInert: inertValue(!isSelected),\n isEntering,\n isExiting,\n state\n }\n });\n\n let DOMProps = filterDOMProps(otherProps, {global: true});\n delete DOMProps.id;\n\n let domProps = isSelected\n ? mergeProps(DOMProps, tabPanelProps, focusProps, renderProps)\n : mergeProps(DOMProps, renderProps);\n\n return (\n <div\n {...domProps}\n ref={ref}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n // @ts-ignore\n inert={inertValue(!isSelected || props.inert)}\n data-inert={!isSelected ? 'true' : undefined}\n data-entering={isEntering || undefined}\n data-exiting={isExiting || undefined}>\n <Provider\n values={[\n [TabsContext, null],\n [TabListStateContext, null]\n ]}>\n <CollectionRendererContext.Provider value={DefaultCollectionRenderer}>\n {renderProps.children}\n </CollectionRendererContext.Provider>\n </Provider>\n </div>\n );\n}\n"],"names":[],"version":3,"file":"Tabs.main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA6IM,MAAM,0DAAc,CAAA,GAAA,0BAAY,EAA2C;AAC3E,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAA+B;AAKvE,MAAM,4CAAqB,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,KAAK,KAAgB,EAAE,GAAiC;IAChI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,YAAC,QAAQ,eAAE,cAAc,cAAa,GAAG;IAC7C,WAAW,CAAA,GAAA,oBAAM,EAAE,IACjB,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kBAAkB;QACtC,aAAa;QACb,OAAO,CAAA,GAAA,gCAAS,EAAE,CAAC,cAAc,MAAM,KAAK;QAC5C,cAAY,CAAC,aAAa,SAAS;QACnC,iBAAe,cAAc;QAC7B,gBAAc,aAAa;qBAC3B,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAa;aAAK;YACnB;gBAAC;gBAAqB;aAAK;SAC5B;qBACD,0DAAC,CAAA,GAAA,mDAAwB,EAAE,QAAQ;QAAC,OAAO,CAAA,GAAA,mDAAwB;OAChE,YAAY,QAAQ;AAK/B","sources":["packages/react-aria-components/src/Tabs.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, FocusEvents, forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents, RefObject} from '@react-types/shared';\nimport {AriaTabListProps, AriaTabPanelProps, mergeProps, Orientation, useFocusRing, useHover, useTab, useTabList, useTabPanel} from 'react-aria';\nimport {ClassNameOrFunction, ContextValue, dom, DOMRenderProps, PossibleLinkDOMRenderProps, Provider, RenderProps, SlotProps, StyleProps, StyleRenderProps, useContextProps, useRenderProps, useSlottedContext} from './utils';\nimport {Collection, CollectionBuilder, CollectionNode, createHideableComponent, createLeafComponent} from '@react-aria/collections';\nimport {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, usePersistedKeys} from './Collection';\nimport {filterDOMProps, inertValue, useEnterAnimation, useExitAnimation, useLayoutEffect, useObjectRef} from '@react-aria/utils';\nimport {Collection as ICollection, Node, TabListState, useTabListState} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, JSX, useContext, useMemo, useRef, useState} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\n\nexport interface TabsProps extends Omit<AriaTabListProps<any>, 'items' | 'children'>, RenderProps<TabsRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Tabs'\n */\n className?: ClassNameOrFunction<TabsRenderProps>\n}\n\nexport interface TabsRenderProps {\n /**\n * The orientation of the tabs.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation\n}\n\nexport interface TabListProps<T> extends StyleRenderProps<TabListRenderProps>, AriaLabelingProps, Omit<CollectionProps<T>, 'disabledKeys'>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-TabList'\n */\n className?: ClassNameOrFunction<TabListRenderProps>\n}\n\nexport interface TabListRenderProps {\n /**\n * The orientation of the tab list.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * State of the tab list.\n */\n state: TabListState<unknown>\n}\n\nexport interface TabProps extends Omit<RenderProps<TabRenderProps>, 'render'>, PossibleLinkDOMRenderProps<'div', TabRenderProps>, AriaLabelingProps, LinkDOMProps, HoverEvents, FocusEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Tab'\n */\n className?: ClassNameOrFunction<TabRenderProps>,\n /** The unique id of the tab. */\n id?: Key,\n /** Whether the tab is disabled. */\n isDisabled?: boolean\n}\n\nexport interface TabRenderProps {\n /**\n * Whether the tab is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the tab is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the tab is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the tab is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the tab is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the tab is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface TabPanelProps extends AriaTabPanelProps, RenderProps<TabPanelRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-TabPanel'\n */\n className?: ClassNameOrFunction<TabPanelRenderProps>,\n /**\n * Whether to mount the tab panel in the DOM even when it is not currently selected.\n * Inactive tab panels are inert and cannot be interacted with. They must be styled appropriately so this is clear to the user visually.\n * @default false\n */\n shouldForceMount?: boolean\n}\n\nexport interface TabPanelRenderProps {\n /**\n * Whether the tab panel is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the tab panel is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the tab panel is currently non-interactive. This occurs when the\n * `shouldForceMount` prop is true, and the corresponding tab is not selected.\n * @selector [data-inert]\n */\n isInert: boolean,\n /**\n * Whether the tab panel is currently entering. Use this to apply animations.\n * @selector [data-entering]\n */\n isEntering: boolean,\n /**\n * Whether the tab panel is currently exiting. Use this to apply animations.\n * @selector [data-exiting]\n */\n isExiting: boolean,\n /**\n * State of the tab list.\n */\n state: TabListState<unknown>\n}\n\nexport const TabsContext = createContext<ContextValue<TabsProps, HTMLDivElement>>(null);\nexport const TabListStateContext = createContext<TabListState<object> | null>(null);\n\n/**\n * Tabs organize content into multiple sections and allow users to navigate between them.\n */\nexport const Tabs = /*#__PURE__*/ (forwardRef as forwardRefType)(function Tabs(props: TabsProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TabsContext);\n let {children, orientation = 'horizontal'} = props;\n children = useMemo(() => (\n typeof children === 'function'\n ? children({orientation, defaultChildren: null})\n : children\n ), [children, orientation]);\n\n return (\n <CollectionBuilder content={children}>\n {collection => <TabsInner props={props} collection={collection} tabsRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface TabsInnerProps {\n props: TabsProps,\n collection: ICollection<Node<any>>,\n tabsRef: RefObject<HTMLDivElement | null>\n}\n\nfunction TabsInner({props, tabsRef: ref, collection}: TabsInnerProps) {\n let {orientation = 'horizontal'} = props;\n let state = useTabListState({\n ...props,\n collection,\n children: undefined\n });\n let {focusProps, isFocused, isFocusVisible} = useFocusRing({within: true});\n let values = useMemo(() => ({\n orientation,\n isFocusWithin: isFocused,\n isFocusVisible\n }), [orientation, isFocused, isFocusVisible]);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Tabs',\n values\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, focusProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-focused={isFocused || undefined}\n data-orientation={orientation}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={state.isDisabled || undefined}>\n <Provider\n values={[\n [TabsContext, props],\n [TabListStateContext, state]\n ]}>\n {renderProps.children}\n </Provider>\n </dom.div>\n );\n}\n\n/**\n * A TabList is used within Tabs to group tabs that a user can switch between.\n * The ids of the items within the <TabList> must match up with a corresponding item inside the <TabPanels>.\n */\nexport const TabList = /*#__PURE__*/ (forwardRef as forwardRefType)(function TabList<T extends object>(props: TabListProps<T>, ref: ForwardedRef<HTMLDivElement>): JSX.Element {\n let state = useContext(TabListStateContext);\n return state\n ? <TabListInner props={props} forwardedRef={ref} />\n : <Collection {...props} />;\n});\n\ninterface TabListInnerProps<T> {\n props: TabListProps<T>,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction TabListInner<T extends object>({props, forwardedRef: ref}: TabListInnerProps<T>) {\n let state = useContext(TabListStateContext)!;\n let {CollectionRoot} = useContext(CollectionRendererContext);\n let {orientation = 'horizontal', keyboardActivation = 'automatic'} = useSlottedContext(TabsContext)!;\n let objectRef = useObjectRef(ref);\n\n let {tabListProps} = useTabList({\n ...props,\n orientation,\n keyboardActivation\n }, state, objectRef);\n\n let renderProps = useRenderProps({\n ...props,\n children: null,\n defaultClassName: 'react-aria-TabList',\n values: {\n orientation,\n state\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, tabListProps)}\n ref={objectRef}\n data-orientation={orientation || undefined}>\n <SharedElementTransition>\n <CollectionRoot collection={state.collection} persistedKeys={usePersistedKeys(state.selectionManager.focusedKey)} />\n </SharedElementTransition>\n </dom.div>\n );\n}\n\nclass TabItemNode extends CollectionNode<unknown> {\n static readonly type = 'item';\n}\n\n/**\n * A Tab provides a title for an individual item within a TabList.\n */\nexport const Tab = /*#__PURE__*/ createLeafComponent(TabItemNode, (props: TabProps, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<unknown>) => {\n let state = useContext(TabListStateContext)!;\n let ref = useObjectRef<any>(forwardedRef);\n let {tabProps, isSelected, isDisabled, isPressed} = useTab({key: item.key, ...props}, state, ref);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({\n isDisabled,\n onHoverStart: props.onHoverStart,\n onHoverEnd: props.onHoverEnd,\n onHoverChange: props.onHoverChange\n });\n\n let renderProps = useRenderProps<TabRenderProps, any>({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-Tab',\n values: {\n isSelected,\n isDisabled,\n isFocused,\n isFocusVisible,\n isPressed,\n isHovered\n }\n });\n\n let ElementType = item.props.href ? dom.a : dom.div;\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <ElementType\n {...mergeProps(DOMProps, renderProps, tabProps, focusProps, hoverProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-disabled={isDisabled || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}>\n <SelectionIndicatorContext.Provider value={{isSelected}}>\n {renderProps.children}\n </SelectionIndicatorContext.Provider>\n </ElementType>\n );\n});\n\nexport interface TabPanelsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, StyleProps, DOMRenderProps<'div', undefined>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-TabPanels'\n */\n className?: string\n}\n\n/**\n * Groups multiple `<TabPanel>` elements, and provides CSS variables for animated transitions.\n */\nexport const TabPanels = /*#__PURE__*/ createHideableComponent(function TabPanels<T extends object>(props: TabPanelsProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>) {\n let state = useContext(TabListStateContext)!;\n let ref = useObjectRef(forwardedRef);\n\n let selectedKeyRef = useRef(state.selectedKey);\n let prevSize = useRef<DOMRect | null>(null);\n let hasTransition = useRef<boolean | null>(null);\n useLayoutEffect(() => {\n let el = ref.current;\n if (!el) {\n return;\n }\n\n if (hasTransition.current == null) {\n hasTransition.current = /width|height|all/.test(window.getComputedStyle(el).transition);\n }\n\n if (hasTransition.current && selectedKeyRef.current != null && selectedKeyRef.current !== state.selectedKey) {\n // Measure auto size.\n el.style.setProperty('--tab-panel-width', 'auto');\n el.style.setProperty('--tab-panel-height', 'auto');\n let {width, height} = el.getBoundingClientRect();\n\n if (prevSize.current && (prevSize.current.width !== width || prevSize.current.height !== height)) {\n // Revert to previous size.\n el.style.setProperty('--tab-panel-width', prevSize.current.width + 'px');\n el.style.setProperty('--tab-panel-height', prevSize.current.height + 'px');\n\n // Force style re-calculation to trigger animations.\n window.getComputedStyle(el).height;\n\n // Animate to current pixel size.\n el.style.setProperty('--tab-panel-width', width + 'px');\n el.style.setProperty('--tab-panel-height', height + 'px');\n\n // When animations complete, revert back to auto size.\n Promise.all(el.getAnimations().map(a => a.finished))\n .then(() => {\n el.style.setProperty('--tab-panel-width', 'auto');\n el.style.setProperty('--tab-panel-height', 'auto');\n })\n .catch(() => {});\n }\n }\n\n selectedKeyRef.current = state.selectedKey;\n }, [ref, state.selectedKey]);\n\n // Store previous size before DOM updates occur.\n // This breaks the rules of hooks because there is no effect that runs _before_ DOM updates.\n // eslint-disable-next-line rulesdir/pure-render\n if (state.selectedKey != null && state.selectedKey !== selectedKeyRef.current && ref.current && hasTransition.current) {\n // eslint-disable-next-line rulesdir/pure-render\n prevSize.current = ref.current.getBoundingClientRect();\n }\n\n let DOMProps = filterDOMProps(props, {labelable: true, global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n render={props.render}\n {...DOMProps}\n ref={ref}\n style={props.style}\n className={props.className || 'react-aria-TabPanels'}>\n <Collection {...props} />\n </dom.div>\n );\n});\n\n/**\n * A TabPanel provides the content for a tab.\n */\nexport const TabPanel = /*#__PURE__*/ createHideableComponent(function TabPanel(props: TabPanelProps, forwardedRef: ForwardedRef<HTMLDivElement>) {\n const state = useContext(TabListStateContext)!;\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n\n // Track if the tab panel was initially selected on mount (after extra render to populate the collection).\n // In this case, we don't want to trigger animations.\n let isSelected = state.selectedKey === props.id;\n let [isInitiallySelected, setInitiallySelected] = useState<boolean | null>(state.selectedKey != null ? isSelected : null);\n if (isInitiallySelected == null && state.selectedKey != null) {\n setInitiallySelected(isSelected);\n } else if (!isSelected && isInitiallySelected) {\n setInitiallySelected(false);\n }\n\n let isExiting = useExitAnimation(ref, isSelected);\n if (!isSelected && !props.shouldForceMount && !isExiting) {\n return null;\n }\n\n return (\n <TabPanelInner\n {...props}\n tabPanelRef={ref}\n isInitiallySelected={isInitiallySelected || false}\n isExiting={isExiting} />\n );\n});\n\nfunction TabPanelInner(props: TabPanelProps & {tabPanelRef: RefObject<HTMLDivElement | null>, isInitiallySelected: boolean, isExiting: boolean}) {\n let state = useContext(TabListStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {id, tabPanelRef: ref, isInitiallySelected, isExiting, ...otherProps} = props;\n let {tabPanelProps} = useTabPanel(props, state, ref);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n\n let isSelected = state.selectedKey === props.id;\n let isEntering = useEnterAnimation(ref) && !isInitiallySelected;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-TabPanel',\n values: {\n isFocused,\n isFocusVisible,\n // @ts-ignore - compatibility with React < 19\n isInert: inertValue(!isSelected),\n isEntering,\n isExiting,\n state\n }\n });\n\n let DOMProps = filterDOMProps(otherProps, {global: true});\n delete DOMProps.id;\n\n let domProps = isSelected\n ? mergeProps(DOMProps, tabPanelProps, focusProps, renderProps)\n : mergeProps(DOMProps, renderProps);\n\n return (\n <dom.div\n {...domProps}\n ref={ref}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n // @ts-ignore\n inert={inertValue(!isSelected || props.inert)}\n data-inert={!isSelected ? 'true' : undefined}\n data-entering={isEntering || undefined}\n data-exiting={isExiting || undefined}>\n <Provider\n values={[\n [TabsContext, null],\n [TabListStateContext, null]\n ]}>\n <CollectionRendererContext.Provider value={DefaultCollectionRenderer}>\n {renderProps.children}\n </CollectionRendererContext.Provider>\n </Provider>\n </dom.div>\n );\n}\n"],"names":[],"version":3,"file":"Tabs.main.js.map"}
|