@react-aria/table
Advanced tools
Comparing version 3.0.0-nightly-c78b24831-250206 to 3.0.0-nightly-c8fdba56e-250225
@@ -32,3 +32,2 @@ var $heEpC$reactstatelycollections = require("@react-stately/collections"); | ||
if (startItem.type === 'column') { | ||
var _getNthItem; | ||
let child = (0, $heEpC$reactstatelycollections.getFirstItem)((0, $heEpC$reactstatelycollections.getChildNodes)(startItem, this.collection)); | ||
@@ -40,4 +39,3 @@ if (child) return child.key; | ||
if (!firstItem) return null; | ||
var _getNthItem_key; | ||
return (_getNthItem_key = (_getNthItem = (0, $heEpC$reactstatelycollections.getNthItem)((0, $heEpC$reactstatelycollections.getChildNodes)(firstItem, this.collection), startItem.index)) === null || _getNthItem === void 0 ? void 0 : _getNthItem.key) !== null && _getNthItem_key !== void 0 ? _getNthItem_key : null; | ||
return super.getKeyForItemInRowByIndex(firstKey, startItem.index); | ||
} | ||
@@ -44,0 +42,0 @@ return super.getKeyBelow(key); |
@@ -1,2 +0,2 @@ | ||
import {getFirstItem as $eIXPM$getFirstItem, getChildNodes as $eIXPM$getChildNodes, getNthItem as $eIXPM$getNthItem} from "@react-stately/collections"; | ||
import {getFirstItem as $eIXPM$getFirstItem, getChildNodes as $eIXPM$getChildNodes} from "@react-stately/collections"; | ||
import {GridKeyboardDelegate as $eIXPM$GridKeyboardDelegate} from "@react-aria/grid"; | ||
@@ -26,3 +26,2 @@ | ||
if (startItem.type === 'column') { | ||
var _getNthItem; | ||
let child = (0, $eIXPM$getFirstItem)((0, $eIXPM$getChildNodes)(startItem, this.collection)); | ||
@@ -34,4 +33,3 @@ if (child) return child.key; | ||
if (!firstItem) return null; | ||
var _getNthItem_key; | ||
return (_getNthItem_key = (_getNthItem = (0, $eIXPM$getNthItem)((0, $eIXPM$getChildNodes)(firstItem, this.collection), startItem.index)) === null || _getNthItem === void 0 ? void 0 : _getNthItem.key) !== null && _getNthItem_key !== void 0 ? _getNthItem_key : null; | ||
return super.getKeyForItemInRowByIndex(firstKey, startItem.index); | ||
} | ||
@@ -38,0 +36,0 @@ return super.getKeyBelow(key); |
@@ -5,6 +5,5 @@ var $6acf696f746f932c$exports = require("./utils.main.js"); | ||
var $33PgG$react = require("react"); | ||
var $33PgG$reactariafocus = require("@react-aria/focus"); | ||
var $33PgG$reactariainteractions = require("@react-aria/interactions"); | ||
var $33PgG$reactariagrid = require("@react-aria/grid"); | ||
var $33PgG$reactariai18n = require("@react-aria/i18n"); | ||
var $33PgG$reactariainteractions = require("@react-aria/interactions"); | ||
@@ -38,3 +37,2 @@ | ||
function $7669c34a63ef0113$export$9514819a8c81e960(props, state, ref) { | ||
@@ -58,3 +56,3 @@ var _state_sortDescriptor, _state_sortDescriptor1; | ||
// Needed to pick up the focusable context, enabling things like Tooltips for example | ||
let { focusableProps: focusableProps } = (0, $33PgG$reactariafocus.useFocusable)({}, ref); | ||
let { focusableProps: focusableProps } = (0, $33PgG$reactariainteractions.useFocusable)({}, ref); | ||
let ariaSort = undefined; | ||
@@ -89,3 +87,3 @@ let isSortedColumn = ((_state_sortDescriptor = state.sortDescriptor) === null || _state_sortDescriptor === void 0 ? void 0 : _state_sortDescriptor.column) === node.key; | ||
id: (0, $6acf696f746f932c$exports.getColumnHeaderId)(state, node.key), | ||
'aria-colspan': node.colspan && node.colspan > 1 ? node.colspan : undefined, | ||
'aria-colspan': node.colSpan && node.colSpan > 1 ? node.colSpan : undefined, | ||
'aria-sort': ariaSort | ||
@@ -92,0 +90,0 @@ } |
@@ -5,6 +5,5 @@ import {getColumnHeaderId as $2140fb2337097f2d$export$37cd4213f2ad742e} from "./utils.module.js"; | ||
import {useEffect as $cjB6b$useEffect} from "react"; | ||
import {useFocusable as $cjB6b$useFocusable} from "@react-aria/focus"; | ||
import {usePress as $cjB6b$usePress, useFocusable as $cjB6b$useFocusable} from "@react-aria/interactions"; | ||
import {useGridCell as $cjB6b$useGridCell} from "@react-aria/grid"; | ||
import {useLocalizedStringFormatter as $cjB6b$useLocalizedStringFormatter} from "@react-aria/i18n"; | ||
import {usePress as $cjB6b$usePress} from "@react-aria/interactions"; | ||
@@ -32,3 +31,2 @@ | ||
function $f329116d8ad0aba0$export$9514819a8c81e960(props, state, ref) { | ||
@@ -82,3 +80,3 @@ var _state_sortDescriptor, _state_sortDescriptor1; | ||
id: (0, $2140fb2337097f2d$export$37cd4213f2ad742e)(state, node.key), | ||
'aria-colspan': node.colspan && node.colspan > 1 ? node.colspan : undefined, | ||
'aria-colspan': node.colSpan && node.colSpan > 1 ? node.colSpan : undefined, | ||
'aria-sort': ariaSort | ||
@@ -85,0 +83,0 @@ } |
var $6acf696f746f932c$exports = require("./utils.main.js"); | ||
var $7ff3f66df3873a5e$exports = require("./intlStrings.main.js"); | ||
var $gDW2h$react = require("react"); | ||
var $gDW2h$reactariafocus = require("@react-aria/focus"); | ||
var $gDW2h$reactariainteractions = require("@react-aria/interactions"); | ||
var $gDW2h$reactariautils = require("@react-aria/utils"); | ||
var $gDW2h$reactariainteractions = require("@react-aria/interactions"); | ||
var $gDW2h$reactariai18n = require("@react-aria/i18n"); | ||
@@ -37,3 +36,2 @@ var $gDW2h$reactariavisuallyhidden = require("@react-aria/visually-hidden"); | ||
function $16d645f9e2153641$export$52994e973806c219(props, state, ref) { | ||
@@ -85,3 +83,3 @@ let { column: item, triggerRef: triggerRef, isDisabled: isDisabled, onResizeStart: onResizeStart, onResize: onResize, onResizeEnd: onResizeEnd, 'aria-label': ariaLabel } = props; | ||
if ((triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.current) && !wasFocusedOnResizeStart.current) // switch focus back to the column header unless the resizer was already focused when resizing started. | ||
(0, $gDW2h$reactariafocus.focusSafely)(triggerRef.current); | ||
(0, $gDW2h$reactariainteractions.focusSafely)(triggerRef.current); | ||
} | ||
@@ -144,3 +142,3 @@ lastSize.current = null; | ||
const focusInput = (0, $gDW2h$react.useCallback)(()=>{ | ||
if (ref.current) (0, $gDW2h$reactariafocus.focusSafely)(ref.current); | ||
if (ref.current) (0, $gDW2h$reactariainteractions.focusSafely)(ref.current); | ||
}, [ | ||
@@ -147,0 +145,0 @@ ref |
import {getColumnHeaderId as $2140fb2337097f2d$export$37cd4213f2ad742e} from "./utils.module.js"; | ||
import $d9Rqy$intlStringsmodulejs from "./intlStrings.module.js"; | ||
import {useRef as $d9Rqy$useRef, useCallback as $d9Rqy$useCallback, useEffect as $d9Rqy$useEffect} from "react"; | ||
import {focusSafely as $d9Rqy$focusSafely} from "@react-aria/focus"; | ||
import {useKeyboard as $d9Rqy$useKeyboard, focusSafely as $d9Rqy$focusSafely, useMove as $d9Rqy$useMove, useInteractionModality as $d9Rqy$useInteractionModality, usePress as $d9Rqy$usePress} from "@react-aria/interactions"; | ||
import {useId as $d9Rqy$useId, useEffectEvent as $d9Rqy$useEffectEvent, useDescription as $d9Rqy$useDescription, mergeProps as $d9Rqy$mergeProps} from "@react-aria/utils"; | ||
import {useKeyboard as $d9Rqy$useKeyboard, useMove as $d9Rqy$useMove, useInteractionModality as $d9Rqy$useInteractionModality, usePress as $d9Rqy$usePress} from "@react-aria/interactions"; | ||
import {useLocalizedStringFormatter as $d9Rqy$useLocalizedStringFormatter, useLocale as $d9Rqy$useLocale} from "@react-aria/i18n"; | ||
@@ -31,3 +30,2 @@ import {useVisuallyHidden as $d9Rqy$useVisuallyHidden} from "@react-aria/visually-hidden"; | ||
function $e91ef4e5004e3774$export$52994e973806c219(props, state, ref) { | ||
@@ -34,0 +32,0 @@ let { column: item, triggerRef: triggerRef, isDisabled: isDisabled, onResizeStart: onResizeStart, onResize: onResize, onResizeEnd: onResizeEnd, 'aria-label': ariaLabel } = props; |
{ | ||
"name": "@react-aria/table", | ||
"version": "3.0.0-nightly-c78b24831-250206", | ||
"version": "3.0.0-nightly-c8fdba56e-250225", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,16 +25,16 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/focus": "3.0.0-nightly-c78b24831-250206", | ||
"@react-aria/grid": "3.0.0-nightly-c78b24831-250206", | ||
"@react-aria/i18n": "3.0.0-nightly-c78b24831-250206", | ||
"@react-aria/interactions": "3.0.0-nightly-c78b24831-250206", | ||
"@react-aria/live-announcer": "3.0.0-nightly-c78b24831-250206", | ||
"@react-aria/utils": "3.0.0-nightly-c78b24831-250206", | ||
"@react-aria/visually-hidden": "3.0.0-nightly-c78b24831-250206", | ||
"@react-stately/collections": "3.0.0-nightly-c78b24831-250206", | ||
"@react-stately/flags": "3.0.0-nightly-c78b24831-250206", | ||
"@react-stately/table": "3.0.0-nightly-c78b24831-250206", | ||
"@react-types/checkbox": "3.0.0-nightly-c78b24831-250206", | ||
"@react-types/grid": "3.0.0-nightly-c78b24831-250206", | ||
"@react-types/shared": "3.0.0-nightly-c78b24831-250206", | ||
"@react-types/table": "3.0.0-nightly-c78b24831-250206", | ||
"@react-aria/focus": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-aria/grid": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-aria/i18n": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-aria/interactions": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-aria/live-announcer": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-aria/utils": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-aria/visually-hidden": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-stately/collections": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-stately/flags": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-stately/table": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-types/checkbox": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-types/grid": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-types/shared": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-types/table": "3.0.0-nightly-c8fdba56e-250225", | ||
"@swc/helpers": "^0.5.0" | ||
@@ -41,0 +41,0 @@ }, |
@@ -13,3 +13,3 @@ /* | ||
import {getChildNodes, getFirstItem, getNthItem} from '@react-stately/collections'; | ||
import {getChildNodes, getFirstItem} from '@react-stately/collections'; | ||
import {GridKeyboardDelegate} from '@react-aria/grid'; | ||
@@ -48,3 +48,4 @@ import {Key, Node} from '@react-types/shared'; | ||
} | ||
return getNthItem(getChildNodes(firstItem, this.collection), startItem.index)?.key ?? null; | ||
return super.getKeyForItemInRowByIndex(firstKey, startItem.index); | ||
} | ||
@@ -51,0 +52,0 @@ |
@@ -21,6 +21,5 @@ /* | ||
import {useEffect} from 'react'; | ||
import {useFocusable} from '@react-aria/focus'; | ||
import {useFocusable, usePress} from '@react-aria/interactions'; | ||
import {useGridCell} from '@react-aria/grid'; | ||
import {useLocalizedStringFormatter} from '@react-aria/i18n'; | ||
import {usePress} from '@react-aria/interactions'; | ||
@@ -103,3 +102,3 @@ export interface AriaTableColumnHeaderProps<T> { | ||
id: getColumnHeaderId(state, node.key), | ||
'aria-colspan': node.colspan && node.colspan > 1 ? node.colspan : undefined, | ||
'aria-colspan': node.colSpan && node.colSpan > 1 ? node.colSpan : undefined, | ||
'aria-sort': ariaSort | ||
@@ -106,0 +105,0 @@ } |
@@ -16,3 +16,3 @@ /* | ||
import {DOMAttributes, FocusableElement, Key, RefObject} from '@react-types/shared'; | ||
import {focusSafely} from '@react-aria/focus'; | ||
import {focusSafely, useInteractionModality, useKeyboard, useMove, usePress} from '@react-aria/interactions'; | ||
import {getColumnHeaderId} from './utils'; | ||
@@ -24,3 +24,2 @@ import {GridNode} from '@react-types/grid'; | ||
import {TableColumnResizeState} from '@react-stately/table'; | ||
import {useInteractionModality, useKeyboard, useMove, usePress} from '@react-aria/interactions'; | ||
import {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n'; | ||
@@ -27,0 +26,0 @@ import {useVisuallyHidden} from '@react-aria/visually-hidden'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
462040
4917
+ Added@internationalized/date@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@internationalized/message@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@internationalized/number@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@internationalized/string@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/focus@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/grid@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/i18n@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/interactions@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/live-announcer@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/selection@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/ssr@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/utils@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/visually-hidden@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-stately/collections@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-stately/flags@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-stately/grid@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-stately/selection@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-stately/table@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-stately/utils@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-types/checkbox@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-types/grid@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-types/shared@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-types/table@3.0.0-nightly-c8fdba56e-250225(transitive)
- Removed@internationalized/date@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@internationalized/message@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@internationalized/number@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@internationalized/string@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/focus@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/grid@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/i18n@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/interactions@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/live-announcer@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/selection@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/ssr@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/utils@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/visually-hidden@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-stately/collections@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-stately/flags@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-stately/grid@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-stately/selection@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-stately/table@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-stately/utils@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-types/checkbox@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-types/grid@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-types/shared@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-types/table@3.0.0-nightly-c78b24831-250206(transitive)
Updated@react-aria/interactions@3.0.0-nightly-c8fdba56e-250225
Updated@react-aria/live-announcer@3.0.0-nightly-c8fdba56e-250225
Updated@react-aria/visually-hidden@3.0.0-nightly-c8fdba56e-250225
Updated@react-stately/collections@3.0.0-nightly-c8fdba56e-250225