@react-aria/table 3.14.2-nightly.4666 → 3.14.2-nightly.4670

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.
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AE0BA,gCAAgC,CAAC,CAAE,SAAQ,SAAS;IAClD,4GAA4G;IAC5G,MAAM,CAAC,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;CACzB;AAED;;;;;;;GAOG;AACH,yBAAyB,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,CAAC,GAAG,QAAQ,CAgEpI;AC9ED,4CAA4C,CAAC;IAC3C,2KAA2K;IAC3K,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAClB,wHAAwH;IACxH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;IACE,+FAA+F;IAC/F,iBAAiB,EAAE,aAAa,CAAA;CACjC;AAED;;;;;GAKG;AACH,qCAAqC,CAAC,EAAE,KAAK,EAAE,2BAA2B,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,CAAC,GAAG,qBAAqB,CA8D3J;ACtED;;;;GAIG;AACH,4BAA4B,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,CAAC,GAAG,WAAW,CA4C7I;AClED;IACE,sCAAsC;IACtC,QAAQ,EAAE,aAAa,CAAA;CACxB;AAED;;;;GAIG;AAEH,kCAAkC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,OAAO,CAAC,GA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IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mCAAmC;IACnC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACvD,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAClD,iCAAiC;IACjC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,IAAI,CAAA;CACrD;AAED;;;;;GAKG;AACH,qCAAqC,CAAC,EAAE,KAAK,EAAE,2BAA2B,CAAC,CAAC,EAAE,KAAK,EAAE,uBAAuB,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,CAAC,GAAG,qBAAqB,CAoNvK;AC3PD,oCAAoC,gBAAgB,CAEnD;AAGD,YAAY,EAAC,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC","sources":["packages/@react-aria/table/src/packages/@react-aria/table/src/utils.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/TableKeyboardDelegate.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTable.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableColumnHeader.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableRow.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableHeaderRow.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableCell.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableSelectionCheckbox.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableColumnResize.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/index.ts","packages/@react-aria/table/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 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\nexport {useTable} from './useTable';\nexport {useTableColumnHeader} from './useTableColumnHeader';\nexport {useTableRow} from './useTableRow';\nexport {useTableHeaderRow} from './useTableHeaderRow';\nexport {useTableCell} from './useTableCell';\nexport {useTableSelectionCheckbox, useTableSelectAllCheckbox} from './useTableSelectionCheckbox';\nexport {useTableColumnResize} from './useTableColumnResize';\n\n// Workaround for a Parcel bug where re-exports don't work in the CommonJS output format...\n// export {useGridRowGroup as useTableRowGroup} from '@react-aria/grid';\nimport {GridRowGroupAria, useGridRowGroup} from '@react-aria/grid';\nexport function useTableRowGroup(): GridRowGroupAria {\n return useGridRowGroup();\n}\n\nexport type {AriaTableProps} from './useTable';\nexport type {GridAria, GridRowAria, GridRowProps} from '@react-aria/grid';\nexport type {AriaTableColumnHeaderProps, TableColumnHeaderAria} from './useTableColumnHeader';\nexport type {AriaTableCellProps, TableCellAria} from './useTableCell';\nexport type {TableHeaderRowAria} from './useTableHeaderRow';\nexport type {AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria} from './useTableSelectionCheckbox';\nexport type {AriaTableColumnResizeProps, TableColumnResizeAria} from './useTableColumnResize';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;;;;;;AE0BA,gCAAgC,CAAC,CAAE,SAAQ,SAAS;IAClD,4GAA4G;IAC5G,MAAM,CAAC,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;CACzB;AAED;;;;;;;GAOG;AACH,yBAAyB,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,GAAG,cAAc,CA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AAC,EAAE,KAAK,EAAE,2BAA2B,CAAC,CAAC,EAAE,KAAK,EAAE,uBAAuB,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,CAAC,GAAG,qBAAqB,CAoNvK;AC3PD,oCAAoC,gBAAgB,CAEnD;AAGD,YAAY,EAAC,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC","sources":["packages/@react-aria/table/src/packages/@react-aria/table/src/utils.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/TableKeyboardDelegate.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTable.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableColumnHeader.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableRow.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableHeaderRow.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableCell.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableSelectionCheckbox.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/useTableColumnResize.ts","packages/@react-aria/table/src/packages/@react-aria/table/src/index.ts","packages/@react-aria/table/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 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\nexport {useTable} from './useTable';\nexport {useTableColumnHeader} from './useTableColumnHeader';\nexport {useTableRow} from './useTableRow';\nexport {useTableHeaderRow} from './useTableHeaderRow';\nexport {useTableCell} from './useTableCell';\nexport {useTableSelectionCheckbox, useTableSelectAllCheckbox} from './useTableSelectionCheckbox';\nexport {useTableColumnResize} from './useTableColumnResize';\n\n// Workaround for a Parcel bug where re-exports don't work in the CommonJS output format...\n// export {useGridRowGroup as useTableRowGroup} from '@react-aria/grid';\nimport {GridRowGroupAria, useGridRowGroup} from '@react-aria/grid';\nexport function useTableRowGroup(): GridRowGroupAria {\n return useGridRowGroup();\n}\n\nexport type {AriaTableProps} from './useTable';\nexport type {GridAria, GridRowAria, GridRowProps} from '@react-aria/grid';\nexport type {AriaTableColumnHeaderProps, TableColumnHeaderAria} from './useTableColumnHeader';\nexport type {AriaTableCellProps, TableCellAria} from './useTableCell';\nexport type {TableHeaderRowAria} from './useTableHeaderRow';\nexport type {AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria} from './useTableSelectionCheckbox';\nexport type {AriaTableColumnResizeProps, TableColumnResizeAria} from './useTableColumnResize';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -1,7 +1,7 @@
1
1
  var $6acf696f746f932c$exports = require("./utils.main.js");
2
2
  var $6RVcf$reactstatelycollections = require("@react-stately/collections");
3
- var $6RVcf$reactariautils = require("@react-aria/utils");
4
3
  var $6RVcf$reactariagrid = require("@react-aria/grid");
4
+ var $6RVcf$reactariautils = require("@react-aria/utils");
5
5
  var $6RVcf$reactstatelyflags = require("@react-stately/flags");
6
6
  var $6RVcf$reactariai18n = require("@react-aria/i18n");
7
7
 
@@ -66,7 +66,8 @@ function $10b2115217af7c93$export$7f2f6ae19e707aa5(props, state, ref) {
66
66
  };
67
67
  }
68
68
  }
69
- let linkProps = states.hasAction ? (0, $6RVcf$reactariautils.getSyntheticLinkProps)(node.props) : {};
69
+ let syntheticLinkProps = (0, $6RVcf$reactariautils.useSyntheticLinkProps)(node.props);
70
+ let linkProps = states.hasAction ? syntheticLinkProps : {};
70
71
  return {
71
72
  rowProps: {
72
73
  ...(0, $6RVcf$reactariautils.mergeProps)(rowProps, treeGridRowProps, linkProps),
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAAA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AAC,SAAS,GAAG;wBAC5B,EAAE,eAAe;oBACnB,OAAO,IAAI,AAAC,EAAE,GAAG,KAAK,oCAAc,CAAC,WAAW,CAAC,UAAU,IAAK,MAAM,gBAAgB,CAAC,UAAU,KAAK,SAAS,GAAG,IAAI,gBAAiB,CAAA,MAAM,YAAY,KAAK,SAAS,MAAM,YAAY,CAAC,GAAG,CAAC,SAAS,GAAG,CAAA,GAAI;wBAC5M,MAAM,SAAS,CAAC,SAAS,GAAG;wBAC5B,EAAE,eAAe;oBACnB;gBACF;gBACA,iBAAiB,eAAe,MAAM,YAAY,KAAK,SAAS,MAAM,YAAY,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI;gBACnG,cAAc,SAAS,KAAK;gBAC5B,iBAAiB,SAAS,WAAW,GAAG;gBACxC,gBAAgB,SAAS,KAAK,GAAG,IAC/B,AAAC,CAAA,GAAA,0CAAU,EAAE,MAAM,MAAM,CAAC,GAAG,CAAC,qBAAA,+BAAA,SAAU,SAAS,EAAE,UAAU,EAAkB,WAAW,GAAG,IAC7F,AAAC,CAAA,GAAA,0CAAU,EAAE,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,EAAkB,WAAW,GAAG;YACvG;QACF;IACF;IAEA,IAAI,YAAY,OAAO,SAAS,GAAG,CAAA,GAAA,2CAAoB,EAAE,KAAK,KAAK,IAAI,CAAC;IACxE,OAAO;QACL,UAAU;YACR,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,kBAAkB,UAAU;YACpD,mBAAmB,CAAA,GAAA,0CAAe,EAAE,OAAO,KAAK,GAAG;QACrD;QACA,GAAG,MAAM;IACX;AACF","sources":["packages/@react-aria/table/src/useTableRow.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {FocusableElement} from '@react-types/shared';\nimport {getLastItem} from '@react-stately/collections';\nimport {getRowLabelledBy} from './utils';\nimport {getSyntheticLinkProps, mergeProps} from '@react-aria/utils';\nimport type {GridNode} from '@react-types/grid';\nimport {GridRowAria, GridRowProps, useGridRow} from '@react-aria/grid';\nimport {HTMLAttributes, RefObject} from 'react';\nimport {TableCollection} from '@react-types/table';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableState, TreeGridState} from '@react-stately/table';\nimport {useLocale} from '@react-aria/i18n';\n\nconst EXPANSION_KEYS = {\n expand: {\n ltr: 'ArrowRight',\n rtl: 'ArrowLeft'\n },\n 'collapse': {\n ltr: 'ArrowLeft',\n rtl: 'ArrowRight'\n }\n};\n\n/**\n * Provides the behavior and accessibility implementation for a row in a table.\n * @param props - Props for the row.\n * @param state - State of the table, as returned by `useTableState`.\n */\nexport function useTableRow<T>(props: GridRowProps<T>, state: TableState<T> | TreeGridState<T>, ref: RefObject<FocusableElement>): GridRowAria {\n let {node, isVirtualized} = props;\n let {rowProps, ...states} = useGridRow<T, TableCollection<T>, TableState<T>>(props, state, ref);\n let {direction} = useLocale();\n\n if (isVirtualized && !(tableNestedRows() && 'expandedKeys' in state)) {\n rowProps['aria-rowindex'] = node.index + 1 + state.collection.headerRows.length; // aria-rowindex is 1 based\n } else {\n delete rowProps['aria-rowindex'];\n }\n\n let treeGridRowProps: HTMLAttributes<HTMLElement> = {};\n if (tableNestedRows() && 'expandedKeys' in state) {\n let treeNode = state.keyMap.get(node.key);\n if (treeNode != null) {\n let hasChildRows = treeNode.props?.UNSTABLE_childItems || treeNode.props?.children?.length > state.userColumnCount;\n treeGridRowProps = {\n onKeyDown: (e) => {\n if ((e.key === EXPANSION_KEYS['expand'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && state.expandedKeys !== 'all' && !state.expandedKeys.has(treeNode.key)) {\n state.toggleKey(treeNode.key);\n e.stopPropagation();\n } else if ((e.key === EXPANSION_KEYS['collapse'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && (state.expandedKeys === 'all' || state.expandedKeys.has(treeNode.key))) {\n state.toggleKey(treeNode.key);\n e.stopPropagation();\n }\n },\n 'aria-expanded': hasChildRows ? state.expandedKeys === 'all' || state.expandedKeys.has(node.key) : undefined,\n 'aria-level': treeNode.level,\n 'aria-posinset': treeNode.indexOfType + 1,\n 'aria-setsize': treeNode.level > 1 ?\n (getLastItem(state.keyMap.get(treeNode?.parentKey).childNodes) as GridNode<T>).indexOfType + 1 :\n (getLastItem(state.keyMap.get(state.collection.body.key).childNodes) as GridNode<T>).indexOfType + 1\n };\n }\n }\n\n let linkProps = states.hasAction ? getSyntheticLinkProps(node.props) : {};\n return {\n rowProps: {\n ...mergeProps(rowProps, treeGridRowProps, linkProps),\n 'aria-labelledby': getRowLabelledBy(state, node.key)\n },\n ...states\n };\n}\n"],"names":[],"version":3,"file":"useTableRow.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAcD,MAAM,uCAAiB;IACrB,QAAQ;QACN,KAAK;QACL,KAAK;IACP;IACA,YAAY;QACV,KAAK;QACL,KAAK;IACP;AACF;AAOO,SAAS,0CAAe,KAAsB,EAAE,KAAuC,EAAE,GAAgC;IAC9H,IAAI,QAAC,IAAI,iBAAE,aAAa,EAAC,GAAG;IAC5B,IAAI,YAAC,QAAQ,EAAE,GAAG,QAAO,GAAG,CAAA,GAAA,+BAAS,EAAwC,OAAO,OAAO;IAC3F,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAE1B,IAAI,iBAAiB,CAAE,CAAA,CAAA,GAAA,wCAAc,OAAO,kBAAkB,KAAI,GAChE,QAAQ,CAAC,g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AS,WAAW,GAAG;gBACxC,gBAAgB,SAAS,KAAK,GAAG,IAC/B,AAAC,CAAA,GAAA,0CAAU,EAAE,MAAM,MAAM,CAAC,GAAG,CAAC,qBAAA,+BAAA,SAAU,SAAS,EAAE,UAAU,EAAkB,WAAW,GAAG,IAC7F,AAAC,CAAA,GAAA,0CAAU,EAAE,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,EAAkB,WAAW,GAAG;YACvG;QACF;IACF;IAEA,IAAI,qBAAqB,CAAA,GAAA,2CAAoB,EAAE,KAAK,KAAK;IACzD,IAAI,YAAY,OAAO,SAAS,GAAG,qBAAqB,CAAC;IACzD,OAAO;QACL,UAAU;YACR,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,kBAAkB,UAAU;YACpD,mBAAmB,CAAA,GAAA,0CAAe,EAAE,OAAO,KAAK,GAAG;QACrD;QACA,GAAG,MAAM;IACX;AACF","sources":["packages/@react-aria/table/src/useTableRow.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {FocusableElement} from '@react-types/shared';\nimport {getLastItem} from '@react-stately/collections';\nimport {getRowLabelledBy} from './utils';\nimport type {GridNode} from '@react-types/grid';\nimport {GridRowAria, GridRowProps, useGridRow} from '@react-aria/grid';\nimport {HTMLAttributes, RefObject} from 'react';\nimport {mergeProps, useSyntheticLinkProps} from '@react-aria/utils';\nimport {TableCollection} from '@react-types/table';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableState, TreeGridState} from '@react-stately/table';\nimport {useLocale} from '@react-aria/i18n';\n\nconst EXPANSION_KEYS = {\n expand: {\n ltr: 'ArrowRight',\n rtl: 'ArrowLeft'\n },\n 'collapse': {\n ltr: 'ArrowLeft',\n rtl: 'ArrowRight'\n }\n};\n\n/**\n * Provides the behavior and accessibility implementation for a row in a table.\n * @param props - Props for the row.\n * @param state - State of the table, as returned by `useTableState`.\n */\nexport function useTableRow<T>(props: GridRowProps<T>, state: TableState<T> | TreeGridState<T>, ref: RefObject<FocusableElement>): GridRowAria {\n let {node, isVirtualized} = props;\n let {rowProps, ...states} = useGridRow<T, TableCollection<T>, TableState<T>>(props, state, ref);\n let {direction} = useLocale();\n\n if (isVirtualized && !(tableNestedRows() && 'expandedKeys' in state)) {\n rowProps['aria-rowindex'] = node.index + 1 + state.collection.headerRows.length; // aria-rowindex is 1 based\n } else {\n delete rowProps['aria-rowindex'];\n }\n\n let treeGridRowProps: HTMLAttributes<HTMLElement> = {};\n if (tableNestedRows() && 'expandedKeys' in state) {\n let treeNode = state.keyMap.get(node.key);\n if (treeNode != null) {\n let hasChildRows = treeNode.props?.UNSTABLE_childItems || treeNode.props?.children?.length > state.userColumnCount;\n treeGridRowProps = {\n onKeyDown: (e) => {\n if ((e.key === EXPANSION_KEYS['expand'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && state.expandedKeys !== 'all' && !state.expandedKeys.has(treeNode.key)) {\n state.toggleKey(treeNode.key);\n e.stopPropagation();\n } else if ((e.key === EXPANSION_KEYS['collapse'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && (state.expandedKeys === 'all' || state.expandedKeys.has(treeNode.key))) {\n state.toggleKey(treeNode.key);\n e.stopPropagation();\n }\n },\n 'aria-expanded': hasChildRows ? state.expandedKeys === 'all' || state.expandedKeys.has(node.key) : undefined,\n 'aria-level': treeNode.level,\n 'aria-posinset': treeNode.indexOfType + 1,\n 'aria-setsize': treeNode.level > 1 ?\n (getLastItem(state.keyMap.get(treeNode?.parentKey).childNodes) as GridNode<T>).indexOfType + 1 :\n (getLastItem(state.keyMap.get(state.collection.body.key).childNodes) as GridNode<T>).indexOfType + 1\n };\n }\n }\n\n let syntheticLinkProps = useSyntheticLinkProps(node.props);\n let linkProps = states.hasAction ? syntheticLinkProps : {};\n return {\n rowProps: {\n ...mergeProps(rowProps, treeGridRowProps, linkProps),\n 'aria-labelledby': getRowLabelledBy(state, node.key)\n },\n ...states\n };\n}\n"],"names":[],"version":3,"file":"useTableRow.main.js.map"}
@@ -1,7 +1,7 @@
1
1
  import {getRowLabelledBy as $2140fb2337097f2d$export$85069b70317f543} from "./utils.mjs";
2
2
  import {getLastItem as $2K6sg$getLastItem} from "@react-stately/collections";
3
- import {getSyntheticLinkProps as $2K6sg$getSyntheticLinkProps, mergeProps as $2K6sg$mergeProps} from "@react-aria/utils";
4
3
  import {useGridRow as $2K6sg$useGridRow} from "@react-aria/grid";
4
+ import {useSyntheticLinkProps as $2K6sg$useSyntheticLinkProps, mergeProps as $2K6sg$mergeProps} from "@react-aria/utils";
5
5
  import {tableNestedRows as $2K6sg$tableNestedRows} from "@react-stately/flags";
6
6
  import {useLocale as $2K6sg$useLocale} from "@react-aria/i18n";
7
7
 
@@ -60,7 +60,8 @@ function $b2db214c022798eb$export$7f2f6ae19e707aa5(props, state, ref) {
60
60
  };
61
61
  }
62
62
  }
63
- let linkProps = states.hasAction ? (0, $2K6sg$getSyntheticLinkProps)(node.props) : {};
63
+ let syntheticLinkProps = (0, $2K6sg$useSyntheticLinkProps)(node.props);
64
+ let linkProps = states.hasAction ? syntheticLinkProps : {};
64
65
  return {
65
66
  rowProps: {
66
67
  ...(0, $2K6sg$mergeProps)(rowProps, treeGridRowProps, linkProps),
@@ -1,7 +1,7 @@
1
1
  import {getRowLabelledBy as $2140fb2337097f2d$export$85069b70317f543} from "./utils.module.js";
2
2
  import {getLastItem as $2K6sg$getLastItem} from "@react-stately/collections";
3
- import {getSyntheticLinkProps as $2K6sg$getSyntheticLinkProps, mergeProps as $2K6sg$mergeProps} from "@react-aria/utils";
4
3
  import {useGridRow as $2K6sg$useGridRow} from "@react-aria/grid";
4
+ import {useSyntheticLinkProps as $2K6sg$useSyntheticLinkProps, mergeProps as $2K6sg$mergeProps} from "@react-aria/utils";
5
5
  import {tableNestedRows as $2K6sg$tableNestedRows} from "@react-stately/flags";
6
6
  import {useLocale as $2K6sg$useLocale} from "@react-aria/i18n";
7
7
 
@@ -60,7 +60,8 @@ function $b2db214c022798eb$export$7f2f6ae19e707aa5(props, state, ref) {
60
60
  };
61
61
  }
62
62
  }
63
- let linkProps = states.hasAction ? (0, $2K6sg$getSyntheticLinkProps)(node.props) : {};
63
+ let syntheticLinkProps = (0, $2K6sg$useSyntheticLinkProps)(node.props);
64
+ let linkProps = states.hasAction ? syntheticLinkProps : {};
64
65
  return {
65
66
  rowProps: {
66
67
  ...(0, $2K6sg$mergeProps)(rowProps, treeGridRowProps, linkProps),
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAcD,MAAM,uCAAiB;IACrB,QAAQ;QACN,KAAK;QACL,KAAK;IACP;IACA,YAAY;QACV,KAAK;QACL,KAAK;IACP;AACF;AAOO,SAAS,0CAAe,KAAsB,EAAE,KAAuC,EAAE,GAAgC;IAC9H,IAAI,QAAC,IAAI,iBAAE,aAAa,EAAC,GAAG;IAC5B,IAAI,YAAC,QAAQ,EAAE,GAAG,QAAO,GAAG,CAAA,GAAA,iBAAS,EAAwC,OAAO,OAAO;IAC3F,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAE1B,IAAI,iBAAiB,CAAE,CAAA,CAAA,GAAA,sBAAc,OAAO,kBAAkB,KAAI,GAChE,QAAQ,CAAC,gBAAgB,GAAG,KAAK,KAAK,GAAG,IAAI,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE,2BAA2B;SAE5G,OAAO,QAAQ,CAAC,gBAAgB;IAGlC,IAAI,mBAAgD,CAAC;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UAAU,EAAkB,WAAW,GAAG,IAC7F,AAAC,CAAA,GAAA,kBAAU,EAAE,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,EAAkB,WAAW,GAAG;YACvG;QACF;IACF;IAEA,IAAI,YAAY,OAAO,SAAS,GAAG,CAAA,GAAA,4BAAoB,EAAE,KAAK,KAAK,IAAI,CAAC;IACxE,OAAO;QACL,UAAU;YACR,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,kBAAkB,UAAU;YACpD,mBAAmB,CAAA,GAAA,wCAAe,EAAE,OAAO,KAAK,GAAG;QACrD;QACA,GAAG,MAAM;IACX;AACF","sources":["packages/@react-aria/table/src/useTableRow.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {FocusableElement} from '@react-types/shared';\nimport {getLastItem} from '@react-stately/collections';\nimport {getRowLabelledBy} from './utils';\nimport {getSyntheticLinkProps, mergeProps} from '@react-aria/utils';\nimport type {GridNode} from '@react-types/grid';\nimport {GridRowAria, GridRowProps, useGridRow} from '@react-aria/grid';\nimport {HTMLAttributes, RefObject} from 'react';\nimport {TableCollection} from '@react-types/table';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableState, TreeGridState} from '@react-stately/table';\nimport {useLocale} from '@react-aria/i18n';\n\nconst EXPANSION_KEYS = {\n expand: {\n ltr: 'ArrowRight',\n rtl: 'ArrowLeft'\n },\n 'collapse': {\n ltr: 'ArrowLeft',\n rtl: 'ArrowRight'\n }\n};\n\n/**\n * Provides the behavior and accessibility implementation for a row in a table.\n * @param props - Props for the row.\n * @param state - State of the table, as returned by `useTableState`.\n */\nexport function useTableRow<T>(props: GridRowProps<T>, state: TableState<T> | TreeGridState<T>, ref: RefObject<FocusableElement>): GridRowAria {\n let {node, isVirtualized} = props;\n let {rowProps, ...states} = useGridRow<T, TableCollection<T>, TableState<T>>(props, state, ref);\n let {direction} = useLocale();\n\n if (isVirtualized && !(tableNestedRows() && 'expandedKeys' in state)) {\n rowProps['aria-rowindex'] = node.index + 1 + state.collection.headerRows.length; // aria-rowindex is 1 based\n } else {\n delete rowProps['aria-rowindex'];\n }\n\n let treeGridRowProps: HTMLAttributes<HTMLElement> = {};\n if (tableNestedRows() && 'expandedKeys' in state) {\n let treeNode = state.keyMap.get(node.key);\n if (treeNode != null) {\n let hasChildRows = treeNode.props?.UNSTABLE_childItems || treeNode.props?.children?.length > state.userColumnCount;\n treeGridRowProps = {\n onKeyDown: (e) => {\n if ((e.key === EXPANSION_KEYS['expand'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && state.expandedKeys !== 'all' && !state.expandedKeys.has(treeNode.key)) {\n state.toggleKey(treeNode.key);\n e.stopPropagation();\n } else if ((e.key === EXPANSION_KEYS['collapse'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && (state.expandedKeys === 'all' || state.expandedKeys.has(treeNode.key))) {\n state.toggleKey(treeNode.key);\n e.stopPropagation();\n }\n },\n 'aria-expanded': hasChildRows ? state.expandedKeys === 'all' || state.expandedKeys.has(node.key) : undefined,\n 'aria-level': treeNode.level,\n 'aria-posinset': treeNode.indexOfType + 1,\n 'aria-setsize': treeNode.level > 1 ?\n (getLastItem(state.keyMap.get(treeNode?.parentKey).childNodes) as GridNode<T>).indexOfType + 1 :\n (getLastItem(state.keyMap.get(state.collection.body.key).childNodes) as GridNode<T>).indexOfType + 1\n };\n }\n }\n\n let linkProps = states.hasAction ? getSyntheticLinkProps(node.props) : {};\n return {\n rowProps: {\n ...mergeProps(rowProps, treeGridRowProps, linkProps),\n 'aria-labelledby': getRowLabelledBy(state, node.key)\n },\n ...states\n };\n}\n"],"names":[],"version":3,"file":"useTableRow.module.js.map"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAcD,MAAM,uCAAiB;IACrB,QAAQ;QACN,KAAK;QACL,KAAK;IACP;IACA,YAAY;QACV,KAAK;QACL,KAAK;IACP;AACF;AAOO,SAAS,0CAAe,KAAsB,EAAE,KAAuC,EAAE,GAAgC;IAC9H,IAAI,QAAC,IAAI,iBAAE,aAAa,EAAC,GAAG;IAC5B,IAAI,YAAC,QAAQ,EAAE,GAAG,QAAO,GAAG,CAAA,GAAA,iBAAS,EAAwC,OAAO,OAAO;IAC3F,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAE1B,IAAI,iBAAiB,CAAE,CAAA,CAAA,GAAA,sBAAc,OAAO,kBAAkB,KAAI,GAChE,QAAQ,CAAC,gBAAgB,GAAG,KAAK,KAAK,GAAG,IAAI,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE,2BAA2B;SAE5G,OAAO,QAAQ,CAAC,gBAAgB;IAGlC,IAAI,mBAAgD,CAAC;IACrD,IAAI,CAAA,GAAA,sBAAc,OAAO,kBAAkB,OAAO;QAChD,IAAI,WAAW,MAAM,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG;QACxC,IAAI,YAAY,MAAM;gBACD,iBAAuC,0BAAA;YAA1D,IAAI,eAAe,EAAA,kBAAA,SAAS,KAAK,cAAd,sCAAA,gBAAgB,mBAAmB,KAAI,EAAA,mBAAA,SAAS,KAAK,cAAd,wCAAA,2BAAA,iBAAgB,QAAQ,cAAxB,+CAAA,yBAA0B,MAAM,IAAG,MAAM,eAAe;YAClH,mBAAmB;gBACjB,WAAW,CAAC;oBACV,IAAI,AAAC,EAAE,GAAG,KAAK,oCAAc,CAAC,SAAS,CAAC,UAAU,IAAK,MAAM,gBAAgB,CAAC,UAA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TableRow.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {FocusableElement} from '@react-types/shared';\nimport {getLastItem} from '@react-stately/collections';\nimport {getRowLabelledBy} from './utils';\nimport type {GridNode} from '@react-types/grid';\nimport {GridRowAria, GridRowProps, useGridRow} from '@react-aria/grid';\nimport {HTMLAttributes, RefObject} from 'react';\nimport {mergeProps, useSyntheticLinkProps} from '@react-aria/utils';\nimport {TableCollection} from '@react-types/table';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableState, TreeGridState} from '@react-stately/table';\nimport {useLocale} from '@react-aria/i18n';\n\nconst EXPANSION_KEYS = {\n expand: {\n ltr: 'ArrowRight',\n rtl: 'ArrowLeft'\n },\n 'collapse': {\n ltr: 'ArrowLeft',\n rtl: 'ArrowRight'\n }\n};\n\n/**\n * Provides the behavior and accessibility implementation for a row in a table.\n * @param props - Props for the row.\n * @param state - State of the table, as returned by `useTableState`.\n */\nexport function useTableRow<T>(props: GridRowProps<T>, state: TableState<T> | TreeGridState<T>, ref: RefObject<FocusableElement>): GridRowAria {\n let {node, isVirtualized} = props;\n let {rowProps, ...states} = useGridRow<T, TableCollection<T>, TableState<T>>(props, state, ref);\n let {direction} = useLocale();\n\n if (isVirtualized && !(tableNestedRows() && 'expandedKeys' in state)) {\n rowProps['aria-rowindex'] = node.index + 1 + state.collection.headerRows.length; // aria-rowindex is 1 based\n } else {\n delete rowProps['aria-rowindex'];\n }\n\n let treeGridRowProps: HTMLAttributes<HTMLElement> = {};\n if (tableNestedRows() && 'expandedKeys' in state) {\n let treeNode = state.keyMap.get(node.key);\n if (treeNode != null) {\n let hasChildRows = treeNode.props?.UNSTABLE_childItems || treeNode.props?.children?.length > state.userColumnCount;\n treeGridRowProps = {\n onKeyDown: (e) => {\n if ((e.key === EXPANSION_KEYS['expand'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && state.expandedKeys !== 'all' && !state.expandedKeys.has(treeNode.key)) {\n state.toggleKey(treeNode.key);\n e.stopPropagation();\n } else if ((e.key === EXPANSION_KEYS['collapse'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && (state.expandedKeys === 'all' || state.expandedKeys.has(treeNode.key))) {\n state.toggleKey(treeNode.key);\n e.stopPropagation();\n }\n },\n 'aria-expanded': hasChildRows ? state.expandedKeys === 'all' || state.expandedKeys.has(node.key) : undefined,\n 'aria-level': treeNode.level,\n 'aria-posinset': treeNode.indexOfType + 1,\n 'aria-setsize': treeNode.level > 1 ?\n (getLastItem(state.keyMap.get(treeNode?.parentKey).childNodes) as GridNode<T>).indexOfType + 1 :\n (getLastItem(state.keyMap.get(state.collection.body.key).childNodes) as GridNode<T>).indexOfType + 1\n };\n }\n }\n\n let syntheticLinkProps = useSyntheticLinkProps(node.props);\n let linkProps = states.hasAction ? syntheticLinkProps : {};\n return {\n rowProps: {\n ...mergeProps(rowProps, treeGridRowProps, linkProps),\n 'aria-labelledby': getRowLabelledBy(state, node.key)\n },\n ...states\n };\n}\n"],"names":[],"version":3,"file":"useTableRow.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/table",
3
- "version": "3.14.2-nightly.4666+bd458c1ed",
3
+ "version": "3.14.2-nightly.4670+6e5785525",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,21 +22,21 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@react-aria/focus": "3.0.0-nightly.2954+bd458c1ed",
26
- "@react-aria/grid": "3.9.2-nightly.4666+bd458c1ed",
27
- "@react-aria/i18n": "3.0.0-nightly.2954+bd458c1ed",
28
- "@react-aria/interactions": "3.0.0-nightly.2954+bd458c1ed",
29
- "@react-aria/live-announcer": "3.0.0-nightly.2954+bd458c1ed",
30
- "@react-aria/utils": "3.0.0-nightly.2954+bd458c1ed",
31
- "@react-aria/visually-hidden": "3.0.0-nightly.2954+bd458c1ed",
32
- "@react-stately/collections": "3.0.0-nightly.2954+bd458c1ed",
33
- "@react-stately/flags": "3.0.4-nightly.4666+bd458c1ed",
34
- "@react-stately/table": "3.11.9-nightly.4666+bd458c1ed",
35
- "@react-stately/virtualizer": "3.7.2-nightly.4666+bd458c1ed",
36
- "@react-types/checkbox": "3.0.0-nightly.2954+bd458c1ed",
37
- "@react-types/grid": "3.2.7-nightly.4666+bd458c1ed",
38
- "@react-types/shared": "3.0.0-nightly.2954+bd458c1ed",
39
- "@react-types/table": "3.9.6-nightly.4666+bd458c1ed",
25
+ "@react-aria/focus": "3.0.0-nightly.2958+6e5785525",
26
+ "@react-aria/grid": "3.9.2-nightly.4670+6e5785525",
27
+ "@react-aria/i18n": "3.0.0-nightly.2958+6e5785525",
28
+ "@react-aria/interactions": "3.0.0-nightly.2958+6e5785525",
29
+ "@react-aria/live-announcer": "3.0.0-nightly.2958+6e5785525",
30
+ "@react-aria/utils": "3.0.0-nightly.2958+6e5785525",
31
+ "@react-aria/visually-hidden": "3.0.0-nightly.2958+6e5785525",
32
+ "@react-stately/collections": "3.0.0-nightly.2958+6e5785525",
33
+ "@react-stately/flags": "3.0.4-nightly.4670+6e5785525",
34
+ "@react-stately/table": "3.11.9-nightly.4670+6e5785525",
35
+ "@react-stately/virtualizer": "3.7.2-nightly.4670+6e5785525",
36
+ "@react-types/checkbox": "3.0.0-nightly.2958+6e5785525",
37
+ "@react-types/grid": "3.2.7-nightly.4670+6e5785525",
38
+ "@react-types/shared": "3.0.0-nightly.2958+6e5785525",
39
+ "@react-types/table": "3.9.6-nightly.4670+6e5785525",
40
40
  "@swc/helpers": "^0.5.0"
41
41
  },
42
42
  "peerDependencies": {
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "bd458c1ed166a5ff1fd93f0c1a397e1540b3d880"
49
+ "gitHead": "6e57855257f54738418f98c37efae798bf9fb4ad"
50
50
  }
@@ -13,10 +13,10 @@
13
13
  import {FocusableElement} from '@react-types/shared';
14
14
  import {getLastItem} from '@react-stately/collections';
15
15
  import {getRowLabelledBy} from './utils';
16
- import {getSyntheticLinkProps, mergeProps} from '@react-aria/utils';
17
16
  import type {GridNode} from '@react-types/grid';
18
17
  import {GridRowAria, GridRowProps, useGridRow} from '@react-aria/grid';
19
18
  import {HTMLAttributes, RefObject} from 'react';
19
+ import {mergeProps, useSyntheticLinkProps} from '@react-aria/utils';
20
20
  import {TableCollection} from '@react-types/table';
21
21
  import {tableNestedRows} from '@react-stately/flags';
22
22
  import {TableState, TreeGridState} from '@react-stately/table';
@@ -74,7 +74,8 @@ export function useTableRow<T>(props: GridRowProps<T>, state: TableState<T> | Tr
74
74
  }
75
75
  }
76
76
 
77
- let linkProps = states.hasAction ? getSyntheticLinkProps(node.props) : {};
77
+ let syntheticLinkProps = useSyntheticLinkProps(node.props);
78
+ let linkProps = states.hasAction ? syntheticLinkProps : {};
78
79
  return {
79
80
  rowProps: {
80
81
  ...mergeProps(rowProps, treeGridRowProps, linkProps),