@react-spectrum/table 3.13.2-nightly.4743 → 3.13.2-nightly.4979

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,4 +1,4 @@
1
- require("./vars.42570ef3.css");
1
+ require("./vars.ce47d5ba.css");
2
2
  var $982885d0a34882ea$exports = require("./table_vars_css.main.js");
3
3
  require("./table.b13eee90.css");
4
4
  var $4afcd54cfd94dbb9$exports = require("./table_css.main.js");
@@ -1,4 +1,4 @@
1
- import "./vars.42570ef3.css";
1
+ import "./vars.ce47d5ba.css";
2
2
  import $9Othb$table_vars_cssmodulejs from "./table_vars_css.mjs";
3
3
  import "./table.b13eee90.css";
4
4
  import $9Othb$table_cssmodulejs from "./table_css.mjs";
@@ -1,4 +1,4 @@
1
- import "./vars.42570ef3.css";
1
+ import "./vars.ce47d5ba.css";
2
2
  import $9Othb$table_vars_cssmodulejs from "./table_vars_css.module.js";
3
3
  import "./table.b13eee90.css";
4
4
  import $9Othb$table_cssmodulejs from "./table_css.module.js";
@@ -1,5 +1,5 @@
1
1
  var $1a3d6ad53eb75d54$exports = require("./intlStrings.main.js");
2
- require("./vars.42570ef3.css");
2
+ require("./vars.ce47d5ba.css");
3
3
  var $982885d0a34882ea$exports = require("./table_vars_css.main.js");
4
4
  var $e39c6de4eb69450d$exports = require("./TableViewBase.main.js");
5
5
  var $hxFQC$reactspectrumutils = require("@react-spectrum/utils");
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAoD;;ACApD,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;AHwBjB,SAAS,gCAAU,GAAW,EAAE,QAAgB;IAC9C,kGAAkG;IAClG,uGAAuG;IACvG,kFAAkF;IAClF,IAAI,CAAA,GAAA,8BAAO,KACT,OAAO,CAAC,kCAAkC,EAAE,mBAAmB,KAAK,+BAA+B,EAAE,mBAAmB,IAAI,OAAO,C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BAAG;QAAM;;AAIpF;AAEA,SAAS,oCAAc,KAAK;IAC1B,IAAI,QAAC,IAAI,YAAE,QAAQ,EAAC,GAAG;IACvB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,kDAAwB;QACC;IAA9C,OAAO,qBAAO,CAAA,GAAA,yCAAO,EAAE,YAAY,CAAC,UAAU,CAAA,gBAAA,yBAAA,mCAAA,4BAAA,2BAAA,gBAAoB,SAAS,IAAI,IAAI;AACrF;AAEA,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/Resizer.tsx","node_modules/@parcel/runtime-js/lib/bundles/runtime-041bd783ad0660b4.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-8e8d37d2cf10eebe.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-cba9561fd7f119d5.js"],"sourcesContent":["/* eslint-disable jsx-a11y/role-supports-aria-props */\nimport {classNames} from '@react-spectrum/utils';\nimport {ColumnSize} from '@react-types/table';\n// @ts-ignore\nimport eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';\n// @ts-ignore\nimport ewCursor from 'bundle-text:./cursors/Cur_MoveHorizontal_9_9.svg';\nimport {FocusRing} from '@react-aria/focus';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isWebKit, mergeProps} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, useContext, useEffect, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport {TableColumnResizeState} from '@react-stately/table';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTableColumnResize} from '@react-aria/table';\nimport {useTableContext, useVirtualizerContext} from './TableViewBase';\nimport {useUNSTABLE_PortalContext} from '@react-aria/overlays';\n// @ts-ignore\nimport wCursor from 'bundle-text:./cursors/Cur_MoveToLeft_9_9.svg';\n\nfunction getCursor(svg: string, fallback: string) {\n // WebKit renders SVG cursors blurry on 2x screens: https://bugs.webkit.org/show_bug.cgi?id=160657\n // To work around this, we generate two SVGs at different sizes and use image-set to pick between them.\n // Only do this in WebKit to avoid Firefox rendering the cursor at twice the size.\n if (isWebKit()) {\n return `image-set(url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 1x, url(\"data:image/svg+xml,${encodeURIComponent(svg.replace('width=\"32\" height=\"32\"', 'width=\"64\" height=\"64\"'))}\") 2x) 8 8, ${fallback}`;\n } else {\n return `url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 8 8, ${fallback}`;\n }\n}\n\ninterface ResizerProps<T> {\n column: GridNode<T>,\n showResizer: boolean,\n triggerRef: RefObject<HTMLDivElement | null>,\n onResizeStart: (widths: Map<Key, ColumnSize>) => void,\n onResize: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst CURSORS = {\n ew: getCursor(ewCursor, 'ew-resize'),\n w: getCursor(wCursor, 'w-resize'),\n e: getCursor(eCursor, 'e-resize')\n};\n\nexport const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nfunction Resizer<T>(props: ResizerProps<T>, ref: RefObject<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let {isEmpty, onFocusedResizer} = useTableContext();\n let layout = useContext(ResizeStateContext)!;\n // Virtualizer re-renders, but these components are all cached\n // in order to get around that and cause a rerender here, we use context\n // but we don't actually need any value, they are available on the layout object\n useVirtualizerContext();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {direction} = useLocale();\n\n let [isPointerDown, setIsPointerDown] = useState(false);\n useEffect(() => {\n let setDown = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(true);\n }\n };\n let setUp = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(false);\n }\n };\n document.addEventListener('pointerdown', setDown, {capture: true});\n document.addEventListener('pointerup', setUp, {capture: true});\n return () => {\n document.removeEventListener('pointerdown', setDown, {capture: true});\n document.removeEventListener('pointerup', setUp, {capture: true});\n };\n }, []);\n\n let {inputProps, resizerProps} = useTableColumnResize<unknown>(\n mergeProps(props, {\n 'aria-label': stringFormatter.format('columnResizer'),\n isDisabled: isEmpty\n }), layout, ref);\n\n let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);\n let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);\n let isResizing = layout.resizingColumn === column.key;\n let cursor = '';\n if (isEResizable) {\n cursor = direction === 'rtl' ? CURSORS.w : CURSORS.e;\n } else if (isWResizable) {\n cursor = direction === 'rtl' ? CURSORS.e : CURSORS.w;\n } else {\n cursor = CURSORS.ew;\n }\n\n let style = {\n ...resizerProps.style,\n height: '100%',\n display: showResizer ? undefined : 'none',\n cursor\n };\n\n return (\n <>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...resizerProps}\n role=\"presentation\"\n style={style}\n className={classNames(styles, 'spectrum-Table-columnResizer')}>\n <input\n ref={ref}\n {...mergeProps(inputProps, {onFocus: onFocusedResizer})} />\n </div>\n </FocusRing>\n {/* Placeholder so that the title doesn't intersect with space reserved by the resizer when it appears. */}\n <div\n aria-hidden\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-columnResizerPlaceholder')} />\n <CursorOverlay show={isResizing && isPointerDown}>\n <div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />\n </CursorOverlay>\n </>\n );\n}\n\nfunction CursorOverlay(props) {\n let {show, children} = props;\n let {getContainer} = useUNSTABLE_PortalContext();\n return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;\n}\n\nconst _Resizer = React.forwardRef(Resizer);\nexport {_Resizer as Resizer};\n","module.exports = \"fd8e59d99cf6255b\";","module.exports = \"c65a0be4a6d17c91\";","module.exports = \"d9395620b1a0eaaa\";"],"names":[],"version":3,"file":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AAA,GAAA,mDAAK,GAAG;qBAC9B,0DAAC;QACC,KAAK;QACJ,GAAG,CAAA,GAAA,gCAAS,EAAE,YAAY;YAAC,SAAS;QAAgB,EAAE;wBAI7D,0DAAC;QACC,eAAA;QACA,MAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;sBAChC,0DAAC;QAAc,MAAM,cAAc;qBACjC,0DAAC;QAAI,OAAO;YAAC,UAAU;YAAS,KAAK;YAAG,MAAM;YAAG,QAAQ;YAAG,OAAO;oBAAG;QAAM;;AAIpF;AAEA,SAAS,oCAAc,KAAK;IAC1B,IAAI,QAAC,IAAI,YAAE,QAAQ,EAAC,GAAG;IACvB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,kDAAwB;QACC;IAA9C,OAAO,qBAAO,CAAA,GAAA,yCAAO,EAAE,YAAY,CAAC,UAAU,CAAA,gBAAA,yBAAA,mCAAA,4BAAA,2BAAA,gBAAoB,SAAS,IAAI,IAAI;AACrF;AAEA,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/Resizer.tsx","node_modules/@parcel/runtime-js/lib/bundles/runtime-041bd783ad0660b4.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-8e8d37d2cf10eebe.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-cba9561fd7f119d5.js"],"sourcesContent":["/* eslint-disable jsx-a11y/role-supports-aria-props */\nimport {classNames} from '@react-spectrum/utils';\nimport {ColumnSize} from '@react-types/table';\nimport eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';\nimport ewCursor from 'bundle-text:./cursors/Cur_MoveHorizontal_9_9.svg';\nimport {FocusRing} from '@react-aria/focus';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isWebKit, mergeProps} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, useContext, useEffect, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport {TableColumnResizeState} from '@react-stately/table';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTableColumnResize} from '@react-aria/table';\nimport {useTableContext, useVirtualizerContext} from './TableViewBase';\nimport {useUNSTABLE_PortalContext} from '@react-aria/overlays';\n// @ts-ignore\nimport wCursor from 'bundle-text:./cursors/Cur_MoveToLeft_9_9.svg';\n\nfunction getCursor(svg: string, fallback: string) {\n // WebKit renders SVG cursors blurry on 2x screens: https://bugs.webkit.org/show_bug.cgi?id=160657\n // To work around this, we generate two SVGs at different sizes and use image-set to pick between them.\n // Only do this in WebKit to avoid Firefox rendering the cursor at twice the size.\n if (isWebKit()) {\n return `image-set(url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 1x, url(\"data:image/svg+xml,${encodeURIComponent(svg.replace('width=\"32\" height=\"32\"', 'width=\"64\" height=\"64\"'))}\") 2x) 8 8, ${fallback}`;\n } else {\n return `url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 8 8, ${fallback}`;\n }\n}\n\ninterface ResizerProps<T> {\n column: GridNode<T>,\n showResizer: boolean,\n triggerRef: RefObject<HTMLDivElement | null>,\n onResizeStart: (widths: Map<Key, ColumnSize>) => void,\n onResize: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst CURSORS = {\n ew: getCursor(ewCursor, 'ew-resize'),\n w: getCursor(wCursor, 'w-resize'),\n e: getCursor(eCursor, 'e-resize')\n};\n\nexport const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nfunction Resizer<T>(props: ResizerProps<T>, ref: RefObject<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let {isEmpty, onFocusedResizer} = useTableContext();\n let layout = useContext(ResizeStateContext)!;\n // Virtualizer re-renders, but these components are all cached\n // in order to get around that and cause a rerender here, we use context\n // but we don't actually need any value, they are available on the layout object\n useVirtualizerContext();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {direction} = useLocale();\n\n let [isPointerDown, setIsPointerDown] = useState(false);\n useEffect(() => {\n let setDown = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(true);\n }\n };\n let setUp = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(false);\n }\n };\n document.addEventListener('pointerdown', setDown, {capture: true});\n document.addEventListener('pointerup', setUp, {capture: true});\n return () => {\n document.removeEventListener('pointerdown', setDown, {capture: true});\n document.removeEventListener('pointerup', setUp, {capture: true});\n };\n }, []);\n\n let {inputProps, resizerProps} = useTableColumnResize<unknown>(\n mergeProps(props, {\n 'aria-label': stringFormatter.format('columnResizer'),\n isDisabled: isEmpty\n }), layout, ref);\n\n let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);\n let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);\n let isResizing = layout.resizingColumn === column.key;\n let cursor = '';\n if (isEResizable) {\n cursor = direction === 'rtl' ? CURSORS.w : CURSORS.e;\n } else if (isWResizable) {\n cursor = direction === 'rtl' ? CURSORS.e : CURSORS.w;\n } else {\n cursor = CURSORS.ew;\n }\n\n let style = {\n ...resizerProps.style,\n height: '100%',\n display: showResizer ? undefined : 'none',\n cursor\n };\n\n return (\n <>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...resizerProps}\n role=\"presentation\"\n style={style}\n className={classNames(styles, 'spectrum-Table-columnResizer')}>\n <input\n ref={ref}\n {...mergeProps(inputProps, {onFocus: onFocusedResizer})} />\n </div>\n </FocusRing>\n {/* Placeholder so that the title doesn't intersect with space reserved by the resizer when it appears. */}\n <div\n aria-hidden\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-columnResizerPlaceholder')} />\n <CursorOverlay show={isResizing && isPointerDown}>\n <div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />\n </CursorOverlay>\n </>\n );\n}\n\nfunction CursorOverlay(props) {\n let {show, children} = props;\n let {getContainer} = useUNSTABLE_PortalContext();\n return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;\n}\n\nconst _Resizer = React.forwardRef(Resizer);\nexport {_Resizer as Resizer};\n","module.exports = \"fd8e59d99cf6255b\";","module.exports = \"c65a0be4a6d17c91\";","module.exports = \"d9395620b1a0eaaa\";"],"names":[],"version":3,"file":"Resizer.main.js.map"}
package/dist/Resizer.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import $dIfdp$intlStringsmodulejs from "./intlStrings.mjs";
2
- import "./vars.42570ef3.css";
2
+ import "./vars.ce47d5ba.css";
3
3
  import $dIfdp$table_vars_cssmodulejs from "./table_vars_css.mjs";
4
4
  import {useTableContext as $bd013581c0a4b065$export$3cb274deb6c2d854, useVirtualizerContext as $bd013581c0a4b065$export$3f8f74b6bfd2c5df} from "./TableViewBase.mjs";
5
5
  import {classNames as $dIfdp$classNames} from "@react-spectrum/utils";
@@ -1,5 +1,5 @@
1
1
  import $dIfdp$intlStringsmodulejs from "./intlStrings.module.js";
2
- import "./vars.42570ef3.css";
2
+ import "./vars.ce47d5ba.css";
3
3
  import $dIfdp$table_vars_cssmodulejs from "./table_vars_css.module.js";
4
4
  import {useTableContext as $bd013581c0a4b065$export$3cb274deb6c2d854, useVirtualizerContext as $bd013581c0a4b065$export$3f8f74b6bfd2c5df} from "./TableViewBase.module.js";
5
5
  import {classNames as $dIfdp$classNames} from "@react-spectrum/utils";
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAoD;;ACApD,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;AHwBjB,SAAS,gCAAU,GAAW,EAAE,QAAgB;IAC9C,kGAAkG;IAClG,uGAAuG;IACvG,kFAAkF;IAClF,IAAI,CAAA,GAAA,eAAO,KACT,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;QAAI,OAAO;YAAC,UAAU;YAAS,KAAK;YAAG,MAAM;YAAG,QAAQ;YAAG,OAAO;oBAAG;QAAM;;AAIpF;AAEA,SAAS,oCAAc,KAAK;IAC1B,IAAI,QAAC,IAAI,YAAE,QAAQ,EAAC,GAAG;IACvB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,gCAAwB;QACC;IAA9C,OAAO,qBAAO,CAAA,GAAA,eAAO,EAAE,YAAY,CAAC,UAAU,CAAA,gBAAA,yBAAA,mCAAA,4BAAA,2BAAA,gBAAoB,SAAS,IAAI,IAAI;AACrF;AAEA,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/Resizer.tsx","node_modules/@parcel/runtime-js/lib/bundles/runtime-a4d2d5b24236251c.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-3b74b2254c084d90.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-363f6d14626169ea.js"],"sourcesContent":["/* eslint-disable jsx-a11y/role-supports-aria-props */\nimport {classNames} from '@react-spectrum/utils';\nimport {ColumnSize} from '@react-types/table';\n// @ts-ignore\nimport eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';\n// @ts-ignore\nimport ewCursor from 'bundle-text:./cursors/Cur_MoveHorizontal_9_9.svg';\nimport {FocusRing} from '@react-aria/focus';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isWebKit, mergeProps} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, useContext, useEffect, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport {TableColumnResizeState} from '@react-stately/table';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTableColumnResize} from '@react-aria/table';\nimport {useTableContext, useVirtualizerContext} from './TableViewBase';\nimport {useUNSTABLE_PortalContext} from '@react-aria/overlays';\n// @ts-ignore\nimport wCursor from 'bundle-text:./cursors/Cur_MoveToLeft_9_9.svg';\n\nfunction getCursor(svg: string, fallback: string) {\n // WebKit renders SVG cursors blurry on 2x screens: https://bugs.webkit.org/show_bug.cgi?id=160657\n // To work around this, we generate two SVGs at different sizes and use image-set to pick between them.\n // Only do this in WebKit to avoid Firefox rendering the cursor at twice the size.\n if (isWebKit()) {\n return `image-set(url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 1x, url(\"data:image/svg+xml,${encodeURIComponent(svg.replace('width=\"32\" height=\"32\"', 'width=\"64\" height=\"64\"'))}\") 2x) 8 8, ${fallback}`;\n } else {\n return `url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 8 8, ${fallback}`;\n }\n}\n\ninterface ResizerProps<T> {\n column: GridNode<T>,\n showResizer: boolean,\n triggerRef: RefObject<HTMLDivElement | null>,\n onResizeStart: (widths: Map<Key, ColumnSize>) => void,\n onResize: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst CURSORS = {\n ew: getCursor(ewCursor, 'ew-resize'),\n w: getCursor(wCursor, 'w-resize'),\n e: getCursor(eCursor, 'e-resize')\n};\n\nexport const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nfunction Resizer<T>(props: ResizerProps<T>, ref: RefObject<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let {isEmpty, onFocusedResizer} = useTableContext();\n let layout = useContext(ResizeStateContext)!;\n // Virtualizer re-renders, but these components are all cached\n // in order to get around that and cause a rerender here, we use context\n // but we don't actually need any value, they are available on the layout object\n useVirtualizerContext();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {direction} = useLocale();\n\n let [isPointerDown, setIsPointerDown] = useState(false);\n useEffect(() => {\n let setDown = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(true);\n }\n };\n let setUp = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(false);\n }\n };\n document.addEventListener('pointerdown', setDown, {capture: true});\n document.addEventListener('pointerup', setUp, {capture: true});\n return () => {\n document.removeEventListener('pointerdown', setDown, {capture: true});\n document.removeEventListener('pointerup', setUp, {capture: true});\n };\n }, []);\n\n let {inputProps, resizerProps} = useTableColumnResize<unknown>(\n mergeProps(props, {\n 'aria-label': stringFormatter.format('columnResizer'),\n isDisabled: isEmpty\n }), layout, ref);\n\n let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);\n let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);\n let isResizing = layout.resizingColumn === column.key;\n let cursor = '';\n if (isEResizable) {\n cursor = direction === 'rtl' ? CURSORS.w : CURSORS.e;\n } else if (isWResizable) {\n cursor = direction === 'rtl' ? CURSORS.e : CURSORS.w;\n } else {\n cursor = CURSORS.ew;\n }\n\n let style = {\n ...resizerProps.style,\n height: '100%',\n display: showResizer ? undefined : 'none',\n cursor\n };\n\n return (\n <>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...resizerProps}\n role=\"presentation\"\n style={style}\n className={classNames(styles, 'spectrum-Table-columnResizer')}>\n <input\n ref={ref}\n {...mergeProps(inputProps, {onFocus: onFocusedResizer})} />\n </div>\n </FocusRing>\n {/* Placeholder so that the title doesn't intersect with space reserved by the resizer when it appears. */}\n <div\n aria-hidden\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-columnResizerPlaceholder')} />\n <CursorOverlay show={isResizing && isPointerDown}>\n <div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />\n </CursorOverlay>\n </>\n );\n}\n\nfunction CursorOverlay(props) {\n let {show, children} = props;\n let {getContainer} = useUNSTABLE_PortalContext();\n return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;\n}\n\nconst _Resizer = React.forwardRef(Resizer);\nexport {_Resizer as Resizer};\n","module.exports = \"fb5e0424109df74c\";","module.ex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K;QACL,OAAO;QACP,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;qBAC9B,gCAAC;QACC,KAAK;QACJ,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY;YAAC,SAAS;QAAgB,EAAE;wBAI7D,gCAAC;QACC,eAAA;QACA,MAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;sBAChC,gCAAC;QAAc,MAAM,cAAc;qBACjC,gCAAC;QAAI,OAAO;YAAC,UAAU;YAAS,KAAK;YAAG,MAAM;YAAG,QAAQ;YAAG,OAAO;oBAAG;QAAM;;AAIpF;AAEA,SAAS,oCAAc,KAAK;IAC1B,IAAI,QAAC,IAAI,YAAE,QAAQ,EAAC,GAAG;IACvB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,gCAAwB;QACC;IAA9C,OAAO,qBAAO,CAAA,GAAA,eAAO,EAAE,YAAY,CAAC,UAAU,CAAA,gBAAA,yBAAA,mCAAA,4BAAA,2BAAA,gBAAoB,SAAS,IAAI,IAAI;AACrF;AAEA,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/Resizer.tsx","node_modules/@parcel/runtime-js/lib/bundles/runtime-a4d2d5b24236251c.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-3b74b2254c084d90.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-363f6d14626169ea.js"],"sourcesContent":["/* eslint-disable jsx-a11y/role-supports-aria-props */\nimport {classNames} from '@react-spectrum/utils';\nimport {ColumnSize} from '@react-types/table';\nimport eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';\nimport ewCursor from 'bundle-text:./cursors/Cur_MoveHorizontal_9_9.svg';\nimport {FocusRing} from '@react-aria/focus';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isWebKit, mergeProps} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, useContext, useEffect, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport {TableColumnResizeState} from '@react-stately/table';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTableColumnResize} from '@react-aria/table';\nimport {useTableContext, useVirtualizerContext} from './TableViewBase';\nimport {useUNSTABLE_PortalContext} from '@react-aria/overlays';\n// @ts-ignore\nimport wCursor from 'bundle-text:./cursors/Cur_MoveToLeft_9_9.svg';\n\nfunction getCursor(svg: string, fallback: string) {\n // WebKit renders SVG cursors blurry on 2x screens: https://bugs.webkit.org/show_bug.cgi?id=160657\n // To work around this, we generate two SVGs at different sizes and use image-set to pick between them.\n // Only do this in WebKit to avoid Firefox rendering the cursor at twice the size.\n if (isWebKit()) {\n return `image-set(url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 1x, url(\"data:image/svg+xml,${encodeURIComponent(svg.replace('width=\"32\" height=\"32\"', 'width=\"64\" height=\"64\"'))}\") 2x) 8 8, ${fallback}`;\n } else {\n return `url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 8 8, ${fallback}`;\n }\n}\n\ninterface ResizerProps<T> {\n column: GridNode<T>,\n showResizer: boolean,\n triggerRef: RefObject<HTMLDivElement | null>,\n onResizeStart: (widths: Map<Key, ColumnSize>) => void,\n onResize: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst CURSORS = {\n ew: getCursor(ewCursor, 'ew-resize'),\n w: getCursor(wCursor, 'w-resize'),\n e: getCursor(eCursor, 'e-resize')\n};\n\nexport const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nfunction Resizer<T>(props: ResizerProps<T>, ref: RefObject<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let {isEmpty, onFocusedResizer} = useTableContext();\n let layout = useContext(ResizeStateContext)!;\n // Virtualizer re-renders, but these components are all cached\n // in order to get around that and cause a rerender here, we use context\n // but we don't actually need any value, they are available on the layout object\n useVirtualizerContext();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {direction} = useLocale();\n\n let [isPointerDown, setIsPointerDown] = useState(false);\n useEffect(() => {\n let setDown = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(true);\n }\n };\n let setUp = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(false);\n }\n };\n document.addEventListener('pointerdown', setDown, {capture: true});\n document.addEventListener('pointerup', setUp, {capture: true});\n return () => {\n document.removeEventListener('pointerdown', setDown, {capture: true});\n document.removeEventListener('pointerup', setUp, {capture: true});\n };\n }, []);\n\n let {inputProps, resizerProps} = useTableColumnResize<unknown>(\n mergeProps(props, {\n 'aria-label': stringFormatter.format('columnResizer'),\n isDisabled: isEmpty\n }), layout, ref);\n\n let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);\n let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);\n let isResizing = layout.resizingColumn === column.key;\n let cursor = '';\n if (isEResizable) {\n cursor = direction === 'rtl' ? CURSORS.w : CURSORS.e;\n } else if (isWResizable) {\n cursor = direction === 'rtl' ? CURSORS.e : CURSORS.w;\n } else {\n cursor = CURSORS.ew;\n }\n\n let style = {\n ...resizerProps.style,\n height: '100%',\n display: showResizer ? undefined : 'none',\n cursor\n };\n\n return (\n <>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...resizerProps}\n role=\"presentation\"\n style={style}\n className={classNames(styles, 'spectrum-Table-columnResizer')}>\n <input\n ref={ref}\n {...mergeProps(inputProps, {onFocus: onFocusedResizer})} />\n </div>\n </FocusRing>\n {/* Placeholder so that the title doesn't intersect with space reserved by the resizer when it appears. */}\n <div\n aria-hidden\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-columnResizerPlaceholder')} />\n <CursorOverlay show={isResizing && isPointerDown}>\n <div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />\n </CursorOverlay>\n </>\n );\n}\n\nfunction CursorOverlay(props) {\n let {show, children} = props;\n let {getContainer} = useUNSTABLE_PortalContext();\n return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;\n}\n\nconst _Resizer = React.forwardRef(Resizer);\nexport {_Resizer as Resizer};\n","module.exports = \"fb5e0424109df74c\";","module.exports = \"b243267b2524b67c\";","module.exports = \"1fd435371c71f5bc\";"],"names":[],"version":3,"file":"Resizer.module.js.map"}
@@ -4,7 +4,7 @@ var $18b3deb5c431fa13$exports = require("./Nubbin.main.js");
4
4
  var $2877766f94c67a67$exports = require("./Resizer.main.js");
5
5
  var $4a98adf416b1ae5d$exports = require("./RootDropIndicator.main.js");
6
6
  var $f65d44d222cc509b$exports = require("./DragPreview.main.js");
7
- require("./vars.42570ef3.css");
7
+ require("./vars.ce47d5ba.css");
8
8
  var $982885d0a34882ea$exports = require("./table_vars_css.main.js");
9
9
  require("./table.b13eee90.css");
10
10
  var $4afcd54cfd94dbb9$exports = require("./table_css.main.js");
@@ -4,7 +4,7 @@ import {Nubbin as $cb7d341e8868d81d$export$d9658cdf8c86807} from "./Nubbin.mjs";
4
4
  import {Resizer as $fc695d2eafc2b351$export$48a76196cafe3b93, ResizeStateContext as $fc695d2eafc2b351$export$b517d84d4ad20b24} from "./Resizer.mjs";
5
5
  import {RootDropIndicator as $4e6fc36ba71ba405$export$d30a7814cfd4033e} from "./RootDropIndicator.mjs";
6
6
  import {DragPreview as $daa6ead3d9d3506a$export$905ab40ac2179daa} from "./DragPreview.mjs";
7
- import "./vars.42570ef3.css";
7
+ import "./vars.ce47d5ba.css";
8
8
  import $7lS7h$table_vars_cssmodulejs from "./table_vars_css.mjs";
9
9
  import "./table.b13eee90.css";
10
10
  import $7lS7h$table_cssmodulejs from "./table_css.mjs";
@@ -4,7 +4,7 @@ import {Nubbin as $cb7d341e8868d81d$export$d9658cdf8c86807} from "./Nubbin.modul
4
4
  import {Resizer as $fc695d2eafc2b351$export$48a76196cafe3b93, ResizeStateContext as $fc695d2eafc2b351$export$b517d84d4ad20b24} from "./Resizer.module.js";
5
5
  import {RootDropIndicator as $4e6fc36ba71ba405$export$d30a7814cfd4033e} from "./RootDropIndicator.module.js";
6
6
  import {DragPreview as $daa6ead3d9d3506a$export$905ab40ac2179daa} from "./DragPreview.module.js";
7
- import "./vars.42570ef3.css";
7
+ import "./vars.ce47d5ba.css";
8
8
  import $7lS7h$table_vars_cssmodulejs from "./table_vars_css.module.js";
9
9
  import "./table.b13eee90.css";
10
10
  import $7lS7h$table_cssmodulejs from "./table_css.module.js";
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AA4ED,SAAS,uCAAmC,KAA4B,EAAE,GAA2B;IACnG,IAAI,iCAAC,6BAA6B,EAAE,GAAG,YAAW,GAAG;IACrD,IAAI,CAAA,GAAA,wCAAc,OAAO,+BACvB,qBAAO,0DAAC,CAAA,GAAA,2CAAgB;QAAG,GAAG,UAAU;QAAE,KAAK;;SAE/C,qBAAO,0DAAC,CAAA,GAAA,mCAAQ;QAAG,GAAG,UAAU;QAAE,KAAK;;AAE3C;AAEA;;CAEC,GACD,MAAM,yDAAoB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","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, 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 /** 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\nfunction 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}\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(TableViewWrapper) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {_TableViewWrapper as TableView};\n"],"names":[],"version":3,"file":"TableViewWrapper.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiFD,SAAS,uCAAmC,KAA4B,EAAE,GAA2B;IACnG,IAAI,iCAAC,6BAA6B,EAAE,GAAG,YAAW,GAAG;IACrD,IAAI,CAAA,GAAA,wCAAc,OAAO,+BACvB,qBAAO,0DAAC,CAAA,GAAA,2CAAgB;QAAG,GAAG,UAAU;QAAE,KAAK;;SAE/C,qBAAO,0DAAC,CAAA,GAAA,mCAAQ;QAAG,GAAG,UAAU;QAAE,KAAK;;AAE3C;AAEA;;CAEC,GACD,MAAM,yDAAoB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","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\nfunction 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}\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(TableViewWrapper) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {_TableViewWrapper as TableView};\n"],"names":[],"version":3,"file":"TableViewWrapper.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AA4ED,SAAS,uCAAmC,KAA4B,EAAE,GAA2B;IACnG,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;AAEA;;CAEC,GACD,MAAM,yDAAoB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","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, 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 /** 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\nfunction 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}\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(TableViewWrapper) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {_TableViewWrapper as TableView};\n"],"names":[],"version":3,"file":"TableViewWrapper.module.js.map"}
1
+ {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAiFD,SAAS,uCAAmC,KAA4B,EAAE,GAA2B;IACnG,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;AAEA;;CAEC,GACD,MAAM,yDAAoB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","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\nfunction 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}\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(TableViewWrapper) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {_TableViewWrapper as TableView};\n"],"names":[],"version":3,"file":"TableViewWrapper.module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AriaLabelingProps, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps } from "@react-types/shared";
1
+ import { AriaLabelingProps, DisabledBehavior, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps } from "@react-types/shared";
2
2
  import { ColumnSize, TableProps, SpectrumColumnProps } from "@react-types/table";
3
3
  import { DragAndDropHooks } from "@react-spectrum/dnd";
4
4
  import { JSX, ReactElement } from "react";
@@ -17,6 +17,11 @@ export interface SpectrumTableProps<T> extends TableProps<T>, SpectrumSelectionP
17
17
  isQuiet?: boolean;
18
18
  /** Sets what the TableView should render when there is no content to display. */
19
19
  renderEmptyState?: () => JSX.Element;
20
+ /**
21
+ * Whether `disabledKeys` applies to all interactions, or only selection.
22
+ * @default "selection"
23
+ */
24
+ disabledBehavior?: DisabledBehavior;
20
25
  /** Handler that is called when a user performs an action on a row. */
21
26
  onAction?: (key: Key) => void;
22
27
  /**
@@ -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,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,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;AAWD;;GAEG;AACH,OAAA,MAAM,WAA0D,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,OAAO,cAAc,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;AC9EnJ,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"}
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,Q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E,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"}
@@ -840,6 +840,10 @@ tbody._5uzlQq_spectrum-Table-body ._5uzlQq_spectrum-Table-row:last-child ._5uzlQ
840
840
  background-color: var(--spectrum-table-row-background-color-down, var(--spectrum-alias-highlight-active));
841
841
  }
842
842
 
843
+ ._5uzlQq_spectrum-Table-row._5uzlQq_is-disabled ._5uzlQq_spectrum-Table-cell._5uzlQq_is-disabled {
844
+ color: var(--spectrum-alias-text-color-disabled, var(--spectrum-global-color-gray-500));
845
+ }
846
+
843
847
  ._5uzlQq_spectrum-Table-row:not(tr):after {
844
848
  box-shadow: inset 0 -1px 0 0 var(--spectrum-table-cell-border-color, var(--spectrum-global-color-gray-300));
845
849
  content: "";
@@ -985,4 +989,4 @@ tbody._5uzlQq_spectrum-Table-body ._5uzlQq_spectrum-Table-row:last-child ._5uzlQ
985
989
  --spectrum-table-background-color: transparent;
986
990
  }
987
991
  }
988
- /*# sourceMappingURL=vars.42570ef3.css.map */
992
+ /*# sourceMappingURL=vars.ce47d5ba.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;;;;;;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;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAKF;;;;AAGE;;;;AAQA;;;;AAUE;;;;AAKF;;;;AAYA;;;;;;;;;;;AAkBE;;;;AAMA;;;;AAIA;;;;AAKA;;;;AAMA;;;;AAUE;;;;AAOF;;;;;;AAUJ;;;;;AAKA;;;;;AAME;;;;;AAIE;;;;;AAIE;;;;AAOF;;;;AAIA;;;;AASA;;;;AAKE;;;;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.42570ef3.css.map"}
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;;;;;;;;AAQ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;;AASJ;;;;;;AAMI;;;;;;;;;;AAWF;;;;;AAIE;;;;AASJ;;;;AAGE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAKF;;;;AAGE;;;;AAQA;;;;AAUE;;;;AAKF;;;;AAIA;;;;AAYA;;;;;;;;;;;AAkBE;;;;AAMA;;;;AAIA;;;;AAKA;;;;AAMA;;;;AAUE;;;;AAOF;;;;;;AAUJ;;;;;AAKA;;;;;AAME;;;;;AAIE;;;;;AAIE;;;;AAOF;;;;AAIA;;;;AASA;;;;AAKE;;;;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.ce47d5ba.css.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/table",
3
- "version": "3.13.2-nightly.4743+f0aa6aace",
3
+ "version": "3.13.2-nightly.4979+89c42a819",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,37 +36,37 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/button": "3.0.0-nightly.3026+f0aa6aace",
40
- "@react-aria/focus": "3.0.0-nightly.3026+f0aa6aace",
41
- "@react-aria/i18n": "3.0.0-nightly.3026+f0aa6aace",
42
- "@react-aria/interactions": "3.0.0-nightly.3026+f0aa6aace",
43
- "@react-aria/overlays": "3.0.0-nightly.3026+f0aa6aace",
44
- "@react-aria/selection": "3.0.0-nightly.3026+f0aa6aace",
45
- "@react-aria/table": "3.15.2-nightly.4743+f0aa6aace",
46
- "@react-aria/utils": "3.0.0-nightly.3026+f0aa6aace",
47
- "@react-aria/virtualizer": "4.0.2-nightly.4743+f0aa6aace",
48
- "@react-aria/visually-hidden": "3.0.0-nightly.3026+f0aa6aace",
49
- "@react-spectrum/checkbox": "3.0.0-nightly.3026+f0aa6aace",
50
- "@react-spectrum/dnd": "3.4.2-nightly.4743+f0aa6aace",
51
- "@react-spectrum/layout": "3.6.8-nightly.4743+f0aa6aace",
52
- "@react-spectrum/menu": "3.20.2-nightly.4743+f0aa6aace",
53
- "@react-spectrum/progress": "3.0.0-nightly.3026+f0aa6aace",
54
- "@react-spectrum/tooltip": "3.0.0-nightly.3026+f0aa6aace",
55
- "@react-spectrum/utils": "3.0.0-nightly.3026+f0aa6aace",
56
- "@react-stately/flags": "3.0.4-nightly.4743+f0aa6aace",
57
- "@react-stately/layout": "4.0.2-nightly.4743+f0aa6aace",
58
- "@react-stately/table": "3.12.2-nightly.4743+f0aa6aace",
59
- "@react-stately/virtualizer": "4.0.2-nightly.4743+f0aa6aace",
60
- "@react-types/grid": "3.2.9-nightly.4743+f0aa6aace",
61
- "@react-types/shared": "3.0.0-nightly.3026+f0aa6aace",
62
- "@react-types/table": "3.10.2-nightly.4743+f0aa6aace",
63
- "@spectrum-icons/ui": "3.0.0-nightly.3026+f0aa6aace",
39
+ "@react-aria/button": "3.0.0-nightly.3051+89c42a819",
40
+ "@react-aria/focus": "3.0.0-nightly.3051+89c42a819",
41
+ "@react-aria/i18n": "3.0.0-nightly.3051+89c42a819",
42
+ "@react-aria/interactions": "3.0.0-nightly.3051+89c42a819",
43
+ "@react-aria/overlays": "3.0.0-nightly.3051+89c42a819",
44
+ "@react-aria/selection": "3.0.0-nightly.3051+89c42a819",
45
+ "@react-aria/table": "3.15.2-nightly.4979+89c42a819",
46
+ "@react-aria/utils": "3.0.0-nightly.3051+89c42a819",
47
+ "@react-aria/virtualizer": "4.0.2-nightly.4979+89c42a819",
48
+ "@react-aria/visually-hidden": "3.0.0-nightly.3051+89c42a819",
49
+ "@react-spectrum/checkbox": "3.0.0-nightly.3051+89c42a819",
50
+ "@react-spectrum/dnd": "3.4.2-nightly.4979+89c42a819",
51
+ "@react-spectrum/layout": "3.6.8-nightly.4979+89c42a819",
52
+ "@react-spectrum/menu": "3.20.2-nightly.4979+89c42a819",
53
+ "@react-spectrum/progress": "3.0.0-nightly.3051+89c42a819",
54
+ "@react-spectrum/tooltip": "3.0.0-nightly.3051+89c42a819",
55
+ "@react-spectrum/utils": "3.0.0-nightly.3051+89c42a819",
56
+ "@react-stately/flags": "3.0.4-nightly.4979+89c42a819",
57
+ "@react-stately/layout": "4.0.2-nightly.4979+89c42a819",
58
+ "@react-stately/table": "3.12.2-nightly.4979+89c42a819",
59
+ "@react-stately/virtualizer": "4.0.2-nightly.4979+89c42a819",
60
+ "@react-types/grid": "3.2.9-nightly.4979+89c42a819",
61
+ "@react-types/shared": "3.0.0-nightly.3051+89c42a819",
62
+ "@react-types/table": "3.10.2-nightly.4979+89c42a819",
63
+ "@spectrum-icons/ui": "3.0.0-nightly.3051+89c42a819",
64
64
  "@swc/helpers": "^0.5.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@adobe/spectrum-css-temp": "3.0.0-nightly.3026+f0aa6aace",
68
- "@react-aria/dnd": "3.7.2-nightly.4743+f0aa6aace",
69
- "@react-stately/dnd": "3.4.2-nightly.4743+f0aa6aace"
67
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.3051+89c42a819",
68
+ "@react-aria/dnd": "3.7.2-nightly.4979+89c42a819",
69
+ "@react-stately/dnd": "3.4.2-nightly.4979+89c42a819"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@react-spectrum/provider": "^3.0.0",
@@ -76,5 +76,5 @@
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "gitHead": "f0aa6aacee60af265dc8994b9274ccf072a850aa"
79
+ "gitHead": "89c42a819b3585d25a52429110a8f26871dff2a5"
80
80
  }
package/src/Resizer.tsx CHANGED
@@ -1,9 +1,7 @@
1
1
  /* eslint-disable jsx-a11y/role-supports-aria-props */
2
2
  import {classNames} from '@react-spectrum/utils';
3
3
  import {ColumnSize} from '@react-types/table';
4
- // @ts-ignore
5
4
  import eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';
6
- // @ts-ignore
7
5
  import ewCursor from 'bundle-text:./cursors/Cur_MoveHorizontal_9_9.svg';
8
6
  import {FocusRing} from '@react-aria/focus';
9
7
  import {GridNode} from '@react-types/grid';
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import type {AriaLabelingProps, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps} from '@react-types/shared';
13
+ import type {AriaLabelingProps, DisabledBehavior, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps} from '@react-types/shared';
14
14
  import type {ColumnSize, TableProps} from '@react-types/table';
15
15
  import type {DragAndDropHooks} from '@react-spectrum/dnd';
16
16
  import React, {JSX, ReactElement} from 'react';
@@ -33,6 +33,11 @@ export interface SpectrumTableProps<T> extends TableProps<T>, SpectrumSelectionP
33
33
  isQuiet?: boolean,
34
34
  /** Sets what the TableView should render when there is no content to display. */
35
35
  renderEmptyState?: () => JSX.Element,
36
+ /**
37
+ * Whether `disabledKeys` applies to all interactions, or only selection.
38
+ * @default "selection"
39
+ */
40
+ disabledBehavior?: DisabledBehavior,
36
41
  /** Handler that is called when a user performs an action on a row. */
37
42
  onAction?: (key: Key) => void,
38
43
  /**