@react-spectrum/table 3.15.0 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DragPreview.main.js +1 -1
- package/dist/DragPreview.mjs +1 -1
- package/dist/DragPreview.module.js +1 -1
- package/dist/Resizer.main.js +3 -4
- package/dist/Resizer.main.js.map +1 -1
- package/dist/Resizer.mjs +3 -4
- package/dist/Resizer.module.js +3 -4
- package/dist/Resizer.module.js.map +1 -1
- package/dist/TableView.main.js +2 -3
- package/dist/TableView.main.js.map +1 -1
- package/dist/TableView.mjs +2 -3
- package/dist/TableView.module.js +2 -3
- package/dist/TableView.module.js.map +1 -1
- package/dist/TableViewBase.main.js +4 -4
- package/dist/TableViewBase.main.js.map +1 -1
- package/dist/TableViewBase.mjs +4 -4
- package/dist/TableViewBase.module.js +4 -4
- package/dist/TableViewBase.module.js.map +1 -1
- package/dist/TableViewLayout.main.js.map +1 -1
- package/dist/TableViewLayout.module.js.map +1 -1
- package/dist/TableViewWrapper.main.js +4 -5
- package/dist/TableViewWrapper.main.js.map +1 -1
- package/dist/TableViewWrapper.mjs +4 -5
- package/dist/TableViewWrapper.module.js +4 -5
- package/dist/TableViewWrapper.module.js.map +1 -1
- package/dist/TreeGridTableView.main.js +2 -3
- package/dist/TreeGridTableView.main.js.map +1 -1
- package/dist/TreeGridTableView.mjs +2 -3
- package/dist/TreeGridTableView.module.js +2 -3
- package/dist/TreeGridTableView.module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/{vars.bd693cb4.css → vars.27f08d5f.css} +2 -2
- package/dist/{vars.bd693cb4.css.map → vars.27f08d5f.css.map} +1 -1
- package/package.json +27 -27
- package/src/Resizer.tsx +2 -5
- package/src/TableView.tsx +2 -5
- package/src/TableViewBase.tsx +3 -3
- package/src/TableViewWrapper.tsx +6 -9
- package/src/TreeGridTableView.tsx +2 -5
|
@@ -17,7 +17,9 @@ import {tableNestedRows as $k3cyS$tableNestedRows} from "@react-stately/flags";
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
|
|
22
|
+
*/ const $9f67189e3f884740$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $k3cyS$react).forwardRef(function TableViewWrapper(props, ref) {
|
|
21
23
|
let { UNSTABLE_allowsExpandableRows: UNSTABLE_allowsExpandableRows, ...otherProps } = props;
|
|
22
24
|
if ((0, $k3cyS$tableNestedRows)() && UNSTABLE_allowsExpandableRows) return /*#__PURE__*/ (0, $k3cyS$react).createElement((0, $be90f60881eac8aa$export$5669566ac2c90964), {
|
|
23
25
|
...otherProps,
|
|
@@ -27,10 +29,7 @@ function $9f67189e3f884740$var$TableViewWrapper(props, ref) {
|
|
|
27
29
|
...otherProps,
|
|
28
30
|
ref: ref
|
|
29
31
|
});
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
|
|
33
|
-
*/ const $9f67189e3f884740$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $k3cyS$react).forwardRef($9f67189e3f884740$var$TableViewWrapper);
|
|
32
|
+
});
|
|
34
33
|
|
|
35
34
|
|
|
36
35
|
export {$9f67189e3f884740$export$b3c27e869d856b7 as TableView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAiFD,SAAS,
|
|
1
|
+
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAiFD;;CAEC,GACD,MAAM,yDAAmB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,iBAAmC,KAA4B,EAAE,GAA2B;IAC7I,IAAI,iCAAC,6BAA6B,EAAE,GAAG,YAAW,GAAG;IACrD,IAAI,CAAA,GAAA,sBAAc,OAAO,+BACvB,qBAAO,gCAAC,CAAA,GAAA,yCAAgB;QAAG,GAAG,UAAU;QAAE,KAAK;;SAE/C,qBAAO,gCAAC,CAAA,GAAA,wCAAQ;QAAG,GAAG,UAAU;QAAE,KAAK;;AAE3C","sources":["packages/@react-spectrum/table/src/TableViewWrapper.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 type {AriaLabelingProps, DisabledBehavior, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps} from '@react-types/shared';\nimport type {ColumnSize, TableProps} from '@react-types/table';\nimport type {DragAndDropHooks} from '@react-spectrum/dnd';\nimport React, {JSX, ReactElement} from 'react';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableView} from './TableView';\nimport {TreeGridTableView} from './TreeGridTableView';\n\nexport interface SpectrumTableProps<T> extends TableProps<T>, SpectrumSelectionProps, DOMProps, AriaLabelingProps, StyleProps {\n /**\n * Sets the amount of vertical padding within each cell.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /**\n * Sets the overflow behavior for the cell contents.\n * @default 'truncate'\n */\n overflowMode?: 'wrap' | 'truncate',\n /** Whether the TableView should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Sets what the TableView should render when there is no content to display. */\n renderEmptyState?: () => JSX.Element,\n /**\n * Whether `disabledKeys` applies to all interactions, or only selection.\n * @default \"selection\"\n */\n disabledBehavior?: DisabledBehavior,\n /** Handler that is called when a user performs an action on a row. */\n onAction?: (key: Key) => void,\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 * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the TableView.\n * @version beta\n */\n dragAndDropHooks?: DragAndDropHooks['dragAndDropHooks'],\n /**\n * Whether the TableView should support expandable rows. Requires the feature flag to be enabled first, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_allowsExpandableRows?: boolean,\n /**\n * The currently expanded keys in the collection (controlled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_expandedKeys?: 'all' | Iterable<Key>,\n /**\n * The initial expanded keys in the collection (uncontrolled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_defaultExpandedKeys?: 'all' | Iterable<Key>,\n /**\n * Handler that is called when items are expanded or collapsed. Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_onExpandedChange?: (keys: Set<Key>) => any\n}\n\n/**\n * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.\n */\nconst TableViewWrapper = React.forwardRef(function TableViewWrapper<T extends object>(props: SpectrumTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {UNSTABLE_allowsExpandableRows, ...otherProps} = props;\n if (tableNestedRows() && UNSTABLE_allowsExpandableRows) {\n return <TreeGridTableView {...otherProps} ref={ref} />;\n } else {\n return <TableView {...otherProps} ref={ref} />;\n }\n}) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {TableViewWrapper as TableView};\n"],"names":[],"version":3,"file":"TableViewWrapper.module.js.map"}
|
|
@@ -25,7 +25,7 @@ $parcel$export(module.exports, "TreeGridTableView", () => $e770cde7e93c7e49$expo
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const $e770cde7e93c7e49$export$5669566ac2c90964 = /*#__PURE__*/ (0, ($parcel$interopDefault($5aNwD$react))).forwardRef(function TreeGridTableView(props, ref) {
|
|
29
29
|
let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
|
|
30
30
|
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $5aNwD$react.useState)(selectionStyle !== 'highlight');
|
|
31
31
|
let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
@@ -43,8 +43,7 @@ function $e770cde7e93c7e49$var$TreeGridTableView(props, ref) {
|
|
|
43
43
|
state: state,
|
|
44
44
|
ref: ref
|
|
45
45
|
});
|
|
46
|
-
}
|
|
47
|
-
const $e770cde7e93c7e49$export$5669566ac2c90964 = /*#__PURE__*/ (0, ($parcel$interopDefault($5aNwD$react))).forwardRef($e770cde7e93c7e49$var$TreeGridTableView);
|
|
46
|
+
});
|
|
48
47
|
|
|
49
48
|
|
|
50
49
|
//# sourceMappingURL=TreeGridTableView.main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAUM,MAAM,0DAAoB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,kBAAoC,KAA4B,EAAE,GAA2B;IACtJ,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,qBAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,kDAAwB,EAAE;QACpC,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,0DAAC,CAAA,GAAA,uCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD","sources":["packages/@react-spectrum/table/src/TreeGridTableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {UNSTABLE_useTreeGridState} from '@react-stately/table';\n\nexport interface TreeGridTableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nexport const TreeGridTableView = React.forwardRef(function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = UNSTABLE_useTreeGridState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"TreeGridTableView.main.js.map"}
|
|
@@ -15,7 +15,7 @@ import {UNSTABLE_useTreeGridState as $5KSRY$UNSTABLE_useTreeGridState} from "@re
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const $be90f60881eac8aa$export$5669566ac2c90964 = /*#__PURE__*/ (0, $5KSRY$react).forwardRef(function TreeGridTableView(props, ref) {
|
|
19
19
|
let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
|
|
20
20
|
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $5KSRY$useState)(selectionStyle !== 'highlight');
|
|
21
21
|
let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
@@ -33,8 +33,7 @@ function $be90f60881eac8aa$var$TreeGridTableView(props, ref) {
|
|
|
33
33
|
state: state,
|
|
34
34
|
ref: ref
|
|
35
35
|
});
|
|
36
|
-
}
|
|
37
|
-
const $be90f60881eac8aa$export$5669566ac2c90964 = /*#__PURE__*/ (0, $5KSRY$react).forwardRef($be90f60881eac8aa$var$TreeGridTableView);
|
|
36
|
+
});
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
export {$be90f60881eac8aa$export$5669566ac2c90964 as TreeGridTableView};
|
|
@@ -15,7 +15,7 @@ import {UNSTABLE_useTreeGridState as $5KSRY$UNSTABLE_useTreeGridState} from "@re
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const $be90f60881eac8aa$export$5669566ac2c90964 = /*#__PURE__*/ (0, $5KSRY$react).forwardRef(function TreeGridTableView(props, ref) {
|
|
19
19
|
let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
|
|
20
20
|
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $5KSRY$useState)(selectionStyle !== 'highlight');
|
|
21
21
|
let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
@@ -33,8 +33,7 @@ function $be90f60881eac8aa$var$TreeGridTableView(props, ref) {
|
|
|
33
33
|
state: state,
|
|
34
34
|
ref: ref
|
|
35
35
|
});
|
|
36
|
-
}
|
|
37
|
-
const $be90f60881eac8aa$export$5669566ac2c90964 = /*#__PURE__*/ (0, $5KSRY$react).forwardRef($be90f60881eac8aa$var$TreeGridTableView);
|
|
36
|
+
});
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
export {$be90f60881eac8aa$export$5669566ac2c90964 as TreeGridTableView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAUM,MAAM,0DAAoB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,kBAAoC,KAA4B,EAAE,GAA2B;IACtJ,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,eAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,gCAAwB,EAAE;QACpC,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,gCAAC,CAAA,GAAA,yCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD","sources":["packages/@react-spectrum/table/src/TreeGridTableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {UNSTABLE_useTreeGridState} from '@react-stately/table';\n\nexport interface TreeGridTableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nexport const TreeGridTableView = React.forwardRef(function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = UNSTABLE_useTreeGridState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"TreeGridTableView.module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;ASoBA,oCAAoC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,EAAE,sBAAsB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU;IAC3H;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC7C;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACnC,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,IAAI,OAAO,CAAC;IACrC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAClD;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,IAAI,CAA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UAAU,CAAC,KAAK,IAAI,CAAC;IACrD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;IACxD;;;;OAIG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC9C;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IACrD;;;;;OAKG;IACH,yBAAyB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,GAAG,CAAA;CACpD;AAED;;GAEG;AACH,OAAA,MAAM,WAOA,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,OAAO,cAAc,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;ACjFzF,OAAA,MAAM,QAA2B,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,KAAK,IAAI,OAAO,CAAC;AAGnF,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,GAAG,EACH,IAAI,EACL,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAC,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,oBAAoB,CAAC","sources":["packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/InsertionIndicator.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/Nubbin.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/Resizer.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/RootDropIndicator.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/DragPreview.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableViewLayout.ts","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableViewBase.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableView.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TreeGridTableView.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableViewWrapper.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/index.ts","packages/@react-spectrum/table/src/index.ts"],"sourcesContent":[null,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\n/// <reference types=\"css-module-types\" />\n\nexport {TableView} from './TableViewWrapper';\nimport {Column} from '@react-stately/table';\nimport {JSX} from 'react';\nimport {SpectrumColumnProps} from '@react-types/table';\n\n// Override TS for Column to support spectrum specific props.\nconst SpectrumColumn = Column as <T>(props: SpectrumColumnProps<T>) => JSX.Element;\nexport {SpectrumColumn as Column};\n\nexport {\n TableHeader,\n TableBody,\n Section,\n Row,\n Cell\n} from '@react-stately/table';\n\nexport type {SpectrumColumnProps, TableHeaderProps, TableBodyProps, RowProps, CellProps} from '@react-types/table';\nexport type {SpectrumTableProps} from './TableViewWrapper';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
|
@@ -779,9 +779,9 @@ svg.hm005a_spectrum-Table-sortedIcon {
|
|
|
779
779
|
|
|
780
780
|
.hm005a_spectrum-Table-body.hm005a_focus-ring:after {
|
|
781
781
|
content: "";
|
|
782
|
-
box-shadow: inset 0 0 0 2px var(--spectrum-table-cell-border-color-key-focus, var(--spectrum-alias-border-color-focus));
|
|
783
782
|
width: 100%;
|
|
784
783
|
height: 100%;
|
|
784
|
+
box-shadow: inset 0 0 0 2px var(--spectrum-table-cell-border-color-key-focus, var(--spectrum-alias-border-color-focus));
|
|
785
785
|
position: absolute;
|
|
786
786
|
top: 0;
|
|
787
787
|
left: 0;
|
|
@@ -989,4 +989,4 @@ tbody.hm005a_spectrum-Table-body .hm005a_spectrum-Table-row:last-child .hm005a_s
|
|
|
989
989
|
--spectrum-table-background-color: transparent;
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
|
-
/*# sourceMappingURL=vars.
|
|
992
|
+
/*# sourceMappingURL=vars.27f08d5f.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;AAUA;;;;;;;;;AAYA;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;AAQA;;;;;;;;;;;;;AAYE;;;;AAME;;;;;AAQA;;;;AAIF;;;;AAEE;;;;;AAIA;;;;;;;AAWJ;;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAUE;;;;;;;;AAQA;;;;AAMF;;;;;;;;;AAQA;;;;;;;;AAQA;;;;AAIA;;;;AAOE;;;;;;;AAWF;;;;;;;;;AAWE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AASA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAMJ;;;;AAIA;;;;AAIA;;;;AAIA;;;;;;;;AAQE;;;;;;;AAQF;;;;;;;;;;;AAgBA;;;;;;;;;;;AAWI;;;;AAGA;;;;AAMJ;;;;;AAKA;;;;AAIA;;;;AAKE;;;;AAQE;;;;;;;;AAJF;;;;AAIE;;;;;;;;AAiBJ;;;;;AAKA;;;;;;;;AAQA;;;;;;;;AAQA;;;;;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IA;;;;;AAOJ;;;;AAIA;EACE;;;;;;;;;;;;;;;;EAkBI;;;;EASA","sources":["packages/@adobe/spectrum-css-temp/components/table/vars.css"],"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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.
|
|
1
|
+
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;AAUA;;;;;;;;;AAYA;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;AAQA;;;;;;;;;;;;;AAYE;;;;AAME;;;;;AAQA;;;;AAIF;;;;AAEE;;;;;AAIA;;;;;;;AAWJ;;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAUE;;;;;;;;AAQA;;;;AAMF;;;;;;;;;AAQA;;;;;;;;AAQA;;;;AAIA;;;;AAOE;;;;;;;AAWF;;;;;;;;;AAWE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AASA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAMJ;;;;AAIA;;;;AAIA;;;;AAIA;;;;;;;;AAQE;;;;;;;AAQF;;;;;;;;;;;AAgBA;;;;;;;;;;;AAWI;;;;AAGA;;;;AAMJ;;;;;AAKA;;;;AAIA;;;;AAKE;;;;AAQE;;;;;;;;AAJF;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AAIA;;;;AAIA;;;;AAQF;;;;;AASF;;;;AAOE;;;;AAOF;;;;AAOE;;;;;AAIA;;;;;AAOJ;;;;AAIA;EACE;;;;;;;;;;;;;;;;EAkBI;;;;EASA","sources":["packages/@adobe/spectrum-css-temp/components/table/vars.css"],"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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.27f08d5f.css.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/table",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,31 +36,31 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/button": "^3.
|
|
40
|
-
"@react-aria/focus": "^3.
|
|
41
|
-
"@react-aria/i18n": "^3.12.
|
|
42
|
-
"@react-aria/interactions": "^3.
|
|
43
|
-
"@react-aria/overlays": "^3.
|
|
44
|
-
"@react-aria/selection": "^3.
|
|
45
|
-
"@react-aria/table": "^3.
|
|
46
|
-
"@react-aria/utils": "^3.
|
|
47
|
-
"@react-aria/virtualizer": "^4.1.
|
|
48
|
-
"@react-aria/visually-hidden": "^3.8.
|
|
49
|
-
"@react-spectrum/checkbox": "^3.9.
|
|
50
|
-
"@react-spectrum/dnd": "^3.5.
|
|
51
|
-
"@react-spectrum/layout": "^3.6.
|
|
52
|
-
"@react-spectrum/menu": "^3.21.
|
|
53
|
-
"@react-spectrum/progress": "^3.7.
|
|
54
|
-
"@react-spectrum/tooltip": "^3.7.
|
|
55
|
-
"@react-spectrum/utils": "^3.12.
|
|
56
|
-
"@react-stately/flags": "^3.0
|
|
57
|
-
"@react-stately/layout": "^4.
|
|
58
|
-
"@react-stately/table": "^3.
|
|
59
|
-
"@react-stately/virtualizer": "^4.
|
|
60
|
-
"@react-types/grid": "^3.
|
|
61
|
-
"@react-types/shared": "^3.
|
|
62
|
-
"@react-types/table": "^3.
|
|
63
|
-
"@spectrum-icons/ui": "^3.6.
|
|
39
|
+
"@react-aria/button": "^3.12.0",
|
|
40
|
+
"@react-aria/focus": "^3.20.0",
|
|
41
|
+
"@react-aria/i18n": "^3.12.6",
|
|
42
|
+
"@react-aria/interactions": "^3.24.0",
|
|
43
|
+
"@react-aria/overlays": "^3.26.0",
|
|
44
|
+
"@react-aria/selection": "^3.23.0",
|
|
45
|
+
"@react-aria/table": "^3.17.0",
|
|
46
|
+
"@react-aria/utils": "^3.28.0",
|
|
47
|
+
"@react-aria/virtualizer": "^4.1.2",
|
|
48
|
+
"@react-aria/visually-hidden": "^3.8.20",
|
|
49
|
+
"@react-spectrum/checkbox": "^3.9.13",
|
|
50
|
+
"@react-spectrum/dnd": "^3.5.2",
|
|
51
|
+
"@react-spectrum/layout": "^3.6.12",
|
|
52
|
+
"@react-spectrum/menu": "^3.21.2",
|
|
53
|
+
"@react-spectrum/progress": "^3.7.13",
|
|
54
|
+
"@react-spectrum/tooltip": "^3.7.2",
|
|
55
|
+
"@react-spectrum/utils": "^3.12.2",
|
|
56
|
+
"@react-stately/flags": "^3.1.0",
|
|
57
|
+
"@react-stately/layout": "^4.2.0",
|
|
58
|
+
"@react-stately/table": "^3.14.0",
|
|
59
|
+
"@react-stately/virtualizer": "^4.3.0",
|
|
60
|
+
"@react-types/grid": "^3.3.0",
|
|
61
|
+
"@react-types/shared": "^3.28.0",
|
|
62
|
+
"@react-types/table": "^3.11.0",
|
|
63
|
+
"@spectrum-icons/ui": "^3.6.13",
|
|
64
64
|
"@swc/helpers": "^0.5.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "4d3c72c94eea2d72eb3a0e7d56000c6ef7e39726"
|
|
80
80
|
}
|
package/src/Resizer.tsx
CHANGED
|
@@ -48,7 +48,7 @@ const CURSORS = {
|
|
|
48
48
|
|
|
49
49
|
export const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);
|
|
50
50
|
|
|
51
|
-
function Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement | null>) {
|
|
51
|
+
export const Resizer = React.forwardRef(function Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement | null>) {
|
|
52
52
|
let {column, showResizer} = props;
|
|
53
53
|
let objectRef = useObjectRef(ref);
|
|
54
54
|
let {isEmpty, onFocusedResizer} = useTableContext();
|
|
@@ -128,13 +128,10 @@ function Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement |
|
|
|
128
128
|
</CursorOverlay>
|
|
129
129
|
</>
|
|
130
130
|
);
|
|
131
|
-
}
|
|
131
|
+
});
|
|
132
132
|
|
|
133
133
|
function CursorOverlay(props) {
|
|
134
134
|
let {show, children} = props;
|
|
135
135
|
let {getContainer} = useUNSTABLE_PortalContext();
|
|
136
136
|
return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;
|
|
137
137
|
}
|
|
138
|
-
|
|
139
|
-
const _Resizer = React.forwardRef(Resizer);
|
|
140
|
-
export {_Resizer as Resizer};
|
package/src/TableView.tsx
CHANGED
|
@@ -18,7 +18,7 @@ import {useTableState} from '@react-stately/table';
|
|
|
18
18
|
|
|
19
19
|
interface TableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}
|
|
20
20
|
|
|
21
|
-
function TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivElement>) {
|
|
21
|
+
export const TableView = React.forwardRef(function TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivElement>) {
|
|
22
22
|
let {
|
|
23
23
|
selectionStyle,
|
|
24
24
|
dragAndDropHooks
|
|
@@ -41,7 +41,4 @@ function TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivEl
|
|
|
41
41
|
return (
|
|
42
42
|
<TableViewBase {...props} state={state} ref={ref} />
|
|
43
43
|
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const _TableView = React.forwardRef(TableView) as <T>(props: TableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
|
|
47
|
-
export {_TableView as TableView};
|
|
44
|
+
}) as <T>(props: TableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
|
package/src/TableViewBase.tsx
CHANGED
|
@@ -337,7 +337,7 @@ function TableViewBase<T extends object>(props: TableBaseProps<T>, ref: DOMRef<H
|
|
|
337
337
|
<div
|
|
338
338
|
role="gridcell"
|
|
339
339
|
aria-colindex={item.index + 1}
|
|
340
|
-
aria-colspan={item.
|
|
340
|
+
aria-colspan={item.colSpan != null && item.colSpan > 1 ? item.colSpan : undefined} />
|
|
341
341
|
);
|
|
342
342
|
case 'column':
|
|
343
343
|
if (item.props.isSelectionCell) {
|
|
@@ -783,7 +783,7 @@ function TableColumnHeader(props) {
|
|
|
783
783
|
stylesOverrides,
|
|
784
784
|
'react-spectrum-Table-cell',
|
|
785
785
|
{
|
|
786
|
-
'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center' || column.
|
|
786
|
+
'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center' || column.colSpan > 1,
|
|
787
787
|
'react-spectrum-Table-cell--alignEnd': columnProps.align === 'end'
|
|
788
788
|
}
|
|
789
789
|
)
|
|
@@ -914,7 +914,7 @@ function ResizableTableColumnHeader(props) {
|
|
|
914
914
|
let showResizer = !isEmpty && ((headerRowHovered && getInteractionModality() !== 'keyboard') || resizingColumn != null);
|
|
915
915
|
let alignment = 'start';
|
|
916
916
|
let menuAlign = 'start' as 'start' | 'end';
|
|
917
|
-
if (columnProps.align === 'center' || column.
|
|
917
|
+
if (columnProps.align === 'center' || column.colSpan > 1) {
|
|
918
918
|
alignment = 'center';
|
|
919
919
|
} else if (columnProps.align === 'end') {
|
|
920
920
|
alignment = 'end';
|
package/src/TableViewWrapper.tsx
CHANGED
|
@@ -89,18 +89,15 @@ export interface SpectrumTableProps<T> extends TableProps<T>, SpectrumSelectionP
|
|
|
89
89
|
UNSTABLE_onExpandedChange?: (keys: Set<Key>) => any
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
|
|
94
|
+
*/
|
|
95
|
+
const TableViewWrapper = React.forwardRef(function TableViewWrapper<T extends object>(props: SpectrumTableProps<T>, ref: DOMRef<HTMLDivElement>) {
|
|
93
96
|
let {UNSTABLE_allowsExpandableRows, ...otherProps} = props;
|
|
94
97
|
if (tableNestedRows() && UNSTABLE_allowsExpandableRows) {
|
|
95
98
|
return <TreeGridTableView {...otherProps} ref={ref} />;
|
|
96
99
|
} else {
|
|
97
100
|
return <TableView {...otherProps} ref={ref} />;
|
|
98
101
|
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
|
|
103
|
-
*/
|
|
104
|
-
const _TableViewWrapper = React.forwardRef(TableViewWrapper) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
|
|
105
|
-
|
|
106
|
-
export {_TableViewWrapper as TableView};
|
|
102
|
+
}) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
|
|
103
|
+
export {TableViewWrapper as TableView};
|
|
@@ -18,7 +18,7 @@ import {UNSTABLE_useTreeGridState} from '@react-stately/table';
|
|
|
18
18
|
|
|
19
19
|
export interface TreeGridTableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}
|
|
20
20
|
|
|
21
|
-
function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {
|
|
21
|
+
export const TreeGridTableView = React.forwardRef(function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {
|
|
22
22
|
let {
|
|
23
23
|
selectionStyle,
|
|
24
24
|
dragAndDropHooks
|
|
@@ -41,7 +41,4 @@ function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref:
|
|
|
41
41
|
return (
|
|
42
42
|
<TableViewBase {...props} state={state} ref={ref} />
|
|
43
43
|
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const _TreeGridTableView = React.forwardRef(TreeGridTableView) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
|
|
47
|
-
export {_TreeGridTableView as TreeGridTableView};
|
|
44
|
+
}) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
|