@react-spectrum/table 3.12.11-nightly.4674 → 3.12.11-nightly.4681
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/InsertionIndicator.main.js +1 -1
- package/dist/InsertionIndicator.main.js.map +1 -1
- package/dist/InsertionIndicator.mjs +1 -1
- package/dist/InsertionIndicator.module.js +1 -1
- package/dist/InsertionIndicator.module.js.map +1 -1
- package/dist/Resizer.main.js +4 -1
- package/dist/Resizer.main.js.map +1 -1
- package/dist/Resizer.mjs +5 -3
- package/dist/Resizer.module.js +5 -3
- package/dist/Resizer.module.js.map +1 -1
- package/dist/RootDropIndicator.main.js +1 -1
- package/dist/RootDropIndicator.main.js.map +1 -1
- package/dist/RootDropIndicator.mjs +1 -1
- package/dist/RootDropIndicator.module.js +1 -1
- package/dist/RootDropIndicator.module.js.map +1 -1
- package/dist/TableViewBase.main.js +80 -75
- package/dist/TableViewBase.main.js.map +1 -1
- package/dist/TableViewBase.mjs +82 -77
- package/dist/TableViewBase.module.js +82 -77
- package/dist/TableViewBase.module.js.map +1 -1
- package/package.json +32 -31
- package/src/InsertionIndicator.tsx +1 -1
- package/src/Resizer.tsx +8 -4
- package/src/RootDropIndicator.tsx +1 -1
- package/src/TableViewBase.tsx +110 -84
|
@@ -33,7 +33,7 @@ $parcel$export(module.exports, "InsertionIndicator", () => $c44674ca7612e997$exp
|
|
|
33
33
|
function $c44674ca7612e997$export$2c0bab5914a9d088(props) {
|
|
34
34
|
let { dropState: dropState, dragAndDropHooks: dragAndDropHooks } = (0, $e39c6de4eb69450d$exports.useTableContext)();
|
|
35
35
|
const { target: target, rowProps: rowProps } = props;
|
|
36
|
-
let ref = (0, $k3Oqb$react.useRef)();
|
|
36
|
+
let ref = (0, $k3Oqb$react.useRef)(undefined);
|
|
37
37
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
38
38
|
let { visuallyHiddenProps: visuall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G,mBAAmB;QAAE,MAAK;QAAU,GAAG,kBAAkB;QAAE,KAAK;;AAIjF","sources":["packages/@react-spectrum/table/src/InsertionIndicator.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 {classNames} from '@react-spectrum/utils';\nimport {FocusableElement, ItemDropTarget} from '@react-types/shared';\nimport React, {DOMAttributes, HTMLAttributes, useRef} from 'react';\nimport styles from './table.css';\nimport {useTableContext} from './TableViewBase';\nimport {useVisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface InsertionIndicatorProps {\n target: ItemDropTarget,\n rowProps: HTMLAttributes<HTMLElement> & DOMAttributes<FocusableElement>\n}\n\nexport function InsertionIndicator(props: InsertionIndicatorProps) {\n let {dropState, dragAndDropHooks} = useTableContext();\n const {target, rowProps} = props;\n\n let ref = useRef(undefined);\n let {dropIndicatorProps} = dragAndDropHooks.useDropIndicator(props, dropState, ref);\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n let isDropTarget = dropState.isDropTarget(target);\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div\n style={{\n position: 'absolute',\n top: rowProps.style.top as number + (target.dropPosition === 'after' ? rowProps.style.height as number : 0),\n width: rowProps.style.width\n }}\n role=\"row\"\n aria-hidden={dropIndicatorProps['aria-hidden']}>\n <div\n role=\"gridcell\"\n className={\n classNames(\n styles,\n 'react-spectrum-Table-InsertionIndicator',\n {\n 'react-spectrum-Table-InsertionIndicator--dropTarget': isDropTarget\n }\n )}>\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n"],"names":[],"version":3,"file":"InsertionIndicator.main.js.map"}
|
|
@@ -27,7 +27,7 @@ function $parcel$interopDefault(a) {
|
|
|
27
27
|
function $7ee9a922ee4e8032$export$2c0bab5914a9d088(props) {
|
|
28
28
|
let { dropState: dropState, dragAndDropHooks: dragAndDropHooks } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
|
|
29
29
|
const { target: target, rowProps: rowProps } = props;
|
|
30
|
-
let ref = (0, $khOO8$useRef)();
|
|
30
|
+
let ref = (0, $khOO8$useRef)(undefined);
|
|
31
31
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
32
32
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $khOO8$useVisuallyHidden)();
|
|
33
33
|
let isDropTarget = dropState.isDropTarget(target);
|
|
@@ -27,7 +27,7 @@ function $parcel$interopDefault(a) {
|
|
|
27
27
|
function $7ee9a922ee4e8032$export$2c0bab5914a9d088(props) {
|
|
28
28
|
let { dropState: dropState, dragAndDropHooks: dragAndDropHooks } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
|
|
29
29
|
const { target: target, rowProps: rowProps } = props;
|
|
30
|
-
let ref = (0, $khOO8$useRef)();
|
|
30
|
+
let ref = (0, $khOO8$useRef)(undefined);
|
|
31
31
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
32
32
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $khOO8$useVisuallyHidden)();
|
|
33
33
|
let isDropTarget = dropState.isDropTarget(target);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,SAAS,0CAAmB,KAA8B;IAC/D,IAAI,aAAC,SAAS,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,yCAAc;IAClD,MAAM,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IAE3B,IAAI,MAAM,CAAA,GAAA,aAAK;
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,SAAS,0CAAmB,KAA8B;IAC/D,IAAI,aAAC,SAAS,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,yCAAc;IAClD,MAAM,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IAE3B,IAAI,MAAM,CAAA,GAAA,aAAK,EAAE;IACjB,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAiB,gBAAgB,CAAC,OAAO,WAAW;IAC/E,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,wBAAgB;IAE5C,IAAI,eAAe,UAAU,YAAY,CAAC;IAE1C,IAAI,CAAC,gBAAgB,kBAAkB,CAAC,cAAc,EACpD,OAAO;IAGT,qBACE,gCAAC;QACC,OAAO;YACL,UAAU;YACV,KAAK,SAAS,KAAK,CAAC,GAAG,GAAc,CAAA,OAAO,YAAY,KAAK,UAAU,SAAS,KAAK,CAAC,MAAM,GAAa,CAAA;YACzG,OAAO,SAAS,KAAK,CAAC,KAAK;QAC7B;QACA,MAAK;QACL,eAAa,kBAAkB,CAAC,cAAc;qBAC9C,gCAAC;QACC,MAAK;QACL,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,kDAAK,GACL,2CACA;YACE,uDAAuD;QACzD;qBAEJ,gCAAC;QAAK,GAAG,mBAAmB;QAAE,MAAK;QAAU,GAAG,kBAAkB;QAAE,KAAK;;AAIjF","sources":["packages/@react-spectrum/table/src/InsertionIndicator.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 {classNames} from '@react-spectrum/utils';\nimport {FocusableElement, ItemDropTarget} from '@react-types/shared';\nimport React, {DOMAttributes, HTMLAttributes, useRef} from 'react';\nimport styles from './table.css';\nimport {useTableContext} from './TableViewBase';\nimport {useVisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface InsertionIndicatorProps {\n target: ItemDropTarget,\n rowProps: HTMLAttributes<HTMLElement> & DOMAttributes<FocusableElement>\n}\n\nexport function InsertionIndicator(props: InsertionIndicatorProps) {\n let {dropState, dragAndDropHooks} = useTableContext();\n const {target, rowProps} = props;\n\n let ref = useRef(undefined);\n let {dropIndicatorProps} = dragAndDropHooks.useDropIndicator(props, dropState, ref);\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n let isDropTarget = dropState.isDropTarget(target);\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div\n style={{\n position: 'absolute',\n top: rowProps.style.top as number + (target.dropPosition === 'after' ? rowProps.style.height as number : 0),\n width: rowProps.style.width\n }}\n role=\"row\"\n aria-hidden={dropIndicatorProps['aria-hidden']}>\n <div\n role=\"gridcell\"\n className={\n classNames(\n styles,\n 'react-spectrum-Table-InsertionIndicator',\n {\n 'react-spectrum-Table-InsertionIndicator--dropTarget': isDropTarget\n }\n )}>\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n"],"names":[],"version":3,"file":"InsertionIndicator.module.js.map"}
|
package/dist/Resizer.main.js
CHANGED
|
@@ -20,6 +20,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
20
20
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
$parcel$export(module.exports, "ResizeStateContext", () => $2877766f94c67a67$export$b517d84d4ad20b24);
|
|
23
24
|
$parcel$export(module.exports, "Resizer", () => $2877766f94c67a67$export$48a76196cafe3b93);
|
|
24
25
|
/* eslint-disable jsx-a11y/role-supports-aria-props */
|
|
25
26
|
var $1ed2399e74febaae$exports = {};
|
|
@@ -56,9 +57,11 @@ const $2877766f94c67a67$var$CURSORS = {
|
|
|
56
57
|
w: $2877766f94c67a67$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($955f540cbcd8d857$exports))), 'w-resize'),
|
|
57
58
|
e: $2877766f94c67a67$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($1ed2399e74febaae$exports))), 'e-resize')
|
|
58
59
|
};
|
|
60
|
+
const $2877766f94c67a67$export$b517d84d4ad20b24 = /*#__PURE__*/ (0, $hxFQC$react.createContext)(null);
|
|
59
61
|
function $2877766f94c67a67$var$Resizer(props, ref) {
|
|
60
62
|
let { column: column, showResizer: showResizer } = props;
|
|
61
|
-
let { isEmpty: isEmpty,
|
|
63
|
+
let { isEmpty: isEmpty, onFocusedResizer: onFocusedResizer } = (0, $e39c6de4eb69450d$exports.useTableContext)();
|
|
64
|
+
let layout = (0, $hxFQC$react.useContext)($2877766f94c67a67$export$b517d84d4ad20b24);
|
|
62
65
|
// Virtualizer re-renders, but these components are all cached
|
|
63
66
|
// in order to get around that and cause a rerender here, we use context
|
|
64
67
|
// but we don't actually need any value, they are available on the layout object
|
package/dist/Resizer.main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
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,IA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AG,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';\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} from '@react-types/shared';\nimport React, {createContext, RefObject, 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
|
@@ -5,7 +5,7 @@ import {useTableContext as $bd013581c0a4b065$export$3cb274deb6c2d854, useVirtual
|
|
|
5
5
|
import {classNames as $dIfdp$classNames} from "@react-spectrum/utils";
|
|
6
6
|
import {FocusRing as $dIfdp$FocusRing} from "@react-aria/focus";
|
|
7
7
|
import {isWebKit as $dIfdp$isWebKit, mergeProps as $dIfdp$mergeProps} from "@react-aria/utils";
|
|
8
|
-
import $dIfdp$react, {useState as $dIfdp$useState, useEffect as $dIfdp$useEffect} from "react";
|
|
8
|
+
import $dIfdp$react, {createContext as $dIfdp$createContext, useContext as $dIfdp$useContext, useState as $dIfdp$useState, useEffect as $dIfdp$useEffect} from "react";
|
|
9
9
|
import $dIfdp$reactdom from "react-dom";
|
|
10
10
|
import {useLocalizedStringFormatter as $dIfdp$useLocalizedStringFormatter, useLocale as $dIfdp$useLocale} from "@react-aria/i18n";
|
|
11
11
|
import {useTableColumnResize as $dIfdp$useTableColumnResize} from "@react-aria/table";
|
|
@@ -50,9 +50,11 @@ const $fc695d2eafc2b351$var$CURSORS = {
|
|
|
50
50
|
w: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($58407c2d4eb33511$exports))), 'w-resize'),
|
|
51
51
|
e: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($2fc56f9fdd93be52$exports))), 'e-resize')
|
|
52
52
|
};
|
|
53
|
+
const $fc695d2eafc2b351$export$b517d84d4ad20b24 = /*#__PURE__*/ (0, $dIfdp$createContext)(null);
|
|
53
54
|
function $fc695d2eafc2b351$var$Resizer(props, ref) {
|
|
54
55
|
let { column: column, showResizer: showResizer } = props;
|
|
55
|
-
let { isEmpty: isEmpty,
|
|
56
|
+
let { isEmpty: isEmpty, onFocusedResizer: onFocusedResizer } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
|
|
57
|
+
let layout = (0, $dIfdp$useContext)($fc695d2eafc2b351$export$b517d84d4ad20b24);
|
|
56
58
|
// Virtualizer re-renders, but these components are all cached
|
|
57
59
|
// in order to get around that and cause a rerender here, we use context
|
|
58
60
|
// but we don't actually need any value, they are available on the layout object
|
|
@@ -138,5 +140,5 @@ function $fc695d2eafc2b351$var$CursorOverlay(props) {
|
|
|
138
140
|
const $fc695d2eafc2b351$export$48a76196cafe3b93 = /*#__PURE__*/ (0, $dIfdp$react).forwardRef($fc695d2eafc2b351$var$Resizer);
|
|
139
141
|
|
|
140
142
|
|
|
141
|
-
export {$fc695d2eafc2b351$export$48a76196cafe3b93 as Resizer};
|
|
143
|
+
export {$fc695d2eafc2b351$export$b517d84d4ad20b24 as ResizeStateContext, $fc695d2eafc2b351$export$48a76196cafe3b93 as Resizer};
|
|
142
144
|
//# sourceMappingURL=Resizer.module.js.map
|
package/dist/Resizer.module.js
CHANGED
|
@@ -5,7 +5,7 @@ import {useTableContext as $bd013581c0a4b065$export$3cb274deb6c2d854, useVirtual
|
|
|
5
5
|
import {classNames as $dIfdp$classNames} from "@react-spectrum/utils";
|
|
6
6
|
import {FocusRing as $dIfdp$FocusRing} from "@react-aria/focus";
|
|
7
7
|
import {isWebKit as $dIfdp$isWebKit, mergeProps as $dIfdp$mergeProps} from "@react-aria/utils";
|
|
8
|
-
import $dIfdp$react, {useState as $dIfdp$useState, useEffect as $dIfdp$useEffect} from "react";
|
|
8
|
+
import $dIfdp$react, {createContext as $dIfdp$createContext, useContext as $dIfdp$useContext, useState as $dIfdp$useState, useEffect as $dIfdp$useEffect} from "react";
|
|
9
9
|
import $dIfdp$reactdom from "react-dom";
|
|
10
10
|
import {useLocalizedStringFormatter as $dIfdp$useLocalizedStringFormatter, useLocale as $dIfdp$useLocale} from "@react-aria/i18n";
|
|
11
11
|
import {useTableColumnResize as $dIfdp$useTableColumnResize} from "@react-aria/table";
|
|
@@ -50,9 +50,11 @@ const $fc695d2eafc2b351$var$CURSORS = {
|
|
|
50
50
|
w: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($58407c2d4eb33511$exports))), 'w-resize'),
|
|
51
51
|
e: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($2fc56f9fdd93be52$exports))), 'e-resize')
|
|
52
52
|
};
|
|
53
|
+
const $fc695d2eafc2b351$export$b517d84d4ad20b24 = /*#__PURE__*/ (0, $dIfdp$createContext)(null);
|
|
53
54
|
function $fc695d2eafc2b351$var$Resizer(props, ref) {
|
|
54
55
|
let { column: column, showResizer: showResizer } = props;
|
|
55
|
-
let { isEmpty: isEmpty,
|
|
56
|
+
let { isEmpty: isEmpty, onFocusedResizer: onFocusedResizer } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
|
|
57
|
+
let layout = (0, $dIfdp$useContext)($fc695d2eafc2b351$export$b517d84d4ad20b24);
|
|
56
58
|
// Virtualizer re-renders, but these components are all cached
|
|
57
59
|
// in order to get around that and cause a rerender here, we use context
|
|
58
60
|
// but we don't actually need any value, they are available on the layout object
|
|
@@ -138,5 +140,5 @@ function $fc695d2eafc2b351$var$CursorOverlay(props) {
|
|
|
138
140
|
const $fc695d2eafc2b351$export$48a76196cafe3b93 = /*#__PURE__*/ (0, $dIfdp$react).forwardRef($fc695d2eafc2b351$var$Resizer);
|
|
139
141
|
|
|
140
142
|
|
|
141
|
-
export {$fc695d2eafc2b351$export$48a76196cafe3b93 as Resizer};
|
|
143
|
+
export {$fc695d2eafc2b351$export$b517d84d4ad20b24 as ResizeStateContext, $fc695d2eafc2b351$export$48a76196cafe3b93 as Resizer};
|
|
142
144
|
//# sourceMappingURL=Resizer.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAoD;;ACApD,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAoD;;ACApD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,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';\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} from '@react-types/shared';\nimport React, {createContext, RefObject, 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"}
|
|
@@ -27,7 +27,7 @@ $parcel$export(module.exports, "RootDropIndicator", () => $4a98adf416b1ae5d$expo
|
|
|
27
27
|
|
|
28
28
|
function $4a98adf416b1ae5d$export$d30a7814cfd4033e() {
|
|
29
29
|
let { dropState: dropState, dragAndDropHooks: dragAndDropHooks, state: state } = (0, $e39c6de4eb69450d$exports.useTableContext)();
|
|
30
|
-
let ref = (0, $ijPMf$react.useRef)();
|
|
30
|
+
let ref = (0, $ijPMf$react.useRef)(undefined);
|
|
31
31
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
32
32
|
target: {
|
|
33
33
|
type: 'root'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAMM,SAAS;IACd,IAAI,aAAC,SAAS,oBAAE,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,yCAAc;IACzD,IAAI,MAAM,CAAA,GAAA,mBAAK;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAMM,SAAS;IACd,IAAI,aAAC,SAAS,oBAAE,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,yCAAc;IACzD,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE;IACjB,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAiB,gBAAgB,CAAC;QAC3D,QAAQ;YAAC,MAAM;QAAM;IACvB,GAAG,WAAW;IACd,IAAI,eAAe,UAAU,YAAY,CAAC;QAAC,MAAM;IAAM;IACvD,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,gDAAgB;IAE5C,IAAI,CAAC,gBAAgB,kBAAkB,CAAC,cAAc,EACpD,OAAO;IAGT,qBACE,0DAAC;QAAI,MAAK;QAAM,eAAa,kBAAkB,CAAC,cAAc;qBAC5D,0DAAC;QACC,MAAK;QACL,iBAAc;QACd,gBAAc,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM;qBAC7C,0DAAC;QAAI,MAAK;QAAU,GAAG,mBAAmB;QAAG,GAAG,kBAAkB;QAAE,KAAK;;AAIjF","sources":["packages/@react-spectrum/table/src/RootDropIndicator.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 React, {useRef} from 'react';\nimport {useTableContext} from './TableViewBase';\nimport {useVisuallyHidden} from '@react-aria/visually-hidden';\n\nexport function RootDropIndicator() {\n let {dropState, dragAndDropHooks, state} = useTableContext();\n let ref = useRef(undefined);\n let {dropIndicatorProps} = dragAndDropHooks.useDropIndicator({\n target: {type: 'root'}\n }, dropState, ref);\n let isDropTarget = dropState.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']}>\n <div\n role=\"gridcell\"\n aria-selected=\"false\"\n aria-colspan={state.collection.columns.length}>\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n"],"names":[],"version":3,"file":"RootDropIndicator.main.js.map"}
|
|
@@ -17,7 +17,7 @@ import {useVisuallyHidden as $6tvhl$useVisuallyHidden} from "@react-aria/visuall
|
|
|
17
17
|
|
|
18
18
|
function $4e6fc36ba71ba405$export$d30a7814cfd4033e() {
|
|
19
19
|
let { dropState: dropState, dragAndDropHooks: dragAndDropHooks, state: state } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
|
|
20
|
-
let ref = (0, $6tvhl$useRef)();
|
|
20
|
+
let ref = (0, $6tvhl$useRef)(undefined);
|
|
21
21
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
22
22
|
target: {
|
|
23
23
|
type: 'root'
|
|
@@ -17,7 +17,7 @@ import {useVisuallyHidden as $6tvhl$useVisuallyHidden} from "@react-aria/visuall
|
|
|
17
17
|
|
|
18
18
|
function $4e6fc36ba71ba405$export$d30a7814cfd4033e() {
|
|
19
19
|
let { dropState: dropState, dragAndDropHooks: dragAndDropHooks, state: state } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
|
|
20
|
-
let ref = (0, $6tvhl$useRef)();
|
|
20
|
+
let ref = (0, $6tvhl$useRef)(undefined);
|
|
21
21
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
22
22
|
target: {
|
|
23
23
|
type: 'root'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAMM,SAAS;IACd,IAAI,aAAC,SAAS,oBAAE,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,yCAAc;IACzD,IAAI,MAAM,CAAA,GAAA,aAAK;
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAMM,SAAS;IACd,IAAI,aAAC,SAAS,oBAAE,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,yCAAc;IACzD,IAAI,MAAM,CAAA,GAAA,aAAK,EAAE;IACjB,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAiB,gBAAgB,CAAC;QAC3D,QAAQ;YAAC,MAAM;QAAM;IACvB,GAAG,WAAW;IACd,IAAI,eAAe,UAAU,YAAY,CAAC;QAAC,MAAM;IAAM;IACvD,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,wBAAgB;IAE5C,IAAI,CAAC,gBAAgB,kBAAkB,CAAC,cAAc,EACpD,OAAO;IAGT,qBACE,gCAAC;QAAI,MAAK;QAAM,eAAa,kBAAkB,CAAC,cAAc;qBAC5D,gCAAC;QACC,MAAK;QACL,iBAAc;QACd,gBAAc,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM;qBAC7C,gCAAC;QAAI,MAAK;QAAU,GAAG,mBAAmB;QAAG,GAAG,kBAAkB;QAAE,KAAK;;AAIjF","sources":["packages/@react-spectrum/table/src/RootDropIndicator.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 React, {useRef} from 'react';\nimport {useTableContext} from './TableViewBase';\nimport {useVisuallyHidden} from '@react-aria/visually-hidden';\n\nexport function RootDropIndicator() {\n let {dropState, dragAndDropHooks, state} = useTableContext();\n let ref = useRef(undefined);\n let {dropIndicatorProps} = dragAndDropHooks.useDropIndicator({\n target: {type: 'root'}\n }, dropState, ref);\n let isDropTarget = dropState.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']}>\n <div\n role=\"gridcell\"\n aria-selected=\"false\"\n aria-colspan={state.collection.columns.length}>\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n"],"names":[],"version":3,"file":"RootDropIndicator.module.js.map"}
|