@react-spectrum/table 3.14.1 → 3.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,9 +31,10 @@ $parcel$export(module.exports, "InsertionIndicator", () => $c44674ca7612e997$exp
31
31
 
32
32
 
33
33
  function $c44674ca7612e997$export$2c0bab5914a9d088(props) {
34
+ var _rowProps_style, _rowProps_style1, _rowProps_style2;
34
35
  let { dropState: dropState, dragAndDropHooks: dragAndDropHooks } = (0, $e39c6de4eb69450d$exports.useTableContext)();
35
36
  const { target: target, rowProps: rowProps } = props;
36
- let ref = (0, $k3Oqb$react.useRef)(undefined);
37
+ let ref = (0, $k3Oqb$react.useRef)(null);
37
38
  let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
38
39
  let { visuallyHiddenProps: visuallyHiddenProps } = (0, $k3Oqb$reactariavisuallyhidden.useVisuallyHidden)();
39
40
  let isDropTarget = dropState.isDropTarget(target);
@@ -41,8 +42,8 @@ function $c44674ca7612e997$export$2c0bab5914a9d088(props) {
41
42
  return /*#__PURE__*/ (0, ($parcel$interopDefault($k3Oqb$react))).createElement("div", {
42
43
  style: {
43
44
  position: 'absolute',
44
- top: rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0),
45
- width: rowProps.style.width
45
+ top: typeof ((_rowProps_style = rowProps.style) === null || _rowProps_style === void 0 ? void 0 : _rowProps_style.top) === 'number' && typeof ((_rowProps_style1 = rowProps.style) === null || _rowProps_style1 === void 0 ? void 0 : _rowProps_style1.height) === 'number' ? rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0) : 0,
46
+ width: (_rowProps_style2 = rowProps.style) === null || _rowProps_style2 === void 0 ? void 0 : _rowProps_style2.width
46
47
  },
47
48
  role: "row",
48
49
  "aria-hidden": dropIndicatorProps['aria-hidden']
@@ -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,mBAAK,EAAE;IACjB,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAiB,gBAAgB,CAAC,OAAO,WAAW;IAC/E,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,gDAAgB;IAE5C,IAAI,eAAe,UAAU,YAAY,CAAC;IAE1C,IAAI,CAAC,gBAAgB,kBAAkB,CAAC,cAAc,EACpD,OAAO;IAGT,qBACE,0DAAC;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,0DAAC;QACC,MAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,2CACA;YACE,uDAAuD;QACzD;qBAEJ,0DAAC;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.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,SAAS,0CAAmB,KAA8B;QAkB7C,iBAA2C,kBAChD;IAlBb,IAAI,aAAC,SAAS,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,yCAAc;IAClD,MAAM,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IAE3B,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAyB;IACxC,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAkB,gBAAgB,CAAE,OAAO,WAAY;IAClF,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,gDAAgB;IAE5C,IAAI,eAAe,UAAW,YAAY,CAAC;IAE3C,IAAI,CAAC,gBAAgB,kBAAkB,CAAC,cAAc,EACpD,OAAO;IAGT,qBACE,0DAAC;QACC,OAAO;YACL,UAAU;YACV,KAAK,SAAO,kBAAA,SAAS,KAAK,cAAd,sCAAA,gBAAgB,GAAG,MAAK,YAAY,SAAO,mBAAA,SAAS,KAAK,cAAd,uCAAA,iBAAgB,MAAM,MAAK,WAAW,SAAS,KAAK,CAAC,GAAG,GAAI,CAAA,OAAO,YAAY,KAAK,UAAU,SAAS,KAAK,CAAC,MAAM,GAAG,CAAA,IAAK;YAClL,KAAK,GAAE,mBAAA,SAAS,KAAK,cAAd,uCAAA,iBAAgB,KAAK;QAC9B;QACA,MAAK;QACL,eAAa,kBAAkB,CAAC,cAAc;qBAC9C,0DAAC;QACC,MAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,2CACA;YACE,uDAAuD;QACzD;qBAEJ,0DAAC;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<HTMLDivElement | null>(null);\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: typeof rowProps.style?.top === 'number' && typeof rowProps.style?.height === 'number' ? rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0) : 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"}
@@ -25,9 +25,10 @@ function $parcel$interopDefault(a) {
25
25
 
26
26
 
27
27
  function $7ee9a922ee4e8032$export$2c0bab5914a9d088(props) {
28
+ var _rowProps_style, _rowProps_style1, _rowProps_style2;
28
29
  let { dropState: dropState, dragAndDropHooks: dragAndDropHooks } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
29
30
  const { target: target, rowProps: rowProps } = props;
30
- let ref = (0, $khOO8$useRef)(undefined);
31
+ let ref = (0, $khOO8$useRef)(null);
31
32
  let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
32
33
  let { visuallyHiddenProps: visuallyHiddenProps } = (0, $khOO8$useVisuallyHidden)();
33
34
  let isDropTarget = dropState.isDropTarget(target);
@@ -35,8 +36,8 @@ function $7ee9a922ee4e8032$export$2c0bab5914a9d088(props) {
35
36
  return /*#__PURE__*/ (0, $khOO8$react).createElement("div", {
36
37
  style: {
37
38
  position: 'absolute',
38
- top: rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0),
39
- width: rowProps.style.width
39
+ top: typeof ((_rowProps_style = rowProps.style) === null || _rowProps_style === void 0 ? void 0 : _rowProps_style.top) === 'number' && typeof ((_rowProps_style1 = rowProps.style) === null || _rowProps_style1 === void 0 ? void 0 : _rowProps_style1.height) === 'number' ? rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0) : 0,
40
+ width: (_rowProps_style2 = rowProps.style) === null || _rowProps_style2 === void 0 ? void 0 : _rowProps_style2.width
40
41
  },
41
42
  role: "row",
42
43
  "aria-hidden": dropIndicatorProps['aria-hidden']
@@ -25,9 +25,10 @@ function $parcel$interopDefault(a) {
25
25
 
26
26
 
27
27
  function $7ee9a922ee4e8032$export$2c0bab5914a9d088(props) {
28
+ var _rowProps_style, _rowProps_style1, _rowProps_style2;
28
29
  let { dropState: dropState, dragAndDropHooks: dragAndDropHooks } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
29
30
  const { target: target, rowProps: rowProps } = props;
30
- let ref = (0, $khOO8$useRef)(undefined);
31
+ let ref = (0, $khOO8$useRef)(null);
31
32
  let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
32
33
  let { visuallyHiddenProps: visuallyHiddenProps } = (0, $khOO8$useVisuallyHidden)();
33
34
  let isDropTarget = dropState.isDropTarget(target);
@@ -35,8 +36,8 @@ function $7ee9a922ee4e8032$export$2c0bab5914a9d088(props) {
35
36
  return /*#__PURE__*/ (0, $khOO8$react).createElement("div", {
36
37
  style: {
37
38
  position: 'absolute',
38
- top: rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0),
39
- width: rowProps.style.width
39
+ top: typeof ((_rowProps_style = rowProps.style) === null || _rowProps_style === void 0 ? void 0 : _rowProps_style.top) === 'number' && typeof ((_rowProps_style1 = rowProps.style) === null || _rowProps_style1 === void 0 ? void 0 : _rowProps_style1.height) === 'number' ? rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0) : 0,
40
+ width: (_rowProps_style2 = rowProps.style) === null || _rowProps_style2 === void 0 ? void 0 : _rowProps_style2.width
40
41
  },
41
42
  role: "row",
42
43
  "aria-hidden": dropIndicatorProps['aria-hidden']
@@ -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,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"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,SAAS,0CAAmB,KAA8B;QAkB7C,iBAA2C,kBAChD;IAlBb,IAAI,aAAC,SAAS,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,yCAAc;IAClD,MAAM,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IAE3B,IAAI,MAAM,CAAA,GAAA,aAAK,EAAyB;IACxC,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAkB,gBAAgB,CAAE,OAAO,WAAY;IAClF,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,wBAAgB;IAE5C,IAAI,eAAe,UAAW,YAAY,CAAC;IAE3C,IAAI,CAAC,gBAAgB,kBAAkB,CAAC,cAAc,EACpD,OAAO;IAGT,qBACE,gCAAC;QACC,OAAO;YACL,UAAU;YACV,KAAK,SAAO,kBAAA,SAAS,KAAK,cAAd,sCAAA,gBAAgB,GAAG,MAAK,YAAY,SAAO,mBAAA,SAAS,KAAK,cAAd,uCAAA,iBAAgB,MAAM,MAAK,WAAW,SAAS,KAAK,CAAC,GAAG,GAAI,CAAA,OAAO,YAAY,KAAK,UAAU,SAAS,KAAK,CAAC,MAAM,GAAG,CAAA,IAAK;YAClL,KAAK,GAAE,mBAAA,SAAS,KAAK,cAAd,uCAAA,iBAAgB,KAAK;QAC9B;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<HTMLDivElement | null>(null);\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: typeof rowProps.style?.top === 'number' && typeof rowProps.style?.height === 'number' ? rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0) : 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"}
@@ -22,7 +22,7 @@ function $parcel$export(e, n, v, s) {
22
22
 
23
23
  $parcel$export(module.exports, "ResizeStateContext", () => $2877766f94c67a67$export$b517d84d4ad20b24);
24
24
  $parcel$export(module.exports, "Resizer", () => $2877766f94c67a67$export$48a76196cafe3b93);
25
- /* eslint-disable jsx-a11y/role-supports-aria-props */
25
+
26
26
  var $1ed2399e74febaae$exports = {};
27
27
  $1ed2399e74febaae$exports = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"-1 0 31 32\">\n <filter id=\"shadow\">\n <feDropShadow dx=\"0\" dy=\"0.5\" stdDeviation=\"1.2\" flood-opacity=\"0.7\"></feDropShadow>\n </filter>\n <g filter=\"url('#shadow')\" transform=\"translate(.5 0)\">\n <path d=\"M9.5,2c.27614,0,.5,.22388,.5,.5v6.5h3v-1.74951c0-.14893,.12215-.25049,.2513-.25049,.05457,0,.1104,.01819,.15875,.05847l2.58995,2.44153-2.58995,2.44153c-.04837,.04028-.10419,.05847-.15875,.05847-.12914,0-.2513-.10156-.2513-.25049v-1.74951h-3v6.5c0,.27612-.22386,.5-.5,.5h-1c-.27614,0-.5-.22388-.5-.5V2.5c0-.27612,.22386-.5,.5-.5h1Zm0-1h-1c-.82843,0-1.5,.67157-1.5,1.5v14c0,.82843,.67157,1.5,1.5,1.5h1c.82843,0,1.5-.67157,1.5-1.5v-5.5h1v.67757c0,.40416,.1632,.80501,.48197,1.05347,.49639,.3869,1.14001,.33571,1.56838-.02144l.02344-.01953,.0222-.02087,2.97589-2.80537c.20937-.19737,.20937-.53028,0-.72765l-2.97589-2.80537-.0222-.02087-.02345-.01965c-.22456-.18713-.5083-.29028-.79895-.29028-.3208,0-.62624,.12134-.86003,.34167-.24872,.23438-.39136,.56567-.39136,.90881v.74951h-1V2.5c0-.82843-.67157-1.5-1.5-1.5Z\" fill=\"#fff\"></path>\n <path d=\"M10,16.5v-6.5h3v1.74952c0,.21196,.24721,.32775,.41005,.19206l2.58995-2.44158-2.58995-2.44158c-.16283-.13569-.41005-.0199-.41005,.19206v1.74952h-3V2.5c0-.27614-.22386-.5-.5-.5h-1c-.27614,0-.5,.22386-.5,.5v14c0,.27614,.22386,.5,.5,.5h1c.27614,0,.5-.22386,.5-.5Z\"></path>\n </g>\n</svg>\n";
28
28
 
@@ -60,6 +60,7 @@ const $2877766f94c67a67$var$CURSORS = {
60
60
  const $2877766f94c67a67$export$b517d84d4ad20b24 = /*#__PURE__*/ (0, $hxFQC$react.createContext)(null);
61
61
  function $2877766f94c67a67$var$Resizer(props, ref) {
62
62
  let { column: column, showResizer: showResizer } = props;
63
+ let objectRef = (0, $hxFQC$reactariautils.useObjectRef)(ref);
63
64
  let { isEmpty: isEmpty, onFocusedResizer: onFocusedResizer } = (0, $e39c6de4eb69450d$exports.useTableContext)();
64
65
  let layout = (0, $hxFQC$react.useContext)($2877766f94c67a67$export$b517d84d4ad20b24);
65
66
  // Virtualizer re-renders, but these components are all cached
@@ -94,7 +95,7 @@ function $2877766f94c67a67$var$Resizer(props, ref) {
94
95
  let { inputProps: inputProps, resizerProps: resizerProps } = (0, $hxFQC$reactariatable.useTableColumnResize)((0, $hxFQC$reactariautils.mergeProps)(props, {
95
96
  'aria-label': stringFormatter.format('columnResizer'),
96
97
  isDisabled: isEmpty
97
- }), layout, ref);
98
+ }), layout, objectRef);
98
99
  let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);
99
100
  let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);
100
101
  let isResizing = layout.resizingColumn === column.key;
@@ -117,7 +118,7 @@ function $2877766f94c67a67$var$Resizer(props, ref) {
117
118
  style: style,
118
119
  className: (0, $hxFQC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'spectrum-Table-columnResizer')
119
120
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).createElement("input", {
120
- ref: ref,
121
+ ref: objectRef,
121
122
  ...(0, $hxFQC$reactariautils.mergeProps)(inputProps, {
122
123
  onFocus: onFocusedResizer
123
124
  })
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAoD;;ACApD,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;AHsBjB,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,CAAC,0BAA0B,2BAA2B,YAAY,EAAE,SAAS,CAAC;SAEjN,OAAO,CAAC,wBAAwB,EAAE,mBAAmB,KAAK,QAAQ,EAAE,SAAS,CAAC;AAElF;AAWA,MAAM,gCAAU;IACd,IAAI,gCAAU,CAAA,GAAA,gEAAO,GAAG;IACxB,GAAG,gCAAU,CAAA,GAAA,gEAAM,GAAG;IACtB,GAAG,gCAAU,CAAA,GAAA,gEAAM,GAAG;AACxB;AAEO,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAA0C;AAExF,SAAS,8BAAW,KAAsB,EAAE,GAAuC;IACjF,IAAI,UAAC,MAAM,eAAE,WAAW,EAAC,GAAG;IAC5B,IAAI,WAAC,OAAO,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,yCAAc;IAChD,IAAI,SAAS,CAAA,GAAA,uBAAS,EAAE;IACxB,8DAA8D;IAC9D,wEAAwE;IACxE,gFAAgF;IAChF,CAAA,GAAA,+CAAoB;IACpB,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAE1B,IAAI,CAAC,eAAe,iBA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,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACnD,0DAAC;QACE,GAAG,YAAY;QAChB,MAAK;QACL,OAAO;QACP,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,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"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;ACAA,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;AHsBjB,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,CAAC,0BAA0B,2BAA2B,YAAY,EAAE,UAAU;SAEjN,OAAO,CAAC,wBAAwB,EAAE,mBAAmB,KAAK,QAAQ,EAAE,UAAU;AAElF;AAWA,MAAM,gCAAU;IACd,IAAI,gCAAU,CAAA,GAAA,gEAAO,GAAG;IACxB,GAAG,gCAAU,CAAA,GAAA,gEAAM,GAAG;IACtB,GAAG,gCAAU,CAAA,GAAA,gEAAM,GAAG;AACxB;AAEO,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAA0C;AAExF,SAAS,8BAAW,KAAsB,EAAE,GAA0C;IACpF,IAAI,UAAC,MAAM,eAAE,WAAW,EAAC,GAAG;IAC5B,IAAI,YAAY,CAAA,GAAA,kCAAW,EAAE;IAC7B,IA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0660b4.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-8e8d37d2cf10eebe.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-cba9561fd7f119d5.js"],"sourcesContent":[" \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, useObjectRef} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, 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: ForwardedRef<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let objectRef = useObjectRef(ref);\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, objectRef);\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={objectRef}\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
@@ -4,7 +4,7 @@ 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";
6
6
  import {FocusRing as $dIfdp$FocusRing} from "@react-aria/focus";
7
- import {isWebKit as $dIfdp$isWebKit, mergeProps as $dIfdp$mergeProps} from "@react-aria/utils";
7
+ import {isWebKit as $dIfdp$isWebKit, useObjectRef as $dIfdp$useObjectRef, mergeProps as $dIfdp$mergeProps} from "@react-aria/utils";
8
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";
@@ -15,7 +15,7 @@ import {useUNSTABLE_PortalContext as $dIfdp$useUNSTABLE_PortalContext} from "@re
15
15
  function $parcel$interopDefault(a) {
16
16
  return a && a.__esModule ? a.default : a;
17
17
  }
18
- /* eslint-disable jsx-a11y/role-supports-aria-props */
18
+
19
19
  var $2fc56f9fdd93be52$exports = {};
20
20
  $2fc56f9fdd93be52$exports = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"-1 0 31 32\">\n <filter id=\"shadow\">\n <feDropShadow dx=\"0\" dy=\"0.5\" stdDeviation=\"1.2\" flood-opacity=\"0.7\"></feDropShadow>\n </filter>\n <g filter=\"url('#shadow')\" transform=\"translate(.5 0)\">\n <path d=\"M9.5,2c.27614,0,.5,.22388,.5,.5v6.5h3v-1.74951c0-.14893,.12215-.25049,.2513-.25049,.05457,0,.1104,.01819,.15875,.05847l2.58995,2.44153-2.58995,2.44153c-.04837,.04028-.10419,.05847-.15875,.05847-.12914,0-.2513-.10156-.2513-.25049v-1.74951h-3v6.5c0,.27612-.22386,.5-.5,.5h-1c-.27614,0-.5-.22388-.5-.5V2.5c0-.27612,.22386-.5,.5-.5h1Zm0-1h-1c-.82843,0-1.5,.67157-1.5,1.5v14c0,.82843,.67157,1.5,1.5,1.5h1c.82843,0,1.5-.67157,1.5-1.5v-5.5h1v.67757c0,.40416,.1632,.80501,.48197,1.05347,.49639,.3869,1.14001,.33571,1.56838-.02144l.02344-.01953,.0222-.02087,2.97589-2.80537c.20937-.19737,.20937-.53028,0-.72765l-2.97589-2.80537-.0222-.02087-.02345-.01965c-.22456-.18713-.5083-.29028-.79895-.29028-.3208,0-.62624,.12134-.86003,.34167-.24872,.23438-.39136,.56567-.39136,.90881v.74951h-1V2.5c0-.82843-.67157-1.5-1.5-1.5Z\" fill=\"#fff\"></path>\n <path d=\"M10,16.5v-6.5h3v1.74952c0,.21196,.24721,.32775,.41005,.19206l2.58995-2.44158-2.58995-2.44158c-.16283-.13569-.41005-.0199-.41005,.19206v1.74952h-3V2.5c0-.27614-.22386-.5-.5-.5h-1c-.27614,0-.5,.22386-.5,.5v14c0,.27614,.22386,.5,.5,.5h1c.27614,0,.5-.22386,.5-.5Z\"></path>\n </g>\n</svg>\n";
21
21
 
@@ -53,6 +53,7 @@ const $fc695d2eafc2b351$var$CURSORS = {
53
53
  const $fc695d2eafc2b351$export$b517d84d4ad20b24 = /*#__PURE__*/ (0, $dIfdp$createContext)(null);
54
54
  function $fc695d2eafc2b351$var$Resizer(props, ref) {
55
55
  let { column: column, showResizer: showResizer } = props;
56
+ let objectRef = (0, $dIfdp$useObjectRef)(ref);
56
57
  let { isEmpty: isEmpty, onFocusedResizer: onFocusedResizer } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
57
58
  let layout = (0, $dIfdp$useContext)($fc695d2eafc2b351$export$b517d84d4ad20b24);
58
59
  // Virtualizer re-renders, but these components are all cached
@@ -87,7 +88,7 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
87
88
  let { inputProps: inputProps, resizerProps: resizerProps } = (0, $dIfdp$useTableColumnResize)((0, $dIfdp$mergeProps)(props, {
88
89
  'aria-label': stringFormatter.format('columnResizer'),
89
90
  isDisabled: isEmpty
90
- }), layout, ref);
91
+ }), layout, objectRef);
91
92
  let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);
92
93
  let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);
93
94
  let isResizing = layout.resizingColumn === column.key;
@@ -110,7 +111,7 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
110
111
  style: style,
111
112
  className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))), 'spectrum-Table-columnResizer')
112
113
  }, /*#__PURE__*/ (0, $dIfdp$react).createElement("input", {
113
- ref: ref,
114
+ ref: objectRef,
114
115
  ...(0, $dIfdp$mergeProps)(inputProps, {
115
116
  onFocus: onFocusedResizer
116
117
  })
@@ -4,7 +4,7 @@ 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";
6
6
  import {FocusRing as $dIfdp$FocusRing} from "@react-aria/focus";
7
- import {isWebKit as $dIfdp$isWebKit, mergeProps as $dIfdp$mergeProps} from "@react-aria/utils";
7
+ import {isWebKit as $dIfdp$isWebKit, useObjectRef as $dIfdp$useObjectRef, mergeProps as $dIfdp$mergeProps} from "@react-aria/utils";
8
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";
@@ -15,7 +15,7 @@ import {useUNSTABLE_PortalContext as $dIfdp$useUNSTABLE_PortalContext} from "@re
15
15
  function $parcel$interopDefault(a) {
16
16
  return a && a.__esModule ? a.default : a;
17
17
  }
18
- /* eslint-disable jsx-a11y/role-supports-aria-props */
18
+
19
19
  var $2fc56f9fdd93be52$exports = {};
20
20
  $2fc56f9fdd93be52$exports = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"-1 0 31 32\">\n <filter id=\"shadow\">\n <feDropShadow dx=\"0\" dy=\"0.5\" stdDeviation=\"1.2\" flood-opacity=\"0.7\"></feDropShadow>\n </filter>\n <g filter=\"url('#shadow')\" transform=\"translate(.5 0)\">\n <path d=\"M9.5,2c.27614,0,.5,.22388,.5,.5v6.5h3v-1.74951c0-.14893,.12215-.25049,.2513-.25049,.05457,0,.1104,.01819,.15875,.05847l2.58995,2.44153-2.58995,2.44153c-.04837,.04028-.10419,.05847-.15875,.05847-.12914,0-.2513-.10156-.2513-.25049v-1.74951h-3v6.5c0,.27612-.22386,.5-.5,.5h-1c-.27614,0-.5-.22388-.5-.5V2.5c0-.27612,.22386-.5,.5-.5h1Zm0-1h-1c-.82843,0-1.5,.67157-1.5,1.5v14c0,.82843,.67157,1.5,1.5,1.5h1c.82843,0,1.5-.67157,1.5-1.5v-5.5h1v.67757c0,.40416,.1632,.80501,.48197,1.05347,.49639,.3869,1.14001,.33571,1.56838-.02144l.02344-.01953,.0222-.02087,2.97589-2.80537c.20937-.19737,.20937-.53028,0-.72765l-2.97589-2.80537-.0222-.02087-.02345-.01965c-.22456-.18713-.5083-.29028-.79895-.29028-.3208,0-.62624,.12134-.86003,.34167-.24872,.23438-.39136,.56567-.39136,.90881v.74951h-1V2.5c0-.82843-.67157-1.5-1.5-1.5Z\" fill=\"#fff\"></path>\n <path d=\"M10,16.5v-6.5h3v1.74952c0,.21196,.24721,.32775,.41005,.19206l2.58995-2.44158-2.58995-2.44158c-.16283-.13569-.41005-.0199-.41005,.19206v1.74952h-3V2.5c0-.27614-.22386-.5-.5-.5h-1c-.27614,0-.5,.22386-.5,.5v14c0,.27614,.22386,.5,.5,.5h1c.27614,0,.5-.22386,.5-.5Z\"></path>\n </g>\n</svg>\n";
21
21
 
@@ -53,6 +53,7 @@ const $fc695d2eafc2b351$var$CURSORS = {
53
53
  const $fc695d2eafc2b351$export$b517d84d4ad20b24 = /*#__PURE__*/ (0, $dIfdp$createContext)(null);
54
54
  function $fc695d2eafc2b351$var$Resizer(props, ref) {
55
55
  let { column: column, showResizer: showResizer } = props;
56
+ let objectRef = (0, $dIfdp$useObjectRef)(ref);
56
57
  let { isEmpty: isEmpty, onFocusedResizer: onFocusedResizer } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
57
58
  let layout = (0, $dIfdp$useContext)($fc695d2eafc2b351$export$b517d84d4ad20b24);
58
59
  // Virtualizer re-renders, but these components are all cached
@@ -87,7 +88,7 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
87
88
  let { inputProps: inputProps, resizerProps: resizerProps } = (0, $dIfdp$useTableColumnResize)((0, $dIfdp$mergeProps)(props, {
88
89
  'aria-label': stringFormatter.format('columnResizer'),
89
90
  isDisabled: isEmpty
90
- }), layout, ref);
91
+ }), layout, objectRef);
91
92
  let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);
92
93
  let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);
93
94
  let isResizing = layout.resizingColumn === column.key;
@@ -110,7 +111,7 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
110
111
  style: style,
111
112
  className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))), 'spectrum-Table-columnResizer')
112
113
  }, /*#__PURE__*/ (0, $dIfdp$react).createElement("input", {
113
- ref: ref,
114
+ ref: objectRef,
114
115
  ...(0, $dIfdp$mergeProps)(inputProps, {
115
116
  onFocus: onFocusedResizer
116
117
  })
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAoD;;ACApD,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;AHsBjB,SAAS,gCAAU,GAAW,EAAE,QAAgB;IAC9C,kGAAkG;IAClG,uGAAuG;IACvG,kFAAkF;IAClF,IAAI,CAAA,GAAA,eAAO,KACT,OAAO,CAAC,kCAAkC,EAAE,mBAAmB,KAAK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AG,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":"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AAE,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":[" \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, useObjectRef} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, 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: ForwardedRef<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let objectRef = useObjectRef(ref);\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, objectRef);\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={objectRef}\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)(undefined);
30
+ let ref = (0, $ijPMf$react.useRef)(null);
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,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"}
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,EAAyB;IACxC,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAkB,gBAAgB,CAAE;QAC7D,QAAQ;YAAC,MAAM;QAAM;IACvB,GAAG,WAAY;IACf,IAAI,eAAe,UAAW,YAAY,CAAC;QAAC,MAAM;IAAM;IACxD,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<HTMLDivElement | null>(null);\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)(undefined);
20
+ let ref = (0, $6tvhl$useRef)(null);
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)(undefined);
20
+ let ref = (0, $6tvhl$useRef)(null);
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,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"}
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,EAAyB;IACxC,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAkB,gBAAgB,CAAE;QAC7D,QAAQ;YAAC,MAAM;QAAM;IACvB,GAAG,WAAY;IACf,IAAI,eAAe,UAAW,YAAY,CAAC;QAAC,MAAM;IAAM;IACxD,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<HTMLDivElement | null>(null);\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"}