@react-spectrum/buttongroup 3.2.4-nightly.3085 → 3.2.4-nightly.3100

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.css CHANGED
@@ -1 +1 @@
1
- ._spectrum-ButtonGroup_b10c2f{-ms-flex-align:start;align-items:flex-start;display:-ms-inline-flexbox;display:inline-flex;position:relative}._spectrum-ButtonGroup_b10c2f ._spectrum-ButtonGroup-Button_b10c2f{-ms-flex-negative:0;flex-shrink:0}[dir=ltr] ._spectrum-ButtonGroup_b10c2f ._spectrum-ButtonGroup-Button_b10c2f+._spectrum-ButtonGroup-Button_b10c2f{margin-left:var(--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200))}[dir=rtl] ._spectrum-ButtonGroup_b10c2f ._spectrum-ButtonGroup-Button_b10c2f+._spectrum-ButtonGroup-Button_b10c2f{margin-right:var(--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200))}._spectrum-ButtonGroup_b10c2f._spectrum-ButtonGroup--alignEnd_b10c2f{-ms-flex-pack:end;justify-content:flex-end}._spectrum-ButtonGroup_b10c2f._spectrum-ButtonGroup--alignCenter_b10c2f{-ms-flex-pack:center;justify-content:center}._spectrum-ButtonGroup--vertical_b10c2f{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}[dir=ltr] ._spectrum-ButtonGroup--vertical_b10c2f ._spectrum-ButtonGroup-Button_b10c2f+._spectrum-ButtonGroup-Button_b10c2f{margin-left:0}[dir=rtl] ._spectrum-ButtonGroup--vertical_b10c2f ._spectrum-ButtonGroup-Button_b10c2f+._spectrum-ButtonGroup-Button_b10c2f{margin-right:0}._spectrum-ButtonGroup--vertical_b10c2f ._spectrum-ButtonGroup-Button_b10c2f+._spectrum-ButtonGroup-Button_b10c2f{margin-top:var(--spectrum-buttongroup-button-gap-y,var(--spectrum-global-dimension-static-size-200))}._spectrum-ButtonGroup--vertical_b10c2f._spectrum-ButtonGroup--alignEnd_b10c2f{-ms-flex-align:end;align-items:flex-end}._spectrum-ButtonGroup--vertical_b10c2f._spectrum-ButtonGroup--alignCenter_b10c2f{-ms-flex-align:center;align-items:center}
1
+ .spectrum-ButtonGroup_b10c2f{align-items:flex-start;display:inline-flex;position:relative}.spectrum-ButtonGroup_b10c2f .spectrum-ButtonGroup-Button_b10c2f{flex-shrink:0}[dir=ltr] .spectrum-ButtonGroup_b10c2f .spectrum-ButtonGroup-Button_b10c2f+.spectrum-ButtonGroup-Button_b10c2f{margin-left:var(--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200))}[dir=rtl] .spectrum-ButtonGroup_b10c2f .spectrum-ButtonGroup-Button_b10c2f+.spectrum-ButtonGroup-Button_b10c2f{margin-right:var(--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200))}.spectrum-ButtonGroup_b10c2f.spectrum-ButtonGroup--alignEnd_b10c2f{justify-content:flex-end}.spectrum-ButtonGroup_b10c2f.spectrum-ButtonGroup--alignCenter_b10c2f{justify-content:center}.spectrum-ButtonGroup--vertical_b10c2f{flex-direction:column;display:inline-flex}[dir=ltr] .spectrum-ButtonGroup--vertical_b10c2f .spectrum-ButtonGroup-Button_b10c2f+.spectrum-ButtonGroup-Button_b10c2f{margin-left:0}[dir=rtl] .spectrum-ButtonGroup--vertical_b10c2f .spectrum-ButtonGroup-Button_b10c2f+.spectrum-ButtonGroup-Button_b10c2f{margin-right:0}.spectrum-ButtonGroup--vertical_b10c2f .spectrum-ButtonGroup-Button_b10c2f+.spectrum-ButtonGroup-Button_b10c2f{margin-top:var(--spectrum-buttongroup-button-gap-y,var(--spectrum-global-dimension-static-size-200))}.spectrum-ButtonGroup--vertical_b10c2f.spectrum-ButtonGroup--alignEnd_b10c2f{align-items:flex-end}.spectrum-ButtonGroup--vertical_b10c2f.spectrum-ButtonGroup--alignCenter_b10c2f{align-items:center}
package/dist/main.js CHANGED
@@ -1,8 +1,8 @@
1
1
  require("./main.css");
2
- var $fadik$reactspectrumutils = require("@react-spectrum/utils");
3
- var $fadik$reactariautils = require("@react-aria/utils");
4
- var $fadik$reactspectrumprovider = require("@react-spectrum/provider");
5
- var $fadik$react = require("react");
2
+ var $26Ygg$reactspectrumutils = require("@react-spectrum/utils");
3
+ var $26Ygg$reactariautils = require("@react-aria/utils");
4
+ var $26Ygg$reactspectrumprovider = require("@react-spectrum/provider");
5
+ var $26Ygg$react = require("react");
6
6
 
7
7
  function $parcel$exportWildcard(dest, source) {
8
8
  Object.keys(source).forEach(function(key) {
@@ -26,41 +26,41 @@ function $parcel$interopDefault(a) {
26
26
  function $parcel$export(e, n, v, s) {
27
27
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
28
28
  }
29
- var $c30474aa2e2ed478$exports = {};
29
+ var $f769e80631bb763a$exports = {};
30
30
 
31
- $parcel$export($c30474aa2e2ed478$exports, "ButtonGroup", () => $c30474aa2e2ed478$export$69b1032f2ecdf404);
31
+ $parcel$export($f769e80631bb763a$exports, "ButtonGroup", () => $f769e80631bb763a$export$69b1032f2ecdf404);
32
32
 
33
33
 
34
34
 
35
35
 
36
- var $53a033bfcc659fdc$exports = {};
36
+ var $04c18cc51fc36ab2$exports = {};
37
37
 
38
- $parcel$export($53a033bfcc659fdc$exports, "spectrum-ButtonGroup", () => $53a033bfcc659fdc$export$a92faf51352ac608, (v) => $53a033bfcc659fdc$export$a92faf51352ac608 = v);
39
- $parcel$export($53a033bfcc659fdc$exports, "spectrum-ButtonGroup-Button", () => $53a033bfcc659fdc$export$7184de2337c1927f, (v) => $53a033bfcc659fdc$export$7184de2337c1927f = v);
40
- $parcel$export($53a033bfcc659fdc$exports, "spectrum-ButtonGroup--alignEnd", () => $53a033bfcc659fdc$export$30e96c53d7beca11, (v) => $53a033bfcc659fdc$export$30e96c53d7beca11 = v);
41
- $parcel$export($53a033bfcc659fdc$exports, "spectrum-ButtonGroup--alignCenter", () => $53a033bfcc659fdc$export$252bc7c4ae05757, (v) => $53a033bfcc659fdc$export$252bc7c4ae05757 = v);
42
- $parcel$export($53a033bfcc659fdc$exports, "spectrum-ButtonGroup--vertical", () => $53a033bfcc659fdc$export$84d9c0e1917a4eaf, (v) => $53a033bfcc659fdc$export$84d9c0e1917a4eaf = v);
43
- var $53a033bfcc659fdc$export$a92faf51352ac608;
44
- var $53a033bfcc659fdc$export$7184de2337c1927f;
45
- var $53a033bfcc659fdc$export$30e96c53d7beca11;
46
- var $53a033bfcc659fdc$export$252bc7c4ae05757;
47
- var $53a033bfcc659fdc$export$84d9c0e1917a4eaf;
48
- $53a033bfcc659fdc$export$a92faf51352ac608 = "_spectrum-ButtonGroup_b10c2f";
49
- $53a033bfcc659fdc$export$7184de2337c1927f = "_spectrum-ButtonGroup-Button_b10c2f";
50
- $53a033bfcc659fdc$export$30e96c53d7beca11 = "_spectrum-ButtonGroup--alignEnd_b10c2f";
51
- $53a033bfcc659fdc$export$252bc7c4ae05757 = "_spectrum-ButtonGroup--alignCenter_b10c2f";
52
- $53a033bfcc659fdc$export$84d9c0e1917a4eaf = "_spectrum-ButtonGroup--vertical_b10c2f";
38
+ $parcel$export($04c18cc51fc36ab2$exports, "spectrum-ButtonGroup", () => $04c18cc51fc36ab2$export$a92faf51352ac608, (v) => $04c18cc51fc36ab2$export$a92faf51352ac608 = v);
39
+ $parcel$export($04c18cc51fc36ab2$exports, "spectrum-ButtonGroup-Button", () => $04c18cc51fc36ab2$export$7184de2337c1927f, (v) => $04c18cc51fc36ab2$export$7184de2337c1927f = v);
40
+ $parcel$export($04c18cc51fc36ab2$exports, "spectrum-ButtonGroup--alignEnd", () => $04c18cc51fc36ab2$export$30e96c53d7beca11, (v) => $04c18cc51fc36ab2$export$30e96c53d7beca11 = v);
41
+ $parcel$export($04c18cc51fc36ab2$exports, "spectrum-ButtonGroup--alignCenter", () => $04c18cc51fc36ab2$export$252bc7c4ae05757, (v) => $04c18cc51fc36ab2$export$252bc7c4ae05757 = v);
42
+ $parcel$export($04c18cc51fc36ab2$exports, "spectrum-ButtonGroup--vertical", () => $04c18cc51fc36ab2$export$84d9c0e1917a4eaf, (v) => $04c18cc51fc36ab2$export$84d9c0e1917a4eaf = v);
43
+ var $04c18cc51fc36ab2$export$a92faf51352ac608;
44
+ var $04c18cc51fc36ab2$export$7184de2337c1927f;
45
+ var $04c18cc51fc36ab2$export$30e96c53d7beca11;
46
+ var $04c18cc51fc36ab2$export$252bc7c4ae05757;
47
+ var $04c18cc51fc36ab2$export$84d9c0e1917a4eaf;
48
+ $04c18cc51fc36ab2$export$a92faf51352ac608 = "spectrum-ButtonGroup_b10c2f";
49
+ $04c18cc51fc36ab2$export$7184de2337c1927f = "spectrum-ButtonGroup-Button_b10c2f";
50
+ $04c18cc51fc36ab2$export$30e96c53d7beca11 = "spectrum-ButtonGroup--alignEnd_b10c2f";
51
+ $04c18cc51fc36ab2$export$252bc7c4ae05757 = "spectrum-ButtonGroup--alignCenter_b10c2f";
52
+ $04c18cc51fc36ab2$export$84d9c0e1917a4eaf = "spectrum-ButtonGroup--vertical_b10c2f";
53
53
 
54
54
 
55
- function $c30474aa2e2ed478$var$ButtonGroup(props, ref) {
56
- let { scale: scale } = $fadik$reactspectrumprovider.useProvider();
57
- props = $fadik$reactspectrumprovider.useProviderProps(props);
58
- props = $fadik$reactspectrumutils.useSlotProps(props, 'buttonGroup');
55
+ function $f769e80631bb763a$var$ButtonGroup(props, ref) {
56
+ let { scale: scale } = $26Ygg$reactspectrumprovider.useProvider();
57
+ props = $26Ygg$reactspectrumprovider.useProviderProps(props);
58
+ props = $26Ygg$reactspectrumutils.useSlotProps(props, 'buttonGroup');
59
59
  let { children: children , orientation: orientation = 'horizontal' , isDisabled: isDisabled , align: align = 'start' , ...otherProps } = props;
60
- let { styleProps: styleProps } = $fadik$reactspectrumutils.useStyleProps(otherProps);
61
- let domRef = $fadik$reactspectrumutils.useDOMRef(ref);
62
- let [hasOverflow, setHasOverflow] = $fadik$reactariautils.useValueEffect(false);
63
- let checkForOverflow = $fadik$react.useCallback(()=>{
60
+ let { styleProps: styleProps } = $26Ygg$reactspectrumutils.useStyleProps(otherProps);
61
+ let domRef = $26Ygg$reactspectrumutils.useDOMRef(ref);
62
+ let [hasOverflow, setHasOverflow] = $26Ygg$reactariautils.useValueEffect(false);
63
+ let checkForOverflow = $26Ygg$react.useCallback(()=>{
64
64
  let computeHasOverflow = ()=>{
65
65
  if (domRef.current && orientation === 'horizontal') {
66
66
  let buttonGroupChildren = Array.from(domRef.current.children);
@@ -87,47 +87,47 @@ function $c30474aa2e2ed478$var$ButtonGroup(props, ref) {
87
87
  ]);
88
88
  // There are two main reasons we need to remeasure:
89
89
  // 1. Internal changes: Check for initial overflow or when orientation/scale/children change (from checkForOverflow dep array)
90
- $fadik$react.useEffect(()=>{
90
+ $26Ygg$react.useEffect(()=>{
91
91
  checkForOverflow();
92
92
  }, [
93
93
  checkForOverflow
94
94
  ]);
95
95
  // 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
96
- let parent = $fadik$react.useRef();
97
- $fadik$react.useEffect(()=>{
96
+ let parent = $26Ygg$react.useRef();
97
+ $26Ygg$react.useEffect(()=>{
98
98
  parent.current = domRef.current.parentElement;
99
99
  }, [
100
100
  domRef.current
101
101
  ]);
102
- $fadik$reactspectrumutils.useResizeObserver({
102
+ $26Ygg$reactspectrumutils.useResizeObserver({
103
103
  ref: parent,
104
104
  onResize: checkForOverflow
105
105
  });
106
- return(/*#__PURE__*/ ($parcel$interopDefault($fadik$react)).createElement("div", {
107
- ...$fadik$reactariautils.filterDOMProps(otherProps),
106
+ return(/*#__PURE__*/ ($parcel$interopDefault($26Ygg$react)).createElement("div", {
107
+ ...$26Ygg$reactariautils.filterDOMProps(otherProps),
108
108
  ...styleProps,
109
109
  ref: domRef,
110
- className: $fadik$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($53a033bfcc659fdc$exports)), 'spectrum-ButtonGroup', {
110
+ className: $26Ygg$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($04c18cc51fc36ab2$exports)), 'spectrum-ButtonGroup', {
111
111
  'spectrum-ButtonGroup--vertical': orientation === 'vertical' || hasOverflow,
112
112
  'spectrum-ButtonGroup--alignEnd': align === 'end',
113
113
  'spectrum-ButtonGroup--alignCenter': align === 'center'
114
114
  }, styleProps.className)
115
- }, /*#__PURE__*/ ($parcel$interopDefault($fadik$react)).createElement($fadik$reactspectrumutils.SlotProvider, {
115
+ }, /*#__PURE__*/ ($parcel$interopDefault($26Ygg$react)).createElement($26Ygg$reactspectrumutils.SlotProvider, {
116
116
  slots: {
117
117
  button: {
118
- UNSAFE_className: $fadik$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($53a033bfcc659fdc$exports)), 'spectrum-ButtonGroup-Button')
118
+ UNSAFE_className: $26Ygg$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($04c18cc51fc36ab2$exports)), 'spectrum-ButtonGroup-Button')
119
119
  }
120
120
  }
121
- }, /*#__PURE__*/ ($parcel$interopDefault($fadik$react)).createElement($fadik$reactspectrumprovider.Provider, {
121
+ }, /*#__PURE__*/ ($parcel$interopDefault($26Ygg$react)).createElement($26Ygg$reactspectrumprovider.Provider, {
122
122
  isDisabled: isDisabled
123
123
  }, children))));
124
124
  }
125
125
  /**
126
126
  * ButtonGroup handles overflow for a grouping of buttons whose actions are related to each other.
127
- */ let $c30474aa2e2ed478$export$69b1032f2ecdf404 = /*#__PURE__*/ ($parcel$interopDefault($fadik$react)).forwardRef($c30474aa2e2ed478$var$ButtonGroup);
127
+ */ let $f769e80631bb763a$export$69b1032f2ecdf404 = /*#__PURE__*/ ($parcel$interopDefault($26Ygg$react)).forwardRef($f769e80631bb763a$var$ButtonGroup);
128
128
 
129
129
 
130
- $parcel$exportWildcard(module.exports, $c30474aa2e2ed478$exports);
130
+ $parcel$exportWildcard(module.exports, $f769e80631bb763a$exports);
131
131
 
132
132
 
133
133
  //# sourceM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CAAE,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\n/// <reference types=\"css-module-types\" />\n\nexport * from './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, useValueEffect} from '@react-aria/utils';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useCallback, useEffect, 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 useEffect(() => {\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 useEffect(() => {\n parent.current = domRef.current.parentElement;\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,CA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;IAAA,CAAC;IAEzD,EAAmD,AAAnD,iDAAmD;IACnD,EAA8H,AAA9H,4HAA8H;IAC9H,sBAAS,KAAO,CAAC;QACf,gBAAgB;IAClB,CAAC,EAAE,CAAC;QAAA,gBAAgB;IAAA,CAAC;IAErB,EAAwK,AAAxK,sKAAwK;IACxK,GAAG,CAAC,MAAM,GAAG,mBAAM;IACnB,sBAAS,KAAO,CAAC;QACf,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa;IAC/C,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\n/// <reference types=\"css-module-types\" />\n\nexport * from './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, useValueEffect} from '@react-aria/utils';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useCallback, useEffect, 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 useEffect(() => {\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 useEffect(() => {\n parent.current = domRef.current.parentElement;\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
@@ -1,8 +1,8 @@
1
1
  import "./main.css";
2
- import {useSlotProps as $dNanD$useSlotProps, useStyleProps as $dNanD$useStyleProps, useDOMRef as $dNanD$useDOMRef, useResizeObserver as $dNanD$useResizeObserver, classNames as $dNanD$classNames, SlotProvider as $dNanD$SlotProvider} from "@react-spectrum/utils";
3
- import {useValueEffect as $dNanD$useValueEffect, filterDOMProps as $dNanD$filterDOMProps} from "@react-aria/utils";
4
- import {useProvider as $dNanD$useProvider, useProviderProps as $dNanD$useProviderProps, Provider as $dNanD$Provider} from "@react-spectrum/provider";
5
- import $dNanD$react, {useCallback as $dNanD$useCallback, useEffect as $dNanD$useEffect, useRef as $dNanD$useRef} from "react";
2
+ import {useSlotProps as $4bazt$useSlotProps, useStyleProps as $4bazt$useStyleProps, useDOMRef as $4bazt$useDOMRef, useResizeObserver as $4bazt$useResizeObserver, classNames as $4bazt$classNames, SlotProvider as $4bazt$SlotProvider} from "@react-spectrum/utils";
3
+ import {useValueEffect as $4bazt$useValueEffect, filterDOMProps as $4bazt$filterDOMProps} from "@react-aria/utils";
4
+ import {useProvider as $4bazt$useProvider, useProviderProps as $4bazt$useProviderProps, Provider as $4bazt$Provider} from "@react-spectrum/provider";
5
+ import $4bazt$react, {useCallback as $4bazt$useCallback, useEffect as $4bazt$useEffect, useRef as $4bazt$useRef} from "react";
6
6
 
7
7
  function $parcel$interopDefault(a) {
8
8
  return a && a.__esModule ? a.default : a;
@@ -10,41 +10,41 @@ function $parcel$interopDefault(a) {
10
10
  function $parcel$export(e, n, v, s) {
11
11
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
12
  }
13
- var $089be6ba315700f8$exports = {};
13
+ var $b5b51b4fd5f0c4d0$exports = {};
14
14
 
15
- $parcel$export($089be6ba315700f8$exports, "ButtonGroup", () => $089be6ba315700f8$export$69b1032f2ecdf404);
15
+ $parcel$export($b5b51b4fd5f0c4d0$exports, "ButtonGroup", () => $b5b51b4fd5f0c4d0$export$69b1032f2ecdf404);
16
16
 
17
17
 
18
18
 
19
19
 
20
- var $5bb6a3062fd4dc2f$exports = {};
20
+ var $6f0f19bec60aa9a2$exports = {};
21
21
 
22
- $parcel$export($5bb6a3062fd4dc2f$exports, "spectrum-ButtonGroup", () => $5bb6a3062fd4dc2f$export$a92faf51352ac608, (v) => $5bb6a3062fd4dc2f$export$a92faf51352ac608 = v);
23
- $parcel$export($5bb6a3062fd4dc2f$exports, "spectrum-ButtonGroup-Button", () => $5bb6a3062fd4dc2f$export$7184de2337c1927f, (v) => $5bb6a3062fd4dc2f$export$7184de2337c1927f = v);
24
- $parcel$export($5bb6a3062fd4dc2f$exports, "spectrum-ButtonGroup--alignEnd", () => $5bb6a3062fd4dc2f$export$30e96c53d7beca11, (v) => $5bb6a3062fd4dc2f$export$30e96c53d7beca11 = v);
25
- $parcel$export($5bb6a3062fd4dc2f$exports, "spectrum-ButtonGroup--alignCenter", () => $5bb6a3062fd4dc2f$export$252bc7c4ae05757, (v) => $5bb6a3062fd4dc2f$export$252bc7c4ae05757 = v);
26
- $parcel$export($5bb6a3062fd4dc2f$exports, "spectrum-ButtonGroup--vertical", () => $5bb6a3062fd4dc2f$export$84d9c0e1917a4eaf, (v) => $5bb6a3062fd4dc2f$export$84d9c0e1917a4eaf = v);
27
- var $5bb6a3062fd4dc2f$export$a92faf51352ac608;
28
- var $5bb6a3062fd4dc2f$export$7184de2337c1927f;
29
- var $5bb6a3062fd4dc2f$export$30e96c53d7beca11;
30
- var $5bb6a3062fd4dc2f$export$252bc7c4ae05757;
31
- var $5bb6a3062fd4dc2f$export$84d9c0e1917a4eaf;
32
- $5bb6a3062fd4dc2f$export$a92faf51352ac608 = "_spectrum-ButtonGroup_b10c2f";
33
- $5bb6a3062fd4dc2f$export$7184de2337c1927f = "_spectrum-ButtonGroup-Button_b10c2f";
34
- $5bb6a3062fd4dc2f$export$30e96c53d7beca11 = "_spectrum-ButtonGroup--alignEnd_b10c2f";
35
- $5bb6a3062fd4dc2f$export$252bc7c4ae05757 = "_spectrum-ButtonGroup--alignCenter_b10c2f";
36
- $5bb6a3062fd4dc2f$export$84d9c0e1917a4eaf = "_spectrum-ButtonGroup--vertical_b10c2f";
22
+ $parcel$export($6f0f19bec60aa9a2$exports, "spectrum-ButtonGroup", () => $6f0f19bec60aa9a2$export$a92faf51352ac608, (v) => $6f0f19bec60aa9a2$export$a92faf51352ac608 = v);
23
+ $parcel$export($6f0f19bec60aa9a2$exports, "spectrum-ButtonGroup-Button", () => $6f0f19bec60aa9a2$export$7184de2337c1927f, (v) => $6f0f19bec60aa9a2$export$7184de2337c1927f = v);
24
+ $parcel$export($6f0f19bec60aa9a2$exports, "spectrum-ButtonGroup--alignEnd", () => $6f0f19bec60aa9a2$export$30e96c53d7beca11, (v) => $6f0f19bec60aa9a2$export$30e96c53d7beca11 = v);
25
+ $parcel$export($6f0f19bec60aa9a2$exports, "spectrum-ButtonGroup--alignCenter", () => $6f0f19bec60aa9a2$export$252bc7c4ae05757, (v) => $6f0f19bec60aa9a2$export$252bc7c4ae05757 = v);
26
+ $parcel$export($6f0f19bec60aa9a2$exports, "spectrum-ButtonGroup--vertical", () => $6f0f19bec60aa9a2$export$84d9c0e1917a4eaf, (v) => $6f0f19bec60aa9a2$export$84d9c0e1917a4eaf = v);
27
+ var $6f0f19bec60aa9a2$export$a92faf51352ac608;
28
+ var $6f0f19bec60aa9a2$export$7184de2337c1927f;
29
+ var $6f0f19bec60aa9a2$export$30e96c53d7beca11;
30
+ var $6f0f19bec60aa9a2$export$252bc7c4ae05757;
31
+ var $6f0f19bec60aa9a2$export$84d9c0e1917a4eaf;
32
+ $6f0f19bec60aa9a2$export$a92faf51352ac608 = "spectrum-ButtonGroup_b10c2f";
33
+ $6f0f19bec60aa9a2$export$7184de2337c1927f = "spectrum-ButtonGroup-Button_b10c2f";
34
+ $6f0f19bec60aa9a2$export$30e96c53d7beca11 = "spectrum-ButtonGroup--alignEnd_b10c2f";
35
+ $6f0f19bec60aa9a2$export$252bc7c4ae05757 = "spectrum-ButtonGroup--alignCenter_b10c2f";
36
+ $6f0f19bec60aa9a2$export$84d9c0e1917a4eaf = "spectrum-ButtonGroup--vertical_b10c2f";
37
37
 
38
38
 
39
- function $089be6ba315700f8$var$ButtonGroup(props, ref) {
40
- let { scale: scale } = $dNanD$useProvider();
41
- props = $dNanD$useProviderProps(props);
42
- props = $dNanD$useSlotProps(props, 'buttonGroup');
39
+ function $b5b51b4fd5f0c4d0$var$ButtonGroup(props, ref) {
40
+ let { scale: scale } = $4bazt$useProvider();
41
+ props = $4bazt$useProviderProps(props);
42
+ props = $4bazt$useSlotProps(props, 'buttonGroup');
43
43
  let { children: children , orientation: orientation = 'horizontal' , isDisabled: isDisabled , align: align = 'start' , ...otherProps } = props;
44
- let { styleProps: styleProps } = $dNanD$useStyleProps(otherProps);
45
- let domRef = $dNanD$useDOMRef(ref);
46
- let [hasOverflow, setHasOverflow] = $dNanD$useValueEffect(false);
47
- let checkForOverflow = $dNanD$useCallback(()=>{
44
+ let { styleProps: styleProps } = $4bazt$useStyleProps(otherProps);
45
+ let domRef = $4bazt$useDOMRef(ref);
46
+ let [hasOverflow, setHasOverflow] = $4bazt$useValueEffect(false);
47
+ let checkForOverflow = $4bazt$useCallback(()=>{
48
48
  let computeHasOverflow = ()=>{
49
49
  if (domRef.current && orientation === 'horizontal') {
50
50
  let buttonGroupChildren = Array.from(domRef.current.children);
@@ -71,47 +71,47 @@ function $089be6ba315700f8$var$ButtonGroup(props, ref) {
71
71
  ]);
72
72
  // There are two main reasons we need to remeasure:
73
73
  // 1. Internal changes: Check for initial overflow or when orientation/scale/children change (from checkForOverflow dep array)
74
- $dNanD$useEffect(()=>{
74
+ $4bazt$useEffect(()=>{
75
75
  checkForOverflow();
76
76
  }, [
77
77
  checkForOverflow
78
78
  ]);
79
79
  // 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
80
- let parent = $dNanD$useRef();
81
- $dNanD$useEffect(()=>{
80
+ let parent = $4bazt$useRef();
81
+ $4bazt$useEffect(()=>{
82
82
  parent.current = domRef.current.parentElement;
83
83
  }, [
84
84
  domRef.current
85
85
  ]);
86
- $dNanD$useResizeObserver({
86
+ $4bazt$useResizeObserver({
87
87
  ref: parent,
88
88
  onResize: checkForOverflow
89
89
  });
90
- return(/*#__PURE__*/ $dNanD$react.createElement("div", {
91
- ...$dNanD$filterDOMProps(otherProps),
90
+ return(/*#__PURE__*/ $4bazt$react.createElement("div", {
91
+ ...$4bazt$filterDOMProps(otherProps),
92
92
  ...styleProps,
93
93
  ref: domRef,
94
- className: $dNanD$classNames((/*@__PURE__*/$parcel$interopDefault($5bb6a3062fd4dc2f$exports)), 'spectrum-ButtonGroup', {
94
+ className: $4bazt$classNames((/*@__PURE__*/$parcel$interopDefault($6f0f19bec60aa9a2$exports)), 'spectrum-ButtonGroup', {
95
95
  'spectrum-ButtonGroup--vertical': orientation === 'vertical' || hasOverflow,
96
96
  'spectrum-ButtonGroup--alignEnd': align === 'end',
97
97
  'spectrum-ButtonGroup--alignCenter': align === 'center'
98
98
  }, styleProps.className)
99
- }, /*#__PURE__*/ $dNanD$react.createElement($dNanD$SlotProvider, {
99
+ }, /*#__PURE__*/ $4bazt$react.createElement($4bazt$SlotProvider, {
100
100
  slots: {
101
101
  button: {
102
- UNSAFE_className: $dNanD$classNames((/*@__PURE__*/$parcel$interopDefault($5bb6a3062fd4dc2f$exports)), 'spectrum-ButtonGroup-Button')
102
+ UNSAFE_className: $4bazt$classNames((/*@__PURE__*/$parcel$interopDefault($6f0f19bec60aa9a2$exports)), 'spectrum-ButtonGroup-Button')
103
103
  }
104
104
  }
105
- }, /*#__PURE__*/ $dNanD$react.createElement($dNanD$Provider, {
105
+ }, /*#__PURE__*/ $4bazt$react.createElement($4bazt$Provider, {
106
106
  isDisabled: isDisabled
107
107
  }, children))));
108
108
  }
109
109
  /**
110
110
  * ButtonGroup handles overflow for a grouping of buttons whose actions are related to each other.
111
- */ let $089be6ba315700f8$export$69b1032f2ecdf404 = /*#__PURE__*/ $dNanD$react.forwardRef($089be6ba315700f8$var$ButtonGroup);
111
+ */ let $b5b51b4fd5f0c4d0$export$69b1032f2ecdf404 = /*#__PURE__*/ $4bazt$react.forwardRef($b5b51b4fd5f0c4d0$var$ButtonGroup);
112
112
 
113
113
 
114
114
 
115
115
 
116
- export {$089be6ba315700f8$export$69b1032f2ecdf404 as ButtonGroup};
116
+ export {$b5b51b4fd5f0c4d0$export$69b1032f2ecdf404 as ButtonGroup};
117
117
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAsC;AACtC,GAA6C;AAC7C,GAAgD;AAChD,GAAmD;AACnD,GAAgD;AAJhD,yCAAsC,GAAG,CAA8B;AACvE,yCAA6C,GAAG,CAAqC;AACrF,yCAAgD,GAAG,CAAwC;AAC3F,wCAAmD,GAAG,CAA2C;AACjG,yCAAgD,GAAG,CAAwC;;;SDuBlF,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,EAA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AAAxK,sKAAwK;IACxK,GAAG,CAAC,MAAM,GAAG,aAAM;IACnB,gBAAS,KAAO,CAAC;QACf,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa;IAC/C,CAAC,EAAE,CAAC;QAAA,MAAM,CAAC,OAAO;IAAA,CAAC;IACnB,wBAAiB,CAAC,CAAC;QAAA,GAAG,EAAE,MAAM;QAAE,QAAQ,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\n/// <reference types=\"css-module-types\" />\n\nexport * from './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, useValueEffect} from '@react-aria/utils';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useCallback, useEffect, 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 useEffect(() => {\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 useEffect(() => {\n parent.current = domRef.current.parentElement;\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 permiss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AAK,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\n/// <reference types=\"css-module-types\" />\n\nexport * from './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, useValueEffect} from '@react-aria/utils';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useCallback, useEffect, 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 useEffect(() => {\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 useEffect(() => {\n parent.current = domRef.current.parentElement;\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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/buttongroup",
3
- "version": "3.2.4-nightly.3085+dfe72ee07",
3
+ "version": "3.2.4-nightly.3100+da2aa7467",
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.1394+dfe72ee07",
36
- "@react-spectrum/button": "3.0.0-nightly.1394+dfe72ee07",
37
- "@react-spectrum/text": "3.1.4-nightly.3085+dfe72ee07",
38
- "@react-spectrum/utils": "3.0.0-nightly.1394+dfe72ee07",
39
- "@react-types/buttongroup": "3.1.3-nightly.3085+dfe72ee07",
40
- "@react-types/shared": "3.0.0-nightly.1394+dfe72ee07"
35
+ "@react-aria/utils": "3.0.0-nightly.1409+da2aa7467",
36
+ "@react-spectrum/button": "3.0.0-nightly.1409+da2aa7467",
37
+ "@react-spectrum/text": "3.1.4-nightly.3100+da2aa7467",
38
+ "@react-spectrum/utils": "3.0.0-nightly.1409+da2aa7467",
39
+ "@react-types/buttongroup": "3.1.3-nightly.3100+da2aa7467",
40
+ "@react-types/shared": "3.0.0-nightly.1409+da2aa7467"
41
41
  },
42
42
  "devDependencies": {
43
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1394+dfe72ee07",
44
- "@spectrum-icons/workflow": "3.0.0-nightly.1394+dfe72ee07"
43
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1409+da2aa7467",
44
+ "@spectrum-icons/workflow": "3.0.0-nightly.1409+da2aa7467"
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": "dfe72ee076f7ca27728d0b6b4c1ef86e11191ece"
53
+ "gitHead": "da2aa74670fbd93335ff01401ca53826b3602777"
54
54
  }