@react-spectrum/buttongroup 3.4.3-nightly.3527 → 3.4.3-nightly.3530

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/main.js CHANGED
@@ -61,6 +61,7 @@ function $d384d3249418a107$var$ButtonGroup(props, ref) {
61
61
  // Measure, and update if there is overflow.
62
62
  yield computeHasOverflow();
63
63
  });
64
+ // eslint-disable-next-line react-hooks/exhaustive-deps
64
65
  }, [
65
66
  domRef,
66
67
  orientation,
@@ -79,6 +80,7 @@ function $d384d3249418a107$var$ButtonGroup(props, ref) {
79
80
  let parent = $fJaYF$react.useRef();
80
81
  $fJaYF$reactariautils.useLayoutEffect(()=>{
81
82
  if (domRef.current) parent.current = domRef.current.parentElement;
83
+ // eslint-disable-next-line react-hooks/exhaustive-deps
82
84
  }, [
83
85
  domRef.current
84
86
  ]);
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAsC;AACtC,GAA6C;AAC7C,GAAgD;AAChD,GAAmD;AACnD,GAAgD;AAJhD,yCAAsC,GAAG,CAA6B;AACtE,yCAA6C,GAAG,CAAoC;AACpF,yCAAgD,GAAG,CAAuC;AAC1F,wCAAmD,GAAG,CAA0C;AAChG,yCAAgD,GAAG,CAAuC;;;SDuBjF,iCAAW,CAAC,KAA+B,EAAE,GAA2B,EAAE,CAAC;IAClF,GAAG,CAAC,CAAC,QAAA,KAAK,EAAA,CAAC,GAAG,wCAAW;IACzB,KAAK,GAAG,6CAAgB,CAAC,KAAK;IAC9B,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAa;IAEzC,GAAG,CAAC,CAAC,WACH,QAAQ,gBACR,WAAW,GAAG,CAAY,0BAC1B,UAAU,UACV,KAAK,GAAG,CAAO,YACZ,UAAU,CACf,CAAC,GAAG,KAAK;IAET,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uC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IACxK,GAAG,CAAC,MAAM,GAAG,mBAAM;IACnB,qCAAe,KAAO,CAAC;QACrB,EAAE,EAAE,MAAM,CAAC,OAAO,EAChB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa;IAEjD,CAAC,EAAE,CAAC;QAAA,MAAM,CAAC,OAAO;IAAA,CAAC;IACnB,2CAAiB,CAAC,CAAC;QAAA,GAAG,EAAE,MAAM;QAAE,QAAQ,EAAE,gBAAgB;IAAA,CAAC;IAE3D,MAAM,oEACH,CAAG;WACE,oCAAc,CAAC,UAAU;WACzB,UAAU;QACd,GAAG,EAAE,MAAM;QACX,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAsB,uBACtB,CAAC;YACC,CAAgC,iCAAE,WAAW,KAAK,CAAU,aAAI,WAAW;YAC3E,CAAgC,iCAAE,KAAK,KAAK,CAAK;YACjD,CAAmC,oCAAE,KAAK,KAAK,CAAQ;QACzD,CAAC,EACD,UAAU,CAAC,SAAS;0EAGvB,sCAAY;QACX,KAAK,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;gBACP,gBAAgB,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAA6B;YACpE,CAAC;QACH,CAAC;0EACA,qCAAQ;QAAC,UAAU,EAAE,UAAU;OAC7B,QAAQ;AAKnB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,GAAG,CAAC,yCAAY,iBAAG,sCAAK,CAAC,UAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/buttongroup/src/index.ts","packages/@react-spectrum/buttongroup/src/ButtonGroup.tsx","packages/@adobe/spectrum-css-temp/components/buttongroup/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {ButtonGroup} from './ButtonGroup';\nexport type {SpectrumButtonGroupProps} from '@react-types/buttongroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n classNames,\n SlotProvider,\n useDOMRef,\n useResizeObserver,\n useSlotProps,\n useStyleProps\n} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps, useLayoutEffect, useValueEffect} from '@react-aria/utils';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useCallback, useRef} from 'react';\nimport {SpectrumButtonGroupProps} from '@react-types/buttongroup';\nimport styles from '@adobe/spectrum-css-temp/components/buttongroup/vars.css';\n\nfunction ButtonGroup(props: SpectrumButtonGroupProps, ref: DOMRef<HTMLDivElement>) {\n let {scale} = useProvider();\n props = useProviderProps(props);\n props = useSlotProps(props, 'buttonGroup');\n\n let {\n children,\n orientation = 'horizontal',\n isDisabled,\n align = 'start',\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n let [hasOverflow, setHasOverflow] = useValueEffect(false);\n\n let checkForOverflow = useCallback(() => {\n let computeHasOverflow = () => {\n if (domRef.current && orientation === 'horizontal') {\n let buttonGroupChildren = Array.from(domRef.current.children) as HTMLElement[];\n let maxX = domRef.current.offsetWidth + 1; // + 1 to account for rounding errors\n // If any buttons have negative X positions (align=\"end\") or extend beyond\n // the width of the button group (align=\"start\"), then switch to vertical.\n if (buttonGroupChildren.some(child => child.offsetLeft < 0 || child.offsetLeft + child.offsetWidth > maxX)) {\n return true;\n }\n return false;\n }\n };\n if (orientation === 'horizontal') {\n setHasOverflow(function* () {\n // Force to horizontal for measurement.\n yield false;\n\n // Measure, and update if there is overflow.\n yield computeHasOverflow();\n });\n }\n }, [domRef, orientation, scale, setHasOverflow, children]);\n\n // There are two main reasons we need to remeasure:\n // 1. Internal changes: Check for initial overflow or when orientation/scale/children change (from checkForOverflow dep array)\n useLayoutEffect(() => {\n checkForOverflow();\n }, [checkForOverflow]);\n\n // 2. External changes: buttongroup won't change size due to any parents changing size, so listen to its container for size changes to figure out if we should remeasure\n let parent = useRef<HTMLElement>();\n useLayoutEffect(() => {\n if (domRef.current) {\n parent.current = domRef.current.parentElement as HTMLElement;\n }\n }, [domRef.current]);\n useResizeObserver({ref: parent, onResize: checkForOverflow});\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ButtonGroup',\n {\n 'spectrum-ButtonGroup--vertical': orientation === 'vertical' || hasOverflow,\n 'spectrum-ButtonGroup--alignEnd': align === 'end',\n 'spectrum-ButtonGroup--alignCenter': align === 'center'\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n button: {\n UNSAFE_className: classNames(styles, 'spectrum-ButtonGroup-Button')\n }\n }}>\n <Provider isDisabled={isDisabled}>\n {children}\n </Provider>\n </SlotProvider>\n </div>\n );\n}\n\n/**\n * ButtonGroup handles overflow for a grouping of buttons whose actions are related to each other.\n */\nlet _ButtonGroup = React.forwardRef(ButtonGroup);\nexport {_ButtonGroup as ButtonGroup};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAsC;AACtC,GAA6C;AAC7C,GAAgD;AAChD,GAAmD;AACnD,GAAgD;AAJhD,yCAAsC,GAAG,CAA6B;AACtE,yCAA6C,GAAG,CAAoC;AACpF,yCAAgD,GAAG,CAAuC;AAC1F,wCAAmD,GAAG,CAA0C;AAChG,yCAAgD,GAAG,CAAuC;;;SDuBjF,iCAAW,CAAC,KAA+B,EAAE,GAA2B,EAAE,CAAC;IAClF,GAAG,CAAC,CAAC,QAAA,KAAK,EAAA,CAAC,GAAG,wCAAW;IACzB,KAAK,GAAG,6CAAgB,CAAC,KAAK;IAC9B,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAa;IAEzC,GAAG,CAAC,CAAC,WACH,QAAQ,gBACR,WAAW,GAAG,CAAY,0BAC1B,UAAU,UACV,KAAK,GAAG,CAAO,YACZ,UAAU,CACf,CAAC,GAAG,KAAK;IAET,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAC1B,GAAG,EAAE,WAAW,EAAE,cAAc,IAAI,oCAAc,CAAC,KAAK;IAExD,GAAG,CAAC,gBAAgB,GAAG,wBAAW,KAAO,CAAC;QACxC,GAAG,CAAC,kBAAkB,OAAS,CAAC;YAC9B,EAAE,EAAE,MAAM,CAAC,OAAO,IAAI,WAAW,KAAK,CAAY,aAAE,CAAC;gBACnD,GAAG,CAAC,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ;gBAC5D,GAAG,CAAC,IAAI,GAAG,MA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WACzB,UAAU;QACd,GAAG,EAAE,MAAM;QACX,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAsB,uBACtB,CAAC;YACC,CAAgC,iCAAE,WAAW,KAAK,CAAU,aAAI,WAAW;YAC3E,CAAgC,iCAAE,KAAK,KAAK,CAAK;YACjD,CAAmC,oCAAE,KAAK,KAAK,CAAQ;QACzD,CAAC,EACD,UAAU,CAAC,SAAS;0EAGvB,sCAAY;QACX,KAAK,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;gBACP,gBAAgB,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAA6B;YACpE,CAAC;QACH,CAAC;0EACA,qCAAQ;QAAC,UAAU,EAAE,UAAU;OAC7B,QAAQ;AAKnB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,GAAG,CAAC,yCAAY,iBAAG,sCAAK,CAAC,UAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/buttongroup/src/index.ts","packages/@react-spectrum/buttongroup/src/ButtonGroup.tsx","packages/@adobe/spectrum-css-temp/components/buttongroup/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {ButtonGroup} from './ButtonGroup';\nexport type {SpectrumButtonGroupProps} from '@react-types/buttongroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n classNames,\n SlotProvider,\n useDOMRef,\n useResizeObserver,\n useSlotProps,\n useStyleProps\n} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps, useLayoutEffect, useValueEffect} from '@react-aria/utils';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useCallback, useRef} from 'react';\nimport {SpectrumButtonGroupProps} from '@react-types/buttongroup';\nimport styles from '@adobe/spectrum-css-temp/components/buttongroup/vars.css';\n\nfunction ButtonGroup(props: SpectrumButtonGroupProps, ref: DOMRef<HTMLDivElement>) {\n let {scale} = useProvider();\n props = useProviderProps(props);\n props = useSlotProps(props, 'buttonGroup');\n\n let {\n children,\n orientation = 'horizontal',\n isDisabled,\n align = 'start',\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n let [hasOverflow, setHasOverflow] = useValueEffect(false);\n\n let checkForOverflow = useCallback(() => {\n let computeHasOverflow = () => {\n if (domRef.current && orientation === 'horizontal') {\n let buttonGroupChildren = Array.from(domRef.current.children) as HTMLElement[];\n let maxX = domRef.current.offsetWidth + 1; // + 1 to account for rounding errors\n // If any buttons have negative X positions (align=\"end\") or extend beyond\n // the width of the button group (align=\"start\"), then switch to vertical.\n if (buttonGroupChildren.some(child => child.offsetLeft < 0 || child.offsetLeft + child.offsetWidth > maxX)) {\n return true;\n }\n return false;\n }\n };\n if (orientation === 'horizontal') {\n setHasOverflow(function* () {\n // Force to horizontal for measurement.\n yield false;\n\n // Measure, and update if there is overflow.\n yield computeHasOverflow();\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [domRef, orientation, scale, setHasOverflow, children]);\n\n // There are two main reasons we need to remeasure:\n // 1. Internal changes: Check for initial overflow or when orientation/scale/children change (from checkForOverflow dep array)\n useLayoutEffect(() => {\n checkForOverflow();\n }, [checkForOverflow]);\n\n // 2. External changes: buttongroup won't change size due to any parents changing size, so listen to its container for size changes to figure out if we should remeasure\n let parent = useRef<HTMLElement>();\n useLayoutEffect(() => {\n if (domRef.current) {\n parent.current = domRef.current.parentElement as HTMLElement;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [domRef.current]);\n useResizeObserver({ref: parent, onResize: checkForOverflow});\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ButtonGroup',\n {\n 'spectrum-ButtonGroup--vertical': orientation === 'vertical' || hasOverflow,\n 'spectrum-ButtonGroup--alignEnd': align === 'end',\n 'spectrum-ButtonGroup--alignCenter': align === 'center'\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n button: {\n UNSAFE_className: classNames(styles, 'spectrum-ButtonGroup-Button')\n }\n }}>\n <Provider isDisabled={isDisabled}>\n {children}\n </Provider>\n </SlotProvider>\n </div>\n );\n}\n\n/**\n * ButtonGroup handles overflow for a grouping of buttons whose actions are related to each other.\n */\nlet _ButtonGroup = React.forwardRef(ButtonGroup);\nexport {_ButtonGroup as ButtonGroup};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -59,6 +59,7 @@ function $bd4bfa55854eb3bf$var$ButtonGroup(props, ref) {
59
59
  // Measure, and update if there is overflow.
60
60
  yield computeHasOverflow();
61
61
  });
62
+ // eslint-disable-next-line react-hooks/exhaustive-deps
62
63
  }, [
63
64
  domRef,
64
65
  orientation,
@@ -77,6 +78,7 @@ function $bd4bfa55854eb3bf$var$ButtonGroup(props, ref) {
77
78
  let parent = $3Yfv0$useRef();
78
79
  $3Yfv0$useLayoutEffect(()=>{
79
80
  if (domRef.current) parent.current = domRef.current.parentElement;
81
+ // eslint-disable-next-line react-hooks/exhaustive-deps
80
82
  }, [
81
83
  domRef.current
82
84
  ]);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAsC;AACtC,GAA6C;AAC7C,GAAgD;AAChD,GAAmD;AACnD,GAAgD;AAJhD,yCAAsC,GAAG,CAA6B;AACtE,yCAA6C,GAAG,CAAoC;AACpF,yCAAgD,GAAG,CAAuC;AAC1F,wCAAmD,GAAG,CAA0C;AAChG,yCAAgD,GAAG,CAAuC;;;SDuBjF,iCAAW,CAAC,KAA+B,EAAE,GAA2B,EAAE,CAAC;IAClF,GAAG,CAAC,CAAC,QAAA,KAAK,EAAA,CAAC,GAAG,kBAAW;IACzB,KAAK,GAAG,uBAAgB,CAAC,KAAK;IAC9B,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAa;IAEzC,GAAG,CAAC,CAAC,WACH,QAAQ,gBACR,WAAW,GAAG,CAAY,0BAC1B,UAAU,UACV,KAAK,GAAG,CAAO,YACZ,UAAU,CACf,CAAC,GAAG,KAAK;IAET,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,gBAAS,CAAC,GAAG;IAC1B,GAAG,EAAE,WAAW,EAAE,cAAc,IAAI,qBAAc,CAAC,KAAK;IAExD,GAAG,CAAC,gBAAgB,GAAG,kBAAW,KAAO,CAAC;QACxC,GAAG,CAAC,kBAAkB,OAAS,CAAC;YAC9B,EAAE,EAAE,MAAM,CAAC,OAAO,IAAI,WAAW,KAAK,C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AAQ,EAAE,gBAAgB;IAAA,CAAC;IAE3D,MAAM,0CACH,CAAG;WACE,qBAAc,CAAC,UAAU;WACzB,UAAU;QACd,GAAG,EAAE,MAAM;QACX,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAAsB,uBACtB,CAAC;YACC,CAAgC,iCAAE,WAAW,KAAK,CAAU,aAAI,WAAW;YAC3E,CAAgC,iCAAE,KAAK,KAAK,CAAK;YACjD,CAAmC,oCAAE,KAAK,KAAK,CAAQ;QACzD,CAAC,EACD,UAAU,CAAC,SAAS;gDAGvB,mBAAY;QACX,KAAK,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;gBACP,gBAAgB,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAA6B;YACpE,CAAC;QACH,CAAC;gDACA,eAAQ;QAAC,UAAU,EAAE,UAAU;OAC7B,QAAQ;AAKnB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,GAAG,CAAC,yCAAY,iBAAG,YAAK,CAAC,UAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/buttongroup/src/index.ts","packages/@react-spectrum/buttongroup/src/ButtonGroup.tsx","packages/@adobe/spectrum-css-temp/components/buttongroup/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {ButtonGroup} from './ButtonGroup';\nexport type {SpectrumButtonGroupProps} from '@react-types/buttongroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n classNames,\n SlotProvider,\n useDOMRef,\n useResizeObserver,\n useSlotProps,\n useStyleProps\n} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps, useLayoutEffect, useValueEffect} from '@react-aria/utils';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useCallback, useRef} from 'react';\nimport {SpectrumButtonGroupProps} from '@react-types/buttongroup';\nimport styles from '@adobe/spectrum-css-temp/components/buttongroup/vars.css';\n\nfunction ButtonGroup(props: SpectrumButtonGroupProps, ref: DOMRef<HTMLDivElement>) {\n let {scale} = useProvider();\n props = useProviderProps(props);\n props = useSlotProps(props, 'buttonGroup');\n\n let {\n children,\n orientation = 'horizontal',\n isDisabled,\n align = 'start',\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n let [hasOverflow, setHasOverflow] = useValueEffect(false);\n\n let checkForOverflow = useCallback(() => {\n let computeHasOverflow = () => {\n if (domRef.current && orientation === 'horizontal') {\n let buttonGroupChildren = Array.from(domRef.current.children) as HTMLElement[];\n let maxX = domRef.current.offsetWidth + 1; // + 1 to account for rounding errors\n // If any buttons have negative X positions (align=\"end\") or extend beyond\n // the width of the button group (align=\"start\"), then switch to vertical.\n if (buttonGroupChildren.some(child => child.offsetLeft < 0 || child.offsetLeft + child.offsetWidth > maxX)) {\n return true;\n }\n return false;\n }\n };\n if (orientation === 'horizontal') {\n setHasOverflow(function* () {\n // Force to horizontal for measurement.\n yield false;\n\n // Measure, and update if there is overflow.\n yield computeHasOverflow();\n });\n }\n }, [domRef, orientation, scale, setHasOverflow, children]);\n\n // There are two main reasons we need to remeasure:\n // 1. Internal changes: Check for initial overflow or when orientation/scale/children change (from checkForOverflow dep array)\n useLayoutEffect(() => {\n checkForOverflow();\n }, [checkForOverflow]);\n\n // 2. External changes: buttongroup won't change size due to any parents changing size, so listen to its container for size changes to figure out if we should remeasure\n let parent = useRef<HTMLElement>();\n useLayoutEffect(() => {\n if (domRef.current) {\n parent.current = domRef.current.parentElement as HTMLElement;\n }\n }, [domRef.current]);\n useResizeObserver({ref: parent, onResize: checkForOverflow});\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ButtonGroup',\n {\n 'spectrum-ButtonGroup--vertical': orientation === 'vertical' || hasOverflow,\n 'spectrum-ButtonGroup--alignEnd': align === 'end',\n 'spectrum-ButtonGroup--alignCenter': align === 'center'\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n button: {\n UNSAFE_className: classNames(styles, 'spectrum-ButtonGroup-Button')\n }\n }}>\n <Provider isDisabled={isDisabled}>\n {children}\n </Provider>\n </SlotProvider>\n </div>\n );\n}\n\n/**\n * ButtonGroup handles overflow for a grouping of buttons whose actions are related to each other.\n */\nlet _ButtonGroup = React.forwardRef(ButtonGroup);\nexport {_ButtonGroup as ButtonGroup};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAsC;AACtC,GAA6C;AAC7C,GAAgD;AAChD,GAAmD;AACnD,GAAgD;AAJh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,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;gBACP,gBAAgB,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAA6B;YACpE,CAAC;QACH,CAAC;gDACA,eAAQ;QAAC,UAAU,EAAE,UAAU;OAC7B,QAAQ;AAKnB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,GAAG,CAAC,yCAAY,iBAAG,YAAK,CAAC,UAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/buttongroup/src/index.ts","packages/@react-spectrum/buttongroup/src/ButtonGroup.tsx","packages/@adobe/spectrum-css-temp/components/buttongroup/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {ButtonGroup} from './ButtonGroup';\nexport type {SpectrumButtonGroupProps} from '@react-types/buttongroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n classNames,\n SlotProvider,\n useDOMRef,\n useResizeObserver,\n useSlotProps,\n useStyleProps\n} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps, useLayoutEffect, useValueEffect} from '@react-aria/utils';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useCallback, useRef} from 'react';\nimport {SpectrumButtonGroupProps} from '@react-types/buttongroup';\nimport styles from '@adobe/spectrum-css-temp/components/buttongroup/vars.css';\n\nfunction ButtonGroup(props: SpectrumButtonGroupProps, ref: DOMRef<HTMLDivElement>) {\n let {scale} = useProvider();\n props = useProviderProps(props);\n props = useSlotProps(props, 'buttonGroup');\n\n let {\n children,\n orientation = 'horizontal',\n isDisabled,\n align = 'start',\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n let [hasOverflow, setHasOverflow] = useValueEffect(false);\n\n let checkForOverflow = useCallback(() => {\n let computeHasOverflow = () => {\n if (domRef.current && orientation === 'horizontal') {\n let buttonGroupChildren = Array.from(domRef.current.children) as HTMLElement[];\n let maxX = domRef.current.offsetWidth + 1; // + 1 to account for rounding errors\n // If any buttons have negative X positions (align=\"end\") or extend beyond\n // the width of the button group (align=\"start\"), then switch to vertical.\n if (buttonGroupChildren.some(child => child.offsetLeft < 0 || child.offsetLeft + child.offsetWidth > maxX)) {\n return true;\n }\n return false;\n }\n };\n if (orientation === 'horizontal') {\n setHasOverflow(function* () {\n // Force to horizontal for measurement.\n yield false;\n\n // Measure, and update if there is overflow.\n yield computeHasOverflow();\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [domRef, orientation, scale, setHasOverflow, children]);\n\n // There are two main reasons we need to remeasure:\n // 1. Internal changes: Check for initial overflow or when orientation/scale/children change (from checkForOverflow dep array)\n useLayoutEffect(() => {\n checkForOverflow();\n }, [checkForOverflow]);\n\n // 2. External changes: buttongroup won't change size due to any parents changing size, so listen to its container for size changes to figure out if we should remeasure\n let parent = useRef<HTMLElement>();\n useLayoutEffect(() => {\n if (domRef.current) {\n parent.current = domRef.current.parentElement as HTMLElement;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [domRef.current]);\n useResizeObserver({ref: parent, onResize: checkForOverflow});\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ButtonGroup',\n {\n 'spectrum-ButtonGroup--vertical': orientation === 'vertical' || hasOverflow,\n 'spectrum-ButtonGroup--alignEnd': align === 'end',\n 'spectrum-ButtonGroup--alignCenter': align === 'center'\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n button: {\n UNSAFE_className: classNames(styles, 'spectrum-ButtonGroup-Button')\n }\n }}>\n <Provider isDisabled={isDisabled}>\n {children}\n </Provider>\n </SlotProvider>\n </div>\n );\n}\n\n/**\n * ButtonGroup handles overflow for a grouping of buttons whose actions are related to each other.\n */\nlet _ButtonGroup = React.forwardRef(ButtonGroup);\nexport {_ButtonGroup as ButtonGroup};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;AAkHA;;GAEG;AACH,OAAA,IAAI,uJAA4C,CAAC;ACxGjD,YAAY,EAAC,wBAAwB,EAAC,MAAM,0BAA0B,CAAC","sources":["packages/@react-spectrum/buttongroup/src/packages/@react-spectrum/buttongroup/src/ButtonGroup.tsx","packages/@react-spectrum/buttongroup/src/packages/@react-spectrum/buttongroup/src/index.ts","packages/@react-spectrum/buttongroup/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {ButtonGroup} from './ButtonGroup';\nexport type {SpectrumButtonGroupProps} from '@react-types/buttongroup';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;AAoHA;;GAEG;AACH,OAAA,IAAI,uJAA4C,CAAC;AC1GjD,YAAY,EAAC,wBAAwB,EAAC,MAAM,0BAA0B,CAAC","sources":["packages/@react-spectrum/buttongroup/src/packages/@react-spectrum/buttongroup/src/ButtonGroup.tsx","packages/@react-spectrum/buttongroup/src/packages/@react-spectrum/buttongroup/src/index.ts","packages/@react-spectrum/buttongroup/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {ButtonGroup} from './ButtonGroup';\nexport type {SpectrumButtonGroupProps} from '@react-types/buttongroup';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/buttongroup",
3
- "version": "3.4.3-nightly.3527+c3df82214",
3
+ "version": "3.4.3-nightly.3530+47e479098",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,16 +32,16 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/utils": "3.0.0-nightly.1827+c3df82214",
36
- "@react-spectrum/button": "3.0.0-nightly.1827+c3df82214",
37
- "@react-spectrum/text": "3.3.3-nightly.3527+c3df82214",
38
- "@react-spectrum/utils": "3.0.0-nightly.1827+c3df82214",
39
- "@react-types/buttongroup": "3.2.5-nightly.3527+c3df82214",
40
- "@react-types/shared": "3.0.0-nightly.1827+c3df82214"
35
+ "@react-aria/utils": "3.0.0-nightly.1830+47e479098",
36
+ "@react-spectrum/button": "3.0.0-nightly.1830+47e479098",
37
+ "@react-spectrum/text": "3.3.3-nightly.3530+47e479098",
38
+ "@react-spectrum/utils": "3.0.0-nightly.1830+47e479098",
39
+ "@react-types/buttongroup": "3.2.5-nightly.3530+47e479098",
40
+ "@react-types/shared": "3.0.0-nightly.1830+47e479098"
41
41
  },
42
42
  "devDependencies": {
43
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1827+c3df82214",
44
- "@spectrum-icons/workflow": "3.0.0-nightly.1827+c3df82214"
43
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1830+47e479098",
44
+ "@spectrum-icons/workflow": "3.0.0-nightly.1830+47e479098"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@react-spectrum/provider": "^3.0.0",
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "c3df8221442c2683b46025faba2be7e5cc169679"
53
+ "gitHead": "47e479098b7040d297b8712aef86182423cb0962"
54
54
  }
@@ -64,6 +64,7 @@ function ButtonGroup(props: SpectrumButtonGroupProps, ref: DOMRef<HTMLDivElement
64
64
  yield computeHasOverflow();
65
65
  });
66
66
  }
67
+ // eslint-disable-next-line react-hooks/exhaustive-deps
67
68
  }, [domRef, orientation, scale, setHasOverflow, children]);
68
69
 
69
70
  // There are two main reasons we need to remeasure:
@@ -78,6 +79,7 @@ function ButtonGroup(props: SpectrumButtonGroupProps, ref: DOMRef<HTMLDivElement
78
79
  if (domRef.current) {
79
80
  parent.current = domRef.current.parentElement as HTMLElement;
80
81
  }
82
+ // eslint-disable-next-line react-hooks/exhaustive-deps
81
83
  }, [domRef.current]);
82
84
  useResizeObserver({ref: parent, onResize: checkForOverflow});
83
85